Bagisto Forum

    Bagisto

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

    recursively call categories

    General Discussion
    2
    2
    129
    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.
    • M
      mannansamcom last edited by

      Hello everyone ,

      As I can see there is only three level of child categories fetching in the velocity code in packages/Webkul/Velocity/src/Resources/assets/js/UI/components/sidebar.vue

      How we can fetch categories recursively insted of fechting only three level child of categories.

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

        Hi @mannansamcom,

        Well, as per the recursive you need to fully customize it. For e.g.,

        You already mentioned the component i.e. packages/Webkul/Velocity/src/Resources/assets/js/UI/components/sidebar.vue. You are getting full categories with its child categories from sharedRootCategories method.

        The major challenge you will face is the template part i.e. design. You need to do a recursive loop till categories.children not equal to the blank array.

        For better information, you can console log the categories in formatCategories method.

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