1

I have a list of over 200 countries I need to allow for an EE 1.13 site. I'd prefer not to do this through the admin interface because it is tedious and I am error prone. Is it possible to set Allow Countries directly in the database, programmatically or using n98-magerun?

1 Answer 1

5

This can be edited in the db. A few thoughts, though:

  • Don't edit the db directly. Because this is a config setting you can call saveConfig(); Make an upgrade script (example saveConfig below)
  • This value won't exist in core_config_data if you've never saved it in the admin panel.

enter image description here

Example:

$config = Mage::getModel('core/config');
$config->saveConfig('general/country/allow', "AF,AX,AL,DZ", 'default', 0);
1
  • Use n98-magerun if you i.e. migrate a live system to a development system to change settings. In case of deliver system configurations with an update it's better to bundle the config with a upgrade script.
    – cmuench
    Commented Jul 30, 2013 at 17:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.