I use Adam Kalsey's MTAmazon V2.22 plugin for Movable Type to put Amazon product images at the top of blog entries (usually book reviews). I had to make a couple of changes to one of the source files to make it work with the UK version of Amazon's site.
[Updated 20041129 to link to a copy of the
Once you have installed MTAmazon per its instructions, the source file you will need to edit is
MTAmazon.pm, which you will find in the
You may or may not find that the distribution version of MTAmazon can be used to perform operations against the US version of the Amazon web site. It is worth doing this first to make sure that you have it working properly. If you get rebuild errors about files not existing, try making the following change to
368c368 < my $url = "http://xml.amazon.com/onca/xml2?t=$associateid&" . --- > my $url = "http://xml.amazon.com/onca/xml3?t=$associateid&" .
This is just changing the version of the Amazon Web Services in use, which has changed (at least on some servers) since this version of MTAmazon was created.
When everything is working fine against Amazon.com, to convert to working against the UK site you need to edit
MTAmazon.pm again, this time to switch the site from which the web services are requested:
368c368 < my $url = "http://xml.amazon.com/onca/xml3?t=$associateid&" . --- > my $url = "http://xml-eu.amazon.com/onca/xml3?t=$associateid&" .
Note that this is a change to the same line in
In addition to the above, I make the following change:
371c371 < "mode=$line&type=$format&page=$page&f=xml"; --- > "mode=$line-uk&type=$format&page=$page&f=xml&locale=uk";
This change appends "
-uk" to the
mode parameter as well as adding an explicit
locale setting. This was required when getting UK web services from the US site, but may now be superfluous. I regard it as tiger repellent for the moment. This change alone worked until 1-Oct-2003, when Amazon separated the European web services completely from the US ones.
Note that the forthcoming V3 of MTAmazon is claimed to have UK support built in, and will presumably not require these changes. However, I don't know when that is likely to be released.
You can get a copy of my modified version of