在ecshop商品列表页显示商品库存的解决办法
问题:如何在ECSHOP商品列表页每个商品的下面显示库存数呢??修改步骤:1、打开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_name_style, g.market_price, g.is_new, g.is_best, g.is_hot, g.shop_price AS org_price,g.goods_number, ' .继续在$arr[$row['goods_id']]['url'] = build_uri('goods', array('gid'=>$row['goods_id']), $row['goods_name']);下面增加一行代码$arr[$row['goods_id']]['goods_number'] = $row['goods_number'];2、打开 themes/模板文件夹/library/goods_list.lbi 文件在你想显示 库存的地方加入下面代码例如在<a href="javascript:collect({$goods.goods_id});" class="f6">{$lang.btn_collect}</a>上面加入一行代码库存:{$goods.goods_number}<br />下一篇: 屏蔽ecshop云提示no_license 上一篇: 如何让Ecshop首页商品也显示市场价格