Hi there,
great contribution, really, really great.
There is although one small thing that I mis, and I also missed in the the original admin. When I am in the catalog section, adding products, surfing to all the categories, is not very user friendly. This is why I added "category box as nested unordered" contribution, intended for the front end use, in the admin as a horizontal menu. Works really great and fast.
Because I missed it in Mindsparx, I also add this piece of code in it. But the dynamic menu of mindsparx looks really better then the one I was using, so I changed it to work with the dynamic menu. The problem is, I see only the head categories, but the child's categories are not folding.
Somebody tried it and got it to work?
I have added my piece of code in this message.
$list = $table[$parcat];
while(list($key,$val) = each($list)){
if ($GLOBALS['this_level'] != $level) {
if ($GLOBALS['this_level'] < $level) {
$output .= "\n".'<ul>';
} else {
for ($nest = 1; $nest <= ($GLOBALS['this_level'] - $level); $nest++) {
$output .= '</ul></li>'."\n";
}
}
$GLOBALS['this_level'] = $level;
}
if (isset($cPath_array) && in_array($key, $cPath_array) && $classname_for_selected) {
$this_cat_class = $classname_for_selected . ' ';
} else {
$this_cat_class = '';
}
// $output .= '<li class="'.$this_cat_class.'cat_lev_'.$level.'"><a class="link_lev_' .$level.'" href="';
$output .= '<li><div class="line"><a href="';
if (!$level) {
unset($GLOBALS['cPath_set']);
$GLOBALS['cPath_set'][0] = $key;
$cPath_new = 'cPath=' . $key;
} else {
$GLOBALS['cPath_set'][$level] = $key;
$cPath_new = 'cPath=' . implode("_", array_slice($GLOBALS['cPath_set'], 0, ($level+1)));
}
if (tep_has_category_subcategories2($key) && $classname_for_parent) {
$this_parent_class = ' class="'.$classname_for_parent.'"';
} else {
$this_parent_class = '';
}
$output .= tep_href_link(FILENAME_CATEGORIES, $cPath_new) . '"'.$this_parent_class.'>'.$val;
$output .= '';
if (!tep_has_category_subcategories2($key)) {
$output .= '</li>'."\n";
}
if ((isset($table[$key])) AND (($maxlevel > $level + 1) OR ($maxlevel == '0'))) {
$output .= tep_make_cat_ulbranch2($key,$table,$level + 1,$maxlevel);
}
} // End while loop
return $output;
}
?>