Page 214 of 227 FirstFirst ... 114164204212213214215216224 ... LastLast
Results 2,131 to 2,140 of 2267
  1. #2131
    Join Date
    Dec 2008
    Location
    San Fran
    Posts
    382
    Plugin Contributions
    0

    Default Re: Categories Dressing

    Sorry, it looks like changing to the line to 8|0|0 hides my custom case 7 that I wanted displayed as well.

    I want only case 7 and case 8 to display the subcats at all times. All other categories should display subcats when the main category is clicked. I have this working perfectly the way I want it with case 7 using 7|0|0 in my defines, but can't figure out how to get case 7 and case 8 to display sub menus all the time at the same time.

    I wish I could delete those previous posts, but it probably gives you a good idea:=) Would appreciate your help.

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

    Default Re: Categories Dressing

    You can't have two cases active at the same time; that's not how switches work. What you want to do is add your second category to case 7.
    PHP Code:
          case 7://full active tree, others per level; always cat 23 & 150
            
    if($cPath_top != $path_top and $path_top != '23' and $path_top != '150'$test_level 1;
            break; 

  3. #2133
    Join Date
    Dec 2008
    Location
    San Fran
    Posts
    382
    Plugin Contributions
    0

    Default Re: Categories Dressing

    Thank you Glenn, worked a treat!

  4. #2134
    Join Date
    Dec 2008
    Location
    San Fran
    Posts
    382
    Plugin Contributions
    0

    Default Re: Categories Dressing

    Ok, so I have the following in my defines:
    PHP Code:
     define ('CAT_BOX_HEADING_150','1|0|||<h3>Shop by Collection</h3>|1');//new list - text heading - style 1 
    However it's still displaying the 2nd "Shop by Collection" displayed below. This is because I had to create this category in the admin, but I wanted it to have it's own text heading. How do I hide the 2nd one? Can't figure it out.

    Shop by Collection
    Shop by Collection
    Collection 1
    Collection 2
    Collection 3

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

    Default Re: Categories Dressing

    Creating a heading for a category doesn't affect the actual category link. What you seem to want is a display link with text that is styled differently from other top categories. You could do this by making it a separate category group so it would have an id to address in the stylesheet, like
    #catGroup23 > li > a {your: style;}

    If you don't actually have a real category there but are just using the category to get the heading, eliminate it completely and apply the heading define to whatever category will come just after the desired heading.

  6. #2136
    Join Date
    Jun 2012
    Posts
    5
    Plugin Contributions
    0

    Default Re: Categories Dressing

    Hi,

    I'm having abit of trouble trying figuring out this plug in.

    I installed the categories dressing and ch_category. I activated ch_category from layout boxes controller and now all my categories and subcats and products are showing.

    I am trying to hide my products and only show main and sub cats but can't figure out how to do this.

    I tried this:

    if (ereg("_.*_", $box_categories_array[$i]['path']) 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 doesn't seem to do anything.

    It would be great if anyone can help.

    Thanks

  7. #2137
    Join Date
    Jun 2012
    Posts
    5
    Plugin Contributions
    0

    Default Re: Categories Dressing

    I've also tried

    //define('CAT_BOX_ACTIVE_LEVEL', '0|0|1');//show all top cats, to first subcat level

    in categories_dressing_defines.php but still nothing.

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

    Default Re: Categories Dressing

    Something sounds fishy here. Categories Dressing can never show products in the sidebox, only categories and subcats. There is one expanded categories mod that does show products as well as cats; I don't know if it is even possible for both to be installed at the same time. I really need to see your site live to understand what is happening and advise further.

  9. #2139
    Join Date
    Dec 2008
    Location
    San Fran
    Posts
    382
    Plugin Contributions
    0

    Default Re: Categories Dressing

    Quote Originally Posted by gjh42 View Post
    You can't have two cases active at the same time; that's not how switches work. What you want to do is add your second category to case 7.
    PHP Code:
          case 7://full active tree, others per level; always cat 23 & 150
            
    if($cPath_top != $path_top and $path_top != '23' and $path_top != '150'$test_level 1;
            break; 
    Hi Glenn, I've run into a snag. I'm now trying to get my cat 150 to display subcats of active cats only. For some reason it's still displaying all of the subcats at all times, active or not. Can you help me modify this code to get what I need?

    I have 3 sections to my nav:
    -Shop by Category (default which displays subcats of active cats, the way I want it)
    -Shop by Collection (cat 150)
    -Shop by texture (cat 84)

    My categories_dressing_functions.php looks like this:
    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;          
    	  case 7://full active tree, others per level; always cat 23 & 150
            if($cPath_top != $path_top and $path_top != '84' and $path_top != '150') $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;
    }
    My categories_dressing_defines.php looks contains this:
    Code:
    define ('CAT_BOX_HEADING_84','1|0|||<h3>By Texture</h3>|1');//new list - text heading - style 1
    define ('CAT_BOX_HEADING_150','1|0|||<h3>By Collection</h3>|1');//new list - text heading - style 1
    define('CAT_BOX_ACTIVE_LEVEL', '7|0|0'); //show only active cats, to first subcat level

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

    Default Re: Categories Dressing

    Just remove the and $path_top != '150' from

    if($cPath_top != $path_top and $path_top != '84' and $path_top != '150') $test_level = 1;

    Oops sorry, distracted... you want to add some code from another case in there to handle cat150. Back in a few...

 

 

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