Class SortingOption

Represents an option for how to sort products in storefront search results.

PropertyDescription
ID: String (read-only)Returns the ID of the sorting option.
description: String (read-only)Returns the description of the sorting option for the current locale.
displayName: String (read-only)Returns the display name of the of the sorting option for the current locale.
sortingRule: SortingRule (read-only)Returns the sorting rule for this sorting option, or null if there is no associated rule.

This class does not have a constructor, so you cannot create it directly.

MethodDescription
getDescription()Returns the description of the sorting option for the current locale.
getDisplayName()Returns the display name of the of the sorting option for the current locale.
getID()Returns the ID of the sorting option.
getSortingRule()Returns the sorting rule for this sorting option, or null if there is no associated rule.

getCreationDate, getLastModified, getUUID

assign, create, create, defineProperties, defineProperty, entries, freeze, fromEntries, getOwnPropertyDescriptor, getOwnPropertyNames, getOwnPropertySymbols, getPrototypeOf, hasOwnProperty, is, isExtensible, isFrozen, isPrototypeOf, isSealed, keys, preventExtensions, propertyIsEnumerable, seal, setPrototypeOf, toLocaleString, toString, valueOf, values

ID: String (read-only)

Returns the ID of the sorting option.


description: String (read-only)

Returns the description of the sorting option for the current locale.


displayName: String (read-only)

Returns the display name of the of the sorting option for the current locale.


sortingRule: SortingRule (read-only)

Returns the sorting rule for this sorting option, or null if there is no associated rule.


getDescription(): String

Returns the description of the sorting option for the current locale.

Returns:

  • The value of the property for the current locale, or null if it wasn't found.

getDisplayName(): String

Returns the display name of the of the sorting option for the current locale.

Returns:

  • The value of the property for the current locale, or null if it wasn't found.

getID(): String

Returns the ID of the sorting option.

Returns:

  • sorting option ID

getSortingRule(): SortingRule

Returns the sorting rule for this sorting option, or null if there is no associated rule.

Returns:

  • a ProductSortingRule instance representing the rule for this option or null.