西部数码主机 | 阿里云主机| 虚拟主机 | 西部数码云服务器 | 返回乐道官网
当前位置: 主页 > php教程 > magento教程 >

Magento中国地区运费表设置

时间:2016-10-13 23:02来源:未知 作者:好模板 点击:次
在Magento 里面除了固定运费,另外一个适合简单配置的就是表运费的设置(table rate) 在汉化的时候注意要先加上国内的地区,才能使用到表运费此项功能,但在magento的英文文档说得不
在Magento 里面除了固定运费,另外一个适合简单配置的就是表运费的设置(table rate) 
在汉化的时候注意要先加上国内的地区,才能使用到表运费此项功能,但在magento的英文文档说得不清不楚的。
可以参考原文:http://www.magentocommerce.com/w ... r_s_guide/chapter_4 

这里进行一下补充说明,首先是表运费需要用到的csv文件,就是运费表,需要自定义然后在magento商店后台的website级别进行配置导入 

"国家","省份/地区","邮编","重量 (及以上)","配送价格" 
"CHN","GD","*","0",200 
"CHN","*","*","50",400 
"CHN","*","*","0",800 

国家 --> 定义在“directory_country”表, 使用样例数据时,已经导入了,中国的标识符号是“CN”以及"CHN" 
省份和地区 --> 定义在“directory_country_region”表,需要自己进行导入 
Sql代码  收藏代码
  1. INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, 'CN', 'GD', '广东');  


另外还可以根据locale定义不同语言下面显示的名 
Sql代码  收藏代码
  1. INSERT INTO `magento`.`directory_country_region_name` (`locale` ,`region_id` ,`name` )VALUES ('zh_CN', '182', '广东');  
  2. INSERT INTO `magento`.`directory_country_region_name` (`locale` ,`region_id` ,`name` )VALUES ('en_US', '182', 'Canton');  

这样就可以定义地区和地区运输费率了 

成功导入之后可以在‘shipping_tablerate’表看见导入的数据内容 

全国34个地区参考SQL 
Sql代码  收藏代码
  1. INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, 'CN', 'GD', '广东');  
  2. INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, 'CN', 'BJ', '北京');  
  3. INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, 'CN', 'SH', '上海');  
  4. INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, 'CN', 'TJ', '天津');  
  5. INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, 'CN', 'HE', '河北');  
  6. INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, 'CN', 'SX', '山西');  
  7. INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, 'CN', 'NM', '内蒙古');  
  8. INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, 'CN', 'LN', '辽宁');  
  9. INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, 'CN', 'JL', '吉林');  
  10. INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, 'CN', 'HL', '黑龙江');  
  11. INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, 'CN', 'JS', '江苏');  
  12. INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, 'CN', 'ZJ', '浙江');  
  13. INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, 'CN', 'AH', '安徽');  
  14. INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, 'CN', 'FJ', '福建');  
  15. INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, 'CN', 'JX', '江西');  
  16. INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, 'CN', 'SD', '山东');  
  17. INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, 'CN', 'HA', '河南');  
  18. INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, 'CN', 'HB', '湖北');  
  19. INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, 'CN', 'HN', '湖南');  
  20. INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, 'CN', 'GX', '广西');  
  21. INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, 'CN', 'HI', '海南');  
  22. INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, 'CN', 'CQ', '重庆');  
  23. INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, 'CN', 'SC', '四川');  
  24. INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, 'CN', 'GZ', '贵州');  
  25. INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, 'CN', 'YN', '云南');  
  26. INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, 'CN', 'XZ', '西藏');  
  27. INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, 'CN', 'SN', '陕西');  
  28. INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, 'CN', 'GS', '甘肃');  
  29. INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, 'CN', 'QH', '青海');  
  30. INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, 'CN', 'NX', '宁夏');  
  31. INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, 'CN', 'XJ', '新疆');  
  32. INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, 'CN', 'HK', '香港');  
  33. INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, 'CN', 'AM', '澳门');  
  34. INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, 'CN', 'TW', '台湾');  

(责任编辑:好模板)
顶一下
(0)
0%
踩一下
(0)
0%
------分隔线----------------------------
栏目列表
热点内容