Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2009
    Posts
    206
    Plugin Contributions
    2

    Default Clone Banner Box

    **originally started this thread under the wrong catagory. sorry! that's what I get for trying to work and talk to my 8 year old at the same time.**

    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

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

    Me again:
    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 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 efficient way to accomplish what I wanted to do with the links - or so I thought.

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

    Default Re: Clone Banner Box

    What do you have set for the BannersAll2 in the Configuration ... Layout Setting ...
    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: v1.5.5]
    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!

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

    Default Re: Clone Banner Box

    BannersAll2 = Admin>Configuration>Layout Settings>Display Group: facebook

    BannersAll = Admin>Configuration>Layout Settings>Display Group: windpower

    Somewhere in the coding I didn't differentiate well enough between BannersAll2 and BannersAll because BannersAll2 is showing the windpower display and is also disappearing when I navigate off the homepage (as I have BannersAll set up to do).

    Thanks!
    Last edited by kamelion0927; 30 Mar 2010 at 06:53 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. Clone Banner Box All Help
    By kamelion0927 in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 27 Mar 2010, 06:36 PM
  3. 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

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