Zen Cart Logo
Forums / Addon Sideboxes / Categories Dressing

Categories Dressing

Views: 531,607

Results 601 to 620 of 2,268
6 Mar 2009, 3:43 PM
#601
gjh42 avatar

gjh42

Black Belt

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

Categories Dressing

OK, so it's the sidebox headings you want to change, not the individual categories or category headings. Categories Dressing does not affect this at all. What you want is the Image Titles mod, which will allow you to replace sidebox header text with an image.

6 Mar 2009, 8:27 PM
#602
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

Limelites -

I have found that your categories lists have the corrrect number of closing </ul> tags; it is only the opening <ul> at the beginning of the box that is missing.

The only ways I can think of that that could happen are for the first category cPath to have negative 1 underscores (i.e. less than 0 of them), which is not possible; or for a line in tpl_categories.php to have been changed from its default.
At the top of the file, you should have```php
$content = "";
$prev_cat_depth = -1;



Otherwise, I see that chcategories is specifically built to use the identical information and template file as the standard, so replacing the standard tpl_categories.php with the Cat Dressing version should not cause any problems, and simply changing the stylesheet #categories tags to #chcategories really should work perfectly.
6 Mar 2009, 8:48 PM
#603
limelites avatar

limelites

Totally Zenned

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

Re: Categories Dressing

Glen, I have a value of 0 which I've now changed to -1

It's definitely taken an effect on the site.... yikes.... now I need to figure out what's going on there :-)

6 Mar 2009, 8:52 PM
#604
limelites avatar

limelites

Totally Zenned

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

Re: Categories Dressing

1st impressions.......... 100% perfect and 100% integrated to UCT!! Well done Glenn!!

6 Mar 2009, 9:16 PM
#605
limelites avatar

limelites

Totally Zenned

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

Re: Categories Dressing

OK, so it's working a treat... maybe you can help me with my top level categories, womenswear, menswear and childrenswear?

When they're not selected and their sub cats are not active, the top categories seem to be aligned right instead of aligned left (that's in FF.... in IE7 the top cats are aligned the same as their sub cats)? Which part of the stylesheet needs changed to rectify this?

Also, how would I make the top cats (in their unselected and non-active states) align left and be font bold?

6 Mar 2009, 10:07 PM
#606
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

It appears that you have solved the alignment issue, and I presume the bullets are now the way you want them... at any rate, everything looks intentional and coordinated.
To get the topcategories bold, you can add font-weight: bold;, and then font-weight: normal; to the subcats to reset them. You can do the same to the links if you want them not bold.```
#chcategories ul a {/top categories/
display: list-item;
list-style: disc inside url(../images/bullet1.gif);/change to list-style: none; to remove bullet/
background: no-repeat;
border: none;
margin: 0;
padding: 0;
font-weight: bold;
}

#chcategories ul ul {/subcategory lists/
list-style: none;
background: #ffffff;
border: none;
margin: 0 0 0.4em 0;
}

#chcategories ul ul a {/subcategories/
display: list-item;
list-style: none; /*circle inside url(../images/bullet1.gif);/change to list-style: none; to remove bullet/
background: #ffffff;
border: none;
margin: 0;
padding: 0;
font-weight: normal;
}

#chcategories li a.category-links {font-weight: normal;}

7 Mar 2009, 1:27 PM
#607
limelites avatar

limelites

Totally Zenned

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

Re: Categories Dressing

Thank you Glen, worked a real treat...

Your help as always has been priceless.

7 Mar 2009, 1:39 PM
#608
limelites avatar

limelites

Totally Zenned

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

Re: Categories Dressing

Just one little niggle, no biggie, but FF is not picking up on bullet1.gif for the sub cats whereas IE is..... any idea why that may be?

7 Mar 2009, 8:12 PM
#609
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

I didn't know that you wanted the bullets for subcats. Let me take a look at your stylesheet and source... back in a few.

7 Mar 2009, 8:15 PM
#610
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

From your copy of stylesheet_categories_dressing.css... do you see the problem?```
#chcategories ul ul a {/subcategories/

display: list-item;

list-style: none; /*circle inside url(../images/bullet1.gif);/*change to list-style: none; to remove bullet*/

background: #ffffff;

border: none;

margin: 0;

padding: 0;

font-weight: normal;

}
7 Mar 2009, 8:31 PM
#611
limelites avatar

limelites

Totally Zenned

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

Re: Categories Dressing

Ahhhh I see that now :-) Perfect....

Only one tiny thing I'd change, not sure if it's possible, but it seems to think that category Lingerie is a top level category and it makes Lingerie bold accordingly....

I think this may be because Lingerie has sub categories, whereas all the other 2nd level cats just have products.

Is there a way to make Lingerie font-weight normal?

7 Mar 2009, 9:05 PM
#612
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

/*change  bullet when a category w/o bg image is open to subs:*/

#chcategories li a.cat-parent-text {

    list-style: square inside url(../images/bullet2.gif);/*change to list-style: none; to remove bullet*/

	position: relative; left: -17px;

	font-size: 13px;

	font-weight: bold;

    }

a.cat-parent-text
applies to the top cats as well as to this one subcat that has subs; you can delete the font-weight here, as it is also covered under
#chcategories ul a {/top categories/

7 Mar 2009, 9:45 PM
#613
limelites avatar

limelites

Totally Zenned

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

Re: Categories Dressing

Glen, you really know your stuff... I'm really pleased with my navigation system now, it's working wonderfully and it looks just the way I want it.

I can't thank you enough for your time.

Her goes again though... another challenge :-)

Perhaps this is nothing to do with the cat_dressing mod and more to do with the UCT mod.... But I have set only top level and 2nd level categories to display as it looks ridiculous when 3rd level cats are always visible.

I am just wondering if there would be a way of keeping the way I have it now, but allowing the 3rd level category to display when it's parent category is activated...

For example, when I click on Lingerie, the 3rd levels don't appear beneath it...... I've gotten round this only by using an HTML page with the links to these categories in HTML. I am just wondering if there'd be an easy way to have them drop down under Lingerie in the categories tree too? Only when parent is selected and only 3rd level cats for the selected parent.

If this is too complex then don't worry about it... the way it's running just now is 99.9999999% peferct :-)

7 Mar 2009, 10:02 PM
#614
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

Funny you asked... Categories Dressing v2.7, just submitted to Free Addons, includes an active/level combination that would suit your purpose. From the readme:

The category display-limiting define takes this form:

define('CAT_BOX_ACTIVE_LEVEL', 'active|highest_level|deepest_level');

* The "active" field controls whether categories outside the current active tree will display: 0=all tops/1=active tree only/2=active tree only (all tops when no cat selected)/3=full active tree, others limited per level controls.
* The "highest_level" field controls whether top categories will display: 0=all levels/1=no topcats/etc.
* The "deepest_level" field controls whether subcategories will display: 1=only first subcats/2=first & second subcats/.../9=all levels down to 9.

If you don't want to wait for the new version, you can replace the existing version of the cat_active_level_manage() function in /includes/functions/extra_functions/categories_dressing_functions.php with this:```php
/* Categories Dressing v2.7 - Glenn Herbert (gjh42) - 20090307
*/

function cat_active_level_manage($path) {
$skip_cat = 0;
if (defined('CAT_BOX_ACTIVE_LEVEL')) {
$cat_box_active_level = explode('|',constant('CAT_BOX_ACTIVE_LEVEL'));
$current_top = (int)$GET['cPath'];
$iteration_top = (int)$path; // set = this iteration's topcat
$cat_depth = substr_count($path,'
');
//tests for various kinds of skipping - more can be added
$skip_cat = $skip_cat + ($cat_box_active_level[0] == 1 and $current_top != $iteration_top)?1:0;
$skip_cat = $skip_cat + ($cat_box_active_level[0] == 2 and $current_top != $iteration_top and $current_top != 0)?1:0;
$skip_cat = $skip_cat + ($cat_box_active_level[0] == 3 and ($current_top != $iteration_top and ($cat_box_active_level[1] > $cat_depth or $cat_box_active_level[2] < $cat_depth)))?1:0;
$skip_cat = $skip_cat + ($cat_box_active_level[1] > $cat_depth and $cat_box_active_level[0] != 2 and $cat_box_active_level[0] != 3)?1:0;
$skip_cat = $skip_cat + ($cat_box_active_level[2] < $cat_depth and $cat_box_active_level[0] != 3)?1:0;
}//defined
return $skip_cat;
}

7 Mar 2009, 10:12 PM
#615
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

On reflection, it might not work perfectly for you; I think Lingerie would expand when any Womenswear subcat was selected. It should be possible to tweak the function to work as you want. The define/function combination is open-ended, so any number of options can be added to the code.

8 Mar 2009, 8:57 PM
#616
limelites avatar

limelites

Totally Zenned

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

Re: Categories Dressing

Hi Glen,

I did as you suggested and replaced the old code with the new code below but it has no effect whatsoever.

8 Mar 2009, 11:51 PM
#617
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

That code adds another optional setting without changing the function of the current settings. You would need to set the 'CAT_BOX_ACTIVE_LEVEL' define's first field to 3 to make it effective. Let me know how it behaves.

9 Mar 2009, 4:49 AM
#618
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

A version of the function with a fourth option, to expand the active tree only to subs of cats in $cPath. Inactive cats are subject to level control settings.```php
/* Categories Dressing v2.7.1 - Glenn Herbert (gjh42) - 20090308 (new active option 4)
*/

function cat_active_level_manage($path) {
$skip_cat = 0;
if (defined('CAT_BOX_ACTIVE_LEVEL')) {
$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 ('true'){
case ($cat_box_active_level[0] == 1 and $cPath_top != $path_top):
$skip_cat = 1;
break;
case ($cat_box_active_level[0] == 2 and $cPath_top != $path_top and $cPath_top != 0):
$skip_cat = 1;
break;
case ($cat_box_active_level[0] == 3):
if($cPath_top == $path_top) break;//otherwise check levels
case ($cat_box_active_level[0] == 4):
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
}
break;
}//if not active test for level
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
}//defined
return $skip_cat;
}

9 Mar 2009, 5:27 PM
#619
limelites avatar

limelites

Totally Zenned

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

Re: Categories Dressing

Hi Glen,

I couldn't get this to work but I don't want to waste your time on this as it's not important... In fact the chances are I wont even like it if I did get it working as the more I think about it, the more I feel it may look just wrong... I have far too many Lingerie Sub Categories you see... If they were expanded then it would look ridiculous....

Sorry to have wasted your time on this, I should have given it more thought before asking about it...

Thanks for all your time too, you've been a really brilliant help.

9 Mar 2009, 5:44 PM
#620
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

I wouldn't have spent time on it if it didn't seem like a generally useful option. I just wrote the code and didn't get to testing, so I'll noodle around and see what it may need to work correctly.