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:
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:
ProductBundleConstituentsDialog.java: Add/edit Product Constituents to bundle Dialog
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 table
PriceAdjustmentTree.java: A widget for displaying a tree view of price adjustments. Wrapper for a TreeViewer
ProductEditor.java: Implements a multi-page editor for displaying and editing products
ProductEditorOverviewSection.java: This class implements the section of the Product editor that displays basic product information/details
BundleConstituentsWizardPage6.java: The Six page of wizard, for populating bundle constituents
MultiSkuWizardPage5.java: Fifth page of the multi-Sku wizard
ProductDetailsWizardPage1.java: First page of the product details wizard
SingleSkuWizardPage5.java: Single Sku wizard page