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');
$data->load($virtuemart_order_id);
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
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);