• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Register
  • Login
Bagisto Forum

Bagisto

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

recursively call categories

General Discussion
2
2
137
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 3 Nov 2020, 05:46

    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 4 Nov 2020, 07:53

      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
      2 out of 2
      • First post
        2/2
        Last post