This issue is actually due to the reason that auto invoice generation code is missing from latest version of OC.
May be this has been done purposefully, but it is very inconvenient for me.
The fix is:
Open catalog/model/checkout/order.php
Go to function
Code: Select all
confirm($order_id, $order_status_id, $comment = '', $notify = false)
Code: Select all
$this->db->query("UPDATE `" . DB_PREFIX . "order` SET order_status_id = '" . (int)$order_status_id . "', date_modified = NOW() WHERE order_id = '" . (int)$order_id . "'");
Code: Select all
$query = $this->db->query("SELECT MAX(invoice_no) AS invoice_no FROM `" . DB_PREFIX . "order` WHERE invoice_prefix = '" . $this->db->escape($order_info['invoice_prefix']) . "'");
if ($query->row['invoice_no']) {
$invoice_no = (int)$query->row['invoice_no'] + 1;
} else {
$invoice_no = 1;
}
$this->db->query("UPDATE `" . DB_PREFIX . "order` SET invoice_no = '" . (int)$invoice_no . "', invoice_prefix = '" . $this->db->escape($order_info['invoice_prefix']) . "', order_status_id = '" . (int)$order_status_id . "', date_modified = NOW() WHERE order_id = '" . (int)$order_id . "'");