diff --git a/assets/js/theme/cart.js b/assets/js/theme/cart.js index 113d5172..274075ef 100644 --- a/assets/js/theme/cart.js +++ b/assets/js/theme/cart.js @@ -266,15 +266,16 @@ export default class Cart extends PageManager { let preVal // cart update - q$('.js-cart-update', this.$cartContent)?.addEventListener('click', (event) => { - const $target = event.currentTarget + q$$('.js-cart-update', this.$cartContent)?.forEach(($btn) => { + $btn.addEventListener('click', (event) => { + const $target = event.currentTarget - event.preventDefault() + event.preventDefault() - // update cart quantity - cartUpdate($target) + // update cart quantity + cartUpdate($target) + }) }) - // cart qty manually updates q$$('.js-cart-item-qty-input', this.$cartContent).forEach(($input) => { $input.addEventListener('focus', function onQtyFocus() { diff --git a/assets/scss/components/_cart.scss b/assets/scss/components/_cart.scss index c70d2fcb..d6ea7b87 100644 --- a/assets/scss/components/_cart.scss +++ b/assets/scss/components/_cart.scss @@ -133,6 +133,9 @@ background: none; outline: none; cursor: pointer; + display: flex; + justify-content: center; + align-items: center; } .c-cart__checkout-button-wrapper {