How to show list of sub-categories in category page?
-
I am using bagisto marketplace.
I am trying to show list of sub-categories on the category page. Right now the default bagisto shows all the products assigned to the category. But I want to display list of sub-categories assigned to that parent-category. And after clicking on the sub-category then show list the products to that sub-category (this works by default for sub-category page).
How can we achieve this, any suggestion? -
Hi @gwachhamit,
If you check this repository,
https://github.com/bagisto/bagisto/blob/b59f3875b3165ef005367ac68df0d7c9c285e7da/packages/Webkul/Category/src/Repositories/CategoryRepository.php#L102You will see this method is providing all the categories with subcategories, then you just need to check for the child key for the specific category index.
-
could you please show an exaple, thank you very much