Add Links:

Add links to the Home Nav Main menu is set to the Zen Cart store front. There are occasions when you may wish to alter this behavior. For example, if your online store is in a sub directory of your main website, you might be looking to set Home to link to your main website and an additional link Store to lead to Zen Cart online store.

add links

Before do the following please backup your website first.

This is achieved by modifying the tpl_header.php file.

1. Open the tpl_header.php file located in the /includes/templates/template_default/common/ directory.

2. Find this section of code:

<div id=”navMain”>

<ul class=”back”>

<li><?php echo ‘<a href=”‘ . HTTP_SERVER . DIR_WS_CATALOG . ‘”>’; ?><?php echo HEADER_TITLE_CATALOG; ?></a></li>

4. To change the existing Home link to read Store, update the section of code as follows:

<div id=”navMain”>

<ul class=”back”>

<li><?php echo ‘<a href=”‘ . HTTP_SERVER . DIR_WS_CATALOG . ‘”>’; ?>Store</a></li>

6. Replace Store (or your choice) with whatever you wish your online store link to be.

7. To add an additional link to your main website Home, update the section of code as follows:

<div id=”navMain”>

<ul class=”back”>

<li><a href=”http://www.yourdomain.com/”>Home</a></li>

<li><?php echo ‘<a href=”‘ . HTTP_SERVER . DIR_WS_CATALOG . ‘”>’; ?>Store</a></li>

9. Replace http://www.yourdomain.com with your main website address and replace Home with the link name you would like to use.

10. Save the modified tpl_header.php file to your override folder. This will be /includes/templates/CUSTOM/common/ where CUSTOM represents the name of your current template folder.

While editing the tpl_header.php file please be careful. It is all about php if any mistake occurred whole website will be mess.

Related Posts

How to use your customize PayPal button?

How to use your customize PayPal button?

PayPal button Customization: PayPal button ! you can change the default one first login to your paypal account then click the “Merchant Services” Now  click “Buy Now” button. Now click Customize text or appearance(optional) here and you will see a button named “Use...

read more
Additional links to the Header in zencart

Additional links to the Header in zencart

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

read more