Display correct count in price slider if range ‚from value‘ = ‚to value‘#1125
Display correct count in price slider if range ‚from value‘ = ‚to value‘#1125annakoehler wants to merge 1 commit into
Conversation
|
we had the problem not with price, but with other attribute. I saw you did changes for price and you have an step -0,01, but it doesn't work if you have no decimal numbers |
28eb80b to
3cbc361
Compare
|
While the issue does exist when min = max in the slider, changing the behavior of the filter would lead to other problems, because the slider is built around an histogram which takes the floor() of a price.
At the moment, if you put min on 68 and max on 69, the number of available products will be displayed as 2 (because of the lt). Now, if we adopt your changes, and if you put min on 68 and max on 69, the number of available products displayed will be 4 (because of the lte). |
|
Not closing this PR right now, but the correct approach would be to prevent the from and to value to be equal. |
f.e. we have products in shop with price 100$. If we make in price slider "from value" = "to value", we got "No products in the selected range." message. Also if we open direct url https://some_shop/some_url?price=100-100 we didn't see the products with price 100$