后台商品修改配送费未重新计算BUG

2016-07-07 15:04 来源:www.chinab4c.com 作者:ecshop专家



源代码部分
/* 更新商品总金额和订单总金额 */
  1. $goods_amount = order_amount($order_id);
  2. update_order($order_id, array('goods_amount' => $goods_amount));
  3. update_order_amount($order_id);
复制代码
替换为
/* 取得订单信息 */
  1. $region_id_list = array($old_order['country'], $old_order['province'], $old_order['city'], $old_order['district']);

  2. /* 保存订单 */
  3. $shipping_id = $old_order['shipping_id'];
  4. $shipping = shipping_area_info($shipping_id, $region_id_list);
  5. $weight_amount = order_weight_price($order_id);
  6. $shipping_fee = shipping_fee($shipping['shipping_code'], $shipping['configure'], $weight_amount['weight'], $weight_amount['amount'], $weight_amount['number']);

  7. /* 更新商品总金额和订单总金额 */
  8. $goods_amount = order_amount($order_id);

  9. $order = array(
  10. 'shipping_fee' => $shipping_fee,
  11. 'goods_amount' => $goods_amount
  12. );

  13. update_order($order_id, $order);
  14. update_order_amount($order_id);
复制代码
后台order.php 590 行左右

回答:
顶一下,支持

顶一下,支持