Support forum login

©2006-2012 IAAI Software

Contact Us Privacy Policy

eBay.com, Amazon.com APIs

Submitted by mtc123 on Sun, 2010-04-18 17:36.

Hi Dave,

Can we have both eBay.com and Amazon.com APIs coexist in PT (ie in search.php, products.php, etc)?

Can we have page footer/pagination, like the following, for search results from Amazon and/or eBay?
Previous | 1 2 3 4 5 6 7 | Next

What is amazonAssociateTag and where do I find it?

Thanks,

Submitted by support on Sun, 2010-04-18 18:38.

Hi,

Sure - you can use both on the same page, but a small modification is required. In each file (amazon.php and ebay.php), look for the following line near the top:

  require("includes/MagicParser.php");

...and REPLACE with:

  require_once("includes/MagicParser.php");

I'll look into the issues of pagination - there may be a nice modification so that when navigating Price Tapestry search result pages, then "next" block of results from the API call is also requested. I'll need to set that all up on my test server to give it a go and get back to you...

Your amazonAssociateTag is found separately from the API keys etc.; as it comes from the Amazon Associates program. Search for "Amazon Associates [country]" for the Amazon affiliate program in your country (for example, in the UK it is here) - and then you'll be allocated an associateTag after signing up.

Cheers,
David.

Submitted by paullas on Sat, 2011-02-26 02:33.

hi david

did you manage to get the footer/pagination working.

Submitted by support on Sat, 2011-02-26 10:44.

Hi Paul,

Yes - very straight forward in fact. For ebay.php, look for this line:

    $url .= "&paginationInput.entriesPerPage=".$ebayItemMax;

...and REPLACE that with:

    $url .= "&paginationInput.entriesPerPage=".$ebayItemMax;
    if ($page) $url .= "&paginationInput.pageNumber=".$page;

And for amazon.php, look for this line:

    $url .= "&Keywords=".urlencode($q);

...and REPLACE with:

    $url .= "&Keywords=".urlencode($q);
    if ($page) $url .= "&ItemPage=".$page;

Cheers,
David.
--
PriceTapestry.com