Question: "I migrated from Joomla 3 to Joomla 5 and now the plgVmConfirmedOrder seems to be not firing for my plugins. Does anyone know what can cause this issue?"
The reason is history. First in joomla 1, the plugin was constructed, we could use inherited functions, then later only the file was looked through. This is the reason for triggers like
function plgVmOnStoreInstallPaymentPluginTable ($jplugin_id) {
return $this->onStoreInstallPluginTable ($jplugin_id);
}
Now it is again constructed, but only the functions beginning with "on" are recognised as triggers. Luckily @stAn @ rupostel.com found a method and added in the constructor of vmPlugin to add our triggers beginning with plgvm.
VmPlugin adds a lot more functions. Some of them are controlled in the constructor. We can add parameters of a plugin method in the constructor. They are stored in one database field. Furthermore we can add here how data should be handled storing it. For example.
$varsToPush = $this->getVarsToPush ();
$this->addVarsToPushCore($varsToPush,1);
$this->setConfigParameterable ($this->_configTableFieldName, $varsToPush);
$this->setConvertable(array('min_amount','max_amount','cost_per_transaction','cost_min_transaction'));
The function getVarsToPush takes the vmconfig parameters from the xml file. The setConvertable functions tells which values are allowed to convert in another currency.
There are also other functions like
- setConvertInt (stores as Int)
- setConvertDecimal (stores as decimal)
- setDateFields (stores as date)
- setCryptedFields (encrypts stored fields)
And also functions to use an external database table to store additional data. For example the process of a payment.