Class OrderPromotion

All Implemented Interfaces:
Serializable, Comparable
Direct Known Subclasses:
GeneratedOrderThresholdChangeDeliveryModePromotion, GeneratedOrderThresholdDiscountPercentagePromotion, GeneratedOrderThresholdDiscountPromotion, GeneratedOrderThresholdFreeGiftPromotion, GeneratedOrderThresholdFreeVoucherPromotion, GeneratedOrderThresholdPerfectPartnerPromotion, NullPromotion

public abstract class OrderPromotion extends GeneratedOrderPromotion
Order Promotion. Base class for order level promotions.
See Also:
  • Constructor Details

    • OrderPromotion

      public OrderPromotion()
  • Method Details

    • getOrderSubtotalAfterDiscounts

      protected static final double getOrderSubtotalAfterDiscounts(SessionContext ctx, AbstractOrder order)
      Gets the order subtotal minus any order discounts.
      Parameters:
      ctx - the hybris context
      order - the order to get the subtotal from
      Returns:
      the subtotal minus any discounts
    • checkRestrictions

      protected boolean checkRestrictions(SessionContext ctx, PromotionEvaluationContext promoContext)
      Check the restrictions on this promotion. Returns true if the restrictions allow this promotion to evaluate.
      Parameters:
      ctx - the hybris context
      promoContext - the promotion context
      Returns:
      true if the restrictions allow this promotion to evaluate