You are here:  » Include eBay results in the main price table


Include eBay results in the main price table

Submitted by zway on Sun, 2020-11-29 07:10 in

Hi David,

Instead of having to click on the eBay tab to load prices, could this be loaded with the page in the main price table?

Thanks,
Zway

Submitted by support on Mon, 2020-11-30 21:30

Hello Zway,

Apologies for missing your post - bear with me and I'll restore a download and instructions for the legacy eBay API module to load inline with search results; I had discontinued these as the delay in loading API results non-async could have search engine coverage implications but if required it could be made conditional, for example for user entered queries only...

Cheers,
David.
--
PriceTapestry.com

Submitted by support on Tue, 2020-12-01 08:22

Hello Zway,

I've enabled the legacy eBay API module, click here to download.

Edit the file and enter your credentials at lines 2 - 8:

  $ebayAppId = "YOUR_APP_ID";
  $ebayGlobalId = "";
  $ebayNetworkId = "";
  $ebayTrackingId = "";

(as per instructions for Async API modules)

Finally edit search.php and look for the following code at line 586:

  require("html/footer.php");

...and to show eBay results for user entered queries, REPLACE with:

  if ($q && (!isset($parts[1])))
  {
    require("ebay.php");
  }
  require("html/footer.php");

Cheers,
David.
--
PriceTapestry.com

Submitted by zway on Sat, 2020-12-05 05:34

Thanks for that David, I'm only looking to have eBay results displayed only the product pages, I don't mind if the results slow down the page. Using the instructions supplied I wasn't able to get that to work

I've already deployed the newer version of the eBay code (which works). I've created a second version of ebay.php

What other changes do I need to make? I notice the parsing is a little bit different on the older version of the code.

Submitted by support on Mon, 2020-12-07 08:42

Hello Zway,

I just double-checked the standalone ebay.php and all seems to be OK but it only uses the PHP fetching method so I wonder if the async version that you had working is only working because it defaults to CURL if available...

Firstly, make sure that the standalone version is uploaded to the top level of the Price Tapestry installation (not the html/ folder); then to have the eBay results load on the product page, edit products.php and look for the following code at line 166:

  require("html/footer.php");

...and REPLACE with:

  require("ebay.php");
  require("html/footer.php");

If that still doesn't work, edit the new ebay.php and look for the following code at line 70:

    MagicParser_parse($url,"myEbayRecordHandler","xml|FINDITEMSBYKEYWORDSRESPONSE/SEARCHRESULT/ITEM/");

...and REPLACE with:

    require("html/api.php");
    $xml = api_fetch($url);
MagicParser_parse("string://".$xml,"myEbayRecordHandler","xml|FINDITEMSBYKEYWORDSRESPONSE/SEARCHRESULT/ITEM/");

This uses the html/api.php file from the async version, so make sure this is still uploaded to the html/ folder even if not using the tabs...

Hope this helps!

Cheers,
David.
--
PriceTapestry.com