Categories XC
for osCommerce Online Merchant v2.2
A categories infobox which generates expandable javascipt menus. Displays a [+] or [-] next to categories with sub categories. It is expands appropriate menus depending on the users location in the catalog. There is also the option to hide empty categories (on by default).
HTML generated consists only of unordered lists <ul> and sub unordered lists <ul><li><ul> making it W3C compliant and highly accessible to assistive technologies. Also meaning it displays fine when JS is disabled. Additional functionality and HTML code is generated dynamically with the javascript.
Special thanks to Ben Boyle for the menu, I've just implemented it in to osCommerce.
Legend: 
Download

Report
Changed the following:
- At start only main categories are shown
- show product count can be enabled/disabled in admin section
- current categorie is shown bold
At the moment there is one little problem left. In the middle of the screen, there are also emtpy categories shown. Will try to fix this also this week, it's perhaps a line in index.php to change...
Sry it took me so long to upload this, had some months no problems, so didn't need to check forum ;)
Regards from austria... if there are questions:
Hello Everybody !
Thanks for this contribution, this is very useful.
I changed one line of your code to put images in a place of "[+]" and "[-]".
I think this will be interesting for other people.
Search and replace this code in js script:
a.appendChild(document.createTextNode(v));
for :
img = document.createElement("img");
if (v == '[+]') { img.src = "folder_close.png"; } else { img.src = "folder_open.png"; }
img.border = 0;
a.appendChild(img);
Note: My images are folders like windows folders, with 16x16 pixels size. You can replace for any image what you want, but some little code need to be changed in css to adjust image size in the line.
File attached is this text.
Best Regards;
Sylvio Ruiz
Rio de Janeiro - Brazil
Add the following to the top line of categories-xc.php:
<script language="JavaScript" type="text/javascript" src="includes/xc.js"></script>
Full Download.
Hey. I have try to make it. But it not working, can you please upload you "categories_xc.php"
Thanks
Do not download the file
in categories-xc.php change
$categoriesxc_string .= "t<li><a href="";
to
if ($display_category == true) {
if ($level{$categories['parent_id']} == 0) {
$categoriesxc_string .= "<hr>t<li><a href="";
} else {
$categoriesxc_string .= "t<li><a href="";
}
So it will look like my one. http://www.ultimate-store.net/shop/
DO NOT DOWNLOAD, ONLY APPLY CHANGES
Simple edit in categories-xc.php
if (SHOW_COUNTS) {
if ($products_in_category > 0) {
$categoriesxc_string .= ' (' . $products_in_category . ')';
}
}
to
if (SHOW_COUNTS == 'true') {
if ($products_in_category > 0) {
$categoriesxc_string .= ' (' . $products_in_category . ')';
}
}
and the function "Show Category Counts" in admin section is working with this contrib.
Thanks for this grate contrib.
DO NOT DOWNLOAD FILE
Great one!
I fixed a couple of things in this contribution. It should now work on a standard OsC 2.2 MS 2 distribution.
This contribution appears to be broken or incomplete. Lack of instructions and possibly images or whatever else necessary to run this properly does not exist. Looks like a great idea! Hope someone can post a fix.
A categories infobox which generates expandable javascipt menus. Displays a [+] or [-] next to categories with sub categories. It is expands appropriate menus depending on the users location in the catalog. There is also the option to hide empty categories (on by default).
HTML generated consists only of unordered lists <ul> and sub unordered lists <ul><li><ul> making it W3C compliant and highly accessible to assistive technologies. Also meaning it displays fine when JS is disabled. Additional functionality and HTML code is generated dynamically with the javascript.
Special thanks to Ben Boyle for the menu, I've just implemented it in to osCommerce.