1

After editing a product, i get this error,

We can't find the quote item.

I cannot get new quote_id after editing a product.

Has anyone got any idea about this?

10
  • did u find any solution to this?
    – Zinat
    Apr 24, 2018 at 10:28
  • @Zinat No. I can't. May 31, 2018 at 13:13
  • I found the reason, do you know it too?
    – Zinat
    May 31, 2018 at 13:29
  • No. I do not know it. May 31, 2018 at 13:30
  • so the reason is "\Magento\Checkout\Model\Layout\DepersonalizePlugin". It checks if page requires 'de-personalization'( blocks are cacheable and cache is enabled) it clears the checkoutSessions' storage.
    – Zinat
    May 31, 2018 at 13:56

1 Answer 1

0

Please create/update this file.

Vendor/Module/view/frontend/requirejs-config.js

Code:

var config = {
    config: {
        mixins: {
            'Magento_Msrp/js/msrp': {
                'Vendor_Module/js/msrp': true
            }
        }
    }
};

Create a new file in Vendor/Module/view/frontend/web/js/msrp.js

Code:

define(['jquery'], function ($) {
    return function (originalWidget) {
        $.widget('mage.addToCart', $.mage.sidebar,
        {
            _addToCartSubmit: function (event) {
                this.element.trigger('addToCart', this.element);

                if (this.element.data('stop-processing')) {
                    return false;
                }

                if (this.options.addToCartButton) {
                    $(this.options.addToCartButton).click();

                    return false;
                }

                if (this.options.addToCartUrl) {
                    $('.mage-dropdown-dialog > .ui-dialog-content').dropdownDialog('close');
                }
                event.preventDefault();
                $(this.options.cartForm).submit();
            }
        }
        );
        return $.mage.addToCart;
    };
});

Execute the below command.

php bin/magento setup:upgrade

php bin/magento setup:static-content:deploy -f

Now check it and it is working properly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.