corner Amazon Web Services using HTML and XSLT  corner
space design

Design

 

 

corner

Tutorial -Converting Amazon explorer 109 Stylesheet to use in the UK

corner
HTML Tutorial

    bookmark

Web Design

Amazon Web Services XSL Stylesheet Amazon Explorer v109

You need a Swiss Army knife to tackle AWS XSLT ? One Stylesheet Does It All

This advanced free stylesheet is made available by cod - zilla a description of what it does, link to download it and another link to editing instructions. Amazon Explorer v109

Step by Step Instructions

Download the files

asin-to-html-109.xsl  and editing instructions from the above link

Ensure that you do NOT copy and paste the code that appears in the browser window, but use the Save As option in your browser.

Editor

Use a suitable editor, please note that initially I used Dreamweaver MX and this editor corrupted some of the code.
I am now using MSE.exe a script editor that comes with Microsoft Office.
Notepad can also be used - Under encoding use the UTF-8 option when you save.

Load file asin-to-html-109.xsl into your editor. Make a copy of the file asin-to-html-109.xsl and save it as asin-to-html-109-uk.xsl

asin-to-html-109.xsl

You do not alter this file, keep it handy so that you refer to the original code if required.

asin-to-html-109-uk.xsl

This is the file you will edit to make it

  • Usable by yourself
  • UK compatible

Editing asin-to-html-109-uk.xsl

     

space

 

 

space
Search this site for a word or phrase. Place phrases inside "double quotes"

Buy Domains from 1&1 and Save Money!

Buy web hosting from 1&1- Get More for Less Money

 

Alter to make it usable by you.

These notes are for the version that uses xml3

In order for you to use the stylesheet you need to follow the instructions given in the file you have downloaded.

Extra Parameters Required in Search Queries

offer=ThirdPartyNew
&sort=%2Bsalesrank

Example

http://xml.amazon.co.uk/onca/xml3?t=smallm206andtheo&dev-t=DUCJ169Q7EKVP&AsinSearch=1842124676&type=heavy&offer=ThirdPartyNew &sort=%2Bsalesrank&f=http://www.leeds-uk.com/amazon-services/asin-to-html-109.xsl&locale=uk

Edited Version for UK

Download the UK version asin-to-html-109-uk.xsl

Download

This version has the following alterations as below, already entered. It only requires the alterations in these instructions Amazon Explorer v109

 

Editing for the UK market

1. Use http://xml-eu.amazon.com/onca/xml3?

Edit the line

 <xsl:variable name="AWSversion" select="'http://xml-na.amznxslt.comonca//xml3?'"/>
to
<xsl:variable name="AWSversion" select="'http://xml-eu.amazon.com/onca/xml3?'"/>

2. Change to UK Product lines in the Toolbar template

space
space

 

The following are not usable in the UK - Comment out

<!--<option value="{$stub}599872&amp;mode=magazines">...Magazines</option>
<option value="{$stub}502394&amp;mode=photo">...Camera &amp; Photo</option>
<option value="{$stub}468250&amp;mode=garden">Outdoor</option>
<option value="{$stub}468240&amp;mode=tools">Tools &amp; Hardware</option>
<option value="{$stub}542456&amp;mode=baby">Baby</option>
-->

To help you in the following task refer to the "Common Product Modes and Browse IDs" in the API guide in the AWS kit

In each of the following lines you need to alter 3 things

  • Change the number after {$stub} to a ukbrowser node number.
  • Alter the word after ;mode= (See table below)
  • If required alter the wording just before </option> to match the browser node you select. Most of the US browsernode numbers point to a Top Selling node, this is not available in UK
  • You could add additional lines as required

<option value="{$stub}53&amp;mode=books">Books</option>
<option value="{$stub}404272&amp;mode=video">All Movies</option>
<option value="{$stub}130&amp;mode=dvd">...DVD</option>
<option value="{$stub}404272&amp;mode=vhs">...VHS</option>
<option value="{$stub}172282&amp;mode=electronics">Electronics</option>
<option value="{$stub}565118&amp;mode=pc-hardware">...Computers</option>
<option value="{$stub}491286&amp;mode=software">... ...Software</option>
<option value="{$stub}491290&amp;mode=toys">Toys &amp; Games</option>
<option value="{$stub}471280&amp;mode=videogames">...Video Games</option>
<option value="{$stub}491864&amp;mode=kitchen">Kitchen &amp; Housewares</option>

Add -uk to the following Option values and comment out 5 lines as below

US mode parameter Change to UK mode parameter
<option value="books" selected="">Books</option> <option value="books-uk" selected="">Books</option>
<option value="dvd">... DVD Only</option> <option value="dvd-uk">... DVD Only</option>
<option value="vhs">... VHS Only</option> <option value="vhs-uk">... VHS Only</option>
<option value="electronics">Electronics</option> <option value="electronics-uk">Electronics</option>
<option value="software">... ... Software</option> <option value="software-uk">... ... Software</option>
<option value="toys">Toys &amp; Games</option> <option value="toys-uk">Toys &amp; Games</option>
<option value="videogames">... Video Games</option> <option value="video-games-uk">... Video Games</option>
<option value="kitchen">Kitchen &amp; Housewares</option> <option value="kitchen-uk">Kitchen &amp; Housewares</option>
The following mode parameters not available - Comment out 7 lines
<option value="magazines">... Magazines</option> <option value="video">All Movies</option>
<option value="pc-hardware">... Computers</option> <option value="photo">... Camera &amp; Photo</option>
<option value="garden">Outdoor Living</option> <option value="tools">Tools &amp; Hardware</option>
<option value="baby">Baby</option>  

<xsl:template match="Manufacturer">

There is another batch of similar code near the end of the file that needs similar treatment to the above with reguard to the uk mode names.  When making these alterations ONLY change words that are in lower case e.g. 'books'  DO NOT CHANGE words starting with an upper case e.g. 'Books' that are Category names

Search for Replace with Times
'books' 'books-uk' 2
'music' 'music-uk' 2
Not Available At Amazon.com Not Available At Amazon.co.uk 1
www.amazon.com/exec/ www.amazon.co.uk/exec/ 7
"Buy At Amazon.com" "Buy At Amazon.co.uk" 1
"Buy From Amazon.com" "Buy From Amazon.co.uk" 2

Graphics

Change this link to a suitable one on the uk site

http://g-images.amazon.com/images/G/01/associates/navbar2000/logo-no-border(1).gif

to

http://images-eu.amazon.com/images/G/02/uk-shared/logos/smile-amazon-logo-notag-new-200x45.gif

If you want to use the amazon-webservices3.jpg download from celtic stone site and save on your own Hard drive in whatever folder you nominated in this line
<xsl:variable name="image-url" select="'FULL URL OF YOUR IMAGE FOLDER'"/>

If you find this tutorial useful, please place a link to this site on your site - Thanks.

corner
Previous Top of Page
Design

 

corner
space

 



In Association with Amazon.co.uk
In Association with Amazon.co.uk

In Association with Amazon.co.uk

 

 

Leisure Time - book your holiday or flights with our UK sponsors


Last minute

Save 10%
Book a Thomas Cook holiday Book a Thomson holiday Book a Portland Holidays Direct
Thomas Cook flights Thomson holiday flights Flybe Cheap flights British Airways flights My Travel flights
The London Pass - Adult The London Pass - Adult

Welcome to The London Pass, the brand new leisure pass that lets you experience the very best that London has to offer. With free entry to over 50 attractions, free public transport and the ability to beat the queues, The London pass helps you to make the most of your stay.


More Tutorials by John McGuinn

M206
Home page of a tutorial in programming in Smalltalk, a object-oriented programming language. This is an ideal tutorial for anybody learning Smalltalk and of particular interest to students on courses: M206 at the OU Open University, and course CSC517 at NCSU North Carolina State University

C programming tutorial
Home page of a tutorial in programming in C This is an ideal tutorial for anybody learning C programming language, and of particular interest to students on courses: T223 at the OU Open University.

tutorials4u.com
Home page of tutorials4u.com

Leeds my home town

Relax in the sun.

Benidorm   Tenerife   San Marino apartments to rent

 

Top

AireWeb Web Design
Leeds Web design

Copyright © John McGuinn 2001-03

.