Post by aerogel » Wed Sep 11, 2019 8:04 pm

from beginning of ICE AGE(!!!), i always dreamed of having total sales of orders with "Completed" status up on the roof of the Dashboard.
this is how i did it on OC 3.0.2.0.
from admin\model\extension\dashboard\sale.php
find this at line 3

Code: Select all

public function getTotalSales($data = array()) {
$sql = "SELECT SUM(total) AS total FROM `" . DB_PREFIX . "order` WHERE order_status_id > '0'";
and change the SQL Query to

Code: Select all

$sql = "SELECT SUM(total) AS total FROM `" . DB_PREFIX . "order` WHERE order_status_id = '5'";
you can find all your order status IDs in system>localization section. here "5" is the right id for "completed",
done!
(i will check later if i destroyed anything else)

New member

Posts

Joined
Thu Jan 04, 2018 8:14 pm

Post by letxobnav » Wed Sep 11, 2019 8:37 pm

admin\model\extension\report\sale.php?

Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


User avatar
Expert Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan

Post by aerogel » Thu Sep 12, 2019 12:41 am

letxobnav wrote:
Wed Sep 11, 2019 8:37 pm
admin\model\extension\report\sale.php?
i couldn't resist that "question mark" so i checked again!
and i "swear" this is in
admin\model\extension\dashboard\sale.php

New member

Posts

Joined
Thu Jan 04, 2018 8:14 pm
Who is online

Users browsing this forum: Axlagusti, Semrush [Bot] and 484 guests