免签约即时到帐支付接口

ecshop搜索页如何增加属性筛选

ecshop搜索页如何增加属性筛选参考代码如下:
$filter['brand'] = isset($_REQUEST['brand']) ? trim($_REQUEST['brand']) : '';             //品牌
$filter['price'] = isset($_REQUEST['price']) ? trim($_REQUEST['price']) : '';             //价格
$filter['attribute'] = isset($_REQUEST['attribute']) ? trim($_REQUEST['attribute']) : ''; //属性
 
$where = " WHERE 1";
if ($filter['brand'] != '')
{
    $where .= " AND brand=" . addslashes($filter['brand']);
}
if ($filter['price'] != '')
{
    $where .= " AND price=" . addslashes($filter['price']);
}
if ($filter['attribute'] != '')
{
    $where .= " AND attribute=" . addslashes($filter['attribute']);
}

本文原创地址:https://www.ecshopok.com/article-432.html
版权所有 © 转载时必须以链接形式注明出处!

觉得本文对您有用,想收藏下来!方法很简单:请点击-〉
我们一直坚持白天工作、晚上熬夜更新资源,付出了巨大的精力和时间,其中的辛酸难以言述。

文章评论

暂无评论,来发表一个吧

发表 取消
充值有惊喜 ECSHOP插件网微信客服edait_cn