The define ('CAT_BOX_HEADING_xx... is not for styling the categories themselves, but for adding a heading above a category.
Do you want all of the top categories styled the same with a black background, or just this one?
Printable View
The define ('CAT_BOX_HEADING_xx... is not for styling the categories themselves, but for adding a heading above a category.
Do you want all of the top categories styled the same with a black background, or just this one?
Thanks for the reply.
Got it the way we want now :)
Question regarding the subtext, is it possible to have a hardcoded link below it? We need to have links to several faqs regarding the products in the selected category and I think this is the only way to do it. Tried several setting combinations but cant get it to work.
The "subtext" can include one or more hardcoded links. Pretty much anything you can put in HTML in the define can be displayed there. You can even use PHP in the define if you know what you are doing with it.
Got several links now on the subtext but im unable to style them individually. When I add |1 or |1| at the end of each link, it breaks it.
The built-in styling system will only handle the subtext for one category as a single group; however, there is nothing stopping you from including spans or divs with ids in the subtext HTML, and styling those ids. Alternatively, you could give ids directly to the <a> tags, avoiding the necessity for more HTML markup.
Just for information, I have considered the possibility of using Categories Dressing as a flyout menu, and it will work (with the chcategories option installed) just by adding the lines in red to stylesheet_chcategories_dressing.css:Adjust the values to fit your conditions.Code:#chcategories 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;
}
#chcategories ul ul {display: none;}
#chcategories li:hover {position: relative;}
#chcategories li:hover>ul {display: block; position: absolute; left: 130px; top: 0; z-index: 100; width: 140px;}
Hello I have a quck question.
I am using your mod with the simple text headings. Is there a way that I can create one of these headings a different color for specials?
I know I use the css file to change the details but I don't know how I would make it work for a specified category. Does that make sense?
More information: I have finally found a workaround for the IE7 list-style bug. It required changing the entire organization of stylesheet category rules and making them a bit more complicated, but it now works.
I still need to test a refinement of ul/li nesting function for an obscure set of possible situations; when I am satisfied that that works correctly, I will finally be able to release v2.8.
If you mean the "Specials" link at the bottom of the sidebox, you can make a heading above that with a define like this:
define ('CAT_BOX_HEADING_SPECIALS','0|0|||Specials Heading|3');//no list break - text heading - style 3
The "3" says to use the stylesheet rule .catBoxHeading3 {. You can make a new rule 4 if you want for this case.
Thank you for clarifying. I just figured that out. =)
I thought the "3" was something to do with the show/hide levels. Can't wait for the update. Thank you!
My test site:
http://www.prom-mart.com/
Looking at only using the ch open categories. Everything seems to work (only two subcats on this test site).
ISSUE: How to make the open categories box heading black background image, while leaving rest of headings the tan image, as per my template.
Here's pic of what I wish:
http://www.prom-mart.com/images/cat-open-pic.jpg
Currently not using any cat dress/ch dressing style sheet, as everything looks like what I wish...except for black heading for cats. I did try the ch stylesheet to solve problem.
My template style sheet controls the black cat heading with (apparently two images comprise heading) copied below.
Looks like it should be simple, but I've been unsuccessful so far.
Thanks for any help.
SPH
.main-sidebox-header-left {
background: url("../images/main_sidebox_left.gif") no-repeat left top !important;
padding: 0 0 0 0.3em;
}
.main-sidebox-header-right {
background: url("../images/main_sidebox_right.gif") no-repeat right top !important;
color: #ffffff !important;
padding: 0 0 0 0.3em;
}
I'm not sure exactly what custom code is putting the .main-sidebox-header-left and .main-sidebox-header-right classes on the regular categories sidebox, but you don't need custom classes; you can just use the box id combined with the standard (for your template) class, and the standard box head id:
#chcategories .sidebox-header-left {
background: url("../images/main_sidebox_left.gif") no-repeat left top !important;
padding: 0 0 0 0.3em;
}
#chcategoriesHeading {
background: url("../images/main_sidebox_right.gif") no-repeat right top !important;
color: #ffffff !important;
padding: 0 0 0 0.3em;
}
It worked, thanks!
http://www.prom-mart.com/
I pasted your code at botom of ch stylesheet.
sph
Now testing on main site:
http://www.prommart.com/
Thanks!
SPH
Hi,
Iīm having a little problem with the subcategories not showing hover images on Internet Explorer and I canīt fix this...
It works great on Firefox and Safari but on IE it only works on main categories... on the sub categories it just goes blank when the buttons are hovered...
hereīs the problem
http://pedradatattoosupplies.com
Try the inks (tintas) for example...
Anyone knows the solution for this?
Thx in advance
I just found a couple bugs in the tpl_categories.php while trying to install and modify ch_category bundled with categories dressing... using ZenCart 1.3.9h
includes/templates/YOUR_TEMPLATE/sideboxes/tpl_categories.php
1 - You will want to add this line:
$content .= "\n" . '<ul style="margin: 0; padding: 0; list-style-type: none;">' . "\n";
below this line (18):
$content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">' . "\n";
2 - You will then need to add a <li> in front of the <div class= around line (41) to make it look like this:
$content .= '<li><div class="betterCategories"><a class="' . $new_style . '" href="' . zen_href_link(FILENAME_DEFAULT, $box_categories_array[$i]['path']) . '">';
3 - Then find this line (60):
$content .= '<br />' . "\n";
and replace it with this line:
$content .= '</div></li>' . "\n";
that will close the div container and close the li.
4 - Finally add this line:
$content .= '</ul>' . "\n";
above this line:
$content .= '</div>';
at the end of the file around line (96).
This will close the ul and keep the whole category box contained properly.
I am aware that the stock tpl_categories.php doesn't wrap each link with a div (notice 'betterCategories' has been added to my links) but once you do, you can further control each link!
Side note about line numbers: Line breaks have been removed from my stock tpl_categories.php remove the empty space in your file and line numbers will match.
Twitch.
How does this relate to Categories Dressing? Its <ul><li> processing happens in a function, not directly in tpl_categories.php. The ch_categories /includes/ folder by itself only provides the expanded set of categories and subs - all the list/level processing happens in the functions called by the main tpl_categories.php in the Categories Dressing /includes/ folder. If you installed the ch_categories by itself, you would be getting none of the <ul> code. Adjusting the stock tpl_categories file is (partially) duplicating the function that CD already does, and is not necessary - just use the whole package as built.
Another note - If you want correct <ul> lists for subcategories, you will need to do a lot more than you show above. That would only make one <ul>, with all top and subcats as equal <li> elements. At least one of the mods in Free Addons does this, making an incorrect list if there are any subcats in it.
It's so cool to see that you still provide help for all the questions we have. Thank you!
I have this structure:
1.Top Cat
2. -Sub Cat
3. --Sub Sub Cat
All the top cats, and the sub cats are showing all the time
4|0|1 :smile:
When I click a Sub Cat, and the Sub Sub cat opens, I would like to have a different background color on the css class "cat-products" - but only for the products in the sub sub cat.
If I alter the cat-products class now, all the categories which contains products gets the same color.
So for sub cat which contain products = color1
for sub sub cat which contain products = color 2
Possible?
You can see the site here: www.tilbryllupet.no
Hi guys how i can change and add button image in my top Categories path 1,2,3,4 ?
When I install it my category Cpath3 is giving me a sample button image, I want to add a button to cpath 1, 2,3,4 but I cannot figure out how to add it. Which file do I have to add to add the buttons?
Resolved :)
Did a reinstall...
nummel - Sorry, I can't get IE to work on my old dying computer right now. My new computer should arrive in a day or two, and I can check then if you still see the problem. There was an IE7 list-style display bug that I noticed while working on Cat Dressing v2.8. I finally managed to work around it by reorganizing the way the stylesheet applies styles, and this might or might not be relevant to your case.
shahram - Create your image files and name and save them as described in the readme.html. They will automatically be used if they have the right name and location.
Hi
I could do with some help regarding my left menu,
I am wanting to completely change it's look but unsure how and what to edit exactly.
The current menu looks like so:
http://www.adultattic.co.uk/includes...rrent_menu.jpg
However I would like it to look something like so:
http://www.adultattic.co.uk/includes...enu_reskin.jpg
Any ideas what I need to edit to achieve such changes?
Might I add - the site is used to sell adult products and the menu on site will show you this, so feel free to decide whether you are comfortable to check the site out to help me or not.
Thanks to all in advance. :smile:
That is a quite basic styling layout, easily achievable with Categories Dressing. You would want to turn off most of the functions available, and style some of the #categories li a {} and #categories li a.cat-parent-text {} and #categories li a.cat-selected-text {} rules.
If you want only that much styling and no images, headings or other modifications, you can just follow the instructions in this thread without installing anything:
Highlight Currently Selected Category Background
Hi and thanks again
I have read that thread - however is there not slightly more than just highlighting the current cat tab in my design shown?
The bg itself within the catergories has a gradient covering al of the catergories, and on rolling over a certain one, the lighter panel which is a lighter grey showing your selected cat has a slight dropshadow so do I not need to do a bit more than in that tutorial?
The bg alone would be an image would it not as it is a gradient not a flat colour?
Thanks
If you read post 7 as well as post 5, you will see the styling needed for both parts of your question. On my first look, I could not tell that there was a gradient over the whole list of links; that is easily done by making the individual link backgrounds transparent and giving the gradient image background to #categoriesContent {}. Then give the current category its different bg image and a drop shadow style.
If you want the different bg to apply on rollover, you can apply it to #categories a:hover {}.
In the readme it is showing how to use heading for your categories heading. But I want to use an image as the button. For example my category is "Mens" I want to create the button for mens. It is already giving me a sample button on the Cpath3 but I want to add buttons to all of my categories and I can't find the right file.
There is no file to find - you just need to make the button images for each category, and name and save the image files as described in the readme for each category. If they are named correctly and in the right folder, they will automatically replace the text.
If you want foreground images that stay the same, use names like catimg23.gif; if you want images that swap on hover, name them like catbg23.gif.
I have recently started building a truck accessory website. Is this the mod I need to make my left navigation appear similar to the site linked below?
I am using the current version of ZC and the business_lite template from 12leaves (paid version).
RealTruck
That site has a set of custom functions for the side menus. At top, you could use Product Finder from Free Addons to get the Shop by Vehicle, the standard manufacturers sidebox for Shop by Brand, and Categories Dressing with the chcategories option for the expanded category listings. It would take a small customization to get the restricted subcat menu once inside a top cat. The Narrow by Price and Narrow by Brand could probably be set up as linked subcategories.
I am not sure what I am doing wrong?
Please xplain as a step guide why this is not working? I think I need to make the links transparent but what is the code for this?
Sorry I am so new to using any kind of code and it blows my mind.
I can see the current link is bold, I have uploaded the gradient bg and hover bg, although I need them to repeat x,
but this is what I currently have this in my stylesheet.css:
SPAN.category-subs-parent {
font-weight: bold;
}
SPAN.category-subs-selected {
font-weight: bold;
}
#categoriesContent {http://www.adultattic.co.uk/images/content_bg.gif}
#categories a:hover {http://www.adultattic.co.uk/images/cat_current.gif}
#categories a, #categories a span {display: block;}
#categories a+br {display: none;}
:frusty:
You have a bunch of invalid CSS in your stylesheet, so it doesn't do what you think you are asking it to do.Make changes as shown in red, for starters:Code:SPAN.category-subs-parent {
font-weight: bold;
}
SPAN.category-subs-selected {
font-weight: bold;
}
SPAN.category-subs-parent {
bg:transparent;
}
SPAN.category-subs-selected {
bg:transparent;
}
#categoriesContent {http://www.adultattic.co.uk/images/content_bg.gif}
#categories a:hover {http://www.adultattic.co.uk/images/cat_current.gif}
#categories a, #categories a span {display: block;}
#categories a+br {display: none;}
Code:SPAN.category-subs-parent {
font-weight: bold;
background:transparent;
}
SPAN.category-subs-selected {
font-weight: bold;
background:transparent;
}
#categoriesContent {background: url(images/content_bg.gif)}
#categories a:hover {background: url(images/cat_current.gif)}
#categories a, #categories a span {display: block; color: #112233;}
#categories a+br {display: none;}
This discussion really has no place in this mod support thread; it should continue in the thread referenced above (Highlight Currently Selected Category Background), which also is about a Template Monster template with all its weirdnesses.
Just when I thought I had Categories Dressing figured out... :blush:
I have a new problem I need your help with.
I added the code you posted earlier to make the chcategories work as a css flyout menu. It works beautifully!! Thank you!
BUT... I have a couple of categories that I want subcats in, but I don't want them to flyout.
So, I thought if I turned that category off and made a linked heading by the same name it would work. And it does, except it's losing the header styling for some reason. (See attached image)
The 'Motorcycle Helmets' is what I want linked, but I want it to look like the 'Motorcycle Apparel' heading.
This is my define:
Am I doing something wrong?Code:define ('CAT_BOX_HEADING_2','0|0|||<a href="http://abikergear.com/index.php?main_page=index&cPath=1">Motorcycle Helmets</a>|1');//simple text heading - style 3
Is there an easier way to do this? lol
I know how to use the 'holiday' thing to make a category linkable, but would it be possible to turn off the flyout part for a specific category?
As always...thank you so much! :)
Hi,
How can I show all subcategories when the top category is selected?
* Top Category
** Sub Category
*** Sub Sub Category 1
*** Sub Sub Category 2
*** Sub Sub Category 3
I have this setting for active level:
define('CAT_BOX_ACTIVE_LEVEL', '2|0|9');
The above only show the "sub category" when the top category is selected. How can I make it show the "sub sub categories" without having to click on the "sub category" link?
Thanks
You would need to have the chcategories option installed to get the whole active subcat tree.
Boggled - Since each subcat group belonging to a particular top cat will have its own group id, you can address that specifically to not fly out on hover. Seeing it live would let me tell you exactly what rule to use.
Thanks for helping Glenn!
Here is the site: http://abikergear.com
Right now, both the header I set up (unlinked) and the actual category are both showing. (Motorcycle Helmets)
Edited to add...
I want to do the same thing with the other 'headers' too, but they don't have a category set up yet - Motorcycle Apparel, Motorcycle Accessories, Shop by Brand (that one is set up).
Add to the bottom of your stylesheet_chcategories_dressing.css
#chcategories #catGroup1_72 {display: none;}
Also, you should not have stylesheet_categories_dressing.css in your folder when you are using chcategories; some of the rules might conflict, and it is not needed in any case.
Hello,
Installed ch_categories and it is exactly what we need. Only problem is that we need the main categories to display on the main page and only show the sub sub categories for when a main category is clicked. Any help on how to set that up?
Also, are there other files from Categories Dressing that is not required when using CH Categories apart from stylesheet_categories_dressing.css?
Thanks
One other quick question...
Is there a way to style the flyout so that it will be fluid and auto adjust the width to match the subcat name?
I don't like the way it looks when a name wraps around to a second line, but don't want to make them all super wide.
These rules will give auto subcat width with no line wrapping:Code:#chcategories ul ul {display: none;}
#chcategories li:hover {position: relative;}
#chcategories li:hover>ul {
display: block;
position: absolute;
left: 100%;
top: 0;
z-index: 100;
width: auto;
white-space: nowrap;
}
Again, thank you so much for all your help, Glenn!
Everything is working perfect now. :smile:
Berserker - The stylesheet is the only file that is duplicated. Ch_categories itself only adds two new files, a class and a module file, and uses the stock tpl_categories.php (or whatever is there in place of it).
To understand your requirements, you want top cats only on the home page? Or top and first level subcats? And all sub-subs also when a top cat is active? How about on pages not Home and not category/product (like ez-pages)?
Hello,
We only need the top cats on the homepage and pages that are not category/product.
We have quite a lot of subs and sub-subs so having ch_categories to show on the main page makes the page a bit too long.
I tried to play around with it yesterday by having the original "categories" sidebox to show the top cats on homepage and then the "ch_categories" sidebox when a category is selected but couldnt get them to work separately.
I'll send you the link to the site to check.
Thanks
In categories_dressing_functions.php, add a new case to the switch in function cat_active_level_manage($path):Then set the parameters:PHP Code:
//alternate case for Berserker 20110207
//The main categories are already set up with all the subs and sub-subs using ch_categories.
//Just need to be able to show on the top cats on homepage and pages that are not category or product.
case 6://full tree (only all tops when no cat selected)
if($cPath_top == 0) $test_level = 1;
break;
Alternatively, adding the flyout rules would get the sidebox compact on all pages.PHP Code:
define('CAT_BOX_ACTIVE_LEVEL', '6|0|0');//show only top cats when no cat selected
By the way, if you only want the currently selected top cat to fully expand, you can use the built-in case 3, and set the define like this:PHP Code:
define('CAT_BOX_ACTIVE_LEVEL', '3|0|0');//full active tree; only top cats when no cat selected
Hello,
Tried both settings and case 3 is the best to what we need. But how can I stop the other top categories from displaying when a category is selected? You can check the site for the changes made.
Thanks
You didn't say that you wanted that - try the built-in case 2:define('CAT_BOX_ACTIVE_LEVEL', '2|0|0');//full active tree only; only top cats when no cat selectedPHP Code:
case 2://active only (per level when no cat selected)
if($cPath_top == 0){//test
$test_level = 1;
break;
}
if($cPath_top != $path_top) $skip_cat = 1;
break;
If what you want is to have no top cats showing when one is selected, you could modify case 2:PHP Code:
case 2://active only, without top (per level when no cat selected)
if($cPath_top == 0){//test
$test_level = 1;
break;
}
if($cPath_top != $path_top or $path == $path_top) $skip_cat = 1;
break;
Hello,
AWESOME!!!!! The following code does it:
case 2://active only (per level when no cat selected)
if($cPath_top == 0){//test
$test_level = 1;
break;
}
if($cPath_top != $path_top) $skip_cat = 1;
break;
The code below did not work though but does not matter :)
case 2://active only, without top (per level when no cat selected)
if($cPath_top == 0){//test
$test_level = 1;
break;
}
if($cPath_top != $path_top or $path == $path_top) $skip_cat = 1;
break;
Thank you so much for taking the time to help! Much appreciated!
Must say, you have some of the best mods here. Also using EZ Pages Footer Columns and Model List.
Thanks again!!! :)
Hello Glen, and everyone else. I've googled away and searched upon searched, and feel like this question has been asked, but maybe not with regards to this mod (which is awesome btw).
I want to completely eliminate my navBreadCrumbs bar, but the only way this makes sense for me to do is if people can still know where they are. I've found out how to highlight active subcategories, and have done this on my local server by using the following lines -
/*change bullet when a category w/o bg image is open to products:*/
#categories li a.cat-selected-text {
color:#990033;
}
My subcats locally have no background images, so this is pretty obvious.
My main concern is a way to keep the current category with a different or highlighted image button. here's my site (currently no subcats) -
http://www.niqfashion.com/theshop
Each category is in its own group per the defines file, and each has its own image and hover property per the css file. Is it possible to keep that hover image ON when that category is selected?
Thanks,
Nick
Add the selector in red if you want to use the hover state for the selected state.
Add the rule in green instead if you want to use a different image.Code:#categories li a.catBg2 {
background-image: url(../buttons/english/catbg2.gif);
height: 30px;
}
#categories li a.catBg2:hover, #categories li a.cat-selected.catBg2 {
background-image: url(../buttons/english/catbg2hover.gif);
background-repeat:no-repeat;
}
#categories li a.cat-selected.catBg2 {
background-image: url(../buttons/english/catbg2selected.gif);
background-repeat:no-repeat;
}
awesome, thanks so much!
I was trying
categories li a.catBg1:active, and then
categories li a.catBg1:selected
:S But what you wrote worked perfectly. Guess I shoulda interpreted it from the Subcats code in the css file...
Thank you!
Note: the :active pseudo-class does not mean "current page link", but refers to the link state after being clicked and before the page refreshes. This used to be a noticeable lag (and an indication that something was actually happening was useful), but it is mostly irrelevant now with faster connections and computers.
hehe I did notice that and realized afterwards. That's when I tried my version of the 'selected' class.
Thanks again!
A correction: :active applies while the mouse is being clicked, not just after, as this Sitepoint tutorial explains:
This pseudo-class matches any element that’s in the process of being activated. It would apply, for instance, for the duration of a mouse-click on a link, from the point at which the mouse button’s pressed down until the point at which it’s released again. The pseudo-class does not signify a link to the active, or current, page—that’s a common misconception among CSS beginners.
hehe yup. Ok I have one more minor issue....does this not work for categories that have sub categories?
Like for instance, on my local server, i created a 6th category called dudes222, with subcats tees, tanks, accesssories, shorts (assuming that in the near future i expand the brand and sub-categorize the stuff).
the catBg# and catBg#hover works fine, but not the a.cat-selected.catBg# (it works on all other categories, just not the one with subcategories).
Any solution to this?
a.cat-selected applies to final categories. Categories with subcats get the .cat-parent class if they are in the selection path.
You would allow for this by adding another selector to the rule:
#categories li a.cat-selected.catBg2, #categories li a.cat-parent.catBg2
Awesome.
Thanks a bunch again.
Hi i have inherited three sites which i have found out are linked using zen cart multi site add on but one of the sites is different than the others is it possible to edit the category box other than in Zen Cart admin in categories/products ie is there a file in the ftp where you can edit the names of the categories so that it is individual to this site :unsure:
the sites are : happiechappie.com
gaysexstores.co.uk
happieladies.com
please be aware these are adult sites :smile:
thanks
Marie
That really depends on the setup of the Multisite mod, which I know nothing about. There should be some information in a support thread for it. There is nothing in admin for a standard ZC that specifically controls which categories show in the sidebox - all active categories are there. It would be possible to manually edit tpl_categories.php, but you would have to maintain that by hand every time a category changes - not a good solution.
Good luck - sorry I can't be more help.
Hi thank you for your reply not sure where to change it or what to change it to :(
this is the admin file in tpl_categories.php :
<?php
/**
* Side Box Template
*
* @package templateSystem
* @copyright Copyright 2003-2006 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: tpl_categories.php 4162 2006-08-17 03:55:02Z ajeh $
*
* BetterCategoriesEzInfo v1.3.5 added 2006-09-19 gilby
*/
$spacer = '';
// uncomment next line to add 1 space between image & text
// $spacer .= ' ';
$content = "";
$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: 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'):
$new_style = 'category-top';
break;
case ($box_categories_array[$i]['has_sub_cat']):
$new_style = 'category-subs';
break;
default:
$new_style = 'category-products';
}
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 {
$content .= '<div class="betterCategories"><a class="' . $new_style . '" href="' . zen_href_link(FILENAME_DEFAULT, $box_categories_array[$i]['path']) . '">';
if ($box_categories_array[$i]['current']) {
if ($box_categories_array[$i]['has_sub_cat']) {
$content .= '<span class="category-subs-parent">';
$content .= cat_with_pointer($box_categories_array[$i]['name'], 'down', $spacer);
$content .= '</span>';
} else {
$content .= '<span class="category-subs-selected">';
$content .= cat_with_pointer($box_categories_array[$i]['name'], 'nosub', $spacer);
$content .= '</span>';
}
} else {
if ($box_categories_array[$i]['has_sub_cat']) {
$content .= cat_with_pointer($box_categories_array[$i]['name'], 'right', $spacer); }
else {
$content .= cat_with_pointer($box_categories_array[$i]['name'], 'nosub', $spacer); }
}
if ($box_categories_array[$i]['has_sub_cat']) {
$content .= CATEGORIES_SEPARATOR;
}
//$content .= '</a>';
if (SHOW_COUNTS == 'true') {
if ((CATEGORIES_COUNT_ZERO == '1' and $box_categories_array[$i]['count'] == 0) or $box_categories_array[$i]['count'] >= 1) {
$content .= CATEGORIES_COUNT_PREFIX . $box_categories_array[$i]['count'] . CATEGORIES_COUNT_SUFFIX;
}
}
$content .= '</a></div>';
}
}
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 .= '<br />' . zen_draw_separator('pixel_silver.gif') . '<br />';
// $content .= '<hr id="catBoxDivider" />' . "\n";
$content .= '<br style="line-height: 0;" />' . '<hr id="catBoxDivider" />' . '<br style="line-height: 0;" />';
}
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 .= '<div class="betterCategories"><a class="category-links" href="' . zen_href_link(FILENAME_SPECIALS) . '">';
$content .= CATEGORIES_BOX_HEADING_SPECIALS . '</a></div>';
}
}
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) {
$content .= '<div class="betterCategories"><a class="category-links" href="' . zen_href_link(FILENAME_PRODUCTS_NEW) . '">';
$content .= CATEGORIES_BOX_HEADING_WHATS_NEW . '</a></div>';
}
}
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 .= '<div class="betterCategories"><a class="category-links" href="' . zen_href_link(FILENAME_FEATURED_PRODUCTS) . '">';
$content .= CATEGORIES_BOX_HEADING_FEATURED_PRODUCTS . '</a></div>';
}
}
if (SHOW_CATEGORIES_BOX_PRODUCTS_ALL == 'true') {
$content .= '<div class="betterCategories"><a class="category-links" href="' . zen_href_link(FILENAME_PRODUCTS_ALL) . '">';
$content .= CATEGORIES_BOX_HEADING_PRODUCTS_ALL . '</a></div>';
}
}
//this is the function that inserts the 'pointer' (or 'disclosure triangle')
//before the name of the category, in the 'Categories' sidebox.
//$categoryName should be a string as contained in
//$box_categories_array[$i]['name'] above, which already includes
//the category name with all the necessary subcategory indents up front,
//as specified by the user in the Admin Panel.
//$categoryType will be either 'down', 'right' or 'nosub', which
//specifies which picture appears next to the category name:
function cat_with_pointer( $categoryName, $categoryType, $spacer) {
//picking the appropriate pointer image:
switch ($categoryType) {
case "down":
break;
case "right":
break;
default:
}
$pointer .= $spacer;
switch (true) {
//if the user has left the 'subcategories indent' empty, or
//if this is a 'top-level' category (there are no subcategory indents),
//then, we just prepend the pointer image:
case (CATEGORIES_SUBCATEGORIES_INDENT == ''):
case (strpos($categoryName, CATEGORIES_SUBCATEGORIES_INDENT) !== 0):
$pointer .= $categoryName;
break;
default:
//removing the subcategory indents from the beginning of the name:
$indentLength = strlen(CATEGORIES_SUBCATEGORIES_INDENT);
$pos = 0;
for ($i = 0; $pos === 0; $i++) {
$categoryName = substr($categoryName, $indentLength);
$pos = strpos($categoryName, CATEGORIES_SUBCATEGORIES_INDENT);
}
//placing the pointer image:
$pointer .= $categoryName;
//adding back the subcategory indents to the beginning of the name:
for (;$i > 0; $i--) {
$pointer = CATEGORIES_SUBCATEGORIES_INDENT . $pointer;
}
}
return $pointer;
}
$content .= '</div>';
?>
I have spoke to someone else about splitting the multi sites as they are all controlled off of one zen cart admin but they all have different ftp files but they say that this is not possible so i am trying to find a way around the problem :frusty:
thanks in advance
Marie
are there basic instructions for this all i want to do is replace the link text in the side boxes for images??
The basic instructions are in the readme.html packed with the mod files.
Look for the heading
To display images in place of selected category names:
You have BetterCategoriesEzInfo v1.3.5, so what you are asking about is not only unrelated to Categories Dressing, it needs to be applied to another mod's version (by gilby) of tpl_categories.php. I'm afraid I really can't help, as I don't know how files are organized under the Multisite mod, nor how the sites are distinguished within it. Does each site have a template folder of its own?
In the HTML readme file it says:
You will probably want to adjust categories settings in your Admin > Configuration > Layout Settings as detailed under "To display images in place of selected category names:", and at the bottom of this page.
I went to the lay out settings and did not see "To display images" down at the bottom of the page. I installed all the files in their correct places. I checked a few times to make sure, but I still do not see "To display images" in the layout settings.
Hi
each site has its own ftp and within that two sites are under one template name zct adult and lingerie 16 and the other(happieladies.com) has one named zct adult and lingerie 01 but in zen cart admin there is only one !!
I also dont know anything about multi site or why you would do this :frusty: if i could break them apart i would but have been told i cant do this so am trying to figure out another way of changing the ladies site so as the categories are not for men :smile:
many thanks
Marie
MSGOK - Change admin settings "as detailed in the readme"; the mentioned sections of the readme describe the admin settings to make. If you skimmed down the whole readme you would have seen this. I know it's long, but there are a lot of functions to describe. That's why I made it HTML with big section headings.
macbain - The ftp accounts/users have nothing to do with template names. The whole point of using Multisite is to keep inventory and management integrated, while presenting different faces for different markets. My impression was that you could use different templates for the different sites, but I have no direct knowledge of the mod.
ok what about another route ?
can i build a new site for happieladies on a temp url using a new template from zen cart and then upload over the top of the orignal happie ladies site ? or would the multi site link still be in operation ?
thanks
Marie :smile:
Sorry, this is not the right thread to be discussing multisite problems and solutions. I don't know about them, those who do will not be likely to see your questions here, and neither will other people who have similar questions.
sorry i am not very good at CSS but been trying to get my picture in catergories heading and remove the text but i cant seen to get it to work, please may i get some of your help
.catBoxHeading3 {
background: #383E44;
background: url(../images/arrows/bull.png) 99% no-repeat;
height: 50px;
text-align:left;
padding-left: 20px;
font-size: 0em;
border-bottom: 0px solid #000000;
color: #000000;
}
my site is www.GUNANDSURPLUS.com
Hi
I seem to have alot of space between my categories and sub categories where does this come from ?
I got rid of the category count is that what has caused the space if so how do i get rid of it ?
www.happiechappie.com
thanks
Marie
You don't currently have Categories Dressing installed on your site, but the stylesheet is still there, and this may be causing some glitches.
In particular, you have the category links as display: block; and the <br /> after each category causes the extra space.
Try this:
a.category-top+br {display: none;}
You should delete stylesheets that you are not using so they don't interfere with the others.
gromit1977 - The .catBoxHeading3 selector will not apply to any of your categories, nor to the sidebox heading as you seem to want. It appears that you have found a way to get the sideboxes to have the bullet image in place of the text in the heading.
thank you for your help i did manage to find out how to get picture it was in my stylesheets.css and i found it under my .leftBoxHeading and had to seperate some lines my code was as follows
h3.leftBoxHeading {
background: #383E44;
background: url(../images/arrows/bull.png) 99% no-repeat;
height: 70px;
text-align:left;
padding-left: 230px;
font-size: 0em;
}
and i could only get boarders to show if i changed my stylesheet_categories_dressing.css, i agree that i have messed up somewhere in my installs but i am new to this whole thing :(
thank you very much that was beginning to annoy me lol :smile:
Working on the same theory I inserted the a.category-subs+br code to get rid of the spacing on the sub categories as below but this has not worked :( have i put it in the wrong place ?
a.category-subs+br {
display: none;
}
A.category-subs, A.category-products,{
color: #0a7376;
text-decoration: none;
}
A.category-subs:visited, A.category-products:visited {
color: #8b8c87;
text-decoration: none;
}
A.category-subs:hover, A.category-products:hover {
color:#8b8c87;
}
SPAN.category-subs-parent {
font-weight: normal;
}
SPAN.category-subs-selected {
font-weight: normal;
}
thanks
Marie
I am also trying to put the text next to the image and have put this in the public_html/includes/templates/ZCT Adult and Lingerie 16/css/stylesheet.css:
#categoryImgListing {
clear: right;
}
#categoryDescription {
text-align: left;
clear: right;
}
but its not picking it up :(
thanks
Marie
Both of these questions are off topic for the Categories Dressing support thread. Please start a new thread or post in a more relevant one for answers.
sorry not sure where they should be then as they are still about the categories box styling :( where else should this post be placed
Marie
There are several different mods that address the categories sidebox, and code for one is generally irrelevant for another, and they may all be irrelevant for generic problems.
What you want is a general template styling/design subforum like
Customizing the Look of Your Shop
- Templates, Stylesheets, Page Layout
thank you :smile::smile:
Hello all,
I'm using Category Dressing and for some reason it's generating an extra </li> end tag after each category. Is there a file that I can go to remove the extra </li>. I assume it's a PHP thing and unfortunately I don't speak PHP:blush:.
Any help is appreciated.
Zen 139.h
PHP 5.2.1.6
MySQL 5.0.92
Thank you.
Can I see the site where this is happening? The link in your sig gives a blank screen.
The Categories Dressing code does not give an extra </li>; I don't know where it is coming from if you are seeing that.
OK, I see it... have to run now, will investigate later.
Hi,
I would like to know how can I use the click-show/hide "feature" of the "Click-Show-Hide Category Menu" sidebox in "Categories Dressing", so the page doesn't have to reload every time a person clicks on a category.
Thanks.
You would probably have to recode it, as the click-show-hide is built on javascript. Sorry, I can't help with doing that.
That would be the problem - there were some bugs in earlier versions.Quote:
currently using version 2.6 of Category Dressing and I was trying to upgrade to 2.7.3
My local test site doesn't have any extra </li>, but that is running v2.8... I can't take time now to install v2.7.3 to check it. Will have to post back later.
Don't worry about testing it Glenn......It's nothing critical.....just my weekend OCD :blink: project, I'm cleaning out the validation errors on my home page and that little item is generating most of the remaining errors.
Do you have 2.8 available for download? I can test that version and see if I've still got the issue.
Thanks Glen.
Paul
Yes, it's attached to an earlier post in this thread.
Hi, i have just downloaded this mod , iam trying to just put a picture behing the categories ( Please see attached )
How can i acheive this look with this mod.
I would really apreciate the help.
Thanks