john.sheppard Posted October 12, 2009 Share Posted October 12, 2009 Hello there, I was wondering if anyone knew how to make my template empty the cart on placing a new order? I ask because I am trying to make my order form wizard based and if the user clicks back/forward etc, it is adding orders twice? Thank you John 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted October 12, 2009 Share Posted October 12, 2009 look at the code at the very bottom of products.tpl in the orderforms/default folder the answer is there 0 Quote Link to comment Share on other sites More sharing options...
HerrZ Posted October 12, 2009 Share Posted October 12, 2009 there are two possible GET values for a cart.php?a=startover cart.php?a=empty 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted October 12, 2009 Share Posted October 12, 2009 I just double checked and the part that I was refering to is no longer there. This is what it was anyway {php}if (isset($_SESSION["cart"])) { unset($_SESSION["cart"]); } {/php} 0 Quote Link to comment Share on other sites More sharing options...
john.sheppard Posted October 13, 2009 Author Share Posted October 13, 2009 I just double checked and the part that I was refering to is no longer there.This is what it was anyway Brilliant! Thank you that worked. Thank you so much! That's one ordeal out of the way I was worried that I was going to have to make it somehow do a roundtrip post to the cart... Thank you also herzz, I think that solution would work too but I like the PHP way. Thanks again! John 0 Quote Link to comment 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.