ecshop如何限制促销栏目某分类下的促销商品不要显示?
2016-09-02 16:28 来源:www.chinab4c.com 作者:ecshop专家
本篇文章主要介绍了“ecshop如何限制某分类下的促销商品不要显示”,主要涉及到方面的内容,对于web前端感兴趣的同学可以参考一下: 首页打开includes文件夹里的lib_goods.php文件,搜索如下代码: function get_promote_goods($cats = \'\') { $time = gmtime(); $order_type = $GLOBALS[\'_CFG\'][\'recommend_order\']; /* 取得促销lbi的数量限制 */ $num = get_library_number(\"recommend_promotion\"); $sql = \'SELECT g.goods_id, g.goods_name, g.goods_name_style, g.market_price, g.shop_price AS org_price, g.promote_price, \' . \"INULLmp.user_price, g.shop_price * \'$_SESSION[discount]\') AS shop_price, \". \"promote_start_date, promote_end_date, g.goods_brief, g.goods_thumb, goods_img, b.brand_name, \" . \"g.is_best, g.is_new, g.is_hot, g.is_promote, RAND() AS rnd \" . \'FROM \' . $GLOBALS[\'ecs\']->table(\'goods\') . \' AS g \' . \'LEFT JOIN \' . $GLOBALS[\'ecs\']->table(\'brand\') . \' AS b ON b.brand_id = g.brand_id \' . \"LEFT JOIN \" . $GLOBALS[\'ecs\']->table(\'member_price\') . \" AS mp \". \"ON mp.goods_id = g.goods_id AND mp.user_rank = \'$_SESSION[user_rank]\' \". \'WHERE g.is_on_sale = 1 AND g.is_alone_sale = 1 AND g.is_delete = 0 \' . \" AND g.is_promote = 1 AND promote_start_date <= \'$time\' AND promote_end_date >= \'$time\' \"; 将以上代码修过为如下,增加 AND g.cat_id <> 分类id 形如: function get_promote_goods($cats = \'\') { $time = gmtime(); $order_type = $GLOBALS[\'_CFG\'][\'recommend_order\']; /* 取得促销lbi的数量限制 */ $num = get_library_number(\"recommend_promotion\"); $sql = \'SELECT g.goods_id, g.goods_name, g.goods_name_style, g.market_price, g.shop_price AS org_price, g.promote_price, \' . \"IFNULL(mp.user_price, g.shop_price * \'$_SESSION[discount]\') AS shop_price, \". \"promote_start_date, promote_end_date, g.goods_brief, g.goods_thumb, goods_img, b.brand_name, \" . \"g.is_best, g.is_new, g.is_hot, g.is_promote, RAND() AS rnd \" . \'FROM \' . $GLOBALS[\'ecs\']->table(\'goods\') . \' AS g \' . \'LEFT JOIN \' . $GLOBALS[\'ecs\']->table(\'brand\') . \' AS b ON b.brand_id = g.brand_id \' . \"LEFT JOIN \" . $GLOBALS[\'ecs\']->table(\'member_price\') . \" AS mp \". \"ON mp.goods_id = g.goods_id AND mp.user_rank = \'$_SESSION[user_rank]\' \". \'WHERE g.is_on_sale = 1 AND g.is_alone_sale = 1 AND g.is_delete = 0 AND g.cat_id <> 3 \' . \" AND g.is_promote = 1 AND promote_start_date <= \'$time\' AND promote_end_date >= \'$time\' \";
最近更新
常用插件
- ecshop没登陆情况下订单查
ecshop没登陆情况下订单查询插件,主要是针对ecshop在没有登陆的情况下...
- ecshop2.7.2生成虚拟订单2.
以前我们开发过ecshop下的虚拟订单,就是客户在访问的时候,会自动生...
- ecshop最小购买数量控制插
ecshop最小购买数量控制插件,这个插件主要是为我们提供一个十分方便...
- ecshop2.7.1邮件发送插件
ecshop2.7.1邮件发送插件:该插件主要的开发思想是源于ecshop短信发送系统...
- ecshop二次开发商品购买增
图片1香...