public interface BundleRuleService
ChangeProductPriceBundleRuleModel or information about whether it is disabled
DisableProductBundleRuleModel when part of a bundle. The rules are depending on the other products in the
same bundle in the cart or newly products to add. These are the different ways on how to find a rule:
ChangeProductPriceBundleRuleModel getChangePriceBundleRuleForOrderEntry(AbstractOrderEntryModel orderEntryModel)
ChangeProductPriceBundleRuleModel valid for the given orderEntryModel. The method
calculates the lowest product price for the product in the given orderEntryModel which is added to a
bundle. The calculation is based on the entry's bundle template and the other products in the same bundle
(conditional products)orderEntryModel - entry that is added to the cart as part of a bundleChangeProductPriceBundleRuleModel if existing or nullChangeProductPriceBundleRuleModel getChangePriceBundleRule(BundleTemplateModel targetComponent, ProductModel targetProduct, ProductModel conditionalProduct, CurrencyModel currency)
ChangeProductPriceBundleRuleModel valid for the given targetProduct. The method
calculates (forecasts) the lowest product price for the given targetProduct which shall be added to a
bundle based on the given bundle template (targetComponent) in combination with the given
conditionalProduct. The bundle or a cart to which the given products should be added may or may not
yet exist. The method just forecasts the possible price for the given combination of input parameters.targetComponent - bundle template based on which the given targetProduct is or shall be added to a bundletargetProduct - product that is added to a bundle and for which the product price is calculatedconditionalProduct - second product that is added to the same bundle as the given targetProduct and that is the
condition for a ChangeProductPriceBundleRuleModel to be selectedcurrency - the currency the ChangeProductPriceBundleRuleModel must match to be selectedChangeProductPriceBundleRuleModel if existing or nullDisableProductBundleRuleModel getDisableRuleForBundleProduct(AbstractOrderModel masterAbstractOrder, ProductModel product, BundleTemplateModel bundleTemplate, int bundleNo, boolean ignoreCurrentProducts)
DisableProductBundleRuleModel valid for the given product ignoring products
ignoreProducts in the cart. The method searches for DisableProductBundleRuleModel's that can
be applied if the given product is or would be added to the given masterAbstractOrder in
the context of the given bundleNo and bundleTemplate.masterAbstractOrder - the master cart/order to which the given product is addedproduct - product that is or shall be added to the bundle and for which applicable
DisableProductBundleRuleModel's are searchedbundleTemplate - bundle template based on which the given product is or shall be added to the bundlebundleNo - the number of the bundle to which the product is or shall be added to a bundleignoreCurrentProducts - if the products in the current bundletemplate should be ignoredDisableProductBundleRuleModel that is found which means that the given
product cannot be added to the bundle in the cart. null if no
DisableProductBundleRuleModel applies and the product can be added to the bundle.ChangeProductPriceBundleRuleModel getChangePriceBundleRule(AbstractOrderModel masterAbstractOrder, BundleTemplateModel bundleTemplate, ProductModel targetProduct, int bundleNo)
ChangeProductPriceBundleRuleModel valid for the given targetProduct. The method
calculates (forecasts) the lowest product price for the given targetProduct which shall be added to a
bundle based on the given bundle template (targetComponent). The price is retrieved from the
ChangeProductPriceBundleRuleModels that can be applied based on the other products in the same bundle. The
method just forecasts the possible price for the given combination of input parameters.masterAbstractOrder - the master cart/order to which the given targetProduct shall be addedtargetProduct - product that shall be added to the bundle and for which applicable DisableProductBundleRuleModel
's are searchedbundleTemplate - bundle template based on which the given targetProduct shall be added to the bundlebundleNo - the number of the bundle to which the targetProduct shall be addedChangeProductPriceBundleRuleModel if existing or nullDisableProductBundleRuleModel getDisableRuleForBundleProduct(BundleTemplateModel bundleTemplate, ProductModel product1, ProductModel product2)
DisableProductBundleRuleModel which does not allow that the given products product1
and product2 are added together to a bundle. In case no such disable rule exists null is
returned.bundleTemplate - bundle template based on which the given targetProduct and conditionalProduct
shall be added to the bundleproduct1 - first product that shall be added to the bundleproduct2 - second product that shall be added to the bundleDisableProductBundleRuleModel that is found which means that the given
product1 and product2 cannot be added together to the bundle in the cart.
null if no DisableProductBundleRuleModel applies and the products can be added to the
bundle.ChangeProductPriceBundleRuleModel getChangePriceBundleRuleWithLowestPrice(ProductModel targetProduct, CurrencyModel currency)
ChangeProductPriceBundleRuleModel of the given targetProduct in
any bundle packagetargetProduct - the product for which the lowest bundle price is searchedcurrency - the currency the ChangeProductPriceBundleRuleModel must match to be selectedChangeProductPriceBundleRuleModel if existing or nullCopyright © 2017 SAP SE. All Rights Reserved.