Class OrderPromotion

    • Constructor Detail

      • OrderPromotion

        public OrderPromotion()
    • Method Detail

      • 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