VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: balai on April 09, 2012, 16:40:38 PM

Title: [SOLVED]Problem calling the Product model from outside VM
Post by: balai on April 09, 2012, 16:40:38 PM
Hi

I m doing just a single call of the product model from a model class of a 3rd paty extension.

The call is:
$product_model = VmModel::getModel('product');

Everything was working until VM2.0.2j. But now im getting the following:
Fatal error: Cannot access empty property in ..\libraries\joomla\registry\registry.php on line 337

In the research i did, i realized that the registry array has the following form:
Array ( [0] => com_virtuemart [1] => [2] => filter_order_Dir )

The problem is that the [1] element is empty while in the category and other views it gets the name of the used view.

Is there a way to fix that ? as if we cannot call the product model its hard to extend VM
Title: Re: Problem calling the Product model from outside VM
Post by: balai on April 09, 2012, 19:25:27 PM
Solved.

In the URL i should include the view=something