标题大家都能看明白吧,那就不多说了,下面是教程:
打开 /category.php 文件
找到
$sql = 'SELECT g.goods_id, g.goods_name, g.goods_name_style, g.market_price, g.is_new, g.is_best, g.is_hot, g.shop_price AS org_price, ' . |
修改为
$sql = 'SELECT g.goods_id, g.goods_name,g.goods_sn, g.goods_name_style, g.market_price, g.is_new, g.is_best, g.is_hot, g.shop_price AS org_price, ' . |
继续往下找,找到
$arr[$row['goods_id']]['name'] = $row['goods_name']; |
在它下面添加
$arr[$row['goods_id']]['goods_sn'] = $row['goods_sn']; |
然后就可以在模板文件中调用商品货号了,
打开模板文件 /themes/default/library/goods_list.lbi ,
调用方法如下:
{$lang.goods_sn}{$goods.goods_sn}
(责任编辑:最模板) |