Shopify / dawn

Shopify's first source available reference theme, with Online Store 2.0 features and performance built-in.
Other
2.54k stars 3.45k forks source link

Price Filter: Does not take into consideration current filters #3632

Open ramadanomar opened 1 month ago

ramadanomar commented 1 month ago

Describe the current behavior

The range-max is based on the whole collection instead of stacking with current active filters.

Example: Max price in /nike collection is 34,950

Adding some filters that would limit to only a single product still keeps the max range in the filter the same: Image

Adding a minimum price filter would make it go out of bounds a lot of times Image

Describe the expected behavior

As a user i'd expect it to take into account my current filters. Ex: If i'm searching for items of a specific type, i want ot be able to filter the prices based on that item type instead of whole collection.

Version information (Dawn, browsers and operating systems)

Possible solution

Not sure if filter.range_max is stackable with other filters. If it's not then we should use JS to get lowest priced item. Could be a bit troublesome for infinite scrolling layouts.

ramadanomar commented 1 month ago

If this is not the desired behaviour i can work on submitting a PR to adjust the behaviour.