Page 2 of 2

Re: Orders Processing/Orders Completed/Order Statuses showing 0%

Posted: Sat Jul 06, 2019 8:55 pm
by kaik
I have created a small module to manage/recalculate those statistics.
https://github.com/Kaik/CodeIkebanaStatistics.ocmod
It does not use ocmod modifications it is completely event based. It disables the original event.
Apart from that, I have found that statistic order sale total is based on selected statuses while the one used in dashboard Total sale is all statuses > 0.

Re: Orders Processing/Orders Completed/Order Statuses showing 0%

Posted: Sat Jul 06, 2019 9:19 pm
by straightlight
By applying the IF statements as such in the catalog/controller/extension/module/codeikebaria_statistics.php file , it may prevent on validating the orders with fraud extensions, however.

Re: Orders Processing/Orders Completed/Order Statuses showing 0%

Posted: Sat Jul 06, 2019 9:41 pm
by kaik
Hmm... this is an exact copy of the original method catalog/controller/event/statistics.php I have not changed anything apart from the way it is called (before/after). Apart from that, I do not see how it will affect anything it does not work on an order itself it just updates statistic table based on the order information, so anything that could go wrong is those stats will be off...

Re: Orders Processing/Orders Completed/Order Statuses showing 0%

Posted: Sat Jul 06, 2019 9:53 pm
by straightlight
What I mean is you are adding an event method where these validations would be made before the actual addOrderHistory from the core is being initiated which means the fraud extension could still change the order status ID to a fraud status without knowing why for store owners as compared to the core where the original addOrderHistory is kept to a unique location where those events are easier to track as compared to extension event modules where the addOrderHistory could differ on one-and-another and, without troubleshooting each of them, it would be mainly impossible to know the root cause.

Re: Orders Processing/Orders Completed/Order Statuses showing 0%

Posted: Sun Jul 07, 2019 12:05 am
by kaik
I think I should add that: anyone using above module is doing it on your own risk, as an admin, you should never use any free or even paid extension outside of the marketplace and even then you should go only for highly rated/used ones and you should check comments too...

I do have more modules on git that are public, but these can be/are coded badly, not working/dangerous as I do not update them, so please do not use them on production sites and if you do not have a good PHP/OC knowledge you should not use any of my modules and stuff...

straightlight hopefully that will fix all the problems you mentioned :)

Re: Orders Processing/Orders Completed/Order Statuses showing 0%

Posted: Wed Jan 01, 2020 5:59 pm
by alertzone
Go to Admin Panel>Reports> click on Statistics
in the Statistics list refresh all action button and then show all progress on Dashboard successfully!

Re: Orders Processing/Orders Completed/Order Statuses showing 0%

Posted: Fri Feb 07, 2020 10:06 pm
by 3guk
Just wondered if anyone had managed to fix this issue - I have it with my fresh installation, would be great if I could fix it ?

Thanks

Re: Orders Processing/Orders Completed/Order Statuses showing 0%

Posted: Sat Feb 08, 2020 8:13 am
by straightlight
Yes, this issue was covered lately. See this FAQ: viewtopic.php?f=134&t=215776&start=20#p775757

Re: Orders Processing/Orders Completed/Order Statuses showing 0%

Posted: Thu Mar 19, 2020 6:45 am
by FaizanJ
Well Well Well.. for each newbie who is facing this issue, you can first try to go into phpmyadmin > os_statistics table then click on "SQL" tab and paste > Run the following query:

Code: Select all

INSERT INTO `oc_statistics` (`statistics_id`, `code`, `value`) VALUES
(1, 'order_sale', 0),
(2, 'order_processing', 0),
(3, 'order_complete', 0),
(4, 'order_other', 0),
(5, 'returns', 0),
(6, 'product', 0),
(7, 'review', 0);
then go to your opencart admin dashboard > Reports > Statistics and one by one click refresh button next to each item... and you are done!

Re: Orders Processing/Orders Completed/Order Statuses showing 0%

Posted: Thu Mar 19, 2020 9:34 am
by straightlight
phpmyadmin > os_statistics
INSERT INTO `oc_statistics`
The query sure won't work.