Author Topic: (3.0.2) getCategoryTree return an empty array in front end modules  (Read 2004 times)

burnout_it

  • Beginner
  • *
  • Posts: 3
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?

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9415
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: (3.0.2) getCategoryTree return an empty array in front end modules
« Reply #1 on: January 01, 2015, 23:47:00 pm »
Seems to be a vendor Id problem
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

burnout_it

  • Beginner
  • *
  • Posts: 3
Re: (3.0.2) getCategoryTree return an empty array in front end modules
« Reply #2 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 not touch the Vendor ID param. An additional input where investigate can be appreciate.




Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9415
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: (3.0.2) getCategoryTree return an empty array in front end modules
« Reply #3 on: January 13, 2015, 21:10:39 pm »
Please try vm3.0.3 should be fixed there, was a cache problem
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Dom64

  • Beginner
  • *
  • Posts: 2
  • A beginner
Re: (3.0.2) getCategoryTree return an empty array in front end modules
« Reply #4 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?

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9415
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: (3.0.2) getCategoryTree return an empty array in front end modules
« Reply #5 on: January 27, 2017, 22:13:11 pm »
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/