Hi,
I trust everybody is doing fine. I am satisfied whenever I contacted, someone must replied me generously. I am yet testing my site and I am having a problem with opencart version 3.0.2.0. Gift Voucher code is being sent through email prior to payment. Whenever I purchse a gift voucher through an account and send it to second account, an email is sent to second account with gift voucher code with second code being able to apply the voucher code, although payment has not been made by purchasing account. It should not happen. Gift Voucher Code should only be sent through email when purchasing account has made the payment. I have searched all through but to no result. Perhaps my searchmay be poor. Please any idea? I would be greatly thankful for any help.
Regards
arslan
Currently, only orders are being focused when creating a voucher during checkout or when using the API. To enforce customer accounts,
in catalog/model/extension/total/voucher.php file,
find:
replace with:
in catalog/model/extension/total/voucher.php file,
find:
Code: Select all
$order_query = $this->db->query("SELECT order_id FROM `" . DB_PREFIX . "order` WHERE order_id = '" . (int)$voucher_query->row['order_id'] . "' AND order_status_id IN(" . implode(",", $implode) . ")");
Code: Select all
$order_query = $this->db->query("SELECT order_id FROM `" . DB_PREFIX . "order` WHERE order_id = '" . (int)$voucher_query->row['order_id'] . "' AND customer_id = '" . (int)$this->customer->getId() . "' AND order_status_id IN(" . implode(",", $implode) . ")");
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Who is online
Users browsing this forum: Bing [Bot] and 387 guests