[英]Price range filter in opencart
I have the filter module installed in Opencart V2 that filters products on a variety of attributes. 我在Opencart V2中安装了过滤器模块,该模块可以过滤各种属性的产品。 They are all check boxes.
它们都是复选框。
I want customers to be able to filter products using a price range slider. 我希望客户能够使用价格范围滑块过滤产品。 There are a lot of modules available online, however most are for V1.5.
在线上有很多可用的模块,但是大多数模块都适用于V1.5。
How would I go about incorporating a range <input>
to filter my prices? 我将如何合并范围
<input>
来过滤我的价格?
I could add a price attribute in filters, however this limits the customer to a variety of check boxes - and I need my pricing to be extremely accurate (it will be displaying over 50,000 products). 我可以在过滤器中添加价格属性,但是这将客户限制在各种复选框中-我需要我的定价要非常准确(它将显示50,000多种产品)。
Is there a way I can edit the current filter module, and not create a new one? 有什么方法可以编辑当前的过滤器模块,而不创建新的过滤器模块?
I have implemented several pricing filters in opencart. 我已经在opencart中实现了几个价格过滤器。 The available filters are not free so I decided to make my own.
可用的过滤器不是免费的,因此我决定自己制作。 Here is what I did.
这是我所做的。
tpl
. tpl
。 filter_data
array and changed the model a little bit too. filter_data
数组,并对模型进行了一些更改。 I added the min_price
and max_price
conditions in my model. min_price
和max_price
条件。 It was simple if you know how to play with controller and model. 如果您知道如何使用控制器和模型,这很简单。
Solved my problem using this extension here: http://www.opencart.com/index.php?route=extension/extension/info&extension_id=23022&filter_search=jquery%20price%20slider&filter_download_id=42&sort=e.price&order=ASC 在这里使用此扩展程序解决了我的问题: http : //www.opencart.com/index.php? route=extension/extension/info&extension_id=23022&filter_search=jquery%20price%20slider&filter_download_id=42&sort=e.price&order=ASC
I am using the default theme, with stylesheet modifications. 我使用带有样式表修改的默认主题。 It wasn't working at first as I had modified the category.tpl file to such an extent that the plugin wasn't working correctly.
起初它不起作用,因为我已修改了category.tpl文件,以致插件无法正常工作。
Resetting the .tpl file to it's defaults and making new changes, it now works. 将.tpl文件重置为默认值并进行新的更改,现在可以使用了。
You can use opencart flexi product filter extension to solve this problem 您可以使用opencart flexi产品过滤器扩展来解决此问题
https://www.opencart.com/index.php?route=marketplace/extension/info&extension_id=35570&filter_member=TemplateMaza https://www.opencart.com/index.php?route=marketplace/extension/info&extension_id=35570&filter_member=TemplateMaza
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.