Jump to content

'supplier->getProducts' always return empty result


Rico_fr

Recommended Posts

Hi,

I am trying to migrate an old website from Prestashop 1.6.1 to 1.7.8.
The server is running a php script on a regular basis to update the products' stock (the stock datas are provided using the supplier API).
The problem is that I can not get it working with Prestashop version 1.7.8 It look like the 'supplier->getProducts doesn't work properly.
Indeed, it always return an empty result.

I have checked that : 
    - the supplier name & ID are correct
    - some products are associated to this supplier, (checked in Prestashop + database)
    - products have price and are active (checked in Prestashop + database). (I also tried to pass 'false' as the 8th argument)
    - results is correct if I use SQL requests in phpMyAdmin  (SELECT * FROM `ps_product_supplier` WHERE `id_supplier` = 1);

I tried to use a SQL request in my script it doesn't work but I am not confortable with that part. So can not conclude here.

Any idea why getProducts return an empty result ? It look like that Supplier getProducts  filters the products but can not find why ? 

Also, I tried to use Prestashop v8.0.4 but I had some issues to port my script and get all products from a supplier.
So, I don't know how to progress on this issue :huh:

 

test_getproducts.zip

Edited by Rico_fr (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...