Class Variant

Represents a variant of a product variation. If the variant does not define an own value, the value is retrieved by fallback from variation groups (sorted by their position) or the variation master.

PropertyDescription
EAN: String (read-only)Returns the EAN of the product variant.
UPC: String (read-only)Returns the UPC of the product variant.
allProductLinks: Collection (read-only)Returns all product links of the product variant.
brand: String (read-only)Returns the brand of the product variant.
classificationCategory: Category (read-only)Returns the classification category of the product variant.
custom: CustomAttributes (read-only)Returns the custom attributes of the variant.
image: MediaFile (read-only)Returns the image of the product variant.
longDescription: MarkupText (read-only)Returns the long description of the product variant.
manufacturerName: String (read-only)Returns the manufacturer name of the product variant.
manufacturerSKU: String (read-only)Returns the manufacturer sku of the product variant.
masterProduct: Product (read-only)Returns the ProductMaster for this mastered product.
name: String (read-only)Returns the name of the product variant.
onlineFrom: Date (read-only)Returns the onlineFrom date of the product variant.
onlineTo: Date (read-only)Returns the onlineTo date of the product variant.
optionProduct: Boolean (read-only)Returns 'true' if the variant has any options, otherwise 'false'.
pageDescription: String (read-only)Returns the pageDescription of the product variant.
pageKeywords: String (read-only)Returns the pageKeywords of the product variant.
pageTitle: String (read-only)Returns the pageTitle of the product variant.
pageURL: String (read-only)Returns the pageURL of the product variant.
productLinks: Collection (read-only)Returns all product links of the product variant for which the target product is assigned to the current site catalog.
shortDescription: MarkupText (read-only)Returns the short description of the product variant.
taxClassID: String (read-only)Returns the tax class id of the product variant.
template: String (read-only)Returns the rendering template name of the product variant.
thumbnail: MediaFile (read-only)Returns the thumbnail image of the product variant.
unit: String (read-only)Returns the sales unit of the product variant as defined by the master product.
unitQuantity: Quantity (read-only)Returns the unitQuantity of the product variant as defined by the master product.

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

MethodDescription
getAllProductLinks()Returns all product links of the product variant.
getAllProductLinks(Number)Returns all product links of the specified type of the product variant.
getBrand()Returns the brand of the product variant.
getClassificationCategory()Returns the classification category of the product variant.
getCustom()Returns the custom attributes of the variant.
getEAN()Returns the EAN of the product variant.
getImage()Returns the image of the product variant.
getLongDescription()Returns the long description of the product variant.
getManufacturerName()Returns the manufacturer name of the product variant.
getManufacturerSKU()Returns the manufacturer sku of the product variant.
getMasterProduct()Returns the ProductMaster for this mastered product.
getName()Returns the name of the product variant.
getOnlineFrom()Returns the onlineFrom date of the product variant.
getOnlineTo()Returns the onlineTo date of the product variant.
getPageDescription()Returns the pageDescription of the product variant.
getPageKeywords()Returns the pageKeywords of the product variant.
getPageTitle()Returns the pageTitle of the product variant.
getPageURL()Returns the pageURL of the product variant.
getProductLinks()Returns all product links of the product variant for which the target product is assigned to the current site catalog.
getProductLinks(Number)Returns all product links of the specified type of the product variant for which the target product is assigned to the current site catalog.
getRecommendations(Number)Retrieve the sorted collection of recommendations of the specified type for this product variant.
getShortDescription()Returns the short description of the product variant.
getTaxClassID()Returns the tax class id of the product variant.
getTemplate()Returns the rendering template name of the product variant.
getThumbnail()Returns the thumbnail image of the product variant.
getUPC()Returns the UPC of the product variant.
getUnit()Returns the sales unit of the product variant as defined by the master product.
getUnitQuantity()Returns the unitQuantity of the product variant as defined by the master product.
isOptionProduct()Returns 'true' if the variant has any options, otherwise 'false'.

assignedToCategory, getActiveData, getAllCategories, getAllCategoryAssignments, getAllIncomingProductLinks, getAllIncomingProductLinks, getAllProductLinks, getAllProductLinks, getAllRecommendations, getAllRecommendations, getAttributeModel, getAvailabilityModel, getAvailabilityModel, getAvailableFlag, getBrand, getBundledProductQuantity, getBundledProducts, getBundles, getCategories, getCategoryAssignment, getCategoryAssignments, getClassificationCategory, getEAN, getID, getImage, getImage, getImage, getImages, getIncomingProductLinks, getIncomingProductLinks, getLongDescription, getManufacturerName, getManufacturerSKU, getMinOrderQuantity, getName, getOnlineCategories, getOnlineFlag, getOnlineFrom, getOnlineTo, getOptionModel, getOrderableRecommendations, getOrderableRecommendations, getPageDescription, getPageKeywords, getPageMetaTag, getPageMetaTags, getPageTitle, getPageURL, getPriceModel, getPriceModel, getPrimaryCategory, getPrimaryCategoryAssignment, getProductLinks, getProductLinks, getProductSetProducts, getProductSets, getRecommendations, getRecommendations, getSearchPlacement, getSearchRank, getSearchableFlag, getSearchableIfUnavailableFlag, getShortDescription, getSiteMapChangeFrequency, getSiteMapIncluded, getSiteMapPriority, getStepQuantity, getStoreReceiptName, getStoreTaxClass, getTaxClassID, getTemplate, getThumbnail, getUPC, getUnit, getUnitQuantity, getVariants, getVariationGroups, getVariationModel, includedInBundle, isAssignedToCategory, isAssignedToSiteCatalog, isAvailable, isBundle, isBundled, isCategorized, isFacebookEnabled, isMaster, isOnline, isOptionProduct, isPinterestEnabled, isProduct, isProductSet, isProductSetProduct, isRetailSet, isSearchable, isSiteProduct, isVariant, isVariationGroup, setAvailableFlag, setOnlineFlag, setOnlineFlag, setSearchPlacement, setSearchPlacement, setSearchRank, setSearchRank, setSearchableFlag, setSearchableFlag

describe, getCustom

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

EAN: String (read-only)

Returns the EAN of the product variant.

If the variant does not define an own value for 'EAN', the value is retrieved from the assigned variation groups, sorted by their position.

If none of the variation groups define a value for 'EAN', the value of the master product is returned.


UPC: String (read-only)

Returns the UPC of the product variant.

If the variant does not define an own value for 'UPC', the value is retrieved from the assigned variation groups, sorted by their position.

If none of the variation groups define a value for 'UPC', the value of the master product is returned.


allProductLinks: Collection (read-only)

Returns all product links of the product variant.

If the variant does not define any product links, the product links are retrieved from the assigned variation groups, sorted by their position.

If none of the variation groups define any product links, the product links are retrieved from the master product.


brand: String (read-only)

Returns the brand of the product variant.

If the variant does not define an own value for 'brand', the value is retrieved from the assigned variation groups, sorted by their position.

If none of the variation groups define a value for 'brand', the value of the master product is returned.


classificationCategory: Category (read-only)

Returns the classification category of the product variant.

Please note that the classification category is always inherited from the master and cannot be overridden by the variant.


custom: CustomAttributes (read-only)

Returns the custom attributes of the variant.

Custom attributes are inherited from the master product and can be overridden by the variant.


image: MediaFile (read-only)

Returns the image of the product variant.

If the variant does not define an own value for 'image', the value is retrieved from the assigned variation groups, sorted by their position.

If none of the variation groups define a value for 'image', the value of the master product is returned.


longDescription: MarkupText (read-only)

Returns the long description of the product variant.

If the variant does not define an own value for 'longDescription', the value is retrieved from the assigned variation groups, sorted by their position.

If none of the variation groups define a value for 'longDescription', the value of the master product is returned.


manufacturerName: String (read-only)

Returns the manufacturer name of the product variant.

If the variant does not define an own value for 'manufacturerName', the value is retrieved from the assigned variation groups, sorted by their position.

If none of the variation groups define a value for 'manufacturerName', the value of the master product is returned.


manufacturerSKU: String (read-only)

Returns the manufacturer sku of the product variant.

If the variant does not define an own value for 'manufacturerSKU', the value is retrieved from the assigned variation groups, sorted by their position.

If none of the variation groups define a value for 'manufacturerSKU', the value of the master product is returned.


masterProduct: Product (read-only)

Returns the ProductMaster for this mastered product.


name: String (read-only)

Returns the name of the product variant.

If the variant does not define an own value for 'name', the value is retrieved from the assigned variation groups, sorted by their position.

If none of the variation groups define a value for 'name', the value of the master product is returned.


onlineFrom: Date (read-only)

Returns the onlineFrom date of the product variant.

If the variant does not define an own value for 'onlineFrom', the value is retrieved from the assigned variation groups, sorted by their position.

If none of the variation groups define a value for 'onlineFrom', the value of the master product is returned.


onlineTo: Date (read-only)

Returns the onlineTo date of the product variant.

If the variant does not define an own value for 'onlineTo', the value is retrieved from the assigned variation groups, sorted by their position.

If none of the variation groups define a value for 'onlineTo', the value of the master product is returned.


optionProduct: Boolean (read-only)

Returns 'true' if the variant has any options, otherwise 'false'. Method also returns 'true' if the variant has not any options, but the related variation groups (sorted by position) or master product has options.


pageDescription: String (read-only)

Returns the pageDescription of the product variant.

If the variant does not define an own value for 'pageDescription', the value is retrieved from the assigned variation groups, sorted by their position.

If none of the variation groups define a value for 'pageDescription', the value of the master product is returned.


pageKeywords: String (read-only)

Returns the pageKeywords of the product variant.

If the variant does not define an own value for 'pageKeywords', the value is retrieved from the assigned variation groups, sorted by their position.

If none of the variation groups define a value for 'pageKeywords', the value of the master product is returned.


pageTitle: String (read-only)

Returns the pageTitle of the product variant.

If the variant does not define an own value for 'pageTitle', the value is retrieved from the assigned variation groups, sorted by their position.

If none of the variation groups define a value for 'pageTitle', the value of the master product is returned.


pageURL: String (read-only)

Returns the pageURL of the product variant.

If the variant does not define an own value for 'pageURL', the value is retrieved from the assigned variation groups, sorted by their position.

If none of the variation groups define a value for 'pageURL', the value of the master product is returned.


productLinks: Collection (read-only)

Returns all product links of the product variant for which the target product is assigned to the current site catalog.

If the variant does not define any product links, the product links are retrieved from the assigned variation groups, sorted by their position

If none of the variation groups define any product links, the product links are retrieved from the master product.


shortDescription: MarkupText (read-only)

Returns the short description of the product variant.

If the variant does not define an own value for 'shortDescription', the value is retrieved from the assigned variation groups, sorted by their position.

If none of the variation groups define a value for 'shortDescription', the value of the master product is returned.


taxClassID: String (read-only)

Returns the tax class id of the product variant.

If the variant does not define an own value for 'taxClassID', the value is retrieved from the assigned variation groups, sorted by their position.

If none of the variation groups define a value for 'taxClassID', the value of the master product is returned.


template: String (read-only)

Returns the rendering template name of the product variant.

If the variant does not define an own value for 'template', the value is retrieved from the assigned variation groups, sorted by their position.

If none of the variation groups define a value for 'template', the value of the master product is returned.


thumbnail: MediaFile (read-only)

Returns the thumbnail image of the product variant.

If the variant does not define an own value for 'thumbnail', the value is retrieved from the assigned variation groups, sorted by their position.

If none of the variation groups define a value for 'thumbnail', the value of the master product is returned.


unit: String (read-only)

Returns the sales unit of the product variant as defined by the master product.

If the variant does not define an own value for 'unit', the value is retrieved from the assigned variation groups, sorted by their position.

If none of the variation groups define a value for 'unit', the value of the master product is returned.


unitQuantity: Quantity (read-only)

Returns the unitQuantity of the product variant as defined by the master product.

If the variant does not define an own value for 'unitQuantity', the value is retrieved from the assigned variation groups, sorted by their position.

If none of the variation groups define a value for 'unitQuantity', the value of the master product is returned.


getAllProductLinks(): Collection

Returns all product links of the product variant.

If the variant does not define any product links, the product links are retrieved from the assigned variation groups, sorted by their position.

If none of the variation groups define any product links, the product links are retrieved from the master product.

Returns:

  • All product links of the variant, variation group or master

getAllProductLinks(type: Number): Collection

Returns all product links of the specified type of the product variant.

If the variant does not define any product links of the specified type, the product links are retrieved for the specified type from the assigned variation groups, sorted by their position.

If none of the variation groups define any product links of the specified type, the product links are retrieved for the specified type from the master product.

Parameters:

  • type - Type of the product link

Returns:

  • Product links of specified type of the variant, variation group or master

getBrand(): String

Returns the brand of the product variant.

If the variant does not define an own value for 'brand', the value is retrieved from the assigned variation groups, sorted by their position.

If none of the variation groups define a value for 'brand', the value of the master product is returned.

Returns:

  • The brand of the variant, variation group or master

getClassificationCategory(): Category

Returns the classification category of the product variant.

Please note that the classification category is always inherited from the master and cannot be overridden by the variant.

Returns:

  • The classification category as defined for the master product of the variant

getCustom(): CustomAttributes

Returns the custom attributes of the variant.

Custom attributes are inherited from the master product and can be overridden by the variant.

Returns:

  • the custom attributes of the variant.

getEAN(): String

Returns the EAN of the product variant.

If the variant does not define an own value for 'EAN', the value is retrieved from the assigned variation groups, sorted by their position.

If none of the variation groups define a value for 'EAN', the value of the master product is returned.

Returns:

  • The EAN of the variant, variation group or master

getImage(): MediaFile

Returns the image of the product variant.

If the variant does not define an own value for 'image', the value is retrieved from the assigned variation groups, sorted by their position.

If none of the variation groups define a value for 'image', the value of the master product is returned.

Returns:

  • The image of the variant, variation group or master

getLongDescription(): MarkupText

Returns the long description of the product variant.

If the variant does not define an own value for 'longDescription', the value is retrieved from the assigned variation groups, sorted by their position.

If none of the variation groups define a value for 'longDescription', the value of the master product is returned.

Returns:

  • The long description of the variant, variation group or master

getManufacturerName(): String

Returns the manufacturer name of the product variant.

If the variant does not define an own value for 'manufacturerName', the value is retrieved from the assigned variation groups, sorted by their position.

If none of the variation groups define a value for 'manufacturerName', the value of the master product is returned.

Returns:

  • The manufacturer name of the variant, variation group or master

getManufacturerSKU(): String

Returns the manufacturer sku of the product variant.

If the variant does not define an own value for 'manufacturerSKU', the value is retrieved from the assigned variation groups, sorted by their position.

If none of the variation groups define a value for 'manufacturerSKU', the value of the master product is returned.

Returns:

  • The manufacturer sku of the variant, variation group or master

getMasterProduct(): Product

Returns the ProductMaster for this mastered product.

Returns:

  • the ProductMaster of this mastered product

getName(): String

Returns the name of the product variant.

If the variant does not define an own value for 'name', the value is retrieved from the assigned variation groups, sorted by their position.

If none of the variation groups define a value for 'name', the value of the master product is returned.

Returns:

  • The name of the variant, variation group or master

getOnlineFrom(): Date

Returns the onlineFrom date of the product variant.

If the variant does not define an own value for 'onlineFrom', the value is retrieved from the assigned variation groups, sorted by their position.

If none of the variation groups define a value for 'onlineFrom', the value of the master product is returned.

Returns:

  • The onlineFrom date of the variant, variation group or master

getOnlineTo(): Date

Returns the onlineTo date of the product variant.

If the variant does not define an own value for 'onlineTo', the value is retrieved from the assigned variation groups, sorted by their position.

If none of the variation groups define a value for 'onlineTo', the value of the master product is returned.

Returns:

  • The onlineTo date of the variant, variation group or master

getPageDescription(): String

Returns the pageDescription of the product variant.

If the variant does not define an own value for 'pageDescription', the value is retrieved from the assigned variation groups, sorted by their position.

If none of the variation groups define a value for 'pageDescription', the value of the master product is returned.

Returns:

  • The pageDescription of the variant, variation group or master

getPageKeywords(): String

Returns the pageKeywords of the product variant.

If the variant does not define an own value for 'pageKeywords', the value is retrieved from the assigned variation groups, sorted by their position.

If none of the variation groups define a value for 'pageKeywords', the value of the master product is returned.

Returns:

  • The pageKeywords of the variant, variation group or master

getPageTitle(): String

Returns the pageTitle of the product variant.

If the variant does not define an own value for 'pageTitle', the value is retrieved from the assigned variation groups, sorted by their position.

If none of the variation groups define a value for 'pageTitle', the value of the master product is returned.

Returns:

  • The pageTitle of the variant, variation group or master

getPageURL(): String

Returns the pageURL of the product variant.

If the variant does not define an own value for 'pageURL', the value is retrieved from the assigned variation groups, sorted by their position.

If none of the variation groups define a value for 'pageURL', the value of the master product is returned.

Returns:

  • The pageURL of the variant, variation group or master

getProductLinks(): Collection

Returns all product links of the product variant for which the target product is assigned to the current site catalog.

If the variant does not define any product links, the product links are retrieved from the assigned variation groups, sorted by their position

If none of the variation groups define any product links, the product links are retrieved from the master product.

Returns:

  • Product links of the variant, variation group or master

getProductLinks(type: Number): Collection

Returns all product links of the specified type of the product variant for which the target product is assigned to the current site catalog.

If the variant does not define any product links of the specified type, the product links are retrieved for the specified type from the assigned variation groups, sorted by their position

If none of the variation groups define any product links of the specified type, the product links are retrieved for the specified type from the master product.

Parameters:

  • type - Type of the product link

Returns:

  • Product links of specified type of the variant, variation group or master

getRecommendations(type: Number): Collection

Retrieve the sorted collection of recommendations of the specified type for this product variant. The types (cross-sell, up-sell, etc) are enumerated in the dw.catalog.Recommendation class. Only recommendations which are stored in the current site catalog are returned. Furthermore, a recommendation is only returned if the target of the recommendation is assigned to the current site catalog.

If the variant does not define any recommendations, recommendations are retrieved from the assigned variation groups, sorted by their position.

If none of the variation groups define any recommendations, the recommendations of the master are returned.

Parameters:

  • type - the recommendation type

Returns:

  • the sorted collection, never null but possibly empty.

getShortDescription(): MarkupText

Returns the short description of the product variant.

If the variant does not define an own value for 'shortDescription', the value is retrieved from the assigned variation groups, sorted by their position.

If none of the variation groups define a value for 'shortDescription', the value of the master product is returned.

Returns:

  • The short description of the variant, variation group or master

getTaxClassID(): String

Returns the tax class id of the product variant.

If the variant does not define an own value for 'taxClassID', the value is retrieved from the assigned variation groups, sorted by their position.

If none of the variation groups define a value for 'taxClassID', the value of the master product is returned.

Returns:

  • The tax class id of the variant, variation group or master

getTemplate(): String

Returns the rendering template name of the product variant.

If the variant does not define an own value for 'template', the value is retrieved from the assigned variation groups, sorted by their position.

If none of the variation groups define a value for 'template', the value of the master product is returned.

Returns:

  • The rendering template name of the variant, variation group or master

getThumbnail(): MediaFile

Returns the thumbnail image of the product variant.

If the variant does not define an own value for 'thumbnail', the value is retrieved from the assigned variation groups, sorted by their position.

If none of the variation groups define a value for 'thumbnail', the value of the master product is returned.

Returns:

  • The thumbnail image of the variant, variation group or master

getUPC(): String

Returns the UPC of the product variant.

If the variant does not define an own value for 'UPC', the value is retrieved from the assigned variation groups, sorted by their position.

If none of the variation groups define a value for 'UPC', the value of the master product is returned.

Returns:

  • The UPC of the variant, variation group or master

getUnit(): String

Returns the sales unit of the product variant as defined by the master product.

If the variant does not define an own value for 'unit', the value is retrieved from the assigned variation groups, sorted by their position.

If none of the variation groups define a value for 'unit', the value of the master product is returned.

Returns:

  • The sales unit of the variant, variation group or master

getUnitQuantity(): Quantity

Returns the unitQuantity of the product variant as defined by the master product.

If the variant does not define an own value for 'unitQuantity', the value is retrieved from the assigned variation groups, sorted by their position.

If none of the variation groups define a value for 'unitQuantity', the value of the master product is returned.

Returns:

  • The unitQuantity of the variant, variation group or master

isOptionProduct(): Boolean

Returns 'true' if the variant has any options, otherwise 'false'. Method also returns 'true' if the variant has not any options, but the related variation groups (sorted by position) or master product has options.

Returns:

  • true if the variant has any options, false otherwise.