Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

Through Amazon Associates, you can create search widgets that have a place for a search term. In the admin, you can set the default search term, but that seems to be tied to the widget ID.

I would like to be able to dynamically set the search term for the widget when it is displayed.

How can I accomplish this?

Note:

I am referring to the following banner script:

<SCRIPT charset="utf-8" type="text/javascript" src="http://ws-na.amazon-adsystem.com/widgets/q?rt=tf_sw&ServiceVersion=20070822&MarketPlace=CA&ID=V20070822%2FCA%2F[PARTNER-ID]%2F8002%2F84cb1754-d9ab-48de-b96b-574927fa9599"> </SCRIPT> <NOSCRIPT><A HREF="http://ws-na.amazon-adsystem.com/widgets/q?rt=tf_sw&ServiceVersion=20070822&MarketPlace=CA&ID=V20070822%2FCA%2F[PARTNER-ID]%2F8002%2F84cb1754-d9ab-48de-b96b-574927fa9599&Operation=NoScript">Amazon.ca Widgets</A></NOSCRIPT>
share|improve this question
    
Here's a JavaScript snippet that you can adapt for you need -mvark.blogspot.in/2013/04/… –  mvark Sep 11 '13 at 4:25
add comment

1 Answer 1

You can insert the search term dynamically with the Recommended Product Links widget

When I use it I get code formatted like this (amazon affiliate id removed):

<iframe src="http://rcm-na.amazon-adsystem.com/e/cm?t=affiliateid&o=1&p=6&l=st1&mode=apparel&search=stripes&fc1=000000&lt1=_blank&lc1=3366FF&bg1=FFFFFF&f=ifr" marginwidth="0" marginheight="0" width="120" height="150" border="0" frameborder="0" style="border:none;" scrolling="no"></iframe>

it has the parameter search=stripes in it. "stripes" was the search term that I typed in to create the widget when selecting the category "women's appearal". You should be able to replace that parameter to modify this widget.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.