给ECSHOP后台订单列表加上显示会员等级

1、打开修改admin/order.php文件,找到如下代码:
        $sql = "SELECT o.order_id, o.order_sn, o.add_time, o.order_status, o.shipping_status, o.order_amount, o.money_paid," .
                    "o.pay_status, o.consignee, o.address, o.email, o.tel, o.extension_code, o.extension_id, " .
                    "(" . order_amount_field('o.') . ") AS total_fee, " .
                  NULLer_name, '" .$GLOBALS['_LANG']['anonymous']. "') AS buyer ".
                " FROM " . $GLOBALS['ecs']->table('order_info') . " AS o " .
                " LEFT JOIN " .$GLOBALS['ecs']->table('users'). " AS u ON u.user_id=o.user_id ". $where .
                " ORDER BY $filter[sort_by] $filter[sort_order] ".
                " LIMIT " . ($filter['page'] - 1) * $filter['page_size'] . ",$filter[page_size]";
将以上这段代码修改为如下的代码:
        $sql = "SELECT o.order_id, o.order_sn, o.add_time, o.order_status, o.shipping_status, o.order_amount, o.money_paid, ur.rank_name," .
                    "o.pay_status, o.consignee, o.address, o.email, o.tel, o.extension_code, o.extension_id, " .
                    "(" . order_amount_field('o.') . ") AS total_fee, " .
                    "IFNULL(u.user_name, '" .$GLOBALS['_LANG']['anonymous']. "') AS buyer ".
                " FROM " . $GLOBALS['ecs']->table('order_info') . " AS o " .
                " LEFT JOIN " .$GLOBALS['ecs']->table('users'). " AS u ON u.user_id=o.user_id LEFT JOIN ". $GLOBALS['ecs']->table('user_rank'). " AS ur ON u.user_rank = ur.rank_id ". $where .
                " ORDER BY $filter[sort_by] $filter[sort_order] ".
                " LIMIT " . ($filter['page'] - 1) * $filter['page_size'] . ",$filter[page_size]";
2、打开修改admin/templates/order_list.htm文件,找到如下代码:
{$order.buyer|escape}
在以上这段代码的后面添加以下代码:
/{ if $order.rank_name}{$order.rank_name|escape}{else}非特殊等级{/if}
按照我们以上提供教程步骤修改后即可实现ECSHOP后台订单列表显示会员等级功能

本文原创地址:https://www.ecshop.cx/article-225.html
版权所有 © 转载时必须以链接形式注明出处!

觉得本文对您有用,想收藏下来!方法很简单:请点击-〉
我们一直坚持白天工作、晚上熬夜更新资源,付出了巨大的精力和时间,其中的辛酸难以言述。

实时购买动态 ×

誰浍婄ωǒ菿Zùi後会员 在 2019-07-22 购买了 ECSHOP Authorize.Net信用卡支付插件