Index: amazon_media/amazon-item-software-details.tpl.php =================================================================== --- amazon_media/amazon-item-software-details.tpl.php (revision 14) +++ amazon_media/amazon-item-software-details.tpl.php (revision 77) @@ -4,4 +4,5 @@
:
:
:
+
:
Index: amazon_media/amazon-item-video-games-details.tpl.php =================================================================== --- amazon_media/amazon-item-video-games-details.tpl.php (revision 14) +++ amazon_media/amazon-item-video-games-details.tpl.php (revision 77) @@ -4,4 +4,5 @@
:
:
:
+
:
Index: amazon-item-details.tpl.php =================================================================== --- amazon-item-details.tpl.php (revision 14) +++ amazon-item-details.tpl.php (revision 77) @@ -4,4 +4,5 @@
:
:
:
+
:
Index: amazon.install =================================================================== --- amazon.install (revision 14) +++ amazon.install (revision 77) @@ -45,6 +45,9 @@ 'listpriceamount' => array('type' => 'float', 'unsigned' => TRUE), 'listpricecurrencycode' => array('type' => 'varchar', 'length' => 32), 'listpriceformattedprice' => array('type' => 'varchar', 'length' => 32), + 'offeredpriceamount' => array('type' => 'float', 'unsigned' => TRUE), + 'offeredpricecurrencycode' => array('type' => 'varchar', 'length' => 32), + 'offeredpriceformattedprice' => array('type' => 'varchar', 'length' => 32), 'productgroup' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE), 'producttypename' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE), 'timestamp' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), Index: includes/amazon.views.inc =================================================================== --- includes/amazon.views.inc (revision 14) +++ includes/amazon.views.inc (revision 77) @@ -126,6 +126,8 @@ _amazon_make_simple_text_field($data, 'amazon_item', 'releasedate', 'Release date', 'The release date of the product.'); _amazon_make_simple_text_field($data, 'amazon_item', 'listpriceformattedprice', 'List price', 'The current list price of the item. (Unformatted)'); unset($data['amazon_item']['listpriceformattedprice']['argument']); + _amazon_make_simple_text_field($data, 'amazon_item', 'offeredpriceformattedprice', 'Offered price', 'The current lowest new price of the item. (Unformatted)'); + unset($data['amazon_item']['offeredpriceformattedprice']['argument']); // Define the base group of this table. Fields that don't // have a group defined will go into this field by default. Index: amazon.module =================================================================== --- amazon.module (revision 14) +++ amazon.module (revision 77) @@ -354,6 +354,12 @@ $item['listpriceformattedprice'] = (string)$xml->ItemAttributes->ListPrice->FormattedPrice; } + if (!empty($xml->Offers->Offer->OfferListing->Price->Amount)) { + $item['offeredpriceamount'] = (string)$xml->Offers->Offer->OfferListing->Price->Amount; + $item['offeredpricecurrencycode'] = (string)$xml->Offers->Offer->OfferListing->Price->CurrencyCode; + $item['offeredpriceformattedprice'] = (string)$xml->Offers->Offer->OfferListing->Price->FormattedPrice; + } + $participant_types = split(',', AMAZON_PARTICIPANT_TYPES); // Pull in the basics of the ItemAttributes collection. @@ -629,6 +635,7 @@ $values['binding'] = check_plain($item['binding']); $values['releasedate'] = check_plain($item['releasedate']); $values['listprice'] = check_plain($item['listpriceformattedprice']); + $values['offeredprice'] = check_plain($item['offeredpriceformattedprice']); $values['producttype'] = check_plain($item['producttype']); return $values; }