List of countries - enable/disable

Please make an option to deactivate all countries at once.

It's a huge pain in the neck to go through over 200 countries and deactivate them all except USA, one by one (well, we don't ship outside US, ok?).

You can always run a MySQL query as I did for the countries that for example are outside Europe .

If you are familiar with that you can have a few queries for each selection of countries.


This MySQL query will set all other countries except 'US' to Disabled status:

UPDATE cscart_countries SET status = 'D' WHERE code != 'US'

You can also disable for more than one country, for example, to only have United States (US) and United Kingdom (GB) enabled:

UPDATE cscart_countries SET status = 'D' WHERE code != 'US' OR 'GB'

Use the reverse to re-enable, ie.

UPDATE cscart_countries SET status = 'A' WHERE code != 'US'

You may also need to alter 'cscart_countries' depending on your database prefix name, however “cscart_” is default if I remember correctly.

Remember: You MUST backup the database before editing the database directly, even if you know what you're doing, leaving a simple character out of a query can and does have major consequences. It's always best to be safe than sorry.

I use mostly this.

Dectivate All non EU countries

UPDATE `cscart_countries` SET `status` = 'D' ;
UPDATE `cscart_countries` SET `status` = 'A' WHERE `region` = 'EU';