ECSHOP在商品详情页显示品牌LOGO图片的方法

2014-12-22 23:48 来源: 知识网 作者:知识网 网友评论 0 条 浏览次数 2283
ECSHOP在商品详情页显示品牌LOGO图片的方法

 1、首先需要修改 /includes/lib_goods.php ,用EditPlus或Dreamweaver打开该文件,找到

$sql = 'SELECT g.*, c.measure_unit, b.brand_id, b.brand_name AS goods_brand, m.type_money AS bonus_money, ' . 
修改为

$sql = 'SELECT g.*, c.measure_unit, b.brand_id,b.brand_logo, b.brand_name AS goods_brand, m.type_money AS bonus_money, ' . 

2、接着修改 /themes/default/goods.dwt,将

{$goods.goods_brand} 

修改为

{if  $goods.brand_logo}<img src=/data/brandlogo/{$goods.brand_logo}>{else}{$goods.goods_brand}{/if}

上一篇: 下一篇:

相关主题:知识网  程序