ecshop会员中心不显示等级
ecshop会员中心不显示会员等级我问过人别人说地址错误了!我该怎么修复?账号隔壁的等级不显示是不是地址错了?正常显示是这样的我该修改哪里?那个文件那个代码恢复显示用DW...
ecshop会员中心不显示会员等级 我问过人 别人说地址错误了!我该怎么修复?
账号隔壁的等级不显示
是不是地址错了?
正常显示是这样的
我该修改哪里?那个文件那个代码恢复显示 用DW可以吗 展开
账号隔壁的等级不显示
是不是地址错了?
正常显示是这样的
我该修改哪里?那个文件那个代码恢复显示 用DW可以吗 展开
- 你的回答被采纳后将获得:
- 系统奖励15(财富值+成长值)+难题奖励10(财富值+成长值)+提问者悬赏30(财富值+成长值)
2个回答
展开全部
/includes/lib_clips.php文件中搜索如下代码
$sql = "SELECT pay_points, user_money, credit_line, last_login, is_validated FROM " .$GLOBALS['ecs']->table('users'). " WHERE user_id = '$user_id'";
改成
$sql = "SELECT pay_points, user_money, user_rank, credit_line, last_login, is_validated FROM " .$GLOBALS['ecs']->table('users'). " WHERE user_id = '$user_id'";
然后在后面继续插入代码
if($row['user_rank']=='0') {
$sql2 = "SELECT b.rank_name as userrank FROM ". $GLOBALS['ecs']->table('users') ." as a,".$GLOBALS['ecs']->table('user_rank')." as b WHERE a.rank_points > b.min_points AND a.rank_points < b.max_points AND a.user_id = '$user_id'";
}else {
$user_rank = $row['user_rank'];
$sql2 = "SELECT b.rank_name as userrank FROM ". $GLOBALS['ecs']->table('users') ." as a,".$GLOBALS['ecs']->table('user_rank')." as b WHERE a.user_rank = b.rank_id AND a.user_id = '$user_id'";
}
$row2 = $GLOBALS['db']->getRow($sql2);
再找到下面代码
$info = array();
$info['username'] = $_SESSION['user_name'];
$info['shop_name'] = $GLOBALS['_CFG']['shop_name'];
$info['integral'] = $row['pay_points'] . $GLOBALS['_CFG']['integral_name'];
下面插入
if ($row2['userrank'] != null){
$info['userrank'] = $row2['userrank'];}
else {
$info['userrank'] = "普通会员";
}
/themes/当前模板/user_clips.dwt写入相应位置加入:
<font class="f1">您的会员级别为:<strong>{$info.userrank}</strong> {$rank_name} {$next_rank_name}</font>
更新缓存,刷新用户中心,就能看到效果了,我这边就不贴图了。
$sql = "SELECT pay_points, user_money, credit_line, last_login, is_validated FROM " .$GLOBALS['ecs']->table('users'). " WHERE user_id = '$user_id'";
改成
$sql = "SELECT pay_points, user_money, user_rank, credit_line, last_login, is_validated FROM " .$GLOBALS['ecs']->table('users'). " WHERE user_id = '$user_id'";
然后在后面继续插入代码
if($row['user_rank']=='0') {
$sql2 = "SELECT b.rank_name as userrank FROM ". $GLOBALS['ecs']->table('users') ." as a,".$GLOBALS['ecs']->table('user_rank')." as b WHERE a.rank_points > b.min_points AND a.rank_points < b.max_points AND a.user_id = '$user_id'";
}else {
$user_rank = $row['user_rank'];
$sql2 = "SELECT b.rank_name as userrank FROM ". $GLOBALS['ecs']->table('users') ." as a,".$GLOBALS['ecs']->table('user_rank')." as b WHERE a.user_rank = b.rank_id AND a.user_id = '$user_id'";
}
$row2 = $GLOBALS['db']->getRow($sql2);
再找到下面代码
$info = array();
$info['username'] = $_SESSION['user_name'];
$info['shop_name'] = $GLOBALS['_CFG']['shop_name'];
$info['integral'] = $row['pay_points'] . $GLOBALS['_CFG']['integral_name'];
下面插入
if ($row2['userrank'] != null){
$info['userrank'] = $row2['userrank'];}
else {
$info['userrank'] = "普通会员";
}
/themes/当前模板/user_clips.dwt写入相应位置加入:
<font class="f1">您的会员级别为:<strong>{$info.userrank}</strong> {$rank_name} {$next_rank_name}</font>
更新缓存,刷新用户中心,就能看到效果了,我这边就不贴图了。
追问
就这样可以了?
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
这个一般不会正常显示的啦,可以进行 代码调整就好了
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询