VirtueMart Forum

VirtueMart 2 + 3 + 4 => Plugins: Payment, Shipment and others => Topic started by: Kuubs on June 16, 2020, 17:35:50 PM

Title: Shipment plugin execute code when certain status is reached
Post by: Kuubs on June 16, 2020, 17:35:50 PM
Hello,

I have a shipment plugin and I want to execute code (send an order to a third party website) when a certain order status is reached. At this moment this happens in the plgVmConfirmedOrder method, but that method fires after every order. Does anyone know how to achieve this?
Title: Re: Shipment plugin execute code when certain status is reached
Post by: GJC Web Design on June 16, 2020, 20:33:17 PM
What has a shipment plugin got to do with order status?
payment plugins handle status...

But to notify on status etc I normally use a system or custom plugin and trigger on

function plgVmOnUpdateOrderPayment ($data,$old_order_status)
Title: Re: Shipment plugin execute code when certain status is reached
Post by: Kuubs on June 17, 2020, 08:17:03 AM
Quote from: GJC Web Design on June 16, 2020, 20:33:17 PM
What has a shipment plugin got to do with order status?
payment plugins handle status...

But to notify on status etc I normally use a system or custom plugin and trigger on

function plgVmOnUpdateOrderPayment ($data,$old_order_status)

Yeah but my shipment plugin sends the order to a third party. But it only needs to do this when a certain order status is reached.

Ok so I will need an additional plugin to handle this functionality.