Jump to content

hookActionCartSave not working properly.


M Iqbal
 Share

Recommended Posts

Hello support,
I am trying to use  hookActionCartSave hook in my custom module but that hooks fire when i go to checkout and add customer information or login customer in Prestashop 1.6 and 1.7.

I want the event when user add product to cart.
As per Prestashop documentation i try to use actionCartUpdateQuantityBefore but no luck.

Can anyone please help.

Thank you.

Share this post


Link to post
Share on other sites

That hook works when you add something to the cart. Is the hook registered? If so, what exactly do you do that doesn't work?

Share this post


Link to post
Share on other sites

Basically, I am currently using hook hookActionCartSave , but this hooks fire when i go to checkout page and enter customer address / login customer after adding product to cart.

I need an event when a product will be add / remove / qty update in cart.

Share this post


Link to post
Share on other sites

That hook is executed when you add / delete a product, I tell you for sure.
Do a simple test, type "exit;" in the hook, and check in the console, on the network, if the execution stops (you can also give a var_dump with a text, to see if it returns that text to you).

  • Like 1

Share this post


Link to post
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
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More