我想顯示所有產品類別在我的模塊的管理端在System.xml作爲多選。如何顯示所有(產品)類別在管理端列表:Magento
$_category = Mage::getModel('catalog/category')->load();
$collection = Mage::getModel('catalog/category')->getCategories($_category->entity_id);
$helper = Mage::helper('catalog/category');
foreach($collection as $cat){
if($_category->getIsActive()){
$cur_category = Mage::getModel('catalog/category')->load($cat->getId());
$helper->getCategoryUrl($cat);
echo $cat->getName();
}
}
但是,這並不表明我所想要的,我想要的只是產品類別....能有人的想法吧......感謝名單。
看起來他們在1.7中將正則表達式更改爲實際函數。這個功能可以做同樣的事情,所以只要做一下Nahid做的事情,然後發表評論。 – Adad64