Hello,
Im trying to figure out how to change the order of the links in the header, plus add a link that shows the number of items and amount a customer has ordered so far.
I know that i have to change the file tpl_header. My problem is that i don't have the deepest understanding of PHP.
-Right now when the customer IS logged and has something in their cart the header shows the following links:
Checkout/Shopping Cart/My Account/Logout/1 Item - $3.99
and when the cart is empty...
My Account/Logout/0 Items - $0.00
-When they are NOT logged in and they have something in the cart it shows
Checkout/Shopping Cart/Log In/1 Item - $3.99
and when the cart is empty...
Log In/0 Items - $0.00
Ultimately I want the order to be...
Log In(..or Logout)/My Account (when logged in)/2 Items - $3.99( as a link to the shopping cart)/Checkout
Currently I have the following code can someone please help me!
[SCR]
<ul class="back">
<!-- <li><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'; ?><?php echo HEADER_TITLE_CATALOG; ?></a></li> -->
<li>
<?php if ($_SESSION['cart']->count_contents() > 1) {
$products = $_SESSION['cart']->get_products();
echo '' . $_SESSION['cart']->count_contents().'<a href="/cart/index.php?main_page=shopping_cart">Items - ';
echo $currencies->format($_SESSION['cart']->show_total());
}
if ($_SESSION['cart']->count_contents() == 1) {
$products = $_SESSION['cart']->get_products();
echo '' . $_SESSION['cart']->count_contents().'<a href="/cart/index.php?main_page=shopping_cart">Item - ';
echo $currencies->format($_SESSION['cart']->show_total());
}
if ($_SESSION['cart']->count_contents() == 0) {
$products = $_SESSION['cart']->get_products();
echo '<a href="/cart/index.php?main_page=shopping_cart"> Items $0.00';
}
?>
</li>
<?php if ($_SESSION['customer_id']) { ?>
<li><a href="<?php echo zen_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGOFF; ?></a></li>
<li><a href="<?php echo zen_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></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 } } ?>
<?php if ($_SESSION['cart']->count_contents() != 0) { ?>
<li><a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a></li>
<li><a href="<?php echo zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>"><?php echo HEADER_TITLE_CHECKOUT; ?></a></li>
<?php }?>
</ul>
[/SCR]



