关于在ECSHOP商品详情页显示品牌LOGO

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

问:
ecshop商品详细页面的商品品牌默认是以文字形式显示的,能否改成以LOGO形式显示。

答:

当然可以,下面看教程。注:本教程以 ECSHOP2.7.2 + 官方默认 为例。

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}