Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / How to Add links to the NavMain Menu in storefront?

How to Add links to the NavMain Menu in storefront?

Views: 2,077

Results 1 to 16 of 16
27 Oct 2012, 9:37 AM
#1
paulus avatar

paulus

New Zenner

Join Date:
Sep 2012
Posts:
16
Plugin Contributions:
0

How to Add links to the NavMain Menu in storefront?

Hello Forum,

I'm a new Zenner, making small template changes so as to familiarize myself as to how the Zen Cart works.
A change I want to make for instance, is to add a text hyperlink to the upper Navigation Menu where 'Home' and 'Log in' are.
I found this handy article: http://www.kerrinhardy.com/2010/01/03/add-links-to-the-navmain-menu-in-zen-cart/
I performed the 5 prescribed steps but I can't seem to be able to add the link.
I can do it by modifying the **tpl_header.php **file in the template_default directory but that's **not **the way to do it.
The proper way to do it, it seems, is by the override method, which I supect, I'm not quite getting.
For instance, once I edited the above .php file, I'm supposed to save it to:
/includes/templates/CUSTOM/common/ (where CUSTOM represents the name of your current template folder)
That's the part I don't get because under my /includes/ folder I have:

/YOUR_TEMPLATE/...
/cherry_zen/...
/classic/...
/template_default/...

I thought that CUSTOM may have been the old moniker for YOUR_TEMPLATE and so I save the edited file there, but, as I said it's not working.
I also note that I have only 2 templates installed and available for selection in Admin, ie, cherry_zen and classic.
Should I then install the YOUR_TEMPLATE so that it's available for selection in Admin?

Thanks for any help in the right direction.

Paul Nonnis.

27 Oct 2012, 9:53 AM
#2
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: How to Add links to the NavMain Menu in storefront?

Do you have the Cherry Zen template selected in admin ? If so, your edited tpl_header.php file would go in includes/templates/cherry_zen/common.

Generally, CUSTOM and YOUR_TEMPLATE mean the same thing.

27 Oct 2012, 11:47 AM
#3
paulus avatar

paulus

New Zenner

Join Date:
Sep 2012
Posts:
16
Plugin Contributions:
0

Re: How to Add links to the NavMain Menu in storefront?

Bravo! .. issue solved .. thank you .. Paul.

27 Oct 2012, 8:48 PM
#4
serious avatar

serious

Totally Zenned

Join Date:
Feb 2011
Posts:
686
Plugin Contributions:
0

Re: How to Add links to the NavMain Menu in storefront?

Glad i found this! Made my latest change simple!!
One question though. I'm trying to add a banner below my header but would like it centered on the page.

How do I center it?

27 Oct 2012, 9:27 PM
#5
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: How to Add links to the NavMain Menu in storefront?

We'll need to know exactly what you mean by 'banner'. In Zencart, a banner is an advertising image. A link to your site would help, too.

27 Oct 2012, 10:24 PM
#6
serious avatar

serious

Totally Zenned

Join Date:
Feb 2011
Posts:
686
Plugin Contributions:
0

Re: How to Add links to the NavMain Menu in storefront?

I guess banner was a poor choice of words. I got it from Paypal.
Try this:
seriousoffroadproducts.com

27 Oct 2012, 10:55 PM
#7
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: How to Add links to the NavMain Menu in storefront?

Add to your stylesheet: #paypalcreditcardssidebox {text-align: center;}

28 Oct 2012, 1:07 AM
#8
serious avatar

serious

Totally Zenned

Join Date:
Feb 2011
Posts:
686
Plugin Contributions:
0

Re: How to Add links to the NavMain Menu in storefront?

Well I kinda got it.......

Hit the link above and you'll see what I mean.

Here's where I put it:

{text-align: center;} <script type="text/javascript...............

28 Oct 2012, 12:12 PM
#9
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: How to Add links to the NavMain Menu in storefront?

No, the code I posted goes in your stylesheet.css file.

28 Oct 2012, 12:26 PM
#10
serious avatar

serious

Totally Zenned

Join Date:
Feb 2011
Posts:
686
Plugin Contributions:
0

Re: How to Add links to the NavMain Menu in storefront?

There isn't a "paypalcreditcardssidebox" in my .css

The Ad/Banner is a script that is a simple cut and paste provided by Paypal.

The instructions on the PP site are simple enough.
select the box ad size, cut and paste onto your site, and that's all I did.

I have not made any changes to the css file.

28 Oct 2012, 12:32 PM
#11
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: How to Add links to the NavMain Menu in storefront?

stevesh:

Add to your stylesheet: #paypalcreditcardssidebox {text-align: center;}

Work with me here.

28 Oct 2012, 12:36 PM
#12
serious avatar

serious

Totally Zenned

Join Date:
Feb 2011
Posts:
686
Plugin Contributions:
0

Re: How to Add links to the NavMain Menu in storefront?

Okie-Dokie, I'll give a whirl.

Where in the stylesheet does it belong?

28 Oct 2012, 1:11 PM
#13
serious avatar

serious

Totally Zenned

Join Date:
Feb 2011
Posts:
686
Plugin Contributions:
0

Re: How to Add links to the NavMain Menu in storefront?

Maybe I'm not explaining this very well.

The script that I got from PayPal was not added to the .css file.
It was added to includes/templates/CUSTOM/common/tpl_header.php

None of the script mentions "paypalcreditcardssidebox"

28 Oct 2012, 8:40 PM
#14
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: How to Add links to the NavMain Menu in storefront?

Did you actually add the rule given to your stylesheet (anywhere)?
The only Paypal info appearing on your site is the sidebox, which has an id of #paypalcreditcardssidebox. If that is not what you are referring to, you will have to give more info on where it can be found.

28 Oct 2012, 8:58 PM
#15
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: How to Add links to the NavMain Menu in storefront?

I see in your view source ```html

<!--bof-branding display--> <div id="logoWrapper"> <div id="taglineWrapper"> </div> </div> <script type="text/javascript">document.write('<scr');document.write('ipt type="text/javascript" data-ppmnid="72798297977301" src=... ``` which I presume is the script you are talking about... oh, right, I wouldn't see that on your site because I didn't enable scripts for it.

On further inspection, it is the link image after those two scripts that is visible with scripts enabled; you would address that like```
#logoWrapper+script+script+a {margin: 0 0 0 10em;}

28 Oct 2012, 9:00 PM
#16
serious avatar

serious

Totally Zenned

Join Date:
Feb 2011
Posts:
686
Plugin Contributions:
0

Re: How to Add links to the NavMain Menu in storefront?

gjh42:

Did you actually add the rule given to your stylesheet (anywhere)?
The only Paypal info appearing on your site is the sidebox, which has an id of #paypalcreditcardssidebox. If that is not what you are referring to, you will have to give more info on where it can be found.I'm not asking about the side box with the paypal seal, I'm asking about that is circled in YELLOW in the following screenshot from my site: