Loading...
 

content-sensitive amazon shopping window

'kay first off: this is not exaclty elegant. I'd preferred to make it a real module but I couldn't get the variables passed properly into the iframe. So I ended up putting it into tiki-show_page.tpl — at the very bottom of that, so it's least obtrusive.
This is a step-by-step How To; to reproduce what I've done, please do:

  1. be(come) a member of amazon partner program at their URL most closely related to your website's primary language;
  2. know your amazon partner-ID, hereinafter referred to as YOURAPID-##;
  3. be(come) familiar with the various linkage amazon offers to partners for displaying product; this example refers to the link type "recommendend product selection" ( or similar, I'm seeing this in german, mind you ). I have chosen to use that f*t m*ther of 3x3 items display ( Size: 600 x 520 ) at the very end of that section, but this example should work with whatever option you pick, as long as it's in the .tpl.
  4. take note of the SEARCHTERM you will enter in the process of generating your original amazon iframe.


Okay, let's assume that partnernet.amazon.*/gp/associates/network/build-links/dynamic/select-size.html delivers the following as your ORIGINAL iframe :
<iframe src="http://rcm-de.amazon.de/e/cm?t=YOURAPID-##&o=3&p=36&l=st1&mode=books-de&search=SEARCHTERM&fc1=&=1&lc1=&lt1=&f=ifr&bg1=" marginwidth="0" marginheight="0" width="600" height="520" border="0" frameborder="0" style="border:none;" scrolling="no"></iframe>

Then you wil have to please

  • make sure your real own ID is in there (and don't lose money because you just copy-pasted from here) and
  • replace the SEARCHTERM with this:
Copy to clipboard
{if $structure eq 'y' and $page_info.page_alias ne ''}{$page_info.page_alias}{else}{$page}{/if}

(no spaces between brackets!), so that the new iframe code looks like something like this:
<iframe src="http://rcm-de.amazon.de/e/cm?t=mywaycoolsite-21&o=3&p=36&l=st1&mode=books-de&search={if $structure eq 'y' and $page_info.page_alias ne ''}{$page_info.page_alias}{else}{$page}{/if}&fc1=&=1&lc1=&lt1=&f=ifr&bg1=" marginwidth="0" marginheight="0" width="600" height="520" border="0" frameborder="0" style="border:none;" scrolling="no"></iframe>

That's it. Put it at the bottom of your primary tiki-show_page.tpl, test-drive with a few pages, and see the book offer change dynamically. On a page about "women" it will display books about women, on a page about "psychology" it will list books about psychology, and so on.
If the title is too complex for amazon's backend to serve sensibly (like, your page being named "why eskimos never won olympic beach volleyball"), the iframe will default to a generic "shop at amazon" adplate.

see it in action at http://www.rosenpfad.de/p (bring protective eyegear, since I'm wildly testing CSS at the time of this posting, beware of sight-corrosive color combinations)</small>

Enjoy! Hope it works for you, too. Best regards, RiPLeX


Page last modified on Thursday 28 July 2005 23:24:17 GMT-0000

Upcoming Events

1)  18 Apr 2024 14:00 GMT-0000
Tiki Roundtable Meeting
2)  16 May 2024 14:00 GMT-0000
Tiki Roundtable Meeting
3)  20 Jun 2024 14:00 GMT-0000
Tiki Roundtable Meeting
4)  18 Jul 2024 14:00 GMT-0000
Tiki Roundtable Meeting
5)  15 Aug 2024 14:00 GMT-0000
Tiki Roundtable Meeting
6)  19 Sep 2024 14:00 GMT-0000
Tiki Roundtable Meeting
7) 
Tiki birthday
8)  17 Oct 2024 14:00 GMT-0000
Tiki Roundtable Meeting
9)  21 Nov 2024 14:00 GMT-0000
Tiki Roundtable Meeting
10)  19 Dec 2024 14:00 GMT-0000
Tiki Roundtable Meeting