org.broadleafcommerce.core.catalog.domain
Interface ProductBundle

All Superinterfaces:
Product, Serializable
All Known Implementing Classes:
ProductBundleImpl

public interface ProductBundle
extends Product, Serializable

Default implementation for representing a bundle that can be sold individually. Product bundles are composed of multiple SkuBundleItem.

Bundle prices are determined 1 of 2 ways, depending on the pricing model:

  1. ITEM_SUM: The sum of the prices of its SkuBundleItem
  2. BUNDLE: Uses the pricing information on the bundle itself

Author:
Phillip Verheyden
See Also:
SkuBundleItem

Method Summary
 Boolean getAutoBundle()
          Gets whether or not this should be bundled together if the individual Products are added to the cart.
 Money getBundleItemsRetailPrice()
           
 Money getBundleItemsSalePrice()
           
 Boolean getBundlePromotable()
          Gets whether or not the bundle itself should be promotable.
 Boolean getItemsPromotable()
          Gets whether or not the items in this bundle should be considered for promotions using the promotion engine

Note: this is only applicable when the pricing model is the sum of the bundle items NOTE: THIS IS NOT YET SUPPORTED BY BROADLEAF
 BigDecimal getPotentialSavings()
          Calculates the potential savings by summing up the retail prices of the contained items and comparing to the actual bundle prices.
 ProductBundlePricingModelType getPricingModel()
           
 Integer getPriority()
          Used to determine the order for automatic bundling.
 List<SkuBundleItem> getSkuBundleItems()
           
 boolean isOnSale()
           
 void setAutoBundle(Boolean autoBundle)
          Sets whether or not this should be bundled together if the individual Products are added to the cart.
 void setBundlePromotable(Boolean bundlePromotable)
          Gets whether or not the bundle itself should be promotable.
 void setItemsPromotable(Boolean itemsPromotable)
          Sets whether or not the items in this bundle should be considered for promotions using the promotion engine NOTE: THIS IS NOT YET SUPPORTED BY BROADLEAF
 void setPricingModel(ProductBundlePricingModelType pricingModel)
           
 void setPriority(Integer priority)
           
 void setSkuBundleItems(List<SkuBundleItem> bundleItems)
           
 
Methods inherited from interface org.broadleafcommerce.core.catalog.domain.Product
clearDynamicPrices, getActiveEndDate, getActiveStartDate, getAdditionalSkus, getAllParentCategories, getAllSkuMedia, getAllSkus, getCanSellWithoutOptions, getContainer, getCrossSaleProducts, getCumulativeCrossSaleProducts, getCumulativeUpSaleProducts, getDefaultCategory, getDefaultSku, getDepth, getDescription, getDimension, getDimensionString, getDisplayTemplate, getGeneratedUrl, getGirth, getHeight, getId, getLongDescription, getManufacturer, getMappedProductAttributes, getMedia, getModel, getName, getProductAttributeByName, getProductAttributes, getProductOptions, getPromoMessage, getSize, getSkus, getUpSaleProducts, getUrl, getUrlKey, getWeight, getWidth, isActive, isFeaturedProduct, setActiveEndDate, setActiveStartDate, setAdditionalSkus, setAllParentCategories, setCanSellWithoutOptions, setContainer, setCrossSaleProducts, setDefaultCategory, setDefaultSku, setDepth, setDescription, setDimension, setDisplayTemplate, setFeaturedProduct, setGirth, setHeight, setId, setLongDescription, setManufacturer, setMedia, setModel, setName, setProductAttributes, setProductOptions, setPromoMessage, setSize, setUpSaleProducts, setUrl, setUrlKey, setWeight, setWidth
 

Method Detail

getPricingModel

ProductBundlePricingModelType getPricingModel()
Returns:
The pricing model for this bundle ITEM_SUM indicates that the bundle is priced by the sum of the contained items. BUNDLE indicates that the bundle is priced by the price on the bundle itself.

setPricingModel

void setPricingModel(ProductBundlePricingModelType pricingModel)
Parameters:
pricingModel - ITEM_SUM if the retailPrice and salePrice of this bundle should be the composition of its items, BUNDLE if this retailPrice and salePrice should come from the default Sku

getBundleItemsRetailPrice

Money getBundleItemsRetailPrice()
Returns:
the sum of the retail prices of the bundle items

getBundleItemsSalePrice

Money getBundleItemsSalePrice()
Returns:
the sum of the sale prices of the bundle items

getAutoBundle

Boolean getAutoBundle()
Gets whether or not this should be bundled together if the individual Products are added to the cart. For instance, if this Bundle is composed of Item1 and Item2, and the user adds Item1 and Item2 to the cart separately, if this is true then these items will be bundled into a single BundleOrderItem instead of unique items in the cart NOTE: THIS IS NOT YET SUPPORTED BY BROADLEAF

Returns:
true if the items in this bundle should be automatically bundled together when added to the cart separately, false otherwise

setAutoBundle

void setAutoBundle(Boolean autoBundle)
Sets whether or not this should be bundled together if the individual Products are added to the cart. For instance, if this Bundle is composed of Item1 and Item2, and the user adds Item1 and Item2 to the cart separately, if this is true then these items will be bundled into a single BundleOrderItem instead of unique items in the cart NOTE: THIS IS NOT YET SUPPORTED BY BROADLEAF

Parameters:
autoBundle - Whether or not the items in the bundle should be auto-bundled if added to the cart separately

getItemsPromotable

Boolean getItemsPromotable()
Gets whether or not the items in this bundle should be considered for promotions using the promotion engine

Note: this is only applicable when the pricing model is the sum of the bundle items NOTE: THIS IS NOT YET SUPPORTED BY BROADLEAF

Returns:
true if the items should be included in the promotion engine, false otherwise

setItemsPromotable

void setItemsPromotable(Boolean itemsPromotable)
Sets whether or not the items in this bundle should be considered for promotions using the promotion engine NOTE: THIS IS NOT YET SUPPORTED BY BROADLEAF

Parameters:
itemsPromotable - Whether or not the items in the bundle should be considered for promotions

getBundlePromotable

Boolean getBundlePromotable()
Gets whether or not the bundle itself should be promotable.
Note: this should only be used if the pricing model for the bundle uses the pricing on the bundle itself and not on the sum of its bundle items NOTE: THIS IS NOT YET SUPPORTED BY BROADLEAF

Returns:
true if the bundle itself should be available for promotion, false otherwise

setBundlePromotable

void setBundlePromotable(Boolean bundlePromotable)
Gets whether or not the bundle itself should be promotable.
Note: this should only be used if the pricing model for the bundle uses the pricing on the bundle itself and not on the sum of its bundle items NOTE: THIS IS NOT YET SUPPORTED BY BROADLEAF

Parameters:
bundlePromotable - Whether or not the bundle itself should be available for promotion

getSkuBundleItems

List<SkuBundleItem> getSkuBundleItems()

setSkuBundleItems

void setSkuBundleItems(List<SkuBundleItem> bundleItems)

getPriority

Integer getPriority()
Used to determine the order for automatic bundling.

Returns:

setPriority

void setPriority(Integer priority)

getPotentialSavings

BigDecimal getPotentialSavings()
Calculates the potential savings by summing up the retail prices of the contained items and comparing to the actual bundle prices. Used to determine the order for automatic bundling in case items might qualify for multiple bundles.

Returns:

isOnSale

boolean isOnSale()
Returns:
whether or not the product bundle is on sale


Copyright © 2013. All Rights Reserved.