Class SortingOption

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

Property Summary 

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.

Constructor Summary 

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

Method Summary 

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.

Methods inherited from class PersistentObject 

getCreationDate, getLastModified, getUUID

Methods inherited from class Object 

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

Property Details 

ID 

ID: String (read-only)

Returns the ID of the sorting option.


description 

description: String (read-only)

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


displayName 

displayName: String (read-only)

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


sortingRule 

sortingRule: SortingRule (read-only)

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


Method Details 

getDescription() 

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() 

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() 

getID(): String

Returns the ID of the sorting option.

Returns:

  • sorting option ID

getSortingRule() 

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.