Post by gazn0357 » Sat Dec 23, 2017 10:54 pm

After install/upgrade to 3.0.2.0, the Orders Processing/Orders Completed/Order Statuses report at bottom of Admin Navigation Panel all show 0%. Looking for solution. Dan

New member

Posts

Joined
Sun Jun 25, 2017 3:55 am

Post by straightlight » Sat Dec 23, 2017 11:16 pm

If you do not use the master files of Opencart v3.0.2.0 at this time already, see if the following file replacement will rectify the issue: https://github.com/opencart/opencart/bl ... n_left.php

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 gazn0357 » Sun Dec 24, 2017 12:41 am

Other than changes I have made to the /catalog/view/theme/default/stylesheet/stylesheet.css file, there have been no code changes to files since original install. I do have three extensions installed, but did disabled them to see if they were cause. Do not believe they are.

Replaced file with file in link provided, but see no differences. Did do a file comparison between the two and surprisingly see many changes between files. Debating now if I should go back to original file.

Under Store Options, I have the 'Processing order Status' set to Processing and the 'Complete Order Status' set to Completed.

Dan

New member

Posts

Joined
Sun Jun 25, 2017 3:55 am

Post by straightlight » Sun Dec 24, 2017 1:02 am

See with the master files from Github Opencart if you can replicate the same issue.

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 gazn0357 » Sun Dec 24, 2017 3:36 am

Are you saying to download all the master files (done that) and then FTP files over current Admin directory?

Are all configuration settings in the sql database?

New member

Posts

Joined
Sun Jun 25, 2017 3:55 am

Post by straightlight » Sun Dec 24, 2017 3:53 am

Are you saying to download all the master files (done that)
Yes
and then FTP files over current Admin directory?
No, rather in the host file manager console where you could simply extract the files with one simple click, which around 2400 files will be extracted in matter of seconds, instead of waiting an hour over FTP and also ensures full integrity of the files rather than corrupted / missing files during the upload for your admin folder.

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 anddi » Wed Mar 14, 2018 1:25 am

I am having the exact same issue on 3.0.2.0. I tried the "column_left.php" from the github master branch, I noticed it had been indeed updated but that alone did not fix the problem for me.

Newbie

Posts

Joined
Wed Mar 14, 2018 12:56 am

Post by gazn0357 » Fri Jun 01, 2018 10:33 am

Still looking for an answer.

New member

Posts

Joined
Sun Jun 25, 2017 3:55 am

Post by PetjeNL » Fri Jun 08, 2018 3:33 am

I just upgraded to 3.0.2.0 and experiencing the same issue.

https://www.masculum.nl


Newbie

Posts

Joined
Wed Jun 03, 2015 8:53 pm
Location - Netherlands

Post by BillK » Sat Jun 16, 2018 5:20 pm

Here's what I've found so far with this issue:

The statistics/addOrderHistory() function shows that it should be triggered by the model/checkout/order/addOrderHistory/before event, but the trigger is set to model/checkout/order/addOrderHistory/after.
It is getting triggered after the order is already saved, so when the function checks if the new order_status_id is different from the saved order_status_id it doesn't do anything because it thinks that order status didn't change.

After updating the the statistics_order_history row in oc_event and changing the trigger to catalog/model/checkout/order/addOrderHistory/before, I then had to change the addOrderHistory function in catalog/controller/event/statistics.php from

Code: Select all

public function addOrderHistory(&$route, &$args, &$output) {
to

Code: Select all

public function addOrderHistory(&$route, &$args) {
It's still buggy but at least its updating the oc_statistics table now. If I get it working better I will post my updates here.

Thanks

Newbie

Posts

Joined
Wed Apr 11, 2018 12:22 am

Post by salimalisalim » Sun Oct 07, 2018 9:39 pm

Hi, I am facing the same issue, Is there any update on this bug ?

Newbie

Posts

Joined
Tue Aug 14, 2018 12:52 pm

Post by straightlight » Mon Oct 08, 2018 6:32 pm

The provided solution above has already been posted on GitHub Opencart.

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 Marinelife » Fri Oct 19, 2018 10:31 am

BillK wrote:
Sat Jun 16, 2018 5:20 pm
Here's what I've found so far with this issue:

The statistics/addOrderHistory() function shows that it should be triggered by the model/checkout/order/addOrderHistory/before event, but the trigger is set to model/checkout/order/addOrderHistory/after.
It is getting triggered after the order is already saved, so when the function checks if the new order_status_id is different from the saved order_status_id it doesn't do anything because it thinks that order status didn't change.

After updating the the statistics_order_history row in oc_event and changing the trigger to catalog/model/checkout/order/addOrderHistory/before, I then had to change the addOrderHistory function in catalog/controller/event/statistics.php from

Code: Select all

public function addOrderHistory(&$route, &$args, &$output) {
to

Code: Select all

public function addOrderHistory(&$route, &$args) {
It's still buggy but at least its updating the oc_statistics table now. If I get it working better I will post my updates here.

Thanks
I have followed this fix but unfortunately it's still not working in my store.

How can i fix it :(

User avatar
New member

Posts

Joined
Fri Aug 25, 2017 7:13 am
Location - Jeddah

Post by countzer0 » Fri Oct 19, 2018 5:10 pm

For anyone applying this fix, you'll want to update the oc_statistics table with the order_status counts. You can get these using the following query:

Code: Select all

SELECT o.order_status_id, COUNT( o.order_status_id ) AS total, os.name
FROM oc_order o
LEFT JOIN oc_order_status os ON ( o.order_status_id = os.order_status_id ) 
GROUP BY o.order_status_id

A happy OpenCart developer from Brighton.


User avatar
New member

Posts

Joined
Sat Jun 18, 2011 11:09 pm
Location - Brighton, UK

Post by straightlight » Sun Oct 21, 2018 1:12 am

countzer0 wrote:
Fri Oct 19, 2018 5:10 pm
For anyone applying this fix, you'll want to update the oc_statistics table with the order_status counts. You can get these using the following query:

Code: Select all

SELECT o.order_status_id, COUNT( o.order_status_id ) AS total, os.name
FROM oc_order o
LEFT JOIN oc_order_status os ON ( o.order_status_id = os.order_status_id ) 
GROUP BY o.order_status_id
This one might be more reliable since order is a reserved term. This issue was already encountered before.

Code: Select all

SELECT o.order_status_id, COUNT(o.order_status_id) AS total, os.name
FROM `" . DB_PREFIX . "order` o
LEFT JOIN `" . DB_PREFIX . "order_status` os ON (o.order_status_id = os.order_status_id) 
GROUP BY o.order_status_id

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 samaraki » Sat May 11, 2019 8:37 pm

The instructions are super unclear....

"After updating the the statistics_order_history row in oc_event and changing the trigger to catalog/model/checkout/order/addOrderHistory/before, I then had to change the addOrderHistory function in catalog/controller/event/statistics.php from
"

This implies two instructions.

1. catalog/model/checkout/order/addOrderHistory/before (There is no such directory)
There is however: catalog/model/checkout/order and on this page there is 3 instances of "addOrderHistory" But there is no mention of "after" word in the file to change to "before" So not sure what to do here.

2. The second instruction was easy enough.

3. The 3rd instruction:

SELECT o.order_status_id, COUNT(o.order_status_id) AS total, os.name
FROM `" . DB_PREFIX . "order` o
LEFT JOIN `" . DB_PREFIX . "order_status` os ON (o.order_status_id = os.order_status_id)
GROUP BY o.order_status_id LIMIT 0, 25

This results in this error:
#1146 - Table 'mytable" . DB_PREFIX . "order' doesn't exist

So for me this "fix" fixes nothing.

Active Member

Posts

Joined
Fri Jul 26, 2013 2:36 pm

Post by straightlight » Sat May 11, 2019 9:48 pm

#1146 - Table ' mytable" . DB_PREFIX . "order' doesn't exist

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 samaraki » Sun May 12, 2019 1:25 pm

Yes, I renamed it to "mytable" as I didn't want to share my datebase name.

I pasted your code into the SQL

#1146 - Table 'XXXXXXX (I've not pasted it here for security reasons)" . DB_PREFIX . "order' doesn't exist

What I'm saying is, the code:
SELECT o.order_status_id, COUNT(o.order_status_id) AS total, os.name
FROM `" . DB_PREFIX . "order` o
LEFT JOIN `" . DB_PREFIX . "order_status` os ON (o.order_status_id = os.order_status_id)
GROUP BY o.order_status_id LIMIT 0, 25

Doesn't work.

Active Member

Posts

Joined
Fri Jul 26, 2013 2:36 pm

Post by letxobnav » Sun May 12, 2019 2:17 pm

are you running this query:

Code: Select all

SELECT o.order_status_id, COUNT(o.order_status_id) AS total, os.name
FROM `" . DB_PREFIX . "order` o
LEFT JOIN `" . DB_PREFIX . "order_status` os ON (o.order_status_id = os.order_status_id) 
GROUP BY o.order_status_id LIMIT 0, 25
with phpmyadmin and not via php?

Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


User avatar
Expert Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan

Post by gjburg » Tue May 14, 2019 3:01 am

Same for me after upgrade from 2.3.0.2 to 3.0.3.2

Replaced the latest GIT
https://github.com/opencart/opencart/bl ... _left.php[
https://github.com/opencart/opencart/bl ... istics.php

Changed the Table Events

Code: Select all

statistics_order_history changed to catalog/model/checkout/order/addOrderHistory/before
Manual changed the code in statistics.php

Code: Select all

public function addOrderHistory(&$route, &$args) {
Ran SQL script

Code: Select all

SELECT o.order_status_id, COUNT( o.order_status_id ) AS total, os.name
FROM oc_order o
LEFT JOIN oc_order_status os ON ( o.order_status_id = os.order_status_id ) 
GROUP BY o.order_status_id
Any ideas to get this to work?

Newbie

Posts

Joined
Wed Jan 21, 2015 5:02 am
Who is online

Users browsing this forum: No registered users and 130 guests