Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Functional header navigation


Guest

Recommended Posts

This is just a simple find and replace in the header navigation. The code may look ugly but it works for me ;)

I got a bit lost with SSL for "my account" so used a link for SSL, you'll need to change the URL.

As ever backup and see if you like it, if not go back to your original.

 

Looks like this while logged off:

 

| Contact Us | Create account | Log In | Edit Cart Contents | Checkout

 

And this when logged on:

 

| Contact Us | Log Off | My Account | Edit Cart Contents | Checkout

 

Find in catalog/includes/header.php:

 

<tr class="headerNavigation">
<td class="headerNavigation">  <?php echo $breadcrumb->trail(' ? '); ?></td>
<td align="right" class="headerNavigation"><?php if (tep_session_is_registered('customer_id')) { ?><a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_LOGOFF; ?></a>  |  <?php } ?><a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a>  |  <a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a>  |  <a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CHECKOUT; ?></a>   </td>

 

Replace with:

 

<tr class="headerNavigation">
<td class="headerNavigation">  <?php echo $breadcrumb->trail(' ? '); ?></td>
  <td align="right" class="headerNavigation">
<?php
echo '| <a href="' . tep_href_link(FILENAME_CONTACT_US) . '"
class="headerNavigation">' . BOX_INFORMATION_CONTACT . '</a>  ';
if (tep_session_is_registered('customer_id')) {
echo '| <a href="' . tep_href_link(FILENAME_LOGOFF) . '" class="headerNavigation">' . HEADER_TITLE_LOGOFF . '</a> | <a href="https://www.mysite.com/catalog/account.php" class="headerNavigation">' . HEADER_TITLE_MY_ACCOUNT . '</a>  ';
}
else {
echo '| <a href="' . tep_href_link(FILENAME_CREATE_ACCOUNT, '','SSL') . '" class="headerNavigation">' . LOGIN_BOX_NEW_USER . '</A>  ';
echo '| <a href="' . tep_href_link(FILENAME_LOGIN, '', 'SSL') . '" class="headerNavigation">' . HEADER_TITLE_LOGIN . '</a>  ';
}
echo '| <a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '" class="headerNavigation">' . HEADER_TITLE_CART_CONTENTS . '</a>   ';
echo '| <a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '" class="headerNavigation">' . HEADER_TITLE_CHECKOUT . '</a>  ';
?>
</td>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...