Free checkout missing orders sale

We activate the free checkout payment module in Opencart 3.0.2.0, then we start ordering but all orders go to the Missing Orders in Sales, so debugging we found out that somehow the free checkout files were not updated properly in the Opencart version 3.0.2.0. Here are the changes that we did to make it work:

Open the file admin/controller/extension/payment/free_checkout.php and find the following lines of code:

if (isset($this->request->post['free_checkout_order_status_id'])) {
	$data['free_checkout_order_status_id'] = $this->request->post['free_checkout_order_status_id'];
} else {
	$data['free_checkout_order_status_id'] = $this->config->get('free_checkout_order_status_id');
}

Replace it with the following:

if (isset($this->request->post['payment_free_checkout_order_status_id'])) {
	$data['payment_free_checkout_order_status_id'] = $this->request->post['payment_free_checkout_order_status_id'];
} else {
	$data['payment_free_checkout_order_status_id'] = $this->config->get('payment_free_checkout_order_status_id');
}

See the “payment_”, as we mentioned in Single instance Opencart module development tutorial all single instance payment module fields should start with “payment_”, it was missing in the above code that is why it was not working.

Similarly, open admin/view/template/extension/payment/free_checkout.twig and find the following lines of code:

<select name="free_checkout_order_status_id" id="input-order-status" class="form-control">

Replace with the following code:

<select name="payment_free_checkout_order_status_id" id="input-order-status" class="form-control">

You can download the module below which was developed before we find the above solution, next time we need to search more.

Download and upload the files to the respective folder which will override the files and you are good to go. With these changes, our orders are showing in Sales.

In this way, you can solve the issues of free checkout sales going to the missing order’s sales. Please don’t forget to post your questions or comments so that we can add extra topics. You can follow us at our twitter account @rupaknpl. Subscribe to our YouTube channel for Opencart tutorials, and click to see all Opencart free module.

LEAVE A REPLY

Please enter your comment!
Please enter your name here