VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: EvanGR on March 10, 2020, 11:29:27 AM

Title: Get ALL categories? (mod_virtuemart_category)
Post by: EvanGR on March 10, 2020, 11:29:27 AM
Quoting from an older/custom version of mod_virtuemart_category.php

$categoryModel = VmModel::getModel('Category');

...

$categories = $categoryModel->getChildCategoryList($vendorId, $category_id);



How do we get ALL VM categories instead?
Title: Re: Get ALL categories? (mod_virtuemart_category)
Post by: StefanSTS on March 10, 2020, 12:15:48 PM
category_id 0
Title: Re: Get ALL categories? (mod_virtuemart_category)
Post by: EvanGR on March 10, 2020, 13:48:28 PM
Quote from: StefanSTS on March 10, 2020, 12:15:48 PM
category_id 0

Works, but only returns the top level categories.
Title: Re: Get ALL categories? (mod_virtuemart_category)
Post by: StefanSTS on March 10, 2020, 14:03:13 PM
Look into the view files of mod_virtuemart_category. There are different layouts.

I guess what you are searching for might be in all.php.

STS
Title: Re: Get ALL categories? (mod_virtuemart_category)
Post by: Studio 42 on March 10, 2020, 18:01:38 PM
https://shop.st42.fr/en/categories-tools/virtuemart-categories-menu.htm can display all categories from a whole shop. Demo with some diffeerent render https://pro.st42.fr/taxonomy
Title: Re: Get ALL categories? (mod_virtuemart_category)
Post by: EvanGR on March 11, 2020, 10:13:42 AM
Thank you people.

all.php template had the information I was looking for.