2

Is it possible to exclude a category from being added to the flat catalog index or index in general? The problem: we have a huge set of data in one category (5mio products). It's only accessible via search (elasticsearch), and not visible on the frontend.

But the rest of the products (about 12k) need to be visible and accessible via URL, when the client adds a new item. So we should have update on saving - but excluding that one big category.

1

Yes!

You must rewrite this Resource Model:

src/app/code/core/Mage/Catalog/Model/Resource/Category/Flat.php

and patch a few methods:

  • Mage_Catalog_Model_Resource_Category_Flat::rebuild()

    • change the sql statement to exclude the category ID
  • Mage_Catalog_Model_Resource_Category_Flat::synchronize(..)

    • check the category ID if not then execute parent::synchronize(...)
  • Mage_Catalog_Model_Resource_Category_Flat::move(..)

    • IDEM synchronize

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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