I've done a few test purchases on my site, and that all works fine. However if I cancel the order without marking it as payment received, the values are still included in the 'Total Sales' figure on the dashboard - even though the product has not been sold.
Is there anyway to get this to only include those orders marked as complete - ie the ones that have actually been sold, rather than the total value of orders placed.
Thanks
Ian
OC1.4.0
Norman in 't Veldt
Moderator OpenCart Forums
_________________ READ and Search BEFORE POSTING _________________
Our FREE search: Find your answer FAST!.
[How to] BTW + Verzend + betaal setup.
No, sorry.rincerofwinds wrote:Thanks for that - any idea where/how i would go about doing it?
You need someone that can adjust the queries that generates the Stats.
Norman in 't Veldt
Moderator OpenCart Forums
_________________ READ and Search BEFORE POSTING _________________
Our FREE search: Find your answer FAST!.
[How to] BTW + Verzend + betaal setup.
The file is admin/model/sale/order.php
and find:
Code: Select all
$query = $this->db->query("SELECT SUM(total) AS total FROM `" . DB_PREFIX . "order` WHERE order_status_id > '0'");
Code: Select all
$query = $this->db->query("SELECT SUM(total) AS total FROM `" . DB_PREFIX . "order` WHERE order_status_id NOT IN ('0', '1', '2')");
Code: Select all
public function getTotalSalesByYear($year) {
$query = $this->db->query("SELECT SUM(total) AS total FROM `" . DB_PREFIX . "order` WHERE order_status_id NOT IN ('0', '1', '2') AND YEAR(date_added) = '" . (int)$year . "'");
return $query->row['total'];
}
Norman in 't Veldt
Moderator OpenCart Forums
_________________ READ and Search BEFORE POSTING _________________
Our FREE search: Find your answer FAST!.
[How to] BTW + Verzend + betaal setup.
I have no clue why this is not changed because cancelled orders are no sale.....
Norman in 't Veldt
Moderator OpenCart Forums
_________________ READ and Search BEFORE POSTING _________________
Our FREE search: Find your answer FAST!.
[How to] BTW + Verzend + betaal setup.
Thanks Qphoria and i2paq
Stokey
Stokey
I am using opencart version 3.0.3.2
I have the same problem, I followed the steps but found my codes different and I did not know how to change it
Attach the code for Version 3.0.3.2, please
Users browsing this forum: Amazon [Bot], RiguPhoto and 201 guests