I have an old version of opencart that my user has a count of different orders in different status using the Macro Dashboard module
I would like to know how I can achieve this on version 2.3.0.2.
To Clarify I would like a count of processing orders on the dashboard along with a count of pending orders etc along with any other order status that I create. On the old version this was done by counting the database order status id number i think.
You mean this extension? https://www.opencart.com/index.php?rout ... n_id=17628
Opencart Developer - My Extension Showcase
Contact me at aeon.yoda@gmail.com
Can you share the modifications you made?
Opencart Developer - My Extension Showcase
Contact me at aeon.yoda@gmail.com
The macro dashboard has functions like below and all I did was add another function and changed the order_status_id
Code: Select all
public function getTotalPendingOrdersForMacroDashboard($store_id) {
$sql = "SELECT COUNT(*) AS total FROM `" . DB_PREFIX . "order` WHERE order_status_id = '1'";
if($store_id!="")
$sql .= " AND store_id=$store_id";
$query = $this->db->query($sql);
return $query->row['total'];
}
public function getTotalProcessingOrdersForMacroDashboard($store_id) {
$sql = "SELECT COUNT(*) AS total FROM `" . DB_PREFIX . "order` WHERE order_status_id = '2'";
if($store_id!="")
$sql .= " AND store_id=$store_id";
$query = $this->db->query($sql);
return $query->row['total'];
}
Who is online
Users browsing this forum: No registered users and 183 guests