I am trying to get all my orders to show on the dashboard sale graph.
I have set my complete order statuses on the settings>options page (complete and shipped).
However in the database oc_settings table there are two entires, one is the serialised entry for the option above;
config_complete_status = a:2:{i:0;s:1:"5";i:1;s:1:"3";} (5 for complete, 3 for shipped)
but also;
config_order_status_id = 5
When I look in the \admin\model\report\sale.php model file I can see it using this query to get the orders (this is for month as an example);
Code: Select all
$query = $this->db->query("SELECT COUNT(*) AS total, date_added FROM `" . DB_PREFIX . "order` WHERE order_status_id = '" . $this->config->get('config_complete_status_id') . "' AND DATE(date_added) >= '" . $this->db->escape(date('Y') . '-' . date('m') . '-1') . "' GROUP BY DATE(date_added)");
1 - $this->config->get('config_complete_status_id')
always returns 0 no matter what the entry in the database is.
2 - How does that setting in the database get set or is it always 5...?
Because $this->config->get('config_complete_status_id') always returns zero no orders ever show up on the dashboard no matter what order status they are.
Any ideas..?
Thanks
Rolf