简体   繁体   English

opencart如何制作价格范围过滤器

[英]opencart how to make price range filter

I have filter data. 我有过滤器数据。 How I can made filter by price range? 如何按价格范围进行过滤? All products from $5 until $10 for expample! 所有产品的价格都从$ 5到$ 10不等!

 $filter_data = array(
        'sort'  => 'p.price',
        'order' => 'DESC',
        'start' => 0,
        'limit' => 1
 );

just hookup the code in model 只是连接模型中的代码

eg) 例如)

if(isset($data['price']) \\ [5,10]
{
   between $data['price'][0] and $data['price'][1]
 } 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM