Menu Close
    Hire us Request quote Reading list Switch to dark mode

    Get Parent-Child Categories Hierarchical Tree In Joomla VirtueMart

    Obtaining parent-child hierarchical tree for categories in Joomla VirtueMart front-end could be requirement specific. Though Joomla VirtueMart already provides method to get categroy tree listing but it provides different results depending upon the call being made from the back-end or the front-end environemnt. The method it uses is getCategoryTree() of ‘VirtueMart Category’ Model. This method provides tree structure as per parent child hierarchy of categories at the backend and provides sorted data as per categories’ name when called from the frontend.

    This behavior of function arises a requirement of creating your own method to get parent child hierarchy of categories if required at front end. The code presented will allow you to achieve that.


    The final output will be as –

    . . .
    Subscribe Articles

    Just enter your email below to subscribe and receive weekly updates about the most interesting similar articles.

    You need to accept conditions to receive letters.
    You've Subscribed!

    Share article via

    . . .
    • Product 1
      • Child 1
        • Sub child 1
        • Sub child 2
      • Child 2
    • Product 2
      • Child 1
        • Sub child 1
          • Sub-sub child 1
        • Subchild 2


    For any query regarding Joomla VirtueMart plug-ins and add-ons, you can communicate with us by creating a ticket at:

    . . .


    Add Your Comment

    Be the first to comment.

    Back to Top
    Hire Us!
    Brief us about your requirements and we'll get back to you.
    Woo! Hooy!
    We have just recieved your project brief and our expert will contact you shortly.
    Send Again

    Table of Content

    Hide Index