I want to display all products from a non anchor parent category and its subcategories. My categories are non anchor.
Magento's architecture is set in such a way that, the categories having the attribute code
is_anchor value set to 0, will not display products in that particular category. In order to display the products, either you have to change the display setting of all non anchor categories to yes, or update the database table entries.
You can do this from the
Admin => CATALOG => Catagories => Display Setting and set
Yes or make the following changes in the database table entries.
1) Get the
eav_attribute table where the
is_anchor. In my case, it is 54.
2) Update the
value field from the table
catalog_category_entity_int to 1, where the
attribute_id is the one which you got from the previous query.
3) Run the reindex
Now check your categories.