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.

How useful was this post?

Click on a star to rate it!

Average rating / 5. Vote count:

No votes so far! Be the first to rate this post.

As you found this post useful...

Follow us on social media!

Leave a Reply

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