打开文件 uploadincludeslib_order.php

找到函数function order_goods

修改代码

阿里云-推广AD

return $GLOBALS[‘db’]->getAll($sql);

为如下:

$arr = $GLOBALS[‘db’]->getAll($sql);

foreach ($arr as $key => $value)
{
/* 查询图片 */
$sql = “SELECT goods_thumb FROM ” . $GLOBALS[‘ecs’]->table(‘goods’) . ” WHERE
goods_id=” . $value[‘goods_id’];
$arr[$key][‘goods_thumb’] = $GLOBALS[‘db’]->GetOne($sql);
}

return $arr;

然后保存,在模板中调用

<img src=”{$goods.goods_thumb}” width=”60″ height=”60″ />