Page 1 of 1
Display 1000 Instead of K in Admin Panel For Total Orders
Posted: Wed Dec 06, 2017 11:05 pm
by taran_117
Hi All
I want to see proper number of orders in admin panel dashboard, where as its showing K for 1000 orders. Is there any way to get this done?
Help is really appreciated.
P.S. I am using OC 2.3.0.2 version
Thanks In Advance
Re: Display 1000 Instead of K in Admin Panel For Total Orders
Posted: Wed Dec 06, 2017 11:08 pm
by straightlight
In admin/controller/extension/dashboard/order.php file, all the abbreviations:
Code: Select all
if ($order_total > 1000000000000) {
$data['total'] = round($order_total / 1000000000000, 1) . 'T';
} elseif ($order_total > 1000000000) {
$data['total'] = round($order_total / 1000000000, 1) . 'B';
} elseif ($order_total > 1000000) {
$data['total'] = round($order_total / 1000000, 1) . 'M';
} elseif ($order_total > 1000) {
$data['total'] = round($order_total / 1000, 1) . 'K';
} else {
$data['total'] = $order_total;
}
Re: Display 1000 Instead of K in Admin Panel For Total Orders
Posted: Thu Dec 07, 2017 2:05 pm
by taran_117
Hi Straightlight
Thanks for the info. It worked like a charm. You are superhero.

Re: Display 1000 Instead of K in Admin Panel For Total Orders
Posted: Fri Apr 22, 2022 7:30 pm
by 1dodes9
straightlight wrote: ↑Wed Dec 06, 2017 11:08 pm
In admin/controller/extension/dashboard/order.php file, all the abbreviations:
Code: Select all
if ($order_total > 1000000000000) {
$data['total'] = round($order_total / 1000000000000, 1) . 'T';
} elseif ($order_total > 1000000000) {
$data['total'] = round($order_total / 1000000000, 1) . 'B';
} elseif ($order_total > 1000000) {
$data['total'] = round($order_total / 1000000, 1) . 'M';
} elseif ($order_total > 1000) {
$data['total'] = round($order_total / 1000, 1) . 'K';
} else {
$data['total'] = $order_total;
}
Hello there, i found this topic, cause I have the same issue, but as I am not a programmer in any meaning, would you please describe more what exactly to do with that code? I managed to find that php file on FTP, but have no idea, if to delete that portion of code, or just letters T, B, M na K...? How the code should look like after modify?
Thanks for any help
Re: Display 1000 Instead of K in Admin Panel For Total Orders
Posted: Sat Apr 23, 2022 1:08 am
by straightlight
1dodes9 wrote: ↑Fri Apr 22, 2022 7:30 pm
straightlight wrote: ↑Wed Dec 06, 2017 11:08 pm
In admin/controller/extension/dashboard/order.php file, all the abbreviations:
Code: Select all
if ($order_total > 1000000000000) {
$data['total'] = round($order_total / 1000000000000, 1) . 'T';
} elseif ($order_total > 1000000000) {
$data['total'] = round($order_total / 1000000000, 1) . 'B';
} elseif ($order_total > 1000000) {
$data['total'] = round($order_total / 1000000, 1) . 'M';
} elseif ($order_total > 1000) {
$data['total'] = round($order_total / 1000, 1) . 'K';
} else {
$data['total'] = $order_total;
}
Hello there, i found this topic, cause I have the same issue, but as I am not a programmer in any meaning, would you please describe more what exactly to do with that code? I managed to find that php file on FTP, but have no idea, if to delete that portion of code, or just letters T, B, M na K...? How the code should look like after modify?
Thanks for any help
OC version. That provided solution is to implement but, now that we use Event Triggers, I would suggest to use it to add this code where you want it.