I want to get all product IDs of a root category and subcategory programmatically, when I click the root category. How can I get product IDs of both categories together under root category?

  • Assign the all product from backend to the root category it will automatically display at front side when you open this root category
    – Keyul Shah
    Commented Dec 26, 2013 at 7:03

1 Answer 1


In admin panel set yes the value for Is Anchor.


Go to Catalog > Manage Categories and set Is Anchor to Yes.

Re-index your catalog product index

enter image description here

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.