分类分类
更新时间:2026-05-10 23:44:56作者:fang
解决ecshop订单管理退货时,如何做到不退邮费,提供相关ecshop教程如下:
打开admin/order.php在大约4468行处找到
/**
* 退回余额、积分、红包(取消、无效、退货时),把订单使用余额、积分、红包设为0
* @param array $order 订单信息
*/
function return_user_surplus_integral_bonus($order)
{
/* 处理余额、积分、红包 */
if ($order['user_id'] > 0 && $order['surplus'] > 0)
{
$surplus = $order['money_paid'] < 0 ? $order['surplus'] + $order['money_paid']: $order['surplus'];
log_account_change($order['user_id'], $surplus, 0, 0, 0, sprintf($GLOBALS['_LANG']['return_order_surplus'], $order['order_sn']));
$GLOBALS['db']->query("UPDATE ". $GLOBALS['ecs']->table('order_info') . " SET `order_amount` = '0' WHERE `order_id` =". $order['order_id']);
}
if ($order['user_id'] > 0 && $order['integral'] > 0)
{
log_account_change($order['user_id'], 0, 0, 0, $order['integral'], sprintf($GLOBALS['_LANG']['return_order_integral'], $order['order_sn']));
}
if ($order['bonus_id'] > 0)
{
unuse_bonus($order['bonus_id']);
}
/* 修改订单 */
$arr = array(
'bonus_id' => 0,
'bonus' => 0,
'integral' => 0,
'integral_money' => 0,
'surplus' => 0
);
update_order($order['order_id'], $arr);
}
改成
/**
* 退回余额、积分、红包(取消、无效、退货时),把订单使用余额、积分、红包设为0
* @param array $order 订单信息
*/
function return_user_surplus_integral_bonus($order)
{
/* 处理余额、积分、红包 */
if ($order['user_id'] > 0 && $order['surplus'] > 0)
{
$surplus = $order['money_paid'] < 0 ? $order['surplus'] + $order['money_paid']-$order['shipping_fee'] : $order['surplus'];
log_account_change($order['user_id'], $surplus, 0, 0, 0, sprintf($GLOBALS['_LANG']['return_order_surplus'], $order['order_sn']));
$GLOBALS['db']->query("UPDATE ". $GLOBALS['ecs']->table('order_info') . " SET `order_amount` = '0' WHERE `order_id` =". $order['order_id']);
}
if ($order['user_id'] > 0 && $order['integral'] > 0)
{
log_account_change($order['user_id'], 0, 0, 0, $order['integral'], sprintf($GLOBALS['_LANG']['return_order_integral'], $order['order_sn']));
}
if ($order['bonus_id'] > 0)
{
unuse_bonus($order['bonus_id']);
}
/* 修改订单 */
$arr = array(
'bonus_id' => 0,
'bonus' => 0,
'integral' => 0,
'integral_money' => 0,
'surplus' => 0
);
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退货时不退其它费
相关
修真情缘角色扮演303.33 MBv1.0.02026-05-10
下载我的小独角兽女孩休闲益智380.89 MBv1.0.232026-05-10
下载超级种田男孩手机版经营养成1.31Gv1.0.92026-05-10
下载不必要的实验冒险游戏64.9 MBv1.1.592026-05-10
下载军师联盟策略游戏163.2 MBv0.0.12026-05-10
下载翻天喜地凑大钱手机版休闲益智138.72 MBv1.0.92026-05-10
下载东离剑游纪手游动作射击1.6Gv1.4.22026-05-10
下载天猫养车商家版App学习办公74.95 MBv0.6.12026-05-10
下载掌上命运方舟App手游辅助137.48 MBv1.9.12026-05-10
下载退役军人服务APP生活服务67.16 MBv1.2.52026-05-10
下载屯漫漫画APP资讯阅读23.06 MBv2.0.32026-05-10
下载蛋仔派对蛋壳App手游辅助185.73 MBv0.0.22026-05-10
下载









