note, you can add renderPaymentSummary(); in the document.querySelectorAll('.js-save-link') to make the payment cart interactive with saving new quantity of items:
We can use calculateCartQuantity from cart.js. At first we import the function, then change the code into this:<div>Items (${calculateCartQuantity()}):</div>
note, you can add renderPaymentSummary(); in the document.querySelectorAll('.js-save-link') to make the payment cart interactive with saving new quantity of items:
document.querySelectorAll('.js-save-link') .forEach((link) => { link.addEventListener('click', () => { const productId = link.dataset.productId;
});