Results 1 to 6 of 6
  1. #1
    Join Date
    May 2013
    Location
    New Jersey
    Posts
    16
    Plugin Contributions
    0

    Default Adding second image to header

    I have searched posts relevant to my question, and read FAQ sections. I have found this helpful and most of my questions are answered. I have reviewed all posts on adding a second logo in the logoWrapper. I would appreciate it if someone could review my work and let me know what I am doing wrong.

    Zencart V1.5, development computer Windows 7, wamp server 2.2, MySQL 5.5.24, PHP 5.3.13, Apache 2.2.22. Host server Linux uses MySQL 5.5.24, PHP 5.3.13,Apache 2.2.24.

    Am I editing these files correctly and are the files in the right place? I want a gif logo to the left and another gif logo just to the right of that. Can not seem to get it to show both. Only one image will show.

    Edit for logo2 in store\includes\templates\template_default\common\magic\tpl_header.php.

    <!--bof-branding display-->
    <div id="logoWrapper">
    <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_LOGO_WIDTH, HEADER_LOGO_HEIGHT, HEADER_ALT_TEXT) . '</a>'; ?></div>
    <div id="logo2"><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">' . zen_image($template->get_template_dir(HEADER_LOGO2_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . HEADER_LOGO2_IMAGE, HEADER_LOGO2_WIDTH, HEADER_LOGO2_HEIGHT, 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="taglineWrapper">

    Edit for logo2 in store\includes\languages\english\magic\header.php

    // added defines for header alt and text
    define('HEADER_ALT_TEXT', 'Amateur Chef Home Link');
    define('HEADER_SALES_TEXT', '<h1><i>For the Chef in All of Us!</i></h1>');
    define('HEADER_LOGO_WIDTH', '144px');
    define('HEADER_LOGO_HEIGHT', '175px');
    define('HEADER_LOGO_IMAGE', 'logo.gif');
    define('HEADER_LOGO2_WIDTH', '310px');
    define('HEADER_LOGO2_HEIGHT', '54px');
    define('HEADER_LOGO2_IMAGE', 'logo2.gif');

    Edit for logo2 in store\includes\templates\magic\css\stylesheet.css

    LABEL.checkboxLabel, LABEL.radioButtonLabel {
    margin: 0.5em 0.3em;
    }

    #logo, .centerBoxContents, .specialsListBoxContents, .categoryListBoxContents, .centerBoxContentsAlsoPurch, .attribImg {
    float: left;
    }

    #logo2, {
    float: left;
    margin-left: 155px;
    margin-top: 55px;
    }

    LABEL.inputLabel {
    width: 9em;
    float: left;
    }


    Source code when viewed via localhost.

    <!--bof-branding display-->
    <div id="logoWrapper">
    <div id="logo"><a href="http://localhost/store/"><img src="includes/templates/magic/images/logo.gif" alt="Amateur Chef Home Link" title=" Amateur Chef Home Link " width="144" height="175" /></a></div>
    <div id="taglineWrapper">
    <div id="tagline"><h1><i>For the Chef in All of Us!</i></h1></div>
    </div>
    </div>
    <br class="clearBoth" />
    <!--eof-branding display-->

    Thanks

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Adding second image to header

    Try this
    Code:
    <div id="logo2"><img src="images/logo2.gif" alt="" width="???" height="???" /></div>
    Place the image in your main images folder
    Zen-Venom Get Bitten

  3. #3
    Join Date
    May 2013
    Location
    New Jersey
    Posts
    16
    Plugin Contributions
    0

    Default Re: Adding second image to header

    No change. I reviewed all the posts regarding this subject that I could find and though I was doing this right. I'm not sure where it went wrong. Source code is unchanged as well.

  4. #4
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Adding second image to header

    Source code is unchanged as well.
    Well it should have changed with the edit I posted
    Post a link to your install
    Zen-Venom Get Bitten

  5. #5
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Adding second image to header

    You have a stylesheet error:
    Code:
    #logo2, {
    float: left;
    margin-left: 155px;
    margin-top: 55px;
    }
    There must be no comma after the last selector (or the only one).

  6. #6
    Join Date
    May 2013
    Location
    New Jersey
    Posts
    16
    Plugin Contributions
    0

    Default Re: Adding second image to header

    Thanks all. For some reason it was not using the override english\magic\header.php. It was still using the default ZEN file. I replaced this folder with a new one then switched templates to classic then back to my custom template and all is fine. Thanks kobra, i did not use the code but it was helpful in sorting out the problem. Thanks gjh42, the comma is gone.

 

 

Similar Threads

  1. v150 Additional Image Replacing Existing Image Instead of Adding as a Second Image
    By Allaction in forum Setting Up Categories, Products, Attributes
    Replies: 8
    Last Post: 30 Apr 2013, 11:56 PM
  2. How to add second header image???
    By keis779 in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 30 Dec 2009, 04:50 PM
  3. Second nav bar on Header image
    By kiwi1066 in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 15 Sep 2009, 10:42 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg