zoukankan      html  css  js  c++  java
  • ecshop“发货查询”中加入收货人、收货地址、发货时间、配送方式

    1、修改 index.php 的 index_get_invoice_query() 函数部分
    将 

    1. $sql = 'SELECT o.order_sn, o.invoice_no, s.shipping_code FROM ' . $GLOBALS['ecs']->table('order_info') . ' AS o' .
    修改为

    1. $sql = 'SELECT o.order_sn, o.invoice_no, s.shipping_code,o.consignee, from_unixtime(o.shipping_time,\'%Y-%m-%d %H:%i:%s\') as shippingtime,o.shipping_name, r.region_name AS province FROM ' . $GLOBALS['ecs']->table('order_info') . ' AS o' .
    紧接着在

    1. ' LEFT JOIN ' . $GLOBALS['ecs']->table('shipping') . ' AS s ON s.shipping_id = o.shipping_id' .
    这行代码下面增加一行

    1. ' LEFT JOIN ' . $GLOBALS['ecs']->table('region') . ' AS r ON r.region_id = o.province' .
    2、然后修改模板文件 library/invoice_query.lbi



    1. {$lang.order_number} {$invoice.order_sn}<br />
    2. {$lang.consignment} {$invoice.invoice_no}<br />
    下面增加

    1. <br>收货人:{$invoice.consignee}
    2. <br>收货地址:{$invoice.province}
    3. <br>发货时间:{$invoice.shippingtime}
    4. <br>配送方式:{$invoice.shipping_name}
    3、以上方法是完全显示收货人的全称,如果想要以“王**”、“李**”的形式来显示的话,继续进行下面修改继续修改修改index.php的 index_get_invoice_query() 函数部分


    1. $all[$key]['invoice_no'] = $shipping->query((string)$row['invoice_no']);
    下面增加一行

    1. $all[$key]['consignee']=sub_str($row['consignee'], 1, false).'**';
    修改提示


    订单号调用o.order_sn字段
    发货单号调用o.invoice_no字段
    收货人调用o.consignee字段
    收货地址调用r.region_name AS province 字段
    发货时间from_unixtime(o.shipping_time,\'%Y-%m-%d %H:%i:%s\') as shippingtime字段
    配送方式o.shipping_name字段

    如果想要以“王四*”则调用
    1. $all[$key]['consignee']=sub_str($row['consignee'], 2, false).'*';
    如果想要以
    “王**”则调用
    1. $all[$key]['consignee']=sub_str($row['consignee'], 1, false).'**';
    ------------------------------------------华丽丽的分割线--------------------- ------------------------------------

    源厂制造10-10000级洁净无尘车间防静电防尘用品!网址:http://www.lgfjd.com 微信号:614412
  • 相关阅读:
    数据库事务(Transaction)
    取余与取模运算区别
    HashMap与HashTable的区别
    Linux下运行命令出现is not in the sudoers file的问题
    Redis 安装及入门
    Maven本地仓库在C盘下无法自动下载相关依赖的问题
    修改从Maven中心仓库下载到本地的jar包的默认存储位置及远程仓库
    CentOS7使用firewalld管理防火墙与端口
    同时安装Python2,Python3如何解决冲突问题【官方解法】
    数据库查询字段带有特殊字符时报错的问题
  • 原文地址:https://www.cnblogs.com/wangblognet/p/2964551.html
Copyright © 2011-2022 走看看