Content last modified Monday 6 March 2017
hop to #bottom
Categories:
Author:
Current version:
0.4
About It:
Get it:
Rate it:
  • Helpful?
  • 0 Yes
  • 0 No
Flag it:
Contact Reason [ ? ]

asv_amazon

asv_amazon – Version 0.4 – Updated 08/18/2005

List mode attributes

[asin(Amazon Standard Item Number)] – The asin attribute is required and is the unique identifier of the product. You can find the ASIN by visiting the site of the product on Amazon. The ASIN will be the 10 digit number in the URL.

[locale] = The locale attribute is optional and is by default set to US. You can use the following locales:

  • us – United States
  • uk – United Kingdom
  • de – Denmark
  • jp – Japan
  • fr – France
  • ca – Canada

[cache] = true/false. The cache attribute is optional and is set by default to “false”. If you want to store the XML data locally, then set “cache” to “true”. The cached file will maintain for 24 hours.

[cacheimg] = none/small/medium/large. The cacheImage attribute is optional and is set by default to none. If you want to store the image locally then you can set this attribute to download the image size you want to use to your local tmp folder and it will refresh every 24 hours.

Usage


<txp:asv_amazon [attributes]>
[layout]
</txp:asv_amazon>

In between the tags you can include the layout of the data. There will be 4 pieces of information currently available to you:

  • asv_DetailPageURL – The URL for the product on the Amazon site
  • asv_SmallImageURL – The URL for the smallest image of the product
  • asv_MediumImageURL – The URL for the medium size image of the product
  • asv_LargeImageURL – The URL for the largest image of the product
  • asv_Title – The name of the product

You can include your own layout of the data in between the <txp:asv_amazon> tags. If you do not include this information, there will be a default layout given:

<a href="asv_DetailPageURL"><img src="asv_SmallImageURL" /><br />asv_Title</a><br />

Example:

<txp:asv_amazon asin="0374292884">
<a href="asv_DetailPageURL"><img src="asv_SmallImageURL" /><br />asv_Title</a>
</txp:asv_amazon>

Output:

<a href="http://www.amazon.com/exec/obidos/redirect?tag=ws%26link_code=xm2%26camp=2025%26creative=165953%26path=http://www.amazon.com/gp/redirect.html%253fASIN=1578518520%2526tag=ws%2526lcode=xm2%2526cID=2025%2526ccmID=165953%2526location=/o/ASIN/1578518520%25253FSubscriptionId=0XEQBETVCS700MG1E4R2"> <img src="http://images.amazon.com/images/P/1578518520.01.<em>SCTHUMBZZZ</em>.jpg" /><br />The Innovator's Solution: Creating and Sustaining Successful Growth</a><br />

ChangeLog

  • 0.1
    • Pulls XML file from Amazon’s server and extracts Product Name, Product URL, and Small/Medium/Large Image URL.
    • You can set the locale and ASIN
  • 0.2
    • Choose to cache the images and XML file locally in the “textpattern/tmp” folder
  • 0.3
    • Fixed a defect that prevented the plugin from pulling data from cached pages.
    • Updated plugin to install using the 1.0 plugin standard
  • 0.4
    • Page is no longer killed if there are errors but rather just displays the error at the top of the page
Article Request Count:

Archived [?]: replaced by asv_amazon2

Keywords/tags:
Initially released:
May 2005
Posted here:
14 Aug 2005
Article modified:
03 Dec 2007

If there is a comment form at the Information URL, you may want to leave your comments/questions there for quicker feedback. Otherwise, comment away:

Your comment will NOT be submitted until you click the 'Submit' button on the next pageload.

Commented (4)

Marcus:
Are the named locales just examples or the only ones that are allowed to use? What’s about the german “de”? And what about integration of a afiliate name?
Marcus

This plugin should work with any locale given by Amazon (those were just the ones when I saw when I wrote the doc). About the affiliate addin, I’ll definitely get to adding that up, shouldn’t be too difficult.
Marcus:
This is cool news. But anyhow, I saw that you wrote “de” for Denmark… Isn’t it supposed to be “dk”, because “de” is supposed to be for the german store?
I too would be more interested in this plug-in if you could incorporate the affiliate id from Amazon.

Subscribe to this article's comments RSS feed. [ ? ]   View Recent Comments across the site.

You know you want to visit the Archives.

Browse

Categories


Articles

There are also tag clouds, 'cause those are fun.
Published with Textpattern