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

Guest Account

Thread began 3/08/2011 4:27 pm by mora398588 | Last modified 3/17/2011 1:58 pm by Jason Byrnes | 4366 views | 11 replies |

mora398588

Guest Account

I currently use eCart for our company's website and securityassist for providing login capability.

However, I would like to know if there is any way to setup a "shop as a guest" for individuals looking to shop our site, but necessarily create an account to do so. I attempted to setup one up, but unsuccessfully. I was unable to pass the session over successfully; that is, the order itself.

Has webassist dealth with this sort of thing before? I know other shopping cart software offer the guest option. Are you able to provide any assistance or pointers in going by setting up this guest account?

Thank you.

Sign in to reply to this post

Jason ByrnesWebAssist

security assist login is based on a session variable, you will need to know the name of the session being used by security assist, on the login page, double click the authenticate user server behavior, go to the third page and make not of the name of the user ID session variable.


you could add a link on the cart page that will be used to trigger a set session variable to fake login:
<a href="cart.php?guest=1>Shop as guest</a>

on the bindings panel, click the plus button and select URL Variable, set the name to "guest"


the on the cart page, go to the server behaviors panel, click the plus button and select eCart -> General -> Set Session Variable

click the lightning bolt next to trigger and select the guest query string variable.

set the name to be the same session name set by the authenticate user behavior

set the value to 0

Sign in to reply to this post

mora398588

Jason, thank you for your assistance. Can your solution be applied to the users_LogIn page?

Ideally, I would like to add the "shop as guest" link to the Login page instead of the cart page. That way, any current registered users can log in with their online credentials. You can see what I have done to my login page so far (see attachment). Currently, the checkout page redirects shoppers to the log in page.

I should note that I did add a session value to the cart page as you had requested. The session value was set to the "guest" URL variable. My login session variable is "UserID"

Attached Files
users_LogIn.zip
Sign in to reply to this post

Jason ByrnesWebAssist

yes, that should work, just make sure on the cart page that the code to set the session variable:
<?php
if (!session_id()) session_start();
if((isset($_GET['guest']) && $_GET['guest'] != "")) {
$_SESSION["UserID"] = "0";
}
?>

is before the page access restriction code.

Sign in to reply to this post

mora398588

Jason, thank you again for your reply. I attempted to follow your directions; however, my cart page does not have access restriction codes. I attempted to insert the session variable in likely places I thought may work - but to no success. When I did insert the guest session variable, a "404 - Not Found" warning appeared on the web. I have provided a copy of my cart page for your review.

You may wish to know that my checkout.php page has access restriction codes which redirects users to the login page. In my attempt to trouble shoot, I inserted the guest session variable on the checkout page just above the access restriction codes. This did not work either. I have also provided a copy of my checkout page for your convenience.

Thank you in advance for your continued assistance!

Attached Files
cart.zip
checkout.zip
Sign in to reply to this post

Jason ByrnesWebAssist

please post a link to your site so i can see this issue occur to have a better idea of when in the process it is failing.

Sign in to reply to this post

mora398588

Jason, here is the link

www.hrconsortium.net

Note - the cart page does not have the session variable inserted. As I stated in my last thread, I was uncertain where to insert it since the cart page does not have any access restriction code.

However, you will be able to see the 404 error.

Also, to add an item to our shopping cart, go to hrproducts.php

Thank you for your time and effort.

Sign in to reply to this post

Jason ByrnesWebAssist

i dont see the 404 error occuring.


the guest form element is posting to the cart page, so this code needs to be on the cart.php page.


php:
<?php

if (!session_id()) session_start();
if((isset(
$_GET['guest']) && $_GET['guest'] != "")) {
$_SESSION["UserID"] = "0";
}
?>
Sign in to reply to this post

mora398588

Thank you for your quick reply, Jason.

In response, I also noticed that the guest form element was posting to the cart page as well. Did you click the "checkout" button on the cart page after you used the guest form element (link)?

If not, this is where you will notice the 404 error when the cart page attempts to redirect to the checkout page. Its as if the checkout page does not recognize the guest session variable and returns the 404 error.

Please note that when I initially inserted the guest session variable to the cart page (even though there appeared to be no access restriction code) and uploaded the file to the server, the 404 error code was still popping up. This is what led me to reply back earlier.

So that you can see what I am talking about, let me insert the guest session variable as you recommended (to the cart page) and I will reply back with a notice to try guest login.

*** Since my cart page has no access restriction code, do you recommend a location where to insert the guest session variable?

Sign in to reply to this post

Jason ByrnesWebAssist

that code should go at line 1 of the cart page.

also on the cart page page, change:

php:
<form  action="<?php echo ($_SERVER["PHP_SELF"].(isset($_SERVER["QUERY_STRING"])?"?".htmlentities($_SERVER["QUERY_STRING"]):""));?>" method="post" >




to:

php:
<form  action="<?php echo $_SERVER["PHP_SELF"]; ?>" method="post" >
Sign in to reply to this post
loading

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