Interface Product
- All Superinterfaces:
Indexable,org.broadleafcommerce.common.copy.MultiTenantCloneable<Product>,Serializable
- All Known Subinterfaces:
ProductBundle
- All Known Implementing Classes:
ProductBundleImpl,ProductImpl
public interface Product
extends Serializable, org.broadleafcommerce.common.copy.MultiTenantCloneable<Product>, Indexable
Implementations of this interface are used to hold data for a Product. A product is a general description
of an item that can be sold (for example: a hat). Products are not sold or added to a cart.
You should implement this class if you want to make significant changes to how the Product is persisted. If you just want to add additional fields then you should extend
Skus
which are specific items (for example: a XL Blue Hat) are sold or added to a cart.
You should implement this class if you want to make significant changes to how the Product is persisted. If you just want to add additional fields then you should extend
ProductImpl.- Author:
- btaylor
-
Method Summary
Modifier and TypeMethodDescriptionvoidRemoves any currently stored dynamic pricingReturns the last date a product will be available that is used to determine whether to display the product.Returns the first date a product will be available that is used to determine whether to display the product.Gets all the additional Skus associated with this Product.Deprecated.Use getAllParentCategoryXrefs() instead.Returns all parentCategoryids this product is associated with.Retrieve all the xref entities linking this product to parent categoriesReturns all skus that are sellable.Convenience method for returning all of the media associated with this Product by adding all the media ingetDefaultSku()as well as all the media in the Skus represented bygetAdditionalSkus()Returns all theSkus that are associated with this Product (includinggetDefaultSku()) regardless of whether or not theSkus are active or not
Note: in the event that the default Sku was added to the list ofgetAdditionalSkus(), it is filtered out so that only a single instance ofgetDefaultSku()is contained in the resulting listGets the canonical URL of the productReturn theCategorythat contains this productorg.broadleafcommerce.common.vendor.service.type.ContainerShapeTypeGets the dimension container shape
Note: this is a convenience method that merely serves as a pass-through to the same method viagetDefaultSku()Returns a List of this product's related Cross SalesReturns a list of the cross sale products for this product as well all cross sale products in all parent categories of this product.Returns a list of the upsale products for this product as well as all upsale products in all parent categories of this product.Deprecated.usegetCategory()insteadGets the defaultSkuassociated with this Product.getDepth()Returns the dimension depth
Note: this is a convenience method that merely serves as a pass-through to the same method viagetDefaultSku()Returns a brief description of the product that is used for display.Returns theDimensionfor this product
Note: this is a convenience method that merely serves as a pass-through to the same method viagetDefaultSku()Returns a String representation of the dimension
Note: this is a convenience method that merely serves as a pass-through to the same method viagetDefaultSku()Returns the name of a display template that is used to render this product.Generates a URL that can be used to access the product.getGirth()Gets the dimension girth
Note: this is a convenience method that merely serves as a pass-through to the same method viagetDefaultSku()Returns the dimension height
Note: this is a convenience method that merely serves as a pass-through to the same method viagetDefaultSku()getId()The id of the Product.Returns a long description of the product that is used for display.Returns the manufacture name for this productorg.broadleafcommerce.common.money.Moneyadded just for convenience, references defaultSku.margingetMedia()Gets the media for this product.Gets the meta data description of the productGets the meta data title of the productgetModel()Returns the model number of the productgetName()Returns the name of the product that is used for display purposes.The specifiedPromotionMessages for this Product that will override the Offer's defaultPromotionMessage.org.broadleafcommerce.common.money.MoneygetPrice()Convenience method, references defaultSku.priceGeneric key-value pair of attributes to associate to this Product for maximum extensibility.Deprecated.use getProductOptionXrefs insteadReturns a Map of product option values, keyed by the product option name.Gets the promotional message for this Product.org.broadleafcommerce.common.money.MoneyConvenience method, references to defaultSku.retailPriceorg.broadleafcommerce.common.money.MoneyConvenience method, references defaultSku.salePriceorg.broadleafcommerce.common.vendor.service.type.ContainerSizeTypegetSize()Returns the dimension container sizegetSkus()Deprecated.use#getAdditionalSkusXrefs()insteadReturns the tax code of the product.Returns a List of this product's related Up SalesgetUrl()A product can have a designated URL.Sets a url-fragment.Returns the weight of the product
Note: this is a convenience method that merely serves as a pass-through to the same method viagetDefaultSku()getWidth()Returns the dimension width
Note: this is a convenience method that merely serves as a pass-through to the same method viagetDefaultSku()booleanIn most implementations, including the default Broadleaf demo store, if a product doesn't have a retail price, it can't be sold.booleanisActive()Returns a boolean that indicates if the product is currently active.booleanisOnSale()Convenience method, references defaultSku.onSalevoidsetActiveEndDate(Date activeEndDate) Sets the last date a product will be available that is used to determine whether to display the product.voidsetActiveStartDate(Date activeStartDate) Sets the first date a product will be available that is used to determine whether to display the product.voidsetAdditionalSkus(List<Sku> skus) Sets the additional Skus associated to this Product.voidsetAllParentCategories(List<Category> allParentCategories) Deprecated.Use setAllParentCategoryXrefs() instead.voidsetAllParentCategoryXrefs(List<CategoryProductXref> allParentCategories) Set all the xref entities linking this product to parent categoriesvoidsetCanonicalUrl(String canonicalUrl) Sets the canonical URL of the productvoidsetCanSellWithoutOptions(Boolean canSellWithoutOptions) Sets whether or not the default sku can be sold in the case that no product options are specified.voidsetCategory(Category category) Set theCategorythat contains this productvoidsetContainer(org.broadleafcommerce.common.vendor.service.type.ContainerShapeType container) Sets the dimension container shape
Note: this is a convenience method that merely serves as a pass-through to the same method viagetDefaultSku()voidsetCrossSaleProducts(List<RelatedProduct> crossSaleProducts) Sets the related Cross SalesvoidsetDefaultCategory(Category defaultCategory) Deprecated.usesetCategory(Category)insteadvoidsetDefaultSku(Sku defaultSku) Sets the default Sku for this Product
Note: this operation is cascaded with CascadeType.ALL which saves from having to persist the Product in 2 operations: first persist the Sku and then take the merged Sku, set it as this Product's default Sku, and then persist this Product.voidsetDepth(BigDecimal depth) Sets the dimension depth
Note: this is a convenience method that merely serves as a pass-through to the same method viagetDefaultSku()voidsetDescription(String description) Sets a brief description of the product that is used for display.voidsetDimension(Dimension dimension) Sets theDimensionfor this product
Note: this is a convenience method that merely serves as a pass-through to the same method viagetDefaultSku()voidsetDisplayTemplate(String displayTemplate) Sets the name of a display template that is used to render this product.voidsetEnableDefaultSkuInInventory(Boolean enableUseDefaultSkuInventory) enables or disables that inventory will be tracked by default sku instead of alt sku in case of alt sku existencevoidsetGirth(BigDecimal girth) Sets the dimension girth
Note: this is a convenience method that merely serves as a pass-through to the same method viagetDefaultSku()voidsetHeight(BigDecimal height) Sets the dimension height
Note: this is a convenience method that merely serves as a pass-through to the same method viagetDefaultSku()voidSets the id of the Product.voidsetLongDescription(String longDescription) Sets a long description of the product that is used for display.voidsetManufacturer(String manufacturer) Sets the manufacture for this productvoidGets the media for this product.voidsetMetaDescription(String metaDescription) Sets the meta data description of the productvoidsetMetaTitle(String metaTitle) Sets the meta data title of the productvoidSets the model number of the productvoidSets the name of the product that is used for display purposes.voidsetOverrideGeneratedUrl(Boolean overrideGeneratedUrl) Sets the flag for whether or not the URL should not be generated in the adminvoidsetProductAttributes(Map<String, ProductAttribute> productAttributes) Sets a generic list of key-value pairs for ProductvoidsetProductOptions(List<ProductOption> productOptions) Deprecated.use setProductOptionXrefs insteadvoidsetProductOptionXrefs(List<ProductOptionXref> productOptions) voidsetPromoMessage(String promoMessage) Sets the promotional message for this ProductvoidsetSize(org.broadleafcommerce.common.vendor.service.type.ContainerSizeType size) Sets the dimension container size
Note: this is a convenience method that merely serves as a pass-through to the same method viagetDefaultSku()voidsetTaxCode(String taxCode) Sets the tax code for this product.voidsetUpSaleProducts(List<RelatedProduct> upSaleProducts) Sets the related Up SalesvoidSets the URL that a customer could type in to reach this product.voidSets a url-fragment to be used with this product.voidSets the product weight
Note: this is a convenience method that merely serves as a pass-through to the same method viagetDefaultSku()voidsetWidth(BigDecimal width) Sets the dimension width
Note: this is a convenience method that merely serves as a pass-through to the same method viagetDefaultSku()Methods inherited from interface org.broadleafcommerce.core.catalog.domain.Indexable
getFieldEntityTypeMethods inherited from interface org.broadleafcommerce.common.copy.MultiTenantCloneable
createOrRetrieveCopyInstance
-
Method Details
-
getId
Long getId()The id of the Product. -
setId
Sets the id of the Product.- Parameters:
id- - the id of the product
-
getName
String getName()Returns the name of the product that is used for display purposes.
Note: this is a convenience method that merely serves as a pass-through to the same method viagetDefaultSku()- Returns:
- the name of the product
-
setName
Sets the name of the product that is used for display purposes.
Note: this is a convenience method that merely serves as a pass-through to the same method viagetDefaultSku()- Parameters:
name- - the name of the Product
-
getDescription
String getDescription()Returns a brief description of the product that is used for display.
Note: this is a convenience method that merely serves as a pass-through to the same method viagetDefaultSku()- Returns:
- a brief description of the product
-
setDescription
Sets a brief description of the product that is used for display.
Note: this is a convenience method that merely serves as a pass-through to the same method viagetDefaultSku()- Parameters:
description- - a brief description of the product
-
getLongDescription
String getLongDescription()Returns a long description of the product that is used for display.
Note: this is a convenience method that merely serves as a pass-through to the same method viagetDefaultSku()- Returns:
- a long description of the product
-
setLongDescription
Sets a long description of the product that is used for display.
Note: this is a convenience method that merely serves as a pass-through to the same method viagetDefaultSku()- Parameters:
longDescription- the long description
-
getActiveStartDate
Date getActiveStartDate()Returns the first date a product will be available that is used to determine whether to display the product.
Note: this is a convenience method that merely serves as a pass-through to the same method viagetDefaultSku()- Returns:
- the first date the product will be available
-
setActiveStartDate
Sets the first date a product will be available that is used to determine whether to display the product.
Note: this is a convenience method that merely serves as a pass-through to the same method viagetDefaultSku()- Parameters:
activeStartDate- - the first day the product is available
-
getActiveEndDate
Date getActiveEndDate()Returns the last date a product will be available that is used to determine whether to display the product.
Note: this is a convenience method that merely serves as a pass-through to the same method viagetDefaultSku()- Returns:
- the last day the product is available
-
setActiveEndDate
Sets the last date a product will be available that is used to determine whether to display the product.
Note: this is a convenience method that merely serves as a pass-through to the same method viagetDefaultSku()- Parameters:
activeEndDate- - the last day the product is available
-
isActive
boolean isActive()Returns a boolean that indicates if the product is currently active.
Note: this is a convenience method that merely serves as a pass-through to the same method viagetDefaultSku()- Returns:
- a boolean indicates if the product is active.
-
getDefaultSku
Sku getDefaultSku()Gets the defaultSkuassociated with this Product. A Product is required to have a default Sku which holds specific information about the Product like weight, dimensions, price, etc. Many of the Product attributes that have getters and setters on Product are actually pass-through to the default Sku.
Products can also have multiple Skus associated with it that are represented byProductOptions. For instance, a large, blue shirt. For more information on that relationship seegetAdditionalSkus().- Returns:
- the default Sku for this Product
-
setDefaultSku
Sets the default Sku for this Product
Note: this operation is cascaded with CascadeType.ALL which saves from having to persist the Product in 2 operations: first persist the Sku and then take the merged Sku, set it as this Product's default Sku, and then persist this Product.- Parameters:
defaultSku- - the Sku that should be the default for this Product
-
getMetaTitle
String getMetaTitle()Gets the meta data title of the product- Returns:
-
setMetaTitle
Sets the meta data title of the product- Parameters:
metaTitle-
-
getMetaDescription
String getMetaDescription()Gets the meta data description of the product- Returns:
-
setMetaDescription
Sets the meta data description of the product- Parameters:
metaDescription-
-
getCanonicalUrl
String getCanonicalUrl()Gets the canonical URL of the product- Returns:
-
setCanonicalUrl
Sets the canonical URL of the product- Parameters:
canonicalUrl-
-
getExternalId
String getExternalId() -
getCanSellWithoutOptions
Boolean getCanSellWithoutOptions()- Returns:
- whether or not the default sku can be used for a multi-sku product in the case that no product options are set. Defaults to false if not specified. Note that this only affects multi-sku products.
-
setCanSellWithoutOptions
Sets whether or not the default sku can be sold in the case that no product options are specified. Note that this only affects multi-sku products.- Parameters:
canSellWithoutOptions-
-
getSkus
Deprecated.use#getAdditionalSkusXrefs()insteadReturns a list ofSkus filtered by whether the Skus are active or not. This list does not contain thegetDefaultSku()and filters bySku.isActive().- Returns:
- a list of active Skus from
getAdditionalSkus()for this Product
-
getAdditionalSkus
Gets all the additional Skus associated with this Product. For instance, if this Product represented a T-shirt and you could pick the size of the T-shirt as aProductOption(like "small", "medium", "large") this would return 3 Skus if you had different inventory or price constraints on eachProductOptionValue.
This list does not take into account whether any of these additional Skus are active or not, nor does it contain thegetDefaultSku()for this Product. For this functionality, seegetSkus()andgetAllSkus(), respectively.- Returns:
- the additional Skus for this Product
-
setAdditionalSkus
Sets the additional Skus associated to this Product. These additional Skus should come fromProductOptionValues and are used in instance where you need to track inventory or change pricing on a per-option value basis.- Parameters:
skus- - a List ofSkus to associate with this Product, usually based off ofProductOptions
-
getAllSkus
Returns all theSkus that are associated with this Product (includinggetDefaultSku()) regardless of whether or not theSkus are active or not
Note: in the event that the default Sku was added to the list ofgetAdditionalSkus(), it is filtered out so that only a single instance ofgetDefaultSku()is contained in the resulting list- Returns:
- all the Skus associated to this Product
-
getAllSellableSkus
Returns all skus that are sellable. If the product `canSellWithoutOptions` is true, the `defaultSku` is included in the list. Otherwise, the `defaultSku` is ignored.- Returns:
- all the sellable Skus associated to this Product
-
getMedia
Gets the media for this product. This serves as a pass-through to thegetDefaultSku()media- Returns:
- the Media for the default Sku associated with this Product
- See Also:
-
setMedia
Gets the media for this product. This serves as a pass-through to thegetDefaultSku()media- Parameters:
media- Media map to set on the default Sku associated with this Product- See Also:
-
getAllSkuMedia
Convenience method for returning all of the media associated with this Product by adding all the media ingetDefaultSku()as well as all the media in the Skus represented bygetAdditionalSkus()- Returns:
- all of the Media for all of the Skus for this Product
-
getCategory
Category getCategory()Return theCategorythat contains this product- Returns:
-
setCategory
Set theCategorythat contains this product- Parameters:
category-
-
getDefaultCategory
Deprecated.usegetCategory()insteadReturns the defaultCategorythis product is associated with. This method will delegate togetCategory()by default, unless the "use.legacy.default.category.mode" property is set to true in the implementation's property file. If set to true, this method will use legacy behavior, which is to return the deprecated defaultCategory field. -
setDefaultCategory
Deprecated.usesetCategory(Category)insteadSets the defaultCategoryto associate this product with. This method will delegate tosetCategory(Category)by default, unless the "use.legacy.default.category.mode" property is set to true in the implementation's property file. If set to true, this method will use legacy behavior, which is to set the deprecated defaultCategory field.- Parameters:
defaultCategory- - the defaultCategoryto associate this product with
-
getModel
String getModel()Returns the model number of the product- Returns:
- the model number
-
setModel
Sets the model number of the product- Parameters:
model-
-
getManufacturer
String getManufacturer()Returns the manufacture name for this product- Returns:
- the manufacture name
-
setManufacturer
Sets the manufacture for this product- Parameters:
manufacturer-
-
getDimension
Dimension getDimension()Returns theDimensionfor this product
Note: this is a convenience method that merely serves as a pass-through to the same method viagetDefaultSku()- Returns:
- a ProductDimensions object
-
setDimension
Sets theDimensionfor this product
Note: this is a convenience method that merely serves as a pass-through to the same method viagetDefaultSku()- Parameters:
dimension-
-
getWidth
BigDecimal getWidth()Returns the dimension width
Note: this is a convenience method that merely serves as a pass-through to the same method viagetDefaultSku()- Returns:
- width dimension of the product
-
setWidth
Sets the dimension width
Note: this is a convenience method that merely serves as a pass-through to the same method viagetDefaultSku()- Parameters:
width-
-
getHeight
BigDecimal getHeight()Returns the dimension height
Note: this is a convenience method that merely serves as a pass-through to the same method viagetDefaultSku()- Returns:
- height dimension of the product
-
setHeight
Sets the dimension height
Note: this is a convenience method that merely serves as a pass-through to the same method viagetDefaultSku()- Parameters:
height-
-
getDepth
BigDecimal getDepth()Returns the dimension depth
Note: this is a convenience method that merely serves as a pass-through to the same method viagetDefaultSku()- Returns:
- width depth of the product
-
setDepth
Sets the dimension depth
Note: this is a convenience method that merely serves as a pass-through to the same method viagetDefaultSku()- Parameters:
depth-
-
getGirth
BigDecimal getGirth()Gets the dimension girth
Note: this is a convenience method that merely serves as a pass-through to the same method viagetDefaultSku()- Returns:
- the dimension girth
-
setGirth
Sets the dimension girth
Note: this is a convenience method that merely serves as a pass-through to the same method viagetDefaultSku()- Parameters:
girth-
-
getSize
org.broadleafcommerce.common.vendor.service.type.ContainerSizeType getSize()Returns the dimension container size
Note: this is a convenience method that merely serves as a pass-through to the same method viagetDefaultSku()- Returns:
- dimension container size
-
setSize
void setSize(org.broadleafcommerce.common.vendor.service.type.ContainerSizeType size) Sets the dimension container size
Note: this is a convenience method that merely serves as a pass-through to the same method viagetDefaultSku()- Parameters:
size-
-
getContainer
org.broadleafcommerce.common.vendor.service.type.ContainerShapeType getContainer()Gets the dimension container shape
Note: this is a convenience method that merely serves as a pass-through to the same method viagetDefaultSku()- Returns:
- dimension container shape
-
setContainer
void setContainer(org.broadleafcommerce.common.vendor.service.type.ContainerShapeType container) Sets the dimension container shape
Note: this is a convenience method that merely serves as a pass-through to the same method viagetDefaultSku()- Parameters:
container-
-
getDimensionString
String getDimensionString()Returns a String representation of the dimension
Note: this is a convenience method that merely serves as a pass-through to the same method viagetDefaultSku()- Returns:
- a dimension String
-
getWeight
Weight getWeight()Returns the weight of the product
Note: this is a convenience method that merely serves as a pass-through to the same method viagetDefaultSku()- Returns:
- weight of product
-
setWeight
Sets the product weight
Note: this is a convenience method that merely serves as a pass-through to the same method viagetDefaultSku()- Parameters:
weight-
-
getCrossSaleProducts
List<RelatedProduct> getCrossSaleProducts()Returns a List of this product's related Cross Sales- Returns:
-
setCrossSaleProducts
Sets the related Cross Sales- Parameters:
crossSaleProducts-
-
getUpSaleProducts
List<RelatedProduct> getUpSaleProducts()Returns a List of this product's related Up Sales- Returns:
-
setUpSaleProducts
Sets the related Up Sales- Parameters:
upSaleProducts-
-
getProductAttributes
Map<String,ProductAttribute> getProductAttributes()Generic key-value pair of attributes to associate to this Product for maximum extensibility.- Returns:
- the attributes for this Product
-
setProductAttributes
Sets a generic list of key-value pairs for Product- Parameters:
productAttributes-
-
getMultiValueProductAttributes
Map<String,ProductAttribute> getMultiValueProductAttributes() -
getPromoMessage
String getPromoMessage()Gets the promotional message for this Product. For instance, this could be a limited-time Product- Returns:
- the Product's promotional message
-
setPromoMessage
Sets the promotional message for this Product- Parameters:
promoMessage-
-
getProductOptions
Deprecated.use getProductOptionXrefs insteadThe availableProductOptions for this Product. For instance, if this Product is a T-Shirt, you might be able to specify a size and color. This would be modeled by 2ProductOptions, each that could have multipleProductOptionValues (which could be "small" "medium" "large", "blue", "yellow", "green"). For specific pricing or inventory needs on a per-value basis, multiple Skus can be associated to this Product based off of theProductOptionValues- Returns:
- the
ProductOptions for this Product
-
setProductOptions
Deprecated.use setProductOptionXrefs insteadSets the list of available ProductOptions for this Product- Parameters:
productOptions-
-
getProductOptionXrefs
List<ProductOptionXref> getProductOptionXrefs() -
setProductOptionXrefs
-
getProductOptionValuesMap
Returns a Map of product option values, keyed by the product option name. E.g. "color":["red","green","black"]- Returns:
-
getUrl
String getUrl()A product can have a designated URL. When set, the ProductHandlerMapping will check for this URL and forward this user to thegetDisplayTemplate().Alternatively, most sites will rely on the
getGeneratedUrl()to define the url for a product page.- Returns:
- See Also:
-
org.broadleafcommerce.core.web.catalog.ProductHandlerMapping
-
setUrl
Sets the URL that a customer could type in to reach this product.- Parameters:
url-
-
getOverrideGeneratedUrl
Boolean getOverrideGeneratedUrl()- Returns:
- the flag for whether or not the URL should not be generated in the admin
-
setOverrideGeneratedUrl
Sets the flag for whether or not the URL should not be generated in the admin- Parameters:
overrideGeneratedUrl-
-
getUrlKey
String getUrlKey()Sets a url-fragment. By default, the system will attempt to create a unique url-fragment for this product by taking the {@link Product.getName()} and removing special characters and replacing dashes with spaces. -
setUrlKey
Sets a url-fragment to be used with this product. By default, the system will attempt to create a unique url-fragment for this product by taking the {@link Product.getName()} and removing special characters and replacing dashes with spaces. -
getDisplayTemplate
String getDisplayTemplate()Returns the name of a display template that is used to render this product. Most implementations have a default template for all products. This allows for the user to define a specific template to be used by this product.- Returns:
-
setDisplayTemplate
Sets the name of a display template that is used to render this product. Most implementations have a default template for all products. This allows for the user to define a specific template to be used by this product.- Parameters:
displayTemplate-
-
getGeneratedUrl
String getGeneratedUrl()Generates a URL that can be used to access the product. Builds the url by combining the url of the default category with the getUrlKey() of this product. -
getCumulativeCrossSaleProducts
List<RelatedProduct> getCumulativeCrossSaleProducts()Returns a list of the cross sale products for this product as well all cross sale products in all parent categories of this product.- Returns:
- the cumulative cross sale products
-
getCumulativeUpSaleProducts
List<RelatedProduct> getCumulativeUpSaleProducts()Returns a list of the upsale products for this product as well as all upsale products in all parent categories of this product.- Returns:
- the cumulative upsale products
-
clearDynamicPrices
void clearDynamicPrices()Removes any currently stored dynamic pricing -
getAllParentCategoryXrefs
List<CategoryProductXref> getAllParentCategoryXrefs()Retrieve all the xref entities linking this product to parent categories -
setAllParentCategoryXrefs
Set all the xref entities linking this product to parent categories -
getAllParentCategoryIds
Returns all parentCategoryids this product is associated with.- Returns:
- the all parent category ids for this product
-
getAllParentCategories
Deprecated.Use getAllParentCategoryXrefs() instead.Returns all parentCategory(s) this product is associated with.- Returns:
- the all parent categories for this product
-
setAllParentCategories
Deprecated.Use setAllParentCategoryXrefs() instead.Sets all parentCategorys this product is associated with.- Parameters:
allParentCategories- - a List of all parentCategory(s) to associate this product with
-
getTaxCode
String getTaxCode()Returns the tax code of the product. If the tax code is null, then returns the tax code of this products category.- Returns:
- taxCode
-
setTaxCode
Sets the tax code for this product.- Parameters:
taxCode-
-
hasRetailPrice
boolean hasRetailPrice()In most implementations, including the default Broadleaf demo store, if a product doesn't have a retail price, it can't be sold. This method returns true if in the current context, the product has a price. The current context may be different when accessed in an entperise context like one using PriceLists or MultiTentant.- Returns:
-
getRetailPrice
org.broadleafcommerce.common.money.Money getRetailPrice()Convenience method, references to defaultSku.retailPrice- Returns:
-
getSalePrice
org.broadleafcommerce.common.money.Money getSalePrice()Convenience method, references defaultSku.salePrice- Returns:
-
getPrice
org.broadleafcommerce.common.money.Money getPrice()Convenience method, references defaultSku.price- Returns:
-
isOnSale
boolean isOnSale()Convenience method, references defaultSku.onSale- Returns:
-
getMargin
org.broadleafcommerce.common.money.Money getMargin()added just for convenience, references defaultSku.margin- Returns:
-
getParentCategoryHierarchyIds
The specifiedPromotionMessages for this Product that will override the Offer's defaultPromotionMessage. -
getEnableDefaultSkuInInventory
Boolean getEnableDefaultSkuInInventory() -
setEnableDefaultSkuInInventory
enables or disables that inventory will be tracked by default sku instead of alt sku in case of alt sku existence- Parameters:
enableUseDefaultSkuInventory-
-