用ecshop的时候想为每个会员的提现增加一个手续费,需要涉及修改的文件为 user.php 和 lib_clips.php 二个文件 cwV]!=RtO
1.首先打开includes/lib_clips.php文件,在最后的 ?> 上面加入如下代码 $wYFEz
/** !a$ D4(`v
* 查询会员手续费 @Tfl>/%
* @access public :R.&`4=X
* @param int $user_id 会员ID y$<Vha
* @return int <W]g2>9o9
*/ 2YuN~-
function get_user_shouxufei($user_id) nL:SG{7
{ 8QK5z;E2~
$sql = "SELECT home_phone FROM " .$GLOBALS['ecs']->table('users'). Z/rTVAs@r
" WHERE user_id = '$user_id'"; 6oSQQhge
wv^rS^~
return $GLOBALS['db']->getOne($sql); a}Sd W
} 4 g.
bR
2.打开user.php文件,搜索如下代码: L !4t[hhe=
//插入会员账目明细 g]UBZ33y
$amount = '-'.$amount; B^D(5
$surplus['payment'] = ''; :R):b
$surplus['rec_id'] = insert_user_account($surplus, $amount); V0nn4dVO
将以上代码修改为如下: Hx$c
N
//插入会员账目明细
_if|TFw;h
$amount = '-'.$amount; _ .i3,-l)
$surplus['payment'] = ''; ~"Gf<3^y+
$shouxufei = get_user_shouxufei($user_id); A|}l)!%
$surplus['rec_id'] = insert_user_account($surplus, $amount*$shouxufei); l:]Nn%U(>
这样后台会员家庭电话里面填写的值就可以代表手续费了,大家可以按这个思路改