Zen Cart Logo
Forums / Basic Configuration / how do I disable banner sidebox header?

how do I disable banner sidebox header?

Locked

Views: 7,011

Results 1 to 17 of 17
This thread is locked. New replies are disabled.
25 May 2009, 4:25 AM
#1
kkymn avatar

kkymn

New Zenner

Join Date:
May 2009
Posts:
3
Plugin Contributions:
0

how do I disable banner sidebox header?

http://www.kkymn.com/handy35/zencartforumquestionimage.jpg

I am a keen observer of this forum. I learned a lot from the contributors thank you all.

But no matter how much I searched I never got the answer to this specific question. The problem is explained on the image.

Any help would be deeply appreciated.

Regards.

25 May 2009, 8:22 AM
#2
dbltoe avatar

dbltoe

Totally Zenned

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

Re: how do I disable banner sidebox header?

firefox with firebug will point you in the right direction.

25 May 2009, 7:03 PM
#3
kkymn avatar

kkymn

New Zenner

Join Date:
May 2009
Posts:
3
Plugin Contributions:
0

Re: how do I disable banner sidebox header?

Well I can learn real fast and I am ready to spend 8 hours straight to solve this problems but please can some one give me a real short 3 lines hint about where to start?

What should I look in the codes for this?

26 May 2009, 1:30 PM
#4
phil020782 avatar

phil020782

Zen Follower

Join Date:
Jul 2007
Posts:
158
Plugin Contributions:
0

Re: how do I disable banner sidebox header?

Hi kkymn,

I recently had a similar problem, I wanted to have 5 adverts show in 1 sidebox.
I eventually figured out that the only way to do that was to have 5 seperate sideboxes but that left me with the same problem you have, headers on every box.

This is what it looks like now:
www.personalised-certificates.com
The adverts at the right are actually 5 sideboxes together.

Here's how I removed the headers.

Step 1
Open includes->templates->template_default->common->tpl_box_default_right.php

scroll to the bottom and remove this:

<h3 class="rightBoxHeading" id="<?php echo str_replace('_', '-', $box_id) . 'Heading'; ?>"><?php echo $title; ?></h3>

Rename this file tpl_box_noheader_right.php and save to includes->templates->CUSTOM TEMPLATE->common

Step 2
open includes->modules->sideboxes->banner_box.php (or whatever box you are wanting to remove header from)
Around line 28 find this:

$title =  BOX_HEADING_BANNER_BOX;

and replace with this:

$title =  '';

Then just under find this:

require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);

and replace with this:

require($template->get_template_dir('tpl_box_noheader_right.php', DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . '/tpl_box_noheader_right.php');

Save this file to includes->modules->sideboxes->CUSTOM TEMPLATE

And that should be it.

26 May 2009, 1:40 PM
#5
Kim avatar

Kim

Obaa-san

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

Re: how do I disable banner sidebox header?

No need to mess with the php - use the stylesheet to disable the headers you don't want with:

#nameOfTheBox h3 {display: none;}

26 May 2009, 7:59 PM
#6
kkymn avatar

kkymn

New Zenner

Join Date:
May 2009
Posts:
3
Plugin Contributions:
0

Re: how do I disable banner sidebox header?

Phil020782 I salute you.

I did what you said and it worked like a charm.

I thank you from the bottom of my hard that you took all this time and effort and prepared these amazing instructions for me.

thank you! thank you! thank you!

This community is just too good to be true. So many selfless people! and I am sure every one benefiting from this community appreciates at least as much as me.

Regards to everyone.

17 Jun 2009, 10:37 PM
#7
jcastr avatar

jcastr

New Zenner

Join Date:
May 2009
Posts:
6
Plugin Contributions:
0

Re: how do I disable banner sidebox header?

If you want to remove the heading from either a left or right sidebox you can just do the following and you don't need to create extra files or do anything else:

  1. Edit the tpl_box_default_left.php or tpl_box_default_right.php (depending on which side you want to place the banner box) from the \includes\templates\YOUR_TEMPLATE\common\ directory.

  2. For tpl_box_default_left.php replace everything between

    <!--// bof: <?php echo $box_id; ?> //-->
    and
    <!--// eof: <?php echo $box_id; ?> //-->
    with:
    <?php if ($box_id == "bannerbox") { echo $content; } else {?>

<div class="leftBoxContainer" id="<?php echo str_replace('_', '-', $box_id ); ?>" style="width: <?php echo $column_width; ?>"> <div class="sidebox-header-left <?php echo $header_left; ?>"> <h3 class="leftBoxHeading <?php echo $header_right; ?>" id="<?php echo str_replace('_', '-', $box_id) . 'Heading'; ?>"><?php echo $title; ?></h3> </div> <?php echo $content; ?> </div> <?php } ?>
  1. For tpl_box_default_right.php replace everything between
    <!--// bof: <?php echo $box_id; ?> //-->
    and
    <!--// eof: <?php echo $box_id; ?> //-->
    with:
    <?php if ($box_id == "bannerbox") { echo $content; } else {?>
<div class="rightBoxContainer" id="<?php echo str_replace('_', '-', $box_id ); ?>" style="width: <?php echo $column_width; ?>"> <div class="sidebox-header-left"><h3 class="rightBoxHeading" id="<?php echo str_replace('_', '-', $box_id) . 'Heading'; ?>"><?php echo $title; ?></h3></div> <?php echo $content; ?> </div> <?php } ?>
17 Jun 2009, 11:00 PM
#8
dbltoe avatar

dbltoe

Totally Zenned

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

Re: how do I disable banner sidebox header?

Again, as Kim pointed out earlier, there's no need to mess with PHP. It can all be done in the css. That way, later changes will not have to look in two places but just one.

It is truly amazing the amount of changes you can make without touching a single PHP file.

18 Jun 2009, 3:21 AM
#9
jcastr avatar

jcastr

New Zenner

Join Date:
May 2009
Posts:
6
Plugin Contributions:
0

Re: how do I disable banner sidebox header?

Will only work if you want to remove all the headings for every box on one side. The relevant portion of the stylesheet is H3.leftBoxHeading, H3.rightBoxHeading. If you apply {display: none;} to it you will wipe out the headings for every sidebox. You would have to create a new class in the PHP and name it something like "bannerboxclass" and put it in an if then else statement to display it, then create a new section in the stylesheet to appy the {display: none;}. You'd have to do a lot more php coding on top of messing with the stylesheet. My solution is quick and clean and let's you target specific boxes.

18 Jun 2009, 7:25 PM
#10
dbltoe avatar

dbltoe

Totally Zenned

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

Re: how do I disable banner sidebox header?

Hate to bust a bubble, but try this and see if the Information Box header doesn't disappear.> #information h3{

display: none;
}Or this to ge trid of the categories header.> #categories h3 {
display: none;
}What you may be forgetting is that each box has it's own id. It may not be listed in the stylesheet, but it is there ready to be turned off as easy as above.

16 Jul 2009, 4:05 PM
#11
dytron avatar

dytron

New Zenner

Join Date:
Feb 2008
Posts:
60
Plugin Contributions:
0

Re: how do I disable banner sidebox header?

dbltoe:

Hate to bust a bubble, but try this and see if the Information Box header doesn't disappear.Or this to ge trid of the categories header.What you may be forgetting is that each box has it's own id. It may not be listed in the stylesheet, but it is there ready to be turned off as easy as above.

dbltoe is double correct here :clap: dont mess with the PHP code if you dont have too use CSS to remove the headings much cleaner and you only have 1 place to mess with for changes in the future.:flex:

below is what mine looks like;

/* turn off the header for the bannerbox*/	
#bannerbox h3, #helpsidebox h3, #categories h3 {display:none;}
24 Jul 2009, 1:48 AM
#12
btolly avatar

btolly

New Zenner

Join Date:
May 2009
Posts:
59
Plugin Contributions:
0

Re: how do I disable banner sidebox header?

Just what I was looking for- the CSS is the way to go- works like a charm!
:clap:

11 Aug 2009, 8:39 AM
#13
tinkerdesign avatar

tinkerdesign

New Zenner

Join Date:
Jul 2009
Posts:
26
Plugin Contributions:
0

Re: how do I disable banner sidebox header?

Thank you!:clap:

5 Sep 2009, 6:59 PM
#14
doooomed avatar

doooomed

Zen Follower

Join Date:
Jun 2009
Posts:
275
Plugin Contributions:
0

Re: how do I disable banner sidebox header?

Hi, I am trying to do this (remove the header from a side box) myself using the css method, but I can't seem to find anything in css to do this. The things previous posters are mentioning do not seem to exist on my css. I am a newbie in case you haven't figured that out... Thanks for any help!

5 Sep 2009, 7:04 PM
#15
dbltoe avatar

dbltoe

Totally Zenned

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

Re: how do I disable banner sidebox header?

Could be you're looking in the wrong css.
One of the posting tips is to include a link to your site.

5 Sep 2009, 7:27 PM
#16
doooomed avatar

doooomed

Zen Follower

Join Date:
Jun 2009
Posts:
275
Plugin Contributions:
0

Re: how do I disable banner sidebox header?

oops, sorry! http://www.doooomed.com

if you look at the bottom left box it reads "sponsors." I'd like it to just be blank with just the banners.

27 Sep 2009, 1:03 AM
#17
frito avatar

frito

New Zenner

Join Date:
Jul 2009
Posts:
2
Plugin Contributions:
0

Re: how do I disable banner sidebox header?

The css code may look different than the example shown above. My css code looks like this:

#bannerboxHeading {
	background-color: #363942;
}

Change it to:

#bannerboxHeading {display:none;
	background-color: #363942;
}

This is what worked for me. My "Sponsors" label shows no more.

Good luck.