Is there a way to do a item lookup by upc instead of asin?

Thanks

CommentFileSizeAuthor
#6 amazon-upc-lookup-917280-6.patch2.35 KBattheshow

Comments

rfay’s picture

I don't believe that even the UPC data is available from the Amazon API, not to mention a search based on it. The docs are at http://docs.amazonwebservices.com/AWSECommerceService/latest/DG/index.ht....

-Randy

Daniel Ferreira Jorge’s picture

From the documentation you sent me, the ItemLookup Method:

IdType

Type of item identifier used to look up an item. All IdTypes except ASINx require a SearchIndex to be specified. SKU requires a MerchantId to be specified also. For more information, see Item Identifiers.

Type: String

Default: ASIN

Valid Values: SKU | UPC | EAN | ISBN (US only, when search index is Books) | EISBN | JAN. UPC is not valid in the CA locale.

rfay’s picture

Title: UPC lookup instead of ASIN » Use UPC to look up Amazon Items in addition to ASIN
Category: support » feature

Ah, I was looking at ItemSearch (and it was too late at night). ItemLookup would be better anyway.

Patches are welcome.

To implement this there would have to be a clear way to distinguish between a UPC, a 10-digit ASIN, and a 13-digit ISBN. I do hate to keep making this more complex. (We added 13-digit ISBN not long ago).

nextmola’s picture

I agree UPC numbers are very important.

nextmola’s picture

Using the Zend Framework:
http://framework.zend.com/manual/en/zend.service.amazon.html

It is possible to use itemSearch for UPC numbers. This should be rather easy to do.

Much like the standard search in Amazon supports it:
http://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Daps&field-keyw...

Don't know how well this translate to the way you created the module.

Hope it helps.

attheshow’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
Status: Active » Needs review
StatusFileSize
new2.35 KB

I needed a function that would allow me to look up ASINs based on UPCs. That function

amazon_upc_lookup($upc);

...and the corresponding table to store the UPC-to-ASIN translation is included in the attached patch. This allows the results to be stored as the usual ISBN lookups are and improves performance.

This patch is against the latest dev as of today.

tommair’s picture

Issue summary: View changes

Although this is an old thread this answer can help people who run into this thread by searching google.
If you are looking for a a way to convert your UPC to ASIN programmatically you can use amazon's tool:
http://webservices.amazon.com/scratchpad/index.html
This tool will generate the code for you.
If you are just looking for a convenient way to convert UPC to ASIN online you can use
http://www.asinlab.com/upc-to-asin/
Search google for 'UPC to ASIN converter" and you can find many others...

tommair’s picture