Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
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
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
YesAre you saying to download all the master files (done that)
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.and then FTP files over current Admin directory?
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
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) {
Code: Select all
public function addOrderHistory(&$route, &$args) {
Thanks
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
I have followed this fix but unfortunately it's still not working in my store.BillK wrote: ↑Sat Jun 16, 2018 5:20 pmHere'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 fromtoCode: Select all
public function addOrderHistory(&$route, &$args, &$output) {
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.Code: Select all
public function addOrderHistory(&$route, &$args) {
Thanks
How can i fix it
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.
This one might be more reliable since order is a reserved term. This issue was already encountered before.countzer0 wrote: ↑Fri Oct 19, 2018 5:10 pmFor 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
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
"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.
#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
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.
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
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.
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
Code: Select all
public function addOrderHistory(&$route, &$args) {
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
Users browsing this forum: No registered users and 48 guests