Amazon Products Feed Variables
Contents
- Options you can override or specify in the URL
- Possible values for SearchIndex
- Possible values for Sort
- Variables for use in the Templates
- Options you can specify in the Templates
Options you can override or specify in the URL
- Operation - what it is you want the script to do
- myOperation - a secondard specification of what you want the script to do
- SearchIndex - product catagories
- Keywords - the search subject
- templates - which set of templates to use
- link_templates - which set of templates to use for all subsequent pages
- language - which language file to use
- BrowseNode - the number of the sub category within a SearchIndex to browse
- ItemPage - which page of results - Amazon sends 10 results for page 1, 10 for page 2, etc.
- ItemId - specific product(s) to display by ASIN (for books ASIN = ISBN)
- Sort - sort method
- locale - allows you to change between us for Amazon.com and uk for Amazon.co.uk
- cart_action - manipulate the shopping cart
- pricerange - limit search to a single price or a range of prices (in US pennies, i.e. pricerange=1000-2000)
- ListType - for use with Operation=ListLookup and is either WishList or Listmania
- ListId - for use Operation=ListLookup and is parameter to identify the list you would like to retrieve
Possible values for SearchIndex
The script can support all SearchIndexes that are supported by Amazon Web Services.
The script supports all Sort values that are supported by Amazon Web Services
Variables for use in the Templates
All of the XML elements returned from Amazon are converted into variables for use in the script. There are many elements to list here; the best way to view them is to view Amazon's WSDL document. You can use any of those elements as variable by placing %% before and after the element name. The variables listed below are additional variables generated by the script from those results.
You can also use an apf command to display all available variables both those generated by the script and those that are taken directly from Amazon's XML. To display all variables put the following line in a page.template:
This template is used for the overall page HTML (<head>, <meta>, <body>, etc.).
- %%store%% - a more descriptive form of mode.
- %%subject%% - what was searched for or the browse category.
- %%header%% - either "store : subject" or the linked browse path (i.e. Bestsellers > store > subject) when applicable.
- %%in_association%% - the standard Amazon.com disclaimer.
- %%search_box%% - the search box.
- %%sort_box%% - the sort box.
- %%see_next%% - a link to the next page of results when applicable.
- %%see_prev%% - a link to the previous page of results when applicable.
- %%see_back%% - a javascript link to the previous page, works just like a browser's back button.
- %%see_index%% - for a "Google" style index of results pages.
- %%see_total%% - displays "page x of x" when there are multiple pages of results.
- %%shopping_cart_link%% - link to the shopping cart when applicable.
- %%products_html%% - the results wrapped in the HTML from the other templates (you MUST have this on the page template).
- %%international_links%% - provides links to other locales.
This template is used for the HTML to display each item for multiple results.
- %%item_url%% - URL to display the item page.
- %%my_artists%% - either the manufacturer or a comma separated list of authors, actors, or artists.
- %%my_prices%% - formated version of the list price, Amazon's price, and discount when available.
- %%see_back%% - a javascript link to the previous page, works just like a browser's back button.
- %%result_number%% - the number of the result.
This template is used for the HTML to display a single item result.
- All of the variables from the product template.
- %%old_product_url%% - a link to the item on Amazon.com's site using the old method of linking.
- %%shopping_cart_button%% - button to add the item to the script's shopping cart
(only works with items that are available for immediate purchase). - %%buy_button%% - button to add the item directly to Amazon's shopping cart.
- %%oneclick_button%% - button to pop-up window asking if you would like to use one-click to buy the item.
- %%my_large_image_url%% - URL to display the larger image page.
- %%my_used%% - formated version of the used price when available.
- %%my_collectible%% - formated version of the collectible price when available.
- %%my_thirdpartynew%% - formated version of the marketplace new price when available.
- %%my_refurbished%% - formated version of the refurbished price when available.
- %%my_prices%% - formatted version of ListPrice, OurPrice, and discount.
- %%my_artists%% - link to Artist, Actor, Director, or Manufacturer search when applicable.
- %%my_features%% - formated list of features.
- %%my_similar_products%% - formated list of similar items
(aka Customers who bought this also bought ...). - %%my_similar_products_images%% - just like %%my_similar_products%% but using images instead of text.
- %%my_accessories%% - formated list of accessories.
- %%my_accessories_images%% - just like %%my_accessories%% but using images instead of text.
- %%my_tracks%% - formated list of music tracks.
- %%similar_browsenodes%% - formated list related BrowseNodes.
- %%my_comments%% - formated full version of customer comments.
- %%my_shortened_comments%% - formatted shortened version of comments.
- %%my_descriptors%% - comma separated list of item descriptors
(kind of a catch all for a bunch of small item details). - %%my_availability%% - formatted version of Availability.
- %%customer_reviews_header%%
- %%average_rating_header%% - average rating for this item.
- %%more_reviews_link%% - link to more reviews if available.
This template is used for the HTML to display the large product image.
- %%store%% - a more descriptive form of mode.
- %%subject%% - what was searched for or the browse category.
- %%see_back%% - a javascript link to the previous page works just like a browser's back button.
This template is used for the HTML to display SellerSearch results.
- %%ExchangeTitle%% - product title.
- %%ExchangeQuantity%% - quantity.
- %%Condition%% - type of product; new, used, collectible, refurbished.
- %%SubCondition%% - condition of product.
- %%ExchangeConditionType%% - condition of product.
- %%ExchangeAvailability%% - availability.
- %%ExchangeEndDate%% - nonsense usually, probably would apply to auctions.
- %%OfferingPrice%% - price.
- %%ExchangeItemUrl%% - URL to display the item page.
- %%shopping_cart_button%% - button to add the item to the shopping cart.
This template is used for the HTML to display a seller's profile.
- %%SellerNickname%% - seller nickname.
- %%SellerRating%% - they're rather self-descriptive aren't they.
- %%TotalFeedback%% - you don't actually need me saying something here.
- %%FeedbackRating%% - well, maybe something about the llamas.
- %%FeedbackDate%% - the llama comment above was a vague reference to Monty Python.
- %%FeedbackComments%% - those people responsible for the comments have been sacked.
This template is used for the HTML to display a third-party products.
- %%SellerNickname%% - seller nickname.
- %%SellerRating%% - here we go again, with the self descriptive variable names again.
- %%SubCondition%% - note to self, never write docs in the middle of the night.
- %%ConditionNote%% - lack of sleep causes visions of llamas.
- %%ExchangeAvailability%% - and the moose, can't forget the moose.
- %%SellerState%% - those responsible for sacking the people writing the comments have been sacked.
- %%SellerCountry%% - country of seller.
- %%OfferingPrice%% - the fjords are beautiful this time of year.
- %%sellersearch_url%% - URL to display the SellerSearch page.
- %%shopping_cart_button%% - button to add the item directly to Amazon's shopping cart.
browse_menu.template and nav_menu.template
This template is used for the HTML to display the menus.
- %%browse_menu_url%% - browse menu url.
- %%browse_menu_name%% - browse menu name.
This template is used for the HTML to display blended (All Products) results.
- %%blended_mode%% - the mode that the next results are for.
- %%blended_see_more_url%% - link to a more results for that mode.
- %%blended_mode_totalresults%% - total number of results for that mode.
This template is used for the HTML to display the shopping cart, which is really complicated and you're asking for trouble if you change anything more than just the colors.
- %%script_name%% - the URL of the script.
- %%form_options%% - stuff from the URL, all the inputs you might be using.
- %%my_cart_item_price%% - product price * quantity.
- %%cart_qty_total%% - total quantity of all products.
- %%cart_price_total%% - oh, take a guess.
- %%continue_shopping%% - back button.
- %%checkout%% - button to transfer the shopping cart from AWS to a real Amazon shopping cart.
This template is used for the HTML to display full customer reviews exactly like item.template.
Options you can specify in the Templates
- apf_include - include a text file or nav_menu
(like SSI but only works with text files). - apf_start - product to start using HTML at
(if not specified apf_start=1). - apf_end - last product use HTML at
(you can use the word last to specify the last product). - apf_repeat - how often to repeat the HTML
(if 1 use with every product, 2 every other product, 3 every third, etc.). - apf_show_vars - display all available template variables
(ALL displays all, AWS displays Amazon XML values, MY displays script generated variables).