Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changes to eBay API

Status
Not open for further replies.

PCHomepage

Programmer
Feb 24, 2009
609
US
Recently eBay apparently made some changes to their API that caused one of my sites to not show the listing that it had before. Is anyone familiar with it enough to tell me what I need to do to get the code working again?

JavaScript:
<script language="JavaScript" src="[URL unfurl="true"]http://lapi.ebay.com/ws/eBayISAPI.dll?EKServer&ai=pm%23fack%7Eoik&bdrcolor=FFCC00&catid=<?=$LinkID?>&cid=0&eksize=1&encode=ISO-8859-1&endcolor=FF0000&endtime=y&fbgcolor=FFFFFF&fntcolor=000000&fs=0&hdrcolor=FFFFCC&hdrimage=1&hdrsrch=y&img=y&lnkcolor=0000FF&logo=2&num=50&numbid=y&paypal=y&popup=y&prvd=1&query=Packard&r0=3&sacategoryin=<?=$LinkID?>&shipcost=y&siteid=0&sort=MetaEndSort&sortby=endtime&sortdir=asc&srchdesc=y&tbgcolor=FFFFFF&title=<?=$CategoryText?>&tlecolor=FFCE63&tlefs=0&tlfcolor=000000&track=2190672&watchcat=6389&width=800"></script>[/URL]
</center>
<div id="itemContent"></div>

A couple parameters are being passed dynamically from my site's database. Thank you in advance for any help you may be able to provide!
 
this works for me

Code:
<!DOCTYPE HTML>
<html>
<head>
<script src="//code.jquery.com/jquery-1.11.2.min.js"></script>
<script>
var url = "[URL unfurl="true"]http://svcs.ebay.com/services/search/FindingService/v1";[/URL]
    url += "?OPERATION-NAME=findItemsAdvanced";
    url += "&SERVICE-VERSION=1.0.0";
    url += "&SECURITY-APPNAME=DonPiers-4a1e-40ef-9c6c-429f470ccb6b";
    url += "&GLOBAL-ID=EBAY-US";
    url += "&RESPONSE-DATA-FORMAT=JSON";
    url += "&REST-PAYLOAD";
    url += "&keywords=Packard";
    url += "&descriptionSearch=1";
    url += "&paginationInput.entriesPerPage=50";
    url += "&categoryId=33559";

// Submit the request
$.ajax({
	url: url,
	dataType:'jsonp',
	success: function(data){
		var table = $('<table width="100%" border="1" cellspacing="0" cellpadding="3" />');
		var tb = $('<tbody/>');
		var it = data.findItemsAdvancedResponse[0].searchResult[0].item;
		for (var i = 0; i<it.length; i++){
			var item = it[i];
			var title = item.title;
			var pic = item.galleryURL;
			var viewitem = item.viewItemURL;
			if (null != title && null != viewitem) {
				tb.append('<tr><td><img src="' + pic + '" border="0"></td><td><a href="' + viewitem + '" target="_blank">' + title + '</a></td></tr>');
			}
		}
		table.append(tb).appendTo($('#receiver'));
	}
});

</script>
</head>

<body>
	<div id="receiver"></div>
	
</body>
</html>
 
Oh, I see what you mean about not using the callback. Without it the HTML is there so I now have something with which to work once I resolve the multiple categoryId issue.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top