- A+
所属分类:常见问题
由于opencart是老外写的,固然省份都是拼音,我们要汉化的话一个个修改挺麻烦的。我这里提供一个SQL哈。
- --------------------
- --SDT技术网提供--
- --------------------
- update oc_zone set name='安徽' where code='AN';
- update oc_zone set name='北京' where code='BE';
- update oc_zone set name='重庆' where code='CH';
- update oc_zone set name='福建' where code='FU';
- update oc_zone set name='甘肃' where code='GA';
- update oc_zone set name='广东' where code='GU';
- update oc_zone set name='广西' where code='GX';
- update oc_zone set name='贵州' where code='GZ';
- update oc_zone set name='海南' where code='HA';
- update oc_zone set name='河北' where code='HB';
- update oc_zone set name='黑龙江' where code='HL';
- update oc_zone set name='河南' where code='HE';
- update oc_zone set name='香港' where code='HK';
- update oc_zone set name='湖北' where code='HU';
- update oc_zone set name='湖南' where code='HN';
- update oc_zone set name='内蒙古' where code='IM';
- update oc_zone set name='江苏' where code='JI';
- update oc_zone set name='江西' where code='JX';
- update oc_zone set name='吉林' where code='JL';
- update oc_zone set name='辽宁' where code='LI';
- update oc_zone set name='澳门' where code='MA';
- update oc_zone set name='宁夏' where code='NI';
- update oc_zone set name='陕西' where code='SH';
- update oc_zone set name='山东' where code='SA';
- update oc_zone set name='上海' where code='SG';
- update oc_zone set name='山西' where code='SX';
- update oc_zone set name='四川' where code='SI';
- update oc_zone set name='天津' where code='TI';
- update oc_zone set name='新疆' where code='XI';
- update oc_zone set name='云南' where code='YU';
- update oc_zone set name='浙江' where code='ZH';
当然了,还少了两个省份还有行政区对吧。加入下面这个就好了
- --------------------
- --SDT技术网提供--
- --------------------
- INSERT INTO `oc_zone` (`zone_id`, `country_id`, `name`, `code`, `status`) VALUES
- ('', 44, '香港', 'HK', 1),
- ('', 44, '西藏', 'XZ', 1),
- ('', 44, '青海', 'QH', 1),
- ('', 44, '台湾', 'TW', 1);
文化有限,如果疏漏了什么省份或行政区域欢迎补充。
本文由:SDT技术网分站“开源电商”发布,转账请注明出处。
后来想想,好像不行,需要考虑国家ID。所以可以用下面这个哈。
- --------------------
- --SDT技术网提供--
- --------------------
- update oc_zone set name='安徽' where code='AN' and country_id='44';
- update oc_zone set name='北京' where code='BE' and country_id='44';
- update oc_zone set name='重庆' where code='CH' and country_id='44';
- update oc_zone set name='福建' where code='FU' and country_id='44';
- update oc_zone set name='甘肃' where code='GA' and country_id='44';
- update oc_zone set name='广东' where code='GU' and country_id='44';
- update oc_zone set name='广西' where code='GX' and country_id='44';
- update oc_zone set name='贵州' where code='GZ' and country_id='44';
- update oc_zone set name='海南' where code='HA' and country_id='44';
- update oc_zone set name='河北' where code='HB' and country_id='44';
- update oc_zone set name='黑龙江' where code='HL' and country_id='44';
- update oc_zone set name='河南' where code='HE' and country_id='44';
- update oc_zone set name='香港' where code='HK' and country_id='44';
- update oc_zone set name='湖北' where code='HU' and country_id='44';
- update oc_zone set name='湖南' where code='HN' and country_id='44';
- update oc_zone set name='内蒙古' where code='IM' and country_id='44';
- update oc_zone set name='江苏' where code='JI' and country_id='44';
- update oc_zone set name='江西' where code='JX' and country_id='44';
- update oc_zone set name='吉林' where code='JL' and country_id='44';
- update oc_zone set name='辽宁' where code='LI' and country_id='44';
- update oc_zone set name='澳门' where code='MA' and country_id='44';
- update oc_zone set name='宁夏' where code='NI' and country_id='44';
- update oc_zone set name='陕西' where code='SH' and country_id='44';
- update oc_zone set name='山东' where code='SA' and country_id='44';
- update oc_zone set name='上海' where code='SG' and country_id='44';
- update oc_zone set name='山西' where code='SX' and country_id='44';
- update oc_zone set name='四川' where code='SI' and country_id='44';
- update oc_zone set name='天津' where code='TI' and country_id='44';
- update oc_zone set name='新疆' where code='XI' and country_id='44';
- update oc_zone set name='云南' where code='YU' and country_id='44';
- update oc_zone set name='浙江' where code='ZH' and country_id='44';