Placeholders

This is a list of all currently supported placeholders you can use in the template files.

 

Placeholder Description
{$ASIN} The ASIN code
{$SmallImageUrl} URL of the small product image
{$SmallImageWidth} The width of the small image
{$SmallImageHeight} The height of the small image
{$MediumImageUrl} URL of the medium product image
{$MediumImageWidth} The width of the medium image
{$MediumImageHeight} The height of the medium image
{$LargeImageUrl} URL of the large product image
{$LargeImageWidth} The width of the large image
{$LargeImageHeight} The height of the large image
{$Label} The product label, like “Walt Disney Pictures“
{$Manufacturer} The product manufacturer, like “Walt Disney Pictures“
{$Publisher} The product publisher, like “Walt Disney Pictures“
{$Studio} The product studio, like “Walt Disney Pictures“
{$Title} Product title
{$AmazonUrl} URL to the Amazon shop page of the product including your tracking ID
{$TotalOffers} The number of total offers
{$LowestOfferPrice} The lowest offer price without currency
{$LowestOfferCurrency} The lowest offer currency without price
{$LowestOfferFormattedPrice} The lowest offer price with currency
{$LowestNewOfferFormattedPrice} The lowest new offer price with currency
{$LowestUsedOfferFormattedPrice} The lowest used offer price with currency
{$AmazonPrice} The Amazon price without currency
{$AmazonPriceFormatted} The Amazon price with currency. This should be used as the major price placeholder.
{$AmazonCurrency} The Amazon currency without price
{$ListPriceFormatted} The list price with currency
{$ListPrice->CurrencyCode} Currency of the list price
{$PercentageSaved} The percentage saved compared to the list price
{$AmountSaved->FormattedPrice} The formatted saved amount with currency
{$AmazonAvailability} The product’s availability
{$AmazonLogoSmallUrl} URL of the small Amazon logo
{$AmazonLogoLargeUrl} URL of the large Amazon logo
{$DetailPageURL} URL to the product detail page
{$Platform} The product platform, like “PlayStation 3“ or “Windows“
{$ISBN} The product ISBN for books
{$EAN} The product EAN, like 0886974469926
{$NumberOfPages} The number of pages, usually empty
{$ReleaseDate} The release date of the product
{$Binding} The product binding, e.g. MP3-Download or Blu-ray
{$Author} The author of a book
{$Creator} The product creator, like for MP3-Downloads “Roy Orbison“ (the artist)
{$Edition} The product edition
{$AverageRating} The average customer rating in number, like 4.2
{$TotalReviews} The number of total reviews
{$RatingStars} The rating stars images
{$RatingStarsSrc} URL to the rating stars image file
{$Director} The director of a movie
{$Actors} The actors of a movie
{$RunningTime} The running time of a movie in minutes
{$Format} The product format, like “CD“ for a Blu-ray:
AC-3, Closed-captioned, Color, Dolby, DTS Surround Sound, Dubbed, Special Edition, Subtitled, Widescreen
{$CustomRating} Could be used to place your own rating in the asa-tag:

{$ProductDescription} The product description
{$AmazonDescription} The product description by Amazon
{$Artist} The product artist, like for music CDs “Adele“
{$Comment} Your own comment. You can write a comment directly in the asa-tag:

{$Class} Can be used to set a custom CSS class. Set the value directly in the asa-tag:

{$Model} The product model, like “PC 151“
{$IFrameURL} Link to the user reviews page
{$Prime} Shows “AmazonPrime” if product is prime
{$PrimePic} Shows prime icon if product is prime
{$EditorialReviews->EditorialReview->Content} Shows the editorial review if available. Not all products have editorial reviews.

This post is also available in: German

72 Responses to Placeholders

  1. Adam August 27, 2011 at 11:52 pm #

    Hi mate,

    Loving your plugin so far. I am having a slight issue, I’m using the percentage saved place holder. On one or two products it doesn’t seem to pull the data and I’m not sure why. I’ve checked the product on amazon and there is the discount percentage on the product so I’m not sure what could be causing it.

    If you have any suggestions that would be great!

    Thanks,
    Adam

    • Timo August 28, 2011 at 8:25 am #

      Hi Adam,
      thanks for your feedback. Could you please give me the ASINs of those products with the percentage issue and your country code?

      • Adam August 28, 2011 at 12:15 pm #

        Sure mate,

        B001CBWAU4, B00132DLVE and I’m using the UK country code. It’s a bit strange as the others ASIN I am using are working perfectly.

        Thanks for getting back to me.

  2. Elma(JP) February 22, 2012 at 1:00 pm #

    Hi! It’s a Very nice plugin!

    I tried to set, which, I have {$RatingStars} and {$AverageRating} and {$TotalReviews} did not work.(JP Locale / Ver. 0.9.10.2)

    Why do I fix this?

    • Timo February 23, 2012 at 9:46 am #

      Hi Elma,
      could you please show me which product ASIN you use. I’d like to test it for myself.

  3. Elma(JP) February 24, 2012 at 1:20 pm #

    Hi Timo,
    ASIN number did not go well is B0006GASAA.
    Thank you.

    • Timo February 26, 2012 at 9:04 pm #

      Hi Elma,
      please replace the file AsaCustomerReviews.php in the plugin root directory with this one: http://svn.wp-plugins.org/amazonsimpleadmin/trunk/AsaCustomerReviews.php

      This should fix the problem.

      • Elma(JP) February 27, 2012 at 4:02 pm #

        Hi Timo,

        Amazing! Thank you for support!
        Rating star is very nice!

        Japanese is garbled and the alt attribute of the {$ RatingStars} in {$ AverageRating}.
        I did not go well even if the UTF-8 to the AsaCustomerReviews.php.

  4. Evie Milo March 14, 2012 at 5:03 pm #

    Is anyone getting an additional closing tag in their source code. I’ve checked and double checked my templates and all paragraphs are opened and closed properly and there are no loose ends, but when I check the source code of my live page I get a load of errors and there is a tag placed near the end of the code – don’t know where it’s coming from.

    • Evie Milo March 14, 2012 at 5:28 pm #

      Through trial and error I’ve got rid of the erroneous tag by removing all blank spaces and line breaks in my code. If the code just runs in one continuous line then it’s fine, if you add a line break or space you get an erroneous tag – very annoying.

      • Timo March 14, 2012 at 7:15 pm #

        Hi Evie,
        thanks for your feedback. Could you please send me your code which produced the errors. I want to check if I could improve the plugin’s behaviour to avoid the problems.

  5. Con April 17, 2012 at 3:23 am #

    Hi Timo,
    Your ASA is very flexible. But, I’m at a lost on where the tpl directory is. Can you guide me as I’m unsure if I have installed the plugin completely?
    thank you.

    • Timo April 17, 2012 at 6:08 am #

      Hi Con,
      thanks for your feedback. The tpl dir should be in (your-WP)/wp-content/plugins/amazonsimpleadmin/
      Where (your-WP) is your WP install root directory.

  6. Thierry May 1, 2012 at 9:52 pm #

    Hi, Is there a way to use this image that the shortcode posts as the featured image?

    • Timo May 7, 2012 at 4:56 pm #

      Hi Thierry,
      By default WordPress does not let you set a featured image from an external URL. And the plugin does not support an alternate method for that so far. I will add this suggestion to the feature request list.

  7. Moritz May 6, 2012 at 3:37 pm #

    Is there a way to limit the placeholder {$Title} to a maximum length of for example 45 characters?

    Thanks in advance for your help!

    • Timo May 7, 2012 at 4:51 pm #

      Hi Moritz,
      thanks for your feedback. Manipulation the output of a placeholder is not supported with the current version. This feature is planned for the future. By now there is maybe a solution with CSS and a fixed width container or something like that…

  8. Richard June 8, 2012 at 10:10 am #

    Can you do it so the percentage saved place holder shows 0 if nothing is saved instead of it being blank please?

    • Sascha Bürk June 10, 2012 at 9:11 pm #

      This is a nice idea

    • Timo June 11, 2012 at 9:50 pm #

      Hi Richard,
      thanks for the feedback. This makes sense. I will check this and implement it for the next update.

  9. Tobi August 1, 2012 at 4:06 pm #

    Is it possible to remove the ratings if there are no available?
    I think I must work with “if” and “else” in the template file but unfortunately I could not get it working.
    Can you help me?

    • Timo August 1, 2012 at 6:20 pm #

      Hi Tobi,
      thanks for your feedback.
      Conditions like if/else are supported in the current version but this feature is already planned and will come with one of the next updates.

  10. Kate August 13, 2012 at 8:05 pm #

    Hi there,
    This is a great plugin but I’m also having problems with the stray paragraph tag. It appears just after the last paragraph e.g. in the default template this would be the available sellers line.
    31 used & new available from £2.45

    • Timo August 13, 2012 at 8:23 pm #

      Hi Kate,
      could you send me an URL where I can see what you mean? Maybe I can help you customizing a template which betters fits to your theme.

  11. Kyle August 19, 2012 at 8:00 am #

    Hi Timo, I’m trying to get the plugin to work but it just won’t. I’ve already entered my Access Key info, and the “plugin status” shows “Ready”.

    However, when I try to use the shortcode in a post, or add items to a collection, the product information just shows up completely blank – no image, no price, no rating, just the ASIN number which I’ve entered.

    • Timo August 19, 2012 at 7:49 pm #

      Hi Kyle,
      thanks for your feedback. Did you set the country code to the store you are using? Empty information can happen if you eg use a ASIN from the US store but the plugin is set to the german store.
      You could activate the debugging mode in the setup panel temporarily, refresh your a page where the problems occur and send me the contents of the output.

  12. Ben August 26, 2012 at 3:42 pm #

    Hi Timo,
    many thanks for your great plugin – however, it can’t get the product description of books, or is there any way to fetch this info from amazon.de?
    Thanks!

    • Timo August 27, 2012 at 6:14 am #

      Hi Ben,
      thanks for your feedback.
      For some products in some country’s stores there is no description. The Amazon API behaves differently from store to store. Which store and ASIN do you use in your case?

      • Ben August 28, 2012 at 7:07 pm #

        amazon.de – hardcover books just have the ISBN which I use; the plugin gets everything except the description
        Thanks

  13. Andreas August 28, 2012 at 12:51 pm #

    A Placeholder for a link to the ratings would be useful. Could you add such?

    Actually i’m using a workaround but i lack of a placeholder for my tracking ID.

    {$TotalReviews} customer reviews)

    Many thanks!

    • Andreas August 28, 2012 at 12:53 pm #

      Sorry, forgot to escape the HTML Code. Workaround:

      <a href=”http://www.amazon.com/review/{$ASIN}/?tag=%MY_TRACKING_ID%” target=”_blank”>{$TotalReviews} customer reviews)</a>

      • Timo September 3, 2012 at 7:24 pm #

        Do you mean {$IFrameURL}? It is the last item in the list above.

        • Andreas September 13, 2012 at 3:57 pm #

          Haven’t seen this code. Anyway it’s not what i mean. {$IFrameURL} links to some strange minimalistic reviews page, not the original one

  14. Ben August 31, 2012 at 6:43 pm #

    Hi,
    is there any way to integrate the add to cart link into your plugin? e.g. to have the ASIN and my tracking ID automatically inserted in this code:

    any workaround?
    Thx

      • Timo September 3, 2012 at 7:34 pm #

        Sure. You can customize your default template as explained in the guide http://www.wp-amazon-plugin.com/guide/
        Insert the code from the Amazon tutorial an replace the ASINs with {$ASIN} and “ihre_partner_id” with your tracking ID.

        • Holger March 10, 2013 at 12:14 am #

          Related to Add to Cart:
          Is there a way to get the SessionID with AWS? And integrate a Placeholder for it in ASA?

          In regular iFrame single Product links Amazon includes a SessionID. When User click the “Buy it from Amazon” Button, the Product gets instant added to Amazon Shopping Cart.

          When we use the Code mentioned above (which is quite the same as used in the single product iFrame, exept the missing SessionID), User lands on a Page where he must confirm to Add the product to Shoppingcart with an aditional click.

          Having the Product instant added to shopping cart (without second confirmation) is the preferable method.

          It is less confusing for the User and you extend the regular 24h affiliate session by 90 days for items in shopping cart.

          Can you have a look on this, Timo? If it is possible to include the required SessionID as placeholder?

  15. Wayne September 27, 2012 at 4:46 am #

    Really love this plug-in, though I had to tweak AsaCore.php ever so slightly to make it support 3 more user-defined placeholders: “{$UsrArg1}”, “{$UsrArg2}”, and “{$UsrArg3}”. I need these in combination with customized tpl files.

    Here’s what I use them for:
    “{$UsrArg1}” – I pass an html “alt” tag value here. Without it all my amazon images would have an empty alt tag.

    “{$UsrArg2}” – Here I pass the pixel width of the image I want it scaled to.

    “{$UsrArg3}” – I don’t actually need a 3rd one yet, but I’m sure I’ll find a use for it eventually :)

    Here’s an example of how I call it:

    [asa photo, usrarg1="My Favorite", usrarg2="100"]B007B4THZI[/asa]

    It would be great if a future release of your plug-in formally supported user-defined arguments so I wouldn’t have to port my hack to future releases of it :)

  16. jennifer October 1, 2012 at 12:11 am #

    Can you include an option to include customer reviews? Also can you add an option to display similar products?

    • Timo October 5, 2012 at 7:33 am #

      Hi jennifer,
      thanks for your feedback. Including the customer reviews is not possible as Amazon does not provide the data. You can only link to the user review page with the placeholder {$IFrameURL}
      Similar products will be added to the wishlist ;-)

  17. Jan, Solvium.de December 8, 2012 at 12:22 pm #

    Hey Timo, thanks for your awesome plugin. Does a great job!

    • Timo December 8, 2012 at 8:32 pm #

      Hi Jan, thanks for using it! ;-)

  18. Oliver December 11, 2012 at 8:24 am #

    Just working on implementing your plugin, really nice work!

    One question though: when using {$IFrameURL}, I noticed a parameter in the url like exp=….
    Does that mean that your cookie will expire at that time? Would be a good reason to set cache very low… (not good)
    So I think I prefer to work with Andreas’ workaround (see above), do you know if that’s good trackable code for Amazon?

    I don’t see the exp=… parameter when using {$AmazonUrl}
    Does that mean that I can safely use cache, and cookie expiration time will only start when the customer first clicks the link?
    Just to be sure…

    • Timo December 11, 2012 at 9:07 am #

      Hi Oliver,
      the IFrameURL comes from Amazon completely. ASA does not change it. From the time of a request the IFrameURL is valid 24 hours, I think.
      The same for AmazonUrl. The plugin does not change the url delivered from Amazon.
      You can safely use the cache for AmazonUrl. If you want to cache IFrameURL, cache lifetime should not exceed 24 hours. But thats just what I think and I do not use the IFrameURL placeholder on any site.

      • Oliver December 12, 2012 at 10:25 am #

        Ok, thanks, good to know.

        Any idea on the url that Andreas’ workaround is producing? ( http://www.amazon.com/review/{$ASIN}/?tag=%MY_TRACKING_ID% )
        Will Amazon be able to track that?

  19. Claude Whitmyer June 4, 2013 at 12:07 am #

    What about copyright? I tried using the placeholder for release date, but that field is empty on every item I’m promoting. There must be one somewhere as Amazon shows copyright in several places throughout the site. Any ideas?

    thanks,

    c.

  20. Claude Whitmyer June 4, 2013 at 12:22 am #

    I tried adding custom comments to the ASA tag, but what I get displayed is not my comment, but the Amazon description of the book.

    [asa comment="Hello world"] is what I tested.

    Any ideas?

    c

  21. Matze January 31, 2014 at 10:54 am #

    Hey,

    I have a problem using a custom template and comment.
    Using this: [asa product comment="Hello World"]ASIN[/asa]
    did not display my template, the default template is shown.
    Using this without a comment worked. My idea is, using comment and custom template didn’t work?

    Regards,
    Matze

    • Timo January 31, 2014 at 11:25 am #

      Hi Matze,
      please try to separate the template name and the option by comma. This should work:
      [asa product, Comment="Hello World"]ASIN[/asa]

      If not, please contact me via the contact form (dort auch gerne auf deutsch).

  22. Stephan February 8, 2014 at 9:54 am #

    Hey Timo,

    tolles Plugin, vielen Dank. Was ich vermisse ist ein Placeholder um den Lagerbestand anzeigen zu lassen (zB. 20 auf Lager). Wäre vielleicht noch eine sinnvolle Erweiterung :-)

    Grüße

    • Timo February 8, 2014 at 10:27 am #

      Hi Stephan,
      danke für den Hinweis. Ich werde mal sehen, was sich machen lässt :) Ich glaube diese Information ist nur in dem Sinne verfügbar, wenn nur noch wenige Produkte auf Lager sind.

  23. Stephan February 8, 2014 at 3:33 pm #

    Hi Timo,

    richtig. Ist bei Pflanzen zB interessant. Geht die Pflanzzeit zu Ende, nimmt das Angebot ab. Ist bestimmt ganz nett für die Conversion (Nur noch X auf Lager :-)

    Viele Grüße und schönes WE

    • Timo February 8, 2014 at 4:09 pm #

      Ja, stimmt. Hast du eine Beispiel ASIN? Denn ich meine, das müsste auch jetzt schon gehen.

  24. Stephan February 9, 2014 at 10:37 am #

    Hi Timo,

    natürlich doch: B0096AY47K

    Viele Grüße

  25. John February 11, 2014 at 11:39 am #

    Und? Geht das oder geht das noch nicht? :)

  26. Timo February 11, 2014 at 7:55 pm #

    Also aktuell geht es nicht. Hab es mit der ASIN nachgestellt und der Wert dafür ist nicht im Ergebnis enthalten. Werde weiterhin nachforschen, ob es eine Möglichkeit gibt z.B. die Abfrageergebnisse zu erweitern oder ähnliches…

  27. ken March 29, 2014 at 7:56 am #

    Hi, can you give sample how to use if/else in the template files ?

    Thanks.

  28. David July 12, 2014 at 3:08 pm #

    This plugin is great and simple to use.
    One complication is on my website, http://vitalhomeremedies.com/how-to-get-rid-of-sunburn/, (at bottom of post) It shows # of reviews and ratings for some products but not all.

    The number of products and which products it shows this data for varies.

    Thanks

    • Timo July 12, 2014 at 3:28 pm #

      Hi David,
      thanks for using ASA. I will check those products and see if I can find an answer for this behavior.

    • Timo July 13, 2014 at 1:01 pm #

      I tested it but cannot reproduce it. All ratings get loaded. Can you tell me how exactly you implemented the products? Please use the contact form for further details (http://www.wp-amazon-plugin.com/contact/).

  29. Kelty Mach September 1, 2014 at 1:14 pm #

    Hello,

    I’m trying to test your plugin out but when I insert [asa]ASIN[/asa] in my posts but all it displays in the front end is the actual code [asa]ASIN[/asa].
    I don’t know if it’s a common issue or if it is because I’m using WordPress Multisite but I can’t see why it would be an issue since I have to setup the plugin in each subsite anyway…
    If you have any idea that’d be great.

    Many thanks

    • Timo September 1, 2014 at 5:22 pm #

      Hi Kelty,
      thanks for your feedback. I checked my plugin with multisite use and it works. But I had a problem when I entered the asa shortcode in the visual editor. It resulted in:

      which can’t get rendered by ASA. Please check your shortcode in the text editor to see if there are any interfering HTML tags.

  30. Fabio September 3, 2014 at 5:27 pm #

    Hello, I’ve installed today the plugin and it is great. Thanks! I think I’ve found a bug… If the product is sold on the marketplace the saved amount is calculated from the listed amazon price. Anyway I’m not interested in the marketplace so is it possible to use only the price of the product sold by Amazon?

    Thanks, Fabio

    • Timo September 4, 2014 at 6:08 pm #

      Hi Fabio,
      thanks for your feedback. I’ll check that and let you know.

  31. Fabio September 5, 2014 at 12:26 pm #

    Thanks Timo! :)

  32. Fabio September 18, 2014 at 2:44 pm #

    Hello Timo, any news for me? Thanks! :)

    • Timo September 20, 2014 at 8:47 am #

      Sorry, I did not forget it, was just very busy. Expect an answer by tomorrow.

  33. Fabio September 20, 2014 at 2:15 pm #

    No problem Timo. Thanks! :)

    • Timo September 20, 2014 at 3:14 pm #

      To access the current price disregarding the marketplace, this placeholder should help you:
      {$Offers->Offer->OfferListing->Price->FormattedPrice}

  34. Pawel September 22, 2014 at 9:03 am #

    Hi Timo,

    besteht die Möglichkeit PHP-Code in den htm-templates zu verwenden? Ich habe es mit einem echo versucht, klappt leider nicht.

    Ich wollte ein benutzerdefiniertes Feld im Template anzeigen lassen (wenn es ausgefüllt wurde).

    Gruß,
    Pawel

    • Pawel September 23, 2014 at 6:56 pm #

      Ok, das mit dem PHP hat sich erledigt.

      Nun habe ich aber das Problem, dass die Templates nicht vollständig laden.
      Jedes Mal wenn ich die Seite neu lade fehlt ein anderer Teil. Mal sind es Bilder, mal Preis und mal alles.

      Ist solch ein Problem bereits bekannt?

      Danke und Gruß

Trackbacks/Pingbacks

  1. Wordpress - AmazonSimpleAdmin - Rezensionen - April 7, 2013

    [...] [...]

Add Comment Register



Leave a Reply