Algolia price-range when price is in cents

I am using Vue InstantSearch price range and my entries are in cents. The default price-range implementation handles the filtering in decimals though (e.g. $10.52).

The problem is that when the user puts 10 as the minimum price, although the user means $10, we are filtering $0.10. In order to filter $10.00 you will need to enter 1000. What I basically need is to multiple the input*100 to convert to dollars, but I am not sure where to do that using the library, or any other way to fix that?

Should I just go back to storing the prices in decimals?

1 Like

Hey @chrys,

I haven’t had the time to find a clean solution for this one yet :confused:

Would you consider sending the prices already multiplied by 100?

What us the the initial reason you got the prices in cts?


I will go with multiplying the prices, not a big deal.

I find it a big cleaner and more practical to do calculations with the integers, it’s just a personal preference.

Thanks for the help :slight_smile:

1 Like

Yes, we need the plugin to run through a callback before sending it off then it will be configurable.
I also prefer storing in cents!