Jump to content

Hook to refresh content displayed by module on Shopping Cart Page

Recommended Posts

In prestashop 1.7, I have a module that displays content on the shopping cart page (hook displayShoppingCartFooter). I want to refresh what is displayed after the cart is updated (e.g. changed quantity, delete item). What hook can I use for the same or how can I trigger the refresh after the cart has been updated (the content displayed by my module depends on the cart contents, so this should happen after the cart is updated). afterCartSave hook does not help.


Any guidance?



Share this post

Link to post
Share on other sites

you can use emitter 'on cart update', and then - do an ajax request to your module and update the contents http://developers.prestashop.com/themes/javascript/index.html



updatedCart On the cart page, everytime something happens (change quantity, remove product and so on) the cart is reloaded by ajax call. After the cart is updated, this event is triggered.

Share this post

Link to post
Share on other sites
  • 2 years later...

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

Important Information

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