Zen Cart v1.3.9e
The site has never been upgraded
The site is not live yet - nearly there :)
I have trawled the fora, and have not found the answer, so here goes.
I have my online shop set up in a subfolder named "products" of my domain - e.g. www.mydomain.com/products. I have my own banner and top menu that is used consistently across the entire site, and the zen cart menu and content resides below the main banner and menu system. All is good.
What I have done is incorporate the "Log In / Out" link into my main top menu. This I have only been partly successful with.
The issue is the "Log in / Out" will only appear in my top menu when users are browsing in the "products" area. If the user navigates to the "about us" or the "home" page (or anywhere outside of products), the function that determines whether to display "log in" or "log out" does not work, and a blank space is displayed instead.
The code I have inserted into my top menu reads thus:
[FONT="Courier New"]===
<div class="menu_bar_right_button">
<?php if ($_SESSION['customer_id']) { ?>
<li><a href="<?php echo zen_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGOFF; ?></a></li>
<?php
} else {
if (STORE_STATUS == '0') {
?>
<li><a href="<?php echo zen_href_link(FILENAME_LOGIN, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGIN; ?></a></li>
<?php } } ?>
</div>
===[/FONT]
I don't believe the issue is to do with the zen_href_link, FILENAME_LOGIN or FILENAME_LOGOFF bits, as I have replaced these entire sections with HTML without success. The issue appears to be with $_SESSION customer_id. Quite how to resolve this, I am not sure.
Any assistance regarding this matter would be greatly received.


Reply With Quote
