Ecshop用户中心的收藏列表里显示商品缩略图

1)、修改 includes/lib_clips.php 文件php

将下面代码html

$sql = 'SELECT g.goods_id, g.goods_name, g.market_price, g.shop_price AS org_price, '.

修改成sql

$sql = 'SELECT g.goods_id, g.goods_name,g.goods_thumb, g.market_price, g.shop_price AS org_price, '.

而后找到 下面代码post

$goods_list[$row['goods_id']]['rec_id']        = $row['rec_id'];

在它下面增长一行url

$goods_list[$row['goods_id']]['goods_thumb']        = get_image_path($row['goods_id'], $row['goods_thumb'], true);

2)、而后修改模板文件,这里以 官方默认模板为例进行讲解。code

打开 /themes/default/user_clips.dwt 文件htm

找到ip

<th width="35%" bgcolor="#ffffff">{$lang.goods_name}</th>

在它上边增长get

<th  bgcolor="#ffffff">缩略图</th>

继续找到io

<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>

3)、大功告成


转载自:http://www.9958.pw/post/ecshop_collection_pic

相关文章
相关标签/搜索