VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: lefedor on May 31, 2012, 17:28:47 PM

Title: [fixed] Category Model issue
Post by: lefedor on May 31, 2012, 17:28:47 PM
vm v2.06 stable

* Category Model:

around line 729, shouldn't it be
JFactory::getApplication()->getMenu();
instead JSite?

public function getParentsList($virtuemart_category_id) {

               $db = JFactory::getDBO();
               //$menu = JSite::getMenu();
               $menu = JFactory::getApplication()->getMenu();


getting
"""Class 'JSite' not found in /home/.../public_html/administrator/components/com_virtuemart/models/category.php on line 729"""
otherwise.
Title: Re: Category Model issue
Post by: Milbo on June 01, 2012, 00:05:43 AM
joomla version?
Title: Re: Category Model issue
Post by: lefedor on June 04, 2012, 15:36:15 PM
Joomla! 2.5.4
Model is used by another (external) component for category listing retriving.
Title: Re: Category Model issue
Post by: Milbo on June 05, 2012, 10:56:21 AM
Hmmm interesting, look here
http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=28088
Quote
Display menu item in front-end.

Generally speaking, changing
$menu = JSite::getMenu();
by
$menu = JFactory::getApplication()->getMenu();

wherever it is used.
Title: Re: Category Model issue
Post by: Milbo on June 05, 2012, 10:58:40 AM
fixed at 3 places in the code.