LAST MODIFIED:
NOTE: It is most probable you are looking at this page from a link on my main page on this topic, "XML Web Services With XSLT"... If you haven't already read that page do so now.
My comments throughout these pages again relate entirely to Amazon's Web Services V2.1 and my platform is a PC, Win98 SE, IE6 and using as tools, Microsoft's XML/XSL Viewer Tools [217 kB] and the Microsoft XML Parser SDK [1.49 mB] - see the main page mentioned in the paragraph above.
Converting over to amazon web services - uk turned out to be far easier than I had originally expected <happy days>.
Firstly I took my main xsl sheet "asin-data-to-html.xsl" and saved it re-named as "asin-data-to-html[UK].xsl". That was real creative.
Here it is, https://www.electronics-tutorials.com/amazon-big/asin-data-to-html[UK].xsl
Next I went through and listed all the links presently going to Amazon.com and found the corresponding links to U.K., these were:
Because I already had my developers code I only had to change every instance of my affiliate ID in links over to my Amazon UK affiliate ID. DO NOT USE YOUR AMAZON USA ID!
At the end of any xsl links on the page you will need to add &locale=uk
Here's one example of the changes made throughout:
http://xml-na.amznxslt.com/onca/xml3?&dev-t=D2U5FEMVH12ISD&t=electronicstutor10-21&SimilaritySearch={Asin}&mode=books-uk&type=heavy&page=1&sort=+salesrank&f=https://www.electronics-tutorials.com/amazon-big/asin-search-uk.xsl&locale=uk
Note that "mode=books" is now mode=books-uk - thanks to Neil for the heads up.
Next, in the section <xsl:template name="OurPrice">you need to go through and replace three instances of the dollar sign for the UK Pound sign. Unfortunately as I soon discovered, there's a "gotcha" here. If you simply insert a � in lieu of $ your style sheet will not work, the xsl processor will complain very loudly. Picky, picky.
You need to insert "two" symbols - £ - dunno why, but I picked that off an xml feed and it sure cured the problem.
Next with the <xsl:template name="BuyButton"> your need to change:
http://www.amazon.com/o/dt/assoc/handle-buy-box=',$Asin)
TO
http://www.amazon.co.uk/o/dt/assoc/handle-buy-box=',$Asin)
I also altered the link for the "buy from Amazon" button to reflect this new one I had made.
Toward the end of the stylesheet I changed the U.K. link over to a USA link. Also I did all of the above [where applicable] with my search stylesheet which gets referenced a few times in the main sheet. Here it is:
https://www.electronics-tutorials.com/amazon-big/asin-search-uk.xsl
That's another file you need to re-name and save. Go through your copy and make the necessary changes.
That's pretty well all that needs doing. Here's a real live example:
That's it, let me know how you go.
How to link directly to this page
Want to create a page link to me from your site? It couldn't be easier. All you need to do is copy and paste, the following code. All links are greatly appreciated; I sincerely thank you for your support.
Copy and paste the following code for a text link:
and it should appear like this:
Copyright Ian C. Purdie © 2000 - 2001 - 2002, all rights reserved. URL - https://www.electronics-tutorials.com/web-services/amazon-web-services-uk.htm
All material at this site may be used by private individuals for their own non-commercial purposes. Single copies of my pages or files may be distributed to other private individuals at no charge, unless other requirements are noted on the relevant page. However, all material remains the intellectual property of Ian C. Purdie, individual contributors, or other sources who gave permission for use of their material at this site. All copyrights and trade marks are reserved by myself or the respective owners. Material may not be republished without prior written permission, nor may it be mirrored on another server without my prior written permission. Other than as provided in these pages or permissions given, translation into another language other than english and hosting pages in another country is stricly prohibited.
Created 12th March, 2003
Updated 14th March, 2003
<a
href="https://www.electronics-tutorials.com/web-services/amazon-web-services-uk.htm" target="_top">Visit Ian Purdie's "Amazon Web Services - UK" Page</a>
Visit Ian Purdie's "Amazon Web Services - UK" Page
Commercial use prohibited without the prior written permission of www.electronics-tutorials.com