Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

MisterGold

Newbie
  
  • Posts

    4
  • Joined

  • Last visited

Recent Profile Visitors

1,006 profile views

MisterGold's Achievements

Newbie

Newbie (1/14)

  • First Post
  • Conversation Starter
  • Week One Done
  • One Month Later
  • One Year In

Recent Badges

1

Reputation

  1. Решение: Заходим в admin\model\sale , файл order.php Находим: public function getTotalSales() { $query = $this->db->query("SELECT SUM(total) AS total FROM `" . DB_PREFIX . "order` WHERE order_status_id > '0'"); return $query->row['total']; } public function getTotalSalesByYear($year) { $query = $this->db->query("SELECT SUM(total) AS total FROM `" . DB_PREFIX . "order` WHERE order_status_id > '0' AND YEAR(date_added) = '" . (int)$year . "'"); return $query->row['total']; } Заменяем на: public function getTotalSales() { $query = $this->db->query("SELECT SUM(total) AS total FROM `" . DB_PREFIX . "order` WHERE order_status_id > '0' and order_status_id not in (9,1,8,7,17,2)"); return $query->row['total']; } public function getTotalSalesByYear($year) { $query = $this->db->query("SELECT SUM(total) AS total FROM `" . DB_PREFIX . "order` WHERE order_status_id > '0' and order_status_id not in (9,1,8,7,17,2) AND YEAR(date_added) = '" . (int)$year . "'"); return $query->row['total']; } где 9,1,8,7,17,2 ID статусы заказов Чтобы в "Всего заказов" отображались только оплаченные к заказы к примеру то делаем следующее: public function getTotalOrders($data = array()) { $sql = "SELECT COUNT(*) AS total FROM `" . DB_PREFIX . "order`"; if (isset($data['filter_order_status_id']) && !is_null($data['filter_order_status_id'])) { $sql .= " WHERE order_status_id = '" . (int)$data['filter_order_status_id'] . "'"; } else { $sql .= " WHERE order_status_id > '0'"; } Заменяем на: public function getTotalOrders($data = array()) { $sql = "SELECT COUNT(*) AS total FROM `" . DB_PREFIX . "order`"; if (isset($data['filter_order_status_id']) && !is_null($data['filter_order_status_id'])) { $sql .= " WHERE order_status_id = '" . (int)$data['filter_order_status_id'] . "'"; } else { $sql .= " WHERE order_status_id > '0' and order_status_id not in (9,1,8,7,17,2)"; } где 9,1,8,7,17,2 ID статуса заказа На этом всё.
  2. Приветствую. Возникла проблема следующего характера: при добавлении товара где выбирается дата поступления, дата автоматически не меняется под текущую дату, дата остановилась на 30 сентября. Приходится выставлять вручную. Скажите как можно починить чтобы вновь дата добавления выставлялась под текущую дату ?
Guest
×
  • Create New...

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.