给商铺增加货运方式

删除旧的物流方式时,需要手工把ShipmentCostEstimate中Product Store Ship Meth Id对应的行记录删除,否则操作失败

增加快递时,下面以增加顺丰快递为例

运费计算公式:

  当需寄递物品实重大于材积时,运费计算方法为

  重量(公斤)×2×续重运费+首重运费-续重运费

  例如:5KG货品按首重RMB60、续重RMB30计算,则运费总额为

  5×2×30+60-30=330元RMB

  当需寄递物品实际重量小而体积较大,运费需按材积标准收取,然后再按上列公式计算运费总额。求取材积公式如下:

  规则物品 长(cm)×宽(cm)×高(cm)÷6000=重量(KG)

  不规则物品 最长(cm)×最宽(cm)×最高(cm) ÷6000重量(KG)

在Ofbiz中操作步骤如下:

1、在Party中新增一个会员组,命名为顺丰快递,角色选为Carrier。

2、在目录-货运的承运商运输方法中增加会员和运输类型的对应关系。

3、在店铺的送货中增加一行顺丰快递,其中网关可以不选,网关是用来在线生成物流单号或计算费用时使用的,中最大最小的数值是用来做适配限定的,即当商品的重量、体积未在该范围内时,发货方式不会显示这一行.

4、计算运费时,会执行自定义方法和系统的calcShipmentCostEstimate服务。

自定义方法中可使用的参数为:返回结果为:shippingEstimateAmount

Map<String, Object> serviceFields = new HashMap<String, Object>();
        serviceFields.put("initialEstimateAmt", shippingTotal);
        serviceFields.put("shippableTotal", shippableTotal);
        serviceFields.put("shippableQuantity", shippableQuantity);
        serviceFields.put("shippableWeight", shippableWeight);
        serviceFields.put("shippableItemInfo", itemInfo);
        serviceFields.put("productStoreId", productStoreId);
        serviceFields.put("carrierRoleTypeId", "CARRIER");
        serviceFields.put("carrierPartyId", carrierPartyId);
        serviceFields.put("shipmentMethodTypeId", shipmentMethodTypeId);
        serviceFields.put("shippingContactMechId", shippingContactMechId);
        serviceFields.put("shippingOriginContactMechId", shippingOriginContactMechId);
        serviceFields.put("partyId", partyId);
        serviceFields.put("productStoreShipMethId", productStoreShipMethId);

        context.put("serviceConfigProps", configProps);
        context.put("shipmentCustomMethodId", shipmentCustomMethodId);
        context.put("shipmentGatewayConfigId", shipmentGatewayConfigId);

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值