How to reload/refresh the quote using js in Magento2

We were working on custom discount module where it allows customers to use the points assigned by the admin on checkout(kind of rewards point in magento). To give discount on the applied discount, we need to reload the quote after applying discount. Following code snippets helped us to do so.

require(
    [
    'Magento_Checkout/js/model/quote',
    'Magento_Checkout/js/model/cart/totals-processor/default'
   ],
    function(
        quote,
        totalsDefaultProvider
    ) {
        totalsDefaultProvider.estimateTotals(quote.shippingAddress());
    }
);
Reload the quote using js

Let us know if you are trying achieve the same. We will guide you for the same.

Leave a Reply

Your email address will not be published. Required fields are marked *