Hi,
I asked the other day whether there was any code available to change the functionality of the cart to only allow customers to buy in sets of 4. I am yet to find whether I can but have come up with the solution to add a vector image over the checkout button. This way I can hide it when there are multiples of 4 in the basket.
I am hoping to find whether anyone knows a way to get the current item total/price from the cart to use as ‘var a’ below.
Any help would be much appreciated, thank you!
var a =
var num = [4, 8, 12, 16, 24];
if ( a === num) { // true
$w(“#vectorImage72”).hide();
}
else {
$w(“#vectorImage72”).show();
}
})