As when I change product qty in shopping cart, total and subtotal value must change without clicking on Update Shoping item button
- On clicking Update Shopping cart - still it is not working ?Aditya Shah– Aditya Shah2018-10-10 12:17:59 +00:00Commented Oct 10, 2018 at 12:17
- Its working as i need to As when i change product qty in shopping cart total and subtotal value must change without clicking update Aditya Shahtrilok kumar– trilok kumar2018-10-10 12:38:47 +00:00Commented Oct 10, 2018 at 12:38
- 1ohh you need an AJAX callAditya Shah– Aditya Shah2018-10-10 12:39:17 +00:00Commented Oct 10, 2018 at 12:39
- Yeah how can i get it..trilok kumar– trilok kumar2018-10-10 12:39:49 +00:00Commented Oct 10, 2018 at 12:39
- There are multiple solution out there.. which are already answered :) so i can provide the linksAditya Shah– Aditya Shah2018-10-10 12:43:06 +00:00Commented Oct 10, 2018 at 12:43
| Show 2 more comments
2 Answers
Magento 2 - Reload totals cart after ajax change quantity
- https://stackoverflow.com/questions/40002976/magento-2-reload-totals-cart-after-ajax-change-quantity?rq=1
- Shopping cart page, update quantity by ajax
- How to update cart qty using ajax Magento 2
- 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).
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()); } );