关于在ECSHOP首页的精品/新品/热销里显示商家备注

2016-09-11 20:39 来源:www.chinab4c.com 作者:ecshop专家


问题:

我想将后台编辑商品时录入的“商家备注”信息显示在ECSHOP商城首页的“精品推荐/新品上市/热卖商品”几个栏目里,请问需要怎么修改呢??
 

 


修改方法:

1、修改 /includes/lib_goods.php 文件 (最好使用editplus)


"promote_start_date, promote_end_date, g.goods_brief, g.goods_thumb, g.goods_img, RAND() AS rnd " .

 

修改为
"promote_start_date, promote_end_date, g.goods_brief, g.goods_thumb, g.goods_img,g.seller_note, RAND() AS rnd " .

 

接着,找到
if (in_array($row['goods_id'], $type_array['best']))

在它上面加一行代码
$goods[$idx]['seller_note']          = $row['seller_note'];

2、

下面修改ECSHOP模板文件,以官方默认模板为例(其他模板同理)

打开 /themes/default/library/recommend_best.lbi 文件

<p><a href="{$goods.url}" title="{$goods.name|escape:html}">{$goods.short_style_name}</a></p>

下面增加一行代码
<p>{$goods.seller_note}</p>

3、
然后打开 /themes/default/library/recommend_hot.lbi 文件,修改方法同上

4、
然后打开 /themes/default/library/recommend_new.lbi 文件,修改方法同上