The Content - Amazon Product Advertising API plugin uses content tags to fetch Amazon products and create the embeds on your site. In this document, we'll explore the options offered by the plugin tag.
Assumptions
For this document, we're going to assume that you have already created an Amazon Associates account, and that you have been admitted into the Product Advertising API program and have obtained your API keys.
The second assumption is that you have configured the plugin, picked your button style, and chosen your default template (having chosen "default").
The Basic Tag
{amazon asin=XXX}
Available Parameters
- asin:
- This parameter is required.
- Can accept either ASIN or ISBN - you'll need to find it in the page.
- You can create this Bookmarklet to get the ASIN or ISBN automatically.
- javascript:(function(){window.alert(JSON.parse(document.getElementById('rufus-view-context').value).asin)})()
- Create a bookmark in your browser, and paste the above script as the URL. Click it on an Amazon product page, and you will be presented with the ASIN or ISBN.
- template:
- Choose from the 3 built-in templates:
- default
- horizontal
- overlay
- Choose from the 3 built-in templates:
ASIN or ISBN
Let's say you're a Sun Tzu fan, and you're reviewing your favorite of his books. https://amzn.to/3DHPWJ6
Using the bookmarklet, or your superior detective skills, you determine the the Amazon page for this book uses this ISBN: 9388369696
For this basic usage example, we're going to let the system utilize the default template.
Your content tag should look like this:
{amazon asin=9388369696}
The default template result should look like this:
Different templates:
Content Tag with template=horizontal
New product: 9354407269 - Meditations by Marcus Aurelius
{amazon asin=9354407269 template=horizontal}
template=horizontal Output
Content Tag with template=overlay
New product: 9388144295 - The Iliad & the Odyssey by Homer
{amazon asin=9388144295 template=horizontal}
template=overlay Output
Scaling To Fit!
These outputs are designed with Bootstrap 5 classes. They scale to fit their container. Here are 3 col-lg-4 divs: