solokron Posted February 26, 2010 Share Posted February 26, 2010 I am liking the SinglePage orderform template. My problem with it is the "Startover" button at the bottom. When clicked it takes the potential client back to cart.php instead of the same orderform which has them staring at a very long list of products and services many of which we no longer offer to new clients but have them listed for billing purposes with existing clients. This results in a lot of confusion. I tried changing the link to cart.php?a=empty but of course that just empties out the cart and the visitor is stuck staring at their credentials. Is there anyway to clear out the cart and going back to the last product order screen? 0 Quote Link to comment Share on other sites More sharing options...
GORF Posted February 26, 2010 Share Posted February 26, 2010 Create a Javascript function and change the onclick to that. Two things in the function: Unset the cart Redirect to your page At the end of products.tpl, I see this: {php} if (isset($_SESSION["cart"])) { unset($_SESSION["cart"]); } {/php} Not sure if that is all that is needed to empty the cart. . 0 Quote Link to comment Share on other sites More sharing options...
solokron Posted February 26, 2010 Author Share Posted February 26, 2010 I understand the two event javascript click, not sure how I would do it with this though. Create a Javascript function and change the onclick to that. Two things in the function: Unset the cart Redirect to your page At the end of products.tpl, I see this: {php} if (isset($_SESSION["cart"])) { unset($_SESSION["cart"]); } {/php} Not sure if that is all that is needed to empty the cart. . 0 Quote Link to comment Share on other sites More sharing options...
GORF Posted February 26, 2010 Share Posted February 26, 2010 The onclick would be one event - call the function. The function contains two processes: 1) Unset the cart 2) Redirect to your page 0 Quote Link to comment Share on other sites More sharing options...
GORF Posted February 26, 2010 Share Posted February 26, 2010 Strike all of the above! It's much simpler! (I don't like the standard product listing page either when I have already made custom pages.) For the singlepage order form: Open /templates/orderforms/singlepage/products.tpl Replace everything in that template with: {php} header("Location: ./"); {/php} This will redirect the user to your home page AFTER it empties the cart. If you want to redirect to a custom page (say, product_selection.php), then change to: {php} header("Location: ./product_selection.php"); {/php} . 0 Quote Link to comment Share on other sites More sharing options...
blymp Posted April 22, 2010 Share Posted April 22, 2010 Did you guys figured out this issue? I'm having the a similar problem! I also use singlepage, and whenever the client chooses a domain and decide to go back and re-think his domain choice, either clicking in "startover" or reloading the page, the search history still remains on the cart/singlepage. I would like to have it cleaned doing a startover or reloading the page. But due to a stored cookie for that session I can't and I don't know how to do. Anybody knows? Thanks! 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.