VirtueMart Forum

VirtueMart 2 + 3 + 4 => Plugins: Payment, Shipment and others => Topic started by: j.pla on April 23, 2014, 20:32:26 PM

Title: How to known when the order status change in a shipment plugin ?
Post by: j.pla on April 23, 2014, 20:32:26 PM
I need to do some actions in a shipment plugin when an order status change from Pending to Confirmed. Please help me.
Title: Re: How to known when the order status change in a shipment plugin ?
Post by: GJC Web Design on April 23, 2014, 20:38:37 PM
look in administrator/components/com_virtuemart/models/orders.php

around line 623 in function updateStatusForOneOrder()

there the shipment plugins are triggered  - calling plgVmOnUpdateOrderShipment

so you need a function  plgVmOnUpdateOrderShipment() {
                                             //do stuff
                                       }
in your ship plug
Title: Re: How to known when the order status change in a shipment plugin ?
Post by: j.pla on April 30, 2014, 21:18:34 PM
Thanks you very much !! it work perfectly.
Title: Re: How to known when the order status change in a shipment plugin ?
Post by: GJC Web Design on April 30, 2014, 21:27:11 PM
 :)