我们有Magento版本2.2.5。
我们尝试启用(添加)科索沃。
所以:
[当我们进入管理员配置时,一般情况下添加可用的国家/地区不存在。我们还尝试添加测试国家/地区,但无法正常工作。我们还尝试编辑/vendor/magento/module-directory/etc/config.xml添加允许的国家/地区。
我们该怎么办?
Step1: Open lib/zend/locale/data/en.xml
Step2: Locate territories tag in this file
Step3: copy one of the territory tags for the syntax and paste it within the territories tag
Step4: hard part here is to add country code in this file as might not be able to find a unique one, so it’s upto you.
Step5: Save this file
Step6: Open table name directory_country
Step7: It has predefined syntax follow then same and create a new row and enter the same country code as entered in the en.xml file in 3 columns
Step8: Refresh the site’s cache.
Step9: Admin > Configuration > General
应该在允许的国家列表中选择这个新国家。