Jump to content

Track +1/-1 click on cart products


Recommended Posts

I need to track when user clicks on +1 ou -1 in product quantity inside cart in order to increase / decrease a product quantity.

When I bind click event on +1/-1 buttons, my code is not fired (inside theme.js). I wonder if Prestashop behavior stops my event binding. How could I track these events ?

Thanks

Share this post


Link to post
Share on other sites

How do you bind it? It works for me with

$(".js-increase-product-quantity").on("click", function(){alert("Test")})

grafik.thumb.png.7f0583a73f261c8b567110855d0c27dd.png

Share this post


Link to post
Share on other sites

@JBW I tried your code and it doesn't work.

@joseantgv I add my script by importing a custom js file in my theme.js before 

import './responsive';
import './checkout';
import './customer';
import './listing';
import './product';
import './cart';

 

Share this post


Link to post
Share on other sites
8 minutes ago, alizeeee said:

@JBW I tried your code and it doesn't work.

As you can see in my screenshot it works ;) You didnt answer how you bind your code....

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
×
×
  • Create New...

Important Information

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