Price filter seems to not take decimals into account

Hi, the price filter on my collections pages shows the prices wrong, it’s excluding decimals. Example:

https://shop.mojokite.com/collections/neoprenos-mujer-invierno?sort_by=best-selling

The price filter shows the highest filter option as “40999” but the highest price would actually be “409,99” or “409.99” - the price on the product are correct, front end as well as back end.

If I try to manually put a price in the filter box using any decimal, it does not read the decimal either. As in, if I type in “500,00” or “500.00” myself, and filter on this, the results show “50000”.

Filter screenshot:

Product price screenshot:

Does anyone know why this happens and/or how or where can I edit this? Am fine editing code.

Thanks a lot in advance!

Hey, @mvdg1990

This depends on the theme that you are using. What is the name of the theme installed? With that said, in the meantime, you could always just use a whole number so that the filter ranges properly appear. Using $410 instead of $409.99. In addition, the minimum value is a whole number ($0) so from a visual standpoint, it makes sense to show two whole numbers as the minimum/maximum.

If there is anything else I can help you with, please let me know.

Hi @Dirk ,

I’m using the Venue theme,

Apart from that, your solution unfortunately does not seem to help, as making it “410” will set the max filter price to 41000 (because it automatically gets turned into 410.00)…

Is there anything I can do to change this?

Thanks,

That is strange, as it appears the themes filtering feature isn’t working correctly. Do you know the name of your theme? I’d recommend getting in touch with the 3P theme developer in order for them to support you with their theme as it may be a known issue.

If there is anything else I can help you with, please let me know.

Hi @mvdg1990

I had the same issue with my store. I believe the issue comes down to some currencies having a different kind of thousands/decimal point system than USD. While USD uses a comma to indicate 1000 and a point to refer to decimals, my currency (Icelandic kronur), reverses this and uses a point to indicate thousands, and a comma to refer to decimals. This article helped me fix this issue: https://help.shopify.com/en/manual/payments/currency-formatting#currency-formatting-options

TL;DR - Go to Settings - Store details and scroll down to store currency. Under “HTML without currency” use this code: {{ amount_no_decimals_with_comma_separator }} instead of {{ amount_no_decimals }}

I hope this helps!

I just had this problem and I found out in the storefront-filters.liquid file in my theme on the price filter part it had

replace '.', '' | replace ',', ''

which changed my max number from 23,00 to 2300 so I just removed those places and now it shows as 23,00 as I wanted it to.

Facing similar issue. When we edit the price filter it removes 3 decimal places. My store is in INR (India Rupees)

Please help

The store is under development stage as yet.

https://3o1sizcqj1ov4avo-45175701665.shopifypreview.com

Hi OnlineMantra,

Facing the same problem in my case too. I’m using Wokiee theme. Price filter is getting converted into decimals & the textbox are letting us putting decimal values. Due to which Price filter is not working. It seems you have resolved this problem, could you please help me what solution you have applied. Thanks.

Hi, I have contacted with the theme creators directly, they have changed
some code and have solved the problem that way. I would recommend talking
to the customer service of your theme to try to achieve the same. Good luck!

Hello. I am also using Wokiee theme and am facing same issue. HAve you been able to find a a solution?