Additional links to the Header in zencart How to add them?
CAPITALIZED words refer to a folder or language that you choose. We use CUSTOM for your template and ENGLISH for your language by default. These generic terms should be changed to the name of the template/language you are using.
Add additional links to the header and footer for your zen-cart eCommerce website.
Ad additional links requires editing two files; tpl_header.php and tpl_footer.php.
You can add internal page links as well as external links. We’ll use tpl_header.php in this article, but the same procedures would apply to tpl_footer.php.
Adding an internal page link (let’s use the Contact Us page in this example.)
In your text editor open includes -> templates -> template_default -> common -> tpl_header.php
find the following code:
<!–bof-navigation display–>
<div id=”navMainWrapper”>
<div id=”navMain”>
<ul>
<li><?php echo ‘<?php echo ‘<a href=”‘ . HTTP_SERVER . DIR_WS_CATALOG . ‘”>’; ?><?php echo HEADER_TITLE_CATALOG; ?></a></li>
Add the following code just below the last line in the above code.
<?php if (DEFINE_CONTACT_US_STATUS <= 1) { ?>
<li><?php echo ‘<a href=”‘ . zen_href_link(FILENAME_CONTACT_US, ”, ‘SSL’) . ‘”>’ . BOX_INFORMATION_CONTACT . ‘</a>’; ?></li>
<?php } ?>
You would add an external link as outlined above.
<li><a href=”http://your_external_link.com”>Your Link Text</a></li>
Save the edited file to includes -> templates -> CUSTOM -> common -> tpl_header.php and upload to your server.