Zen Cart Logo
Forums / Addon Sideboxes / Categories Dressing

Categories Dressing

Views: 531,467

Results 2,121 to 2,140 of 2,268
04 Nov 2012, 16:16
#2121
gjh42 avatar

gjh42

Black Belt

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

Categories Dressing

You could do image substitution for the category names, with images containing the text you want. They would have alt tags of the actual category names, which might even be good for SEO...

04 Nov 2012, 16:27
#2122
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

Re: Categories Dressing

I thought about this, but is there a way of doing it with text?

04 Nov 2012, 23:10
#2123
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

Re: Categories Dressing

I went about this a different way, I just created a new sidebox, disabled the sidebox header and use an HTML table to generate the links with anchor text I input to the table and hard coded URL's to the newly named categories. This should help a lot with SEO for people searching, "white wedding flowers", "yellow wedding flowers"...etc. So, I got there on this one. I just used a display:none; to get rid of the #catGroup1_339 and #catGroup1_26

04 Nov 2012, 23:15
#2124
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

Re: Categories Dressing

I have another question though, on a different subject completely. I've had to disable the top level category using li.cat-top {font-size:1.1em; display:none;}

I didn't want to do this though, I wanted to just disable category ID 349 from the admin panel. However, when I disable category 349, it also disables the link to coming soon (where the little yellow star is). I tried and tried but for the life of me I couldn't figure out why?

It must have something to to with this line, from categories_dressing_defines.php

define ('CAT_BOX_HEADING_349','0|0||| <a href="index.php?main_page=wedding_flower_gallery">Coming Soon ...</a>|3');

Can you think of a way for me to keep the "coming soon" on display when I disable category 349 from admin? I don't want to just disable top level categories as we're planning to add a few new ones in the very near future.

05 Nov 2012, 13:16
#2125
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

If cat 349 is going to stay disabled, you can move the define to whatever cat or subcat is going to stay at the top of the list.

Alternatively, you can make cat 349 its own category group and the rest another group, which will give that an id of #catGroup349.
Then add to your stylesheet

#catGroup349 .cat-top {display: none;}

05 Nov 2012, 13:34
#2126
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

Re: Categories Dressing

gjh42:

...Alternatively, you can make cat 349 its own category group and the rest another group, which will give that an id of #catGroup349

This is the part that baffles me. How do I 'make cat 349 into it's own category group?

05 Nov 2012, 15:37
#2127
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

The readme has instructions for this, under the "To start a new <ul> list grouping at a specific point in the categories menu:" section.

05 Nov 2012, 16:05
#2128
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

Re: Categories Dressing

gjh42:

The readme has instructions for this, under the "To start a new <ul> list grouping at a specific point in the categories menu:" section.

I changed from this:

define ('CAT_BOX_HEADING_349','0|0||| <a href="index.php?main_page=wedding_flower_gallery">Coming Soon ...</a>|3');

To this:

define ('CAT_BOX_HEADING_349','1|0||| <a href="index.php?main_page=wedding_flower_gallery">Coming Soon ...</a>|3');

Then added #catGroup349 .cat-top {display: none;} to the stylesheet. Seems to work perfectly. Thank you Glen.

06 Nov 2012, 20:58
#2129
swamyg1 avatar

swamyg1

Zen Follower

Join Date:
Dec 2008
Location:
San Fran
Posts:
382
Plugin Contributions:
0

Re: Categories Dressing

gjh42:

You would need to modify the switch in the cat_active_level_manage() function in categories_dressing_functions.php. Add a new case like this:```php
case 7://full active tree, others per level; always cat 23
if($cPath_top != $path_top and $path_top != '23') $test_level = 1;
break;

> 
> Change your define to this:
> 
> define('CAT_BOX_ACTIVE_LEVEL', '7|0|0');


To do this to another category, would I just add the following to include the new category?

```php
case 8://full active tree, others per level; always cat 150
        if($cPath_top != $path_top and $path_top != '150') $test_level = 1;
        break;  

I tried this, but it doesn't seem to work?
06 Nov 2012, 21:06
#2130
swamyg1 avatar

swamyg1

Zen Follower

Join Date:
Dec 2008
Location:
San Fran
Posts:
382
Plugin Contributions:
0

Re: Categories Dressing

I also added this to categories_dressing_defines.php:

define('CAT_BOX_ACTIVE_LEVEL', '8|0|0'); //show only active cats, to first subcat level

Still no worky:(

07 Nov 2012, 01:33
#2131
swamyg1 avatar

swamyg1

Zen Follower

Join Date:
Dec 2008
Location:
San Fran
Posts:
382
Plugin Contributions:
0

Re: Categories Dressing

Nevermind, it seems I shouldn't have added a new line in my categories_dressing_defines.php

I just needed to change the line to allow for the new case number. Changing the line to this worked for me:

define('CAT_BOX_ACTIVE_LEVEL', '8|0|0');

Thank you for providing such an excellent custom solution!

07 Nov 2012, 01:57
#2132
swamyg1 avatar

swamyg1

Zen Follower

Join Date:
Dec 2008
Location:
San Fran
Posts:
382
Plugin Contributions:
0

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.

07 Nov 2012, 07:45
#2133
gjh42 avatar

gjh42

Black Belt

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

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
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;

07 Nov 2012, 19:30
#2134
swamyg1 avatar

swamyg1

Zen Follower

Join Date:
Dec 2008
Location:
San Fran
Posts:
382
Plugin Contributions:
0

Re: Categories Dressing

Thank you Glenn, worked a treat!

14 Nov 2012, 22:42
#2135
swamyg1 avatar

swamyg1

Zen Follower

Join Date:
Dec 2008
Location:
San Fran
Posts:
382
Plugin Contributions:
0

Re: Categories Dressing

Ok, so I have the following in my defines:

 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

14 Nov 2012, 23:03
#2136
gjh42 avatar

gjh42

Black Belt

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

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.

21 Nov 2012, 17:19
#2137
accel89 avatar

accel89

New Zenner

Join Date:
Jun 2012
Posts:
5
Plugin Contributions:
0

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

21 Nov 2012, 18:49
#2138
accel89 avatar

accel89

New Zenner

Join Date:
Jun 2012
Posts:
5
Plugin Contributions:
0

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.

21 Nov 2012, 19:01
#2139
gjh42 avatar

gjh42

Black Belt

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

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.

25 Nov 2012, 05:03
#2140
swamyg1 avatar

swamyg1

Zen Follower

Join Date:
Dec 2008
Location:
San Fran
Posts:
382
Plugin Contributions:
0

Re: Categories Dressing

gjh42:

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
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:

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:

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