gongpex Posted May 19, 2015 Share Posted May 19, 2015 Hello everyone, Long time no see. I hope all of you okay. Often I met shopping cart always use 'recalculate' button to update price from product. But I think I need to improve it, T : So, Can you tell me tutorial about auto calculate shopping cart using JQuery and ajax ? please help me Thanks Link to comment Share on other sites More sharing options...
justsomeguy Posted May 19, 2015 Share Posted May 19, 2015 When you add a product or update the quantity then you should have code that updates the total price. Or, when you display the total price then you should go through the list of items and calculate the total then. Link to comment Share on other sites More sharing options...
gongpex Posted May 20, 2015 Author Share Posted May 20, 2015 Could you give a piece of that jquery code please? I'm sure it will be help me Thanks Link to comment Share on other sites More sharing options...
dsonesuk Posted May 20, 2015 Share Posted May 20, 2015 First create function that will total all required inputs, by maybe using a class as selector. After you have that working you then use on keyup event on those inputs to run that function. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now