Followed is the solution on how to resolve the %s sign in the catalog/language/<your_language_code>/extension/total/credit.php and reward.php file: viewtopic.php?f=190&t=199901&p=704468#p704465
The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.
Regards,
Straightlight
Programmer / Opencart Tester
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:
replace with:
In catalog/model/extension/total/reward.php file,
find:
replace with:
Then, in catalog/language/<your_language_code>/extension/total/credit.php and reward.php file, at the bottom of each files, add:
This should fully rectify the issue on both reported cases.
- 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()");
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()");
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()");
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()");
Code: Select all
$_['text_order_id_total'] = 'Order ID: # %s';
The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.
Regards,
Straightlight
Programmer / Opencart Tester
Who is online
Users browsing this forum: No registered users and 7 guests