Magento get all children category follow store and parent category


Magento support use with more other websites and other stores.
To work with category in each stores, in this post, I will guide for you get categories with ID store and ID root category.
Here I will create an array include all categories, don’t sort follow level.

Step 1: get ID store and ID root category relative


Step 2: get ID all categories of root category


Array return:


[“entity_id”]: ID child category
[“parent_id”]: ID of parent category
[“path”]: paths to that category
[“level”]: lever of category
[“children_count”]: count child categories

Step 3: get name, url,… and set to an array


Step 4: show to html


About Author

Là một developer rất ham chơi nhưng không ham hố, không ham chơi nhưng rất thích cầm đầu...

Comments are closed.

%d bloggers like this: