Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Logo and a picture in the header

Logo and a picture in the header

Views: 1,934

Results 1 to 20 of 29
19 Apr 2011, 5:44 PM
#1
truliebliss avatar

truliebliss

New Zenner

Join Date:
Sep 2008
Posts:
41
Plugin Contributions:
1

Logo and a picture in the header

Hi everyone its been a while for me but hopeing to get back into it.

Right here goes, im using the latest version of zen cart with the mystic template now im wanting a small picture where the logo is and i want the name to run across the top from center to right now i have the picture ready and an animated GIF ready but have no clue how to put them in.

This is the site: http://mrs-miggins.co.uk/

If anyone could help me i would be greatful

Thanks guys

19 Apr 2011, 5:50 PM
#2
kobra avatar

kobra

Black Belt

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

Re: Logo and a picture in the header

I see your animated image in the std logo position due to it being named logo.gif

What else are you seeking?

19 Apr 2011, 5:54 PM
#3
truliebliss avatar

truliebliss

New Zenner

Join Date:
Sep 2008
Posts:
41
Plugin Contributions:
1

Re: Logo and a picture in the header

Well i want that to go in the center which ive tried with no joy, went into the stylesheet.css but will only move to the right or left and theres more words to go in so would like it accross the center the other thing is i would like a picture to go where the log is now, is that at all poss?
Thanks for looking

19 Apr 2011, 6:19 PM
#4
stevesh avatar

stevesh

Black Belt

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

Re: Logo and a picture in the header

You can add text-align:center; to **#logoWrapper **to center the logo.

You can also add an image to #headerWrapper to place another image in the header.

19 Apr 2011, 6:27 PM
#5
truliebliss avatar

truliebliss

New Zenner

Join Date:
Sep 2008
Posts:
41
Plugin Contributions:
1

Re: Logo and a picture in the header

Is this all in the stylesheet? and what would i need to put in the headerwapper?

Thanks for the help

19 Apr 2011, 6:51 PM
#6
truliebliss avatar

truliebliss

New Zenner

Join Date:
Sep 2008
Posts:
41
Plugin Contributions:
1

Re: Logo and a picture in the header

well so far i got the logo in the middle but how do i change the size of it so it goes across the center? and i found the headerwapper but not sure what to put in there to add a pic to the left corner? I tried adding width to #Logo but it just moves it to the left?

19 Apr 2011, 7:09 PM
#7
stevesh avatar

stevesh

Black Belt

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

Re: Logo and a picture in the header

That image is 600 X 100 pixels, so you'll need to open includes/languages/english/header.php and change the 192 to 600 and the 64 to 100, and save the file to includes/languages/english/mystic.

19 Apr 2011, 7:46 PM
#8
truliebliss avatar

truliebliss

New Zenner

Join Date:
Sep 2008
Posts:
41
Plugin Contributions:
1

Re: Logo and a picture in the header

thats not working i did it how you said it didnt work i then save it in the header file you first said still nothing?

19 Apr 2011, 9:41 PM
#9
kobra avatar

kobra

Black Belt

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

Re: Logo and a picture in the header

thats not working i did it how you said it didnt work

I am still seeing this for that image

600px × 100px (scaled to 192px × 64px)

Recheck that you edited the correct file in the correct location

20 Apr 2011, 6:02 PM
#10
truliebliss avatar

truliebliss

New Zenner

Join Date:
Sep 2008
Posts:
41
Plugin Contributions:
1

Re: Logo and a picture in the header

Hi and thanks again yes i missed the header in the template file drrrr now all i need is to get a small pic in the right and left hand side stevesh said i need to put something in the headerwapper but not sure what??

21 Apr 2011, 1:14 AM
#11
kobra avatar

kobra

Black Belt

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

Re: Logo and a picture in the header

now all i need is to get a small pic in the right and left hand side stevesh said i need to put something in the headerwapper but not sure what??
2 Files need editing for your template structure

A copy of tpl_header.php and I have named the additionals as logoLeft & logoRight for left & right

Add the red text in tpl_header.php

<!--bof-branding display-->
<div id="logoWrapper">

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

<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="logoRight"><?php echo zen_image($template->get_template_dir(HEADER_LOGoR_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . HEADER_LOGoR_IMAGE) ; ?></div>

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


<div id="taglineWrapper">

For header.php which you have already edited for width & height

Add the red text in header.php

define('HEADER_ALT_TEXT', '');
define('HEADER_SALES_TEXT', '');
define('HEADER_LOGO_WIDTH', '???px');
define('HEADER_LOGO_HEIGHT', '???px');
define('HEADER_LOGO_IMAGE', 'image_name');
define('HEADER_LOGOL_WIDTH', '???px');
define('HEADER_LOGOL_HEIGHT', '???px');
define('HEADER_LOGOL_IMAGE', 'image_name');
define('HEADER_LOGOR_WIDTH', '???px');
define('HEADER_LOGOR_HEIGHT', '???px');
define('HEADER_LOGOR_IMAGE', 'image_name');

Your images need to be in your_template/images/

22 Apr 2011, 7:33 AM
#12
truliebliss avatar

truliebliss

New Zenner

Join Date:
Sep 2008
Posts:
41
Plugin Contributions:
1

Re: Logo and a picture in the header

Hi and thanks for that not sure what im doing wrong but i get nothing

this is what ive done

<!--bof-branding display-->
<div id="logoWrapper">
<div id="logoLeft"><?php echo zen_image($template->get_template_dir(HEADER_LOGoL_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . HEADER_LOGoL_IMAGE) ; ?></div>

<div id="navMainSearch"><?php require(DIR_WS_MODULES . 'sideboxes/search_header.php'); ?></div>
    <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, HEADER_LOGO_WIDTH, HEADER_LOGO_HEIGHT) . '</a>'; ?>
    </div>
<div id="logoRight"><?php echo zen_image($template->get_template_dir(HEADER_LOGoR_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . HEADER_LOGoR_IMAGE) ; ?></div>

and

// added defines for header alt and text
  define('HEADER_ALT_TEXT', 'Powered by Zen Cart :: The Art of E-Commerce');
  define('HEADER_SALES_TEXT', 'TagLine Here');
  define('HEADER_LOGO_WIDTH', '600px');
  define('HEADER_LOGO_HEIGHT', '100px');
  define('HEADER_LOGO_IMAGE', 'logo.gif');
  define('HEADER_LOGOL_WIDTH', '192px');
  define('HEADER_LOGOL_HEIGHT', '64px');
  define('HEADER_LOGOL_IMAGE', 'retro.jpg');
  define('HEADER_LOGOR_WIDTH', '192px');
  define('HEADER_LOGOR_HEIGHT', '64px');
  define('HEADER_LOGOR_IMAGE', 'retro.jpg');

what have i done wrong?

22 Apr 2011, 7:50 AM
#13
kobra avatar

kobra

Black Belt

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

Re: Logo and a picture in the header

In the defines you have it proper with
LOGOR
LOGOL

But in the tpl_header.php yo firdt have it out of order and then not defined/coded properly - - See highlighted code

<!--bof-branding display-->
<div id="logoWrapper">
<div id="logoLeft"><?php echo zen_image($template->get_template_dir(HEADER_LOGoL_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . HEADER_LOGoL_IMAGE) ; ?></div>

<div id="navMainSearch"><?php require(DIR_WS_MODULES . 'sideboxes/search_header.php'); ?></div>
    <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, HEADER_LOGO_WIDTH, HEADER_LOGO_HEIGHT) . '</a>'; ?>
    </div>
<div id="logoRight"><?php echo zen_image($template->get_template_dir(HEADER_LOGoR_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . HEADER_LOGoR_IMAGE) ; ?></div>
22 Apr 2011, 7:54 AM
#14
truliebliss avatar

truliebliss

New Zenner

Join Date:
Sep 2008
Posts:
41
Plugin Contributions:
1

Re: Logo and a picture in the header

So do i just change the o's to capitals? sorry if i sound very stupid lol

22 Apr 2011, 7:56 AM
#15
kobra avatar

kobra

Black Belt

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

Re: Logo and a picture in the header

Well yes, it appears that you did that on purpose.....???

Code has to be correct first - - before one can even begin to seek other issues

22 Apr 2011, 7:59 AM
#16
truliebliss avatar

truliebliss

New Zenner

Join Date:
Sep 2008
Posts:
41
Plugin Contributions:
1

Re: Logo and a picture in the header

i just copied how you put it up sorry but ive changed it and still nothing

22 Apr 2011, 8:43 AM
#17
truliebliss avatar

truliebliss

New Zenner

Join Date:
Sep 2008
Posts:
41
Plugin Contributions:
1

Re: Logo and a picture in the header

Right i managed to get the picture up but its overriden my logo and in the center:unsure:

22 Apr 2011, 8:52 AM
#18
truliebliss avatar

truliebliss

New Zenner

Join Date:
Sep 2008
Posts:
41
Plugin Contributions:
1

Re: Logo and a picture in the header

Is there something i need to add to the stylesheet?

22 Apr 2011, 9:18 AM
#19
stevesh avatar

stevesh

Black Belt

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

Re: Logo and a picture in the header

Try adding this to the end of the stylesheet:

**#logoRight {float:right;}

#logoLeft, #logo {float:left;}**

22 Apr 2011, 9:42 AM
#20
truliebliss avatar

truliebliss

New Zenner

Join Date:
Sep 2008
Posts:
41
Plugin Contributions:
1

Re: Logo and a picture in the header

tried that didnt work but you gave me the idea for this

#logo {
	float: center;
	}
#logoRight {
        float: right;
        }
#logoLeft {
        float: left;
        }

Which got them to the left and right but if you take a look its messed this up a little lol so stuck again:unsure:
I tried changing the size in the header but that didnt work either