I have just one product on website and this product has got a lot of variants. All variants are made by forms, checkboxs.. etc.
But when I add unique ID to each div of these forms, Add to Cart button stops working with no error message.
I have tried to Add unique ID with javascript:
Code: Select all
$('#product div:not(:last)').attr('id', function(i) {
return 'form'+(i+1);
});
Code: Select all
<div id="form<?php echo $i++; ?>" class="form-group<?php echo ($option['required'] ? ' required' : ''); ?>">