RE: [contribution] CategoryBoxEnhancement_v1.0 for 2.2 MS2
Nils P. <[email protected]> 13 Sep 2003 00:29:46 -0000
| Newsgroups | gmane.comp.web.oscommerce.contributions |
|---|---|
| Message-ID | <4155e33d280fd7c8dd47e05ae323d1e1@osCommerce-Forums> |
This message was sent from: Contributions
http://forums.oscommerce.com/viewtopic.php?p=228678#228678
----------------------------------------------------------------
Yes, actually I think I know how to do that. I don't think it would fit with my contribution very well though, as part of the idea is to always let customers know where they are on the site by highlighting the current category in the box, and if that category name isn't there, I believe it can lead to a lot of confusion.
Anyways, here's what you do:
In categories.php, find this:
global $tree, $categories_string, $cPath_array, $cat_name; (about line 20)
and add this right beneath it:[code]if ($tree[$counter]['level']<3)
{[/code]
Then find this: $categories_string .= '<br>'; (about line 65)
...and simply add this right beneath it:[code]}[/code]
...that should only display three level of categories. You could change that number by replacing the "<3" with any other number, e.g. 1 will only display top level categories. Did I mention I don't really like it? :wink:
Nils