The code below is for a add to cart page, now the code works fine when one item is added to the cart, it changes the input value based on the "if"condition. When a second product gets added though since it is targeting only a class ".cartQty" it not only changes the second input value but it also changes the first one. I need to figure out how to use "this" so each product input is independent.
Any help would be great!
Here is my Code:
Would something like this work?
You'll need to use some sort of .each() loop or even better create your own function that fires each time you click add to cart.
Thanks!