Results 1 to 6 of 6
  1. #1
    Join Date
    Jun 2008
    Posts
    627
    Plugin Contributions
    0

    Default display banner group 3 on login page only

    Hi

    For zen cart 1.3.9b, I need to be able to show banner group three on the login page only. I've been searching the forum and web but haven't found just the right code solution to allow this.

    I have tried different variations but no success.

    To display on login page only:

    altering this
    PHP Code:
    if ($this_is_home_page) { 
    to this
    PHP Code:
    if  ($this_is_login) { 
    or this
    PHP Code:
    if  ($this_is_login_page) { 
    doesn't work.


    This next code works to disable banner group three on some pages but it seems the long way around plus I can't get it to work for the home page, ez pages or manufacturers filtering pages


    PHP Code:
    <?php
    if (!in_array($current_page_base,explode(",",'site_map,product_reviews_info,privacy,account,products_all,products_new,specials,featured_products,shopping _cart,checkout_shipping,checkout_payment,checkout_ confirmation,checkout_success')) || ($this_is_home_page == 'false')) {
    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
    }}}
    ?>
    Please, any help would be appreciated.
    buildingblocks

  2. #2
    Join Date
    Jun 2008
    Posts
    627
    Plugin Contributions
    0

    Default Re: display banner group 3 on login page only

    moving the banner three code to the tpl_login_default.php file works to confine the banner to the login page but there must be a better way.

  3. #3
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: display banner group 3 on login page only

    You could customize the file:
    tpl_main_page.php

    with the page(s) you want to show the banner 3 with the code in RED:
    Code:
      if (($_GET['main_page'] == FILENAME_LOGIN) && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET3)) {
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  4. #4
    Join Date
    Jun 2008
    Posts
    627
    Plugin Contributions
    0

    Default Re: display banner group 3 on login page only

    perfect! Thank you so much. It worked.

    Now, for future reference, if for example I wanted to display the banner on a second page would I separate with comma like this?

    PHP Code:
    if (($_GET['main_page'] == FILENAME_LOGIN,FILENAME_CREATE_ACCOUNT) && $banner zen_banner_exists('dynamic'SHOW_BANNERS_GROUP_SET3)) { 

  5. #5
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: display banner group 3 on login page only

    No, each one has to be set separately ...
    Code:
    if ((($_GET['main_page'] == FILENAME_LOGIN) || ($_GET['main_page'] == FILENAME_CREATE_ACCOUNT)) && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET3)) {
    Or, you could get a little fancier with the code if you wanted to in order to make it shorter ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  6. #6
    Join Date
    Jun 2008
    Posts
    627
    Plugin Contributions
    0

    Default Re: display banner group 3 on login page only

    ok, thank you. Your help is very much appreciated. :-)

 

 

Similar Threads

  1. v138a Show Banner Display (Footer) ONLY on home page
    By genat1974 in forum General Questions
    Replies: 3
    Last Post: 10 Mar 2012, 08:25 PM
  2. v138a Show Banner Display (Footer) ONLY on home page
    By genat1974 in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 9 Mar 2012, 10:55 PM
  3. Moving Banner Display Group
    By Convergence in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 17 Sep 2008, 05:29 PM
  4. Banner display only on home page
    By Nixonmedia in forum Templates, Stylesheets, Page Layout
    Replies: 9
    Last Post: 17 Dec 2007, 04:52 AM
  5. Footer Banner Display on Main Only?
    By clayartisan in forum Basic Configuration
    Replies: 1
    Last Post: 2 Feb 2007, 04:49 AM

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