1

After Adding a product into the cart I go to checkout cart page and fill the Estimate Shipping and Tax data it is set fine. after that I refresh the page and again check Estimate Shipping and Tax data it is same as which is I set.

Now I Change the Qty of that product in the cart and hit the update button after page load successfully again, I check Estimate Shipping and Tax from data which is reset.

So how to prevent rest Estimate Shipping and Tax from data on Qty update.

1 Answer 1

0

please add below code with which is working qty update

define([
'jquery',
'Magento_Checkout/js/action/get-totals',
'Magento_Customer/js/customer-data',
'Magento_Checkout/js/model/quote',
'Magento_Checkout/js/model/shipping-rate-processor/new-address',
'Magento_Checkout/js/model/shipping-rate-processor/customer-address',
'Magento_Checkout/js/model/shipping-rate-registry'], function ($, getTotalsAction, customerData, quote, defaultProcessor, customerAddressProcessor, rateRegistry) {
                 /* Minicart reloading */
                customerData.reload(sections, true);

                var processors = [];

                rateRegistry.set(quote.shippingAddress().getCacheKey(), null);
                
                processors.default =  defaultProcessor;
                processors['customer-address'] = customerAddressProcessor;

                var type = quote.shippingAddress().getType();

                if (processors[type]) {
                    processors[type].getRates(quote.shippingAddress());
                } else {
                    processors.default.getRates(quote.shippingAddress());
                }
});

try to use above code, its working for me...

Your Answer

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

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