Zen Cart Logo
Forums / Addon Sideboxes / Categories Dressing

Categories Dressing

Views: 531,457

Results 201 to 220 of 2,268
16 Mar 2008, 17:00
#201
gjh42 avatar

gjh42

Black Belt

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

Categories Dressing

You will need to add either display: block; or display: list-item; to this declaration in your stylesheet:

a.category-top {
    font-family:  'arial', serif;
    font-weight: bold;
    font-size: 1.0em;
    color: navy; 
    padding: 0.0em 0.0em;
    }
```This will avoid the possibility of having two categories show up on one line after you remove the necessary <br />.
16 Mar 2008, 21:55
#202
james739 avatar

james739

Zen Follower

Join Date:
Jun 2007
Posts:
210
Plugin Contributions:
0

Re: Categories Dressing

Hello,

I have 2 questions

  1. How do I remove the link heaing in inforamtion sidebox?

  2. I want to put "footwear" title right underneath the "Men" title, how do i do that?

www.trendsdepot.com

Thanks in advance!

16 Mar 2008, 22:53
#203
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

I saw another site recently which did the same thing you are wanting, as a novel but logical extension of the Cat Dressing code.

You want the ability to have two different headings for the same category, so duplicate this whole switch section immediately below the existing section:```php
// categories dressing - add (divider and) heading above a cat
switch ($current_path) {
case '23': //replace number with your desired cPath
//$content .= '<hr class="catBoxDivider" />' . "\n"; // to add divider uncomment this line
$content .= '<span class="catBoxHeading1">' . (file_exists(DIR_WS_TEMPLATE_IMAGES . 'cathead' . $current_path . '.gif') ? zen_image(DIR_WS_TEMPLATE_IMAGES . 'cathead' . $current_path . '.gif') . '</span>':'Heading 1</span>' . $disp_block_head) . "\n";
break;
}



The example link heading can be disabled by commenting out this line```php
      $content .= '<span class="catBoxHeading1">' . (file_exists(DIR_WS_TEMPLATE_IMAGES . 'cathead-all.gif') ? zen_image(DIR_WS_TEMPLATE_IMAGES . 'cathead-all.gif') . '</span>':'Link Heading</span>' . $disp_block_head) . "\n";// categories dressing - uncomment this line for heading above link 
```similar to the others```php
        //$content .= '<span class="catBoxHeading1">' . (file_exists(DIR_WS_TEMPLATE_IMAGES . 'cathead-featured.gif') ? zen_image(DIR_WS_TEMPLATE_IMAGES . 'cathead-featured.gif') . '</span>':'Link Heading</span>' . $disp_block_head) . "\n";// categories dressing - uncomment this line for heading above link 
16 Mar 2008, 23:02
#204
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

Alternately, you could duplicate the $content .= line in the case where you want a second heading, since each case only deals with one category.```php
// categories dressing - add (divider and) heading above a cat
switch ($current_path) {
case '23': //replace number with your desired cPath
//$content .= '<hr class="catBoxDivider" />' . "\n"; // to add divider uncomment this line
$content .= '<span class="catBoxHeading1">' . (file_exists(DIR_WS_TEMPLATE_IMAGES . 'cathead' . $current_path . '.gif') ? zen_image(DIR_WS_TEMPLATE_IMAGES . 'cathead' . $current_path . '.gif') . '</span>':'Big Heading</span>' . $disp_block_head) . "\n";
$content .= '<span class="catBoxHeading2">' . (file_exists(DIR_WS_TEMPLATE_IMAGES . 'cathead' . $current_path . '.gif') ? zen_image(DIR_WS_TEMPLATE_IMAGES . 'cathead' . $current_path . '.gif') . '</span>':'Small Heading</span>' . $disp_block_head) . "\n";
break;
}

17 Mar 2008, 01:57
#205
james739 avatar

james739

Zen Follower

Join Date:
Jun 2007
Posts:
210
Plugin Contributions:
0

Re: Categories Dressing

This option worked perfectly. Thank you again for your help and prompt response!:clap:

gjh42:

Alternately, you could duplicate the $content .= line in the case where you want a second heading, since each case only deals with one category.```php
// categories dressing - add (divider and) heading above a cat
switch ($current_path) {
case '23': //replace number with your desired cPath
//$content .= '<hr class="catBoxDivider" />' . "\n"; // to add divider uncomment this line
$content .= '<span class="catBoxHeading1">' . (file_exists(DIR_WS_TEMPLATE_IMAGES . 'cathead' . $current_path . '.gif') ? zen_image(DIR_WS_TEMPLATE_IMAGES . 'cathead' . $current_path . '.gif') . '</span>':'Big Heading</span>' . $disp_block_head) . "\n";
$content .= '<span class="catBoxHeading2">' . (file_exists(DIR_WS_TEMPLATE_IMAGES . 'cathead' . $current_path . '.gif') ? zen_image(DIR_WS_TEMPLATE_IMAGES . 'cathead' . $current_path . '.gif') . '</span>':'Small Heading</span>' . $disp_block_head) . "\n";
break;
}

18 Mar 2008, 04:23
#206
zafer avatar

zafer

New Zenner

Join Date:
Jan 2008
Posts:
50
Plugin Contributions:
0

Re: Categories Dressing

Than you for help

I removed the <br/> in tpl_category_list_box.
Resulted in one extra line removed between products on category listing. But can not find why other extra line is still there. Here is the code:

// $disp_block = '<br/>';
$disp_block = '';

$content = "";
$content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">' . "\n";

for ($i=0;$i<sizeof($box_categories_array);$i++) {

 //set selected style ($box_categories_array[$i]['current'] does not work)	
 $div_class='';
 if ($products_id){
	 if (($products_id)&&($box_categories_array[$i]['products_id']==$products_id)){
		 $div_class='category-subs-selected';
	 }
 }else{
	 if(($current_category_id!=0)&&($box_categories_array[$i]['category_id']==$current_category_id)){
		 $div_class='category-subs-selected';
	 }
 }	 	 	

// set top style
if ($box_categories_array[$i]['top'] == 'true'){	
	$a_class = 'category-top';
}elseif($box_categories_array[$i]['has_sub_cat']){
	$a_class = 'category-subs';
}else{
	$a_class='category-products';
}
 // link to cat or prod
if ($box_categories_array[$i]['is_product'] == true){
	$link = zen_href_link(FILENAME_PRODUCT_INFO, $box_categories_array[$i]['path']);
}
else{
	$link = '';  //zen_href_link(FILENAME_DEFAULT);
}	
//indent
if($box_categories_array[$i]['is_product'] == true){
	$indent = str_repeat(CATEGORIES_SUBCATEGORIES_INDENT,  $box_categories_array[$i]['level']+2); 
}else{
	$indent = str_repeat(CATEGORIES_SUBCATEGORIES_INDENT,  $box_categories_array[$i]['level']); 
}
//cat sub seperator
if (($box_categories_array[$i]['level'] == 0)&&($box_categories_array[$i]['is_product'] == false)){
	$separator = '';
}else{
	$separator = CATEGORIES_SEPARATOR_SUBS;
}
// count
$count='';
if (SHOW_COUNTS == 'true') {
	if($box_categories_array[$i]['is_product'] != true){
		$count = CATEGORIES_SEPARATOR.CATEGORIES_COUNT_PREFIX . $box_categories_array[$i]['count'] . CATEGORIES_COUNT_SUFFIX ;
	}
}
//add content
$content .= '<span class="'. $div_class .'">'. 
	$indent.$separator.'<a class="'. $a_class .'" href="'. $link .'">'. $box_categories_array[$i]['name'] .'</a>'. $count .
'</span>';

}

if (SHOW_CATEGORIES_BOX_SPECIALS == 'true' or SHOW_CATEGORIES_BOX_PRODUCTS_NEW == 'true' or SHOW_CATEGORIES_BOX_FEATURED_PRODUCTS == 'true' or SHOW_CATEGORIES_BOX_PRODUCTS_ALL == 'true') {
// display a separator between categories and links
if (SHOW_CATEGORIES_SEPARATOR_LINK == '1') {
$content .= '<hr id="catBoxDivider" />' . "\n";
}
if (SHOW_CATEGORIES_BOX_SPECIALS == 'true') {
$show_this = $db->Execute("select s.products_id from " . TABLE_SPECIALS . " s where s.status= '1' limit 1");
if ($show_this->RecordCount() > 0) {
$content .= '<a class="category-links" href="' . zen_href_link(FILENAME_SPECIALS) . '">' . CATEGORIES_BOX_HEADING_SPECIALS . '</a>' . '<br />';
}
}
if (SHOW_CATEGORIES_BOX_PRODUCTS_NEW == 'true') {
switch (true) {
case (SHOW_NEW_PRODUCTS_LIMIT == '0'):
$display_limit = '';
break;
case (SHOW_NEW_PRODUCTS_LIMIT == '1'):
$display_limit = " and date_format(p.products_date_added, '%Y%m') >= date_format(now(), '%Y%m')";
break;
case (SHOW_NEW_PRODUCTS_LIMIT == '30'):
$display_limit = ' and TO_DAYS(NOW()) - TO_DAYS(p.products_date_added) <= 30';
break;
case (SHOW_NEW_PRODUCTS_LIMIT == '60'):
$display_limit = ' and TO_DAYS(NOW()) - TO_DAYS(p.products_date_added) <= 60';
break;
case (SHOW_NEW_PRODUCTS_LIMIT == '90'):
$display_limit = ' and TO_DAYS(NOW()) - TO_DAYS(p.products_date_added) <= 90';
break;
case (SHOW_NEW_PRODUCTS_LIMIT == '120'):
$display_limit = ' and TO_DAYS(NOW()) - TO_DAYS(p.products_date_added) <= 120';
break;
}

  $show_this = $db->Execute("select p.products_id
                             from " . TABLE_PRODUCTS . " p
                             where p.products_status = '1' " . $display_limit . " limit 1");
  if ($show_this->RecordCount() > 0) {
    $content .= '<a class="category-links" href="' . zen_href_link(FILENAME_PRODUCTS_NEW) . '">' . CATEGORIES_BOX_HEADING_WHATS_NEW . '</a>' . '<br />';
  }
}
if (SHOW_CATEGORIES_BOX_FEATURED_PRODUCTS == 'true') {
  $show_this = $db->Execute("select products_id from " . TABLE_FEATURED . " where status= '1' limit 1");
  if ($show_this->RecordCount() > 0) {
    $content .= '<a class="category-links" href="' . zen_href_link(FILENAME_FEATURED_PRODUCTS) . '">' . CATEGORIES_BOX_HEADING_FEATURED_PRODUCTS . '</a>' . '<br />';
  }
}
if (SHOW_CATEGORIES_BOX_PRODUCTS_ALL == 'true') {
  $content .= '<a class="category-links" href="' . zen_href_link(FILENAME_PRODUCTS_ALL) . '">' . CATEGORIES_BOX_HEADING_PRODUCTS_ALL . '</a>';
}

}
$content .= '</div>';

?>

19 Mar 2008, 03:32
#207
zafer avatar

zafer

New Zenner

Join Date:
Jan 2008
Posts:
50
Plugin Contributions:
0

Re: Categories Dressing

gjh42:

tpl_category_list_box.php will be the tpl file for the expanded categories mod you are using. The file that Categories Dressing uploads when you install it is tpl_categories.php.

You will need to compare the two files and, where tpl_categories.php has $disp_block and tpl_category_list_box.php has <br />, delete the <br />. There will be several of these.

display: block; or display: list-item;
will not be in the php files; they are in the stylesheet (stylesheet_categories_dressing.css if you have uploaded it correctly).
You have put two declarations from stylesheet_categories_dressing.css into your main stylesheet and modified them to fit the stock class tags, which is fine. If the list-item markers are all you want, you only need to delete the <br /> tags as noted above. Test after each deletion to make sure you are not removing a necessary line break (you will not want to remove the <br /> tags after the specials/featured/new/all links.)

You also need to upload either the bullet1.gif and similar images that came with Cat Dressing, or your own marker images, unless you want to use the default disc markers.


Thank you for your help

I removed the <br/> in tpl_category_list_box. (below) There was two extra lines on the product on category list.
This Resulted in one extra line removed between products on category listing. But can not find why other extra line is still there. Here is the code:

// $disp_block = '<br/>';
$disp_block = '';

$content = "";
$content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">' . "\n";

for ($i=0;$i<sizeof($box_categories_array);$i++) {

//set selected style ($box_categories_array[$i]['current'] does not work)
$div_class='';
if ($products_id){
if (($products_id)&&($box_categories_array[$i]['products_id']==$products_id)){
$div_class='category-subs-selected';
}
}else{
if(($current_category_id!=0)&&($box_categories_arr ay[$i]['category_id']==$current_category_id)){
$div_class='category-subs-selected';
}
}

// set top style
if ($box_categories_array[$i]['top'] == 'true'){
$a_class = 'category-top';
}elseif($box_categories_array[$i]['has_sub_cat']){
$a_class = 'category-subs';
}else{
$a_class='category-products';
}
// link to cat or prod
if ($box_categories_array[$i]['is_product'] == true){
$link = zen_href_link(FILENAME_PRODUCT_INFO, $box_categories_array[$i]['path']);
}
else{
$link = ''; //zen_href_link(FILENAME_DEFAULT);
}
//indent
if($box_categories_array[$i]['is_product'] == true){
$indent = str_repeat(CATEGORIES_SUBCATEGORIES_INDENT, $box_categories_array[$i]['level']+2);
}else{
$indent = str_repeat(CATEGORIES_SUBCATEGORIES_INDENT, $box_categories_array[$i]['level']);
}
//cat sub seperator
if (($box_categories_array[$i]['level'] == 0)&&($box_categories_array[$i]['is_product'] == false)){
$separator = '';
}else{
$separator = CATEGORIES_SEPARATOR_SUBS;
}
// count
$count='';
if (SHOW_COUNTS == 'true') {
if($box_categories_array[$i]['is_product'] != true){
$count = CATEGORIES_SEPARATOR.CATEGORIES_COUNT_PREFIX . $box_categories_array[$i]['count'] . CATEGORIES_COUNT_SUFFIX ;
}
}
//add content
$content .= '<span class="'. $div_class .'">'.
$indent.$separator.'<a class="'. $a_class .'" href="'. $link .'">'. $box_categories_array[$i]['name'] .'</a>'. $count .
'</span>';

}

if (SHOW_CATEGORIES_BOX_SPECIALS == 'true' or SHOW_CATEGORIES_BOX_PRODUCTS_NEW == 'true' or SHOW_CATEGORIES_BOX_FEATURED_PRODUCTS == 'true' or SHOW_CATEGORIES_BOX_PRODUCTS_ALL == 'true') {
// display a separator between categories and links
if (SHOW_CATEGORIES_SEPARATOR_LINK == '1') {
$content .= '<hr id="catBoxDivider" />' . "\n";
}
if (SHOW_CATEGORIES_BOX_SPECIALS == 'true') {
$show_this = $db->Execute("select s.products_id from " . TABLE_SPECIALS . " s where s.status= '1' limit 1");
if ($show_this->RecordCount() > 0) {
$content .= '<a class="category-links" href="' . zen_href_link(FILENAME_SPECIALS) . '">' . CATEGORIES_BOX_HEADING_SPECIALS . '</a>' . '<br />';
}
}
if (SHOW_CATEGORIES_BOX_PRODUCTS_NEW == 'true') {
switch (true) {
case (SHOW_NEW_PRODUCTS_LIMIT == '0'):
$display_limit = '';
break;
case (SHOW_NEW_PRODUCTS_LIMIT == '1'):
$display_limit = " and date_format(p.products_date_added, '%Y%m') >= date_format(now(), '%Y%m')";
break;
case (SHOW_NEW_PRODUCTS_LIMIT == '30'):
$display_limit = ' and TO_DAYS(NOW()) - TO_DAYS(p.products_date_added) <= 30';
break;
case (SHOW_NEW_PRODUCTS_LIMIT == '60'):
$display_limit = ' and TO_DAYS(NOW()) - TO_DAYS(p.products_date_added) <= 60';
break;
case (SHOW_NEW_PRODUCTS_LIMIT == '90'):
$display_limit = ' and TO_DAYS(NOW()) - TO_DAYS(p.products_date_added) <= 90';
break;
case (SHOW_NEW_PRODUCTS_LIMIT == '120'):
$display_limit = ' and TO_DAYS(NOW()) - TO_DAYS(p.products_date_added) <= 120';
break;
}

$show_this = $db->Execute("select p.products_id
from " . TABLE_PRODUCTS . " p
where p.products_status = '1' " . $display_limit . " limit 1");
if ($show_this->RecordCount() > 0) {
$content .= '<a class="category-links" href="' . zen_href_link(FILENAME_PRODUCTS_NEW) . '">' . CATEGORIES_BOX_HEADING_WHATS_NEW . '</a>' . '<br />';
}
}
if (SHOW_CATEGORIES_BOX_FEATURED_PRODUCTS == 'true') {
$show_this = $db->Execute("select products_id from " . TABLE_FEATURED . " where status= '1' limit 1");
if ($show_this->RecordCount() > 0) {
$content .= '<a class="category-links" href="' . zen_href_link(FILENAME_FEATURED_PRODUCTS) . '">' . CATEGORIES_BOX_HEADING_FEATURED_PRODUCTS . '</a>' . '<br />';
}
}
if (SHOW_CATEGORIES_BOX_PRODUCTS_ALL == 'true') {
$content .= '<a class="category-links" href="' . zen_href_link(FILENAME_PRODUCTS_ALL) . '">' . CATEGORIES_BOX_HEADING_PRODUCTS_ALL . '</a>';
}
}
$content .= '</div>';

?>

19 Mar 2008, 04:01
#208
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

I don't see a reason in that file why you would be getting extra line spaces. The expanded category mod is not mine, so I'm not familiar with all aspects of its function.

The stylesheet could also have an effect on the spacing.

19 Mar 2008, 13:03
#209
hemz avatar

hemz

New Zenner

Join Date:
Dec 2007
Location:
brighton UK
Posts:
40
Plugin Contributions:
0

Re: Categories Dressing

Hello

I am a very new zenner and I have just installed categories dressing and I would like some help please! I want images next to each of my categories:

http://peterreed.dev.whitehatmedia.com/

I want them to look like this:
http://peterreed.dev.whitehatmedia.com/home-page-design2.jpg

but have no idea where to place the category ids c_21,c_1,c_2,c_90,c_89,c_92,c_91 into tpl_categories.php

any help would be greatly appreciated :smile:

Thank You!

19 Mar 2008, 17:16
#210
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

This would be beyond the mod's current function; it is not designed to display both the standard text and an image.

Fortunately, though, the stock tpl_categories.php has the identity of the category image available to it, and some code could be added to use the category image in front of each top cat name. I discovered this a while ago, but this is the first time I have seen a request for using it. I'll look into it and come back with the code to do this.

25 Mar 2008, 09:28
#211
hemz avatar

hemz

New Zenner

Join Date:
Dec 2007
Location:
brighton UK
Posts:
40
Plugin Contributions:
0

Re: Categories Dressing

Hi Glenn

That would be great! I have had a look around and can't find the code for this - if you could point us in the right direction that would be cool!

Cheers ! Happy Easter :smile:

25 Mar 2008, 17:29
#213
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

Great! That code can even be simplified a bit, because the category image name is available directly in that file as $box_categories_array[$i]['image'] instead of having to run around looking it up.
So instead of```php
// for adding image beside category name

// categories_image
$categorySelect = str_replace('cPath=','',$box_categories_array[$i]['path']);
$categories_image = zen_get_categories_image($categorySelect);
$myCategoryImage = zen_image(DIR_WS_IMAGES . $categories_image, '', '50', '75');
// categories_image

$content .= $myCategoryImage;

// end adding image code

you can use```php
// for adding image beside category name

// categories_image
$myCategoryImage = zen_image(DIR_WS_IMAGES . $box_categories_array[$i]['image'], '', '50', '75');
// categories_image

$content .= $myCategoryImage;

// end adding image code
26 Mar 2008, 01:35
#214
mthem2003 avatar

mthem2003

New Zenner

Join Date:
Jan 2008
Posts:
83
Plugin Contributions:
0

Re: Categories Dressing

Hello,

This MOD is excellent, but all i want is to add an image of a line between each item listed in the category menu.

i am not sure what should i remove or add in the dressing files to achieve this?

any thoughts?

26 Mar 2008, 07:24
#215
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

As described in the readme, find this section in tpl_categories.php```php
// categories dressing - add divider above specified cats
if(in_array($current_path, explode(",",'3,22,21_56'))) { //replace numbers with your cat ids separated by commas
$content .= '<hr class="catBoxDivider" />' . "\n";
}

27 Mar 2008, 18:54
#216
maxim avatar

maxim

New Zenner

Join Date:
Feb 2008
Posts:
17
Plugin Contributions:
0

Re: Categories Dressing

Dear Glenn:

After sending you the PM, I am a little confused myself...But, I am trying to use images for the category names in the Categories - Tabs Menu header via the use of Categories Dressing v2.1.

I currently have Alternative Header v1.1a installed, which places the links for login, shopping cart and my account into the image header rather than on a bar. It also centers the header search box. (I believe it is also supposed to create a tabbed categories menu above the header search box. However, my install just shows the standard Zen Categories - Tabs Menu.

From some of your posts, I believe that I can use Categories Dressing to effect the use of images in place of text for the category names in the Categories - Tabs Menu - by copying the "relevant code" from tpl_categories.php to tpl_header.php (which comes from Alternative Header 1.1a). However, I do not know what the "relevant code" is.

Per your request for code, hopefully the following is meaningful:

The code from Alternative Header v1.1a's ...includes/templates/CUSTOM/common/tpl_header.php, which references categories tabs is as follows:

<!--bof-optional categories tabs navigation display-->
<?php require($template->get_template_dir('tpl_modules_categories_tabs.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_categories_tabs.php'); ?>
<!--eof-optional categories tabs navigation display-->

The code for ...includes/templates/CUSTOM/templates/tpl_modules_categories_tabs.php, which is referenced in tpl_header.php is as follows:

<?php
 include(DIR_WS_MODULES . zen_get_module_directory(FILENAME_CATEGORIES_TABS));
?>
<?php if (CATEGORIES_TABS_STATUS == '1' && sizeof($links_list) >= 1) { ?>
<div id="navCatTabsWrapper">
<div id="navCatTabs">
<ul>
<?php for ($i=0, $n=sizeof($links_list); $i<$n; $i++) { ?>
  <li><?php echo $links_list[$i];?></li>
<?php } ?>
</ul>
</div>
</div>
<?php } ?>

I hope this is a clearer description of my objectives/issues.

Thanks for your help. . Newbie Linda

27 Mar 2008, 19:05
#217
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

The file to edit will be /includes/modules/your_template/categories_tabs.php, as this is where the output is originally built.

It shouldn't be too hard to adapt the Cat Dressing code to this. I'll look at it and get back.

05 Apr 2008, 09:20
#218
ebloger avatar

ebloger

New Zenner

Join Date:
Dec 2007
Posts:
35
Plugin Contributions:
0

Re: Categories Dressing

Free Call Stuff A Top Level Cat
SubLevel 2 A
SubLevel 2 B
Sub Sub Cat 2B1
Sub Sub Cat 2B2
Sub Sub Cat 2B3
SubLevel 2 C

this mod is great! but when my zc have 3 sublevel Categories ,how hide 3 sub_categories :example Sub Sub Cat 2B1 etc...
thanks.

06 Apr 2008, 07:22
#219
gjh42 avatar

gjh42

Black Belt

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

Re: Categories Dressing

You're saying you never want to show the links for level 3 or deeper subcats in the sidebox?

You can do that by finding this in tpl_categories.php```php
$current_path = str_replace("cPath=","",$box_categories_array[$i]['path']);
if (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 {

(substr_count($current_path,'_') > 2) or 
to get```php
	$current_path = str_replace("cPath=","",$box_categories_array[$i]['path']);
    if ((substr_count($current_path,'_') > 2) 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) or deeper than level 2 subcat
    } else {
```The number of underscores _ in $current_path equals the subcat level.
16 Apr 2008, 05:59
#220
htsean avatar

htsean

New Zenner

Join Date:
Mar 2008
Posts:
50
Plugin Contributions:
0

Re: Categories Dressing

Hello, I just recently installed this contrib so that I can use image links in place of text category links, and for the hover image swaps.

This contrib works perfectly for my needs except for one part, which I'm not sure of how to code. I would like the hover image to remain in it's hover state when browsing the corresponding category. And when the user clicks another category, the image reverts back to it's normal state.

Any help is welcome and thanks for the great mod. The readme.txt is very in-depth.. as if the code wasn't self-explanetory enough :hug: