Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Replace Logo Link w/ Banner

Replace Logo Link w/ Banner

Locked

Views: 5,598

Results 1 to 20 of 26
This thread is locked. New replies are disabled.
12 Oct 2006, 10:03 PM
#1
lawbird123 avatar

lawbird123

Zen Follower

Join Date:
Sep 2006
Location:
Jacksonville, FL
Posts:
231
Plugin Contributions:
0

Replace Logo Link w/ Banner

Hi All,

I would like to turn my header into a banner. I already have the banner ready to go and when it loads it shows up on the bottom of my zen cart instead of the top where I would like it in place of the logo. What's the easiest way to go about this? Any help would be appreciated! Thanks!

12 Oct 2006, 11:51 PM
#2
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,611
Plugin Contributions:
0

Re: Replace Logo Link w/ Banner

You realize that if you do that there will be folks that have banners blocked that will not see your header.

13 Oct 2006, 1:49 AM
#3
awoman avatar

awoman

Zen Follower

Join Date:
Dec 2005
Posts:
142
Plugin Contributions:
0

Re: Replace Logo Link w/ Banner

Are you wanting to add a static banner or do you mean a header image?

13 Oct 2006, 1:17 PM
#4
lawbird123 avatar

lawbird123

Zen Follower

Join Date:
Sep 2006
Location:
Jacksonville, FL
Posts:
231
Plugin Contributions:
0

Re: Replace Logo Link w/ Banner

I didnt realize people blocked banners. I would like to replace the entire header with a swf. Is there a way to do this? Is there a way around banners not being blocked?

13 Oct 2006, 2:22 PM
#5
kobra avatar

kobra

Black Belt

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

Re: Replace Logo Link w/ Banner

Start with this link Help with flash
And also search here for header & flash for additional threads.

13 Oct 2006, 6:57 PM
#6
lawbird123 avatar

lawbird123

Zen Follower

Join Date:
Sep 2006
Location:
Jacksonville, FL
Posts:
231
Plugin Contributions:
0

Re: Replace Logo Link w/ Banner

I've got the flash loaded. My problem is getting rid of the icon. I have included a pic that shows what I'm seeing in IE... my swf is circled in blue and my logo is circled in red. I'd like to knock out that red section (logo) so that all I have is my swf in the header. I've tried commenting out the logo text in the header.php and I've tried a few things with the tpl_header to no avail. I saw that someone else with a previous version of ZC came up with this in his stylesheet:

/*HEADER CSS*/

/*TABLE.header {
	background: #ffffff;
	background-image: url(../images/header_bg.gif);
	background-repeat: repeat-x;
	width: 779px !important;
	background-color: #ffffff;
	border-right: 1px solid #9a9a9a;
	border-left: 1px solid #9a9a9a;
	border-bottom: 1px solid #9a9a9a;
	height: 200px;
}*/

He was able to comment out the header css text in one foul swoop. Any ideas on how I can do the equivalent to this in v.1.3.x.

14 Oct 2006, 12:43 AM
#7
seethrou avatar

seethrou

Totally Zenned

Join Date:
May 2004
Location:
Hong Kong
Posts:
1,156
Plugin Contributions:
0

Re: Replace Logo Link w/ Banner

How about the logoWrapper in v1.3.x :smile:

#logoWrapper {
	width:100%;
	height:105px;
	background-image:url(../images/header_bg.jpg);
	background-repeat:no-repeat;
	background-position: left;
	text-align:center;
	padding-top:5px;
	}
16 Oct 2006, 7:28 PM
#8
lawbird123 avatar

lawbird123

Zen Follower

Join Date:
Sep 2006
Location:
Jacksonville, FL
Posts:
231
Plugin Contributions:
0

Re: Replace Logo Link w/ Banner

im not seeing that in my stylesheet... should i be looking somewhere else?

16 Oct 2006, 7:47 PM
#9
kobra avatar

kobra

Black Belt

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

Re: Replace Logo Link w/ Banner

LawBird,

Post a url and I am sure that you will receive much mor rapid and targeted responses.

16 Oct 2006, 8:25 PM
#11
kobra avatar

kobra

Black Belt

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

Re: Replace Logo Link w/ Banner

I've got the flash loaded. My problem is getting rid of the icon.
I looked at it in FF and IE and do not know what icon you are referring to???
The pic that you thought you loaded in an earlier post was not available.

Viewing the header it appears to all be swf...no separate logo image that I could see.

Just refreshed in IE and there is a small box with a red X in it...is this what you are referring to??
Right click reveals that this is a second instance of "header.swf"...

You have commented out what I consider too much in at least 2 areas;

At about line #121 and line #185 in your stylesheet.css. I did not see any relavance to having these commented out and will affect display of the associated items that are also included when you customers load the pages where these are rendered.

16 Oct 2006, 8:33 PM
#12
lawbird123 avatar

lawbird123

Zen Follower

Join Date:
Sep 2006
Location:
Jacksonville, FL
Posts:
231
Plugin Contributions:
0

Re: Replace Logo Link w/ Banner

Thanks Kobra! How would I get rid of this second instance of header.swf?

16 Oct 2006, 8:43 PM
#13
kobra avatar

kobra

Black Belt

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

Re: Replace Logo Link w/ Banner

It should not be there and one would have to have access to the code changes that installed the swf to even make a guess....Have you inadvertantly attempted to get this working through more than one file? If you are using the overrides check all the files that you have touched for this.

16 Oct 2006, 9:20 PM
#14
lawbird123 avatar

lawbird123

Zen Follower

Join Date:
Sep 2006
Location:
Jacksonville, FL
Posts:
231
Plugin Contributions:
0

Re: Replace Logo Link w/ Banner

Yeah, I did try a couple different methods to get the swf header working... I think thats fixed, but now my swf and main body of the cart are colliding with each other. Do I need to adjust the margin size somewhere?

17 Oct 2006, 4:13 AM
#15
kobra avatar

kobra

Black Belt

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

Re: Replace Logo Link w/ Banner

Not sure but viewing your source I am still seeing 2 instances of the swf:

<!--bof-navigation display-->

<div id="navMainWrapper">

<div id="navMain">

    <ul class="back">

    <li>
	<object width="800" height="144" margin-top="0">

                
                <embed src="http://www.studiostyles.net/studiostyles_0905/store/zen-cart-090706/includes/templates/jlawless/images/header.swf" width="800" height="144"></embed>
                
                </object></a></li>
``` And

<!--bof-branding display-->

<div id="logoWrapper">
<div id="logo"><a href="http://www.studiostyles.net/studiostyles_0905/store/zen-cart-090706/"><img src="includes/templates/jlawless/images/header.swf" alt="Studio Styles" title=" Studio Styles " width="800" height="144" /></a></div>
</div> ``` I would look at your tpl_header.php once again as I think that the second one with the alt="Studio Styles" is the one showing up below with the red "X" in the box. But this might be the one that should be retained but you might want to reorder the nav to be below the branding.
17 Oct 2006, 7:47 AM
#16
neunetllc_com avatar

neunetllc_com

Banned

Join Date:
Oct 2006
Location:
New Albany Ohio
Posts:
113
Plugin Contributions:
0

Re: Replace Logo Link w/ Banner

i've got a good solution to the flash embed/activation problem. i've submitted it as a contribution but they haven't posted it yet for download (i think it's heading for the 'other modules' section).

in the meantime, i've made it available here at neunetllc.com

just 1 php function call handles the javascript and html output. sure beats going to a code generator every time you want to embed flash. not to mention just 1 line of code makes putting it anywhere you want a lot easier to manage the surrounding code.

hope this helps.

17 Oct 2006, 1:18 PM
#17
lawbird123 avatar

lawbird123

Zen Follower

Join Date:
Sep 2006
Location:
Jacksonville, FL
Posts:
231
Plugin Contributions:
0

Re: Replace Logo Link w/ Banner

Kobra,

In my tpl_header.php I have the navigation display code as follows:

<!--bof-navigation display-->

<div id="navMainWrapper">

<div id="navMain">

    <ul class="back">

    <li>
	<object width="800" height="144" margin-top="0">
                
                <embed src="http://www.studiostyles.net/studiostyles_0905/store/zen-cart-090706/includes/templates/jlawless/images/header.swf" width="800" height="144"></embed>
                
                </object></a></li>

<?php if ($_SESSION['customer_id']) { ?>

    <li><a href="<?php echo zen_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGOFF; ?></a></li>

    <li><a href="<?php echo zen_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a></li>

<?php

      } else {

        if (STORE_STATUS == '0') {

?>

    <li><a href="<?php echo zen_href_link(FILENAME_LOGIN, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGIN; ?></a></li>

<?php } } ?>



<?php if ($_SESSION['cart']->count_contents() != 0) { ?>

    <li><a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a></li>

    <li><a href="<?php echo zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>"><?php echo HEADER_TITLE_CHECKOUT; ?></a></li>

<?php }?>

</ul>

</div>

<div class="navMainSearch forward"><?php require(DIR_WS_MODULES . 'sideboxes/search_header.php'); ?></div>

<br class="clearBoth" />

</div>

<!--eof-navigation display-->

And, then, my branding display as follows:

<!--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-->

When I open the page, I see the source code that you have posted, but I'm not sure how to change that out in the tpl_header.php because I'm not "seeing" it. I see the "php echo<a href= blah blah blah" and I think thats looking at something else. I have replaced my logo.gif with header.swf in both my server_info.php as well as my header.php because I thought I had to change out every instance of logo.gif that could be found with the developer's tool kit. Should I undo this? If so, what should be put in the header.php and server_info.php? I will try moving my navigation display.

17 Oct 2006, 2:52 PM
#18
lawbird123 avatar

lawbird123

Zen Follower

Join Date:
Sep 2006
Location:
Jacksonville, FL
Posts:
231
Plugin Contributions:
0

Re: Replace Logo Link w/ Banner

neunetllc,

I've been trying to work your solution into my zencart, but that doesn't seem to be working either. I'm pretty sure I'm following the instructions properly, but I keep getting the following error messages on my catalog site:

Warning: main(includes/templates/template_default/nnez_com/nnez_flo_output.php): failed to open stream: No such file or directory in /home/content/s/t/u/mysite/html/mycart/includes/init_includes/init_general_funcs.php on line 75

Warning: main(includes/templates/template_default/nnez_com/nnez_flo_output.php): failed to open stream: No such file or directory in /home/content/s/t/u/mysite/html/mycart/includes/init_includes/init_general_funcs.php on line 75

Warning: main(): Failed opening 'includes/templates/template_default/nnez_com/nnez_flo_output.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/content/s/t/u/mysite/html/mycart/includes/init_includes/init_general_funcs.php on line 75

Any ideas as to what I might be doing wrong?

17 Oct 2006, 5:42 PM
#19
lawbird123 avatar

lawbird123

Zen Follower

Join Date:
Sep 2006
Location:
Jacksonville, FL
Posts:
231
Plugin Contributions:
0

Re: Replace Logo Link w/ Banner

Right now, there's only one instance of the swf. I just need to know how to make room for the header in my page. The swf in the footer seems to be working well and is positioned properly. I did the same thing in the tpl_footer.php as I did in the tpl_header.php. Here is my tpl_header.php code:

<?php

/**

 * Common Template - tpl_header.php

 *

 * this file can be copied to /templates/your_template_dir/pagename<br />

 * example: to override the privacy page<br />

 * make a directory /templates/my_template/privacy<br />

 * copy /templates/templates_defaults/common/tpl_footer.php to /templates/my_template/privacy/tpl_header.php<br />

 * to override the global settings and turn off the footer un-comment the following line:<br />

 * <br />

 * $flag_disable_header = true;<br />

 *

 * @package templateSystem

 * @copyright Copyright 2003-2006 Zen Cart Development Team

 * @copyright Portions Copyright 2003 osCommerce

 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0

 * @version $Id: tpl_header.php 4066 2006-08-06 05:50:06Z ajeh $

 */

?>



<?php

  // Display all header alerts via messageStack:

  if ($messageStack->size('header') > 0) {

    echo $messageStack->output('header');

  }

  if (isset($_GET['error_message']) && zen_not_null($_GET['error_message'])) {

  echo htmlspecialchars(urldecode($_GET['error_message']));

  }

  if (isset($_GET['info_message']) && zen_not_null($_GET['info_message'])) {

   echo htmlspecialchars($_GET['info_message']);

} else {



}

?>




<!--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-->


<!--bof-header logo and navigation display-->

<?php

if (!isset($flag_disable_header) || !$flag_disable_header) {

?>



<div id="headerWrapper">

<!--bof-navigation display-->

<div id="navMainWrapper">

<div id="navMain">

    <ul class="back">

    <li>
	<object width="800" height="144" margin-top="0">
                
                <embed src="http://www.studiostyles.net/studiostyles_0905/store/zen-cart-090706/includes/templates/jlawless/images/header.swf" width="800" height="144"></embed>
                
                </object></a></li>
 
<!--  nice 'n ez flash -->

<!-- 
<?php echo get_flashed('header','800','144');

?>
 -->

<?php if ($_SESSION['customer_id']) { ?>

    <li><a href="<?php echo zen_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGOFF; ?></a></li>

    <li><a href="<?php echo zen_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a></li>

<?php

      } else {

        if (STORE_STATUS == '0') {

?>

    <li><a href="<?php echo zen_href_link(FILENAME_LOGIN, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGIN; ?></a></li>

<?php } } ?>



<?php if ($_SESSION['cart']->count_contents() != 0) { ?>

    <li><a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a></li>

    <li><a href="<?php echo zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>"><?php echo HEADER_TITLE_CHECKOUT; ?></a></li>

<?php }?>

</ul>

</div>

<div class="navMainSearch forward"><?php require(DIR_WS_MODULES . 'sideboxes/search_header.php'); ?></div>

<br class="clearBoth" />

</div>

<!--eof-navigation display-->



<!--eof-header logo and navigation display-->



<!--bof-optional categories tabs navigation display-->

<?php require($template->get_template_dir('tpl_modules_categories_tabs.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_categories_tabs.php'); ?>

<!--eof-optional categories tabs navigation display-->



<!--bof-header ezpage links-->

<?php if (EZPAGES_STATUS_HEADER == '1' or (EZPAGES_STATUS_HEADER == '2' and (strstr(EXCLUDE_ADMIN_IP_FOR_MAINTENANCE, $_SERVER['REMOTE_ADDR'])))) { ?>

<?php require($template->get_template_dir('tpl_ezpages_bar_header.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_ezpages_bar_header.php'); ?>

<?php } ?>

<!--eof-header ezpage links-->

</div>

<?php } ?>

Any ideas on how I can fix this issue?

17 Oct 2006, 8:16 PM
#20
kobra avatar

kobra

Black Belt

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

Re: Replace Logo Link w/ Banner

The <!--bof-branding display--> and the contents to and including <!--eof-branding display-->

Should be right before the <!--bof-navigation display--> so that it is contained within the headerWrapper div.