Step by Step Guide
ASA1 (legacy)
This page documents ASA1, the predecessor of ASA2. ASA1 only receives security fixes and Amazon API updates. Looking for the current plugin? See the ASA2 documentation.
Introduction
ASA1 lets you integrate Amazon products into your WordPress pages with the simple shortcode [asa]ASIN[/asa].
With the template feature and a little HTML knowledge you can completely customize how the products fit into your theme.
Setup
After installing ASA1 you find the link to the plugin's options page in your WordPress settings.
Before you can start, enter your Amazon Creators API credentials in the setup panel and enable Enable Creators API. How to get them is explained in the Creators API guide. To earn referral fees, enter your Amazon Tracking ID as well (the Partner Tag is described in the Creators API setup).
When the options page shows Status: Connected, the connection to Amazon works.
Including single products into your posts
Open a post and enclose the Amazon product ID (ASIN) with the ASA shortcode:
[asa]B004AKCMES[/asa]You find the ASIN in the product details section of the Amazon product page. For books it is the ISBN.
After saving the post, the page shows an Amazon content box with basic information like title, thumbnail, price and customer reviews.
To show more than one product, repeat the shortcode with another ASIN.
Customizing the layout of the product box
The layout depends on the template file used for rendering. Templates are text files (.htm or .html) with HTML code and placeholders. ASA1 looks for a template in this order and uses the first match:
- the
asadirectory in your active theme (or child theme) - the plugin's
tpldirectory - the plugin's
tpl/built-indirectory with the shipped templates
- Never change files in
tpl/built-in, they get overwritten by updates. - To override a built-in template, save a file with the same name in one of the locations above it.
- The best place for custom templates is the
asadirectory in your theme, see Keeping Custom Templates Update Safe.
By default default.htm is used. To use another template, name it without the .htm extension in the tpl attribute:
[asa tpl="book"]0805047905[/asa]This uses book.htm, which includes special book values like ISBN and author. All available placeholders are listed on the Placeholders page.
The advantage of collections
If you want the same four products in several posts, repeating the shortcode everywhere is inconvenient. Collections solve that.
- Enable the collection feature in the plugin options. Only then the required database tables are created.
- Create a new collection, for example
My_childrens_books. Only letters, numbers and underscores are kept; all other characters, including hyphens and spaces, are removed from the name. - Add products: enter ASINs in the section "Add to collection", make sure the right collection is selected and save.
- Use the "Browse" button in the "Manage collections" section to check which products a collection contains.
Embed the collection with the collection shortcode:
[asa_collection]My_childrens_books[/asa_collection]Collections work with templates too:
[asa_collection tpl="book"]My_childrens_books[/asa_collection]Two more options are available:
limitdefines how many items are displayed.typeisrandom(random order),latest(only the last added item) orall(default).
They can be combined, for example two random products of the collection:
[asa_collection tpl="book" limit=2 type="random"]My_childrens_books[/asa_collection]Using the widget
To show a collection in your sidebar, open Appearance / Widgets and drag the "AmazonSimpleAdmin" box to the widget area.
- Title: the widget title.
- Collection: the collection to show.
- Number of items: how many items to load.
0loads all. - Sort type: "Last added on top" (default) or "Random".
- Template: the template for each collection item. You can choose from all built-in and custom templates. If both have the same name, the custom template is preferred.
- Custom CSS class for the inner container: optional, for styling the widget.
You can place multiple instances of the widget in your sidebar. If AdBlockers hide the widget, see Preventing AdBlockers From Blocking the Widget.
Supported placeholders
See Placeholders.

