ocStore_1541
быстрый вариант
файл [=== admin/model/sale/order.php ===]
1. После
public function getTotalEmailsByProductsOrdered($products) {
$implode = array();
foreach ($products as $product_id) {
$implode[] = "op.product_id = '" . $product_id . "'";
}
$query = $this->db->query("SELECT COUNT(DISTINCT email) AS total FROM `" . DB_PREFIX . "order` o LEFT JOIN " . DB_PREFIX . "order_product op ON (o.order_id = op.order_id) WHERE (" . implode(" OR ", $implode) . ") AND o.order_status_id <> '0'");
return $query->row['total'];
}
добавить
public function addOrderHistory2($order_id, $data) {
$userId = $this->user->getId();
$userName = $this->user->getUserName();
$comment = "User "".$userName."" (#".$userId.") made some changes to this order.";
$this->db->query("INSERT INTO `".DB_PREFIX."order_history` SET `order_id` = '".(int)$order_id."', `order_status_id` = '".(int)$data['order_status_id']."', `notify` = '0', `comment` = '".$this->db->escape($comment)."', `date_added` = NOW()");
}
2.
public function addOrderHistory($order_id, $data) {
заменить на
public function addOrderHistory($order_id, $data) {
/* [w] */
$this->addOrderHistory2($order_id, $data);
/* [w] */
3.
public function editOrder($order_id, $data) {
заменить на
public function editOrder($order_id, $data) {
/* [w] */
$this->addOrderHistory2($order_id, $data);
/* [w] */