订单里面的商品顺序

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



我想让我的订单里面的商品按照商品的名称排序,
我查了很多帖子说是在admin/order.php修改代码
可是我不知道在哪行修改, 不知道谁能否告知如果操作,谢谢
先谢过了

回答:
order by googs_name

昨天就看到了你的帖子,由于忙,没来得及回复
修改 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, 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_name";
复制代码

楼上的, 太感谢你了,谢谢 谢谢