Home > widget-integration > PredictiveBundleService > calculateBundleData
PredictiveBundleService.calculateBundleData() method
Calculates derived bundle state such as selected variants, totals, and discount values.
Override this method to inject shop-specific bundle business rules while keeping the controller rendering flow unchanged.
Signature:
calculateBundleData(bundle: PredictiveBundleData, updateData?: BundleUpdateData, action?: BundleAction): PredictiveBundleData;
Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
bundle |
Raw bundle payload. | |
|
updateData |
(Optional) Variant or product selection change data. | |
|
action |
(Optional) Action that triggered recalculation. |
Returns:
Normalized bundle state ready for rendering.