VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Development & Testing => Topic started by: sveawebpay on September 22, 2014, 14:42:25 PM

Title: Update orderrowstatus hook
Post by: sveawebpay on September 22, 2014, 14:42:25 PM
Hi,
I am writing a Payment plugin for vm2. I want to implement the change  of status on an order item. I find the following hooks, but cant get them to work:

plgVmOnUpdateOrderLine
plgVmOnEditOrderLineBEPayment
plgVmOnUpdateSingleItem

My actions are to change the status in an order item in the admin interface, and click save. But my functions are not triggered.

Are they suppose to? Or is there an other way?

Thanks
Anneli
Title: Re: Update orderrowstatus hook
Post by: GJC Web Design on September 23, 2014, 11:18:23 AM
plgVmOnUpdateSingleItem e.g.  only calls custom plugs - check the others

JPluginHelper::importPlugin('vmcustom');
      $_dispatcher = JDispatcher::getInstance();
        $_returnValues = $_dispatcher->trigger('plgVmOnUpdateSingleItem',array($table,&$orderdata));

but are you trying the other way? update the status FROM the payment plug?
Look in the authorize one - it's the simplest to understand