How to change the quantity of cart items in the checkout? I have a select that should display the quantity of items in the cart. When changing the value, change the quantity of goods in the basket and recalculate the total amount of the order.

File: Magento_Checkout/web/template/summary/item/details.html

   data-bind="options: qtyOptions, value: selectedQty, event: {change: updateQty($parent)}"
   class="cart-item__select js-cart-qty"


updateQty: function(item) {
        var data = {
            item_id: item.item_id,
            item_qty: this.selectedQty()

            url: url.build('checkout/cart/updateItemQty'),
            data: data,
            type: 'post',
            dataType: 'json',
            context: this,
        }).done(function (response) {
                alert('hey! you updated successfully, checkout cart.')
            .fail(function (error) {

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.