Page 1 of 1

[solved] OpenCart 3.0.3.8 Confirm Order Function

Posted: Sat Jan 22, 2022 1:01 am
by Nsaneone
Good Afternoon All. Hope your well.

Apologies if this has been answered before. But I have setup Opencart 3.0.3.8 to replace our 1.5 setup.

Comparing the code and functionality, I noticed in 1.5 there was a confirm Order function, in catalog/model/checkout/order.php :

public function confirm($order_id, $order_status_id, $comment = '', $notify = false) {

However I cant seem to find the corresponding function in the latest version. The closest I have come is the following function (in the same file on the newer version):

public function addOrderHistory($order_id, $order_status_id, $comment = '', $notify = false, $override = false) {

Could anyone confirm if just the name of the function has changed in between versions. Thank you for your assistance

Re: OpenCart 3.0.3.8 Confirm Order Function

Posted: Sat Jan 22, 2022 1:05 am
by thekrotek
confirm() function is present in the controller of each payment method.

Re: OpenCart 3.0.3.8 Confirm Order Function

Posted: Sat Jan 22, 2022 1:41 am
by ADD Creative
addOrderHistory has more or less replaced both the confirm and update functions. It not an exact replacement. For example the sending of emails is now handled by and event.

Re: OpenCart 3.0.3.8 Confirm Order Function

Posted: Sat Jan 22, 2022 5:11 pm
by Nsaneone
Thank you both for that information. I found the confirm function in the controller of each payment method and could see it used addOrderHistory function in the order.php file. (3.0.3.8)

The older version used a function called confirm in the order PHP file (1.5) Thank you for the assistance and confirmation