VirtueMart Forum

VirtueMart 2 + 3 => Virtuemart Development and bug reports => Coding Central => Topic started by: burnout_it on December 23, 2014, 17:27:53 pm

Title: (3.0.2) getCategoryTree return an empty array in front end modules
Post by: burnout_it on December 23, 2014, 17:27:53 pm
The latest version return an empty categories array on the front end modules.

For testing replace in modules\mod_virtuemart_category\mod_virtuemart_category.php
Code: [Select]
//$categories = $categoryModel->getChildCategoryList($vendorId, $category_id);
$categories = $categoryModel->getCategoryTree(0,0,false,'');

Any idea?
Title: Re: (3.0.2) getCategoryTree return an empty array in front end modules
Post by: Milbo on January 01, 2015, 23:47:00 pm
Seems to be a vendor Id problem
Title: Re: (3.0.2) getCategoryTree return an empty array in front end modules
Post by: burnout_it on January 06, 2015, 23:11:41 pm
Thanks Milbo.

I temporarily solved with a custom recursive function to return the needed data on my module.

getCategoryTree (http://docs.virtuemart.net/api-vm2/de/da1/administrator_2components_2com__virtuemart_2models_2category_8php_source.html#l00153) not touch the Vendor ID param. An additional input where investigate can be appreciate.



Title: Re: (3.0.2) getCategoryTree return an empty array in front end modules
Post by: Milbo on January 13, 2015, 21:10:39 pm
Please try vm3.0.3 should be fixed there, was a cache problem
Title: Re: (3.0.2) getCategoryTree return an empty array in front end modules
Post by: Dom64 on December 14, 2016, 16:59:36 pm
Milbo says:

Quote
Please try vm3.0.3 should be fixed there, was a cache problem


I use vm3.0.8 and the problem is clearly there
Code: [Select]
$categoryModel->getCategoryTree(117,0) returns an empty array (117 is th id of one of my categories with subcategories)
Code: [Select]
$categoryModel->getCategoryTree() returns an empty array... !!

So, where's the fix of VirtuMart's getCategoryTree?
Title: Re: (3.0.2) getCategoryTree return an empty array in front end modules
Post by: Milbo on January 27, 2017, 22:13:11 pm
? this thread was just a small bug, please report bugs about http://dev.virtuemart.net/attachments/download/1049/com_virtuemart.3.0.19.2_extract_first.zip