Automatically update the Shopify cart when the quantity changes
You want to auto update the cart when quantity is changed. It’s very simple.
- From your Shopify admin, to to Online Store > Theme.
- Find the theme you want to edit and then click Action > Edit code.
- In the Templates section, click cart.liquid to open the file in the online code editor.
- Add the below code at the end of file.1234567<script>$(document).ready(function(){$("input[name='updates[]']").on('input', function() {$( "input[name='update']" ).trigger( "click" );});});</script>
- Save
Attention: Load the jQuery library before this code.
Happy coding!
Thanks for this information, but one additional piece of information will be appreciated…..how do you load the jQuery library???
I’m having issue with this. Any suggestions? Cheers.