Results 1 to 4 of 4

Hybrid View

  1. #1
    Join Date
    Dec 2009
    Posts
    206
    Plugin Contributions
    2

    Default Clone Banner Box All Help

    I've been trying to clone the banner box all (using banner box and banner box2 as somewhat of a guide) and can't quite seem to get it to work.

    First I cloned:
    /includes/modules/sideboxes/banner_box_all.php (didn't change anything in the file) and renamed it banner_box_all2.php

    Then I cloned:
    /includes/templates/templates_default/sideboxes/tpl_banner_box_all.php, renamed it tpl_banner_box_all2.php and updated the content to the following:

    <?php
    /**
    * banner_box_all sidebox - used to display "square" banners in sideboxes
    *
    * @package templateSystem
    * @copyright Copyright 2003-2005 Zen Cart Development Team
    * @copyright Portions Copyright 2003 osCommerce
    * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
    * @version $Id: banner_box_all.php 3133 2006-03-07 23:39:02Z ajeh $
    */

    // INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) VALUES ('Banner Display Group - Side Box banner_box_all', 'SHOW_BANNERS_GROUP_SET_ALL', 'BannersAll', 'The Banner Display Group may only be from one (1) Banner Group for the Banner All sidebox<br /><br />Default Group is BannersAll<br /><br />What Banner Group do you want to use in the Side Box - banner_box_all?<br />Leave blank for none', '19', '72', '', '', now());
    // ALTER TABLE `banners` ADD `banners_sort_order` INT( 11 ) DEFAULT '0' NOT NULL;

    // test if box should display
    if ($this_is_home_page) {
    $show_banner_box_all2 = true;
    } else {
    $show_banner_box_all2 = false;
    }
    if (SHOW_BANNERS_GROUP_SET_ALL2 == '') {
    $show_banner_box_all2 = false;
    }

    if ($show_banner_box_all2 == true) {
    $banner_box[] = TEXT_BANNER_BOX_ALL2;
    $banner_box_group= SHOW_BANNERS_GROUP_SET_ALL2;

    require($template->get_template_dir('tpl_banner_box_all2.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_banner_box_all2.php');

    // if no active banner in the specified banner group then the box will not show
    // uses banners in the defined group $banner_box_group
    if ($banners_all->RecordCount() > 0) {

    $title = BOX_HEADING_BANNER_BOX_ALL2;
    $title_link = false;
    require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);
    }
    }
    ?>

    Then I added the following SQL patch via the admin:
    INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) VALUES ('Banner Display Group - Side Box banner_box_all2', 'SHOW_BANNERS_GROUP_SET_ALL2', 'BannersAll2', 'The Banner Display Group may only be from one (1) Banner Group for the Banner All2 sidebox<br /><br />Default Group is BannersAll2<br /><br />What Banner Group do you want to use in the Side Box - banner_box_all?<br />Leave blank for none', '19', '73', '', '', now());

    I activated banner_box_all2 in Admin>Configuration>Layout Settings>Display Group: facebook

    I created, activated and placed my banner in the facebook group under Admin>Tools>Banner Manager

    Then I activated the sidebox in the Admin>Tools>Layout Boxes Controller

    It all worked fine until I checked my site: www.theburningbutterfly.com/store.

    The correct banner is not showing in my duplicated sidebox (banner_box_all2) under the heading "Follow Us On Facebook". The banner from banner_box_all is showing instead.

    Thanks to Firebug, I know it has something to do with the Content of the box, but I can't quite figure out how to update the template so that it pulls the right banner.

    I would REALLY appreciate any assistance anyone could offer.

    Thanks in advance,
    Crystal

  2. #2
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,021
    Plugin Contributions
    3

    Default Re: Clone Banner Box All Help

    Unless you have some reason for wanting to control this box through Banner Manager, wouldn't the Blank Sidebox mod be a better solution?

  3. #3
    Join Date
    Dec 2009
    Posts
    206
    Plugin Contributions
    2

    Default Re: Clone Banner Box All Help

    Thanks for taking the time to reply!

    I want to add a facebook banner (using an image that I created to match the look of my site) in the duplicated box and although I'm okay at coding, when I added the link in a blank sidebox, I get security errors when accessing the parts of my site that run through the https.

    I'd been working on this problem for several hours and considered several different ways of doing it; including adding the facebook sidebox module.

    I finally decided that using the banner manager is going to be the easiest and most effecient way to accomplish what I wanted to do with the links - or so I thought.

  4. #4
    Join Date
    Dec 2009
    Posts
    206
    Plugin Contributions
    2

    Default Re: Clone Banner Box All Help

    I totally stuck this in the wrong catagory! Sorry! Moved it to Layout Boxes - Banners
    Last edited by kamelion0927; 27 Mar 2010 at 06:39 PM.

 

 

Similar Threads

  1. How to clone banner box all????????
    By ecommercefree in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 30 Dec 2010, 07:46 AM
  2. Sponsor banner box help
    By viperofthepitstorm in forum Basic Configuration
    Replies: 9
    Last Post: 20 Aug 2010, 03:33 AM
  3. Clone Banner Box
    By kamelion0927 in forum Basic Configuration
    Replies: 2
    Last Post: 30 Mar 2010, 06:50 PM
  4. Please help me to clone FEATURED Products box for home page
    By aly22 in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 28 Jul 2009, 04:00 AM
  5. Banner Box All
    By MHJGKane in forum Basic Configuration
    Replies: 3
    Last Post: 19 May 2006, 09:39 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