国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁(yè) > 網(wǎng)站 > 建站經(jīng)驗(yàn) > 正文

解決ecshop訂單管理退貨時(shí),如何做到不退郵費(fèi)

2024-04-25 20:39:57
字體:
來(lái)源:轉(zhuǎn)載
供稿:網(wǎng)友

解決ecshop訂單管理退貨時(shí),如何做到不退郵費(fèi),提供相關(guān)ecshop教程如下:

打開(kāi)admin/order.php在大約4468行處找到

/**

* 退回余額、積分、紅包(取消、無(wú)效、退貨時(shí)),把訂單使用余額、積分、紅包設(shè)為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);

}

改成

/**

* 退回余額、積分、紅包(取消、無(wú)效、退貨時(shí)),把訂單使用余額、積分、紅包設(shè)為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);

}

就可以了

官方默認(rèn)的是退貨時(shí)把已付款退到會(huì)員的帳中戶,而退回的費(fèi)用中沒(méi)有減去

運(yùn)費(fèi)

支付手費(fèi)費(fèi)

包裝費(fèi)

如果ecshop退貨時(shí)不退運(yùn)費(fèi)應(yīng)是:

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

如果退貨時(shí)不退動(dòng)費(fèi)和支付的手費(fèi)費(fèi)應(yīng)是:

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

如果ecshop退貨時(shí)不退動(dòng)費(fèi)和支付的手費(fèi)費(fèi)及包裝費(fèi)應(yīng)是:

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

以此類(lèi)推可以做到ecshop退貨時(shí)不退其它費(fèi)

發(fā)表評(píng)論 共有條評(píng)論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 佛山市| 大厂| 呼和浩特市| 东城区| 石河子市| 汉沽区| 佛学| 洛宁县| 宣恩县| 沾益县| 寿宁县| 拜泉县| 五寨县| 绿春县| 行唐县| 宝兴县| 抚顺县| 崇明县| 临潭县| 汉沽区| 葫芦岛市| 和平区| 伊宁县| 法库县| 安西县| 永修县| 侯马市| 莎车县| 新民市| 新疆| 前郭尔| 伊通| 福清市| 司法| 盐池县| 沛县| 胶南市| 方山县| 浦北县| 石河子市| 大竹县|