Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
即使属性产品没有结果(空类别),如何在 Magento (1.9.0.1) 中显示所有锚类别?
当我设置“锚”一个类别时,作为默认行为,只有当它不为空时,它才会显示在“Shopping by”部分。我想显示所有类别。
肮脏和快速的方式:
编辑:app/code/core/Mage/Catalog/Model/Layer/Filter/Category.php:170
if ($category->getIsActive() && $category->getProductCount()) {
并删除&& $category->getProductCount().
&& $category->getProductCount()
更干净和正确的方法是重写整个模块扩展核心类。