سؤال

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?

هل كانت مفيدة؟

المحلول

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);
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى magento.stackexchange
scroll top