magento-customize-price-filter
magento-customize-price-filter copied to clipboard
Incorrect price ranges using floats
First, thanks for this really nice extension!
Unfortunately your regex pattern doesn't support floats. I still get an error when saving configuration: "Provided Layered Navigation Price Ranges are incorrect."
We've very low prices in many categories so I need to define a range like: -0.25;0.25-0.50;0.50-1;1-2;2-5;5-10;10-25;25-
Is it possible to implement this feature or could you/someone else help me to change the pattern? My regex skills are too bad... * facepalm *
$pattern = '#^(\d+)?\-\d+;(\d+\-\d+;)*\d+\-(\d+)?$#';
hello and thanks first, managing floats in this module is not only about the regex second, I already tried to do this, can't remember right now but there was a good reason why floats were not allowed just let me somte time to remember it :p I'll try to code it again (can't tell when) and it will come back to my memory I guess regards
GCD is supposed to be calculated on integers, not on floats guess it could be done after multiplying both numbers until they are integers and then dividing the result by the same count of "x 10" we did before I will try to do it this way but as for others open issues, can't tell when I will have time for that :-/
Hey thanks for your quick response! I am convinced that you'll get it :)