Interface ProductConfigurationPricingStrategy
- All Known Implementing Classes:
ProductConfigurationPricingStrategyImpl
public interface ProductConfigurationPricingStrategy
Facilitates pricing integration for configurable products
-
Method Summary
Modifier and TypeMethodDescriptionCalculates the current base price for a given abstract order entry.booleanisCartPricingErrorPresent(ConfigModel configModel) Indicates whether there is a problem to obtain correct prices for cart/orderbooleanupdateCartEntryPrices(AbstractOrderEntryModel entry, boolean calculateCart, CommerceCartParameter passedParameter) Updates cart entry's base price (in case it deviates from the current configuration price) from configuration model/pricing service.
-
Method Details
-
calculateBasePriceForConfiguration
Calculates the current base price for a given abstract order entry. Note that this price is derived from the configuration and may differ from the one persisted on the cart entry. In this case the cart entry price is outdated. ConfigId has to be present in current session for given cart entry to retrieve configuration model and prices.- Parameters:
entry- entry which has an associated product configuration- Returns:
- current base price
-
updateCartEntryPrices
boolean updateCartEntryPrices(AbstractOrderEntryModel entry, boolean calculateCart, CommerceCartParameter passedParameter) Updates cart entry's base price (in case it deviates from the current configuration price) from configuration model/pricing service. ConfigId has to be present in current session for given cart entry to retrieve configuration model. This includes recalculation and saving of the cart if entry prices were updated.- Parameters:
entry- cart entrycalculateCart- specifies whether cart is calculated on successful updatepassedParameter- parameters for recalculation of the cart- Returns:
- true if cart entry has been updated
-
isCartPricingErrorPresent
Indicates whether there is a problem to obtain correct prices for cart/order- Parameters:
configModel- configuration model that represents the runtime state of the configuration- Returns:
- true if no prices can be obtained at the moment
-