Zen Follower
- Join Date:
- Jul 2006
- Posts:
- 494
- Plugin Contributions:
- 0
My Checkout Without Account Mod
Hedera,
Here is the code, copied and pasted from my tpl_header file:
<table border="0" align="center" cellpadding="0" cellspacing="0" width="770" id="menlink">
<tr><td><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">' . zen_image($template->get_template_dir(HEADER_LOGO_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . HEADER_LOGO_IMAGE, HEADER_ALT_TEXT) . '</a>'; ?></td>
<td align="right" width="75%">
<?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'; ?>Home</a> |
<?php if (!$_SESSION['customer_id']) { ?>
<a href="<?php echo zen_href_link(FILENAME_LOGIN, '', 'SSL'); ?>">Login</a><?php } ?>
<?php if (!$_SESSION['customer_id']) { ?> | <a href="<?php echo zen_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'); ?>">Register</a> <?php } ?>
<?php if (!($_SESSION['COWOA'])) { ?><?php if ($_SESSION['customer_id']) { ?>
<a href="<?php echo zen_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>">My Account</a> | <?php } ?><?php } ?>
<?php if (!($_SESSION['COWOA'])) { ?><?php if ($_SESSION['customer_id']) { ?>
<a href="<?php echo zen_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>">Logout</a></li><?php } ?><?php } ?>
<?php if ($_SESSION['cart']->count_contents() != 0) { ?>
| <a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>">View Cart</a>
| <a href="<?php echo zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>">Checkout</a>
<?php }?>
<br><br>
<?php require(DIR_WS_MODULES . 'sideboxes/search_header.php'); ?>
</tr>
</table>
Take a look at it and see if any of it helps you. With this code, my site does the following:
When a customer comes to my site, the header only displays "Home", "Login", and "Register".
When they create an account or are logged in, "Login" and "Register" get replaced with "Logout" and "My Account".
When they are COWOA, "Login", "Logout", and "My Account" disappear.
