2

Firstly I have added 1 product to my cart. When I am clicking on mini-cart then it shows like following:

enter image description here

Now when I am updating QTY = 4 then clicks on Update button then 1 ajax call triggers and in that ajax call item_qty parameters not updating like in below image :

enter image description here

Update quantity button and input fields come from below file: vendor/magento/module-checkout/view/frontend/web/template/minicart/item/default.html

             <div class="details-qty qty">
                <label class="label" data-bind="i18n: 'Qty', attr: {
                       for: 'cart-item-'+item_id+'-qty'}"></label>
                <input data-bind="attr: {
                       id: 'cart-item-'+item_id+'-qty',
                       'data-cart-item': item_id,
                       'data-item-qty': qty,
                       'data-cart-item-id': product_sku
                       }, value: qty"
                       type="number"
                       size="4"
                       class="item-qty cart-item-qty"
                       maxlength="12"/>
                <button data-bind="attr: {
                       id: 'update-cart-item-'+item_id,
                       'data-cart-item': item_id,
                       title: $t('Update')
                       }"
                        class="update-cart-item"
                        style="display: none">
                    <span data-bind="i18n: 'Update'"></span>
                </button>
            </div>

Related js file is located at: vendor/magento/module-checkout/view/frontend/web/js/view/minicart.js

What should I do to update quantity from their?

  • Hi @Nitesh i have same issue is there any update? – Akshay Thakkar Dec 10 '18 at 13:00
  • @AkshayThakkar I am unable to remember now but I think this was a bug of magento, so please check same type of issue on github, may be you can find solution or patch for it. – Nitesh Dec 11 '18 at 9:24
  • Hi @Nitesh thanks for update and i will check in core issue – Akshay Thakkar Dec 12 '18 at 8:08
  • @AkshayThakkar ever any resolution to this? Facing the same issue myself now. – ne0nlight Mar 26 at 16:26
  • Hi @ne0nlight please check in your theme default.xml file if you move minicart issue maybe face because of these. – Akshay Thakkar Jun 14 at 13:55

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.