ECSHOP后台会员列表中加上会员等级

2016-09-02 16:28 来源:www.chinab4c.com 作者:ecshop专家

1、打开修改admin/order.php文件,找到如下代码: $sql = \"SELECT user_id, user_name, email, is_validated, user_money, frozen_money, rank_points, pay_points, reg_time \". \" FROM \" . $GLOBALS[\'ecs\']->table(\'users\') . $ex_where . \" ORDER by \" . $filter[\'sort_by\'] . \' \' . $filter[\'sort_order\'] . \" LIMIT \" . $filter[\'start\'] . \',\' . $filter[\'page_size\']; 将以上这段代码修改为如下的代码: $sql = \"SELECT user_id, user_name, email, is_validated, user_money, frozen_money, rank_points, pay_points, reg_time, r.rank_name \". \" FROM \" . $GLOBALS[\'ecs\']->table(\'users\') . \" as u \". \" LEFT JOIN \" . $GLOBALS[\'ecs\']->table(\'user_rank\') . \" AS r \". \" ON u.user_rank = r.rank_id \". $ex_where . \" ORDER by \" . $filter[\'sort_by\'] . \' \' . $filter[\'sort_order\'] . \" LIMIT \" . $filter[\'start\'] . \',\' . $filter[\'page_size\']; 继续找到如下代码: $user_list[$i][\'reg_time\'] = local_date($GLOBALS[\'_CFG\'][\'date_format\'], $user_list[$i][\'reg_time\']); 在以上这段代码的后面添加以下代码: if ($user_list[$i][\'rank_name\'] == \'\') { $user_list[$i][\'rank_name\'] = \"非特殊会员\"; } 2、打开修改admin/templates/users_list.htm文件,找到如下代码: {$user.user_name|escape} 在以上这段代码的后面添加以下代码:
{$user.rank_name} 按照我们以上提供教程步骤修改后即可实现ECSHOP后台会员列表显示会员等级功能