Jump to content

[SOLVED] Custom Amazon Search widget. jquery, forms. experts needed


daydreamer

Recommended Posts

On my site I want to ask users what their interests are, then display relevant amazon products in the amazon widget.

 

Amazon allow you to enter one search term to default to, but not to add your own variables to dynamically on the fly.

 

Amazon give you some javascript to display their ads, and this displays in its own iframe.

 

What I want to do using javascript and PHP, is enter my own search term.

 

Ive looked at the headers that are sent when you search using the widget:

GET /widgets/q?Operation=GetResults&Keywords=this%20is%20it&SearchIndex=Electronics&multipageStart=0&InstanceId=0&multipageCount=10&TemplateId=8002&ServiceVersion=20070822&MarketPlace=GB

 

I am trying to use Jquery to load in the client browser that will automatically send the request and display items as soon as the page loads, currently it doesnt do anything.

$(document).ready(function(){
$.get("http://ws.amazon.co.uk/widgets/q", { Operation: "GetResults", Keywords: "<?php echo "$interests"; ?>", 
      SearchIndex: "Electronics", multipageStart: "0", InstanceId: "0", multipageCount: "10", 
      TemplateId: "8002", ServiceVersion: "20070822", MarketPlace: "GB" } );
});

 

The search button within the widget:

<input height="21" width="21" type="image" onclick='javascript:window.nextCallBack["GB"][8002][0].goOnClick("GB",0);' src="http://wms.assoc-amazon.co.uk/GB/img/go-rd-sec_tpng.png" style="border: medium none ; margin: 0pt; top: 6px; position: relative; cursor: pointer;"/>

 

Anybody got any advice or ideas?

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.