Page 4 of 4 FirstFirst ... 234
Results 31 to 36 of 36
  1. #31
    Join Date
    Apr 2011
    Location
    uk
    Posts
    6
    Plugin Contributions
    0

    Default Re: Banners only on main page

    Need help with this too

  2. #32
    Join Date
    Aug 2010
    Location
    Israel
    Posts
    285
    Plugin Contributions
    0

    Default Re: Banners only on main page

    Finally someone with the same problem as mine.
    If you will find a solution please post.

  3. #33
    Join Date
    Nov 2011
    Posts
    2
    Plugin Contributions
    0

    Idea or Suggestion Re: Banners only on main page

    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!

  4. #34
    Join Date
    Mar 2008
    Posts
    332
    Plugin Contributions
    0

    Default Re: Banners only on main page

    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?

  5. #35
    Join Date
    Apr 2007
    Location
    Ontario, Canada
    Posts
    1,731
    Plugin Contributions
    27

    Idea or Suggestion Add banner to checkout only

    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.

  6. #36
    Join Date
    Apr 2007
    Location
    Ontario, Canada
    Posts
    1,731
    Plugin Contributions
    27

    Default Re: Banners only on main page

    Quote Originally Posted by Decostyle View Post
    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?

    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.

 

 
Page 4 of 4 FirstFirst ... 234

Similar Threads

  1. Restoring banners on main page
    By shipmodeler in forum General Questions
    Replies: 1
    Last Post: 2 Feb 2016, 01:20 AM
  2. Banners on main landing page
    By madli in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 17 Aug 2010, 04:40 PM
  3. Display banners on main page only?
    By micadelic in forum Basic Configuration
    Replies: 2
    Last Post: 29 Jul 2009, 04:08 PM
  4. Banners and Main Page
    By KSource in forum Basic Configuration
    Replies: 2
    Last Post: 26 Mar 2009, 06:20 PM
  5. Only Show Wide-Banners On Main Page?
    By BarryLegal in forum Basic Configuration
    Replies: 0
    Last Post: 27 Jun 2008, 11:45 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR