Page 116 of 227 FirstFirst ... 1666106114115116117118126166216 ... LastLast
Results 1,151 to 1,160 of 2267
  1. #1151
    Join Date
    Jul 2009
    Posts
    158
    Plugin Contributions
    0

    Default Re: Categories Dressing

    Does anyone have a website up at the moment with this mod? I would be good to see an example of what it can look like.

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

    Default Re: Categories Dressing

    limelites.co.uk is one with an extensive installation. There are also examples that are currently operational linked in posts 1141, 1138, 1130, and more if you look further back.

  3. #1153
    Join Date
    Jul 2009
    Posts
    158
    Plugin Contributions
    0

    Default Re: Categories Dressing

    So you can categorize the categories... fantastic! Thanks for taking the time to show some examples... looks like it's what I'm looking for.

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

    Default Re: Categories Dressing

    There are also demo screenshots in posts 500-510, showing more features the mod is capable of.

  5. #1155
    Join Date
    Dec 2009
    Location
    Sarajevo
    Posts
    80
    Plugin Contributions
    0

    Default Re: Categories Dressing

    connected to my last post regarding cetegories in my left sidebox I am switching to this thread


    Code:
    "This thread was very helpeful to me because I need same thing on my website and I achieved it thanks to Glenns code bellow
    Code:
    
    // subcat limit 2007-12-20
          if (substr_count($box_categories_array[$i]['path'],'_') = 0 or zen_get_product_types_to_category($box_categories_array[$i]['path']) == 3 or ($box_categories_array[$i]['top'] != 'true' and SHOW_CATEGORIES_SUBCATEGORIES_ALWAYS != 1)) {
            // skip if this is for the document box (==3)
          } else {
    
    but in my case I dont need subcategories to show any further subcategories. To explain what I want to achieve here's the example:
    
    -----------------------------------------------
    THIS IS HOW IT LOOKS LIKE NOW:
    -----------------------------------------------
    
    MAZDA (1st subcategorie level)
    - mx (2nd subcategorie level)
    -- 2005 year (3rd subcategorie level)
    -- 2006 year
    -- 2007 year
    - cx
    - rx
    MERCEDES
    - c
    - e
    - s
    MITSUBISHI
    - lancer
    - pajero
    - l200
    
    
    -----------------------------------------------
    THIS IS HOW I NEED IT:
    -----------------------------------------------
    
    
    MAZDA (1st subcategorie level)
    MERCEDES
    MITSUBISHI
    
    Any help is wellcome, thanks! "
    @Glenn

    Yes, I am using Categories Dressing add on. Now where do I start, using Cat.Dr., so I could acomplish to have only 1st level subcategorie visible and all other categ./subcat. hided.. I looked through folders of my zencart wesite (in includes/classes) and found "ch_categories_tree_generator" Is this a file I should edit?
    Last edited by adi2009; 1 Feb 2010 at 07:53 PM.

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

    Default Re: Categories Dressing

    No, that file generates the complete list, while the template file (and its functions) limits the display according to the settings.

    What is your current setting for
    define('CAT_BOX_ACTIVE_LEVEL', '#|#|#')

    If you want different levels of (sub)categories to show in the different sideboxes, as I believe is your intention, it may require some special coding.
    You have the standard categories sidebox at the top left, and the chcategories sidebox below it. Do you want both of them displayed?

  7. #1157
    Join Date
    Dec 2009
    Location
    Sarajevo
    Posts
    80
    Plugin Contributions
    0

    Default Re: Categories Dressing

    thank you for promt reply Glenn, really appreciate it

    Quote Originally Posted by gjh42 View Post
    If you want different levels of (sub)categories to show in the different sideboxes, as I believe is your intention, it may require some special coding.
    no, its OK, for start I will use only one sidebox - ch_categories.php

    You have the standard categories sidebox at the top left, and the chcategories sidebox below it. Do you want both of them displayed?
    I have disabled first sidebox at the top left (classic categories.php) few minutes ago, so I will use only one: ch_categories.php What is first step I should do with Categories Dressing so I could see only 1st level subcategorie visible and all other categ./subcat. hided?
    Last edited by adi2009; 1 Feb 2010 at 09:01 PM.

  8. #1158
    Join Date
    Dec 2009
    Location
    Sarajevo
    Posts
    80
    Plugin Contributions
    0

    Default Re: Categories Dressing

    Quote Originally Posted by gjh42 View Post
    What is your current setting for
    define('CAT_BOX_ACTIVE_LEVEL', '#|#|#')
    sorry I forgot to answer this one

    code from file "categories_dressing_functions.php"

    Code:
    function cat_active_level_manage($path) {
      $skip_cat = 0;
      if (defined('CAT_BOX_ACTIVE_LEVEL')) {
        $test_level = 0;
        $cat_box_active_level = explode('|',constant('CAT_BOX_ACTIVE_LEVEL'));
        $cPath_top = (int)$_GET['cPath'];
        $path_top = (int)$path;
        $cat_depth = substr_count($path,'_');
        //tests for various kinds of skipping - more can be added
        switch ($cat_box_active_level[0]){
          case 0:
            $test_level = 1;
            break;
          case 1://active tree only
            if($cPath_top != $path_top) $skip_cat = 1;
            break;
          case 2://active only (all tops when no cat selected)
            if($cPath_top != $path_top and $cPath_top != 0) $skip_cat = 1;
            break;
          case 3://full active tree, others per level
            if($cPath_top != $path_top) $test_level = 1;
            break;
          case 4://like 3, active branches only
            if($cPath_top == $path_top){
              if ($cat_depth >= 2){//only test sub-subcats+
                $path_ids = explode('_',$path);
                $path_parent = $path_ids[count($path_ids)-2];
                if (!in_array($path_parent,explode('_',$_GET['cPath']))) $skip_cat = 1;//show only subcats w parent in $cPath
              }
            } else {//if not active test for level
              $test_level = 1;
            }
            break;
          case 5:// show active, no top, per levels
            if ($cat_depth == 0 or $cPath_top != $path_top) {
              $skip_cat = 1;
            }else{
              $test_level = 1;
            }
            break;
        }//switch
        if ($test_level){
          switch ('true'){
            case ($cat_box_active_level[1] > $cat_depth):
              $skip_cat = 1;
              break;
            case ($cat_box_active_level[2] < $cat_depth):
              $skip_cat = 1;
              break;
          }//switch
        }//if
      }//defined
      return $skip_cat;
    }

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

    Default Re: Categories Dressing

    OK, that makes it easy.
    You didn't mention your current setting for
    define('CAT_BOX_ACTIVE_LEVEL', '#|#|#')

    It should probably be

    define('CAT_BOX_ACTIVE_LEVEL', '0|1|1')

    The function code is not the setting, and yours shows that it is the standard version of the function.

  10. #1160
    Join Date
    Dec 2009
    Location
    Sarajevo
    Posts
    80
    Plugin Contributions
    0

    Default Re: Categories Dressing

    Quote Originally Posted by gjh42 View Post
    OK, that makes it easy.
    You didn't mention your current setting for
    define('CAT_BOX_ACTIVE_LEVEL', '#|#|#')

    It should probably be

    define('CAT_BOX_ACTIVE_LEVEL', '0|1|1')

    The function code is not the setting, and yours shows that it is the standard version of the function.
    OK, I changed code in categories_dressing_functions.php saved/upload it and it now it looks like this:

    function cat_active_level_manage($path) {
    $skip_cat = 0;
    if (defined('CAT_BOX_ACTIVE_LEVEL','0|1|1')) {
    $test_level = 0;
    $cat_box_active_level = explode('|',constant('CAT_BOX_ACTIVE_LEVEL'));
    $cPath_top = (int)$_GET['cPath'];
    $path_top = (int)$path;
    $cat_depth = substr_count($path,'_');
    //tests for various kinds of skipping - more can be added
    switch ($cat_box_active_level[0]){
    case 0:
    $test_level = 1;
    break;
    case 1://active tree only
    if($cPath_top != $path_top) $skip_cat = 1;
    break;
    case 2://active only (all tops when no cat selected)
    if($cPath_top != $path_top and $cPath_top != 0) $skip_cat = 1;
    break;
    case 3://full active tree, others per level
    if($cPath_top != $path_top) $test_level = 1;
    break;
    case 4://like 3, active branches only
    if($cPath_top == $path_top){
    if ($cat_depth >= 2){//only test sub-subcats+
    $path_ids = explode('_',$path);
    $path_parent = $path_ids[count($path_ids)-2];
    if (!in_array($path_parent,explode('_',$_GET['cPath']))) $skip_cat = 1;//show only subcats w parent in $cPath
    }
    } else {//if not active test for level
    $test_level = 1;
    }
    break;
    case 5:// show active, no top, per levels
    if ($cat_depth == 0 or $cPath_top != $path_top) {
    $skip_cat = 1;
    }else{
    $test_level = 1;
    }
    break;
    }//switch
    if ($test_level){
    switch ('true'){
    case ($cat_box_active_level[1] > $cat_depth):
    $skip_cat = 1;
    break;
    case ($cat_box_active_level[2] < $cat_depth):
    $skip_cat = 1;
    break;
    }//switch
    }//if
    }//defined
    return $skip_cat;
    }

    but no changes on left sidebox on website (you can check it out when you click on "Selling parts" in top menu bar)
    Last edited by adi2009; 1 Feb 2010 at 09:41 PM.

 

 

Similar Threads

  1. categories dressing
    By fw541c in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 19 Nov 2010, 09:29 PM
  2. Categories Dressing
    By wotnow in forum Addon Sideboxes
    Replies: 10
    Last Post: 7 Apr 2010, 03:06 AM
  3. Categories Dressing issue
    By Maynards in forum Addon Sideboxes
    Replies: 0
    Last Post: 13 Mar 2010, 10:51 PM
  4. Categories Dressing
    By Maynards in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 12 Mar 2010, 11:05 PM
  5. Categories Dressing
    By PGlad in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 7 Aug 2007, 07:05 PM

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