Bagisto Forum

    Bagisto

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    How to show list of sub-categories in category page?

    General Discussion
    4
    4
    1262
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • G
      gwachhamit last edited by

      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?

      1 Reply Last reply Reply Quote 0
      • devansh-webkul
        devansh-webkul last edited by

        Hi @gwachhamit,

        If you check this repository,
        https://github.com/bagisto/bagisto/blob/b59f3875b3165ef005367ac68df0d7c9c285e7da/packages/Webkul/Category/src/Repositories/CategoryRepository.php#L102

        You 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.

        1 Reply Last reply Reply Quote 0
        • W
          wieniawski last edited by

          could you please show an exaple, thank you very much

          1 Reply Last reply Reply Quote 0
          • A
            Amitk-Webkul last edited by

            Hi @wieniawski,

            you can take a reference from Here.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post