如何在Magento2中添加国家?

问题描述 投票:1回答:1

我们有Magento版本2.2.5。

我们尝试启用(添加)科索沃。

所以:

  1. 添加到数据库directory_country XK,XK和XKX中
  2. 进入/ vendor / magento / zendframework1 / library / Zend / Locale / Data and使用科索沃(已经存在)编辑en.xml / it.xml并添加科索沃
  3. 使用控制台刷新缓存

[当我们进入管理员配置时,一般情况下添加可用的国家/地区不存在。我们还尝试添加测试国家/地区,但无法正常工作。我们还尝试编辑/vendor/magento/module-directory/etc/config.xml添加允许的国家/地区。

我们该怎么办?

configuration magento2 country
1个回答
0
投票
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

应该在允许的国家列表中选择这个新国家。

© www.soinside.com 2019 - 2024. All rights reserved.