VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: ste-jackson on February 21, 2020, 13:39:59 PM

Title: Display neigbouring child categories
Post by: ste-jackson 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
Title: Re: Display neigbouring child categories
Post by: Jörgen 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
Title: Re: Display neigbouring child categories
Post by: Studio 42 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
Title: Re: Display neigbouring child categories
Post by: ste-jackson 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.