如何在ecshop后台定单详细里添加图片

2016-09-07 22:03 来源:www.chinab4c.com 作者:ecshop专家

如何在ecshop后台定单详细里添加图片

 admin/order.php

 
在admin/order.php文件里添加了一字段 (g.goods_thumb,), 
 
 
/* 取得订单商品 */
    $goods_list = array();
    $goods_attr = array();
    $sql = "SELECT o.*, g.goods_number AS storage, o.goods_attr, IFNULL(b.brand_name, '') AS brand_name " .
            "FROM " . $ecs->table('order_goods') . " AS o ".
            "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]' ";
    $res = $db->query($sql);
    while ($row = $db->fetchRow($res))
 
 
     $sql = "SELECT o.*, g.goods_thumb, g.goods_number AS storage, o.goods_attr, IFNULL
 
(b.brand_name, '') AS brand_name " .
            "FROM " . $ecs->table('order_goods') . " AS o ".
            "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]' ";
 
在g.goods_number前加g.goods_thumb,
 
 
最后 order_info.htm 引用
 
<img src="/{$goods.goods_thumb}" width="100"/>
 
(责任编辑:chinab4c)