I have a website, however the +/- buttons don't seem to work. I've not changed any of the code from the theme (Zorka), but I can't figure out how to fix the issue. Can someone please help?
Here's the website page: Webiste
The product.tpi looks like this:
<div class="quantity-form form-group">
<?php if (!$kuler->getSkinOption('show_number_quantity')) { ?>
<button type="button" id="qty-dec" class="quantity__button">-</button>
<input type="text" name="quantity" size="2" value="<?php echo $minimum; ?>" />
<button type="button" id="qty-inc" class="quantity__button">+</button>
<?php } else { ?>
<button type="button" id="qty-dec" class="quantity__button">-</button>
<input type="text" name="quantity" size="2" class="dynamic-number" value="<?php echo $minimum; ?>" data-min="<?php echo $minimum; ?>"/>
<button type="button" id="qty-inc" class="quantity__button">+</button>
<?php } ?>
<input type="hidden" name="product_id" size="2" value="<?php echo $product_id; ?>" />
</div>
and the product.js looks like this:
// Quantity
$('.dynamic-number').each(function () {
var $input = $(this),
$dec = $($input.data('dec')),
$inc = $($input.data('inc')),
min = $input.data('min');
$dec.on('click', function () {
var val = parseInt($input.val());
if (val > min) {
$input.val(val - 1);
}
});
$inc.on('click', function () {
$input.val(parseInt($input.val()) + 1);
});
If you need more information, please let me know!