--- amazon-3/amazon.module 2010-02-24 22:41:30.000000000 -0800 +++ amazon-new/amazon.module 2010-03-11 16:27:29.000000000 -0800 @@ -344,7 +344,7 @@ function _amazon_item_batch_lookup_from_ if (!empty($item_ids)) { $params = array( 'ItemId' => implode(',', $item_ids), - 'ResponseGroup' => 'Large', + 'ResponseGroup' => 'Large,VariationSummary', ); $results = amazon_http_request('ItemLookup', $params); if (!empty($results->Items->Request->Errors)) { @@ -465,6 +465,15 @@ function amazon_item_clean_xml($xml) { $item['amazonpricecurrencycode'] = (string)$xml->Offers->Offer[0]->OfferListing->Price->CurrencyCode; $item['amazonpriceformattedprice'] = (string)$xml->Offers->Offer[0]->OfferListing->Price->FormattedPrice; } + // Now check if vairation summary returned values + if (!empty($xml->VariationSummary->LowestPrice)) { + $item['highestpriceamount'] = (string)$xml->VariationSummary->HighestPrice->Amount; + $item['highestpricecurrencycode'] = (string)$xml->VariationSummary->HighestPrice->CurrencyCode; + $item['highestpriceformattedprice'] = (string)$xml->VariationSummary->HighestPrice->FormattedPrice; + $item['lowestpriceamount'] = (string)$xml->VariationSummary->LowestPrice->Amount; + $item['lowestpricecurrencycode'] = (string)$xml->VariationSummary->LowestPrice->CurrencyCode; + $item['lowestpriceformattedprice'] = (string)$xml->VariationSummary->LowestPrice->FormattedPrice; + } $participant_types = split(',', AMAZON_PARTICIPANT_TYPES);