后台订单信息和打印订单页面,将商品列表按货号排列

2016-07-07 15:00 来源:www.chinab4c.com 作者:ecshop专家

刚刚回复了一位朋友的类似问题,感觉还有点价值
故整理下,共享了出来

1、2.7.0版本的修改方法

打开 admin/order.php文件(大约在310行左右)
  1. $sql = "SELECT o.*, g.goods_number AS storage, o.goods_attr, IFNULL(b.brand_name, '') AS
  2. brand_name " .
  3. "FROM " . $ecs->table('order_goods') . " AS o ".
  4. "LEFT JOIN " . $ecs->table('goods') . " AS g ON o.goods_id = g.goods_id " .
  5. "LEFT JOIN " . $ecs->table('brand') . " AS b ON g.brand_id = b.brand_id " .
  6. "WHERE o.order_id = '$order[order_id]' ";
复制代码
修改为
  1. $sql = "SELECT o.*, g.goods_number AS storage, g.goods_sn, o.goods_attr, IFNULL(b.brand_name, '') AS
  2. brand_name " .
  3. "FROM " . $ecs->table('order_goods') . " AS o ".
  4. "LEFT JOIN " . $ecs->table('goods') . " AS g ON o.goods_id = g.goods_id " .
  5. "LEFT JOIN " . $ecs->table('brand') . " AS b ON g.brand_id = b.brand_id " .
  6. "WHERE o.order_id = '$order[order_id]' order by g.goods_sn";
复制代码
就可以了

2、2.7.1版本的修改方法

  1. $sql = "SELECT o.*, g.goods_number AS storage, o.goods_attr, g.suppliers_id, IFNULL(b.brand_name, '') AS
  2. brand_name " .
  3. "FROM " . $ecs->table('order_goods') . " AS o ".
  4. "LEFT JOIN " . $ecs->table('goods') . " AS g ON o.goods_id = g.goods_id " .
  5. "LEFT JOIN " . $ecs->table('brand') . " AS b ON g.brand_id = b.brand_id " .
  6. "WHERE o.order_id = '$order[order_id]' ";
复制代码
修改为
  1. $sql = "SELECT o.*, g.goods_number AS storage, g.goods_sn, o.goods_attr, g.suppliers_id, IFNULL(b.brand_name, '') AS
  2. brand_name " .
  3. "FROM " . $ecs->table('order_goods') . " AS o ".
  4. "LEFT JOIN " . $ecs->table('goods') . " AS g ON o.goods_id = g.goods_id " .
  5. "LEFT JOIN " . $ecs->table('brand') . " AS b ON g.brand_id = b.brand_id " .
  6. "WHERE o.order_id = '$order[order_id]' order by g.goods_sn ";
复制代码

回答:
支持一下

有木有2.72版的修改方法???

如何在打印訂單添加會員等級和電子郵件'?

先谢过楼主分享经验,虽然现在用不上