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?

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.