Results 1 to 2 of 2

Hybrid View

  1. #1
    Join Date
    Jun 2008
    Location
    Ontario, Canada
    Posts
    57
    Plugin Contributions
    0

    Default Changing the links in the header

    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]

  2. #2
    Join Date
    Jun 2008
    Location
    Ontario, Canada
    Posts
    57
    Plugin Contributions
    0

    Default Re: Changing the links in the header

    oops...here is the code...sorry i'm not sure how to place it in the scroll box

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

 

 

Similar Threads

  1. How can I change the font color of the links in the lower part fo the header
    By Marlake in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 29 Jul 2011, 06:00 PM
  2. Changing the names of the links in INFORMATION sidebox
    By luke_pickering in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 8 Jan 2011, 01:02 PM
  3. Changing the box header links in the left column
    By memerson in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 5 Mar 2009, 04:01 AM
  4. changing the text color of the header links
    By vfrazier in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 23 Oct 2008, 01:26 AM
  5. Changing where the header links to?
    By NickJRE in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 15 May 2007, 03:49 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg