0
나는 가지 범주 트리를 표시하려면이 코드를 사용하여 표시되지 않습니다 얻을 :젠토 : 카테고리 트리 숨겨진 카테고리
$rootcatId= Mage::app()->getStore()->getRootCategoryId();
$categories = Mage::getModel('catalog/category')->getCategories($rootcatId);
function get_categories($categories) {
$array= '<ul>';
foreach($categories as $category) {
$cat = Mage::getModel('catalog/category')->load($category->getId());
//$count = $cat->getProductCount();
$array .= '<li>'.
$category->getId().' <a href="' . Mage::getUrl($cat->getUrlPath()). '">' .
$category->getName(); //. "(".$count.")</a>\n";
if($category->hasChildren()) {
$children = Mage::getModel('catalog/category')->getCategories($category->getId());
$array .= get_categories($children);
}
$array .= '</li>';
}
return $array . '</ul>';
}
echo get_categories($categories);
내가 재귀 또한 숨겨진 카테고리를 보려면 수정할 수있는 방법
?
고마워요.