close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Apply Login Register to Checkout Process - eCart

Thread began 5/31/2010 7:06 pm by dlovas275157 | Last modified 7/14/2010 12:39 pm by Jason Byrnes | 1588 views | 8 replies |

dlovas275157

Apply Login Register to Checkout Process - eCart

I am following the tutorial here:

Applying Register/Login to your Checkout Process
registration_on_checkout.php

Problem:
If a user is checking out, and is NOT logged in, and they filled their cart and clicked "checkout" - they get redirected to the "login page" with a message saying that they need to be logged in to checkout. This is fine, however, the login page redirects upon successful login to the "user profile page" not back to the "cart page" that they have filled.

From a usability standpoint I would like people checking out (who are forced to login) to get redirected back to the cart, and all others logging in to redirect to the user profile page as currently setup.

Is there a way upon login for the login page to redirect depending on which scenario happens:

a. cart > checkout (must be logged in) > login page > back to cart (upon successful login)
b. login > user profile page - (for non ecommerce related logins)

Thanks.

D

Sign in to reply to this post

Jason ByrnesWebAssist

change the login forms action to:

php:
<?php echo $_SERVER["PHP_SELF"]; ?><?php echo (isset($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] != "")?"?".$_SERVER["QUERY_STRING"]:""?>



this should be all that you need to do.

Sign in to reply to this post

MikeH

Hi
Is there a way to extend on that?

For example:
I have done that after following the tutorial but if a customer has not got a login I offer on the login page (only if they came from the checkout) the option to register. after registering they get returned to the login screen to login which is correct.

Problem is when they then login they go to profile update is there a way to say if the route taken started at the checkout they still go back to the checkout?

Thanks

Mike

Sign in to reply to this post

Jason ByrnesWebAssist

set the log In link on the checkout page as:

php:
<a href="login.php?accesscheck=<?php echo $_SERVER["PHP_SELF"]; ?>">Log In</a>
Sign in to reply to this post

MikeH

Hi Jason
Thanks for the reply. I am not sure I explained it properly going by your reply.

1. Customer goes to checkout but gets autoredirected to login page if not logged in.
2. On login page if user logs in they go to the checkout page (not user profile)
3. If they havent got a login using the SecurityAssist behaviour show if not logged in they get a link to register.
4. After they register they get auto-redirected to login page - its here the problem they get directed to the the user profile is there a way to hold the ?checkout=1 to redirect them to the checkout if thats where they originally started?

I hope thats clearer.

Thanks James

Mike

Sign in to reply to this post

Jason ByrnesWebAssist

no, there isn't a way to flag the checkout page in this scenario.

Sign in to reply to this post

MikeH

No Problem thanks for the reply Jason.

Sign in to reply to this post

dlovas275157

Jason,

Your link works great. I do not require my shoppers to login, but when they get to the checkout page, there is a message at the top that says "Login Now for faster checkout". If they click the login link, it will take them to the login form. Once logged in, they are redirected back to the checkout page "when using the code Jason wrote above.

I changed link from :

<a href="https://www.mydomain.com/login/index.php">Login</a>

to:

<a href="https://www.mydomain.com/login/index.php?accesscheck=<?php echo $_SERVER["PHP_SELF"]; ?>">Login</a>

Thanks Jason.

D

Sign in to reply to this post

Jason ByrnesWebAssist

excellent, glad to hear it working out.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...