-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add number range search options #2020
Add number range search options #2020
Conversation
|
I'm not sure if the input type="number" is the best approach here because it prevents us from searching float/currency numbers: https://www.loom.com/share/fb6dfbdb34684449b8373e18c1efb66e |
@rafaehlers that's because the step.size is 1 by default. But that can be set to But there might be a better solution. The nice thing about number is that it has the native |
@doekenorg, please take a look at this: https://www.loom.com/share/96864d158a8b46dc987a86e4f361c7bb |
@doekenorg, also, are you able to add support for the product (user-defined price) field? |
3ba568e
to
9990b4b
Compare
includes/widgets/search-widget/templates/search-field-number_range.php
Outdated
Show resolved
Hide resolved
7129030
to
c7bfc7b
Compare
This PR addresses #1426 by adding a new
number_range
field fornumber
,quantity
andtotal
fields. Forproducts
this isn't possible as the field itself contains both a name AND a price.This PR also resolves an issue with the removal of
CAST
functions from the query, that we actually still need in order to match numeric values.There is some JS that prevents the From field from being higher than the value of the To field, and vice versa. There is also a backup validation with an error message if someone gets around it.