I need last level category of each sub category. I mean a category which has no child category.

  1. Get all categories as collection
  2. Loop through each of them
  3. Use the method hasChildren() to find if that category has children or not

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.