-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
floor price module should pick the highest matching floor not the first matching floor #10708
Comments
It is specifically documented and designed not to do this. Why do you have this expectation? |
Ah, sorry I should have not used the word "expect" ^^' It's just that, that's the templates headline, so I used the same wording. This is a change request. The docs are clear about the behavior. I personally would like for it to work this way since having rules for many countries just so that they take priority is a bit messy. I understand if these rules are supposed to prioritize explicit matches, but if you could point me to any reasoning for this it would be appreciated. |
This feels like quite a painful change that would affect just as many or more parties negatively in transition pain as it would benefit. OP could easily solve his issues by returning different rules files in different countries rather than having his js be country-aware. |
Type of issue
Description
The floor price module currently only retrieves the first matching rule via
getFirstMatchingFloor
.Which sorts the rules by ascending number of occurences of wildcards
*
.Imo, it would make more sense to pick the highest floor.
Steps to reproduce
Expected results
I would expect all matching rules to apply. Using the rule with the highest floorRuleValue will accomplish that.
Actual results
With the above configuration, if you're on a desktop in switzerland (ch) the floorRuleValue will be 3, rather than 5:
The text was updated successfully, but these errors were encountered: