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

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
Article modified:
03 Dec 2007

Comments/questions? Leave a message in the form.

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

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