服务报价 | 域名主机 | 网络营销 | 软件工具| [加入收藏]
 热线电话: #
当前位置: 主页 > php教程 > ecshop教程 >

修改ecshop推荐注册赠送的等级积分修改为消费积

时间:2011-07-28 11:11来源:未知 作者:最模板 点击:
ecshop推荐注册,默认的是赠送等级积分,特殊情况下需要将赠送的等级积分修改为消费积分。 最模板修改如下: 1、打开文件: includes/lib_passport.php 2、找到下面代码: // 推荐开关开启

 ecshop推荐注册,默认的是赠送等级积分,特殊情况下需要将赠送的等级积分修改为消费积分。

 

最模板修改如下:

1、打开文件:includes/lib_passport.php

2、找到下面代码:

 // 推荐开关开启
 $up_uid     = get_affiliate();
 empty($affiliate) && $affiliate = array();
 $affiliate['config']['level_register_all'] = intval($affiliate['config']['level_register_all']);
 $affiliate['config']['level_register_up'] = intval($affiliate['config']['level_register_up']);
 if ($up_uid)
 {
  if (!empty($affiliate['config']['level_register_all']))
  {
   if (!empty($affiliate['config']['level_register_up']))
   {
    $rank_points = $GLOBALS['db']->getOne(”SELECT rank_points FROM ” . $GLOBALS['ecs']->table(’users’) . ” WHERE user_id = ‘$up_uid’”);
    if ($rank_points + $affiliate['config']['level_register_all'] <= $affiliate['config']['level_register_up'])
    {
     log_account_change($up_uid, 0, 0, $affiliate['config']['level_register_all'], 0, sprintf($GLOBALS['_LANG']['register_affiliate'], $_SESSION['user_id'], $username));
    }
   }
   else
   {
    log_account_change($up_uid, 0, 0, $affiliate['config']['level_register_all'], 0, $GLOBALS['_LANG']['register_affiliate']);
   }
}

代码中:0,0,$affiliate['config']['level_register_all'],0 这上面的数字分别表示:可用资金、冻结资金、等级积分、消费积分,因此修改为:0,0,0,$affiliate['config']['level_register_all'],即可实现。

(责任编辑:最模板)
顶一下
(4)
100%
踩一下
(0)
0%
------分隔线----------------------------