My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.
I am using banner 3 for.
What do you mean wrong banner?
Using Zen Cart 1.5.1
I tried the following:
No it does not work. Thank you.PHP Code:<?php
if ($this_is_home_page && (SHOW_BANNERS_GROUP_SET3 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET3))) {
if ($banner->RecordCount() > 0) {
?>
<div id="bannerThree" class="banners"><?php echo zen_display_banner('static', $banner); ?></div>
<?php
}
}
?>
Using Zen Cart 1.5.1
Unless, I have written it wrong, it is not good.PHP Code:<?php
if ($this_is_home_page) {
if (SHOW_BANNERS_GROUP_SET3 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET3)) {
if ($banner->RecordCount() > 0) {
?>
<div id="bannerThree" class="banners"><?php echo zen_display_banner('static', $banner); ?></div>
<?php
}
}
}
?>
Using Zen Cart 1.5.1
I just found out something, when I place the Wide-Banner to Header Position 3, and with the following code, it works.
PHP Code:<?php
if ($this_is_home_page) {
if (SHOW_BANNERS_GROUP_SET3 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET3)) {
if ($banner->RecordCount() > 0) {
?>
<div id="bannerThree" class="banners"><?php echo zen_display_banner('static', $banner); ?></div>
<?php
}
}
}
?>
Banner shows up in Header Position 3 on the index page and NOT on all other pages. (The code works)
But, the Footer Position 3 Wide-Banner shows up on all pages.
How is the footer section controlled?
Using Zen Cart 1.5.1
Problem solved.
It is SHOW_BANNERS_GROUP_SET6 and not SHOW_BANNERS_GROUP_SET3
It works fine now.PHP Code:<!--bof- banner #6 display -->
<?php
if ($this_is_home_page) {
if (SHOW_BANNERS_GROUP_SET6 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET6)) {
if ($banner->RecordCount() > 0) {
?>
<div id="bannerSix" class="banners"><?php echo zen_display_banner('static', $banner); ?></div>
<?php
}
}
}
?>
<!--eof- banner #6 display -->
Thank you picandnix, swguy and DivaVocals.
Using Zen Cart 1.5.1
By the way Ajeh's and picandnix's original suggestion works fine also. The numbers got me confused. In the admin I think it should be called positions 1 through 6. But I am sure there are a lot of other things to consider!
That was a nice 5 hours.PHP Code:<!--bof- banner #6 display -->
<?php
if ($this_is_home_page && SHOW_BANNERS_GROUP_SET6 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET6)) {
if ($banner->RecordCount() > 0) {
?>
<div id="bannerSix" class="banners"><?php echo zen_display_banner('static', $banner); ?></div>
<?php
}
}
?>
<!--eof- banner #6 display -->
Last edited by Kevin205; 10 May 2013 at 11:38 PM.
Using Zen Cart 1.5.1