ECSHOP后台管理里的“打印订单" 页面里的商品排序有点乱,现在想改成按序号来排序,修改方法如下8 t1 Y' v0 J9 |* q3 _$ I
9 t! @# }- r1 m: q) Q; o7 \下面是在2.7.2基础上做的修改
7 ~8 A/ L. | Y! ^! E' b3 L/ [* ~2 P% { ~3 i
打开 admin/order.php 文件
; t( r0 Y* \; S$ d# t* u$ x
J6 S3 s- l0 d7 D$ ~* X找到(大约在311行左右)3 j6 P6 k# N5 ]4 U, y
( {# l! ^0 l) s1 U
$sql = "SELECT o.*, IF(o.product_id > 0, p.product_number, g.goods_number) AS storage, o.goods_attr, g.suppliers_id, IFNULL(b.brand_name, '') AS brand_name, p.product_sn
- J9 ?7 Y, z- T6 e" G FROM " . $ecs->table('order_goods') . " AS o9 E1 N0 c" m6 {5 M5 c
LEFT JOIN " . $ecs->table('products') . " AS p9 ~' ?' E+ o" T& Z
ON p.product_id = o.product_id
# k. w3 G, P# r! O LEFT JOIN " . $ecs->table('goods') . " AS g, x6 e/ d$ H9 H" b: F n1 S
ON o.goods_id = g.goods_id
7 w% U6 s7 f0 c) s9 ] K LEFT JOIN " . $ecs->table('brand') . " AS b
; d. O* [" ^9 \: r3 q* u6 I ON g.brand_id = b.brand_id
& }8 V3 N+ s6 I' ~7 z+ R* y WHERE o.order_id = '$order[order_id]'"; | # x/ t6 z/ r! h" b; m& h
$ f) U" s8 n( a3 o- P修改为" X! x4 Y6 _5 E. n/ j: n
% V" G; x" c( \& [1 H, ]3 N
这样修改以后就可以按照商品序号进行排序了7 n/ i% X7 r6 L
|