ECSHOP列表页中显示商品货号的方法
首先打开ecshop系统文件 /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'];//开源软件:phpfensi.com
然后就可以在ecshop模板文件中调用商品货号了,打开模板文件 /themes/default/library/goods_list.lbi,
调用方法如下:{$lang.goods_sn}{$goods.goods_sn}

