I need help applying filters to my website. It is a shopping site that allows users to buy and sell. I just cannot figure out how to apply a price filter to it. I was able to do shipping, location, condition, and category but not price. does anyone know how?
Without seeing the rest of your page, here are the basic things you’ll need:
An input for the user to define a price - either a single value or a range. This can be done with a simple input element or the slider element.
Your search should have a constraint that matches against the input’s value. For example, if you’re doing a range, you can have two simple constraints… “Buy Price > Slider value :min” and “Buy Price < Slider value :max”
There are a few ways to go about it, but hopefully the above will get you in the right direction.
Your expressions are both “buy price > silder value :max” so it will only return results that have a higher price than the slider value max. It should probably be the opposite, and just one constraint unless there is also a minimum input --> “buy price < silder value :max”
BTW just tested @romanmg’s solution on my app and it worked for what I was doing. Thanks Gaby!