
Originally Posted by
novastar
In my header there's a welcome message that says the customers name when logged in but shows input boxes if not logged in. When ever I use COWOA to checkout it shows the customers name in the header as if they're logged in. They can even go to the "My Account" page and it continues to show even after the sale is finished. How can I fix this?
I'm not sure what kind of template you are using because I do not have any kind of welcome message or anything, but as an example for you or anyone else.....
I have mine set to not show the "My Account" link or the "Log Out" link while a customer is using COWOA. For my particular template, in includes/templates/common/tpl_header.php, I have the following:
This is for the "My Account" link:
Code:
<?php if (!($_SESSION['COWOA'])) { ?><?php if ($_SESSION['customer_id']) { ?><a href="<?php echo zen_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>"><?php echo zen_customer_store_account(); ?></a><?php } ?><?php } ?>
This is for the "Log Out" link:
Code:
<?php if (!($_SESSION['COWOA'])) { ?><?php if ($_SESSION['customer_id']) { ?><a href="<?php echo zen_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>">Logout</a></li><?php } ?><?php } ?>
I do have a "Click here to end your session" link on my order confirmation page, which is really the log off link. That way they technically log out without really knowing there was an account created.
Also, just for the hell of it, I have the "Create Account" (or "Register") link disappear when a registered customer is logged in because I feel it is not necessary. Mine looks like:
Code:
<?php if (!$_SESSION['customer_id']) { ?><a href="<?php echo zen_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'); ?>">Register</a><?php } ?>
And it's also set so when a registered customer is logged in, it shows their name in "My Account"... example: "Sarah's Account".
Please back up your file before you make any of my changes. I hope they work for you, but some templates are weird and sometimes things go all screwy for some people.
If none of that pertained to your question, maybe the code I included can be used in your case, but in a different area, etc.????
I could maybe be a little bit more helpful if you have a link to the site if it happens to be online at the moment.
Bookmarks