eskimo42 Posted May 31, 2007 Share Posted May 31, 2007 I need some help with a problem I am facing.... I have a $Shipping array which is made up of method, and price. Using smarty {Section} I fill a drop down box with a $Shipping array. This all exists on my order systems confirmation page, so the system has already calculated (Cost Of Goods, Tax). The problem I am facing is that the variable $Total is dependent on which Shipping Method the user chooses from the dropdown. I need a way using smarty to dynamically update the $Total and {Total} so that the user can see what his new total comes to when he changes shipping options. Also based on this array when the user confirms his order at that page and enters his credit card I need to php to see which option was selected and make sure the $Total variable is updated so the amount can be sent to the merchant. I was thinking the ideal way to do this was by using AJAX so that each time the user changes the shipping method the $Total Variable is updated. This way the page would be updated dynamically and when the user clicks Finalize Order the $Total is already correct. This way i dont need to get the results from the dropdown box and then add it to $Total on the finalize.php script? I hope I didnt confuse anyone.. If anyone can provide assistance in how I would go about developing this in PHP and AJAX, or a better way of going about this. Thanks for your time, -Evan Quote Link to comment https://forums.phpfreaks.com/topic/53773-help-with-a-solution/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.