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

2016-09-02 16:28 来源:www.chinab4c.com 作者: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, \" . \"INULLu.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 \". $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后台订单列表显示会员等级功能