2012-07-11 56 views
0

我在向顶部导航添加类别描述时遇到问题。我使用自定义扩展 Magento的扩展名(得到它来自http://web-experiment.info/webandpeople-custom-menu-extension.htmlMagento在顶部导航下拉菜单中添加类别描述

到目前为止我去navigation.php文件,并更改

$html.= '<a class="itemMenuName level' . $level . $active . '" href="' . $this->getCategoryUrl($child) . '"><span>' . $name . ' </span></a>' ; 

$html.= '<a class="itemMenuName level' . $level . $active . '" href="' . $this->getCategoryUrl($child) . '"><span>' . $name . $description . ' </span></a>' ;

,但仍我只得到类别名称。

可以在http://puck.ro/Navigation.txt

我认为这是不这样做的正确的方式得到完整的代码! 有没有人告诉我这样做的确切方式?

在此先感谢。

回答

0

我用这个抢的描述

$category_data =Mage::getModel('catalog/category')->load($id); 
$category_data_des = $category_data->getDescription(); 

然后就加在循环像这样

$html[] = '<span>'.$category_data_des.'</span>';