Shipping.php 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. /**
  3. * FecShop file.
  4. *
  5. * @link http://www.fecshop.com/
  6. *
  7. * @copyright Copyright (c) 2016 FecShop Software LLC
  8. * @license http://www.fecshop.com/license/
  9. */
  10. return [
  11. 'shipping' => [
  12. // Shipping的运费,是表格的形式录入,shippingCsvDir是存放运费表格的文件路径。
  13. 'shippingCsvDir' => '@common/config/shipping',
  14. 'volumeWeightCoefficient' => 5000,
  15. 'shippingConfig' => [
  16. 'free_shipping'=> [ // 免运费
  17. 'label'=> 'Free shipping( 7-20 work days)',
  18. 'name' => 'HKBRAM',
  19. 'formula' => '0', // 这里填写公式,该值代表免邮。
  20. // 国家限制,当国家限制不满足,则该物流不可用 (如果没有国家限制可以去掉)
  21. 'country' => [ // 这里填写(允许|不允许)使用的国家简码,如果您没有这方面的约束,请去掉,去掉后代表没有任何约束
  22. 'type' => 'allow', // allow代表只允许下面的国家使用该shipping,not_allow代表不允许下面国家使用该shipping
  23. 'code' => [
  24. 'CN',
  25. 'US',
  26. ]
  27. ],
  28. // 重量限制,当重量超出这个范围,该物流将不可用 (如果没有重量限制可以去掉)
  29. 'weight' => [
  30. 'min' => 0,
  31. 'max' => 100,
  32. ],
  33. ],
  34. 'middle_shipping'=> [ // xxx shipping
  35. 'label'=> 'middle shipping( 6-15 work days)',
  36. 'name' => 'HKBRAM',
  37. 'formula' => '[weight] * 0.5', // 这里填写公式
  38. // 对于国家和重量限制,如果没有,则不用填写,如果有,参考上面的样式填写
  39. ],
  40. 'fast_shipping'=> [
  41. 'label'=> 'Fast Shipping( 5-10 work days)',
  42. 'name' => 'HKDHL',
  43. 'formula' => 'csv', // 请将文件名字的命名写入,譬如: fast_shipping.csv
  44. 'csv_content' => '', // 这个由shipping动态从文件中获取内容
  45. // 对于国家和重量限制,如果没有,则不用填写,如果有,参考上面的样式填写
  46. ],
  47. ],
  48. /** 该配置废弃,因为默认的shipping method,可能是不满足条件的。
  49. * 目前的default shipping method,从 可用物流数组 中取第一个作为 默认物流。
  50. * 该值必须在上面的配置 $shippingConfig中存在,如果不存在,则返回为空。
  51. */
  52. //'defaultShippingMethod' => [
  53. // 'enable' => true, // 如果值为true,那么用户在cart生成的时候,就会填写上默认的货运方式。
  54. // 'shipping' => 'fast_shipping',
  55. //],
  56. ],
  57. ];