zencart中,如何让一二级分类直接显示

打开文件’includes/classes/category_tree.php’,

1)查找代码

把 if (zen_not_null($cPath)) {

改为 if (zen_not_null($cPath) or 1) {

2)在一下两行代码之间插入新代码

原代码:

reset($cPath_array);

while (list($key, $value) = each($cPath_array)) {

在上面两行代码之间插入:

$cPath_array = array(#,#);

#代表你想要展开的分类id。

你可能感兴趣的:(ca)