Logo Issue

Views: 2,247

Results 21 to 32 of 32
8 Nov 2017, 8:54 PM
#21
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,843
Plugin Contributions:
17

Logo Issue

stephenrose2006:

i think i got it now. thank you for your help
Yep, seems to be working. Interesting that it comes up with hard-coded numbers of 1425 x 356:huh:

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

8 Nov 2017, 9:01 PM
#22
stephenrose2006 avatar

stephenrose2006

New Zenner

Join Date:
Nov 2017
Location:
United States
Posts:
15
Plugin Contributions:
0

Re: Logo Issue

when i put # in that location i see them on my page

#<!--bof branding display-->
#<div id="logoWrapper" class="group onerow-fluid">

<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>'; ?>

#<?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>

#<?php

}

#?>
#<?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>

#<?php } // no HEADER_SALES_TEXT or SHOW_BANNERS_GROUP_SET2 ?>

</div>

#</div>

#<!--eof branding display-->

8 Nov 2017, 9:16 PM
#23
stephenrose2006 avatar

stephenrose2006

New Zenner

Join Date:
Nov 2017
Location:
United States
Posts:
15
Plugin Contributions:
0

Re: Logo Issue

for some reason no matter what i put in the header.php it was using the size of my image which was 1200x300. i incrementally increased the size and noticed that it changed with it. not the ideal way to fix it but i guess it works. :unsure:

8 Nov 2017, 9:21 PM
#24
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,843
Plugin Contributions:
17

Re: Logo Issue

Sorry, I was speaking of the menu that shows up when you reply to a post. The last menu group on the right has # <> and a php icon. When displaying code from a file, one should click on the # to create a block for the code to be presented.

The copy of your file that I was asking for would look like```

<!--bof branding display--><div id="logoWrapper" class="group onerow-fluid">
<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>'; ?>
<?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>
<?php } ?> <?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> <?php } // no HEADER_SALES_TEXT or SHOW_BANNERS_GROUP_SET2 ?> </div> </div> <!--eof branding display-->

I've found an old thread that seems to indicate that the defined height and weight is not really being used for the page creation but, instead, the actual size of the image.  <https://www.zen-cart.com/showthread.php?126221-Logo-size-not-right-in-header>.

For you now, if everything is working, there's no need to do any further.  However, I would like to explore this further myself.

Please confirm that your includes/languages/english/responsive_classic/header.php DOES NOT contain 1425 x 356 for the height and width settings.

THANX

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

8 Nov 2017, 9:30 PM
#25
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,843
Plugin Contributions:
17

Re: Logo Issue

Okay, we're posting out of order a bit but, it looks as if the old problem exists.

Please replace the 100% in the header.php and we'll try to fix the other tpl file.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

8 Nov 2017, 10:01 PM
#26
stephenrose2006 avatar

stephenrose2006

New Zenner

Join Date:
Nov 2017
Location:
United States
Posts:
15
Plugin Contributions:
0

Re: Logo Issue

it does not, it shows 100%, let me look at that code and comment the red part out

8 Nov 2017, 10:27 PM
#27
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,843
Plugin Contributions:
17

Re: Logo Issue

Okay, I have confirmed that there is a bug in the includes/templates/template_default/common/tpl_header.php file. The same bug exists in the includes/templates/responsive_classic/common/tpl_header.php file. If you have copied either to a YOUR_TEMPLATE folder you will have copied the problem with it.

To fix - Find the version of the includes/templates/YOUR_TEMPLATE/common/tpl_header.php file that you are currently using in your shop.

Replace the branding display section```

<!--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_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">
<?php if (HEADER_SALES_TEXT != '') { ?>
  <div id="tagline"><?php echo HEADER_SALES_TEXT;?></div>
<?php } ?> <?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>
<?php } // no HEADER_SALES_TEXT or SHOW_BANNERS_GROUP_SET2 ?> </div> <br class="clearBoth" /> <!--eof-branding display--> ```with the following code``` <!--bof branding display--><div id="logoWrapper" class="group onerow-fluid"> <div id="logo"><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '"><img src="' . DIR_WS_TEMPLATE . 'images/' . HEADER_LOGO_IMAGE . '" height="' . HEADER_LOGO_HEIGHT . '" width="'. HEADER_LOGO_WIDTH .'" alt="' . HEADER_ALT_TEXT . '" title="' . HEADER_ALT_TEXT . '"></a>' ?> <?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> <?php } ?> <?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> <?php } // no HEADER_SALES_TEXT or SHOW_BANNERS_GROUP_SET2 ?> </div> </div> <!--eof branding display-->

What this does is actually USE the settings from includes/languages/english/header.php OR includes/languages/english/YOUR_template/header.php when resizing the logo image to a greater width or height than the image itself.

If a person was trying to make a 700 x 200 logo be 1400 x 400 or to give the image 100% of the width, the system would never go past the actual image size.

This has been around for some time and is still present in 1.5.6 and 1.6.0 development files.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

8 Nov 2017, 10:28 PM
#28
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,843
Plugin Contributions:
17

Re: Logo Issue

stephenrose2006:

it does not, it shows 100%, let me look at that code and comment the red part out
:shocking: Nothing was said or implied about commenting anything out.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

8 Nov 2017, 10:44 PM
#29
stephenrose2006 avatar

stephenrose2006

New Zenner

Join Date:
Nov 2017
Location:
United States
Posts:
15
Plugin Contributions:
0

Re: Logo Issue

this has been replaced and original image is back. and now showing to be correct. thank you for the help

8 Nov 2017, 11:12 PM
#30
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,843
Plugin Contributions:
17

Re: Logo Issue

In post 27, above there is a mistake in the correction code.```

<!--bof branding display--> <!-- Changed by JET --><div id="logoWrapper" class="group onerow-fluid">
<div id="logo"><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '"><img src="' . DIR_WS_TEMPLATE .  'images/' . HEADER_LOGO_IMAGE . '" height="' . HEADER_LOGO_HEIGHT . '" width="'. HEADER_LOGO_WIDTH .'" alt="' . HEADER_ALT_TEXT . '" title="' . HEADER_ALT_TEXT . '"></a>' ?>
<?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>
<?php } ?> <?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> <?php } // no HEADER_SALES_TEXT or SHOW_BANNERS_GROUP_SET2 ?> </div> </div> <!--eof branding display-->

Should be:

<!--bof branding display--> <!-- Changed by JET --><div id="logoWrapper" class="group onerow-fluid">
<div id="logo"><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '"><img src="' . DIR_WS_TEMPLATE .  'images/' . HEADER_LOGO_IMAGE . '" height="' . HEADER_LOGO_HEIGHT . '" width="'. HEADER_LOGO_WIDTH .'" alt="' . HEADER_ALT_TEXT . '" title="' . 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">
<?php if (HEADER_SALES_TEXT != '') { ?>
  <div id="tagline"><?php echo HEADER_SALES_TEXT;?></div>
<?php } ?> <?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> <?php } // no HEADER_SALES_TEXT or SHOW_BANNERS_GROUP_SET2 ?> </div> </div> <!--eof branding display-->

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

16 Nov 2017, 12:19 AM
#31
richd avatar

richd

New Zenner

Join Date:
Jun 2012
Location:
Los Angeles, CA
Posts:
6
Plugin Contributions:
0

Re: Logo Issue

Hey, Nice fix :)

--Rich

16 Nov 2017, 1:37 AM
#32
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,843
Plugin Contributions:
17

Re: Logo Issue

OOPS! I forgot to return with the final that got included into 1.5.6. The above works but, this is a lot cleaner thanks to DrByte.
includes/templates/template_default/common/tpl_header.php
includes/templates/responsive_classic/common/tpl_header.php
includes/templates/YOUR_TEMPLATE/common/tpl_header.php
This occurs on different lines in each of the documents. You only need to change the one that effects your current cart. It will be replaced in all instances in 1.5.6 and later.

<!--bof branding display-->
<div id="logoWrapper" class="group onerow-fluid">
    <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>
<?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>
<?php
  }
?>
<?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>
<?php } // no HEADER_SALES_TEXT or SHOW_BANNERS_GROUP_SET2 ?>
  </div>
</div>


<!--eof branding display-->

Furthermore, what I discovered is that the height seems to not be used BUT has to be a value in the header.php and a call in this file. Prior to this change, the logo image HAD to be sized outside the system. If you needed a 900px x 450px image, you could not use an 1800px x 900px image and tell the header.php to resize it to 900px x 450px.
After this patch, you can use any original size image and tell the header.php to increase or decrease the logo's size by changing the width. Changing the height has no effect.
The good news is that the image is resized proportionately. IOW, if you put 1350px for the width of the image that is a size 1800px x 900px, the system will automatically adjust the height to 675px.
Just make sure you don't pixelate the image in the process.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com