News:

Support the VirtueMart project and become a member

Main Menu

Display products from all subcategories in parent category (VM 3.8.8)

Started by EIF, March 03, 2022, 11:16:29 AM

Previous topic - Next topic

EIF

At the moment I am working on a (Dutch) webshop based on Virtuemart 3.8.8, Joomla 3.10.6 and PHP 7.4.

What I want is to display products form all subcategories in the parent category.

I have several productcategories, with a maximum depth level of 3. So a productcategory have subcategories and those subcategories have their own subcategories. To illustrate this, I have taken a screenshot of the webshop.



The main (parent) category is for example "Woon & Leven", marked with number 1.
That productcategory have several subcategories, for example "Woonaccessoires", marked with number 2.
That subcategory have several own subcategories, for example "Woondecoratie", marked with number 3.

I have configured the VM config template setting (and also tried the menu settings for the categories) in such way that the parent category must display the products of the subcategories.

The result of this, is that subcategory (level) 2 now displays all the products of each underlying subcategory (level) 3. So that is great, that is what I want.

But... I like to have the same behavior on the parent category, number 1. When I click on "Woon & leven", which is the parent category 1, I like to display all the products of the underlying subcategories. Actually the products which are in productcategory 3. So productcategory 2 is displaying products of category 3. And category 1 is displaying the products of category 2 (which are in fact the products of category 3, the deepest category level),

The strange thing is that the productcategory 1, the parent category, only displays 4 products now. There are no products in that category, so it must be some products from the sub(sub)categories. But why only 4? There must be hundreds of products in the parent category.

You can see this all on the live webshop https://ecowereld.shop.



Studio 42

You have a setting to show all product in subcategories  in the Virtuemart config
Do you use it ?

EIF

You mean this setting?



I have changed "Show Childeren category" from Yes to No to Yes again. Somehow that fixed the problem.

GJC Web Design

Yes ... the config must be saved once to write it ..  perhaps the config had never been written and was just using the defaults
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation