You are here:  » Problem installing Amazon / eBay addon


Problem installing Amazon / eBay addon

Submitted by anil m on Wed, 2017-02-01 10:43 in

Hi David
I'm revisiting the amazon/ebay comparison site after a couple of years now, and am having problems installing the API.
I've downloaded 16/10A and the Spanish translation, and then added in the API to the html directory. The ebay.php and amazon.php have been filled in.
On the website, there is nothing below the line which says HOME, and any searches that are made result in the message that there are no results.
Any help would be appreciated.
Thanks

Submitted by support on Wed, 2017-02-01 10:53

Hello Anil,

If the page stops output unexpectedly, that implies that a PHP fatal error is occurring for some reason (but is probably not displayed due to your server's PHP configuration). The first thing to do would be to add the following lines to the end of config.advanced.php, just before the closing ?> tag:

  error_reporting(E_ALL);
  ini_set('display_errors','on');

Try your page again, and if that is the case the error message should be displayed. If you're not sure from the output where the problem lies, or if there is no difference of course, let me know and I'll check it out further for you, in which case, if the installation is online and you could let me know the URL (I'll remove before publishing your reply) that will help...

Cheers,
David.
--
PriceTapestry.com

Submitted by anil m on Wed, 2017-02-01 11:31

Hi David
Thanks for the quick reply. There was no change in the output after your suggestion. The website is online, and called {link saved}
Thanks
Anil

Submitted by support on Wed, 2017-02-01 11:41

Hello Anil,

Thanks - as you haven't yet imported any feeds there are no results to display so Amazon / eBay tabs would not display either. However, if you would like to have search show just Amazon / eBay tabs (until feeds are added) then you can make a simple change to search.php - look for the following code at line 553:

    require("html/noresults.php");

...and REPLACE with:

    require("html/searchresults.php");

(don't forget to remove the error_reporting / ini_set code from config.php)

Hope this helps!

Cheers,
David.
--
PriceTapestry.com

Submitted by anil m on Wed, 2017-02-01 12:16

Thanks David. I think there may be something incorrect with the Amazon and eBay settings I've specified, hence no feeds are coming though. Will look into that now

Submitted by support on Wed, 2017-02-01 12:32

Hi,

I'm was planning to post details of how to view the raw API response to help diagnose API module problems - I'll do that now and update this thread in a few minutes...

Cheers,
David.
--
PriceTapestry.com

Submitted by anil m on Wed, 2017-02-01 12:53

I tried the diagnosis from your thread, and after a search, found the result to be:

{link saved}

which is quite dissimilar to

{link saved}

The amazon and ebay codes seem to be OK, so I was wondering if there was anything I was missing in the script.

Thanks
Anil

Submitted by support on Wed, 2017-02-01 15:08

Hello Anil,

The direct request response (with &debug=1 in URL) is actually empty, so this would indicate that maybe URL wrappers are disabled on your server - more info on that setting here;

http://www.php.net/manual/en/filesystem.configuration.php#ini.allow-url-fopen

However, CURL is very often available as an alternative and something else I have been meaning to do is to update the API modules to use CURL by default if installed (just like the Automation Tool) so I have just uploaded this so if you could update from the AsyncAPI.zip download the following files:

html/api.php (new)
html/searchresults_amazon.php
html/searchresults_ebay.php
html/prices_amazon.php
html/prices_ebay.php

...and then try search again and see if that has done the trick. I wasn't sure however, from your first link whether you had applied the mod to search.php to include html/searchresults.php even if no results so you may need to apply that before testing.

If still no results, in conjunction with the update I have modified the debug instructions in here, so if you could apply that to html/searchresults_amazon.php and then try the direct request debug URL as before, that should show the API response...

Hope this helps!

Cheers,
David.
--
PriceTapestry.com

Submitted by anil m on Wed, 2017-02-01 15:53

OK, I see what's happened.
The amazon keys are incorrect, which means that items from both amazon and ebay will not show on the results.
By changing line 553 on search.php to your suggestion, at least I can now see the ebay results.

Do you think that because of this, I do not see the filters? (Merchant,brand,price etc)

Thanks

Submitted by support on Wed, 2017-02-01 16:17

Hello Anil,

Filters only apply to datafeed search results so you will only see them once feeds have been registered and imported and datafeed results showing alongside API results...

Cheers,
David.
--
PriceTapestry.com

Submitted by anil m on Wed, 2017-02-01 16:24

Thats fine David. Many thanks again for your help.