Forums / Templates, Stylesheets, Page Layout / Multiple banners at once in header position

Multiple banners at once in header position

Locked

Views: 2,528

Results 1 to 9 of 9
This thread is locked. New replies are disabled.
11 Dec 2009, 8:32 PM
#1
easyshop avatar

easyshop

New Zenner

Join Date:
Dec 2009
Posts:
10
Plugin Contributions:
0

Multiple banners at once in header position

Hi,

I'm using ZenCart 1.3.8 for my site http://easyshopping-on-line.com

If you refresh a main page, you will see that there are two banners changing after every refresh. I want them both displayed (one below the other) on the main page only at the same time.

I have created them in "Tools-Banner Manager", both under the "Wide-Banners".

In "Configuration-Layout Settings" under the "Banner Display Groups - Header Position 3" I wrote "Wide-Banners".

They now show up on the main page without any problems, but not at the same time. How can I do that? I read many posts here, but haven't been able to put up the pieces. If someone could please tell me what to do in order?

Thanks in advance..

11 Dec 2009, 8:42 PM
#2
barco57 avatar

barco57

Totally Zenned

Join Date:
Apr 2006
Location:
West Salem, IL
Posts:
2,845
Plugin Contributions:
0

Re: Multiple banners at once in header position

You could lift the code for banner position 2 and move it down right above the code for position 3> then set the banners on separate display groups (1 banner per group) and then you will be able to display both of them at the same time.

Mike
AEIIA - Zen Cart Certified & PCI Compliant Hosting
The Zen Cart Forum...Better than a monitor covered with post-it notes!

11 Dec 2009, 8:48 PM
#3
easyshop avatar

easyshop

New Zenner

Join Date:
Dec 2009
Posts:
10
Plugin Contributions:
0

Re: Multiple banners at once in header position

barco57:

You could lift the code for banner position 2 and move it down right above the code for position 3>

Can you please explain this part? I'm not sure what you mean. How to do that?

And sorry for being such a n00bie. Although I can't believe I'm still unable to crack this, having in mind I constructed the whole site from default zencart template :(

11 Dec 2009, 8:56 PM
#4
barco57 avatar

barco57

Totally Zenned

Join Date:
Apr 2006
Location:
West Salem, IL
Posts:
2,845
Plugin Contributions:
0

Re: Multiple banners at once in header position

Lift this section of code out of includes/templates/default_template/common/tpl_header.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>

Remember to remove it from the tpl_header file. Then you need to insert it into includes/templates/YOUR_CUSTOM_TEMPLATE/common/tpl_main_page.php between the end of bread crumbs comment and the start of banner three:

<!-- eof breadcrumb -->
insert here
<?php
  if (SHOW_BANNERS_GROUP_SET3 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET3)) {

Mike
AEIIA - Zen Cart Certified & PCI Compliant Hosting
The Zen Cart Forum...Better than a monitor covered with post-it notes!

11 Dec 2009, 9:09 PM
#5
easyshop avatar

easyshop

New Zenner

Join Date:
Dec 2009
Posts:
10
Plugin Contributions:
0

Re: Multiple banners at once in header position

I did that but nothing changes.

I put one of the two banners under the group "Wide-Banners" and the other under the "Wide-Banners-2" group I created. Then in "Layout Settings" under the "Banner Display Groups - Header Position 3" I wrote "Wide-Banners:Wide-Banners-2" but nothing changes. They still don't show up together.. :(

11 Dec 2009, 9:29 PM
#6
easyshop avatar

easyshop

New Zenner

Join Date:
Dec 2009
Posts:
10
Plugin Contributions:
0

Re: Multiple banners at once in header position

I solved it. I made a mistake, I should have put the other banner under "Banner Display Groups - Header Position 2" not "Banner Display Groups - Header Position 3".

Great! Thanks barco57

11 Dec 2009, 9:33 PM
#7
barco57 avatar

barco57

Totally Zenned

Join Date:
Apr 2006
Location:
West Salem, IL
Posts:
2,845
Plugin Contributions:
0

Re: Multiple banners at once in header position

Your Welcome

edit: there is still something funky going on. If I refresh the page a few times the banners keep moving around or the smaller banner will display double. Make sure banner position 2 has a unique group name and only 1 banner attached to that group and the same for banner position 3

Mike
AEIIA - Zen Cart Certified & PCI Compliant Hosting
The Zen Cart Forum...Better than a monitor covered with post-it notes!

11 Dec 2009, 9:48 PM
#8
easyshop avatar

easyshop

New Zenner

Join Date:
Dec 2009
Posts:
10
Plugin Contributions:
0

Re: Multiple banners at once in header position

Yeah, I know. I've been playing with tpl_main_page.php a little - that's the reason. I've fixed it. It's ok now. Thanks once again.

11 Jun 2010, 9:27 PM
#9
rrzc avatar

rrzc

New Zenner

Join Date:
May 2010
Posts:
52
Plugin Contributions:
0

Re: Multiple banners at once in header position

This solution works, but does anyone know how to make the banners appear side-by-side instead of on top of each other?