优惠全部云服务器首月 8 折,优惠码 CLOUD去领取

增加ecshop订单打印页显示商品缩略图

· 阅读约 1 分钟

ecshop后台打印订单的时候,打印订单页显示商品的缩略图,这样商品就更加一目了然了。

首先,打开admin/order.php 

$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, ”)   

添加一个字段 g.goods_thumb

修改为

 $sql = “SELECT o.*, IF(o.product_id > 0, p.product_number, g.goods_number) AS storage,g.goods_thumb, o.goods_attr, g.suppliers_id, IFNULL(b.brand_name, ”)

如图所示,结果是

然后打开订单模板文件,data/order_print.html 这个文件 

搜索 <td>&nbsp;{$goods.goods_name}<!– 商品名称 –>  然后下面添加

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

这样订单预览,你就可以看到商品的缩略图了。

相关文章

更多「网站和优化」文章服务器使用指南