Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Two logo's on header

Two logo's on header

Locked

Views: 3,292

Results 1 to 20 of 37
This thread is locked. New replies are disabled.
10 Dec 2010, 2:53 AM
#1
mnguy avatar

mnguy

New Zenner

Join Date:
Dec 2010
Posts:
9
Plugin Contributions:
0

Two logo's on header

Hi I am new to site and the latest version of zen cart.
I am using the sage template with it and I would like to figure out how to have two logo's on the header.
Any help would be great.

10 Dec 2010, 5:00 AM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Two logo's on header

That template comes with an alterd/custom tpl_header.php file
It is located in /includes/templates/sage/common

Open it and add the highlighted line where indicated

<?php
              if (SHOW_BANNERS_GROUP_SET2 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET2)) {
                if ($banner->RecordCount() > 0) {
?>
      <div id="bannerTwo" class="banners"><?php echo zen_display_banner('static', $banner);?></div>
<?php
                }
              }
?>
    <div class="forward" id="logo2">href="where you want the anchor to go"><img src="images/image name" alt="text"</a></div>
    </div>
</div>

<!--eof-branding display-->

where you want the anchor to go = http: // somewhere
images/image name = your second logo image

10 Dec 2010, 7:15 AM
#3
get_em_fast avatar

get_em_fast

Totally Zenned

Join Date:
Dec 2006
Location:
Seligman, MO U.S.A.
Posts:
2,072
Plugin Contributions:
1

Re: Two logo's on header

Wouldn't it be more correct to add the additional Logo like this in /includes/templates/sage/common/tpl_header.php

<div id="logo2"><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">' . zen_image($template->get_template_dir(HEADER_LOGO2_IMAGE, HEADER_ALT_TEXT, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . HEADER_LOGO2_IMAGE, HEADER_LOGO2_WIDTH, HEADER_LOGO2_HEIGHT) . '</a>'; ?></div>

Then in /includes/languages/english/sage/header.php add the following:

define('HEADER_LOGO2_WIDTH', '200px');
define('HEADER_LOGO2_HEIGHT', '70px');
define('HEADER_LOGO2_IMAGE', 'logo2.gif');

Don't get me wrong kobra, as I haven't looked at the "modified" tpl_header.php file in that template, but that looks more like a "quick and easy" way instead of the correct way.

10 Dec 2010, 9:52 AM
#4
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Two logo's on header

Get Em Fast:

that looks more like a "quick and easy" way instead of the correct way.
That is correct, but as the OP is posting first time this might seem more friendly vs the Zen Way that would also require in addition several edits to pickup alt text and other references

10 Dec 2010, 5:13 PM
#5
mnguy avatar

mnguy

New Zenner

Join Date:
Dec 2010
Posts:
9
Plugin Contributions:
0

Re: Two logo's on header

Kobra I tried what you suggested and it located in the menu bar.

What I would like to have it replace it the tag line.
I do back up the whole page before i do any changes so I can paste original back if needed.

So I guess the question becomes should I replace the tag line info with what you suggested?

Thanks for your help.

10 Dec 2010, 5:15 PM
#6
mnguy avatar

mnguy

New Zenner

Join Date:
Dec 2010
Posts:
9
Plugin Contributions:
0

Re: Two logo's on header

Get Em Fast
Thanks I am going to try that today.
I will let you know how it works for me.

10 Dec 2010, 5:17 PM
#7
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Two logo's on header

So I guess the question becomes should I replace the tag line info with what you suggested?
If it is displaying just comment out the complete tagline code leaving logo2 code where it is

10 Dec 2010, 5:19 PM
#8
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Two logo's on header

Get Em Fast
Thanks I am going to try that today.
I will let you know how it works for me.
When you do it that way the image must be in your templates /image dir

10 Dec 2010, 8:06 PM
#9
get_em_fast avatar

get_em_fast

Totally Zenned

Join Date:
Dec 2006
Location:
Seligman, MO U.S.A.
Posts:
2,072
Plugin Contributions:
1

Re: Two logo's on header

And don't forget, you will also need to position it in your stylesheet by adding a block of code pertaining to the new logo. Something like:

#logo2 img {margin: 0 0 0 25px; padding: 20px;}

or what ever makes it look good and be positioned where you need it.

10 Dec 2010, 8:09 PM
#10
get_em_fast avatar

get_em_fast

Totally Zenned

Join Date:
Dec 2006
Location:
Seligman, MO U.S.A.
Posts:
2,072
Plugin Contributions:
1

Re: Two logo's on header

kobra:

That is correct, but as the OP is posting first time this might seem more friendly vs the Zen Way that would also require in addition several edits to pickup alt text and other references

Ahh.......I see the logic behind this..........I agree, it does seem like it would be easier for a ZC newcomer.

10 Dec 2010, 8:38 PM
#11
mnguy avatar

mnguy

New Zenner

Join Date:
Dec 2010
Posts:
9
Plugin Contributions:
0

Re: Two logo's on header

Well as an update I have it to the point where it is located where I want it in the center and the tag line text is gone but I have no logo showing just the 600px

10 Dec 2010, 9:59 PM
#12
mnguy avatar

mnguy

New Zenner

Join Date:
Dec 2010
Posts:
9
Plugin Contributions:
0

Re: Two logo's on header

Here is link to what I have so far on the site so you can see what I am talking about.
http://www.artzonecentral.com/

If you look on top center of header you will see 600px but not logo
so I must be close.

10 Dec 2010, 10:32 PM
#13
get_em_fast avatar

get_em_fast

Totally Zenned

Join Date:
Dec 2006
Location:
Seligman, MO U.S.A.
Posts:
2,072
Plugin Contributions:
1

Re: Two logo's on header

Your image is in the wrong place. You have it in:
includes/templates/template_default/index/azc_lglogo.jpg

It should be in:
includes/templates/sage/images/azc_lglogo.jpg

11 Dec 2010, 9:48 PM
#14
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Two logo's on header

From what it looks like you coded the image belongs in your /images directory

<div class="forward" id="logo2">href="www.artzonecentral.com/"><img src="images/azc_lglogo.jpg " alt="text"</a></div>
    </div>

But check code for that space at the end in the src= line or after azc_lglogo.jpg

13 Dec 2010, 7:48 AM
#15
jmuniz avatar

jmuniz

New Zenner

Join Date:
Jul 2010
Posts:
23
Plugin Contributions:
0

Re: Two logo's on header

I'd like to a logo(animated gif) to the left of the current logo
I'm lost as to how to add it on the same line as opposed to the examples added in this post which add it on a second line.

Thanks in advance.

13 Dec 2010, 8:42 AM
#16
get_em_fast avatar

get_em_fast

Totally Zenned

Join Date:
Dec 2006
Location:
Seligman, MO U.S.A.
Posts:
2,072
Plugin Contributions:
1

Re: Two logo's on header

It depends on the styling, also. Look at mnguy's site.....after doing this his logo's are beside each other. Follow the steps you've seen in this thread, then when you get that done, post a link to your site, and we'll help you style it so it will be beside you current one.

Just remember.........if you want it on the left side of your current logo, then put you new code above your original logo code. If you want it on the right side, then put your new code below the original logo code.

13 Dec 2010, 9:10 AM
#17
jmuniz avatar

jmuniz

New Zenner

Join Date:
Jul 2010
Posts:
23
Plugin Contributions:
0

Re: Two logo's on header

Thanks I'll give it a try and will post once I'm done.

13 Dec 2010, 4:30 PM
#18
gunni avatar

gunni

Zen Follower

Join Date:
Aug 2010
Location:
Israel
Posts:
287
Plugin Contributions:
0

Re: Two logo's on header

jmuniz:

Thanks I'll give it a try and will post once I'm done.

Hi. I have a headache about the second logo.
Done what is written here and in other threads but still 2nd
logo does not appear.
Any1 ?

https://www.adi-beauty.com

13 Dec 2010, 4:33 PM
#19
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Two logo's on header

gunni:

Done what is written here and in other threads but still 2nd
logo does not appear.
Looking at your view source it does not appear that you have done anything

Maybe editing incorrect files

What files and the path to the files are you editing?

<!--bof-branding display-->
<div id="logoWrapper">
    <div id="logo"><img src="includes/templates/classic/images/adi.gif" alt="" width="93" height="66" /></div>
</div>

<br class="clearBoth" />
<!--eof-branding display-->

<!--eof-header logo and navigation display-->
14 Dec 2010, 8:33 AM
#20
gunni avatar

gunni

Zen Follower

Join Date:
Aug 2010
Location:
Israel
Posts:
287
Plugin Contributions:
0

Re: Two logo's on header

Thanks for the quick answer Kobra.
It is very strange.
The files I worked on are tpl_header.php, header.php and
stylesheet.css
The line you quoted appears in tpl_header.php but as you wrote
it looks like it is not the same file I worked on.
The file I worked on is in /includes/templates/template_default/common/
and I also made a search in my server to find other tpl_header.php files but the others I found are in other template
I downloaded but di not use and other file is tpl_header_test_info.php
so how could it be ???