问:
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}
新闻热点
疑难解答