Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2005
    Posts
    372
    Plugin Contributions
    0

    help question Customise sideboxes per page

    I have say 7 sideboxes on the frontpage which is fine, everything is balanced. When I get to the product description page 7 sideboxes unbalances everything and I don't want to show that many. So what do I do. I know what I don't do that doesn't work, but your tutorials online do not address my problem.

    Say I want to turn off sidebox 3, 5, 7 how would I do that and where.

    Thanks,

    C

  2. #2
    Join Date
    Nov 2005
    Location
    Colorado Springs, CO USA
    Posts
    7,033
    Plugin Contributions
    31

    Default Re: Customise sideboxes per page

    Quote Originally Posted by cshart View Post
    I have say 7 sideboxes on the frontpage which is fine, everything is balanced. When I get to the product description page 7 sideboxes unbalances everything and I don't want to show that many. So what do I do. I know what I don't do that doesn't work, but your tutorials online do not address my problem.

    Say I want to turn off sidebox 3, 5, 7 how would I do that and where.

    Thanks,

    C
    I'm using the "featured" sidebox in this example.

    If you look at the sidebox code (includes/modules/sideboxes/YOUR_TEMPALTE/

    near the top of the code you will see the following line of code:

    $show_featured= true;

    Just below this line add the following:

    if ($current_page_base == "product_info") {
    $show_featured= false;
    }

    This code will turn the sidebox off on the product info page.

    add similar code to the sideboxes you want to turn off.

  3. #3
    Join Date
    Mar 2005
    Posts
    372
    Plugin Contributions
    0

    Default Re: Customise sideboxes per page WHERE?

    <?php

    /**

    * information sidebox - displays list of general info links, as defined in this file

    *

    * @package templateSystem

    * @copyright Copyright 2003-2006 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: information.php 4132 2006-08-14 00:36:39Z drbyte $

    */

    if ($current_page_base == "product_info") {
    $show_information= false;
    }


    unset($information);

    if (DEFINE_ABOUT_US_STATUS <= 1) {

    $information[] = '<a href="' . zen_href_link(FILENAME_ABOUT_US) . '">' . BOX_INFORMATION_ABOUT_US . '</a>';

    }
    if (DEFINE_SHIPPINGINFO_STATUS <= 1) {

    $information[] = '<a href="' . zen_href_link(FILENAME_SHIPPING) . '">' . BOX_INFORMATION_SHIPPING . '</a>';

    }

    if (DEFINE_PRIVACY_STATUS <= 1) {

    $information[] = '<a href="' . zen_href_link(FILENAME_PRIVACY) . '">' . BOX_INFORMATION_PRIVACY . '</a>';

    }

    if (DEFINE_CONDITIONS_STATUS <= 1) {

    $information[] = '<a href="' . zen_href_link(FILENAME_CONDITIONS) . '">' . BOX_INFORMATION_CONDITIONS . '</a>';

    }

    if (DEFINE_CONTACT_US_STATUS <= 1) {

    $information[] = '<a href="' . zen_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a>';

    }




    // Forum (phpBB) link:

    if ( (isset($phpBB->phpBB['db_installed_config']) && $phpBB->phpBB['db_installed_config']) && (isset($phpBB->phpBB['files_installed']) && $phpBB->phpBB['files_installed']) && (PHPBB_LINKS_ENABLED=='true')) {

    $information[] = '<a href="' . zen_href_link($phpBB->phpBB['phpbb_url'] . FILENAME_BB_INDEX, '', 'NONSSL', false, '', true) . '" target="_blank">' . BOX_BBINDEX . '</a>';

    // or: $phpBB->phpBB['phpbb_url'] . FILENAME_BB_INDEX

    // or: str_replace(str_replace(DIR_WS_CATALOG, '', DIR_FS_CATALOG), '', DIR_WS_PHPBB)

    }



    if (DEFINE_SITE_MAP_STATUS <= 1) {

    $information[] = '<a href="' . zen_href_link(FILENAME_SITE_MAP) . '">' . BOX_INFORMATION_SITE_MAP . '</a>';

    }



    // only show GV FAQ when installed

    if (MODULE_ORDER_TOTAL_GV_STATUS == 'true') {

    $information[] = '<a href="' . zen_href_link(FILENAME_GV_FAQ) . '">' . BOX_INFORMATION_GV . '</a>';

    }

    // only show Discount Coupon FAQ when installed

    if (DEFINE_DISCOUNT_COUPON_STATUS <= 1 && MODULE_ORDER_TOTAL_COUPON_STATUS == 'true') {

    $information[] = '<a href="' . zen_href_link(FILENAME_DISCOUNT_COUPON) . '">' . BOX_INFORMATION_DISCOUNT_COUPONS . '</a>';

    }



    if (SHOW_NEWSLETTER_UNSUBSCRIBE_LINK == 'true') {

    $information[] = '<a href="' . zen_href_link(FILENAME_UNSUBSCRIBE) . '">' . BOX_INFORMATION_UNSUBSCRIBE . '</a>';

    }



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



    $title = BOX_HEADING_INFORMATION;
    $title_link = false;



    require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);

    ?>

    Its still on





    Quote Originally Posted by clydejones View Post
    I'm using the "featured" sidebox in this example.

    If you look at the sidebox code (includes/modules/sideboxes/YOUR_TEMPALTE/

    near the top of the code you will see the following line of code:

    $show_featured= true;

    Just below this line add the following:

    if ($current_page_base == "product_info") {
    $show_featured= false;
    }

    This code will turn the sidebox off on the product info page.

    add similar code to the sideboxes you want to turn off.

  4. #4
    Join Date
    Nov 2005
    Location
    Colorado Springs, CO USA
    Posts
    7,033
    Plugin Contributions
    31

    Default Re: Customise sideboxes per page

    Quote Originally Posted by cshart View Post

    Its still on
    That's because the information sidebox needs a little more work to make it work.
    the highlighted changes are necessary


    Code:
    <?php
    /**
     * information sidebox - displays list of general info links, as defined in this file
     *
     * @package templateSystem
     * @copyright Copyright 2003-2006 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: information.php 4132 2006-08-14 00:36:39Z drbyte $
     */
    
    $show_information=true;
    
    if ($current_page_base == "product_info") {
      $show_information= false;
    }
    
    
    if ($show_information=true;) {
    
      unset($information);
    
      if (DEFINE_ABOUT_US_STATUS <= 1) {
    
        $information[] = '<a href="' . zen_href_link(FILENAME_ABOUT_US) . '">' . BOX_INFORMATION_ABOUT_US . '</a>';
    
     }
      if (DEFINE_SHIPPINGINFO_STATUS <= 1) {
    
        $information[] = '<a href="' . zen_href_link(FILENAME_SHIPPING) . '">' . BOX_INFORMATION_SHIPPING . '</a>';
    
      }
    
      if (DEFINE_PRIVACY_STATUS <= 1) {
    
        $information[] = '<a href="' . zen_href_link(FILENAME_PRIVACY) . '">' . BOX_INFORMATION_PRIVACY . '</a>';
    
      }
    
      if (DEFINE_CONDITIONS_STATUS <= 1) {
    
        $information[] = '<a href="' . zen_href_link(FILENAME_CONDITIONS) . '">' . BOX_INFORMATION_CONDITIONS . '</a>';
    
      }
    
      if (DEFINE_CONTACT_US_STATUS <= 1) {
    
        $information[] = '<a href="' . zen_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a>';
    
      }
    
    // Forum (phpBB) link:
    
      if ( (isset($phpBB->phpBB['db_installed_config']) && $phpBB->phpBB['db_installed_config']) && (isset($phpBB->phpBB['files_installed']) && $phpBB->phpBB['files_installed'])  && (PHPBB_LINKS_ENABLED=='true')) {
    
        $information[] = '<a href="' . zen_href_link($phpBB->phpBB['phpbb_url'] . FILENAME_BB_INDEX, '', 'NONSSL', false, '', true) . '" target="_blank">' . BOX_BBINDEX . '</a>';
    
    // or: $phpBB->phpBB['phpbb_url'] . FILENAME_BB_INDEX
    
    // or: str_replace(str_replace(DIR_WS_CATALOG, '', DIR_FS_CATALOG), '', DIR_WS_PHPBB)
    
      }
    
      if (DEFINE_SITE_MAP_STATUS <= 1) {
    
        $information[] = '<a href="' . zen_href_link(FILENAME_SITE_MAP) . '">' . BOX_INFORMATION_SITE_MAP . '</a>';
    
      }
    
      // only show GV FAQ when installed
    
      if (MODULE_ORDER_TOTAL_GV_STATUS == 'true') {
    
        $information[] = '<a href="' . zen_href_link(FILENAME_GV_FAQ) . '">' . BOX_INFORMATION_GV . '</a>';
    
      }
    
      // only show Discount Coupon FAQ when installed
    
      if (DEFINE_DISCOUNT_COUPON_STATUS <= 1 && MODULE_ORDER_TOTAL_COUPON_STATUS == 'true') {
    
        $information[] = '<a href="' . zen_href_link(FILENAME_DISCOUNT_COUPON) . '">' . BOX_INFORMATION_DISCOUNT_COUPONS . '</a>';
    
      }
    
      if (SHOW_NEWSLETTER_UNSUBSCRIBE_LINK == 'true') {
    
        $information[] = '<a href="' . zen_href_link(FILENAME_UNSUBSCRIBE) . '">' . BOX_INFORMATION_UNSUBSCRIBE . '</a>';
    
      }
     require($template->get_template_dir('tpl_information.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_information.php');
    
      $title =  BOX_HEADING_INFORMATION;
      $title_link = false;
    
      require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);
    }
    ?>

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

    Default Re: Customise sideboxes per page

    NOTE: slight typo ...

    This line:
    Code:
    if ($show_information=true;) {
    should read:
    Code:
    if ($show_information == true) {
    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!

 

 

Similar Threads

  1. Customise Admin Home Page
    By wiccan0974 in forum General Questions
    Replies: 0
    Last Post: 7 Aug 2009, 04:27 PM
  2. Customise the Help Page
    By guzzer in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 26 May 2007, 06:39 PM
  3. customise the first page
    By savaradu in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 25 Apr 2007, 10:03 AM
  4. New Products on front page, how to customise?
    By Rikki in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 8 Mar 2007, 12:41 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