Jump to content

Fonction $product->setCarriers()


agarmur

Recommended Posts

il y a 6 minutes, agarmur a dit :

Yes I know, but id_reference = id_carrier 

ok, but only for the first creation before any modifications.

And i don't really know if you get any var_dump (prefered Tool::dieObject()) on this function because there is no return.

Link to comment
Share on other sites

il y a 11 minutes, Mediacom87 a dit :

ok, but only for the first creation before any modifications.

And i don't really know if you get any var_dump (prefered Tool::dieObject()) on this function because there is no return.

effectively, there is no return in the function, but how to test to see if it works well?

Link to comment
Share on other sites

Just now, agarmur said:

I found a solution even if I don't like it, I run SQL in my php : INSERT INTO `ps_product_carrier` (`id_product`, `id_carrier_reference`, `id_shop`) VALUES ('176', '1', '1');

Normally this is what $product->setCarriers() is supposed to do.

If you want to debug further, you could var_dump $sql inside classes/db/Db.php at line 471 more or less. 
You can also debug $unique_array inside classes/Product.php at line 3487 more or less. 

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...