Results 1 to 7 of 7

Hybrid View

  1. #1
    Join Date
    Apr 2010
    Posts
    100
    Plugin Contributions
    0

    Default Where is the code to get and display banners?

    Does anyone know where is the code to get the banners and display them?

    I am thinking to add a logic, that disables (hides) all the banners if there is item(s) in the shopping cart (so hope customer will go ahead and checkout, instead of wrongly click any banner. :-)

    Thanks.

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,949
    Plugin Contributions
    96

    Default Re: Where is the code to get and display banners?

    That code is present in /includes/functions/banner.php -- a core file. Be sure to make a backup before you commence with your changes!

  3. #3
    Join Date
    Apr 2010
    Posts
    100
    Plugin Contributions
    0

    Default Re: Where is the code to get and display banners?

    Quote Originally Posted by lat9 View Post
    That code is present in /includes/functions/banner.php -- a core file. Be sure to make a backup before you commence with your changes!
    This does not work in the way I want: I find I can change zen_display_banner, so it always return ''. This removes the content of the banner, but it does not remove the banner (the banner title, box, are still there).

  4. #4
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,571
    Plugin Contributions
    1

    Default Re: Where is the code to get and display banners?

    Another option is to edit: includes/templates/YOUR_TEMPLATE/common/tpl_main_page.php

    change

    // the following IF statement can be duplicated/modified as needed to set additional flags
    if (in_array($current_page_base,explode(",",'list_pages_to_skip_all_right_sideboxes _on_here,separated_by_commas,and_no_spaces')) ) {
    $flag_disable_right = true;
    }

    to read

    // the following IF statement can be duplicated/modified as needed to set additional flags
    if (in_array($current_page_base,explode(",",'shopping_cart')) ) {
    $flag_disable_banner = true;
    }

    Note: this will disable Banners on the Shopping Cart page regardless of whether something is in the cart or not.
    Last edited by Website Rob; 29 Sep 2010 at 12:35 PM.

  5. #5
    Join Date
    Apr 2010
    Posts
    100
    Plugin Contributions
    0

    Default Re: Where is the code to get and display banners?

    Quote Originally Posted by Website Rob View Post
    Another option is to edit: includes/templates/YOUR_TEMPLATE/common/tpl_main_page.php

    change

    // the following IF statement can be duplicated/modified as needed to set additional flags
    if (in_array($current_page_base,explode(",",'list_pages_to_skip_all_right_sideboxes _on_here,separated_by_commas,and_no_spaces')) ) {
    $flag_disable_right = true;
    }

    to read

    // the following IF statement can be duplicated/modified as needed to set additional flags
    if (in_array($current_page_base,explode(",",'shopping_cart')) ) {
    $flag_disable_banner = true;
    }

    Note: this will disable Banners on the Shopping Cart page regardless of whether something is in the cart or not.
    Somehow this does not work. :-(

    By the way, where can I verify $flag_disable_banner is used? I can't find it anywhere else.

  6. #6
    Join Date
    Apr 2010
    Posts
    100
    Plugin Contributions
    0

    Default Re: Where is the code to get and display banners?

    By the way, the banner I want to conditionally hide is located at the left side box. In the "layout setting", it is "Banner Display Groups - Side Box banner_box".

    Where can I find the code that display it?

    Thanks.

  7. #7
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Where is the code to get and display banners?

    Since it's "banner_box" you want to hide, the template would be: tpl_banner_box.php
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. Replies: 3
    Last Post: 12 Jul 2012, 07:16 AM
  2. CVV2 Code - where's the card security code entered?
    By jamieboulder in forum General Questions
    Replies: 2
    Last Post: 12 Mar 2008, 06:05 PM
  3. How can I get rid of the spaces between the banners in the side box?
    By cgardner in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 9 Oct 2007, 03:05 AM
  4. Where can I get the UK zone code?
    By houhj in forum General Questions
    Replies: 1
    Last Post: 19 May 2006, 04:41 PM

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