View Full Version : "Startover"
solokron
02-25-10, 11:19 PM
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?
TonsOfStores
02-26-10, 03:08 AM
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.
.
solokron
02-26-10, 03:25 AM
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.
.
TonsOfStores
02-26-10, 12:39 PM
The onclick would be one event - call the function.
The function contains two processes:
1) Unset the cart
2) Redirect to your page
TonsOfStores
02-26-10, 02:43 PM
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}
:)
.
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!
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.