Page 1 of 3

[v3.0.2.0 - Fix] - Admin Payment Extension - Free Checkout

Posted: Thu Oct 12, 2017 4:24 am
by straightlight
The following steps are for Opencart v3.0.2.0 release. If your site is running in production, put your site under maintenance.

1 - Take a screenshot of your admin free checkout payment module configurations.
2 - Uninstall the free checkout payment module.
3 - In admin/controller/extension/payment/free_checkout.php file,

find:

Code: Select all

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 with:

Code: Select all

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');
		}
In admin/view/template/extension/payment/free_checkout.twig file,

find:

Code: Select all

<select name="free_checkout_order_status_id" id="input-order-status" class="form-control">
                {% for order_status in order_statuses %}
                {% if order_status.order_status_id == free_checkout_order_status_id %}
                <option value="{{ order_status.order_status_id }}" selected="selected">{{ order_status.name }}</option>
                {% else %}
                <option value="{{ order_status.order_status_id }}">{{ order_status.name }}</option>
                {% endif %}
                {% endfor %}
replace with:

Code: Select all

<select name="payment_free_checkout_order_status_id" id="input-order-status" class="form-control">
                {% for order_status in order_statuses %}
                {% if order_status.order_status_id == payment_free_checkout_order_status_id %}
                <option value="{{ order_status.order_status_id }}" selected="selected">{{ order_status.name }}</option>
                {% else %}
                <option value="{{ order_status.order_status_id }}">{{ order_status.name }}</option>
                {% endif %}
                {% endfor %}
4 - Reinstall the free checkout payment module.
5 - Reconfigure the free checkout payment module.
6 - Test a transaction during checkout.
7 - When successful, disable the site maintenance (if running in production).

This should overall resolve the status issues along with other variables.

Re: [v3.0.2.0 - Fix] - Admin Payment Extension - Free Checkout

Posted: Fri Oct 13, 2017 5:12 pm
by omanincense
I have followed the instructions exactly, but whenever i go to the "Order Status" sittings it was set to Canceled, even i edit it to any other status, it will go back to Canceled again...!!

Re: [v3.0.2.0 - Fix] - Admin Payment Extension - Free Checkout

Posted: Sat Oct 14, 2017 6:16 am
by omanincense
Dear,

Anymore ideas to solve this problem?!

Re: [v3.0.2.0 - Fix] - Admin Payment Extension - Free Checkout

Posted: Sat Oct 14, 2017 6:24 am
by straightlight
Which OC version are you using? Have you cleared the cache, saas cache and the modification cache?

Re: [v3.0.2.0 - Fix] - Admin Payment Extension - Free Checkout

Posted: Sat Oct 14, 2017 5:49 pm
by omanincense
I'm using version 3.0.2.0 and i cleared all the cache.

Also, whenever i change the Order status in the "Free Checkout" extension to any status, it will go back to "Canceled" ..

That's making me crazy

Re: [v3.0.2.0 - Fix] - Admin Payment Extension - Free Checkout

Posted: Sat Oct 14, 2017 6:53 pm
by straightlight
Are you using any extensions such as journal2 theme?

Re: [v3.0.2.0 - Fix] - Admin Payment Extension - Free Checkout

Posted: Fri Oct 27, 2017 6:51 pm
by boyjah
I am having the same problem. OpenCart 3.0.2.0, using standard OpenCart theme. Changing status of Free Checkout and saving it always reverts to Cancelled.

Re: [v3.0.2.0 - Fix] - Admin Payment Extension - Free Checkout

Posted: Fri Oct 27, 2017 7:51 pm
by straightlight
Have you followed the instructions above?

Re: [v3.0.2.0 - Fix] - Admin Payment Extension - Free Checkout

Posted: Mon Nov 13, 2017 5:55 pm
by Busta1066
So i have the same issue, i have tried the above fix, but to no avail. I am using 3.0.2 and have the journal 2 theme installed. When i try to change the status of the free check out to complete it just goes back to cancel every time... driving me nuts to get this one issue fixed. Any help in resolving this would be amazing

Thanks :)

Re: [v3.0.2.0 - Fix] - Admin Payment Extension - Free Checkout

Posted: Sat Nov 18, 2017 11:34 am
by Sebiix3
This is not working for me for some reason :/ I already tried this a few times, also reinstalled a few times but i still get always canceled.. Any other idea how to fix this?

Re: [v3.0.2.0 - Fix] - Admin Payment Extension - Free Checkout

Posted: Sat Nov 18, 2017 11:43 pm
by straightlight
Are you using any extensions such as Journal2?

Re: [v3.0.2.0 - Fix] - Admin Payment Extension - Free Checkout

Posted: Sun Nov 19, 2017 6:33 am
by Sebiix3
straightlight wrote:
Sat Nov 18, 2017 11:43 pm
Are you using any extensions such as Journal2?
Nope, i am not using any extensions ._. I also tried the official update from github which includes the fix too, but this sadly didnt change anything.
Is it possible to change the free checkout to "complete" without using the adminpanel?

Re: [v3.0.2.0 - Fix] - Admin Payment Extension - Free Checkout

Posted: Sun Nov 19, 2017 7:04 am
by straightlight
Let's troubleshoot this issue. In your admin/controller/extension/free_checkout.php file,

find:

Code: Select all

$this->session->data['success'] = $this->language->get('text_success');
add above:

Code: Select all

echo "<pre />\n";
print_r($this->request->post);
echo "</pre>\n";

exit;
Then, go back to the admin free checkout page and save your settings again. An array will be shown. Please post this array.

Re: [v3.0.2.0 - Fix] - Admin Payment Extension - Free Checkout

Posted: Mon Nov 20, 2017 9:05 am
by Sebiix3
straightlight wrote:
Sun Nov 19, 2017 7:04 am
Let's troubleshoot this issue. In your admin/controller/extension/free_checkout.php file,

find:

Code: Select all

$this->session->data['success'] = $this->language->get('text_success');
add above:

Code: Select all

echo "<pre />\n";
print_r($this->request->post);
echo "</pre>\n";

exit;
Then, go back to the admin free checkout page and save your settings again. An array will be shown. Please post this array.
Hey, i did it and this is the result:

Code: Select all

Array
(
    [free_checkout_order_status_id] => 5
    [payment_free_checkout_status] => 1
    [payment_free_checkout_sort_order] => 
)
Thanks for your help :)

Re: [v3.0.2.0 - Fix] - Admin Payment Extension - Free Checkout

Posted: Mon Nov 20, 2017 9:09 am
by straightlight
free_checkout_order_status_id
Exactly as I suspected. As you can see, from my above steps, you either did not followed that particular instructions or you did not cleared all caches properly from the Opencart admin or you did cleared out all caches from the Opencart admin but you might be using Journal2 which prevents proper cache clean-ups.

Re: [v3.0.2.0 - Fix] - Admin Payment Extension - Free Checkout

Posted: Mon Nov 20, 2017 9:14 am
by Sebiix3
straightlight wrote:
Mon Nov 20, 2017 9:09 am
free_checkout_order_status_id
Exactly as I suspected. As you can see, from my above steps, you either did not followed that particular instructions or you did not cleared all caches properly from the Opencart admin or you did cleared out all caches from the Opencart admin but you might be using Journal2 which prevents proper cache clean-ups.
Ohhh, well i maybe failed on my own.. does "clearing the caches" mean to clear browser caches or is there an other way to clear the cache? Google said something about system->storage->cache on the root directoy. Do i just need to delete the folders inside the cache folder? :O

Re: [v3.0.2.0 - Fix] - Admin Payment Extension - Free Checkout

Posted: Mon Nov 20, 2017 9:16 am
by straightlight
Clearing all caches means:

- Admin dashboard right square icon - both caches inside the modal.
- Admin - > extensions - > modifications - > refresh button
- Browser cache, close browser, re-open the browser and to go back to the admin-end of Opencart.

Re: [v3.0.2.0 - Fix] - Admin Payment Extension - Free Checkout

Posted: Mon Nov 20, 2017 9:23 am
by Sebiix3
straightlight wrote:
Mon Nov 20, 2017 9:16 am
Clearing all caches means:

- Admin dashboard right square icon - both caches inside the modal.
- Admin - > extensions - > modifications - > refresh button
- Browser cache, close browser, re-open the browser and to go back to the admin-end of Opencart.
This actually fixed it! Thanks so much for your help. :-*

Re: [v3.0.2.0 - Fix] - Admin Payment Extension - Free Checkout

Posted: Mon Nov 20, 2017 9:25 am
by straightlight
Great. As you can see, this fix is working as intended.

Re: [v3.0.2.0 - Fix] - Admin Payment Extension - Free Checkout

Posted: Tue Nov 28, 2017 5:31 pm
by johnslsbr
Hi ,

I have followed the information and still not working. However I defiantly am using Journal 2 is there a fix ?

Regards