Exeu / apai-io

DISCONTINUED Amazon Product Adverstising Library based on PHP REST and SOAP (only V1) using the Product Advertising API.
http://apai-io.readthedocs.io/en/latest/
628 stars 155 forks source link

Kindl not supported? #64

Closed Daijobou closed 9 years ago

Daijobou commented 9 years ago

Hello. I dont think this is a bug in apai-io, but maybe? I request a ASIN for a "kindl" item but response have no "OfferSummary" data. Is this my mistake, from amazon or a problem with apai-io? All products working fine with apai-io exclude kindl items for amazon.DE.

I want the price of this item: http://www.amazon.de/exec/obidos/ASIN/B00J50S1IY/

        $lookup = new Lookup();
        $lookup->setItemId(implode(',',$items));
        $lookup->setResponseGroup(array('Offers'));
        $apaiIo = new ApaiIO($conf);
        return $apaiIo->runOperation($lookup);

Result is:

<?xml version="1.0" ?><ItemLookupResponse xmlns="http://webservices.amazon.com/AWSECommerceService/2011-08-01"><OperationRequest><HTTPHeaders><Header Name="UserAgent" Value="ApaiIO [2.0.0-DEV]"></Header></HTTPHeaders><RequestId>*********</RequestId><Arguments><Argument Name="Operation" Value="ItemLookup"></Argument><Argument Name="Service" Value="AWSECommerceService"></Argument><Argument Name="Signature" Value="******"></Argument><Argument Name="AssociateTag" Value="**********"></Argument><Argument Name="Version" Value="2011-08-01"></Argument><Argument Name="ItemId" Value="B00J50S1IY"></Argument><Argument Name="AWSAccessKeyId" Value="********"></Argument><Argument Name="Timestamp" Value="2015-02-08T20:33:04Z"></Argument><Argument Name="ResponseGroup" Value="Offers"></Argument></Arguments><RequestProcessingTime>0.0129570000000000</RequestProcessingTime></OperationRequest><Items><Request><IsValid>True</IsValid><ItemLookupRequest><IdType>ASIN</IdType><ItemId>B00J50S1IY</ItemId><ResponseGroup>Offers</ResponseGroup><VariationPage>All</VariationPage></ItemLookupRequest></Request><Item><ASIN>B00J50S1IY</ASIN></Item></Items></ItemLookupResponse>

Here a example from another item with working result:

<?xml version="1.0" ?><ItemLookupResponse xmlns="http://webservices.amazon.com/AWSECommerceService/2011-08-01"><OperationRequest><HTTPHeaders><Header Name="UserAgent" Value="ApaiIO [2.0.0-DEV]"></Header></HTTPHeaders><RequestId>**********</RequestId><Arguments><Argument Name="Operation" Value="ItemLookup"></Argument><Argument Name="Service" Value="AWSECommerceService"></Argument><Argument Name="Signature" Value="**********"></Argument><Argument Name="AssociateTag" Value="**********"></Argument><Argument Name="Version" Value="2011-08-01"></Argument><Argument Name="ItemId" Value="B00PQ7E5VC"></Argument><Argument Name="AWSAccessKeyId" Value="**********"></Argument><Argument Name="Timestamp" Value="2015-02-08T20:41:53Z"></Argument><Argument Name="ResponseGroup" Value="Offers"></Argument></Arguments><RequestProcessingTime>0.0205450000000000</RequestProcessingTime></OperationRequest><Items><Request><IsValid>True</IsValid><ItemLookupRequest><IdType>ASIN</IdType><ItemId>B00PQ7E5VC</ItemId><ResponseGroup>Offers</ResponseGroup><VariationPage>All</VariationPage></ItemLookupRequest></Request><Item><ASIN>B00PQ7E5VC</ASIN><OfferSummary><LowestNewPrice><Amount>1299</Amount><CurrencyCode>EUR</CurrencyCode><FormattedPrice>EUR 12,99</FormattedPrice></LowestNewPrice><TotalNew>1</TotalNew><TotalUsed>0</TotalUsed><TotalCollectible>0</TotalCollectible><TotalRefurbished>0</TotalRefurbished></OfferSummary><Offers><TotalOffers>1</TotalOffers><TotalOfferPages>1</TotalOfferPages><MoreOffersUrl>**********</MoreOffersUrl><Offer><OfferAttributes><Condition>New</Condition></OfferAttributes><OfferListing><OfferListingId>**********</OfferListingId><Price><Amount>1299</Amount><CurrencyCode>EUR</CurrencyCode><FormattedPrice>EUR 12,99</FormattedPrice></Price><Availability>Noch nicht veröffentlicht</Availability><AvailabilityAttributes><AvailabilityType>now</AvailabilityType><IsPreorder>1</IsPreorder><MinimumHours>48</MinimumHours><MaximumHours>72</MaximumHours></AvailabilityAttributes><IsEligibleForSuperSaverShipping>1</IsEligibleForSuperSaverShipping></OfferListing></Offer></Offers></Item></Items></ItemLookupResponse>"

Can anybody help here, please? :)

Exeu commented 9 years ago

Seems to be that kindle has its own Category which you have to set before.

Look here:

http://docs.aws.amazon.com/AWSECommerceService/latest/DG/LocaleDE.html

Daijobou commented 9 years ago

I'm stupid. I don't understand what I can see on this page. ^^°

Should "Offers" not response a price for all items? http://docs.aws.amazon.com/AWSECommerceService/latest/DG/CHAP_ResponseGroupsList.html

Exeu commented 9 years ago

That's what you said ;)

I'm not that deep in the whole amazon api topic that i can answer this question exactly.

Maybe the following code is a hint for you and can help you:

$search = new Search();
$search->setCategory('KindleStore');
$search->setKeywords('Kalte Asche');
$search->setResponseGroup(array('Offers', 'Small'));

This should work with a lookup as well.

But anyway i will close this issue because this is not related to this library. It's more a question about what amazon can offer and how you can request this.

Daijobou commented 9 years ago

Thank you. Unfortunately setCategory('KindleStore') will not help.