Username Password
Bookmark and Share

AWS E-commerce System Macro




The AWS_ItemLookup macro uses Amazon E-Commerce Service to lookup book, music or other item details from the Amazon website using an ASIN (Amazon Standard Item Number). For books, the ASIN is the same as the ISBN.






To use this macro, you will need to install XML::Parser and XML::XPath. XML::Parser is a compiled module. To install it under Linux, follow the steps below:

  • become root user
  • source setenvironment (. /data/wre/sbin/setenvironment)
  • run cpan (perl -MCPAN -e shell)
  • install XML::Parser
  • if you run into errors, be sure that you have installed the libexpat1 libraries (for Ubuntu you need to install the build-essential and libexpat1-dev packages to build)
  • install XML::XPath

Now you're ready to install the macro. See the POD in the file for details about installing macros into WebGUI.

Before you can access the Amazon Web Services, you'll need a developer's key. You can obtain one here for free. There are some services which require a fee to use. The ECS service which this macro uses is free. 


Currently the output format is fixed. A future task will be to allow the output to be templatable. Patches are welcome.


Copyright 2007 by William McKee. All rights reserved.


This program is free software; you can redistribute
it and/or modify it under the same terms as Perl itself.

System Requirements

Built for WebGUI 7.3

3fishingfan: "
Normally the users of an AWS application should only need an affiliate Id, not a developer Id. 

4knowmad: "

Thanks for the feedback. I was simply following the examples provided by the AWS documentation. It's on my TODO list to get an affiliate id and try this macro with it. My guess is that it would work without a change. Have you tried it?

4fishingfan: "
Hi William

No but I am planning to , once I finish my upgrading of sites to 7.x, shortly. 

Saw it as was looking on this site.  As I recall you need to use the developerId to get the request, but this is the same for all users of your code against AWS (so anybody using the macro should use your developerId, but use there own affiliateId to identify their website for sale commissions).

By the way have you had any issues with "funny" characters being sent in the AWS feed using the perl XML parsers ? I see this sometimes with the Asset I wrote.   

4knowmad: "

Are you suggesting that I should be publishing my developerId with this macro? No way. That id can be used for paid services. Based on my rereading of the docs and forum posts, I think that the affiliate id would be used when you generate the links, not for accessing AWS ECS. Currently this macro is just grabbing info off the server, not creating links. There are lots of possibilities.

I haven't used XML::Parser much but have not seen this problem. I may rewrite the macro to use regex parsing instead of requiring XML::Parser to be loaded. Perhaps WebGUI already has some type of XML parser installed with the WRE.

2fishingfan: "
Hi William

After reading the docs on the site, I realise I am out of date.

From Amazon... 

"Developer Token: If you signed up to use
Amazon Web Services prior to August 2004, you have a Developer Token.
As Developer Tokens are no longer supported and will not work with
newer services"

I shall have to look into changing my older apps.

You're also quite right about the affiliate id on the link generation, which is what I had meant by it.


LinksKnowmad Technologies
No Support Offered
Statistics Downloads: 1132
Views: 6706
Rating: 3
Updated: 9/5/2008
Keywords macros
NavigationMore from Knowmad Technologies
Back to the Bazaar
© 2023 Plain Black Corporation | All Rights Reserved