Post by kaik » Sat Jul 06, 2019 8:55 pm

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.

Newbie

Posts

Joined
Sat Nov 11, 2017 7:35 pm

Post by straightlight » Sat Jul 06, 2019 9:19 pm

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


Legendary Member

Posts

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

Post by kaik » Sat Jul 06, 2019 9:41 pm

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...

Newbie

Posts

Joined
Sat Nov 11, 2017 7:35 pm

Post by straightlight » Sat Jul 06, 2019 9:53 pm

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


Legendary Member

Posts

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

Post by kaik » Sun Jul 07, 2019 12:05 am

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 :)

Newbie

Posts

Joined
Sat Nov 11, 2017 7:35 pm

Post 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!

Post by 3guk » Fri Feb 07, 2020 10:06 pm

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

Newbie

Posts

Joined
Fri Feb 07, 2020 10:05 pm

Post by straightlight » Sat Feb 08, 2020 8:13 am

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


Legendary Member

Posts

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

Post by FaizanJ » Thu Mar 19, 2020 6:45 am

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!
Last edited by straightlight on Thu Mar 19, 2020 9:29 am, edited 1 time in total.
Reason: Added code tags.

Newbie

Posts

Joined
Thu Jan 28, 2016 8:06 am

Post by straightlight » Thu Mar 19, 2020 9:34 am

phpmyadmin > os_statistics
INSERT INTO `oc_statistics`
The query sure won't work.

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 mrlawrencelam » Mon Oct 19, 2020 7:44 pm

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!

User avatar
Newbie

Posts

Joined
Mon Oct 12, 2020 4:59 am

Post by Keycollectibles » Thu Nov 12, 2020 4:34 pm

mrlawrencelam wrote:
Mon Oct 19, 2020 7:44 pm
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) worked


Posts

Joined
Thu Nov 12, 2020 4:32 pm
Who is online

Users browsing this forum: No registered users and 130 guests