This is how I hacked up the zen-cart code to have the ability to unfold ANY or ALL categories to display sub-cats on all pages, not just the index page:
open 'includes/classes/category_tree.php'
1) change line 137
-----------------------------------------------------------------------------------
change
if (zen_not_null($cPath)) {
TO =>
if (zen_not_null($cPath) or 1) {
-----------------------------------------------------------------------------------
2) insert code in lines 141-145
ORIGINAL
-----------------------------------------------------------------------------------
reset($cPath_array);
while (list($key, $value) = each($cPath_array)) {
-----------------------------------------------------------------------------------
insert =>
$cPath_array = array(#,#);
in between the reset and while commands.
# equals the category ID you wish to be unfolded... you can have it only unfold one, or all... all would be #,#,#,#,# and so on until you have all the ID's inside the parenthesis.
END RESULT
-----------------------------------------------------------------------------------
reset($cPath_array);
$cPath_array = array(1,2,5,7);
while (list($key, $value) = each($cPath_array)) {
-----------------------------------------------------------------------------------
hope this helps some people, my buddy and I spent 2 hours trying to figure this one out. tried to add some hyphens in here for reading pleasure and such... do not insert the page breaks I made. ENJOY!!!
Any questions let me know, this is what worked for me.
Bookmarks