MTAmazon32 Template Tag Reference

The following is the template tag documentation for MTAmazon32. MTAmazon32 was developed specifically for Movable Type 3.2 (hence the "32" of "MTAmazon32"). However, development of MTAmazon32 no longer continues. MTAmazon's API and template tags have been significantly enhanced and rolled out in the newest version of MTAmazon. Users are encouraged to upgrade to the latest version of Movable Type, Media Manager and MTAmazon.

Introduction

Once you've installed MTAmazon32, you'll have a set of new Movable Type tags. Use these in your template to display products from Amazon.com.

Template Tags

Any of the following tags can be used in MTAmazon32.

<MTAmazon>

<MTAmazon> is the container tag that executes a search and returns the results. All other product-related tags must be placed within this container. MTAmazon accepts the following attributes:

  • related (Optional)
    Related can only be used if the MTAmazon32 tags are used on an individual archive or inside the <MTEntries> container. You can use any one of the following values for this attribute: category, title, extended, or excerpt. If this attribute is present, then the contents of the entry's title, extended text, category, or excerpt will be is used as the search string.
  • search (Required unless related is used)
    The search keywords, ASIN, artist, or other search string to use. You can separate multiple search words with spaces. You can use the contents of any other MT tag as the search string by enclosing the other tag name in square brackets. For instance, to use an entry's title as the search string, you would use search="[MTEntryTitle]".
  • method (optional)
    The search method to use. Defaults to Keyword. Valid values are:
    • Keyword
    • BrowseNode
    • Asin
    • Upc
    • Author
    • Artist
    • Actor
    • Director
    • Manufacturer
    • Seller
    • Exchange
    • ListMania
    • Wishlist
    • Similar
    • Power
    You can find out more about search methods at http://www.amazon.com/webservices/. You can also use the values "browse" and "search" for compatibility with older versions of MTAmazon32. "browse" means the same thing as BrowseNode and "search" means the same thing as Keyword.
  • line (optional)
    The Amazon product line to search. Defaults to books. Valid product lines are:
    • baby (Baby)
    • books (Books)
    • classical (Classical Music)
    • dvd (DVD)
    • electronics (Electronics)
    • garden (Outdoor Living)
    • kitchen (Kitchen & Housewares)
    • magazines (Magazines)
    • music (Popular Music)
    • pc-hardware (Computers)
    • photo (Camera & Photo)
    • software (Software)
    • toys (Toys & Games)
    • universal (Tools & Hardware)
    • vhs (Video)
    • videogames (Computer & Video Games)
  • lastn (optional)
    The maximum products to retrieve. Defaults to 10. Any number is a valid value; however, setting this number too high will greatly increase the time it takes to rebuild your template. It is recommended that this not be set higher than 30.
  • associateid (optional)
    The Amazon Associate ID to use. Using an Associate ID will allow Amazon.com to give you credit for any sales that you send their way. If you don't specify an Associate ID, majordojo's Associate ID will be used. You only need to use the associateid attribute if you didn't set one in MTAmazon32's plugin or system settings, or if you want to use a different id than what is set in the configuration.
  • devtoken (optional) deprecated
    The Amazon.com developer's token. Amazon requires this token in order to track who is using their Web services. You can apply for one for free at http://www.amazon.com/webservices/. You'll need to provide them with your name and address and accept a license agreement.

<MTAmazonTitle>

The title or name of the product.

<MTAmazonASIN>

Amazon's product code for the product. This can be useful when setting up hoping cart links.

<MTAmazonCatalog>

The Amazon product category for the product.

<MTAmazonManufacturer>

The name of the product manufacturer or publisher.

<MTAmazonArtist>

The name of the author of the book, the music artist, the DVD manufacturer, etc.

Attributes:
  • glue (Optional)
    Some music has more than one artist. You can use the glue attribute to specify what separator to use in the list of artists. Defaults to ", "

<MTAmazonAuthor> (deprecated)

The name of a book's author. If the product is not from the books line, this tag will contain nothing.

Attributes:
  • glue (Optional)
    Some books have more than one author. You can use the glue attribute to specify what separator to use in the list of authors. Defaults to ", "

<MTAmazonManufacturer> (deprecated)

The name of the manufacturer. If the product is from the books line, or the music line then this tag will contain nothing.

Attributes:
  • glue (Optional)
    Some books have more than one author. You can use the glue attribute to specify what separator to use in the list of authors. Defaults to ", "

<MTAmazonImage>

  • size (Optional)
    Determines the size of image displayed. You can choose between one of 3 values: "thumb," "small," "medium" (default) and "large."
  • width (Optional)
    Determines the width of the image in pixels for the image to be displayed.
  • rotation (Optional)
    Determines the number of degrees to rotate the image. Both positive and negative numbers permitted.
  • blur (Optional)
    Determines how blurry the image should be on a scale between 0 (clear) to 100 (blurry beyond all get out).
  • shadow (Optional)
    Turns on a drop shadow for the image. Acceptable values are "left" and "right."
  • percent (Optional)
    Turns on a "X% Discount" icon on the image.
  • percentlocation (Optional)
    States the preference for where to places the percent off icon . Acceptable values "left" and right."

<MTAmazonSmallImage>

The small thumbnail image for the product.

<MTAmazonMediumImage>

The medium size image for the product.

<MTAmazonLargeImage>

The large image for the product.

<MTAmazonSalePrice>

Amazon's price. If this is blank, it means that Amazon's price is so low that it can't be advertised. A shopper must actually add the product to their Amazon.com shopping cart before seeing it's price.

<MTAmazonListPrice>

The manufacturer's suggested, or list, price.

<MTAmazonUsedPrice>

The used price from Amazon Auctions and zShops.

<MTAmazonReleaseDate>

The date that the item was released. You can use MT's date tag formatting to format this the way you would like. None of the dates include times, so if you use any time values in your formatting, the time is treated as 12:00 am. Some Amazon products do not have a day of the month included with the release date, so even if your date format specifies a day, it won't be shown for those products.

<MTAmazonLink>

The URL of the product. This includes your affiliate code if you specified one in your search.

<MTAmazonCacheDateTime>

The date and time when the cache was last updated. If the cache is new, the current date and time are returned. You can use MT's date tag formatting to format this the way you would like.

<MTAmazonField>

A special tag that returns the value of any field in the Amazon XML document. The primary use for this tag is to get tag values from the Amazon Web services heavy format. This can also be used to support any additional fields that Amazon may add to their XML document without having to wait for another release of MTAmazon32.

Attributes:
  • name (Optional)
    The name of the Amazon XML field you would like to display. For fields that are not directly under the Details or ListingProductDetails element, you can specify the path to the field by separating different elements with "/". For example, to retreive the average customer rating for a product, you can use <MTAmazonField name="Reviews/AvgCustomerRating">

<MTAmazonAssociateID>

The Amazon Associate id that was used in the search. This is primarily useful in constructing links to add items to an Amazon shopping cart or wish list.

<MTAmazonDevToken>

The Amazon developer's token that was used in the search. This is primarily useful in constructing links to add items to an Amazon shopping cart or wish list.

<MTAmazonRating>

The average customer rating of the selected item. A number is returned by this tag.

<MTAmazonRatingImage>

The average customer rating of the selected item. An HTML <img> is returned by this tag.

<MTAmazonProductDescription>

The product description of the selected item.

<MTAmazonUPC>

The UPC value of the selected item.

<MTAmazonMedia>

The Media type of the selected item.

<MTAmazonISBN>

The ISBN value of the selected item. This is only valid for books.

<MTAmazonCustomerReviews>

The customer reviews of the selected item.

Examples

Search popular music for "Bowie" and display three items, including the small image, title, release date and price.

<MTAmazon method="Keyword" search="bowie" line="music" lastn="3">
  <p>
    <a href="<MTAmazonLink>">
    <img src="<MTAmazonSmallImage>" align="left" border="0">
      <MTAmazonTitle>
    </a><br />
    <MTAmazonReleaseDate format="%B %e, %Y"><br />
    Price: <MTAmazonSalePrice>
  </p>
  <br clear=all />
</MTAmazon>
Last updated: <MTAmazonCacheDateTime>

Get a Wishlist and display titles and links for each item.

<h1>My Wishlist</h1>
<MTAmazon method="Wishlist" search="9TPZE7QC6FP">
   <p>
     <a href="<MTAmazonLink>">
       <MTAmazonTitle>
     </a>
   </p>
</MTAmazon>

How to search

There are many different Amazon product searches available to you. You can search using the methods Keyword, BrowseNode, Upc, Asin, Author, Director, Actor, Artist, Manufacturer, ListMania, or Similar. For each of these searches, you place your search terms in the MTAmazon search attribute.

Keyword

Keyword searches let you specify a list of search terms just as you would type them into the search box on Amazon.com. Multiple search words can be separated by spaces.

BrowseNode

BrowseNode allows you to return just about any list of products you see anywhere on Amazon.com. You can display best sellers, featured products, or all the products from one of their product categories.

To use BrowseNode, you'll need Amazon's Browse ID for the category you which to display. To get the Browse ID, start browsing for products on Amazon. Once you've gotten to the category or product list you want to display, look in the address bar of your browser. You'll see something like http://www.amazon.com/exec/obidos/tg/browse/-/408126/ref=br_dh_1_dah/002-8226029-7182418. The browse ID for this category (DVD Awards) is highlighted in bold. The portion you'll need is the number after browse/-/.

Use the browse node like this: <MTAmazon32 method="BrowseNode" search="408126" line="dvd">...</MTAmazon32>

Wishlist

You can display your wishlist (or somebody else's) in the same way you display any other list of products. All you need is the Wishlist ID. The easiest way to get the Wishlist ID is to search for the wishlist by email address. Once you are viewing the wishlist, look in the address bar of your browser and you'll see something that starts like http://www.amazon.com/exec/obidos/wishlist/9TPZE7QC6FP/. The wishlist ID is displayed right after the word wishlist in the URL. The ID for this user's wishlist (that's me) is 9TPZE7QC6FP.

Use something like this in your template to display your Wishlist: <MTAmazon32 method="Wishlist" search="9TPZE7QC6FP">...</MTAmazon32>

Upc

UPC searches allow you to return a specific product or a list of products. Currently, Amazon.com only has UPC information for their music and classical categories, so using this type of search in any other category will return no results. If you want to find more than one UPC, you can separate the UPCs with commas.

Asin

An ASIN is Amazon.com's product number. By searching using Asin, you can get a list of specific products from Amazon. You can separate multiple ASINs with commas.

Author

Author searches let you retrieve a list of books by a certain author. Since only books have authors, using an author search on any other product line will return no results.

Director

Director searches allow you to retrieve a list of movies by a particular director. Director searches can only be performed on the dvd, vhs, and video product lines. Using another product line along with a director search will not return any products.

Actor

Actor searches allow you to retrieve a list of movies staring a particular actor or actress. Actor searches can only be performed on the dvd, vhs, and video product lines. Using another product line along with an actor search will not return any products.

Artist

Searching by artist will retrieve a list of products by an artist or musician. Artists only exist for music and classical categories, so using this type of search in any other category will return no results.

Manufacturer

This allows you to search for all products made by a particular company. Manufacturer searches only work for the electronics, kitchen, videogames, software, photo, and pc-hardware categories, so using this search in any other product line will return no results.

ListMania

ListMania lists are created by Amazon.com customers and usually appear on the right-hand side of the search results. These lists are usually lists of related products compiled by an Amazon.com customer, such as "Best Classic Horror Films" or "Favorite Children's Books."

To display a ListMania list on your site, you'll need the ListMania list id. Once you are on the page that contains the list you want to display, look in the address bar of your browser. You'll see something like http://www.amazon.com/exec/obidos/tg/listmania/list-browse/-/2559R61E9FYYD/qid=1027657648/sr=5-2/ref=sr_5_2/104-6326920-4934352. The list ID for this list (Great Indoor Games) is highlighted in bold. The portion you'll need is the number after list-browse/-/, 2559R61E9FYYD.

Similar

A popular Amazon.com feature is the "Customers who bought this also bought..." lists. To display a list of similar products for any particular product, all you need to do is use the Similar search method and the product's ASIN for the search string.

Power Search

The only product category that Amazon supports the Power Search in is Books. To find out what the power search can do, read Amazon's search tips page.

To use a power search in your template, do something like this: <MTAmazon32 method="Power" search="subject: history and (spain or mexico) and not military and language: spanish " line="books">...</MTAmazon32>

No Comments

Leave a comment

what will you say?


Close