CategoryFilter

Extends Object. Category filters describe the type of filter and the available options for the filter to narrow the product results within a category. Filters are obtained when calling the category.filters() method.

Properties
description String
The description for the product specification the filter is based upon.
displayType CategoryFilterDisplayType
A string-based object containing the display preference for the filter options.
  • boolean - also represented by displayType.isTypeBoolean().
  • numeric - also represented by displayType.isTypeNumeric().
  • range - also represented by displayType.isTypeRange().
  • string - also represented by displayType.isTypeString().
  • swatch - also represented by displayType.isTypeSwatch().
id Number | null
The System ID for the filter if of type spec, else null.
identifier String
Contains the specification reference, if the filter represents a product specification.
isActive Boolean
Indicates whether any of the options for this filter have been selected - true if yes, else false.
isManufacturer Boolean
True if this is a manufacturer based filter, else false.
isMultiSelect Boolean
True if the display preference should allow users to select more than one option.
isPrice Boolean
True if this is a price based filter, else false.
isRangeSelect Boolean
True if the selection type permits a min and max value.
isSingleSelect Boolean
True if the a user should only be permitted to select one option from those available.
isSpecification Boolean
True if this is a product specification based filter, else false.
options Array
The available options for the filter. Each element within the Array will be either a:
  • CategoryFilterSelectable
  • CategoryFilterRange
selectionType CategoryFilterSelectionType
A string-based object containing the preferred method of selection for the filter options. This may be one of the following:
  • checkbox - also represented by a selectionType.isMultiSelect() method.
  • radio - also represented by a selectionType.isSingleSelect() method.
  • range - also represented by a selectionType.isRangeSelect() method.
title String
The title of a filter is either the default title for the type of filter (such as Price or Manufacturer), or is the title of the specification used to build the filter.
type CategoryFilterType

A string-based object representing the type of filter, which may currently be one of the following supported types:

  • price - also represented by a type.isPrice() method.
  • spec - also represented by a type.isSpecification() method.
  • manufacturer - also represented by a type.isManufacturer() method.
units String
A string representation of specification units (if applicable).
url Url | null
The URL associated with the filter description, intended to offer more information about the filter.
Currently, this is applicable to filters where the type is set to spec.


Deprecated properties
isCheckbox
Deprecated, please use isMultiSelect.
isNumeric
Deprecated, applies to option display type.
isRadio
Deprecated, please use isSingleSelect.
isRange
Deprecated, due ambiguity between displayType and selectionType.
Please use isRangeSelect to determine selection type.
isRangeValue
Deprecated, due ambiguity between displayType and selectionType.
Please use displayType to determine filter option display type.
isString
Deprecated, applies to option display type.
isSwatch
Deprecated, applies to option display type.
widget
Deprecated, please use selectionType