getCategories()
:
Collection
Returns a collection of all categories to which this product is assigned and which are also available through the current site.
getEAN()
:
String
Returns the European Article Number of the product.
getImages(viewtype
:
String)
:
List
Returns all images assigned to this product for a specific view type, e.g.
getName()
:
String
Returns the name of the product in the current locale.
getOnlineCategories()
:
Collection
Returns a collection of all currently online categories to which this product is assigned and which are also available through the current site.
getOnlineFlag()
:
boolean
Returns the online status flag of the product.
getOnlineTo()
:
Date
Returns the date until which the product is online or valid.
getPageMetaTags()
:
Array
Returns all page meta tags, defined for this instance for which content can be generated.
getProductLinks()
:
Collection
Returns all outgoing ProductLinks, where the target product is also available in the current site.
getProductLinks(type
:
Number)
:
Collection
Returns all outgoing ProductLinks of a specific type, where the target product is also available in the current site.
getProductSetProducts()
:
Collection
Returns a collection of all products which are assigned to this product and which are also available through the current site.
getRecommendations(type
:
Number)
:
Collection
Returns the outgoing recommendations for this product which are of the specified type and which belong to the site catalog.
getTaxClassID()
:
String
Returns the ID of the product's tax class, by resolving the Global Preference setting selected.
getUPC()
:
String
Returns the Universal Product Code of the product.
getVariants()
:
Collection
Returns a collection of all variants assigned to this variation master or variation group product.
includedInBundle(product
:
Product)
:
boolean
Identifies if the specified product participates in this product bundle.
isAssignedToSiteCatalog()
:
boolean
Returns true
if the product is assigned to the current site (via the site catalog), otherwise false
is returned.
isAvailable()
:
boolean
Identifies if the product is available.
isBundle()
:
boolean
Identifies if this product instance is a product bundle.
isBundled()
:
boolean
Identifies if this product instance is bundled within at least one product bundle.
isCategorized()
:
boolean
Identifies if this product is bound to at least one catalog category.
isMaster()
:
boolean
Identifies if this product instance is a product master.
isOnline()
:
boolean
Returns the online status of the product.
isProduct()
:
boolean
Returns 'true' if the instance represents a product.
isProductSet()
:
boolean
Returns 'true' if the instance represents a product set, otherwise 'false'.
isProductSetProduct()
:
boolean
Returns true if this product is part of any product set, otherwise false.
isRetailSet()
:
boolean
Identifies if this product instance is part of a retail set.
isSearchable()
:
boolean
Identifies if the product is searchable.
isSiteProduct()
:
boolean
Returns 'true' if the product is assigned to the current site (via the site catalog), otherwise 'false' is returned.
isVariant()
:
boolean
Identifies if this product instance is mastered by a product master.
isVariationGroup()
:
boolean
Identifies if this product instance is a variation group product.
setAvailableFlag(available
:
boolean)
:
void
Set the availability status flag of the product.
setOnlineFlag(online
:
boolean)
:
void
Set the online status flag of the product for the current site.
setSearchableFlag(searchable
:
boolean)
:
void
Set the flag indicating whether the product is searchable or not in context of the current site.
setSearchPlacement(placement
:
Number)
:
void
Set the product's search placement classification in context of the current site.
setSearchRank(rank
:
Number)
:
void
Set the product's search rank in context of the current site.
assignedToCategory
assignedToCategory(category
:
Category)
:
boolean
Identifies if this product is bound to the specified catalog category.
Parameters:
category
-
the CatalogCategory to check.
Returns:
true if the product is bound to the CatalogCategory, false otherwise.
getActiveData
Returns the active data for this product, for the current site.
Returns:
the active data for this product for the current site.
getAllCategories
Returns a collection of all categories to which this product is assigned.
Returns:
Collection of categories.
getAllCategoryAssignments
Returns all category assignments for this product in any catalog.
Returns:
Collection of category assignments of the product in any catalog.
getAllIncomingProductLinks
Returns all incoming ProductLinks.
Returns:
a collection of all incoming ProductLinks.
getAllIncomingProductLinks
Returns all incoming ProductLinks of a specific type.
Parameters:
type
-
the type of ProductLinks to use.
Returns:
a collection of all incoming ProductLinks of a specific type.
getAllProductLinks
Returns all outgoing ProductLinks.
Returns:
a collection of all outgoing ProductLinks.
getAllProductLinks
Returns all outgoing ProductLinks of a specific type.
Parameters:
type
-
the type of ProductLinks to fetch.
Returns:
a collection of all outgoing ProductLinks of a specific type.
getAllRecommendations
Returns the outgoing recommendations for this product which belong to the
specified catalog. The recommendations are sorted by their explicitly set
order.
Parameters:
catalog
-
the catalog containing the recommendations.
Returns:
the sorted collection of recommendations, never null but possibly empty.
getAllRecommendations
Returns the outgoing recommendations for this product which are of the
specified type and which belong to the specified catalog.
The recommendations are sorted by their explicitly set order.
Parameters:
catalog
-
the catalog containing the recommendations.
type
-
the recommendation type.
Returns:
the sorted collection of recommendations, never null but possibly empty.
getAttributeModel
Returns this product's ProductAttributeModel, which makes access to the
product attribute information convenient. The model is calculated based
on the product attributes assigned to this product's classification
category (or any of it's ancestors) and the global attribute definitions
for the system object type 'Product'. If this product has no
classification category, the attribute model is calculated on the global
attribute definitions only. If this product is a variant, then the
attribute model is calculated based on the classification category of its
corresponding master product.
Returns:
the ProductAttributeModel for this product.
getAvailabilityModel
Returns the availability model, which can be used to determine availability
information for a product.
Returns:
the availability model for a product.
getAvailabilityModel
Returns the availability model of the given inventory list, which can be
used to determine availability information for a product.
Parameters:
list
-
The inventory list to get the availability model for. Must not be null or an exception will be raised.
Returns:
the availability model of the given inventory list for a product.
getAvailableFlag
getAvailableFlag()
:
boolean
Identifies if the product is available.
Returns:
the availability status flag of the product.
getBrand
Returns the Brand of the product.
Returns:
the Brand of the product.
getBundledProductQuantity
Returns the quantity of the specified product within the bundle. If the
specified product is not part of the bundle, a 0 quantity is returned.
Parameters:
aProduct
-
The product to determine the quantity for.
Returns:
The quantity of the product within the bundle or 0 if the product is not part of the bundle.
getBundledProducts
Returns a collection containing all products that participate in the
product bundle.
Returns:
A collection containing all products of the product bundle.
getBundles
Returns a collection of all bundles in which this product is included.
The method only returns bundles assigned to the current site.
Returns:
Collection of bundles in which this product is included, possibly empty.
getCategories
Returns a collection of all categories to which this product is assigned
and which are also available through the current site.
Returns:
Collection of categories to which this product is assigned and which are also available through the current site.
getCategoryAssignment
Returns the category assignment for a specific category.
Parameters:
category
-
the category to use when fetching assignments.
Returns:
The category assignment for a specific category.
getCategoryAssignments
Returns a collection of category assignments for this product in
the current site catalog.
Returns:
Collection of category assignments.
getClassificationCategory
Returns the classification category associated with this Product. A
product has a single classification category which may or may not be in
the site catalog. The classification category defines the attribute set
of the product. See
getAttributeModel() for
how the classification category is used.
Returns:
the associated classification Category, or null if none is associated.
getEAN
Returns the European Article Number of the product.
Returns:
the European Article Number of the product.
getID
Returns the ID of the product.
Returns:
ID of the product.
getImage
Returns the product's image.
Deprecated:
Commerce Cloud Digital introduces a new more powerful product image management. It allows to group product images by self-defined view types (e.g. 'large', 'thumbnail', 'swatch') and variation values (e.g. for attribute color 'red', 'blue'). Images can be annotated with pattern based title and alt. Product images can be accessed from Digital locations or external storage locations.
Please use the new product image management. Therefore you have to set up the common product image settings like view types, image location, default image alt and title for your catalogs first. After that you can group your product images by the previously defined view types in context of a product. Finally use getImages(String) and getImage(String, Number) to access your images.
Returns:
the product's image.
getImage
The method calls
getImages(String) and returns the image at
the specific index. If no image for specified index is available the
method returns null.
Parameters:
viewtype
-
the view type annotated to image
index
-
the index number of the image within image list
Returns:
the MediaFile or null
Throws:
NullArgumentException
-
if viewtype is null
getImage
The method calls
getImages(String) and returns the first image.
If no image is available the method returns null.
When called for a variant with defined images for specified view type the
method returns the first image.
When called for a variant without defined images for specified view type
the method returns the first master product image. If no master product
images are defined, the method returns null.
Parameters:
viewtype
-
the view type annotated to image
Returns:
the MediaFile or null
Throws:
NullArgumentException
-
if viewtype is null
getImages
Returns all images assigned to this product for a specific view type,
e.g. all 'thumbnail' images. The images are returned in the order of
their index number ascending.
When called for a master the method returns the images specific to the
master, which are typically the fall back images.
Parameters:
viewtype
-
the view type annotated to images
Returns:
a list of MediaFile objects, possibly empty
Throws:
NullArgumentException
-
if viewtype is null
getIncomingProductLinks
Returns incoming ProductLinks, where the source product is a site product.
Returns:
a collection of incoming ProductLinks, where the source product is a site product.
getIncomingProductLinks
Returns incoming ProductLinks, where the source product is a site product
of a specific type.
Parameters:
type
-
the type of ProductLinks to fetch.
Returns:
a collection of incoming ProductLinks, where the source product is a site product of a specific type.
getLongDescription
Returns the product's long description in the current locale.
Returns:
The product's long description in the current locale, or null if it wasn't found.
getManufacturerName
getManufacturerName()
:
String
Returns the name of the product manufacturer.
Returns:
the name of the product manufacturer.
getManufacturerSKU
Returns the value of the manufacturer's stock keeping unit.
Returns:
the value of the manufacturer's stock keeping unit.
getMinOrderQuantity
Returns the minimum order quantity for this product.
Returns:
the minimum order quantity of the product.
getName
Returns the name of the product in the current locale.
Returns:
The name of the product for the current locale, or null if it wasn't found.
getOnlineCategories
Returns a collection of all currently online categories to which this
product is assigned and which are also available through the current
site. 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:
Collection of currently online categories to which this product is assigned and which are also available through the current site.
getOnlineFlag
getOnlineFlag()
:
boolean
Returns the online status flag of the product.
Returns:
the online status flag of the product.
getOnlineFrom
Returns the date from which the product is online or valid.
Returns:
the date from which the product is online or valid.
getOnlineTo
Returns the date until which the product is online or valid.
Returns:
the date until which the product is online or valid.
getOptionModel
Returns the product's option model. The option values selections are
initialized with the values defined for the product, or the default values
defined for the option.
Returns:
the products option model.
getOrderableRecommendations
Returns a list of outgoing recommendations for this product. 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.
getOrderableRecommendations
Returns a list of outgoing recommendations for this product. 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.
getPageDescription
Returns product's page description in the default locale.
Returns:
The product's page description in the default locale, or null if it wasn't found.
getPageKeywords
Returns the product's page keywords in the default locale.
Returns:
The product's page keywords in the default locale, or null if it wasn't found.
getPageMetaTag
Returns the page meta tag for the specified id.
The meta tag content is generated based on the product detail page meta tag context and rule. The rule is
obtained from the current product context or inherited from variation groups, master product, the primary
category, up to the root category.
Null will be returned if the meta tag is undefined on the current instance, or if no rule can be found for the
current context, or if the rule resolves to an empty string.
Parameters:
id
-
the ID to get the page meta tag for
Returns:
page meta tag containing content generated based on rules
getPageMetaTags
getPageMetaTags()
:
Array
Returns all page meta tags, defined for this instance for which content can be generated.
The meta tag content is generated based on the product detail page meta tag context and rules. The rules are
obtained from the current product context or inherited from variation groups, master product, the primary
category, up to the root category.
Returns:
page meta tags defined for this instance, containing content generated based on rules
getPageTitle
Returns the product's page title in the default locale.
Returns:
The product's page title in the default locale, or null if it wasn't found.
getPageURL
Returns the product's page URL in the default locale.
Returns:
The product's page URL in the default locale, or null if it wasn't found.
getPriceModel
Returns the price model, which can be used to retrieve a price
for this product.
Returns:
the price model, which can be used to retrieve a price for this product.
getPriceModel
Returns the price model based on the specified optionModel. The
price model can be used to retrieve a price
for this product. Prices are calculated based on the option values
selected in the specified option model.
Parameters:
optionModel
-
the option model to use when fetching the price model.
Returns:
the price model based on the specified optionModel.
getPrimaryCategory
Returns the primary category of the product within the current site catalog.
Returns:
The product's primary category or null.
getPrimaryCategoryAssignment
Returns the category assignment to the primary category in the current site
catalog or null if no primary category is defined within the current site
catalog.
Returns:
The category assignment to the primary category or null.
getProductLinks
Returns all outgoing ProductLinks, where the target product is also
available in the current site. The ProductLinks are unsorted.
Returns:
a collection of outgoing ProductLinks where the target product is also available in the current site.
getProductLinks
Returns all outgoing ProductLinks of a specific type, where the target
product is also available in the current site. The ProductLinks are
sorted.
Parameters:
type
-
the type of ProductLinks to fetch.
Returns:
a collection of outgoing ProductLinks where the target product is also available in the current site.
getProductSetProducts
Returns a collection of all products which are assigned to this product
and which are also available through the current site. If this product
does not represent a product set then an empty collection will be
returned.
Returns:
Collection of products which are assigned to this product and which are also available through the current site.
getProductSets
Returns a collection of all product sets in which this product is included.
The method only returns product sets assigned to the current site.
Returns:
Collection of product sets in which this product is included, possibly empty.
getRecommendations
Returns the outgoing recommendations for this product which
belong to the site catalog. If this product is not assigned to 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
Returns the outgoing recommendations for this product which are of the
specified type and which belong to the site catalog. 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.
getSearchableFlag
getSearchableFlag()
:
boolean
Returns, whether the product is currently searchable.
Returns:
the searchable status flag of the product.
getSearchableIfUnavailableFlag
getSearchableIfUnavailableFlag()
:
boolean
Returns the searchable status of the
Product if unavailable.
Besides
true
or
false
, the return value
null
indicates that the value is not set.
Returns:
The searchable status of the product if unavailable or null
if not set.
getSearchPlacement
Returns the product's search placement classification. The higher the
numeric product placement value, the more relevant is the product when
sorting search results. The range of numeric placement values is
defined in the meta data of object type 'Product' and can therefore be
customized.
Returns:
The product's search placement classification.
getSearchRank
Returns the product's search rank. The higher the numeric product rank,
the more relevant is the product when sorting search results. The range of
numeric rank values is defined in the meta data of object type 'Product'
and can therefore be customized.
Returns:
The product's search rank.
getShortDescription
Returns the product's short description in the current locale.
Returns:
the product's short description in the current locale, or null if it wasn't found.
getSiteMapChangeFrequency
getSiteMapChangeFrequency()
:
String
Returns the product's change frequency needed for the sitemap creation.
Returns:
The product's sitemap change frequency.
getSiteMapIncluded
Returns the status if the product is included into the sitemap.
Returns:
the value of the attribute 'siteMapIncluded'.
getSiteMapPriority
Returns the product's priority needed for the sitemap creation.
Returns:
The product's sitemap priority.
getStepQuantity
Returns the steps in which the order amount of the product can be
increased.
Returns:
the order amount by which the product can be increased.
getStoreReceiptName
getStoreReceiptName()
:
String
Returns the store receipt name of the product in the current locale.
Returns:
The store receipt name of the product for the current locale, or null if it wasn't found.
getStoreTaxClass
Returns the store tax class ID.
This is an optional override for in-store tax calculation.
Returns:
the store tax class id.
getTaxClassID
Returns the ID of the product's tax class, by resolving
the Global Preference setting selected. If the Localized
Tax Class setting under Global Preferences -> Products is
selected, the localizedTaxClassID attribute value will be
returned, else the legacy taxClassID attribute value will
be returned.
Returns:
the ID of the product's tax class depending on the Global Preference setting selected for Products.
getTemplate
Returns the name of the product's rendering template.
Returns:
the name of the product's rendering template.
getThumbnail
Returns the product's thumbnail image.
Deprecated:
Commerce Cloud Digital introduces a new more powerful product image management. It allows to group product images by self-defined view types (e.g. 'large', 'thumbnail', 'swatch') and variation values (e.g. for attribute color 'red', 'blue'). Images can be annotated with pattern based title and alt. Product images can be accessed from Digital locations or external storage locations.
Please use the new product image management. Therefore you have to set up the common product image settings like view types, image location, default image alt and title for your catalogs first. After that you can group your product images by the previously defined view types in context of a product. Finally use getImages(String) and getImage(String, Number) to access your images.
Returns:
the product's thumbnail image.
getUnit
Returns the product's sales unit.
Returns:
the products sales unit.
getUnitQuantity
Returns the product's unit quantity.
Returns:
the products unit quantity.
getUPC
Returns the Universal Product Code of the product.
Returns:
the Universal Product Code of the product.
getVariants
Returns a collection of all variants assigned to this variation master
or variation group product. All variants are returned regardless of whether
they are online or offline.
If this product does not represent a variation master or variation group
product then an empty collection is returned.
Returns:
Collection of variants associated with this variation master or variation group product.
getVariationGroups
Returns a collection of all variation groups assigned to this variation
master product. All variation groups are returned regardless of whether
they are online or offline.
If this product does not represent a variation master product then an
empty collection is returned.
Returns:
Collection of variation groups associated with this variation master product.
getVariationModel
Returns the variation model of this product. If this product is a master
product, then the returned model will encapsulate all the information
about its variation attributes and variants. If this product is a variant
product, then the returned model will encapsulate all the same
information, but additionally pre-select all the variation attribute
values of this variant. (See
ProductVariationModel for
details on what "selected" means.) If this product is neither a master
product or a variation product, then a model will be returned but will be
essentially empty and not useful for any particular purpose.
Returns:
the variation model of the product.
includedInBundle
includedInBundle(product
:
Product)
:
boolean
Identifies if the specified product participates in this product bundle.
If this product does not represent a bundle at all, then false will
always be returned.
Parameters:
product
-
the product to check for participation.
Returns:
true if the product participates in the bundle, false otherwise.
isAssignedToCategory
isAssignedToCategory(category
:
Category)
:
boolean
Returns 'true' if item is assigned to the specified
category.
Parameters:
category
-
the category to check.
Returns:
true if item is assigned to category.
isAssignedToSiteCatalog
isAssignedToSiteCatalog()
:
boolean
Returns
true
if the product is assigned to the current site (via the site catalog), otherwise
false
is returned.
In case of the product being a variant, the variant will be considered as assigned if its master, one of the
variation groups it is in or itself is assigned to the site catalog. In case this is triggered for a variation
group the variation group is considered as assigned if its master or itself is assigned.
Returns:
'true' if product assigned to the site catalog
isAvailable
isAvailable()
:
boolean
Identifies if the product is available.
Returns:
the value of the attribute 'available'.
isBundle
isBundle()
:
boolean
Identifies if this product instance is a product bundle.
Returns:
true if the product is a bundle, false otherwise.
isBundled
isBundled()
:
boolean
Identifies if this product instance is bundled within at least one
product bundle.
Returns:
true if the product is bundled, false otherwise.
isCategorized
isCategorized()
:
boolean
Identifies if this product is bound to at least one catalog category.
Returns:
true if the product is bound to at least one catalog category, false otherwise.
isFacebookEnabled
isFacebookEnabled()
:
boolean
Identifies if the product is Facebook enabled.
Returns:
the value of the attribute 'facebookEnabled'.
isMaster
isMaster()
:
boolean
Identifies if this product instance is a product master.
Returns:
true if the product is a master, false otherwise.
isOnline
isOnline()
:
boolean
Returns the online status of the product. The online status
is calculated from the online status flag and the onlineFrom
onlineTo dates defined for the product.
Returns:
the online status of the product.
isOptionProduct
isOptionProduct()
:
boolean
Identifies if the product has options.
Returns:
true if product has options, false otherwise.
isPinterestEnabled
isPinterestEnabled()
:
boolean
Identifies if the product is Pinterest enabled.
Returns:
the value of the attribute 'pinterestEnabled'.
isProduct
isProduct()
:
boolean
Returns 'true' if the instance represents a product. Returns 'false' if
the instance represents a product set.
Returns:
true if the instance is a product, false otherwise.
isProductSet
isProductSet()
:
boolean
Returns 'true' if the instance represents a product set, otherwise 'false'.
Returns:
true if the instance is a product set, false otherwise.
isProductSetProduct
isProductSetProduct()
:
boolean
Returns true if this product is part of any product set, otherwise false.
Returns:
true if the product is part of any product set, false otherwise.
isRetailSet
isRetailSet()
:
boolean
Identifies if this product instance is part of a retail set.
Returns:
true if the product is part of a retail set, false otherwise.
isSearchable
isSearchable()
:
boolean
Identifies if the product is searchable.
Returns:
the value of the attribute 'searchable'.
isSiteProduct
isSiteProduct()
:
boolean
Returns 'true' if the product is assigned to the current site (via the
site catalog), otherwise 'false' is returned.
Returns:
'true' if product assigned to site.
isVariant
isVariant()
:
boolean
Identifies if this product instance is mastered by a product master.
Returns:
true if the product is mastered, false otherwise.
isVariationGroup
isVariationGroup()
:
boolean
Identifies if this product instance is a variation group product.
Returns:
true if the product is a variation group, false otherwise.
setAvailableFlag
setAvailableFlag(available
:
boolean)
:
void
Set the availability status flag of the product.
Deprecated:
Don't use this method anymore.
Parameters:
available
-
Availability status flag.
setOnlineFlag
setOnlineFlag(online
:
boolean)
:
void
Set the online status flag of the product for the current site. If current site is not available (i.e.
in case this method is called by a job that runs on organization level) the online status flag is set global,
which can affect all sites.
In previous versions this method set the online status flag global, instead of site specific.
API Versioned:
From version 10.6.
In prior versions this method set the online status flag global, instead of site specific.
Parameters:
online
-
Online status flag.
setSearchableFlag
setSearchableFlag(searchable
:
boolean)
:
void
Set the flag indicating whether the product is searchable or not in context of the current site. If current site
is not available (i.e. in case this method is called by a job that runs on organization level) the searchable
flag is set global, which can affect all sites.
In previous versions this method set the searchable flag global, instead of site specific.
API Versioned:
From version 10.6.
In prior versions this method set the searchable flag global, instead of site specific.
Parameters:
searchable
-
The value of the attribute 'searchable'.
setSearchPlacement
setSearchPlacement(placement
:
Number)
:
void
Set the product's search placement classification in context of the current site. If current site is not
available (i.e. in case this method is called by a job that runs on organization level) the search placement is
set global, which can affect all sites.
In previous versions this method set the search placement classification global, instead of site specific.
API Versioned:
From version 10.6.
In prior versions this method set the search placement classification global, instead of site specific.
Parameters:
placement
-
The product's search placement classification.
setSearchRank
setSearchRank(rank
:
Number)
:
void
Set the product's search rank in context of the current site. If current site is not available (i.e. in case this
method is called by a job that runs on organization level) the search rank is set global, which can affect all
sites.
In previous versions this method set the search rank global, instead of site specific.
API Versioned:
From version 10.6.
In prior versions this method set the search rank global, instead of site specific.
Parameters:
rank
-
The product's search rank.