plainblack.com
Username Password
search
Bookmark and Share

Amazon Wobject

I am pleased to announce my Amazon browsing wobject using the Amazon Version 4.0 API.

The wobject enables you to place amazon content on your site and browse through the content firstly in a list like the picture shown, with prices.

You can see a demo on my sites Amazon Demo page.

Users can then click to view more details, where a page giving Amazon user/editorial reviews is displayed along with a buy link.

This wobject should work well with Amazon.Com feeds where I have tested the most.

I have also got it to work with Amazon.UK and Amazon.DE, although there are some illegal characters sent by the web feed from amazon that caused the the XML parser to fail.  I have got round those that I have found  in the _removeUnprintable function but there is a chance (particuarly with the German version) that there are more of these that I have yet to find.  I have raised this with Amazon and it is a bug in their feed which they hope to resolve soon.  If you find some others please let me know and I'll add them in.

Also included in this package (in the docs folder) is the SOAP feed that I was first working with (though it is not quite complete).  It is for the same reasons as above that I stopped using this and switched to the XML version as it is easier to strip the problem characters out.  Feel free to make use of if you so wish.

To add in your Affiliate Id enter it in the AffiliateId box in the wobject properties, this will then use your affiliateId when sending to Amazon.  If you don't change it then it will take mine as the default! $$$!

The store that you use is determined by the drop down box.

The default browsenode is the Amazon browse category that
users will see on first look at the object.  Change this to what is relevant to your site.  You can find the category numbers out by looking at the Amazon site.

These categories also work in the category box.  Here the entry of the details should be as follows in order for them to work.

Use a comma to seperate the number of the category from the
title text, and use a new line for each category you wish to
add.

CATEGORY TITLE,Category number
CATEGORY TITLE,Category number


Please report any bugs, suggestions on either here on the contribution board at PlainBlack.com or on my message board  at www.ca-dev.co.uk or email using the contact form on my site

Lastly it is part of my Agreement with Amazon for use of their web feeds that this code should not call their web servers more than once per IP address per second.  This should not be an issue for most, especially as the feeds are cached for 24hrs, but if you think this could be a problem then please do not use without first contacting me.

Also if you do use this then I'd like to see how you are using.

Thanks for reading.

Chris 

PS.If there is any other particular information you'd like to see grabbed from Amazon let me know below and I'll see what I can do!

It should work with Amazon.com, Amazon.co.uk and Amazon Europe.

System RequirementsPlease be advised: this contribution was tested with something older than WebGUI 7.5. When this contribution was uploaded there was no field for the author to fill out regarding it's requirements.
Comments
4mwilson02: "I'm excited to see what you end up with; this will definitely be useful on our site."
2nw: "
Hi,

are you also considering adding a text field for your own review of the book (a local review so to speak, not fetched from Amazon)? 
"
2fishingfan: "
Not in the first release which should hopefully be some time this week, but that is a good idea which I will look to add in.

Chris

CA-Dev.co.uk 
"
4azote: "It looked really cool so i wanted to try it! since im a linux freak I wanted to add linux stuff ... and it didnt work quiet right.... (nothing shows when using those categories)

example categories numbers:

Linux games --> 290573

or even linux stuff it self --> 290562

maybe im doing something wrong..

Carlos Rivero
www.carlosrivero.com"
2fishingfan: "
Hi Carlos

No, you were doing it correct, it's just for some reason I'd assumed everybody in the whole world would be looking to put Books as their only type of category.

I've made a slight change to the code, which is there now and running on my demo with your software cats to prove it works.  No database change is required.

You now need to specify your default categories slightly differently. As below;

Use a comma to seperate the number of the category from the
title text, and a colon to seperate the category number from
the type of item you are looking for eg Books, Software and
use a new line for each category you wish to add.

Eg:

CATEGORY TITLE,Category number:CategoryType
CATEGORY TITLE,Category number:Software

Take care that you type the CategoryType correctly, Amazon is strict on this in the feed with regard to capitalisation.

ie Books, Software need to be used

See the info on categories Amazon Web Services Online Docs for more details as to what is correct.

For example to add on your Linux software categories & some comedy dvds to the default you would type in the following and

Computers & Internet,5:Books
Professional & Technical,173507:Books
Science,75:Books
Linux games,290573:Software
Linux,290562:Software
Comedy Dvd's,163357:DVD


Chris

CA-Dev.co.uk 
"
4azote: "great work! ;)
another thing...

the Default Browse Node Category does not work that way... I had to chage the category that was hardcoded (books in this case)


Also if there any way to show the price without having to click details?

I tryed  this:

"Price"=>$xp->findvalue("/ItemLookupResponse/Items/Item[$i]/ItemAttributes/ListPrice/FormattedPrice"),

in   _formatViewItem but nothing... it would be nice to be able to show it...

Carlos Rivero
www.carlosrivero.com"
4fishingfan: "
Good Spot!

I've updated it again, this time there is an update to the database.  This adds in a default category field to go with the default browse node in the wobject properties.

Also changes the template for the view to add in a price.

You almost had it correct for adding the price it is in fact.

"Price"=>$xp->findvalue("/ItemSearchResponse/Items/Item[$i]/ItemAttributes/ListPrice/FormattedPrice")

What can be displayed is determined by the info you ask for from Amazon, in case of the view see "_make_request ( )" and look at the $responsegroup variable to see the info types being returned.  This ties in with the documentation on Amazon, and by using there info you can vary what is data you fetch from them and thereby change the info displayed in the _formatViewItem...

Chris

CA-Dev.co.uk 
"
DownloadAmazon104.zip Amazon104.zip
LinksNo Support Offered
Screenshotsamazon.gif
Statistics Downloads: 367
Views: 8505
Rating: 3
Updated: 8/12/2005
Keywords Assets
NavigationBack to the Bazaar
© 2018 Plain Black Corporation | All Rights Reserved