Quantity buttons not working
-
Hi team, I have a problem with the plugin. I have a code to modify the quantity buttons (+ and -). The code works fine in single product but does not work in modal window (quick view). This is the code I am using.
jQuery( function ( $ ) { $('.td-quantity-button').on('click', function () { var $this = $(this); var $input = $this.parent().find('input'); var $quantity = $input.val(); var $new_quantity = 0; if ($this.hasClass('plus')) { var $new_quantity = parseFloat($quantity) + 1; } else { if ($quantity > 0) { var $new_quantity = parseFloat($quantity) - 1; } } $input.val($new_quantity); }); });
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Quantity buttons not working’ is closed to new replies.