Author Topic: Display neigbouring child categories  (Read 776 times)

ste-jackson

  • Beginner
  • *
  • Posts: 13
  • A beginner
Display neigbouring child categories
« on: February 21, 2020, 13:39:59 pm »
Hello

Hope someone can help.  I am trying to make it so that when you are in a child category the other child categories of the parent category are are displayed so that navigation of that parent category's child categories can be done without having to go back to the parent category to navigate them all.  Put simply use the child categories as a filter.

Joomla 3.9.15
VirtueMart 3.6.10
PHP 7.3.15

Thanks

Jörgen

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2576
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Re: Display neigbouring child categories
« Reply #1 on: February 21, 2020, 14:14:08 pm »
One ideal is to give the child products category, then they Will be visible...

Jörgen @ Kreativ Fotografi
Joomla 3.9.8
Virtuemart 3.4.x
Olympiantheme Hera (customized)

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4230
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: Display neigbouring child categories
« Reply #2 on: February 22, 2020, 01:40:48 am »
You need to code it, i dont think that Jorgen solution work.
You need to get parent ID form current category, then select all child having same parent id(and exclude current) then of course create a loop

ste-jackson

  • Beginner
  • *
  • Posts: 13
  • A beginner
Re: Display neigbouring child categories
« Reply #3 on: February 24, 2020, 10:13:00 am »
Thanks for the reply Studio 42, that was along the lines of what I was thinking but seem to be struggling with the code to get the parent category ID.  As such I have just created a custom HTML module for now and manually coded the 2 menus i need but I can see this being implemented on more categories so would be nice to get the code to do it for me.