1. Home
  2. Knowledge Base
  3. Placing Products
  4. Fields (Single product data)
  1. Home
  2. Knowledge Base
  3. Functions
  4. Fields (Single product data)

Fields (Single product data)

The so called Fields allow you to display single product data e.g. title, description or price via shortcode or inside your PHP templates.

What do I need?

ASIN or ISBN (books), see How-To: Find out article numbers

Shortcode examples

Displaying the product title

[amazon fields="ASIN" value="title"]

Displaying the product thumbnail

[amazon fields="ASIN" value="thumb"]

Displaying the product price

[amazon fields="ASIN" value="price"]

Displaying the “buy now” button

[amazon fields="ASIN" value="button"]
An overview of all available values can be found at the bottom of this article.

The shortcodes above can be extended by adding further "attributes". We prepared an overview of all shortcodes and adjustments for the Amazon Affiliate WordPress plugin.

Using PHP functions inside templates

Display value
echo aawp_get_field_value('ASIN', 'price');

Store value in a variable
$value = aawp_get_field_value('ASIN', 'price');

Passing more attributes
$value = aawp_get_field_value('ASIN', 'price', array( 'button_detail' => '/test/product-name/' ) );

Overview of all available values


Parameter Description
asin ASIN of the product
ean EAN of the product (only if available)
isbn ISBN of the product (only if available)


Parameter Description
title Title of the product
url URL to the product detail page
link Link to the product detail page (HTML)
image URL to the product image
image_count Amount of available product images
thumb Thumbnail (HTML, incl. link) of the product
description Product description (HTML, unordered list)


Parameter Description
rating Rating as a number (e.g. 1.5, 3 or 5.2)
star_rating Star-rating (HTML)
reviews Amount of collected reviews


Parameter Description
price Advertised price (formatted incl. currency)
list_price List price (formatted incl. currency)
amount_saved Current savings (formatted incl. currency)
percentage_saved Current savings in percentage (only the number)


Parameter Description
button Buy button (HTML, incl. link)
button_detail Detail button (HTML, incl. link)
prime Amazon Prime logo (only if prime is available)
premium Amazon Prime logo (only if prime is available)
last_update Date of last product update
Was this article helpful?

Related Articles

WordPress Cookie Notice by Real Cookie Banner