Question

As when I change product qty in shopping cart, total and subtotal value must change without clicking on Update Shoping item button

Was it helpful?

Solution

Magento 2 - Reload totals cart after ajax change quantity

  1. https://stackoverflow.com/questions/40002976/magento-2-reload-totals-cart-after-ajax-change-quantity?rq=1
  2. Shopping cart page, update quantity by ajax
  3. How to update cart qty using ajax Magento 2
  4. https://inchoo.net/magento-2/improve-usability-magento-2-add-cart-process/

Once the ajax process is complete, we can trigger scroll event to scroll on top of the page and as soon as mini-cart get’s updated we can then trigger mini-cart UI dialog to open and show us the complete experience and what mini-cart is actually offering to us (either to go to the cart, go to the checkout or continue shopping).

OTHER TIPS

Just run the following js code -

require(
[
   'Magento_Checkout/js/model/quote',
   'Magento_Checkout/js/model/cart/totals-processor/default'
],
function(
   quote,
   totalsDefaultProvider
) {
     totalsDefaultProvider.estimateTotals(quote.shippingAddress());
  }
);
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top