在magento网站中,我在根类别下有多个子类别。我只想要一个特定/特定子类别的名称或ID。我怎么能得到它?
答案 0 :(得分:0)
要加载特定类别,您可以像我使用4
一样定义ID<?php $_helper = $this->helper('catalog/output'); ?>
$category_id = $this->getCategoryId();
$childrens = Mage::getModel('catalog/category')->getCollection()
->addFieldToFilter('parent_id', 4)
->addAttributeToSort('name', 'ASC');
&GT;