VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: Ferran on May 10, 2021, 11:08:12 AM

Title: Show subcategories + products in a category view
Post by: Ferran on May 10, 2021, 11:08:12 AM
Good morning, I want to know if there is the possibility of displaying in a category view, its subcategories and the products of each one at the same time. For example:

CATEGORY VIEW
SUBCATEGORY 01
product 1
SUBCATEGORY 02
product 1
product 2
.
.
.
I have tried different settings and I can't.

Thanks
Title: Re: Show subcategories + products in a category view
Post by: jenkinhill on May 10, 2021, 12:45:57 PM
This has, of course, been discussed before. Look at http://forum.virtuemart.net/index.php?topic=138193.msg518424#msg518424
Title: Re: Show subcategories + products in a category view
Post by: Ferran on May 10, 2021, 13:27:39 PM

I think I have not explained myself well, what I am looking for is that for example, it is to divide the category view category into blocks of subcategories with their products, that is, an ordered list, I do not know if you understand me

Thanks
Title: Re: Show subcategories + products in a category view
Post by: GJC Web Design on May 10, 2021, 13:50:42 PM
you would have to do this programmatically ... there is no settings or config that can achieve this...

over ride your category template and then filter/divide your products object into the different subcats etc once you have returned all the required products.
Once divided into subcats then display as normal with the products function

another approach could be query the products model multiple times from a derived list of cats/subcats but this could be quite slow depending on number of products and server