I really only need a simple solution, All I need is to do is emulate a site like last.fm. They use a simple link to direct people to purchase songs and CD's with a 'buy now from amazon.com' link.
I thought I could just hard code the url into the node-x.tpl.php file to read similar to this:
<a href="http://www.amazon.com/gp/search?ie=UTF8&keywords=<?php print ${node title}&tag=mysitetag-20&index=books&linkCode=ur2&camp=1789&creative=9325">Buy now from Amazon.com</a>
Obviously, the PHP is wrong, I am just illustrating. I would need to strip all spaces and replace them with a '+' to be correct.
I would like to make it generic as possible, so it will work with books, software, etc... The node title should get them to the exact page, or one click away. What pieces of the URL can I strip without losing my commission? I would think that the 'tag' variable is the only needed one, but what about 'linkCode' , 'camp' and 'creative'?
Thanks!
Comments
Comment #1
rfayYou can use the .tpl.php files as examples of how to present various facets of an amazon item. You can also use Views to present Amazon items which have CCK representation. Some examples of this are at http://drupal.org/node/524296.