Extension Plugins
5 (100%) 1 vote

LOOKING FOR NEW WEBSITE TEMPLATES FOR NEXT PROJECTS?

Check out 65+ FREE Joomla! templates See 60+ FREE WordPress themes

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:

  1. (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:

  1. (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:

  1. (array $data) formdata as array

plgVmOnUserStore()

Return:
nothing special
Parameters:

  1. (array $data) formdata as array

From https://docs.virtuemart.net

Join Joomla & WordPress template club to access all themes and SAVE 95% cost than single PRO template purchase!

Join Joomla! Club (50% OFF on today) Join Joomla! Club (50% OFF on today)

Leave a Reply

Your email address will not be published. Required fields are marked *

[Flash Sale!] 20% OFF for PRO order, 50% OFF for Membership! Limited time, hurry up! Save money for your order on today!
[xMas is coming!] Enjoy your purchase extra discount up to 50% OFF for all products! Coupon code: XMAS50