3

enter image description here

How can I display all anchor categories in Magento (1.9.0.1) even with no result (empty category) as for attribute product?

As default behavior when I set "anchor" a category, this is shown in "Shopping by" section only if is no empty. I'ld like to show all categories.

1 Answer 1

0

I would say this filtering happens here:

app/code/core/Mage/Catalog/Model/Layer/Filter/Category.php:170
if ($category->getIsActive() && $category->getProductCount()) {

So, rewrite this class and remove $category->getProductCount().

But I didn't test it.

2
  • Thank you for reply. It works like a charm but I can do it without edit core file directly? Is there a way? Further, empty categories are shown now as text, how can I show they as links?
    – KaMZaTa
    Sep 7, 2014 at 13:05
  • Check the tempalte for the links. And you want to rewrite the model, not edit the core file: magedev.com/magento-overriding-model-block-or-helper Sep 7, 2014 at 13:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.