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

Two logo's on header

Locked

Views: 3,292

Results 21 to 37 of 37
This thread is locked. New replies are disabled.
14 Dec 2010, 12:10 PM
#21
kobra avatar

kobra

Black Belt

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

Two logo's on header

gunni:

The file I worked on is in /includes/templates/template_default/common/
One should NEVER edit a core file

Try to replace it with the original and place your edited copy in your template structure

If the folder does not exist - - create it

includes/templates/classic/common

15 Dec 2010, 8:40 AM
#22
gunni avatar

gunni

Zen Follower

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

Re: Two logo's on header

Thanks Kobra.
Did it like you said, returned the original and created common
dir in my classic dir.
Results are the same.
Here is 2 logos code from the tpl_header.php file:

<!--bof-branding display--> <div id="logoWrapper"> <div id="logo"><?php echo zen_image($template->get_template_dir(HEADER_LOGO_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . HEADER_LOGO_IMAGE) ; ?></div> <?php if (HEADER_SALES_TEXT != '' || (SHOW_BANNERS_GROUP_SET2 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET2))) { ?>
<div id="logo2"><?php echo zen_image($template->get_template_dir(HEADER_LOGO2_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . HEADER_LOGO2_IMAGE) ; ?></div>


<div id="taglineWrapper">

Of course I added logo2 to header.php
and add a code in stylesheet.css:
#logo2 {float: right}

15 Dec 2010, 9:02 AM
#23
kobra avatar

kobra

Black Belt

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

Re: Two logo's on header

gunni,

What is the name of the image and what is the path to it

15 Dec 2010, 10:05 AM
#24
gunni avatar

gunni

Zen Follower

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

Re: Two logo's on header

Path is OK.
I changed the logo#2 name to logo#1 name (both in the same dir) and logo#2 appered instead of logo#1 so I am sure the path
of the logos is OK.

15 Dec 2010, 3:18 PM
#25
kobra avatar

kobra

Black Belt

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

Re: Two logo's on header

gunni,

That did not answer what I asked

What is the actual image name
What it the actual path to it

15 Dec 2010, 3:27 PM
#26
gunni avatar

gunni

Zen Follower

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

Re: Two logo's on header

logo#1: /shop/includes/templates/classic/images/adi.gif
logo#2: /shop/includes/templates/classic/images/logo2.gif

logo#1 appears
logo#2 does not appear

15 Dec 2010, 3:45 PM
#27
gjh42 avatar

gjh42

Black Belt

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

Re: Two logo's on header

HEADER_LOGO2_IMAGE
Where exactly have you defined this, and what is it now defined as?

15 Dec 2010, 3:48 PM
#28
gunni avatar

gunni

Zen Follower

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

Re: Two logo's on header

defined it in header.php:

// added defines for header alt and text
define('HEADER_ALT_TEXT', '');
define('HEADER_SALES_TEXT', '');
define('HEADER_LOGO_WIDTH', '100%');
define('HEADER_LOGO_HEIGHT', '100%');
define('HEADER_LOGO_IMAGE', 'adi.gif');
define('HEADER_LOGO2_WIDTH', '100%');
define('HEADER_LOGO2_HEIGHT', '100%');
define('HEADER_LOGO2_IMAGE', 'logo2.gif');

15 Dec 2010, 3:57 PM
#29
gunni avatar

gunni

Zen Follower

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

Re: Two logo's on header

also on tpl_header.php:

<!--bof-branding display--> <div id="logoWrapper"> <div id="logo"><?php echo zen_image($template->get_template_dir(HEADER_LOGO_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . HEADER_LOGO_IMAGE) ; ?></div> <?php if (HEADER_SALES_TEXT != '' || (SHOW_BANNERS_GROUP_SET2 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET2))) { ?>
<div id="logo2"><?php echo zen_image($template->get_template_dir(HEADER_LOGO2_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . HEADER_LOGO2_IMAGE) ; ?></div>


<div id="taglineWrapper">
15 Dec 2010, 4:04 PM
#30
gjh42 avatar

gjh42

Black Belt

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

Re: Two logo's on header

What exactly is the filepath to this header.php?

15 Dec 2010, 4:09 PM
#31
gunni avatar

gunni

Zen Follower

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

Re: Two logo's on header

/shop/includes/languages/english/classic/header.php

15 Dec 2010, 4:51 PM
#32
gjh42 avatar

gjh42

Black Belt

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

Re: Two logo's on header

You still don't have the edited tpl_header.php saved in the right place. There is no trace of the edited code; even if the image was missing, some of its HTML would show in view source.

Make sure that it actually saved what you think it did.

15 Dec 2010, 5:02 PM
#33
gunni avatar

gunni

Zen Follower

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

Re: Two logo's on header

HELP !
I see also when view source that logo2 is not shown in the code under branding something.
To check this I edited again tpl_header.php and add *** in the branding remark.
Viewed source again and the *** remarkds are there ! and no sign for logo2 code !!!
HOW COULD IT BE ???

15 Dec 2010, 5:21 PM
#34
gjh42 avatar

gjh42

Black Belt

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

Re: Two logo's on header

Yep, I see the

<!--bof-branding display***-->

and no sign of any logo2 code. Weird.
That file still had the logo2 code in it after you added the ***, right?

15 Dec 2010, 6:17 PM
#35
gunni avatar

gunni

Zen Follower

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

Re: Two logo's on header

Of course.
I asked someone in the real life :) and he advised me that he thinks that if the code is with error the source will not
show it as it is an error. so maybe I have an error on the logo2 code ?

15 Dec 2010, 6:31 PM
#36
gjh42 avatar

gjh42

Black Belt

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

Re: Two logo's on header

I was focused on looking for errors in the code, and overlooked this:```php

<?php if (HEADER_SALES_TEXT != '' || (SHOW_BANNERS_GROUP_SET2 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET2))) { ?>
If you have set HEADER_SALES_TEXT to blank '', and have no banners set for that position, the following code will not execute. Move the logo2 code like this:```php
<!--bof-branding display-->
<div id="logoWrapper">
<div id="logo"><?php echo zen_image($template->get_template_dir(HEADER_LOGO_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . HEADER_LOGO_IMAGE) ; ?></div>

<div id="logo2"><?php echo zen_image($template->get_template_dir(HEADER_LOGO2_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . HEADER_LOGO2_IMAGE) ; ?></div>

<?php if (HEADER_SALES_TEXT != '' || (SHOW_BANNERS_GROUP_SET2 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET2))) { ?>


<div id="taglineWrapper"> 
15 Dec 2010, 7:18 PM
#37
gunni avatar

gunni

Zen Follower

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

Re: Two logo's on header

gjh42 - YOU ARE A GENIUS !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

THANK U , THANK U, THANK U !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!