Calculated Price Bundles
Overview
A calculated price bundle is a bundle whose price is calculated as the sum of all the bundle item prices. Previous versions of Elastic Path only supported assigned price bundles. This type of bundle, in contrast, was explicitly assigned a price and so the prices of bundled items had no bearing on the top-level bundle price. Another fundamental difference between the two types of bundles is how price adjustments are handled: Calculated price bundle items may only have negative price adjustments while assigned price bundle items may only have positive price adjustments.
Most of the calculated price bundle features are implemented through the addition of code that checks whether a bundle is calculated or assigned and then accordingly diverts the flow of control to the logic of the corresponding bundle type.
The following default packages contain code pertaining to calculated price bundles:
com.elasticpath.cmclient.catalog
com.elasticpath.cmclient.core
com.elasticpath.core
com.elasticpath.core.itest
com.elasticpath.search
Any customizations you wish to make to the underlying Java code should be made by creating Maven extensions of one or more of the above projects.
Key Classes and Methods
Consolidated below is a hierarchy and description of the key packages, classes, and methods that provide calculated price bundle functionality:
Package name: com.elasticpath.cmclient.catalog
src/main/com/elasticpath/cmclient/catalog
dialogs/product
ProductBundleConstituentsDialog.java
: Add/edit Product Constituents to bundle Dialog
editors
price
model
PriceAdjustmentModel.java
: Model for price adjustment view. The model is a tree with PriceAdjustmentModelRoot at the root. Combines the product, price, and price adjustment for display
PriceAdjustmentEditingSupport.java
: Editing support for BaseAmountSection tablePriceAdjustmentTree.java
: A widget for displaying a tree view of price adjustments. Wrapper for a TreeViewer
product
ProductEditor.java
: Implements a multi-page editor for displaying and editing productsProductEditorOverviewSection.java
: This class implements the section of the Product editor that displays basic product information/details
wizards/product/create
BundleConstituentsWizardPage6.java
: The Six page of wizard, for populating bundle constituentsMultiSkuWizardPage5.java
: Fifth page of the multi-Sku wizardProductDetailsWizardPage1.java
: First page of the product details wizardSingleSkuWizardPage5.java
: Single Sku wizard page
CatalogMessages.java