The filter_value object

The filter_value object represents an individual value from a filter object.

It has the following attributes:

filter_value.active

Returns whether the filter value is active. Returns either true or false.

filter_value.count

Returns how many results are related to the filter value. Returns a number.

filter_value.label

Returns the customer facing label for the filter value. For example, Red or Rouge.

filter_value.param_name

Returns the name of the filter that the filter value belongs to. For example, filter.v.option.color.

Filters of type price_range also include an extra component depending on the filter_value source.

If the filter_value is for a price_range filter's min_value, then the following is returned:

If the filter_value is for a price_range filter's max_value, then the following is returned:

filter_value.url_to_add

Returns the current page URL with the filter value parameter added.

filter_value.url_to_remove

Returns the current page URL with the filter value parameter removed.

filter_value.value

Returns the value.