Hello Folks,
i am writing an Virtue Mart Costum Plugin that has to be triggered as the Status of an order is update. So i wrote the method "plgVmOnUpdateSingleItem" in my plugin but nothing seems to happen. Any ideas?
I think you may find this function has been commented out (goodness only knows why) around lines 331-335 in administrator/components/com_virtuemart/models/orders.php - that might be a contributory factor!
Is there is any rational on why this plug-in call has been 'deprecated' ???
It would allow custom plug-in to update specific part of order items (e.g make up-to-date item by item status, for example on delivery, or any kind of acknowledgement).
Especially as :
1) the called Model Orders is updateSingleItem
2) the code read as
// JPluginHelper::importPlugin('vmcustom');
// $_dispatcher = JDispatcher::getInstance();
// $_returnValues = $_dispatcher->trigger('plgVmOnUpdateSingleItem',array($table,&$orderdata));
and just after a merge of what could have been changed by such custom plug-ins
with line
$orderdatacopy = $orderdata;
$data = array_merge($dataT,(array)$orderdatacopy);
Where is there some dev documentation on this kind of decisions/discussion/rational ??
Thanks for any light.
Yes, this trigger is atm deactivated. I need it also and have it activated manually in order model. I talked with max and we will reactivate this trigger for Virtuemart 2.2. In this time until vm 2.2 will be stable, you can reactivate it manually.
Documentation for plugin development:
http://dev.virtuemart.net/projects/virtuemart/wiki/Developing_a_module_or_plugin_for_VirtueMart_2
http://dev.virtuemart.net/projects/virtuemart/wiki/Plugin_system
Quote from: kkmediaproduction on November 26, 2013, 14:23:40 PM
Yes, this trigger is atm deactivated. I need it also and have it activated manually in order model. I talked with max and we will reactivate this trigger for Virtuemart 2.2. In this time until vm 2.2 will be stable, you can reactivate it manually.
I admit I have already uncommented the two lines, as I don't find a way to be able to write a custom/shipment combination plugins, in order to deliver software products (and licence)
and be able to allow sale administrator to edit order_status at the item level, without this call-back.
Tanks for the answer and good to see, that this is somewhat future proof ;-)