News:

Support the VirtueMart project and become a member

Main Menu

importing vmstatic classes etc.

Started by welrachid, January 10, 2016, 12:35:30 PM

Previous topic - Next topic

welrachid

Hi
Im currently developing a component that will interact with external system and import ST's to the userprofile.

To do this i would like to be able to use the VMModel::getModel('user');

But im running into an issue where it does not recognize the class vmmodel at all.
I tried importing shopfunctions(f).php with no result.

Is there a certain file i can import that will get me all the "environment" of vm?
I dont want to use sql directly because of updates to vm will probably at some point make my sql crash. Therefore i want to use the User model to do the actual creation of new ST's

thanks!
Best regards,
Wel

GJC Web Design

from inside Joomla? something like?


if (!class_exists( 'VmConfig' )) require(JPATH_ROOT.DS.'administrator'.DS.'components'.DS.'com_virtuemart'.DS.'helpers'.DS.'config.php');
VmConfig::loadConfig();

$model = VmModel::getModel('User');
$users = $model->getUser();
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

welrachid

Best regards,
Wel