修改 includes/lib_clips.php 文件
將下面代碼
$sql = 'SELECT g.goods_id, g.goods_name, g.market_price, g.shop_price AS org_price, '.
修改為$sql = 'SELECT g.goods_id, g.goods_name,g.goods_thumb, g.market_price, g.shop_price AS org_price, '.
然后找到 下面代碼
$goods_list[$row['goods_id']]['rec_id'] = $row['rec_id'];
在它下面增加一行
$goods_list[$row['goods_id']]['goods_thumb'] = get_image_path($row['goods_id'], $row['goods_thumb'], true);
然后修改模板文件,這里以 官方默認模板為例進(jìn)行講解。
打開(kāi) /themes/default/user_clips.dwt 文件
找到
<th width="35%" bgcolor="#ffffff">{$lang.goods_name}</th>
在它上邊增加
<th bgcolor="#ffffff">縮略圖</th>
繼續找到
<td bgcolor="#ffffff"><a href="{$goods.url}" class="f6">{$goods.goods_name|escape:html}</a></td>
在它上邊增加
<td bgcolor="#ffffff"><a href="{$goods.url}" ><img src="{$goods.goods_thumb}" width="100" height="100"></a></td>
完成。
聯(lián)系客服