Zen Cart Logo
Forums / Addon Sideboxes / Categories Dressing

Categories Dressing

Views: 531,618

Results 1,641 to 1,660 of 2,268
6 Feb 2011, 7:27 PM
#1641
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Categories Dressing

You would need to have the chcategories option installed to get the whole active subcat tree.

6 Feb 2011, 7:47 PM
#1642
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Categories Dressing

Boggled - Since each subcat group belonging to a particular top cat will have its own group id, you can address that specifically to not fly out on hover. Seeing it live would let me tell you exactly what rule to use.

6 Feb 2011, 8:25 PM
#1643
boggled avatar

boggled

Zen Follower

Join Date:
Mar 2006
Location:
Tennessee
Posts:
286
Plugin Contributions:
0

Re: Categories Dressing

gjh42:

Boggled - Since each subcat group belonging to a particular top cat will have its own group id, you can address that specifically to not fly out on hover. Seeing it live would let me tell you exactly what rule to use.

Thanks for helping Glenn!

Here is the site: http://abikergear.com

Right now, both the header I set up (unlinked) and the actual category are both showing. (Motorcycle Helmets)

Edited to add...

I want to do the same thing with the other 'headers' too, but they don't have a category set up yet - Motorcycle Apparel, Motorcycle Accessories, Shop by Brand (that one is set up).

6 Feb 2011, 8:41 PM
#1644
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Categories Dressing

Add to the bottom of your stylesheet_chcategories_dressing.css

#chcategories #catGroup1_72 {display: none;}

Also, you should not have stylesheet_categories_dressing.css in your folder when you are using chcategories; some of the rules might conflict, and it is not needed in any case.

6 Feb 2011, 10:22 PM
#1645
boggled avatar

boggled

Zen Follower

Join Date:
Mar 2006
Location:
Tennessee
Posts:
286
Plugin Contributions:
0

Re: Categories Dressing

gjh42:

Add to the bottom of your stylesheet_chcategories_dressing.css

#chcategories #catGroup1_72 {display: none;}

Also, you should not have stylesheet_categories_dressing.css in your folder when you are using chcategories; some of the rules might conflict, and it is not needed in any case.

Thank you!
I'm going to try it out right now. :)

Thanks for the heads up on the other stylesheet too. I didn't know if I needed it or not.

6 Feb 2011, 10:24 PM
#1646
berserker avatar

berserker

Totally Zenned

Join Date:
May 2006
Posts:
712
Plugin Contributions:
0

Re: Categories Dressing

Hello,

Installed ch_categories and it is exactly what we need. Only problem is that we need the main categories to display on the main page and only show the sub sub categories for when a main category is clicked. Any help on how to set that up?

Also, are there other files from Categories Dressing that is not required when using CH Categories apart from stylesheet_categories_dressing.css?

Thanks

6 Feb 2011, 10:29 PM
#1647
boggled avatar

boggled

Zen Follower

Join Date:
Mar 2006
Location:
Tennessee
Posts:
286
Plugin Contributions:
0

Re: Categories Dressing

One other quick question...

Is there a way to style the flyout so that it will be fluid and auto adjust the width to match the subcat name?

I don't like the way it looks when a name wraps around to a second line, but don't want to make them all super wide.

6 Feb 2011, 10:54 PM
#1648
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Categories Dressing

These rules will give auto subcat width with no line wrapping:```
#chcategories ul ul {display: none;}

#chcategories li:hover {position: relative;}

#chcategories li:hover>ul {
display: block;
position: absolute;
left: 100%;
top: 0;
z-index: 100;
width: auto;
white-space: nowrap;
}

6 Feb 2011, 11:00 PM
#1649
boggled avatar

boggled

Zen Follower

Join Date:
Mar 2006
Location:
Tennessee
Posts:
286
Plugin Contributions:
0

Re: Categories Dressing

Again, thank you so much for all your help, Glenn!

Everything is working perfect now. :smile:

7 Feb 2011, 11:58 AM
#1650
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Categories Dressing

Berserker - The stylesheet is the only file that is duplicated. Ch_categories itself only adds two new files, a class and a module file, and uses the stock tpl_categories.php (or whatever is there in place of it).

To understand your requirements, you want top cats only on the home page? Or top and first level subcats? And all sub-subs also when a top cat is active? How about on pages not Home and not category/product (like ez-pages)?

7 Feb 2011, 3:23 PM
#1651
berserker avatar

berserker

Totally Zenned

Join Date:
May 2006
Posts:
712
Plugin Contributions:
0

Re: Categories Dressing

Hello,

We only need the top cats on the homepage and pages that are not category/product.
We have quite a lot of subs and sub-subs so having ch_categories to show on the main page makes the page a bit too long.
I tried to play around with it yesterday by having the original "categories" sidebox to show the top cats on homepage and then the "ch_categories" sidebox when a category is selected but couldnt get them to work separately.

I'll send you the link to the site to check.

Thanks

7 Feb 2011, 6:14 PM
#1652
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Categories Dressing

In categories_dressing_functions.php, add a new case to the switch in function cat_active_level_manage($path):```php
//alternate case for Berserker 20110207
//The main categories are already set up with all the subs and sub-subs using ch_categories.
//Just need to be able to show on the top cats on homepage and pages that are not category or product.
case 6://full tree (only all tops when no cat selected)
if($cPath_top == 0) $test_level = 1;
break;

Then set the parameters:```php
define('CAT_BOX_ACTIVE_LEVEL', '6|0|0');//show only top cats when no cat selected

Alternatively, adding the flyout rules would get the sidebox compact on all pages.

7 Feb 2011, 6:23 PM
#1653
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Categories Dressing

By the way, if you only want the currently selected top cat to fully expand, you can use the built-in case 3, and set the define like this:```php
define('CAT_BOX_ACTIVE_LEVEL', '3|0|0');//full active tree; only top cats when no cat selected

7 Feb 2011, 7:01 PM
#1654
berserker avatar

berserker

Totally Zenned

Join Date:
May 2006
Posts:
712
Plugin Contributions:
0

Re: Categories Dressing

Hello,

Tried both settings and case 3 is the best to what we need. But how can I stop the other top categories from displaying when a category is selected? You can check the site for the changes made.

Thanks

7 Feb 2011, 7:40 PM
#1655
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Categories Dressing

You didn't say that you wanted that - try the built-in case 2:```php
case 2://active only (per level when no cat selected)
if($cPath_top == 0){//test
$test_level = 1;
break;
}
if($cPath_top != $path_top) $skip_cat = 1;
break;

define('CAT_BOX_ACTIVE_LEVEL', '2|0|0');//full active tree only; only top cats when no cat selected  

If what you want is to have no top cats showing when one is selected, you could modify case 2:```php
      case 2://active only, without top  (per level when no cat selected)
        if($cPath_top == 0){//test
          $test_level = 1;
          break;
        }
        if($cPath_top != $path_top or $path == $path_top) $skip_cat = 1;
        break;
7 Feb 2011, 7:56 PM
#1656
berserker avatar

berserker

Totally Zenned

Join Date:
May 2006
Posts:
712
Plugin Contributions:
0

Re: Categories Dressing

Hello,

AWESOME!!!!! The following code does it:

case 2://active only (per level when no cat selected)
if($cPath_top == 0){//test
$test_level = 1;
break;
}
if($cPath_top != $path_top) $skip_cat = 1;
break;

The code below did not work though but does not matter :)

case 2://active only, without top (per level when no cat selected)
if($cPath_top == 0){//test
$test_level = 1;
break;
}
if($cPath_top != $path_top or $path == $path_top) $skip_cat = 1;
break;

Thank you so much for taking the time to help! Much appreciated!
Must say, you have some of the best mods here. Also using EZ Pages Footer Columns and Model List.

Thanks again!!! :)

16 Feb 2011, 1:15 PM
#1657
nicktrini avatar

nicktrini

New Zenner

Join Date:
May 2010
Location:
Trinidad & Tobago
Posts:
6
Plugin Contributions:
0

Re: Categories Dressing

Hello Glen, and everyone else. I've googled away and searched upon searched, and feel like this question has been asked, but maybe not with regards to this mod (which is awesome btw).

I want to completely eliminate my navBreadCrumbs bar, but the only way this makes sense for me to do is if people can still know where they are. I've found out how to highlight active subcategories, and have done this on my local server by using the following lines -

/change bullet when a category w/o bg image is open to products:/
#categories li a.cat-selected-text {
color:#990033;
}

My subcats locally have no background images, so this is pretty obvious.

My main concern is a way to keep the current category with a different or highlighted image button. here's my site (currently no subcats) -
http://www.niqfashion.com/theshop
Each category is in its own group per the defines file, and each has its own image and hover property per the css file. Is it possible to keep that hover image ON when that category is selected?

Thanks,
Nick

16 Feb 2011, 3:12 PM
#1658
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Categories Dressing

Add the selector in red if you want to use the hover state for the selected state.
Add the rule in green instead if you want to use a different image.```
#categories li a.catBg2 {
background-image: url(../buttons/english/catbg2.gif);
height: 30px;
}

#categories li a.catBg2:hover, #categories li a.cat-selected.catBg2 {
background-image: url(../buttons/english/catbg2hover.gif);
background-repeat:no-repeat;
}

#categories li a.cat-selected.catBg2 {
background-image: url(../buttons/english/catbg2selected.gif);
background-repeat:no-repeat;
}

16 Feb 2011, 3:18 PM
#1659
nicktrini avatar

nicktrini

New Zenner

Join Date:
May 2010
Location:
Trinidad & Tobago
Posts:
6
Plugin Contributions:
0

Re: Categories Dressing

awesome, thanks so much!

I was trying

categories li a.catBg1:active, and then
categories li a.catBg1:selected

:S But what you wrote worked perfectly. Guess I shoulda interpreted it from the Subcats code in the css file...

Thank you!

16 Feb 2011, 3:39 PM
#1660
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Categories Dressing

Note: the :active pseudo-class does not mean "current page link", but refers to the link state after being clicked and before the page refreshes. This used to be a noticeable lag (and an indication that something was actually happening was useful), but it is mostly irrelevant now with faster connections and computers.