Hello!
I'm developing the component, which interacts with VM 3. Inside of a model file I'm trying to biuld such select query:
$dbquery = 'SELECT product_name FROM #__virtuemart_products_'.VmConfig::$defaultLang;
But this code lead to the error "Class 'VmConfig' not found". How should I declare the "VmConfig" class in the model of a component?
if (!class_exists( 'VmConfig' )) require(JPATH_ROOT.DS.'administrator'.DS.'components'.DS.'com_virtuemart'.DS.'helpers'.DS.'config.php');
VmConfig::loadConfig();
$model = VmModel::getModel('product');
$userModel = VmModel::getModel('user');
etc
you can then use the VM models instead of writing your own queries etc