Extension plugins are used both in the front-end and the backend. They should be created as classes deriving from the base class VmExtendedPlugin:
public function __construct (&$subject, $config=array()) { parent::__construct($subject, $config); $this->_path = JPATH_PLUGINS.DS.$this->getName(); JPlugin::loadLanguage('plg_vmextended_'.$this->getName()); }
List with events and a description on what moment they are fired.
onVmAdminController()
This event is fired, when the called view was not found in the backend maincontroller. It allows to add new views to virtuemart 2.
Return:
It must execute the controller in the plugin.
Parameters:
- (String ) Name of the controller
onVmSiteController()
This event is fired, when the called view was not found in the frontend maincontroller. It allows to add new views to virtuemart 2.
Return:
It must execute the controller in the plugin.
Parameters:
- (String ) Name of the controller
onVmSqlRemove()
Plugs into the updater model to remove additional VM data (useful if the plugin depends on fields in a VM table)
onVmSqlRestore()
Plugs into the updater model to reinstall additional VM data (useful if the plugin depends on fields in a VM table)
plgVmAfterUserStore()
Return:
$data the manipulated data
Parameters:
- (array $data) formdata as array
plgVmOnUserStore()
Return:
nothing special
Parameters:
- (array $data) formdata as array
From https://docs.virtuemart.net
We’re a Digital Team from EngineTemplate with 5 content experts. Our team has 5 years exp in open source Joomla and WordPress, we make daily blogs and build useful resources for everyone who is having issues with open source while using it.