Content last modified Tuesday 24 August 2021
hop to #bottom
Categories:
Author:
Current version:
1.0
About It:
Get it:
Rate it:
  • Helpful?
  • 5 Yes
  • 0 No
Flag it:

If you'd like to provide updated information and do not have access to directly edit, please contact the site admin; thanks!

asv_amazon2

A long time ago, I created a plugin called asv_amazon, which let you display products from Amazon on your site. It worked, but inserting the product required you to go to Amazon, copy the ASIN number, and paste into the TextPattern. What a hassle! Well I finally got around to writing the next version of asv_amazon. I’ve called it asv_amazon2 since it is completely written and works in a whole new way.

How does it work?

Simple – when writing an article just click on the “Amazon” link in the top right column. You can search and add products to your post by clicking the “add” button next to each item.

Creating a form

With version 1.0, you will have to have forms to generate the layout of the product on your page. When creating a new ‘misc’ form you can use the following values:

asv_url
asv_sImageUrl
asv_mImageUrl
asv_lImageUrl
asv_asin
asv_title

OR you can use the depecrated literals from the original version

asv_DetailPageURL
asv_SmallImageURL
asv_MediumImageURL
asv_LargeImageURL
asv_Title

asv_amazon2 will just replace these literals with their product counterpart, so:

<a href="asv_amazon2_url"><img src="asv_amazon2_sImageUrl" /><br />asv_amazon2_title</a>

returns:

<a href="http://www.amazon.com/gp/redirect.html%3FASIN=1590598326%26tag=ws%26lcode=xm2%26cID=2025%26ccmID=165953%26location=/o/ASIN/1590598326%253FSubscriptionId=0Y8F1YV1N2YSGJ1MC202"><img src="http://ec1.images-amazon.com/images/I/01yaq1etjKL.jpg" /><br />Textpattern Solutions: PHP-Based Content Management Made Easy (Solutions)</a>
which will display like this:


Textpattern Solutions: PHP-Based Content Management Made Easy (Solutions)

Article Request Count:
Keywords/tags:
Posted here:
03 Dec 2007

You know you want to visit the Archives.
Published with Textpattern