Jump to content

Is there an exact hook for cart update events? PS 1.6


mikhrock

Recommended Posts

I need to detect the exact moments of cart update - when a product is added/removed, quantity changed etc.

 

I'm currently using 'actionCartSave', but it fires too often - for example, when a product page is just viewed and nothing really happens to the cart. The $params['cart'] can obviously be empty in this case, which leads to errors in my module.

 

Please share any ideas on how I can detect only the cart update events, or probably where I'm wrong in using actionCartSave hook.

 

Thank you

Link to comment
Share on other sites

  • 2 weeks later...

Ok, for now I've managed to solve the problem by manually detecting and checking the places where Cart Save is called and not needed (these are AuthController and AddressController for example).

 

But the question is still open, I hope there is a more efficient and good looking way.

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