Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to get children categories when use the option "Use Flat Catalog Category" set to "Yes" #4191

Closed
dev-venkatesh opened this issue Sep 11, 2024 · 6 comments

Comments

@dev-venkatesh
Copy link

dev-venkatesh commented Sep 11, 2024

Steps to reproduce

Login as admin
Go To "System" -> "Configuration" -> "Catalog" -> "Frontend" -> "Use Flat Catalog Category" and please set to "Yes".
Reindex the "Category Flat Data" option and try to run the below code.

$childCategories = Mage::getModel('catalog/category')->load($anyCatID)->getChildrenCategories()

It will not give any child categories and if you change the above option to "No" you will get all the sub-categories;

@sreichel
Copy link
Contributor

Note for me ... https://magento.stackexchange.com/a/58450/46249

I'll test it later.

@dev-venkatesh
Copy link
Author

When we will get this fix?

@sreichel
Copy link
Contributor

sreichel commented Oct 1, 2024

Can you provide a pull request?

@dev-venkatesh
Copy link
Author

Which pull request you want? I don't have any PR. I just tested the below line of code by enabling the "Category Flat Data".
$childCategories = Mage::getModel('catalog/category')->load($anyCatID)->getChildrenCategories().

@OpenMage OpenMage deleted a comment from dev-venkatesh Oct 2, 2024
@sreichel
Copy link
Contributor

sreichel commented Oct 3, 2024

It seems to be default/normal behavoir.

Suggestion: Enable Flat

@sreichel
Copy link
Contributor

Closed.

Feel free to add a PR, but i think it works as it should.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants