Jump to content

"Startover"


solokron

Recommended Posts

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?

Link to comment
Share on other sites

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.

 

 

.

Link to comment
Share on other sites

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.

 

 

.

Link to comment
Share on other sites

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}

 

:)

 

.

Link to comment
Share on other sites

  • 1 month later...

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!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated