ecshop好像默认调用的是精品,best good,我想调用所有上架商品,修改如下:
1、打开根目录下category.php,
找到如下代码:[code]
$smarty->assign(‘best_goods’, get_category_recommend_goods(‘best’, $children, $brand, $price_min, $price_max, $ext));
[/code]
在后面添加[code]$smarty->assign(‘on_sale_goods’, get_category_recommend_goods(‘on_sale’, $children, $brand, $price_min, $price_max, $ext));[/code]
大约449行左右找到代码加个参数g.is_on_sale,
[code]
/* 获得商品列表 */
$sql = ‘SELECT g.goods_id, g.goods_name, g.goods_name_style, g.market_price, g.is_new, g.is_best, g.is_on_sale, g.is_hot, g.shop_price AS org_price, ‘ .[/code]
2、模版中调用
[code] <!–{foreach from=$on_sale_goods item=goods}–>
<div> </div>
<!–{/foreach}–>
[/code]
评论前必须登录!
注册