The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.
F. Rules:
- viewtopic.php?f=176&t=200480
- viewtopic.php?f=176&t=200804
Regards,
Straightlight
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
The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.
F. Rules:
- viewtopic.php?f=176&t=200480
- viewtopic.php?f=176&t=200804
Regards,
Straightlight
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?
The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.
F. Rules:
- viewtopic.php?f=176&t=200480
- viewtopic.php?f=176&t=200804
Regards,
Straightlight
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
The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.
F. Rules:
- viewtopic.php?f=176&t=200480
- viewtopic.php?f=176&t=200804
Regards,
Straightlight
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
The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.
F. Rules:
- viewtopic.php?f=176&t=200480
- viewtopic.php?f=176&t=200804
Regards,
Straightlight
Users browsing this forum: No registered users and 12 guests