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

Adding a new user and being redirected back to the shopping cart

Thread began 7/12/2010 10:54 pm by mora398588 | Last modified 7/20/2010 4:58 pm by Eric Mittman | 1061 views | 7 replies |

mora398588

Adding a new user and being redirected back to the shopping cart

I received a comment from a public user shopping our site stating that he was not redirected to the shopping cart after opening a new user account. He explained that he was extremely frustrated that, upon opening a new user account, he was forced to repeat the process of going back to our online store and begin to add the items he previously added to the cart earlier.

In an effort to make the shopping process more user-friendly, is it possible to use webassist to redirect a user back to the checkout page, after creating a new user account? Ideally, I would like to ensure that an online shopper of our site does not have to repeat the process of adding their items to the shopping cart should they need to create a new user account (assuming they have not done so, yet).

I have experienced similar websites that do require login information to finalize the shopping experience and, should the user not have an account, they are prompted to create one and, when they create their user account, they are redirected back to the checkout page.

Any assistance you may have to offer would be invaluable!!!

Sign in to reply to this post

Eric Mittman

I think this is a duplicate post, or very close to it. Here is a link to the previous thread that I just responded to about this topic.

showthread.php?t=14558

Sign in to reply to this post

mora398588

No...this is not a duplicate post

Hello, Eric.

Thank you for your assistance again.

This post is pertaining to an issue that I need some assistance in setting up. In reviewing my original post on this matter (above), how can I have a user, not having created a user account, redirected back to the checkout page once they have created a new user account. Of course, this is assuming that the user is in the processing making a purchase on our website and is then being redirected to login.

Currently, when the user reaches the checkout page, they are redirected to the login page to sign in. If the individual had not created a user account earlier, they will be prompted to create one; however, once they have created their new user account, the system currently does not redirect them back to where they left off during their shopping experience. They have to go back and repeat adding the item to the cart and checking out.

I am looking to better our online shopping experience. Any assistance you may have to offer would be greatly appreciated.

Sign in to reply to this post

Eric Mittman

One way that you could do this is to set a session variable on the checkout page before you redirect the user to the register/login page. On the registration page you can check for this session variable and it's value. If it is set to the value from the checkout page you can redirect back to checkout page, and if not send them to the default go to page.

You can set a session based weather or not the user is logged in like this:

php:
if(!session_id()) session_start();

if(  (!(isset($_SESSION['userID']))) || ($_SESSION['userID'] == "")){
$_SESSION['checkout'] = 1;
}



On the registration page where the go to is specified you can set it like this:

php:
$goto = (isset($_SESSION['checkout']) && ($_SESSION['checkout'] == 1))?checkout.php:default_return_page.php;
Sign in to reply to this post

mora398588

Eric,

Thank you for your reply.

I added the session variable to the checkout page; however, I am uncertain were to insert the $goto variable in the registration page. The only variable I found was found in the UE code...see example below...

<?php
if (!isset($_SESSION))session_start();
if ((isset($_POST["Register"]))) {
//WA Universal Email object="mail"
set_time_limit(0);
$EmailRef = "WAUE_users_RegistrationVisitors_1";
$BurstSize = 200;
$BurstTime = 1;
$WaitTime = 1;
$GoToPage = "users_ThankYou.php";
$RecipArray = array();
$StartBurst = time();
$LoopCount = 0;
$TotalEmails = 0;
$RecipIndex = 0;
// build up recipients array

Any recommendations where to insert the "goto" variable?

Sign in to reply to this post

Eric Mittman

If you are setting the session variable to 1 on the checkout page then you can use this code for the go to page:

php:
if(!session_id()) session_start();

$GoToPage = (isset($_SESSION['checkout']) && $_SESSION['checkout'] ==1)?"checkout.php":"users_ThankYou.php";
Sign in to reply to this post

mora398588

Thank you!

Eric,

The code worked well. Again, thank you for your help.

Sign in to reply to this post

Eric Mittman

Nice, glad to hear that the code worked out for you. Let us know if you have any other questions.

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...