Zen Cart Logo
Forums / Basic Configuration / stupid question...

stupid question...

Views: 1,253

Results 1 to 12 of 12
10 Sep 2011, 10:41 PM
#1
jbnyc avatar

jbnyc

New Zenner

Join Date:
Sep 2010
Posts:
38
Plugin Contributions:
0

stupid question...

I have a really stupid question...sorry everyone...

can you please help me find the file that has

div id headerWrapper
div id logo wrapper
img src...

etc

its not the tpl header...tried that...

thanks!!

10 Sep 2011, 10:54 PM
#2
gjh42 avatar

gjh42

Black Belt

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

Re: stupid question...

/includes/templates/your_template/common/tpl_header.php. If you don't have a custom copy of that file yet, copy it from /includes/templates/template_default/common/tpl_header.php.

tpl_header.php is the only place for that code... unless you have an extremely customized template, in which case, we can't help you find it.

10 Sep 2011, 10:56 PM
#3
stevesh avatar

stevesh

Black Belt

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

Re: stupid question...

It is includes/templates/template_default/common/tpl_header.php.

What exactly are you trying to do ?

11 Sep 2011, 4:56 PM
#4
jbnyc avatar

jbnyc

New Zenner

Join Date:
Sep 2010
Posts:
38
Plugin Contributions:
0

Re: stupid question...

I've been trying to add an H1 heading for days...

When I open up a demo site with default template and inspect it with Chrome it says H1 heading under the tagline.

But i don't see the same with mine.

https://www.thehustlelusionstore.com

11 Sep 2011, 5:16 PM
#5
stevesh avatar

stevesh

Black Belt

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

Re: stupid question...

In a stock Zencart installation using the Classic template, there's no <h1> tag in the header - the first one is the #indexDefaultHeading (Congratulations, etc.) which is edited in includes/languages/english/index.php.

https://www.zen-cart.com/tutorials/index.php?article=129

When you're adding your code to tpl_header.php, are you saving the file to includes/templates/pure_black_free/common ?

11 Sep 2011, 5:28 PM
#6
jbnyc avatar

jbnyc

New Zenner

Join Date:
Sep 2010
Posts:
38
Plugin Contributions:
0

Re: stupid question...

So that heading is the same thing as the H1 thing? I'm just trying to do it for SEO.
I haven't changed anything yet. I don't wanna screw up lol but yes if I did make changes I would save them back to wherever they came from.

11 Sep 2011, 7:52 PM
#7
jbnyc avatar

jbnyc

New Zenner

Join Date:
Sep 2010
Posts:
38
Plugin Contributions:
0

Re: stupid question...

get this. i followed the tutorial and it's still blank next to my logo...hmmmm....

11 Sep 2011, 8:56 PM
#8
stevesh avatar

stevesh

Black Belt

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

Re: stupid question...

Let's back up. Forget about SEO or <h1>. What text do you want to appear where ? If it's in the header, just replace (or add to, if it's blank) the define text of HEADER_SALES_TEXT in includes/languages/english/header.php and save the file to includes/languages/english/YOUR_TEMPLATE_NAME

12 Sep 2011, 7:44 PM
#9
jbnyc avatar

jbnyc

New Zenner

Join Date:
Sep 2010
Posts:
38
Plugin Contributions:
0

Re: stupid question...

the words I'm trying to put are in the header, next to the logo.
I went into languages/English/my template/header because i remember making changes on it and below is what it says

// added defines for header alt and text
define('HEADER_ALT_TEXT', 'The Hustlelusion, a variety of belts, stretch belts, fashion belts, leather belts');
define('HEADER_SALES_TEXT', '<H1>The Hustlelusion, Fashion Belts, Mens Belts, Stretch Belts, and Leather Belts at an Affordable Price!</H1>');
define('HEADER_LOGO_WIDTH', '37px');
define('HEADER_LOGO_HEIGHT', '37px');
define('HEADER_LOGO_IMAGE', 'Website_Size_Logo.gif');

thanks for your patience

right now in my site next to the logo it shows nothing

12 Sep 2011, 9:11 PM
#10
stevesh avatar

stevesh

Black Belt

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

Re: stupid question...

Remove the <h1> and </h1> tags and see what happens.

12 Sep 2011, 9:21 PM
#11
gjh42 avatar

gjh42

Black Belt

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

Re: stupid question...

Zen Cart automatically makes an <h1> heading for each page, using the category name, page name, etc. You are not supposed to have two <h1> tags on one page.

However, if you want to change the tagline, you could wrap an if() test around the HEADER_SALES_TEXT define and provide alternate defines based on the category.
Something like```php
if ((int)$cPath ==12) {
define('HEADER_SALES_TEXT', 'The Hustlelusion, Fashion Belts by Designer X!');
}elseif((int)$cPath ==13) {
define('HEADER_SALES_TEXT', 'The Hustlelusion, Mens Belts of High Quality Leather!');
}elseif((int)$cPath ==14) {
define('HEADER_SALES_TEXT', 'The Hustlelusion, Stretch Belts that fit you!');
}else{
define('HEADER_SALES_TEXT', 'The Hustlelusion, Fashion Belts, Mens Belts, Stretch Belts, and Leather Belts at an Affordable Price!');

This will change the tagline based on the current top category.
The last statement is a catchall for any page you do not have individually defined.
12 Sep 2011, 9:41 PM
#12
jbnyc avatar

jbnyc

New Zenner

Join Date:
Sep 2010
Posts:
38
Plugin Contributions:
0

Re: stupid question...

I tried the lower case h, didn't work. I saw gjh42's reply and thought maybe having the whole h1 tag was a mistake so i deleted it. still nothing shows next to the logo...

btw gjh42 thanks for the nifty little trick! i might have to try it one day.