Class FindBundlePricingWithCurrentPriceFactoryStrategy

All Implemented Interfaces:
FindDiscountValuesStrategy, FindPriceStrategy, FindTaxValuesStrategy, ServiceLayerOnlyCalculationVerifier, UserNetCheckingStrategy, Serializable, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware

@Deprecated(since="2105", forRemoval=true) public class FindBundlePricingWithCurrentPriceFactoryStrategy extends FindSubscriptionPricingWithCurrentPriceFactoryStrategy
Deprecated, for removal: This API element is subject to removal in a future version.
This strategy should replace the FindPricingWithCurrentPriceFactoryStrategy and will change the discount calculation for bundle entries based on the bundle rules. So based on the products that exist in the cart in the same bundle, the price rules are evaluated and the a matching reduced price is found. Once the final price has been identified, the same logic applies as for DiscountValues and they are persisted in exactly the same way in the database as well as the calculation is don in exactly the same way.
See Also:
  • Constructor Details

    • FindBundlePricingWithCurrentPriceFactoryStrategy

      public FindBundlePricingWithCurrentPriceFactoryStrategy()
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • findDiscountValues

      @Nonnull public List<DiscountValue> findDiscountValues(@Nonnull AbstractOrderEntryModel entry) throws CalculationException
      Deprecated, for removal: This API element is subject to removal in a future version.
      For non Bundle products it should worBundleNavigationNodeContentMainComponentk as is, so the DiscountValues should result from the DiscountRows defined at the product. For Bundle products it should work in a different way: All other products where the AbstractOrderEntries have the same entry group number should be added to a list for comparison. The Product of the current AbstractOrderEntry will be used to identify PriceRules from the current BundleTemplate where that product is set as a target. All conditional products of the rules have to be in the comparison list and that is how we find the matching rules. If there are still multiple matching rules, because, then the one with the lowest price in the current currency will be used as discount. That absolute discount will be converted into a relative DiscountValue for the AbstractOrderEntry only. All calculations of totals later will work as is. For subscription products the discount is applied to the 1st tier of recurring charge entries in the price plan. In case there is a price rule that can be applied to the subscription product and there is also a discount that comes from the tiered recurring charge entries, the better (= cheaper) price is used as discount. For subscription product, if the there is price rule with the billing event, the specific one time charge price reduce logic will be applied.
      Specified by:
      findDiscountValues in interface FindDiscountValuesStrategy
      Overrides:
      findDiscountValues in class FindSubscriptionPricingWithCurrentPriceFactoryStrategy
      Returns:
      List of DiscountValues
      Throws:
      CalculationException
    • getDiscountValues

      @Nonnull protected List<DiscountValue> getDiscountValues(@Nonnull AbstractOrderEntryModel entry, @Nonnull AbstractOrderEntryModel masterEntry)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getSubscriptionBundleFindDiscountValuesHook

      public SubscriptionBundleFindDiscountValuesHook getSubscriptionBundleFindDiscountValuesHook()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setSubscriptionBundleFindDiscountValuesHook

      public void setSubscriptionBundleFindDiscountValuesHook(SubscriptionBundleFindDiscountValuesHook subscriptionBundleFindDiscountValuesHook)
      Deprecated, for removal: This API element is subject to removal in a future version.