Hack Virtuemart updateStatusForOneOrder in Orders.php

Started by overseas, January 22, 2016, 13:27:17 PM

Previous topic - Next topic


Hello EveryBody,

I would like to add a new functionality in my virtuemart by adding the capapbility to send a file containing the orders directly to the supplier on status change.

I have done a part of the job by hacking the begining of the updateStatusForOneOrder function to create a file and upload it but I have some difficulties to find informations of the order.

I have seen that there is a variable : $data wich seem to contain all informations I need

$data = $this->getTable('orders');

I know how to have the status : $old_order_status = $data->order_status;

However, I need to have the following informations :
- vendor number
- product reference and quantities in the orders

could you give me the way to access to this informations in orders.php?

Thanks by advance

Best regards

GJC Web Design

you should really try to avoid hacking and do this as a vmcustom plugin using the function  plgVmOnUpdateOrderShipment

then the order info should be available in the plugin as

$order = $this->getOrderinfo($data->virtuemart_order_id);
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
Contact for any VirtueMart or Joomla development & customisation