Thanks so much!!!
We're still using .catBoxHeading3. Deleted .catBoxHeadingImg.
Thanks again for this awesome mod!!!
Printable View
thank you Glenn for detail explanation regarding my last post, truly appreciate it. Following your instructions from your last post, this is what I done:
1. First,I set chcategories sidebox in the left and classic categories in right column
2. This part of code I have insert in "stylesheet_categories_dressing.bak.css"
and this part of code I have insert in "stylesheet_categories_dressing.css"Code:#chcategories ul ul ul {/*hide all deeper than first subcategory lists - left box*/
display: none;
}
3. I have added /case 7/ successfully in "categories_dressing_functions.php" and used define setting of '7|4|5'Code:#categoriesContent>ul>li>ul>li>a {/*hide only first level subcategories - right box*/
display: none;
}
Result of all changes is that I know have someting that is close to soultion I need need, so it look like we are on right track :smile: Here's how it looks like now after changes:
- Left chcategories is now showing only top and first level subcategories but what is intresting that is only showing one record (categor./subcat.) and never more that one even with fact there are for example five 1stlevel subcategories, its always showing one (currently selected).
- Right categories sidebox is now not showing 1st level subcategorie (in my case 1stlev.subcat. is Car Brand) and thats OK but it shows all 2nd level subcat. (Car Model), 3th level subcat. (Engine/year/hp) and 4thlevel subcat. (Spare part types).
I planned for this right sidebox to show only 4thlevel subcat. so I need some change in code to show only 4th level subcat.
Than I could achieve same system as on Example link I mention earlyer, for example:
1. enduser chooses Car brand (1st l.s.) on the left sidebox chcategories,
2. than Car model (2nd l.s.) in center page
3. than he chooses Engine/year/hp (3th l.s.) also in center page
4. then Spare part type (4 l.s. for example 'Brakes')
5. and than at the end when he is viewing product listing - spare part list he is interested in, on right side (in right column) classic categories sidebox should appear, which would show only 4th level subcat. ("Engine parts", "Brakes", "Suspenison" etc) for 'CarBrand'--->'Model'--->'Engine/year/hp' he choosed.
Knowing the exact subcat levels to display helps. Will there ever be deeper levels of subcat?
I don't know why it is only showing one first subcat, so I have improved a few things and put a debug line in the function. Install this in place of the original case 7It should output some numbers in the category boxes like first: 147_199. Let me know when you have applied this, and I will look at it to see what it does.PHP Code:
case 7:// active subtree, active branches only, only 1st & 4th level - treat first subcat like top - customized 20100205 for madijelovi
if($cPath_top != $path_top){//only 1 top cat's subs
$skip_cat = 1;
break;
}
if($cat_depth == 1){//show all first level subs
echo '<br />first: '.$path;//debug
break;
}
if($cat_depth == 4){//check 4th level for active parent
$path_ids = explode('_',$path);
$path_parent = $path_ids[count($path_ids)-2];
if (in_array($path_parent,explode('_',$_GET['cPath']))) break;//show only subcats w parent in $cPath
}
$skip_cat = 1;//skip all others
break;
Amazing:clap: Glenn you are real Zen Guru:flex::clap: It exactly what my client had in mind and its working great.
Also, as you mentioned in your post, it outputed numbers like 'first: 147_199' I notice that part of code and uncomment it, so code now looks like this:
and now its not shows paths, is this OK?Code:case 7:// active subtree, active branches only, only 1st & 4th level - treat first subcat like top - customized 20100205 for madijelovi
if($cPath_top != $path_top){//only 1 top cat's subs
$skip_cat = 1;
break;
}
if($cat_depth == 1){//show all first level subs
//echo '<br />first: '.$path;//debug
break;
}
if($cat_depth == 4){//check 4th level for active parent
$path_ids = explode('_',$path);
$path_parent = $path_ids[count($path_ids)-2];
if (in_array($path_parent,explode('_',$_GET['cPath']))) break;//show only subcats w parent in $cPath
}
$skip_cat = 1;//skip all others
break;
p.s. I just noticed that categories.php in right column is also showing when I am on 4th level subcategorie: when I am viewing Car Parts Types for example 'Brakes'; 'Engine Parts' 'Suspension' etc in main/center page, I am also seeing classic categories on right side (in right column) which is showing same list - Car Parts Types. I am not sure what part of code we should change so the categories on right side wouldnt be visible when users are viewing Car Parts Types..
Thank you!
If you want the right sidebox to not show when the same set of subcats is displayed in the center, that can be done. I won't have much time to work on it for the rest of the weekend - will come back when I can.
OK Glenn:bigups:
Hi, I am very new to all this, a bit lost, and in need of kind help!
After installing the module only the first category has expanded to show the sub categories - I would like all the sub categories to show under each top category - how would I do this?
The instructions in v2.7.3 readme seem to imply the answer to this maybe in 'readme_ch_categories.txt' but I can't work out where this file resides?
Any help appreciated - Many thanks
You do need the chcategories version for this.
Both readme files should be in the base of the mod fileset when you unzip it. You will need to edit filepaths for /your_template/ in the chcategories folder, then upload that /includes/ folder like the other one. Select the chcategories sidebox in Tools > Layout Boxes Controller.
zubenubi - You have put the rules for ul#catGroup6_8 { and ul#catGroup7_12 { near the top of your stylesheet, where some of their settings are being overruled by later generic settings. They need to go down in the same section as the others:If this still does not work, you may need more specificity. Add #categories in front of the ul, like this:Code:/*example for custom category group styling*/
ul#catGroup3 {
#categories ul#catGroup6_8 {
Thanks Glenn you are a star! and such a quick response!
For some reason the readme files are not downloading - but your tip to activate the side box in the layout boxes controller has got the structure I wanted. I guess all I need to do now is just use the stylesheet_chcategories_dressing.css to customise the colours etc?
Many thanks
Hi, it's me again. I've still not managed to figure out what is going wrong with my catgroups so I've made my site live even tho its not finnished yet so you can see it.
If anyone feels like taking a look I'd really really appreciate it!
www.babyclothingcentral.co.uk
adi - Here is a new case 7 that should give the fourth level subcats only when at the fourth level.PHP Code:
case 7:// active subtree, active branches only, only 1st & 4th level - treat first subcat like top - customized 20100205 for madijelovi
if($cPath_top != $path_top){//only 1 top cat's subs
$skip_cat = 1;
break;
}
if($cat_depth == 1){//show all first level subs
break;
}
if($cat_depth == 4 and substr_count($_GET['cPath'],'_') == 4){//check 4th level for active parent, only for $cPath depth 4
$path_ids = explode('_',$path);
$path_parent = $path_ids[count($path_ids)-2];
if (in_array($path_parent,explode('_',$_GET['cPath']))) break;//show only subcats w parent in $cPath
}
$skip_cat = 1;//skip all others
break;
Re: post 1208: It appears I left the readme_ch_categories.txt out of the v2.7.3 zip. It has no real information beyond that already mentioned, so it should not cause any further problem. I'll make sure it gets in the v2.8 zip.
If I add Categories Dressing and put a few headings there like shop by brand, theme, new products etc. how do I go about adding new categories under them. For example I get something new in with a different theme, how do I put a new theme under that section without it going under say, brand. Does it work by the sort order or does it alter the look of Catalog > Categories/Products or some other way?
I haven't added it yet because it looks really hard. The read me scared me off but I am still keen to put some structure to my categories and make them look a little more user friendly.
The category headings work simply by putting a block of content above a particular category in the sidebox. The category display order is the sort order you set in Categories/Products.
If you set the sort orders like 10, 20, 30, etc. it will be easy to add new categories in between.
If you get a new category that belongs above the one at the top of its group, you would have to transfer the heading to the new category. That is done by changing one number in a define statement.
Some parts of it are complex, but that is for complex requirements. Adding headings is straightforward, as long as you can follow directions.
Thanks. I am going to give it a try today. Thanks Glenn. I have to say, its comforting knowing that you give such great support for this. Thanks.
It's safe to say I am stupid. I don't even know where to start.
I have Categories Dressing installed and all I want to do is put a few simple divider lines in to split up categories a bit. I don't need headings and I don't want all of my sub-folders displayed (worked out how to fix that).
Can I just be completely stupid and ask what do I do next. I have read the read me a million times and I am about 50 pages through this thread and I am still none the wiser on what to do next. Am I missing a page or it or something??
I can see from the read me that I need to define the cpath or whatever but I can't even find where I do that. Firstly, what is the filename that I do that in? Do I have to add in that 'define ('CAT_BOX_HEADING_52','0|1||;//divider only - style 1 line' somewhere or should it be in there waiting for me already to edit it. If I have to add it in... where do I do that? :blink:
Under "Application"
To apply any of the following modifications, locate the defines shown in your categories_dressing_defines.php,
/includes/languages/english/extra_definitions/categories_dressing_defines.php
define ('CAT_BOX_HEADING_52','0|1||;
Change the 52 to whatever the cPath= says in the top address bar when you are on the category you want a divider above.
Copy and make one for each category needed.
Also, comment out all the CAT_BOX_HEADING_ defines you don't want to use (put // in front of the whole line).
You're fantastic! Turns out I would have worked it out provided I was in the right file. I never claimed to be a genius. :dontgetit
Thanks heaps... it is exactly the look I was after!
Hi I love your mod.
I have read 122 pages and almost all of my questions have been answered!
I have a multilingual question.
I am trying to implement catbg#.gif, hover, and selected for both English and Japanese.
If I don't add Japanese images to the japanese/buttons folder the category stays in text format, but if I upload Japanese images using the catbg#.gif format they show up but only in English. Most likely from the english/buttons folder.
What do you think I need to add, fix, re-code to make it look for the Japanese images.
Thank you for taking the time to look into this.
Regards,
Jason
brickship.com
That is a very strange problem. I see the basic effect you mentioned, but I also see that when displayed in Japanese, the categories list in different order. Is that supposed to be so? Is it Japanese alphabetical order, and to be expected?
I don't know anything about actually using multiple languages. I would expect that the Cat Dressing code would only check in the selected language folder for the existence of an image; since the category appears as text if there is no Japanese image, that appears to be working correctly.
The problem may be in the stylesheet. There is a standard stylesheet which sets background-images for selected categories in standard/hover/selected states; this will only use the original language folder.
You need a japanese_stylesheet.css file with different versions of these rules calling for the /japanese/buttons/ folder. (See /includes/templates/template_default/css/CSS_read_me.txt for more information.
I will work up an addition to the Cat Dressing readme to cover this situation, since it appears it will always be applicable when multiple languages and per-category background-images are in use.
Hi thank you for your reply.
Yes the categories are in Japanese alphabetical order.
I read the css.txt and I see how I can create a Japanese version.
I looked through my stylesheet and couldn't find any calls for background images or even categories.
Would I need to create my own?
Unless it is one of these
#navCatTabs ul li a, #navEZPagesTop a {
color: #000; /* color of ezpages and category tabs links */
font-weight:bold;
}
#navCatTabs ul li a:hover, #navEZPagesTop a:hover{
color: #fff; /* hover color of ezpages and category tabs in header */
font-weight:bold;
}
a:link {
color: #000; /* main site link color unless defined somewhere else */
text-decoration: none;
}
a:visited {
color: #000; /*main site link visited color unless defined somewhere else */
text-decoration: none;
}
a:hover {
color: #000; /*main site link hover color unless defined somewhere else */
}
a:active {
color: #000; /*main site link active color unless defined somewhere else */
Again thanks for the help
brickship - The standard stylesheet I was referring to is stylesheet_categories_dressing.css; that is where you had to add rules so the background image for Aircraft would show up. Copy the rules with language-specific background images to japanese_stylesheet.css. You want to copy only the background image specifications.
Hello,
i am trying to replicate www.kinvart.si/temp/elegance2.jpg this site.
So far, this is what i have done www.elegance.si/store
What do i have to do in order to get my categories and sub categories colored as in my example page?
Thank you for your help!
Miha
The top categories need to be "special" as described in the comments in tpl_categories.php:Like this:PHP Code:
switch(true) {
// to make a specific category stand out define a new class in the stylesheet example: A.category-holiday
// uncomment the select below and set the cPath=3 to the cPath= your_categories_id
// many variations of this can be done
// case ($box_categories_array[$i]['path'] == 'cPath=3'):
// $new_style = 'category-holiday';
// break;
case ($box_categories_array[$i]['top'] == 'true'):
Add to your stylesheetPHP Code:
// many variations of this can be done
case ($box_categories_array[$i]['path'] == 'cPath=8'): //Moski cevlji
$new_style = 'category-moski';
break;
case ($box_categories_array[$i]['path'] == 'cPath=10'): //Otroski cevlji
$new_style = 'category-otroski';
break;
case ($box_categories_array[$i]['top'] == 'true'):
Adjust and add properties as required.Code:}/*example for custom individual category styling*/
#categories li.category-moski a {
background-image: url(../images/moski_bg.gif);
background-repeat: none;
padding: 2px 0 2px 23px;
}
#categories li.category-otroski a {
background-image: url(../images/moski_bg.gif);
background-repeat: none;
padding: 2px 0 2px 23px;
/*example for custom category group styling*/
ul#catGroup8 {
background-color: #bbeeff;
}
You will want to change top categories to list-style: none; and set the desired list-style image for subcategories.
I am a noob to this forum. Don't know if I posted to the right thread. My apologies. I purchased a template from templatemonster.com. Literally spent months modifying it. I had it just about right, then I found the perfect mod in Cat Dressing. The mod is great, and does produce the expanded categories as I had hoped. However, when the mod is activated, it restores the header and background graphics, in the category sidebox, which were intentionally removed in this template design. I would like to remove these attributes, and show the category box without header and background graphics. I can change almost everything in stylesheet_chcategories.css, but these features appear to be loaded in a .php file, not a .css file. It looks like they are called in the first few lines of ch_categories_tree_generator.php, but I can't figure it out. Any suggestions would be greatly appreciated!
My site is located at:
http://www.doreggie.com/leach_cart
Thank you!
dreamoutlaw - You have a Template Monster template, which has added a host of extra divs and spacers to the standard sidebox layout. The chcategories feature changes the sidebox id to #chcategories. Anything you had applied to #categories by name needs to be transferred to #chcategories. You can add this to stylesheet_chcategories_dressing.css.innerbox3 is the very informative name TM gives to the sidebox heading (which would be #chcategoriesHeading in standard Zen Cart structure).Code:#chcategories .box_head_top, #chcategories .innerbox3 {display: none;}
For the rest of the background, I'm not sure exactly what you want to remove, and it may take a bunch of classes to do it. You should be able to transfer what you already worked out.
Kinvart - There are two things to modify. I should have shown in the example that you need to use stylesheet_chcategories_dressing.css (you would best delete stylesheet_categories_dressing.css to avoid confusion), and replace #categories with #chcategories in the examples.
The classnames after you do the "special" mod will be different than I showed, because I was working from the next unreleased version of Cat Dressing which uses slightly different methods. Your top categories now have class names like .cat-category-moski, so you want the stylesheet to reflect this.Code:/*example for custom individual category styling*/
#chcategories li.cat-category-moski a {
background-image: url(../images/moski_bg.gif);
background-repeat: none;
padding: 2px 0 2px 23px;
}
#chcategories li.cat-category-otroski a {
background-image: url(../images/moski_bg.gif);
background-repeat: none;
padding: 2px 0 2px 23px;
}
/*example for custom category group styling*/
ul#catGroup9 { /*moski*/
background-color: #bbeeff;
}
Dude, you rock :) thank you very much for the help so far!
Now, i've used search but had no luck finding what i need... As you can see now (www.elegance.si/store), everything is margined to the right. How can i "turn off" the "sandy colored border" on the left side and stretch the menu trough whole width of the chcategries box?
the second question: How do i make categories (zenski cevlji, moski celvji,...) other color (or use background image on them) then sub categories (elegant, casual,...)
the third question: Why doesn't it show background, even though it's set in stylesheet? you have set p.e. moski_bg.gif, witch is placed in a right folder (http://elegance.si/store/images/moski_bg.gif), but it wouldn't show.
Even by now i do owe you a beer or two, thank you :clap:
Glenn, as I a mentioned your code still works great but I am having some problems with showing classic categories sidebox on right side of page (right column) in Internet expolorer(IE).. For example: categories sidebox on the right side is showing exactly as it should in Firefox, Google chrome, Safari and Opera except in IE. I am not sure if I explained it correctly so I uploaded two screenshots so you could see whats the problem:
Website in Firefox
Website in Internet explorer
You will notice that in IE, categories box is not showing just spare part types (4th level subcat.) - it is also showing Car brands (1th subceg. level) which shouldnt be visible in right categ.sidebox. Also, I forgot mention that in IE right classic categories sidebox is showing all the time (not just exclusively on 4th subcategorie level). However, this is not problem for me because I always use Firefox, but my client says that there are many customers who use IE and thats problem:blush:
Hope you can help me with this one :bigups:
IE6 doesn't understand the CSS standard for child selectors (>) which indicate the direct child of the previous element.
Thus, this will not work for IE6:If people have old computers (like me), they may be stuck with IE6 and not able to use modern versions of IE.Code:#categoriesContent>ul>li>ul>li>a {/*hide only first level subcategories - right box*/
display: none;
}
(They could still use a real browser like Firefox if they wanted to:)
There should be an IE-only hack that will do it - I will see what I can come up with. PerhapsCode:* html #categoriesContent ul ul a {/*hide only first level subcategories - right box -IE6 hack*/
display: none;
}
* html #categoriesContent ul ul ul a {/*show deeper subcategories - right box -IE6 hack*/
display: list-item;
}
"witch is placed in a right folder (http://elegance.si/store/images/moski_bg.gif), but it wouldn't show."
That is not the right folder for template images.
Put them in /includes/templates/your_template/images/.
thank you for promt reply, truly appreciate it.
I just tryed code you suggested on my IE v 6.0 and its working but problem is that brands are not visible now on right sidebox but there is still empty space like they are still there, not sure why.. To show exactly how it looks like now here's new screenshot
So the <a> elements are being hidden, but the <li> presumably are still taking up space... The trouble with hiding upper level li is that the lower level elements are part of an upper li. It may be possible to do this with catGroup ids... I've forgotten the link to your site, and I can't test anything without that.
Kinvart - I looked at your site, and there are several strange things happening that I can't understand without seeing the code that makes them happen. If you post the section of tpl_categories.php where you added special categories, and your categories_dressing_defines.php, I may be able to figure it out.
Glenn - You are a freakin' wizard! First, I took your advice and copied and pasted your code at the end of stylesheet_chcategories_dressing.css. It worked for the header box, (of course). Then, using that format as a model, I was able to modify the other elements in the category sidebox as desired. Fantastic! Just one thing... Somehow along the way, I lost the indent on my subcategories. I will pour through this thread, and search for an answer. I will probably reinstall the Cat Dressing mod, adding the necessary css styles. However, if you have a quick answer, I would really appreciate your help.
I don't know where you find the time to reply to all these requests. Thanks so much for the great mod, and the expert advice!
Oh man... I'm almost there. I reinstalled tpl_categories.php and edited stylesheet_chcategories_dressing.css, and I got almost everything I wanted. Now, the only problem I have is that bg25 setting. Not sure what to do about that, but I will keep digging. If I simply comment it out, it leaves a big hole in my categories list. It is covering up the name of that category.
This is tpl_categories.php
and the categories_dressing_defines.phpPHP Code:
* includes/languages/english/extra_definitions/your_template/categories_dressing_defines.php - make user settings here
*/
$content = "";
$prev_cat_depth = -1;//do not alter
$content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">' . "\n";
for ($i=0;$i<sizeof($box_categories_array);$i++) {
switch(true) {
// to make a specific category stand out define a new class in the stylesheet example: #categories li.cat-holiday a {}
// uncomment the select below and set the cPath=3 to the cPath= your_categories_id
// many variations of this can be done
// case ($box_categories_array[$i]['path'] == 'cPath=3'):
// $new_style = 'holiday';
// break;
case ($box_categories_array[$i]['path'] == 'cPath=9'): //Zenski cevlji
$new_style = 'category-zenski';
break;
case ($box_categories_array[$i]['path'] == 'cPath=8'): //Moski cevlji
$new_style = 'category-moski';
break;
case ($box_categories_array[$i]['path'] == 'cPath=10'): //Otroski cevlji
$new_style = 'category-otroski';
break;
case ($box_categories_array[$i]['path'] == 'cPath=2'): //Oblacila
$new_style = 'category-oblacila';
break;
case ($box_categories_array[$i]['path'] == 'cPath=19'): //Ostalo
$new_style = 'category-ostalo';
break;
case ($box_categories_array[$i]['top'] == 'true'): }
$current_path = str_replace("cPath=","",$box_categories_array[$i]['path']);
$skip_cat = 0;
$skip_cat = cat_active_level_manage($current_path);
if ($skip_cat 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 {
$cat_box_heading = cat_box_heading($current_path);
$cat_ul = cat_ul_manage($current_path, $prev_cat_depth, $cat_box_heading[0]);
$content .= $cat_ul;
$content .= $cat_box_heading[1];
$cat_name_display = cat_name_display($box_categories_array[$i]['name'], $current_path);
$active_class = ($box_categories_array[$i]['current'])? ($box_categories_array[$i]['has_sub_cat']? 'parent': 'selected'): 'not-selected';
$content .= ' <li class="cat-' . $new_style . '"><a class="cat-' . $active_class . $cat_name_display[0] . '" href="' . zen_href_link(FILENAME_DEFAULT, $box_categories_array[$i]['path']) . '">';
$content .= $cat_name_display[1];
if ($box_categories_array[$i]['has_sub_cat'] and $cat_name_display[0] == '-text') {
$content .= CATEGORIES_SEPARATOR;
}
if (SHOW_COUNTS == 'true' and $cat_name_display[0] == '-text') {
if ((CATEGORIES_COUNT_ZERO == '1' and $box_categories_array[$i]['count'] == 0) or $box_categories_array[$i]['count'] >= 1) {
$content .= '<span class="catCount">' . CATEGORIES_COUNT_PREFIX . $box_categories_array[$i]['count'] . CATEGORIES_COUNT_SUFFIX . '</span>';
}
}
$content .= '</a>';
$content .= cat_box_subtext($current_path);
}
}
$content .= cat_ul_manage(0, $prev_cat_depth, 0) . '</ul>' . "\n";
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";
}
$content .= '<ul class="catLinks">' . "\n";
if (SHOW_CATEGORIES_BOX_SPECIALS == 'true') {
$cat_box_link_head = cat_box_heading('SPECIALS');
$content .= $cat_box_link_head[1];
$show_this = $db->Execute("select s.products_id from " . TABLE_SPECIALS . " s where s.status= 1 limit 1");
if ($show_this->RecordCount() > 0) {
$content .= '<li><a class="category-links" href="' . zen_href_link(FILENAME_SPECIALS) . '">' . CATEGORIES_BOX_HEADING_SPECIALS . '</a>' . '</li>' . "\n";
}
}
if (SHOW_CATEGORIES_BOX_PRODUCTS_NEW == 'true') {
// display limits
// $display_limit = zen_get_products_new_timelimit();
$display_limit = zen_get_new_date_range();
$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) {
$cat_box_link_head = cat_box_heading('NEW');
$content .= $cat_box_link_head[1];
$content .= ' <li><a class="category-links" href="' . zen_href_link(FILENAME_PRODUCTS_NEW) . '">' . CATEGORIES_BOX_HEADING_WHATS_NEW . '</a>' . '</li>' . "\n";
}
}
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) {
$cat_box_link_head = cat_box_heading('FEATURED');
$content .= $cat_box_link_head[1];
$content .= ' <li><a class="category-links" href="' . zen_href_link(FILENAME_FEATURED_PRODUCTS) . '">' . CATEGORIES_BOX_HEADING_FEATURED_PRODUCTS . '</a>' . '</li>' . "\n";
}
}
if (SHOW_CATEGORIES_BOX_PRODUCTS_ALL == 'true') {
$cat_box_link_head = cat_box_heading('ALL');
$content .= $cat_box_link_head[1];
$content .= ' <li><a class="category-links" href="' . zen_href_link(FILENAME_PRODUCTS_ALL) . '">' . CATEGORIES_BOX_HEADING_PRODUCTS_ALL . '</a>' . '</li>' . "\n";
}
$content .= '</ul>' . "\n";
}
$content .= '</div>';
?>
I recon i did something wrong in categories_dressing_defines.php but don't know what :oops:PHP Code:
* includes/languages/english/extra_definitions/your_template/categories_dressing_defines.php
*/
//example defines - copy & modify for each category desired
define ('CAT_BOX_HEADING_#','group|divider/class|[imgname]|[imgalt][|headcontent|headclass][|headcontent|headclass]...');
define ('CAT_BOX_HEADING_1','1|0||');//new list - no headings
define ('CAT_BOX_HEADING_3','1|0|||Major Heading|1|Minor Heading|2');//new list - text headings - multiple levels - styles 1 & 2
define ('CAT_BOX_HEADING_23','0|1|||Another Heading|2');//no list break - divider and text heading - style 2
define ('CAT_BOX_HEADING_33_34','0|0|||Subcat Heading|3');//simple text heading - style 3
define ('CAT_BOX_HEADING_48','1|0|cathead48.gif|Cat 48 Heading|Buy Now...|3');//image heading and alt text - can be followed by text heading(s)
define ('CAT_BOX_HEADING_52','0|1||');//divider only - style 1
define ('CAT_BOX_HEADING_53','0|2||');//divider only - style 2
define ('CAT_BOX_HEADING_FEATURED','0|0|||Featured Heading|3');//no list break - text heading
define ('CAT_BOX_SUBTEXT_23','Subtext for cat 23 escape apostrophe\'s|1');//subtext - style 1
//
//display only the active top category and its subs, hide top cats, hide sub-subcats, or any combination.
//only uncomment and set this define if you want to hide cats based on active tree or level
// 'active|highest_level|deepest_level'
//active: 0=all tops/1=full active tree only/2=active only (all tops when no cat selected)/
//3=full active tree, others per level/4=like 3, active branches only/5=like 1, no tops|
//highest_level: 0=all levels/1=no topcats/etc.|
//deepest_level: 1=only first subcats/2=first & second subcats/etc.
//
//define('CAT_BOX_ACTIVE_LEVEL', '0|1|9');//hide top cats
//define('CAT_BOX_ACTIVE_LEVEL', '1|0|1');//show only active cats, to first subcat level
Thank you!
You erased part of tpl_categories.php when you added the special categories. You have thisbut it should look like thisPHP Code:
case ($box_categories_array[$i]['path'] == 'cPath=19'): //Ostalo
$new_style = 'category-ostalo';
break;
case ($box_categories_array[$i]['top'] == 'true'): }
$current_path = str_replace("cPath=","",$box_categories_array[$i]['path']);
$skip_cat = 0;
This is one of the features of v2.8, moving special category creation to defines so nobody needs to touch the code in tpl_categories.php. Hopefully I will get some final adjustments to it done soon so I can release it.PHP Code:
case ($box_categories_array[$i]['path'] == 'cPath=19'): //Ostalo
$new_style = 'category-ostalo';
break;
case ($box_categories_array[$i]['top'] == 'true'):
$new_style = 'top';
break;
case ($box_categories_array[$i]['has_sub_cat']):
$new_style = 'subs';
break;
default:
$new_style = 'products';
}
$current_path = str_replace("cPath=","",$box_categories_array[$i]['path']);
$skip_cat = 0;
I noticed the reason for the incorrect classes being assigned to subcategories: with the standard $new_style assignment cases missing, since $new_style is not reset at the top of the loop, the previous value from the top category was reused, instead of being caught by the default. The not resetting is not a fault as long as the original code is in place.
This is now working, thanks:clap:
What can i do about that?Quote:
I noticed the reason for the incorrect classes being assigned to subcategories: with the standard $new_style assignment cases missing, since $new_style is not reset at the top of the loop, the previous value from the top category was reused, instead of being caught by the default. The not resetting is not a fault as long as the original code is in place.
That was the problem caused by the missing code. You fixed it by replacing the code.
dreamoutlaw - The code automatically detects the existence of a background image titled for category 25, so it sets up a blank image replacement in expectation that you will have a stylesheet rule to give the background. Since you don't want the background image here, you need to delete the demo image file catbg25.gif.
The indent is caused by one of your Template Monster stylesheets, stylesheet_boxes.css:To avoid changing your other sideboxes, add a new rule to your stylesheet_chcategories_dressing.css:Code:.box ul li {
border-bottom:1px solid #E9E9E9;
line-height:40px;
padding-left:18px;
}
I just tested this on your website and it works.Code:#chcategories ul li {/*category li containers*/
margin: 0;
padding: 0;
}
THANK YOU THANK YOU THANK YOU!!!
You have just saved my day :clap:
Now, for the very last thing, then i'm (hopefully) done with questions.
I would like to put an image (and hide the actual typing) in categories boxes. So instead of p.e. "Ženski čevlji->" would be an image. How to do that?
Thanks again :bigups:
Look at the readme. The section titled "To display images in place of selected category names:" gives the instructions for this.
Glenn - Thanks again for your quick response! I think I read this section in the readme file, ("To display images in place of selected category names:"). It confirmed what you just told me. I thought I could correct it by changing the name of the file reference in stylesheet_chcategories_dressing.css... therefore, it would be referring to a file that does not exist. But, that didn't work. I will rename the demo .gif, and see if that solves the problem. As a last resort, I will delete the .gif image. If I ever need it for anything, I can always reinstall it from the original file on my local hard drive. Thanks again! - Reg
The demo gif is purely for demo purposes, and you can just delete it.
Cool. (WOW!... You're fast!)
Glenn, I hope link I send you was helpuful.
Here is how rightsidebox looks like now click here
It should look same as chcategories on left but instead it stretched and there is empty space on top and bellow car part types:dontgetit
Geez, that was easy! Thank you so much! Is there a link where users can make a donation for all your great work? I didn't see one in the readme file.
I see something that might be useful: all of the first subcats have class="cat-subs" while all the fourth level subcats have class="cat-products".
So add to your stylesheet_categories_dressing.cssdreamoutlaw - not a link, but my paypal address is at the top of the readme;)Code:#categories li.cat-subs {display: none;}
Did, so, but the image is not displayed correctly... any ideas?
From stylesheet_chcategories_dressing.css
The image is somehow distored (wider than it really is) and not shown as it should. any ideas?PHP Code:
#chcategories li a.catBg9 {
background-image: url(http://www.elegance.si/store/includes/templates/theme322/buttons/slovensko/catbg9.gif);
width: 200px;
height: 60px;
}
#chcategories li a.catBg9:hover {
background-image: url(http://www.elegance.si/store/includes/templates/theme322/buttons/slovensko/catbg9hover.gif);
width: 200px;
height: 60px;
}
Ah, right, that goes back to my comment that all of the fourth level subcats are inside first level subcats. When th first level is hidden, it takes the fourth level with it.
I had an idea for using height or line-height...and only if you need itCode:* html #categories li.cat-subs {height: 0;}
Let me know how this works (I wish there were web developer tools for IE6).Code:* html #categories li.cat-products {height: 30px;}
Hey,
i did than so as the readme file originally says: i uploadet files named "catimg2.gif" and are displayed fine, but there is some 10-15 px margin on the right side (take a look at the store).
Any suggestions? I've tried to look up this margin in all .css files, but had no luck finging this setting.
Change the 5 to 0.Code:#chcategories li.cat-category-moski a {
background-color:#76C5F0;
color:#DBDEFF;
font-family:verdana;
left:0;
padding:0 0 0 5px;
right:0;
}
Uf...how on earth coul i miss that...:oops: Thanks.
There's another thing i just noticed... When i come to the first page of the store (or click on the logo), the menu doesen't load right, it's pushed up to the top of the page. When i click any of the menu items or browse any other pages in my store (apart from the front page), everything works as it should.
I had been wondering about that for a while, then I found a
margin-top: -333px;
in a stylesheet rule for something like box border.
stylesheet_tm.css, line 87:
.left-col-margin{ margin-top:-333px; position:relative;}
huh:huh: i never though IE would give me so much trouble:lamo::smile: I tryed first to add this to stylesheet_categories_dressing.css
and this is what happens: it works as usal perfect in Firefox, G.Chrome and Opera but in IE on all levels /subcategories there is empty space right sidebox except when viewing car parts types (4th level subcat.) where sidebox contains correct info but it still looks "wrong" (same as before - please click here)Code:* html #categories li.cat-subs {height: 0;}
I am not sure if this helps, maby I am doing something wrong but here's how my css looks like:
Code:/**
* CSS Stylesheet for Categories Dressing examples
* @copyright Copyright 2009 Glenn Herbert
* @copyright Portions Copyright 2003-2006 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.gnu.org/licenses/ GNU Public License V3.0
* /includes/templates/your_template/css/stylesheet_categories_dressing.css
* Categories Dressing v2.7.3 Glenn Herbert (gjh42) - 20090505
*/
/*
hr.catBoxDivider1 {
color: #aabbcc;
}
*/
/*IE6 hacks*/
* html #categories li, * html #categories li a {
height: 1em;/*fix IE6 whitespace bug*/
background-image: url(../images/pixel_trans.gif);/*partially fix IE6 a block display bug*/
}
.catBoxHeading1 {
font-family: georgia, serif;
font-weight: bold;
font-size: 1.4em;
color: #335511;
background-color: #ff66ff;
/*background-image: url(../buttons/hrvatski/catheadbg1.gif); */ /*uncomment to use background image with or without coded text*/
/*height: 23px; */ /*uncomment to use background image without coded text*/
padding: 0.3em 0.4em;
margin: 0;
}
.catBoxHeading2 {
font-family: 'times new roman', serif;
font-weight: bold;
font-size: 1.4em;
color: #335544;
background-color: #ffaaff;
/*background-image: url(../buttons/hrvatski/catheadbg2.gif); */ /*uncomment to use background image with or without coded text*/
/*height: 23px; */ /*uncomment to use background image without coded text*/
padding: 0.3em 0.4em;
margin: 0 0 2px 0;
}
.catBoxHeading3 {
font-family: 'comic sans ms', sans-serif;
font-weight: bold;
font-size: 1.2em;
color: #336699;
background-color: #ffbbdd;
/*background-image: url(../buttons/hrvatski/catheadbg3.gif); */ /*uncomment to use background image with or without coded text*/
/*height: 23px; */ /*uncomment to use background image without coded text*/
padding: 0.3em 0.4em;
margin: 0 0 2px 0;
}
.catBoxHeadingImg {
padding: 0;
margin: 0;
}
.catBoxSubtext1 {
font-family: 'times new roman', serif;
font-weight: normal;
font-size: 1.2em;
color: #669911;
background-color: #FFDDFF;
padding: 0.1em 0.2em 0.1em 1.0em;
}
#categories ul {/*top category lists*/
list-style: none;
background: none;
border: 0px solid #ffaa99;
margin: 0 0 0.4em 0;
padding: 0;
}
#categories ul a {/*top categories*/
display: none;
}
#categories ul ul {/*subcategory lists*/
list-style: none;
background: #CCCCCC;
border: none;
margin: 0 0 0.4em 0;
padding: 0 0 0 0;
}
#categories ul ul a {/*subcategories*/
display: list-item;
list-style: circle inside url(../images/bullet1.gif);/*change to list-style: none; to remove bullet*/
background: #CCCCCC;
border: none;
margin: 0;
padding: 0;
}
#categoriesContent>ul>li>ul>li>a {/*hide only first level subcategories - right box*/
display: none;
}
* html #categoriesContent ul ul a {/*hide only first level subcategories - right box -IE6 hack*/
display: none;
}
* html #categoriesContent ul ul ul a {/*show deeper subcategories - right box -IE6 hack*/
display: list-item;
}
* html #categories li.cat-subs {height: 0;}
/*change bullet when a category w/o bg image is open to subs:*/
#categories li a.cat-parent-text {
list-style: square inside url(../images/bullet2.gif);/*change to list-style: none; to remove bullet*/
}
/*change bullet when a category w/o bg image is open to products:*/
#categories li a.cat-selected-text {
list-style: square inside url(../images/bullet3.gif);/*change to list-style: none; to remove bullet*/
}
/*disable bullet for cats w/ image or bg image*/
#categories li a.cat-parent, #categories li a.cat-selected, #categories li a.cat-not-selected {
list-style: none;
display: block;/*fix IE6 margin-left bug*/
}
/*different bullet for links if desired*/
/*
#categories li a.category-links {
list-style: disc inside url(../images/bullet4.gif);
}
*/
/* top category hover effects*/
#categories li.cat-top a:hover {
color: #dd6633;
background: #ddeeff url(../images/catbghover.gif);
}
/* subcategory hover effects*/
#categories li li.cat-subs a:hover, #categories li li.cat-products a:hover {
color: #000;
background: #fff url(../images/catbghover.gif);
}
/*individual page rules go after the general rules*/
/*example for individual category as bg image*/
#categories li a.catBg25 {
background-image: url(../buttons/hrvatski/catbg25.gif);
height: 30px;
}
#categories li a.catBg25:hover {
background-image: url(../buttons/hrvatski/catbg25hover.gif);
}
/*example for custom individual category styling*/
#categories li.cat-holiday a {
border-top: 3px dotted #112233;
background-color: #aabbff;
color: #112233;
padding: 1em 0em;
}
/*example for custom category group styling*/
ul#catGroup48 {
border: 1px solid #bd6699;
background: #bbeeff;
position: relative;
left: -1.3em;
top: 0.2em;
}
.catCount {color: #000000;}
If those things won't do it, it may not be possible to get IE6 to render correctly. It might require some new PHP code to actually turn the first level categories off for the categories sidebox (and not the chcategories box).
Glenn - Everything you have said so far has worked perfectly. This site is turning out great! There is only one more thing I want to do with my category box. I want to hide the the 2nd subcategories. (Show top-category, show 1st sub-category, hide 2nd sub-category) I found some postings on this thread, and I read the readme file about CAT_BOX_ACTIVE_LEVEL. But, please forgive my ignorance... I still can't seem to make it work. If you have time to check my homepage, I want to hide everything below the sub-category "More..." This will allow me to align banner boxes with featured products on my homepage.
http://doreggie.com/leach_cart/index...ain_page=index
Any advice would be greatly appreciated!
Thank you!
You don't want to show any 3rd level subcats, right? To hide second level and below, and show top and first level all the time, you would want to set CAT_BOX_ACTIVE_LEVEL to '0|0|1'.
PERFECT! I'm not sure why that worked, but it was exactly what I wanted. I will reread the readme file, and try to get a better understanding. Thank you so much for all your help!
'0|0|1':
0| - Use standard output (show everything the module file gives)
|0| - Highest level - 0 is top category
|1 - Deepest level - 1 is first subcategory.
Hi Glen,
I wonder if you could help me with my categories dressing? I've revamped www.limelites.co.uk (new header and logo and totally new color scheme and buttons). It's looking good apart from a few little niggles with my categories dressing.
I have the font sizes the way I want them (finally) but I can't for the life of me find what's controlling the font color on the hover over top categories and sub categories. I see these in my stylesheet:
........but changing the #000's to #ff0000's seems to have zero effect. It's as though something's overriding them?PHP Code:
/* top category hover effects*/
#chcategories li.cat-top a:hover {
color: #000;
background: #EEF7FF url(../images/catbghover.gif);
}
/* subcategory hover effects*/
#chcategories li li.cat-subs a:hover, #chcategories li li.cat-products a:hover {
color: #000;
background: #EEF7FF url(../images/catbghover.gif);
}
Also, I'm hoping to make the styling that's applied to the main categories apply also to the Size Filer sideboxes that pop up when you click on the sub categories. So far, I can't seem to achieve this.
Any help or advice would be appreciated.
Hi Glen,
I've managed to get the desired effect I was after. I'm just posting this in case it proves useful for anyone else using this mod. It turned out the main stylesheet was controlling the hover styling via the .leftBoxContainer a:hover
It even controls the text in my 'Size Filter' boxes.
To change the size of the main category headings I used li.cat-top {font-size:1.1em;}.
To get the hover color to change on these main category headings (Menswear and Childrenswear). I used this:
li.cat-top a:hover {
color:#0000ff !important;
}
Thanks for posting the solution you found!
Continuing a discussion from this thread on long category names wrapping and looking wrong because of the bullet indent...
Find in your stylesheet_categories_dressing.cssAdd the text-indent, with a negative value to pull the first line out to match the second.Code:#categories ul ul a {/*subcategories*/
display: list-item;
list-style: circle inside url(../images/bullet1.gif);/*change to list-style: none; to remove bullet*/
/* background: #ffddbb;*/
border: none;
margin: 0;
padding: 0;
padding: 0;
}
Also add left margin to compensate for the indent.Code:#categories ul ul a {/*subcategories*/
display: list-item;
list-style: circle inside url(../images/bullet1.gif);/*change to list-style: none; to remove bullet*/
/* background: #ffddbb;*/
border: none;
margin: 0;
padding: 0;
padding: 0 0 0 1.7em;
text-indent: -1.7em;
}
Hi Glen,
I thought I had the blue hover working fully, but I just noticed it's not right in IE with compatibility mode on.
The hover is picked up perfectly in all browsers on all cats and sub cats, but in IE with compat' mode it isn't picking up the hover styling for cat-products (womenswear sub-cats and womenswear by size sub-cats).
Don't suppose you can see why it's doing that?
Glen, never mind. Another classic case of finding the solution one minute after asking!
#chcategories li li.cat-subs a:hover, #chcategories li li.cat-products a:hover {
color:#0000ff !important;
background: #EEF7FF url(../images/catbghover.gif);
}
Hey,
i must tell you, i am very pleased with this mod:clap:
EXCEPT for one thing, it "crashes" on the first site of my store (www.elegance.si/store). When you cruise trough the site, it works fine, just on the first site is somewhere up. Why is that, how can i repair this?
Thank you:clap:
On your homepage, you have a div
<div class="left-col-margin">
which has this style in stylesheet_tm.css, line 92:
.left-col-margin {
margin-top:-333px;
position:relative;
}
I don't know why your homepage has this div and others don't; that is between Template Monster who built the template and yourself who modified it.
Eliminating that margin-top may solve your problem.
I installed the categories dressing. In the admin I have it on for right side column only. The menu doesn't show in the website. Does someone know what I need to get the menu to show? I have re-installed 2 times to be sure I didn't forget a file.
Thanks,
Kaddie
For each categories link in the sidebox, how do I add "title" to it?
Example:
<a href="http://www.mysite.com/productpage.html" title="Adidas Watches">Adidas</a>
(See here)
Hello World! :cool:
I have a minor issue I haven’t been able to figure out:
Can’t get "Hover background" for "catLinks" to work… -That is the links under the divider, for "Specials", "All Products", etc...
Just don’t seem to read my .css for them links?
It’s picking up my default link color from “stylesheet.css”, (also the “a:active” color) but I haven’t been able to edit the hover background…
Any help is deeply appreciated! :hug:
www.troll-motor.no/shop
Jan.
i need help changing the table layout that the categories are listed as...
right now here is the store:
http://mickieandmarc.sidewing.com/store/
i want the categories to be listed as such:
http://mickieandmarc.sidewing.com/
basically i have a table with padding and spacing.. then i have inside each row a seperate table with the style attached to it that makes the box bg color pinkish and the dotted black lines around the outside..
ideally i want it to look like as it goes on the 2nd site.. but on mouse over i want to change the background color and the text color.. i know how to do this i just cannot locate where to make the changes, and im sure once i know the location its going to be hard to do.. can anyone help me do this please?
Hi,
I need a little help with Category Dessing. Is it possible to "category dress" EZPage Sidebox links too?
For example on my test site:
http://www.mygamedemos.com/store/ind...ex&cPath=69_65
"Featured Products" appear to be "category dressed", but the "Gallery" link under the "Important Links" EZPage link in the sidebox doesnt have the category dressing.
Can someone please tell me how to make category dressing apply to the EZPage sidebox too?
Thanks.
Monsunemoon. :clap:
Categories Dressing applies only to the categories sidebox. You would have to do some custom coding to apply the same sorts of styling elsewhere; I don't have time now to do anything about that.
You could copy some of the stylesheet rules and change #categories to #ezpages to apply the rules there, since that sidebox is already set up as a <ul> list.
Sidewing - What you want is accomplished just by applying styling to the right elements - no tables needed, and no difficulty.
Change the section of your stylesheet_categories_dressing.css to look like this:and adjust the numbers as desired.Code:#categories ul {/*top category lists*/
list-style: none;
background: none;
margin: 0 0 0.4em 0;
padding: 0;
}
#categories ul a {/*top categories*/
color: #000000;
font-size: 1.3em;
background-color: #f58386;
border: 1px dotted #000000;
display: list-item;
list-style: none;/*disc inside url(../images/bullet1.gif);change to list-style: none; to remove bullet*/
margin: 0;
padding: 0.7em;
text-align: center;
}
Troll - You need to use enough specificity so that the rule overrides any others that would apply to the links, like this:Code:#categories li a.category-links:hover {
color: #aabbcc;
}
JC.M - Categories Dressing automatically adds alt and title text to images, but to add a title to the text links you would need to edit tpl_categories.php where the link is built. You could easily automate adding the category name as a title, but adding expanded text as the title would require new coding to hold and handle that text, either in a database field or in a define file.
kaddie - I can't diagnose anything from your description. Can you give more details of what you have done, and what is and is not happening? A link to see your site may help too.
Thanks gjh42. That worked. All I did was copy the "stylesheet_chcategories_dressing.css" file, and rename it "stylesheet_ezpages_dressing.css".
Then I did a find and replace for "#chcategories" with "#ezpages" and it worked.
Feel free to add that to the next update :D
A bit of overkill, but won't hurt anything:)
There are many many rules in the Cat Dressing version that will never apply to the ez-pages version, so a more elegant method would be to extract the few rules that are applicable and clone/alter them.
http://mickieandmarc.sidewing.com/store
how do i remove the dotted hr line or whatever it is in between each category? and also how do i remove the hr and the all products on the bottom?
The readme describes how to turn off features and examples that you don't want. In this case, you would edit categories_dressing_defines.php, and comment out the define statements that you don't want to use (put // in front of the statement).
gosh that was easy, thanks....sorry im not familiar with all this just yet....thanks for the mod..its awesome
nevermind i found the hr in the template stylesheet... thanks tho for the original help. appreciated.
The bottom <hr> and the All Products are admin settings, in Configuration > Layout Settings.