可以通过config.xml将附加属性添加到前端类别属性加载列表中来完成:
<frontend>
<category>
<collection>
<attributes>
<[attribute_code] />
</attributes>
</collection>
</category>
</frontend>
Run Code Online (Sandbox Code Playgroud)
只需替换[attribute_code]为图像属性代码(可能在您的情况下image)
然后您将能够访问类别图像$category->getImage(),也可能需要覆盖Mage_Catalog_Block_Navigation块以自定义html格式化菜单.
完成此自定义后,请不要忘记清除缓存并重建平面类别索引(如果已使用).
| 归档时间: |
|
| 查看次数: |
4808 次 |
| 最近记录: |