I am using Joomla 2.5.6 and Virtuemart 2.0 in a project. I customized the function createInvoiceNumber($orderDetails)
by adding a new condition inside function if($orderDetails['order_status'] == 'C')
.That is only for the confirmed order,the invoice will create. I done this changes in the administrator/components/com_virtuemart/models/orders.php
file. After this changes the order email is not send for Pending,Shipped,cancelled orders(other than confirmed orders).
Please help me to solve this issue.