ecshop中让某类促销产品不在促销商品列表里显示?
ecshop中让某类产品(这一类里商品全部选择为促销,是为获取促销的时间)但又不想让不在促销商品列表里显示,应该怎么做呢?菜鸟,期待高手指教!!!期待ing……...
ecshop中让某类产品(这一类里商品全部选择为促销,是为获取促销的时间)但又不想让不在促销商品列表里显示,应该怎么做呢?菜鸟,期待高手指教!!!期待ing……
展开
1个回答
展开全部
这个可以通过所前台调用促销商品的地方加一个限制条件,过虚租陪滤掉这个特殊分类的商品就可以了,可以改的她方比较多:
例如需要改get_promote_goods
把$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.is_promote = 1 AND promote_start_date <= '$time' AND promote_end_date >= '$time' ";
增加 and g.cat_id <> 分类id 形如:
$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 <> 6 ' .
" AND g.is_promote = 1 AND promote_start_date <= '$time' AND promote_end_date >= '$time' ";
例如需要改get_promote_goods
把$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.is_promote = 1 AND promote_start_date <= '$time' AND promote_end_date >= '$time' ";
增加 and g.cat_id <> 分类id 形如:
$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 <> 6 ' .
" AND g.is_promote = 1 AND promote_start_date <= '$time' AND promote_end_date >= '$time' ";
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询