Jump to content

Get the cart id inside the file Cart.php

Thibauld V

Recommended Posts

Good morning everyone !

I have Prestashop and I would to make, in the file override classe file Cart.php, a SQL request with the id of the cart.

But when I write $this->id in the override file Cart.php, the variable in empty.

Had anyone know what is going wrong ?

Link to comment
Share on other sites

I did this and it still doesn't work.

I have created a new cart object ($cart=new Cart();) in my Cart.php override. And when I ask for his id ($cart->id_cart or $cart->id), I have an empty result.



In fact I wasn't using doing the right call of the my new cart objet.
My problem is solved, thank you !

Edited by Thibauld V (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...