I create a custom plug-in.
The plug-in constructor is invoked BUT non of other functions.
I understood from the docs that I have to define the plug-in in the custom field, so I tried to setup a new custom field of the type plug-ins BUT the list of plug-ins didn't apear
Can anyone point out to a document or explain how to use it?
Thank in advance!
as soon as I install any vmcustom plugin it is available in the customfields "Additional Parameters" if I choose type plugin
is your xml correct
e.g. <extension method="upgrade" version="1.5" type="plugin" group="vmcustom" >
Now I see it...
I add some "echo" to see if I reach the plug-ins function... only the constructor is reach...
The functions:
- plgVmOnViewCart
- plgVmOnViewCartVM3
- plgVmOnDisplayProductFE
etc.
are never reach !?
Any sugestion how to debug it?
what do u mean reached?
if your syntax is correct the function is triggered when called by the dispatcher
do a general file search for functions
e.g. in customfields model
if (!class_exists ('vmCustomPlugin')) {
require(VMPATH_PLUGINLIBS . DS . 'vmcustomplugin.php');
}
if ($customfield->field_type == "E") {
JPluginHelper::importPlugin ('vmcustom');
$dispatcher = JDispatcher::getInstance ();
$ret = $dispatcher->trigger ('plgVmOnDisplayProductFEVM3', array(&$product, &$customfields[$k]));
continue;
}
When I wrote 'reach' I meant 'trigger'...
What I see now is that the plug-ins functions a triggered in the back-end BUT not in the front-end
Did I missed something?
the FE uses the BE models..
there are some triggers for the FE in the helpers & views FE
just do a general search for "plgVm"
Quotethe FE uses the BE models..
I know...
Quotethere are some triggers for the FE in the helpers & views FE
I check the plugin that come with the system - 'specification' - I check 'plgVmOnDisplayProductFE' witch exist in the code and added my own 'plgVmOnDisplayProductFEVM3' - none of them reach in the FE
I also put a print in "VirtueMartCustomFieldRenderer::renderCustomfieldsFE" and it does not trigger in FE!!!