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

Bagisto

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

Fetching nested categories

General Discussion
2
2
343
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.
  • D
    dsharma last edited by 16 Aug 2019, 15:15

    Hello,

    I have used your function getVisibleCategoryTree() which gives nested arrays in tree form and which is being used using vue js for fetching categories.

    We are not using vue js so can you tell us how to fetch tree form array in javascript. I know there is function getAllChildren() but it gives one level children only.

    Please reply

    Regards
    Deepak Sharma

    1 Reply Last reply Reply Quote 1
    • R
      rahul last edited by 19 Aug 2019, 08:11

      Hi @dsharma

      getVisibleCategoryTree() is returning all category in nested form, so you can create a recursive function which check each category whether they have children or not & this function will be run until they don't have children & store result.

      Thanks

      1 Reply Last reply Reply Quote 0
      2 out of 2
      • First post
        2/2
        Last post