Ecshop background Management in the "Print Order" page of the product sort a bit messy, now want to change to order by serial number, modify the method as follows
Here are the changes made on the basis of 2.7.2
Open admin/order.php File
Found (approximately 311 rows or so)
$sql = "Select O.*, if (o.product_id > 0, P.product_number, g.goods_number) as storage, o.goods_attr, g.suppliers_id, if NULL (B.brand_name, ") as Brand_Name, P.PRODUCT_SN From ". $ecs->table (' Order_goods '). "As O Left JOIN ". $ecs->table (' products '). "As P On p.product_id = o.product_id Left JOIN ". $ecs->table (' goods '). "As G On o.goods_id = g.goods_id Left JOIN ". $ecs->table (' brand '). "As B On g.brand_id = b.brand_id WHERE o.order_id = ' $order [order_id] ' "; |
Revision changed to
$sql = "Select O.*, if (o.product_id > 0, P.product_number, g.goods_number) as storage, o.goods_attr, g.suppliers_id, if NULL (B.brand_name, ") as Brand_Name, P.PRODUCT_SN From ". $ecs->table (' Order_goods '). "As O Left JOIN ". $ecs->table (' products '). "As P On p.product_id = o.product_id Left JOIN ". $ecs->table (' goods '). "As G On o.goods_id = g.goods_id Left JOIN ". $ecs->table (' brand '). "As B On g.brand_id = b.brand_id WHERE o.order_id = ' $order [order_id] ' ORDER by G.GOODS_SN ';
|
This will allow you to sort by product serial number.
Sorting items by item number in the Ecshop spool order page