News:

Looking for documentation? Take a look on our wiki

Main Menu

How to get new order status code with plugin

Started by Avexa, November 07, 2016, 19:09:36 PM

Previous topic - Next topic

Avexa

Hello,

I need to create plugin which will send order status to 3rd party application. We fire code on plgVmOnUpdateOrderPayment event, but problem is, that second parameter in plgVmOnUpdateOrderPayment event is not new status code, but old one (status code before change).

Do anybody know, how to get new status letter after changing order status?

Thank you in advance and sorry for bad english.

GJC Web Design

function plgVmOnUpdateOrderPayment ($data,$old_order_status) {

if($data->order_status=='C'){  //do something }
//add other  cases
}
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation