Page 1 of 1

How to show just a country in the form

Posted: Wed May 16, 2018 6:01 pm
by dani888
Hello
How can only a country appear in Romania.
As in this example.
I do not want to sleep in all countries.
Opencart 3.0.2.0
Thank you

Re: How to show just a country in the form

Posted: Wed May 16, 2018 6:38 pm
by yodapt
Check the Checkout extension settings, you probably have something there to change that. If not, only with custom code.

Re: How to show just a country in the form

Posted: Wed May 16, 2018 6:58 pm
by dani888
I installed AJAX Quick Checkout PRO but I can not find where to change it

Re: How to show just a country in the form

Posted: Wed May 16, 2018 7:10 pm
by yodapt
Go to the extensions settings, under Payment Address and Shipping Address you can mark your country as default. To have just that one showing in the list, delete the other ones.

Re: How to show just a country in the form

Posted: Wed May 16, 2018 8:08 pm
by dani888
Thanks for the answer I will try

Re: How to show just a country in the form

Posted: Wed May 16, 2018 8:46 pm
by IP_CAM
Well, if you only serve one single country, better remove every other
Country, as well as all other Zones, from your Database, it will remove
a few thousand unneeded Code Lines, and make your place a little more
efficient. ;)
Ernie

Re: How to show just a country in the form

Posted: Wed May 16, 2018 9:15 pm
by dani888
Very good idea but i do not know exactly which files to delete.
Can delete too much and conflict with other modules
thank you and defend only one country
Thank you

Re: How to show just a country in the form

Posted: Wed May 16, 2018 9:30 pm
by yodapt
You dont need to delete any files ..

Go to admin > system > localisation > countries, and system > localisation > zones

Re: How to show just a country in the form

Posted: Thu May 17, 2018 12:56 am
by dani888
ok
thank you

Re: How to show just a country in the form

Posted: Thu May 17, 2018 1:43 am
by xxvirusxx
You can fast disable if you run this command in the SQL from PhpMyAdmin

Code: Select all

UPDATE oc_country set status = 0 where country_id <> 175;
where oc_ is you database prefix.

Re: How to show just a country in the form

Posted: Thu May 17, 2018 2:08 am
by IP_CAM
country_id <> 175;
means, delete ALL EXEPT for Country #175, wich is (175, 'Romania', 'RO', 'ROM', '', 0, 1),
Still, the Zones also need to be killed, it one care's, to have a lean DB, and they take mucho
more Space than the countries. All Zones total to 4238 Code Lines, compared to the entire
DB, including those Zones, wich so totals to 8140 Lines, in a virgin OC-3 DB. Quite a Bag of
possibly never ever used DB Space, and wasted server power. This, in addition to the 'only'
total of 257 Country Lines, :D A virgin DB Filesize shrinks to more than half, this way....
So better also tell him, what 'DB Queries' get rid of them at once too, since I'm very unpro, when it
comes to such, unfortunately. :-\
Ernie

Re: How to show just a country in the form

Posted: Thu May 17, 2018 8:52 am
by xxvirusxx
To delete countries

Code: Select all

DELETE FROM oc_country WHERE country_id <> 175;
To delete zones

Code: Select all

DELETE FROM oc_zone WHERE country_id <> 175;

Re: How to show just a country in the form

Posted: Thu May 17, 2018 10:53 am
by IP_CAM
Wow, great, I did not think, that this would be so easy too ... :o
---
And just to kind of round up this topic, an easy way to 'handle' an OC Database
seamless from the OC Admin Section is possible by use of the famous multi-language
SqlBuddy(7), (it opens in it's own separate window), and it works up to PHP 7.1.xx
at least, but it's untested yet with PHP 7.2.xx. I updated the Header Info Sections of the
PHP Files a little, and hopefully did not screw up anything, but if I missed somewhere,
just let me know! ;)

It's built, to work with OC v.1.5.6.x Version Admin, as it comes, but I assume, that it would
be quite easy, to link it to later OC Versions too. Everything is coded in the SqlBuddy
config.php file, and the Admin Credential link Setting is placed in the VqMod. It
can ONLY be accessed by calling it within OC Admin, and by use of OC Admin credentials,
contrary to it's original design, to assure, that it cannot be mis-used, as published in some
security reports, just to mention this too. And it's not a full grown Server MySql Tool, but
it can do most, what's needed, to work in a Database.

And to OC NEWBIES, please take care, you could damage or even kill your DB and so Shop , if
you don't know, what you're doing. This can be a very dangerous Tool, so, don't come back and
complain, if you messed up somewhere!
Good Luck!
Ernie
---
http://www.ipc.li/os/My_Sqlbuddy.zip
---
Image

Re: How to show just a country in the form

Posted: Tue May 22, 2018 4:51 pm
by dani888
Hello
I can delete all countries from Go to admin> system> localization> countries, and system> localization> zones
Just a country for the form
I selected the country that I want to defend but all the countries have appeared
Thank you

Re: How to show just a country in the form

Posted: Tue May 22, 2018 5:20 pm
by xxvirusxx
Try to clear cache.