Class Category

Represents a category in a product catalog.

Constant Summary 

ConstantDescription
DISPLAY_MODE_INDIVIDUAL: Number = 0Constant representing the Variation Group Display Mode individual setting.
DISPLAY_MODE_MERGED: Number = 1Constant representing the Variation Group Display Mode merged setting.

Property Summary 

PropertyDescription
ID: String (read-only)Returns the id of the category.
allRecommendations: Collection (read-only)Returns all outgoing recommendations for this category.
categoryAssignments: Collection (read-only)Returns a collection of category assignments of the category.
defaultSortingRule: SortingRule (read-only)Returns the default sorting rule configured for this category, or null if there is no default rule to be applied for it.
description: String (read-only)Returns the description of the catalog category for the current locale.
displayMode: NumberReturns the Variation Groups Display Mode of the category or null if no display mode is defined.
displayName: String (read-only)Returns the display name of the of the catalog category for the current locale.
image: MediaFile (read-only)Returns the image reference of this catalog category.
incomingCategoryLinks: Collection (read-only)Returns the collection of CategoryLink objects for which this category is the target.
online: Boolean (read-only)Returns the value indicating whether the catalog category is “currently online”.
onlineCategoryAssignments: Collection (read-only)Returns a collection of category assignments of the category where the referenced product is currently online.
onlineFlag: Boolean (read-only)Returns the online status flag of the category.
onlineFrom: Date (read-only)Returns the date from which the category is online or valid.
onlineIncomingCategoryLinks: Collection (read-only)Returns the collection of CategoryLink objects for which this category is the target.
onlineOutgoingCategoryLinks: Collection (read-only)Returns the collection of CategoryLink objects for which this category is the source.
onlineProducts: Collection (read-only)Returns online products assigned to this category.
onlineSubCategories: Collection (read-only)Returns a sorted collection of currently online subcategories of this catalog category.
onlineTo: Date (read-only)Returns the date until which the category is online or valid.
orderableRecommendations: Collection (read-only)Returns a list of outgoing recommendations for this category.
outgoingCategoryLinks: Collection (read-only)Returns the collection of CategoryLink objects for which this category is the source.
pageDescription: String (read-only)Returns the page description of this category for the default locale or null if not defined.
pageKeywords: String (read-only)Returns the page keywords of this category for the default locale or null if not defined.
pageTitle: String (read-only)Returns the page title of this category for the default locale or null if not defined.
pageURL: String (read-only)Returns the page URL property of this category or null if not defined.
parent: Category (read-only)Returns the parent of this category.
productAttributeModel: ProductAttributeModel (read-only)Returns this category’s ProductAttributeModel, which makes access to the category’s attribute information convenient.
products: Collection (read-only)Returns all products assigned to this category.
recommendations: Collection (read-only)Returns the outgoing recommendations for this category.
root: Boolean (read-only)Identifies if the category is the root category of its catalog.
searchPlacement: NumberReturns the search placement of the category or null of no search placement is defined.
searchRank: NumberReturns the search rank of the category or null of no search rank is defined.
siteMapChangeFrequency: String (read-only)Returns the category’s sitemap change frequency.
siteMapIncluded: Number (read-only)Returns the category’s sitemap inclusion.
siteMapPriority: Number (read-only)Returns the category’s sitemap priority.
subCategories: Collection (read-only)Returns a sorted collection of the subcategories of this catalog category, including both online and offline subcategories.
template: String (read-only)Returns the template property value , which is the file name of the template used to display the catalog category.
thumbnail: MediaFile (read-only)Returns the thumbnail image reference of this catalog category.
topLevel: Boolean (read-only)Returns true if the category is a top level category, but not the root category.

Constructor Summary 

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

Method Summary 

MethodDescription
getAllRecommendations()Returns all outgoing recommendations for this category.
getAllRecommendations(Number)Returns all outgoing recommendations for this category which are of the specified type.
getCategoryAssignments()Returns a collection of category assignments of the category.
getDefaultSortingRule()Returns the default sorting rule configured for this category, or null if there is no default rule to be applied for it.
getDescription()Returns the description of the catalog category for the current locale.
getDisplayMode()Returns the Variation Groups Display Mode of the category or null if no display mode is defined.
getDisplayName()Returns the display name of the of the catalog category for the current locale.
getID()Returns the id of the category.
getImage()Returns the image reference of this catalog category.
getIncomingCategoryLinks()Returns the collection of CategoryLink objects for which this category is the target.
getIncomingCategoryLinks(Number)Returns the collection of CategoryLink objects for which this category is the target and which are of the specified type.
getOnlineCategoryAssignments()Returns a collection of category assignments of the category where the referenced product is currently online.
getOnlineFlag()Returns the online status flag of the category.
getOnlineFrom()Returns the date from which the category is online or valid.
getOnlineIncomingCategoryLinks()Returns the collection of CategoryLink objects for which this category is the target.
getOnlineOutgoingCategoryLinks()Returns the collection of CategoryLink objects for which this category is the source.
getOnlineProducts()Returns online products assigned to this category.
getOnlineSubCategories()Returns a sorted collection of currently online subcategories of this catalog category.
getOnlineTo()Returns the date until which the category is online or valid.
getOrderableRecommendations()Returns a list of outgoing recommendations for this category.
getOrderableRecommendations(Number)Returns a list of outgoing recommendations for this category.
getOutgoingCategoryLinks()Returns the collection of CategoryLink objects for which this category is the source.
getOutgoingCategoryLinks(Number)Returns the collection of CategoryLink objects for which this category is the source and which are of the specified type.
getPageDescription()Returns the page description of this category for the default locale or null if not defined.
getPageKeywords()Returns the page keywords of this category for the default locale or null if not defined.
getPageTitle()Returns the page title of this category for the default locale or null if not defined.
getPageURL()Returns the page URL property of this category or null if not defined.
getParent()Returns the parent of this category.
getProductAttributeModel()Returns this category’s ProductAttributeModel, which makes access to the category’s attribute information convenient.
getProducts()Returns all products assigned to this category.
getRecommendations()Returns the outgoing recommendations for this category.
getRecommendations(Number)Returns the outgoing recommendations for this category which are of the specified type.
getSearchPlacement()Returns the search placement of the category or null of no search placement is defined.
getSearchRank()Returns the search rank of the category or null of no search rank is defined.
getSiteMapChangeFrequency()Returns the category’s sitemap change frequency.
getSiteMapIncluded()Returns the category’s sitemap inclusion.
getSiteMapPriority()Returns the category’s sitemap priority.
getSubCategories()Returns a sorted collection of the subcategories of this catalog category, including both online and offline subcategories.
getTemplate()Returns the template property value , which is the file name of the template used to display the catalog category.
getThumbnail()Returns the thumbnail image reference of this catalog category.
hasOnlineProducts()Returns true if this catalog category has any online products assigned.
hasOnlineSubCategories()Returns true if this catalog category has any online subcategories.
isDirectSubCategoryOf(Category)Returns true if this category is a direct sub-category of the provided category.
isOnline()Returns the value indicating whether the catalog category is “currently online”.
isRoot()Identifies if the category is the root category of its catalog.
isSubCategoryOf(Category)Returns true if this category is a sub-category of the provided category.
isTopLevel()Returns true if the category is a top level category, but not the root category.
setDisplayMode(Number)Set the category’s Variation Groups Display Mode.
setSearchPlacement(Number)Set the category’s search placement.
setSearchRank(Number)Set the category’s search rank.

Methods inherited from class ExtensibleObject 

describe, getCustom

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

Constant Details 

DISPLAY_MODE_INDIVIDUAL 

DISPLAY_MODE_INDIVIDUAL: Number = 0

Constant representing the Variation Group Display Mode individual setting.


DISPLAY_MODE_MERGED 

DISPLAY_MODE_MERGED: Number = 1

Constant representing the Variation Group Display Mode merged setting.


Property Details 

ID 

ID: String (read-only)

Returns the id of the category.


allRecommendations 

allRecommendations: Collection (read-only)

Returns all outgoing recommendations for this category. The recommendations are sorted by their explicitly set order.


categoryAssignments 

categoryAssignments: Collection (read-only)

Returns a collection of category assignments of the category.


defaultSortingRule 

defaultSortingRule: SortingRule (read-only)

Returns the default sorting rule configured for this category, or null if there is no default rule to be applied for it.

This method returns the default rule for the parent category if this category inherits one. The parent category may inherit its default rule from its parent, and so on, up to the root category.

This method returns null if no ancestor category for this category has a default rule.


description 

description: String (read-only)

Returns the description of the catalog category for the current locale.


displayMode 

displayMode: Number

Returns the Variation Groups Display Mode of the category or null if no display mode is defined.


displayName 

displayName: String (read-only)

Returns the display name of the of the catalog category for the current locale.

This value is intended to be used as the external visible name of the catalog category.


image 

image: MediaFile (read-only)

Returns the image reference of this catalog category.


incomingCategoryLinks 

incomingCategoryLinks: Collection (read-only)

Returns the collection of CategoryLink objects for which this category is the target. If the source category of a link belongs to a different catalog than the catalog owning this category, it is not returned.


online 

online: Boolean (read-only)

Returns the value indicating whether the catalog category is "currently online". A category is currently online if its online flag equals true and the current site date is within the date range defined by the onlineFrom and onlineTo attributes.


onlineCategoryAssignments 

onlineCategoryAssignments: Collection (read-only)

Returns a collection of category assignments of the category where the referenced product is currently online. When checking the online status of the product, the online flag and the online from & to dates are taken into account. Online flag, online from & to dates set for the current site takes precedence over the default values.


onlineFlag 

onlineFlag: Boolean (read-only)

Returns the online status flag of the category.


onlineFrom 

onlineFrom: Date (read-only)

Returns the date from which the category is online or valid.


onlineIncomingCategoryLinks 

onlineIncomingCategoryLinks: Collection (read-only)

Returns the collection of CategoryLink objects for which this category is the target. If the source category of a link belongs to a different catalog than the catalog owning this category, it is not returned. Additionally, this method will only return a link if the source category is currently online. A category is currently online if its online flag equals true and the current site date is within the date range defined by the onlineFrom and onlineTo attributes.


onlineOutgoingCategoryLinks 

onlineOutgoingCategoryLinks: Collection (read-only)

Returns the collection of CategoryLink objects for which this category is the source. If the target category of a link belongs to a different catalog than the catalog owning this category, it is not returned. Additionally, this method will only return a link if the target category is currently online. A category is currently online if its online flag equals true and the current site date is within the date range defined by the onlineFrom and onlineTo attributes.


onlineProducts 

onlineProducts: Collection (read-only)

Returns online products assigned to this category. Offline products are not included in the returned collection. When checking the online status of the product, the online flag and the online from & to dates are taken into account. Online flag, online from & to dates set for the current site takes precedence over the default values.

The order of products in the returned collection corresponds to the defined explicit sorting of products in this category.

See Also:


onlineSubCategories 

onlineSubCategories: Collection (read-only)

Returns a sorted collection of currently online subcategories of this catalog category.

  • A category is currently online if its online flag equals true and the current site date is within the date range defined by the onlineFrom and onlineTo attributes.
  • The returned collection is sorted by position. Subcategories marked as "unsorted" always appear after those marked as "sorted" but are otherwise not in any guaranteed order.
  • The returned collection contains direct subcategories only.

See Also:


onlineTo 

onlineTo: Date (read-only)

Returns the date until which the category is online or valid.


orderableRecommendations 

orderableRecommendations: Collection (read-only)

Returns a list of outgoing recommendations for this category. This method behaves similarly to getRecommendations() but additionally filters out recommendations for which the target product is unorderable according to its product availability model.

See Also:


outgoingCategoryLinks 

outgoingCategoryLinks: Collection (read-only)

Returns the collection of CategoryLink objects for which this category is the source. If the target category of a link belongs to a different catalog than the catalog owning this category, it is not returned. The collection of links is sorted by the explicitly defined order for this category with unsorted links appearing at the end.


pageDescription 

pageDescription: String (read-only)

Returns the page description of this category for the default locale or null if not defined.


pageKeywords 

pageKeywords: String (read-only)

Returns the page keywords of this category for the default locale or null if not defined.


pageTitle 

pageTitle: String (read-only)

Returns the page title of this category for the default locale or null if not defined.


pageURL 

pageURL: String (read-only)

Returns the page URL property of this category or null if not defined.


parent 

parent: Category (read-only)

Returns the parent of this category.


productAttributeModel 

productAttributeModel: ProductAttributeModel (read-only)

Returns this category's ProductAttributeModel, which makes access to the category's attribute information convenient. The model is calculated based on the attribute definitions assigned to this category and the global attribute definitions for the object type 'Product'.


products 

products: Collection (read-only)

Returns all products assigned to this category. The order of products in the returned collection corresponds to the defined explicit sorting of products in this category.

See Also:


recommendations 

recommendations: Collection (read-only)

Returns the outgoing recommendations for this category. If this category is not in the site catalog, or there is no site catalog, an empty collection is returned. Only recommendations for which the target product exists and is assigned to the site catalog are returned. The recommendations are sorted by their explicitly set order.


root 

root: Boolean (read-only)

Identifies if the category is the root category of its catalog.


searchPlacement 

searchPlacement: Number

Returns the search placement of the category or null of no search placement is defined.


searchRank 

searchRank: Number

Returns the search rank of the category or null of no search rank is defined.


siteMapChangeFrequency 

siteMapChangeFrequency: String (read-only)

Returns the category's sitemap change frequency.


siteMapIncluded 

siteMapIncluded: Number (read-only)

Returns the category's sitemap inclusion.


siteMapPriority 

siteMapPriority: Number (read-only)

Returns the category's sitemap priority.


subCategories 

subCategories: Collection (read-only)

Returns a sorted collection of the subcategories of this catalog category, including both online and offline subcategories.

  • The returned collection is sorted by position. Subcategories marked as "unsorted" always appear after those marked as "sorted" but are otherwise not in any guaranteed order.
  • The returned collection contains direct subcategories only.

See Also:


template 

template: String (read-only)

Returns the template property value , which is the file name of the template used to display the catalog category.


thumbnail 

thumbnail: MediaFile (read-only)

Returns the thumbnail image reference of this catalog category.


topLevel 

topLevel: Boolean (read-only)

Returns true if the category is a top level category, but not the root category.


Method Details 

getAllRecommendations() 

getAllRecommendations(): Collection

Returns all outgoing recommendations for this category. The recommendations are sorted by their explicitly set order.

Returns:

  • the sorted collection of recommendations, never null but possibly empty.

getAllRecommendations(Number) 

getAllRecommendations(type: Number): Collection

Returns all outgoing recommendations for this category which are of the specified type. The recommendations are sorted by their explicitly set order.

Parameters:

  • type - the recommendation type.

Returns:

  • the sorted collection of recommendations, never null but possibly empty.

getCategoryAssignments() 

getCategoryAssignments(): Collection

Returns a collection of category assignments of the category.

Returns:

  • Collection of category assignments of the category.

getDefaultSortingRule() 

getDefaultSortingRule(): SortingRule

Returns the default sorting rule configured for this category, or null if there is no default rule to be applied for it.

This method returns the default rule for the parent category if this category inherits one. The parent category may inherit its default rule from its parent, and so on, up to the root category.

This method returns null if no ancestor category for this category has a default rule.

Returns:

  • the default SortingRule or null.

getDescription() 

getDescription(): String

Returns the description of the catalog category for the current locale.

Returns:

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

getDisplayMode() 

getDisplayMode(): Number

Returns the Variation Groups Display Mode of the category or null if no display mode is defined.

Returns:


getDisplayName() 

getDisplayName(): String

Returns the display name of the of the catalog category for the current locale.

This value is intended to be used as the external visible name of the catalog category.

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 category.

Returns:

  • the id of the category.

getImage() 

getImage(): MediaFile

Returns the image reference of this catalog category.

Returns:

  • the image reference for this category.

getIncomingCategoryLinks() 

getIncomingCategoryLinks(): Collection

Returns the collection of CategoryLink objects for which this category is the target. If the source category of a link belongs to a different catalog than the catalog owning this category, it is not returned.

Returns:

  • a collection of CategoryLink objects, possibly empty but not null.

getIncomingCategoryLinks(Number) 

getIncomingCategoryLinks(type: Number): Collection

Returns the collection of CategoryLink objects for which this category is the target and which are of the specified type. If the source category of a link belongs to a different catalog than the catalog owning this category, it is not returned.

Parameters:

  • type - the link type type.

Returns:

  • a collection of CategoryLink objects, possibly empty but not null.

getOnlineCategoryAssignments() 

getOnlineCategoryAssignments(): Collection

Returns a collection of category assignments of the category where the referenced product is currently online. When checking the online status of the product, the online flag and the online from & to dates are taken into account. Online flag, online from & to dates set for the current site takes precedence over the default values.

Returns:

  • Collection of online category assignments of the category.

getOnlineFlag() 

getOnlineFlag(): Boolean

Returns the online status flag of the category.

Returns:

  • the online status flag of the category.

getOnlineFrom() 

getOnlineFrom(): Date

Returns the date from which the category is online or valid.

Returns:

  • the date from which the category is online or valid.

getOnlineIncomingCategoryLinks() 

getOnlineIncomingCategoryLinks(): Collection

Returns the collection of CategoryLink objects for which this category is the target. If the source category of a link belongs to a different catalog than the catalog owning this category, it is not returned. Additionally, this method will only return a link if the source category is currently online. A category is currently online if its online flag equals true and the current site date is within the date range defined by the onlineFrom and onlineTo attributes.

Returns:

  • a collection of CategoryLink objects, possibly empty but not null.

getOnlineOutgoingCategoryLinks() 

getOnlineOutgoingCategoryLinks(): Collection

Returns the collection of CategoryLink objects for which this category is the source. If the target category of a link belongs to a different catalog than the catalog owning this category, it is not returned. Additionally, this method will only return a link if the target category is currently online. A category is currently online if its online flag equals true and the current site date is within the date range defined by the onlineFrom and onlineTo attributes.

Returns:

  • a collection of CategoryLink objects, possibly empty but not null.

getOnlineProducts() 

getOnlineProducts(): Collection

Returns online products assigned to this category. Offline products are not included in the returned collection. When checking the online status of the product, the online flag and the online from & to dates are taken into account. Online flag, online from & to dates set for the current site takes precedence over the default values.

The order of products in the returned collection corresponds to the defined explicit sorting of products in this category.

Returns:

  • a sorted collection of online products of this category.

See Also:


getOnlineSubCategories() 

getOnlineSubCategories(): Collection

Returns a sorted collection of currently online subcategories of this catalog category.

  • A category is currently online if its online flag equals true and the current site date is within the date range defined by the onlineFrom and onlineTo attributes.
  • The returned collection is sorted by position. Subcategories marked as "unsorted" always appear after those marked as "sorted" but are otherwise not in any guaranteed order.
  • The returned collection contains direct subcategories only.

Returns:

  • a sorted collection of currently online subcategories.

See Also:


getOnlineTo() 

getOnlineTo(): Date

Returns the date until which the category is online or valid.

Returns:

  • the date until which the category is online or valid.

getOrderableRecommendations() 

getOrderableRecommendations(): Collection

Returns a list of outgoing recommendations for this category. This method behaves similarly to getRecommendations() but additionally filters out recommendations for which the target product is unorderable according to its product availability model.

Returns:

  • the sorted collection of recommendations, never null but possibly empty.

See Also:


getOrderableRecommendations(Number) 

getOrderableRecommendations(type: Number): Collection

Returns a list of outgoing recommendations for this category. This method behaves similarly to getRecommendations(Number) but additionally filters out recommendations for which the target product is unorderable according to its product availability model.

Parameters:

  • type - the recommendation type.

Returns:

  • the sorted collection of recommendations, never null but possibly empty.

See Also:


getOutgoingCategoryLinks() 

getOutgoingCategoryLinks(): Collection

Returns the collection of CategoryLink objects for which this category is the source. If the target category of a link belongs to a different catalog than the catalog owning this category, it is not returned. The collection of links is sorted by the explicitly defined order for this category with unsorted links appearing at the end.

Returns:

  • a collection of CategoryLink objects, possibly empty but not null.

getOutgoingCategoryLinks(Number) 

getOutgoingCategoryLinks(type: Number): Collection

Returns the collection of CategoryLink objects for which this category is the source and which are of the specified type. If the target category of a link belongs to a different catalog than the catalog owning this category, it is not returned. The collection of links is sorted by the explicitly defined order for this category with unsorted links appearing at the end.

Parameters:

  • type - the link type type.

Returns:

  • a collection of CategoryLink objects, possibly empty but not null.

getPageDescription() 

getPageDescription(): String

Returns the page description of this category for the default locale or null if not defined.

Returns:

  • the value of the attribute 'pageDescription'.

getPageKeywords() 

getPageKeywords(): String

Returns the page keywords of this category for the default locale or null if not defined.

Returns:

  • the value of the attribute 'pageKeywords'.

getPageTitle() 

getPageTitle(): String

Returns the page title of this category for the default locale or null if not defined.

Returns:

  • the value of the attribute 'pageTitle'.

getPageURL() 

getPageURL(): String

Returns the page URL property of this category or null if not defined.

Returns:

  • the value of the attribute 'pageURL'.

getParent() 

getParent(): Category

Returns the parent of this category.

Returns:

  • a CatalogCategory instance representing the parent of this CatalogCategory or null.

getProductAttributeModel() 

getProductAttributeModel(): ProductAttributeModel

Returns this category's ProductAttributeModel, which makes access to the category's attribute information convenient. The model is calculated based on the attribute definitions assigned to this category and the global attribute definitions for the object type 'Product'.

Returns:

  • the ProductAttributeModel for this category.

getProducts() 

getProducts(): Collection

Returns all products assigned to this category. The order of products in the returned collection corresponds to the defined explicit sorting of products in this category.

Returns:

  • a sorted collection of all products of this category.

See Also:


getRecommendations() 

getRecommendations(): Collection

Returns the outgoing recommendations for this category. If this category is not in the site catalog, or there is no site catalog, an empty collection is returned. Only recommendations for which the target product exists and is assigned to the site catalog are returned. The recommendations are sorted by their explicitly set order.

Returns:

  • the sorted collection of recommendations, never null but possibly empty.

getRecommendations(Number) 

getRecommendations(type: Number): Collection

Returns the outgoing recommendations for this category which are of the specified type. Behaves the same as getRecommendations() but additionally filters by recommendation type.

Parameters:

  • type - the recommendation type.

Returns:

  • the sorted collection of recommendations, never null but possibly empty.

getSearchPlacement() 

getSearchPlacement(): Number

Returns the search placement of the category or null of no search placement is defined.

Returns:

  • the value of the attribute 'searchPlacement'.

getSearchRank() 

getSearchRank(): Number

Returns the search rank of the category or null of no search rank is defined.

Returns:

  • the value of the attribute 'searchRank'.

getSiteMapChangeFrequency() 

getSiteMapChangeFrequency(): String

Returns the category's sitemap change frequency.

Returns:

  • the value of the attribute 'siteMapChangeFrequency'.

getSiteMapIncluded() 

getSiteMapIncluded(): Number

Returns the category's sitemap inclusion.

Returns:

  • the value of the attribute 'siteMapIncluded'.

getSiteMapPriority() 

getSiteMapPriority(): Number

Returns the category's sitemap priority.

Returns:

  • the value of the attribute 'siteMapPriority'.

getSubCategories() 

getSubCategories(): Collection

Returns a sorted collection of the subcategories of this catalog category, including both online and offline subcategories.

  • The returned collection is sorted by position. Subcategories marked as "unsorted" always appear after those marked as "sorted" but are otherwise not in any guaranteed order.
  • The returned collection contains direct subcategories only.

Returns:

  • a sorted collection of the subcategories.

See Also:


getTemplate() 

getTemplate(): String

Returns the template property value , which is the file name of the template used to display the catalog category.

Returns:

  • the value of the property 'template'.

getThumbnail() 

getThumbnail(): MediaFile

Returns the thumbnail image reference of this catalog category.

Returns:

  • the thumbnail image reference for this category.

hasOnlineProducts() 

hasOnlineProducts(): Boolean

Returns true if this catalog category has any online products assigned. When checking the online status of the product, the online flag and the online from & to dates are taken into account. Online flag, online from & to dates set for the current site takes precedence over the default values.

Returns:

  • true, if this category has at least one online product assigned, false otherwise.

See Also:


hasOnlineSubCategories() 

hasOnlineSubCategories(): Boolean

Returns true if this catalog category has any online subcategories.

  • A category is currently online if its online flag equals true and the current site date is within the date range defined by the onlineFrom and onlineTo attributes.
  • Only direct subcategories are considered.

Returns:

  • true, if this category has at least one online subcategory, false otherwise.

See Also:


isDirectSubCategoryOf(Category) 

isDirectSubCategoryOf(parent: Category): Boolean

Returns true if this category is a direct sub-category of the provided category.

Parameters:

  • parent - The parent category, must not be null.

Returns:

  • True if this category is a direct sub-category of parent, false otherwise.

isOnline() 

isOnline(): Boolean

Returns the value indicating whether the catalog category is "currently online". A category is currently online if its online flag equals true and the current site date is within the date range defined by the onlineFrom and onlineTo attributes.

Returns:

  • true if the category is currently online, false otherwise.

isRoot() 

isRoot(): Boolean

Identifies if the category is the root category of its catalog.

Returns:

  • 'true' if the category is the root category of its catalog, 'false' otherwise.

isSubCategoryOf(Category) 

isSubCategoryOf(ancestor: Category): Boolean

Returns true if this category is a sub-category of the provided category. This can be either a direct or an indirect sub-category.

Parameters:

  • ancestor - The ancestor category, must not be null.

Returns:

  • true if this category is a sub-category of ancestor, false otherwise.

isTopLevel() 

isTopLevel(): Boolean

Returns true if the category is a top level category, but not the root category.

Returns:

  • True if the category is a direct sub-category of the root category, false otherwise.

setDisplayMode(Number) 

setDisplayMode(displayMode: Number): void

Set the category's Variation Groups Display Mode.

Parameters:


setSearchPlacement(Number) 

setSearchPlacement(placement: Number): void

Set the category's search placement.

Parameters:

  • placement - The category's search placement.

setSearchRank(Number) 

setSearchRank(rank: Number): void

Set the category's search rank.

Parameters:

  • rank - The category's search rank.