Why is the price range filter not updating on storefront 2.0?

I think I found some bugs/missing features when using storefront 2.0 filtering, specifically with the price range filter.

Firstly the price range values do not get updated when applying filters. Here’s an example:

Here is a screenshot of my filters with zero active filters, as you can see the maximum price on the price range slider is £114.75 which is correct.

However, if I was to apply a filter (like dice in the below example), the price range filter is still showing the max price as £114.75 even though the max price for a product is now £20.40.

This often leads to unexpected “no results found” page when customers use the slider.

Also, another issue with the price range filter is that there doesn’t seem to be a way to set the minimum price value (only max), so we always have to show it as zero which is not ideal as it makes it look like we sell a product for free, I could set the value to £1 but that would filter out any products we sell for under £1.

That’s all for now!

Thank You

@CodeGoblin

Kindly share your Store url,

So that i can help you,

Thank you.

Hi @SpeedyDev ,

I’m currently running this on a dev store, however it can be replicated on all storefront 2.0 themes and is not specific to my store.

Below is a theme I have picked from the theme store, go to a collection and apply a list filter like brand and you will see that the max price doesn’t change:

https://themes.shopify.com/themes/warehouse/styles/metal/preview?surface_inter_position=1&surface_intra_position=6&surface_type=all

@CodeGoblin

Then contact to theme Support team.

Thanks @SpeedyDev ,

This is not a theme issue but rather an issue with the underlying way storefront filters work, I can’t seem to reach out to an actual developer who works at Shopify so thought these forums might be my best bet.

Hi @CodeGoblin

Thank you for the screenshots showing what you were experiencing with the product filters. I will do some investigating and see if I can confirm if this is an issue with the filters or expected behavior.

I will also be able to submit feedback directly to our developers on this as well once we get that confirmed!

Hi @CodeGoblin

Just wanted to share an update on this - I have escalated the filter issue to our theme developers for a closer look. It definitely sounds like this may be a bug in the filter settings. Once I receive more info, I’ll update the thread here :slightly_smiling_face:

Thank you @Shay , I appreciate you looking into this and for keeping me updated. :blush:

Hi @Shay ,

Any update from the dev team about this issue? :blush:

Hi Shay,

We’re also experiencing a similar issue where filter.min_value.value and filter.max_value.value return nil or non existent values. Any advice or helpfull fix on the issue.

Hi @CodeGoblin

I looked into this today for an update and when reviewing the price filter in the Dawn theme (7.0.1) the functionality of it appears to have been optimized for better clarity as well as it allows you to set the minimum price you are searching for.

I can’t say for sure how this has carried over to other third party themes, it could just be a visual change vs a backend change. I’d be curious to see what it looks like on the most current version of the theme you are using, or if your theme devs are planning on updating that feature on their end too.

@AhmedOmar Could you please share some screenshots of the issue you are experiencing? Are you trying to custom code something for the filters in your theme or trying to build an app?

hi @AhmedOmar , the filter min_value.value and max_value.value will return the min and max price filter currently applied
For example
/collections/all?filter.v.price.gte=38&filter.v.price.lte=302
{{ max_value.value | money_without_currency }} outputs 302

Unfortunately we can’t use those properties to know the min and max price to filter in combination with other filters. Shopify documentation isn’t clear about what these properties are return. https://shopify.dev/api/liquid/objects/filter#filter-max_value

Hi @Shay , the functionality is still not clear.
For example. You can filter by color first, getting as result products from $ 10 to 50, after that , the price filter remains showing “The highest price is $205.00”, and if the customers enter From: 100, they get 0 results, therefore the price hint above is missleading.
I believe that the existing liquid objects and properties lack of a solution for this.

Hi @ivanhojvat

Thank you for the update! I went back to look and I can see what I missed originally in my last post. You are correct that the pricing filter still doesn’t reflect changes made by other filters to the products in view.

I’ll ensure I update my feedback on this feature to our developers.