首页 > 运营 > 帮助中心 > 正文

ecshop后台商品列表显示商品缩略图

2019-10-16 21:44:17
字体:
来源:转载
供稿:网友
觉在商品列表这块有一个缩略图,在管理商品的时候会比较直观些。
修改一:admin/includes/lib_goods.php  约898行
$sql = "SELECT goods_id, goods_name, goods_type, goods_sn, shop_price, goods_thumb, is_on_sale, is_best, is_new, is_hot, sort_order, goods_number, integral, " .
                    " (promote_price > 0 AND promote_start_date <= '$today' AND promote_end_date >= '$today') AS is_promote ".
在此sql中,增加goods_thumb  这个字段。
修改二:admin/templates/goods_list.htm
在约20行增加     <th>{$lang.goods_thumb}</th>
约37行增加
<td><input type="checkbox" name="checkboxes[]" value="{$goods.goods_id}" />{$goods.goods_id}</td>
<td><img src="../{$goods.goods_thumb}"></td>
$goods.goods_thumb 实际上就是缩略图的存放路径。
修改三:在admin/goods.php这个语言包内添加:  $_LANG['goods_thumb'] = '商品缩略图';  用于goods_list.html中。
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表