Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / adding 2nd image to logo

adding 2nd image to logo

Locked

Views: 2,207

Results 1 to 20 of 34
This thread is locked. New replies are disabled.
15 Apr 2010, 3:56 PM
#1
robertg avatar

robertg

Zen Follower

Join Date:
Nov 2009
Posts:
341
Plugin Contributions:
0

adding 2nd image to logo

I have taken my initial header logo and made two separate image I have one of the images installed through the header.php file.
Question is How do I insert the second image to the right of the one that is there. The first image is in the php header file. What do I have to do to insert it and then loctae and change settings in Stylesheet.
Have a look at my site http://30408.vws.magma.ca/TTEZENCART:hug: help Please

15 Apr 2010, 4:01 PM
#2
kobra avatar

kobra

Black Belt

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

Re: adding 2nd image to logo

I do not see 2 images??

Why not make them one image?

15 Apr 2010, 4:05 PM
#3
robertg avatar

robertg

Zen Follower

Join Date:
Nov 2009
Posts:
341
Plugin Contributions:
0

Re: adding 2nd image to logo

The second image which is the same size as the first image is for our corporate division. We want to be able to have each image link to their own page.
I wanted to know how to insert the second image.
Thanks,

15 Apr 2010, 4:18 PM
#4
kobra avatar

kobra

Black Belt

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

Re: adding 2nd image to logo

We want to be able to have each image link to their own page.
I wanted to know how to insert the second image.
A copy of tpl_header.php for your template - - add a new div after the logo div with the second image

logo2??

15 Apr 2010, 5:02 PM
#5
robertg avatar

robertg

Zen Follower

Join Date:
Nov 2009
Posts:
341
Plugin Contributions:
0

Re: adding 2nd image to logo

I copied an pasted the logo div and changed the name to <div id="logo2">.
I then added in the header php file

define('HEADER_LOGO2_WIDTH', '1000px');
define('HEADER_LOGO2_HEIGHT', '189px');
define('HEADER_LOGO2_IMAGE', 'btc_logo.jpg');

I uploaded both files but am not getting any results. What am I doing wrong?

15 Apr 2010, 6:47 PM
#6
kobra avatar

kobra

Black Belt

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

Re: adding 2nd image to logo

I copied an pasted the logo div and changed the name to <div id="logo2">.
I then added in the header php file
What exactly did you copy & paste???

If all of it

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

You need to change it it to be your html href linking to your corp site
Something like

<div id="logo2"><a href="your link to corp"><img src="link to logo2.jpg/gif" alt="Alt text" width="???" height="???" /></a></div>

This src, if you can not make it relative or https will have to be dealt with on your cart https pages

define('HEADER_LOGO2_WIDTH', '1000px');
This is very wide??...

15 Apr 2010, 7:34 PM
#7
robertg avatar

robertg

Zen Follower

Join Date:
Nov 2009
Posts:
341
Plugin Contributions:
0

Re: adding 2nd image to logo

<div id="logo2><a href="http://30408.vws.magma.ca/TTEZENCART"><img src="/http://30408.vws.magma.ca/images/banners/btc_logo.jpg">alt="Alt text" width="321" height= "138' . '</a>'; ?></div> This is what I added to tpl_header.php in my includes/templates/TTE/tpl_header.php file.

In my includes/language/english/TTE/english.php
I added this:
define('HEADER_LOGO2_WIDTH', '321px');
define('HEADER_LOGO2_HEIGHT', '138px');
define('HEADER_LOGO2_IMAGE', 'btc_logo.jpg');

15 Apr 2010, 7:44 PM
#8
kobra avatar

kobra

Black Belt

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

Re: adding 2nd image to logo

Entering
http: //30408.vws.magma.ca/images/banners/btc_logo.jpg
I get a 404 page not found

15 Apr 2010, 8:29 PM
#11
robertg avatar

robertg

Zen Follower

Join Date:
Nov 2009
Posts:
341
Plugin Contributions:
0

Re: adding 2nd image to logo

I really appreciate this help Kobra.
I changed my errors and re-posted in the tpl_header.php file in ths manner:

<div id="logoWrapper">
  <div id="logo"><?php echo '<a href=" HTTP_SERVER . DIR_WS_CATALOG"></image>' . zen_image($template->get_template_dir(HEADER_LOGO_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . HEADER_LOGO_IMAGE, HEADER_ALT_TEXT) . '</a>'; ?></div>
<?php if (HEADER_SALES_TEXT != '' || (SHOW_BANNERS_GROUP_SET2 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET2))) { ?>
<div id="logo2"><a href="http://30408.vws.magma.ca/TTEZENCART"><img src="/http://30408.vws.magma.ca/TTEZENCART/images/banners/btc_logo.jpg"><alt="Alt text" width="321" height= "138>' . '</a>'; ?></div>
15 Apr 2010, 8:35 PM
#12
kobra avatar

kobra

Black Belt

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

Re: adding 2nd image to logo

Is this on your live site?

Viewing your source there is no logo2 being parsed at
http: //30408.vws.magma.ca/TTEZENCART/

15 Apr 2010, 8:54 PM
#13
robertg avatar

robertg

Zen Follower

Join Date:
Nov 2009
Posts:
341
Plugin Contributions:
0

Re: adding 2nd image to logo

Yes it's a live site, It will be moved to https://www.thetrailingedge.ca this weekend.

Sorry, I'm not sure what you mean by parsed!!

16 Apr 2010, 12:19 PM
#14
kobra avatar

kobra

Black Belt

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

Re: adding 2nd image to logo

Load your page in your browser and view your source
logo2 is not in the code

16 Apr 2010, 12:49 PM
#15
robertg avatar

robertg

Zen Follower

Join Date:
Nov 2009
Posts:
341
Plugin Contributions:
0

Re: adding 2nd image to logo

I see that, I also see That the code for the left side log is there re:tte_logo1.jpg.

so I cut and pasted the div from source page and added it into the tpl_header.php file and renamed logo to logo2 and changed the image to reflect 2nd image btc_logo.jpg. so therefore I have 2 div lines.

It still won't parse. Is it possible that I have it in the wrong file in the wrong directory. when I use the developer tool kit and look for location of 1st image tte_logo1.jpg, it finds it in the includes/templates/tte/images file. the btc_logo.jpg is in the same location.

So what is your opinion as to what might be causing this not to parse.:no:

16 Apr 2010, 12:59 PM
#16
robertg avatar

robertg

Zen Follower

Join Date:
Nov 2009
Posts:
341
Plugin Contributions:
0

Re: adding 2nd image to logo

Kobra,
This is the code as it appears on the server and in the tpl_header.php file

!--bof-branding display-->

<div id="logoWrapper"> <div id="logo"><a href="http://30408.vws.magma.ca/TTEZENCART/"><img src="includes/templates/Tte/images/tte_logo1.jpg" alt="" width="321" height="138" /></a>
<div id="logo2"><a href="http://30408.vws.magma.ca/TTEZENCART"><img src="http://30408.vws.magma.ca/TTEZENCART/includes/templates/Tte/images/btc_logo.jpg" alt="" width="321" height="138"> . '</a> ;?></div>

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

<div id="taglineWrapper">
<?php if (HEADER_SALES_TEXT != '') { ?>
  <div id="tagline"><?php echo HEADER_SALES_TEXT;?></div>
16 Apr 2010, 1:36 PM
#17
robertg avatar

robertg

Zen Follower

Join Date:
Nov 2009
Posts:
341
Plugin Contributions:
0

Re: adding 2nd image to logo

Hello again Kobra,

This code shows up in my code editor properly, but when copied to the tpl_header.php file it still doesn't work.

<div id="logoWrapper"> <div id="logo"><a href="http://30408.vws.magma.ca/TTEZENCART"><img src="http://30408.vws.magma.ca/TTEZENCART/includes/templates/Tte/images/tte_logo1.jpg" alt="" align="left" width="321" height="138"></a> <div id="logo2"><a href="http://30408.vws.magma.ca/TTEZENCART"><img src="http://30408.vws.magma.ca/TTEZENCART/includes/templates/Tte/images/btc_logo.jpg" alt="" align="right" width="321" height="138" /></a></div>

IT ALSO COMES UP PROPERLY WHEN I TEST IT ON MY FAVORITE BROWSER!!

16 Apr 2010, 1:55 PM
#18
kobra avatar

kobra

Black Belt

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

Re: adding 2nd image to logo

Where are you uploading your edited tpl_header.php file?

16 Apr 2010, 2:10 PM
#19
robertg avatar

robertg

Zen Follower

Join Date:
Nov 2009
Posts:
341
Plugin Contributions:
0

Re: adding 2nd image to logo

I upload through Mozilla to:
/TTEZENCART/includes/templates/Tte/tpl_header.php

16 Apr 2010, 2:23 PM
#20
kobra avatar

kobra

Black Belt

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

Re: adding 2nd image to logo

I upload through Mozilla to:
/TTEZENCART/includes/templates/Tte/tpl_header.php
That file belongs here
/TTEZENCART/includes/templates/Tte/commom/tpl_header.php