Post by francesco.bragagna » Tue Oct 25, 2022 1:38 pm

Hi,
I'm running OC 3.0.3.6 on a website from about one year. Few days ago it start a strange behaviour: order can be completed properly from the user interface (with different payment method) but order_status_id is not changed, remain 0, leaving all the order "invisible" from the dashboard. (I know they are in db)
The mail with order information are sent to the customer.
There are no error in browser console.

By adding lines with $this->log->write('....') and looking at the error console, I'm trying I check what is happing.
I understood that payment gatways call when completed the $this->model_checkout_order->addOrderHistory which is located into catalog/model/checkout/order.php
addOrderHistory is ivoked with the proper order id and the right order status (in my case 2)

An event is triggered and the code inside catalog/controller/event/activity.php is executed

Code: Select all

   // model/checkout/order/addOrderHistory/before
   public function addOrderHistory(&$route, &$args) { 
This code run correctly and write a record into user activity table.

I'm expecting to see the execution of addOrderHistory from catalog/model/checkout/order.php or better in my case from /system/storage/modification/catalog/model/checkout/order.php
I put a log line of the first line of the function, but that line are not logged.

Do you have any suggestion:
- what could be happening that does not invoke properly the addOrderHistory function, and how can I identify the problem?
- nothing is really changed on the server, we did not apply any upgrade or changes since months
- maybe could be a problem with php, or how can I discover it?

Thank you very much for the help, I really don't know now how to solve it.


Posts

Joined
Sat May 05, 2018 7:10 am

Post by ADD Creative » Wed Oct 26, 2022 10:21 pm

What payment extension are you using? Some use callbacks and it could be the callback is not reaching your server. Test with a simple payment method, such as cash on delivery.

Also check both your PHP and OpenCart error logs.

www.add-creative.co.uk


Guru Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by francesco.bragagna » Sat Oct 29, 2022 3:03 am

Thank you for the answer: to avoid problem I'm trying with free_checkout, which means make the order and retire it phisically at the shop.
I do not have any particolar error in the log, and I've added the additional lines of log to understand what is happening: for me it's very strange that the method addOrderHistory is not called, and I don't know how to change it :(


Posts

Joined
Sat May 05, 2018 7:10 am

Post by ADD Creative » Sat Oct 29, 2022 7:25 pm

Are you saying addOrderHistory isn't being called with the Free Checkout?

www.add-creative.co.uk


Guru Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom
Who is online

Users browsing this forum: paulfeakins and 5 guests