Post by chinapresentations » Fri Jan 22, 2021 10:27 pm

Hello, the checkout terms tickbox I would like to only appear for certain countries. Just wondering if anyone can tell me how I can do that.

Many thanks


Posts

Joined
Wed Jun 26, 2019 10:39 pm

Post by mikeinterserv » Fri Jan 22, 2021 10:31 pm

Not particularly easy that one.
I don't think there will an extension for such
You may have to make a request in the commercial section for this.
Some one else may have other ideas for you.

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales

Post by straightlight » Fri Jan 22, 2021 10:36 pm

By creating an /after event of your catalog/controller/checkout/payment_method.php file by validating and starting with this line:

Code: Select all

if ($this->config->get('config_checkout_id')) {
it could be done.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by chinapresentations » Fri Jan 22, 2021 10:45 pm

straightlight wrote:
Fri Jan 22, 2021 10:36 pm
By creating an /after event of your catalog/controller/checkout/payment_method.php file by validating and starting with this line:

Code: Select all

if ($this->config->get('config_checkout_id')) {
it could be done.
Thanks for that. I will give it a go. So where do I set the countries that it will apply to?


Posts

Joined
Wed Jun 26, 2019 10:39 pm

Post by straightlight » Fri Jan 22, 2021 11:47 pm

You could create a country list right below that IF statement and apply an in_array lookup.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by paulfeakins » Mon Jan 25, 2021 7:40 pm

chinapresentations wrote:
Fri Jan 22, 2021 10:27 pm
Hello, the checkout terms tickbox I would like to only appear for certain countries. Just wondering if anyone can tell me how I can do that.
If you can't find an extension, you could pay a developer such as ourselves or post a job in the Commercial Support Forum.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Guru Member

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom
Who is online

Users browsing this forum: NicNie, opencartArab, shanghua and 417 guests