Forums / Templates, Stylesheets, Page Layout / Links at top of page - always on?

Links at top of page - always on?

Locked

Started by bjraines on 8 Sep 2006, 4:57 PM · Views: 791

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
8 Sep 2006, 4:57 PM
#1
bjraines avatar

bjraines

Zen Follower

Join Date:
Jun 2006
Posts:
223
Plugin Contributions:
0

Links at top of page - always on?

I haven't made many changes to the default template. I followed the wiki to learn how to change the template a bit and override. I note there is a Home and Login link hardcoded into the template at the top left of my page. when things are in my shopping cart then I get two more links that show, checkout and shopping cart.

the site it at zencart.bjrtechnologies.com

My question is how can I make these hardcoded links always show.

Thanks!

8 Sep 2006, 5:18 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Links at top of page - always on?

These are conditional i.e. checkout only if there is something in the cart...

You would need to alter the "if" condition in tpl_header.php and I am not proficient enough at php to provide the exact changes required without doing my normal trial and error bit. It might be as easy as commenting the "if" line out to leave what resembles the blue highlighted statement

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

Zen-Venom Get Bitten

8 Sep 2006, 5:28 PM
#3
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,741
Plugin Contributions:
0

Re: Links at top of page - always on?

Kobra is correct. Comment out the conditional statements.

<div id="navMain">
    <ul class="back">
    <li><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'; ?><?php echo HEADER_TITLE_CATALOG; ?></a></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>
</div>

Please do not PM for support issues: a private solution doesn't benefit the community.

Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.