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. Please read on...


electronics tutorials for ham radio




Please visit VK2TIP's Book Shelf. My personal recommendations, thanks.

LAST MODIFIED:
Sunday, 23-Jun-2013 12:55:38 PDT

AMAZON WEB SERVICES - UK

WHAT IS NEEDED TO IMPLEMENT "XML WEB SERVICES WITH XSLT" FOR THE U.K.?

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, http://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 &amp;locale=uk

Here's one example of the changes made throughout:

http://xml-na.amznxslt.com/onca/xml3?&amp;dev-t=D2U5FEMVH12ISD&amp;t=electronicstutor10-21&amp;SimilaritySearch={Asin}&amp;mode=books-uk&amp;type=heavy&amp;page=1&amp;sort=+salesrank&amp;f=http://www.electronics-tutorials.com/amazon-big/asin-search-uk.xsl&amp;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.

Buy from Amazon

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:

http://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:

http://xml-eu.amazon.com/onca/xml3?locale=uk&dev-t=D2U5FEMVH12ISD&t=electronicstutor10-21&AsinSearch=0872591964&type=heavy&f=http://www.electronics-tutorials.com/amazon-big/asin-data-to-html[UK].xsl

That's it, let me know how you go.

 

LINK TO THIS PAGE

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:

<a href="http://www.electronics-tutorials.com/web-services/amazon-web-services-uk.htm" target="_top">Visit Ian Purdie's "Amazon Web Services - UK" Page</a>

and it should appear like this:
Visit Ian Purdie's "Amazon Web Services - UK" Page

 

 

Copyright Ian C. Purdie © 2000 - 2001 - 2002, all rights reserved. URL - http://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.
Commercial use prohibited without the prior written permission of www.electronics-tutorials.com

Created 12th March, 2003

Updated 14th March, 2003

Contact VK2TIP