0

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.

Sino Thomas
  • 141
  • 1
  • 7
  • 22

1 Answers1

0

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..

Jobin
  • 8,238
  • 1
  • 33
  • 52
  • Hi Jobin Thanks...Actually my requirement is,Invoice creation is only at the time of payment(ie only when the status of order became confirmed) for both the payment method Paypal/Standard. That's why i added the if($orderDetails['order_status'] == 'C') in the createInvoiceNumber($orderDetails) function.Now invoice creation is working correctly,But the email sending for pending order(Payment with Standard) is not working.When in changed status of the order in backend i got this error message 'vmError: Cant create pdf, createInvoiceNumber failed'. – Sino Thomas Dec 13 '13 at 04:11