首页 > 运营 > 帮助中心 > 正文

ECSHOP商品详情页显示品牌logo的方法

2019-10-16 21:43:25
字体:
来源:转载
供稿:网友

问:

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}

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表