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.
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.
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.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
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...
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.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
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
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
Yes, this issue was covered lately. See this FAQ: viewtopic.php?f=134&t=215776&start=20#p775757
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
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:
then go to your opencart admin dashboard > Reports > Statistics and one by one click refresh button next to each item... and you are done!
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);
Last edited by straightlight on Thu Mar 19, 2020 9:29 am, edited 1 time in total.
Reason: Added code tags.
Reason: Added code tags.
phpmyadmin > os_statistics
The query sure won't work.INSERT INTO `oc_statistics`
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
I am on v3.0.3.6. This works for me:
by alertzone » Wed Jan 01, 2020 5:59 pm
Go to Admin Panel>Reports> click on Statistics
in the Statistics list refresh all action button and then show all progress on Dashboard successfully!
LOL!!! Your solution (the simplest solution) workedmrlawrencelam wrote: ↑Mon Oct 19, 2020 7:44 pmI am on v3.0.3.6. This works for me:
by alertzone » Wed Jan 01, 2020 5:59 pm
Go to Admin Panel>Reports> click on Statistics
in the Statistics list refresh all action button and then show all progress on Dashboard successfully!
Who is online
Users browsing this forum: JNeuhoff and 136 guests