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
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.
Example:
$config = Mage::getModel('core/config');
$config->saveConfig('general/country/allow', "AF,AX,AL,DZ", 'default', 0);
-
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.– cmuenchCommented Jul 30, 2013 at 17:26