Hey, based on the build coupon elements, the "remove coupon" function should getAttribute of 'data-coupon-pos' not just 'data-pos'. on Line #2504 ;)
* button click event signaling that a coupon should be removed from the shopping cart.
* The button should have a data-coupon-pos attribute providing the coupon position in the cart coupons array.
* @param event
*/
function removeCoupon(event) {
var button = event.target;
var position = parseInt(button.getAttribute('data-coupon-pos'));
if (uc.cart && uc.cart.coupons && uc.cart.coupons.length > position) {
uc.cart.coupons.splice(position, 1);
uc.saveCart();
}
}
Hey, based on the build coupon elements, the "remove coupon" function should getAttribute of 'data-coupon-pos' not just 'data-pos'. on Line #2504 ;)