In addition to the mentioned fix, since it will affect something else during the customer's transaction for credits and rewards:
- In catalog/model/extension/total/credit.php file,
find:
Code: Select all
$this->db->query("INSERT INTO " . DB_PREFIX . "customer_transaction SET customer_id = '" . (int)$order_info['customer_id'] . "', order_id = '" . (int)$order_info['order_id'] . "', description = '" . $this->db->escape(sprintf($this->language->get('text_order_id'), (int)$order_info['order_id'])) . "', amount = '" . (float)$order_total['value'] . "', date_added = NOW()");
replace with:
Code: Select all
$this->db->query("INSERT INTO " . DB_PREFIX . "customer_transaction SET customer_id = '" . (int)$order_info['customer_id'] . "', order_id = '" . (int)$order_info['order_id'] . "', description = '" . $this->db->escape(sprintf($this->language->get('text_order_id_total'), (int)$order_info['order_id'])) . "', amount = '" . (float)$order_total['value'] . "', date_added = NOW()");
In catalog/model/extension/total/reward.php file,
find:
Code: Select all
$this->db->query("INSERT INTO " . DB_PREFIX . "customer_reward SET customer_id = '" . (int)$order_info['customer_id'] . "', order_id = '" . (int)$order_info['order_id'] . "', description = '" . $this->db->escape(sprintf($this->language->get('text_order_id'), (int)$order_info['order_id'])) . "', points = '" . (float)-$points . "', date_added = NOW()");
replace with:
Code: Select all
$this->db->query("INSERT INTO " . DB_PREFIX . "customer_reward SET customer_id = '" . (int)$order_info['customer_id'] . "', order_id = '" . (int)$order_info['order_id'] . "', description = '" . $this->db->escape(sprintf($this->language->get('text_order_id_total'), (int)$order_info['order_id'])) . "', points = '" . (float)-$points . "', date_added = NOW()");
Then, in catalog/language/<your_language_code>/extension/total/credit.php and reward.php file, at the bottom of each files, add:
Code: Select all
$_['text_order_id_total'] = 'Order ID: # %s';
This should fully rectify the issue on both reported cases.