/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> |
更新缓存,刷新用户中心,就能看到效果了,我这边就不贴图了。
发表评论:
◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。
相关文章
ecshop出现Warning: Invalid argument supplied for foreach()错误2019-02-26
Ecshop 分类页产品列表不同分类调用不同产品属性2018-03-08
ECSHOP商品属性调用到任意页面方法2018-03-01
ECSHOP商品列表页显示每个商品的品牌2018-02-28
Ecshop 分类页品牌调用商品数量2018-02-28
ecshop调整默认商品图片排序2018-02-27
ecshop各个页面调用商品销售量方法2016-09-23
ecshop mobile首页循环显示分类及分类下商品2016-09-23
ecshop后台添加虚拟销量以及前台显示销量2016-09-22
ecshop重新导入数据库,管理员和密码正确登录失败2016-09-21