How I can auto update cart page after putting quantity

Solved
Highlighted
New Member
3 0 0

I would like to reload page once user change the quantity at cart page. 

0 Likes
Highlighted
Shopify Partner
165 34 61
$('.qty-input').on('change', function(){
                var prev = $(this).data('val');
                var current = $(this).val();
                  setTimeout(function() {
                      if (prev != current){
                        $( "#cart_update" ).trigger( "click" );
                      }
                  }, 500);
            });
Problem Solved? ✔️Accept the solution so you can help others.
* Email: fayyazraza@gmail.com * Skype: fayyaz_raza
Highlighted
New Member
3 0 0

Thank you Fayyaz for taking time to answer my question. Which file I should add this code. 

0 Likes
Highlighted
Shopify Partner
165 34 61

This is an accepted solution.

Please go to sections and then go to cart-template.liquid and add the this code in very bottom. Wrap with Script tags

Problem Solved? ✔️Accept the solution so you can help others.
* Email: fayyazraza@gmail.com * Skype: fayyaz_raza
Highlighted
Excursionist
23 0 3

I can't get this to work buddy. Any suggestions for me to try? Cheers

0 Likes