覺在商品列表這塊有一個縮略圖,在管理商品的時候會比較直觀些。
修改一: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中。