商品详细页如何显示品牌的LOGO呢?

2016-07-07 16:16 来源:www.chinab4c.com 作者:ecshop专家



商品详细页只能显示其商品所属的品牌名字,但显示不了所属的品牌LOGO,求达人教一下

回答:


修改 includes/lib_goods.php
找到 get_goods_info() 函数部分

$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, ' .

再修改 goods.dwt

{$goods.goods_brand}
修改为
<img src=/data/brandlogo/{$goods.brand_logo}>