百分百源码网-让建站变得如此简单! 登录 注册 签到领金币!

主页 | 如何升级VIP | TAG标签

当前位置: 主页>网站教程>Ecshop教程> 解决ecshop订单管理退货时,如何做到不退邮费
分享文章到:

解决ecshop订单管理退货时,如何做到不退邮费

发布时间:12/03 来源: 浏览: 关键词:

解决ecshop订单管理退货时,如何做到不退邮费,提供相关ecshop教程如下:

打开admin/order.php在大约4468行处找到

 

  1. /** 
  2. * 退回余额、积分、红包(取消、无效、退货时),把订单使用余额、积分、红包设为0 
  3. * @param   array   $order  订单信息 
  4. */ 
  5. function return_user_surplus_integral_bonus($order) 
  6.     /* 处理余额、积分、红包 */ 
  7.     if ($order['user_id'] > 0 && $order['surplus'] > 0) 
  8.     { 
  9.         $surplus = $order['money_paid'] < 0 ? $order['surplus'] + $order['money_paid']: $order['surplus']; 
  10.         log_account_change($order['user_id'], $surplus, 0, 0, 0, sprintf($GLOBALS['_LANG']['return_order_surplus'], $order['order_sn'])); 
  11.         $GLOBALS['db']->query("UPDATE ". $GLOBALS['ecs']->table('order_info') . " SET `order_amount` = '0' WHERE `order_id` =". $order['order_id']); 
  12.     } 
  13.  
  14.     if ($order['user_id'] > 0 && $order['integral'] > 0) 
  15.     { 
  16.         log_account_change($order['user_id'], 0, 0, 0, $order['integral'], sprintf($GLOBALS['_LANG']['return_order_integral'], $order['order_sn'])); 
  17.     } 
  18.  
  19.     if ($order['bonus_id'] > 0) 
  20.     { 
  21.         unuse_bonus($order['bonus_id']); 
  22.     } 
  23.  
  24.     /* 修改订单 */ 
  25.     $arr = array( 
  26.         'bonus_id'  => 0, 
  27.         'bonus'     => 0, 
  28.         'integral'  => 0, 
  29.         'integral_money'    => 0, 
  30.         'surplus'   => 0 
  31.     ); 
  32.     update_order($order['order_id'], $arr); 

改成

 

  1. /** 
  2. * 退回余额、积分、红包(取消、无效、退货时),把订单使用余额、积分、红包设为0 
  3. * @param   array   $order  订单信息 
  4. */ 
  5. function return_user_surplus_integral_bonus($order) 
  6.     /* 处理余额、积分、红包 */ 
  7.     if ($order['user_id'] > 0 && $order['surplus'] > 0) 
  8.     { 
  9.         $surplus = $order['money_paid'] < 0 ? $order['surplus'] + $order['money_paid']-$order['shipping_fee'] : $order['surplus']; 
  10.         log_account_change($order['user_id'], $surplus, 0, 0, 0, sprintf($GLOBALS['_LANG']['return_order_surplus'], $order['order_sn'])); 
  11.         $GLOBALS['db']->query("UPDATE ". $GLOBALS['ecs']->table('order_info') . " SET `order_amount` = '0' WHERE `order_id` =". $order['order_id']); 
  12.     } 
  13.  
  14.     if ($order['user_id'] > 0 && $order['integral'] > 0) 
  15.     { 
  16.         log_account_change($order['user_id'], 0, 0, 0, $order['integral'], sprintf($GLOBALS['_LANG']['return_order_integral'], $order['order_sn'])); 
  17.     } 
  18.  
  19.     if ($order['bonus_id'] > 0) 
  20.     { 
  21.         unuse_bonus($order['bonus_id']); 
  22.     } 
  23.  
  24.     /* 修改订单 */ 
  25.     $arr = array( 
  26.         'bonus_id'  => 0, 
  27.         'bonus'     => 0, 
  28.         'integral'  => 0, 
  29.         'integral_money'    => 0, 
  30.         'surplus'   => 0 
  31.     ); 
  32.     update_order($order['order_id'], $arr); 

 

 

就可以了

官方默认的是退货时把已付款退到会员的帐中户,而退回的费用中没有减去

运费

支付手费费

包装费

如果ecshop退货时不退运费应是:

$surplus = $order['money_paid'] < 0 ? $order['surplus'] + $order['money_paid'] - $order['shipping_fee']: $order['surplus'];

如果退货时不退动费和支付的手费费应是:

$surplus = $order['money_paid'] < 0 ? $order['surplus'] + $order['money_paid'] - $order['shipping_fee']- $order['pay_fee']: $order['surplus'];

如果ecshop退货时不退动费和支付的手费费及包装费应是:

$surplus = $order['money_paid'] < 0 ? $order['surplus'] + $order['money_paid'] - $order['shipping_fee']- $order['pay_fee']]- $order['pack_fee']: $order['surplus'];

以此类推可以做到ecshop退货时不退其它费

打赏

打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,你说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

百分百源码网 建议打赏1~10元,土豪随意,感谢您的阅读!

相关文章

共有7人阅读,期待你的评论!发表评论
昵称: 网址: 验证码: 点击我更换图片
最新评论

本文标签

广告赞助

能出一分力是一分吧!

订阅获得更多模板

本文标签

广告赞助

订阅获得更多模板