PHP7中文手册2018 带注释 最新chm版
首先打开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'];
然后就可以在ecshop模板文件中调用商品货号了,
打开模板文件 /themes/default/library/goods_list.lbi ,
调用方法如下:
{$lang.goods_sn}{$goods.goods_sn}
找到
$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'];
然后就可以在ecshop模板文件中调用商品货号了,
打开模板文件 /themes/default/library/goods_list.lbi ,
调用方法如下:
{$lang.goods_sn}{$goods.goods_sn}
转载请注明:谷谷点程序 » ECSHOP列表页中显示商品货号的方法