最新插件地址,见文章:http://www.hellokeykey.com/?p=2797
范例如下 在mysql中 执行下列sql语句
INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, ‘CN’, ‘BJ’, ‘北京’);
红色部分,应该是你的maento数据库名字,本例中使用 “magento” 绿色部分,应该是你magento数据库中的表的名字,注意你的表有没有添加前缀,本例中使用“directory_country_region”
INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, 'CN', 'BJ', '北京'); INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, 'CN', 'GD', '广东'); INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, 'CN', 'SH', '上海'); INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, 'CN', 'TJ', '天津'); INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, 'CN', 'HE', '河北'); INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, 'CN', 'SX', '山西'); INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, 'CN', 'NM', '内蒙古'); INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, 'CN', 'LN', '辽宁'); INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, 'CN', 'JL', '吉林'); INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, 'CN', 'HL', '黑龙江'); INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, 'CN', 'JS', '江苏'); INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, 'CN', 'ZJ', '浙江'); INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, 'CN', 'AH', '安徽'); INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, 'CN', 'FJ', '福建'); INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, 'CN', 'JX', '江西'); INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, 'CN', 'SD', '山东'); INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, 'CN', 'HA', '河南'); INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, 'CN', 'HB', '湖北'); INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, 'CN', 'HN', '湖南'); INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, 'CN', 'GX', '广西'); INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, 'CN', 'HI', '海南'); INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, 'CN', 'CQ', '重庆'); INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, 'CN', 'SC', '四川'); INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, 'CN', 'GZ', '贵州'); INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, 'CN', 'YN', '云南'); INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, 'CN', 'XZ', '西藏'); INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, 'CN', 'SN', '陕西'); INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, 'CN', 'GS', '甘肃'); INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, 'CN', 'QH', '青海'); INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, 'CN', 'NX', '宁夏'); INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, 'CN', 'XJ', '新疆'); INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, 'CN', 'HK', '香港'); INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, 'CN', 'AM', '澳门'); INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, 'CN', 'TW', '台湾'); 'TW', '台湾');
我写了个简单的插件,可以自动将上面的地址添加到magento:点此下载此插件
将里面的app覆盖你的magento根目录的app即可
也请参考此篇文章:http://www.webshopapps.com/blog/2011/04/adding-new-regionsstates-to-your-magento-installation-2/
转载标明出处: hellokeykey.com
directory_country_region_name表也需要添加内容,否则后台不会显示
恩,我在网上查到的资料,可能是那个人没有注意把