Virtuemart 2.0 email is not sending for the pending orders

1.3k Views Asked by At

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.

1

There are 1 best solutions below

1
On

Try any of them,

Instead of using if($orderDetails['order_status'] == 'C') only check the paypal status too ie, once payment failed then only comes to this condition so already processed order do not enter inside condition.

Another option is just create an additional order status for failed orders and check that condition only then it will not effect any other condition.

Hope its helps..