[SOLVED]Problem calling the Product model from outside VM

Started by balai, April 09, 2012, 16:40:38 PM

Previous topic - Next topic

balai

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

balai

Solved.

In the URL i should include the view=something