感觉在商品列表这块有一个缩略图,在管理商品的时候会比较直观些。
修改一:admin/includes/lib_goods.php
sql = “SELECT goods_id, goods_name, goods_sn, shop_price, goods_thumb, is_on_sale, is_best, is_new, is_hot, goods_number, integral, ” .
” (promote_price > 0 AND promote_start_date <= ‘$today’ AND promote_end_date >= ‘$today’) AS is_promote “.
” FROM ” . $GLOBALS['ecs']->table(’goods’) . ” AS g WHERE is_delete=’$is_delete’ $where” .
” ORDER BY $filter[sort_by] $filter[sort_order] “.
” LIMIT ” . $filter['start'] . “,$filter[page_size]“;
在此sql中,增加goods_thumb 这个字段。
修改二:admin/templates/goods_list.htm
<td><input type=”checkbox” name=”checkboxes[]” value=”{$goods.goods_id}” />{$goods.goods_id}<img src=”../{$goods.goods_thumb}”></td>
$goods.goods_thumb 实际上就是缩略图的存放路径。
修改三 :将goods_list.html增加一列,在goods.php这个语言包内添加: $_LANG['goods_thumb'] = ‘商品缩略图‘;用于goods_list.html中。