西部数码主机 | 阿里云主机| 虚拟主机 | 服务器 | 返回乐道官网
当前位置: 主页 > php教程 > ecshop教程 >

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

时间:2011-01-06 12:05来源:未知 作者:好模板 点击:
如何在ecshop后台定单详细里添加图片 admin/order.php 在admin/order.php文件里添加了一字段 (g.goods_thumb,), /* 取得订单商品 */ $goods_list = array(); $goods_attr = array(); $sql = SELECT o.*, g.goods_number AS sto

如何在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"/>
 
(责任编辑:好模板)
顶一下
(0)
0%
踩一下
(0)
0%
------分隔线----------------------------
栏目列表
热点内容