Results 1 to 10 of 11

Hybrid View

  1. #1
    Join Date
    Feb 2010
    Posts
    2,159
    Plugin Contributions
    17

    Default Disable Product Type Sideboxes

    I have created a new Product Type - The extra fields appear in drop down select sideboxes on my site.

    I want to disable those sideboxes except when on pages of that product type.

    Example - this new product type will have its own category, so I only want those sideboxes to appear in that category.

    I have tried several if statements even
    // test if box should display
    if ($this_is_home_page) {
    $show_custom_sidebox = false;
    } else {
    $show_custom_sidebox = true;
    }

    nothing seems to be working

  2. #2
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Disable Product Type Sideboxes

    PHP Code:
    // test if box should display
    if (isset($cPath) and $cPath == 'xx') {
    $show_custom_sidebox true;
    } else {
    $show_custom_sidebox false;

    where xx is the category id for your product type's category.
    If it has subcats the test needs to be a little more sophisticated.

  3. #3
    Join Date
    Feb 2010
    Posts
    2,159
    Plugin Contributions
    17

    Default Re: Disable Product Type Sideboxes

    no sub-categories & doesn't work

  4. #4
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Disable Product Type Sideboxes

    The question becomes, what file are you using the test in? Post the beginning of the file with the test and surroundings. What is the cPath for the product type category?

  5. #5
    Join Date
    Feb 2010
    Posts
    2,159
    Plugin Contributions
    17

    Default Re: Disable Product Type Sideboxes

    I copied all the music/music_genre files to create new product type.

    So I copied music_genres.php located here /includes/modules/sideboxes

    Put the new sidebox here /includes/modules/sideboxes/CUSTOM_TEMPLATE

    Beginning of file:

    <?php
    /**
    * tv_display_size sidebox - displays list of available tv_display_size to filter on
    *
    * @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: tv_display_size.php 2834 2006-01-11 22:16:37Z birdbrain $
    */

    Category Id would be 976 with no subcategories

  6. #6
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Disable Product Type Sideboxes

    Post the beginning of the file with the test and surroundings.
    It's good to know what & where the file is, but debugging requires seeing the code that is not working.

 

 

Similar Threads

  1. Product Type Filter Sideboxes
    By rbarbour in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 27 Sep 2011, 04:25 AM
  2. New product type doesn't display errors nor sideboxes
    By icecold in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 30 Oct 2009, 06:18 PM
  3. Auction Product Type: Can't add a product of the type.
    By sw0rdz in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 5 Sep 2009, 02:11 AM
  4. Disable right sideboxes for manufacturers product pages.
    By shackle in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 7 Jul 2007, 03:36 AM
  5. Disable shipping type based on weight
    By onadisc in forum Built-in Shipping and Payment Modules
    Replies: 8
    Last Post: 5 Nov 2006, 03:02 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