Need help with this too
Need help with this too
Finally someone with the same problem as mine.
If you will find a solution please post.
This is how i fixed it:
In tpl_main_page.php file (line 108), instead of
<div id="bannerThree" class="banners"><?php echo zen_display_banner('static', $banner); ?></div>
i have
<div id="bannerThree" class="banners"><?php if($this_is_home_page) echo zen_display_banner('static', $banner); ?></div>
That's all, now my banner are showing only on the home page. Hope this will help you!
This is great!
As a follow up to this, if you want the banner to show up only on certain pages aside from the home page, how does the naming convention go?
Be certain to backup your files AND your database FIRST.
Let's add more banner group name character space...
Admin > Tools > Install SQL Patches
ALTER TABLE banners MODIFY COLUMN banners_group VARCHAR(32);
(the original length is 15 characters)
Next add a banner to the top of every checkout page:
includes/templates/YOUR_TEMPLATE/common/tpl_main_page.php
Add line 152 (after breadcrumbs)<?php
// Twitch Banner in Checkout Only with CSS in banner HTML
if (in_array($current_page_base,explode(",",'shopping_cart,checkout_shipping,checko ut_shipping_address,checkout_payment,checkout_payment_address,checkout_confirmat ion,checkout_success')) ) {
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
}
}}
?>
Add Banner Group:
Admin > Configuration > Layout Settings > Banner Display Group - Header Position 3
Enter: bannerCheckout
Add banner with HTML containing CSS:
Admin > Tools > Banner Manager
Click: New Banner
Fill out the necessary fields for your banner...
Enter the new banner group: bannerCheckout
In HTML Text add the CSS style with your preferred text:
<div id="bannerCheckoutBlock">
Notice: Due to current Covid-19 circumstances, we cannot guarantee how quickly orders will arrive once they are in the mail. All orders are currently being processed and shipped within 7 business days. Thank you for your support and your patience, we are doing our best to get your orders to you in a timely fashion.
</div>
Schedule the banner to activate it or you will not see it.
^ read this line and do it for sure ^
Finally we add some CSS to the banner:
includes/templates/YOUR_TEMPLATE/css/stylesheet.css
end of file:
/* Twitch Banner in Checkout Only */
#bannerCheckoutBlock {border: .2em solid green; padding: .8em;font-weight: bold;}
If my work has helped you today in any way, show your appreciation with things like positive feedback or donations
Twitch.
https://www.twitchtoo.com Do you work for free? Please donate.
Twitch Base8 - Obsidian - This, is what's new.
How to - Banners...
https://www.zen-cart.com/content.php...-up-banner-ads
Twitch.
https://www.twitchtoo.com Do you work for free? Please donate.
Twitch Base8 - Obsidian - This, is what's new.
Bookmarks