Need someone to lead product management at your software company? I create software for people that create software and I'm looking for my next opportunity. Check out my resume and get in touch.

This is the blog of Adam Kalsey. Unusual depth and complexity. Rich, full body with a hint of nutty earthiness.

Content Management

Amazon plugin

Freshness Warning
This blog post is over 22 years old. It's possible that the information you read below isn't current and the links no longer work.

Note: MTAmazon 2.0 has been released. It allows more flexible product display, better performance, and searching for products related to your blog entries. The documentation for the original version of MTAmazon is provided here primarily for reference. It is recommended that you go to the MTAmazon 2.0 page instead.

MTAmazon is a Movable Type plugin that uses your Amazon Associate membership to retreive products from Amazon. It allows flexible searching and display of products from any of Amazon’s product categories.

Download. You can get MTAmazon by downloading MTAmazon.zip.

Requirements. In order to use MTAmazon, you’ll need to be running Movable Type 2.21 or later and have three Perl modules installed: XML::Simple, LWP::UserAgent, and HTTP::Request. All three are common modules, so there’s a good chance your server has them installed. If they aren’t already on your server, you can download and install them by copying them to Movable Type’s extlib directory.

Installation. Once you’ve downloaded and unzipped MTAmazon.zip, connect to your FTP server and open the directory where you have Movable Type installed.

Create a directory there called plugins if there isn’t one already and copy amazon.pl to the plugins directory.

Using MTAmazon. Once you’ve installed MTAmazon, You’ll have a set of new Movable Type tags.

<MTAmazon></MTAmazon> is a pair of tags that connect to Amazon, runs your search, and builds a list of products. All of the other MTAmazon plugin tags will go inside this pair of tags.

To build your search, you’ll need an Amazon associate ID. You’ll also need to choose whether you want MTAmazon to search for products or display all of the products from an Amazon product category. Lastly, you’ll need to choose which of Amazon’s product lines you want the products to come from.

Searching. If you want to search for products, all you need to do is create a list of search keywords. You can use multiple keywords separated with spaces.

Using Product Categories. To use product categories, you’ll need Amazon’s Browse ID for the category you wich to display. To get the Browse ID, start browsing for products on Amazon. Once you’ve gotten to the category 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/-/.

Product Line. The product line is the section of the store that you want to retreive products from, like books or software. Amazon has a list of valid product lines listed on their Associates site. Their list shows the line as "mode=books," but all you need is the "books" portion.

Once you have all your information, you are ready to build your product links using the following attributes to <MTAmazon>:

  • associateid
    Your Amazon Associate id

  • method (required)
    How do you want to retreive products? You can use either "search" or "browse."

  • search (required)
    The search terms or browse id you would like to use. Multiple search terms can be separated with spaces.

  • line (required)
    The product line that you are searching or browsing. Valid lines can be found on Amazon’s site.

  • lastn
    The number of products you wish to display. Amazon allows a maximum of 15 products, so setting this number to 1 or above will have no effect. If you don’t include the lastn attribute, 15 products will be returned.

Available tags. Inside the <MTAmazon></MTAmazon> container any of the following tags can be used:

<MTAmazonTitle>
The product’s name or title.

<MTAmazonASIN>
The Amazon product ID.

<MTAmazonAuthor>
For books, the author; for movies, the lead actor; for msuic, the artist; for mos everything else, the manufacturer.

<MTAmazonImage>
The URL for the full-size product image.

<MTAmazonSmallImage>
The URL for the thumbnail product image.

<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.

<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.

<MTAmazonAvailability>
The product availabilty.

<MTAmazonLink>
The link to the product. This includes your Associate id, so if someone purchases you’ll get credit for the sale.

Example.

<MTAmazon associateid="kalsey-20" method="search" search="dogs" line="books" lastn="10">
<p><a href="<MTAmazonLink>">
<img src="<MTAmazonSmallImage>" align="left" border="0"><MTAmazonTitle>
</a><br>
<MTAmazonReleaseDate format="%B %e, %Y"><br>
<MTAmazonAuthor><br>
Price: <MTAmazonSalePrice></p><br clear=all>
</MTAmazon>

See it. Visit these sites to see MTAmazon in action:

License. Like our other freeware, this plugin is released under the open-source MIT License. In plain English, that means you can do whatever you want with the software, including modifying it, selling it, or eating it, but we’re not responsible for anything that goes wrong.

Revision History
1.0 - July 14, 2002
Initial public release

Recently Written

Video calls using a networked camera (Sep 25)
A writeup of my network-powered conference call camera setup.
Roadmap Outcomes, not Features (Sep 4)
Drive success by roadmapping the outcomes you'll create instead of the features you'll deliver.
Different roadmaps for different folks (Sep 2)
The key to effective roadmapping? Different views for different needs.
Micromanaging and competence (Jul 2)
Providing feedback or instruction can be seen as micromanagement unless you provide context.
My productivity operating system (Jun 24)
A framework for super-charging productivity on the things that matter.
Great product managers own the outcomes (May 14)
Being a product manager means never having to say, "that's not my job."
Too Big To Fail (Apr 9)
When a company piles resources on a new product idea, it doesn't have room to fail. But failing is an important part of innovation. If you can't let it fail, it can't succeed.
Go small (Apr 4)
The strengths of a large organization are the opposite of what makes innovation work. Starting something new requires that you start with a small team.

Older...

What I'm Reading