Post by taran_117 » Wed Dec 06, 2017 11:05 pm

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

New member

Posts

Joined
Sun Apr 29, 2012 9:26 pm

Post by straightlight » 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;
		}

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by taran_117 » Thu Dec 07, 2017 2:05 pm

Hi Straightlight
Thanks for the info. It worked like a charm. You are superhero. O0

New member

Posts

Joined
Sun Apr 29, 2012 9:26 pm

Post by 1dodes9 » 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

Newbie

Posts

Joined
Fri Apr 22, 2022 7:18 pm

Post by straightlight » Sat Apr 23, 2022 1:08 am

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.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: Amazon [Bot] and 26 guests