Class ProductPromotion

    • Constructor Detail

      • ProductPromotion

        public ProductPromotion()
    • Method Detail

      • findEligibleProductsInBasket

        protected PromotionsManager.RestrictionSetResult findEligibleProductsInBasket​(SessionContext ctx,
                                                                                      PromotionEvaluationContext promoContext)
        Return the intersection of the set of products bound to this promotion and the current cart contents.
        Parameters:
        ctx - The hybris context
        promoContext - The promotion evaluation context
        Returns:
        The set of products that are associated with this promotion and available in the cart or order.
      • buildDataUniqueKey

        protected void buildDataUniqueKey​(SessionContext ctx,
                                          java.lang.StringBuilder builder)
        Description copied from class: AbstractPromotion
        Build a unique data driven key. Build a unique key that is data driven. This will uniquely identify the rules used in this promotion and will form the immutable key for stored promotions. This method may be overridden in a subclass to customize the identifier.
        Overrides:
        buildDataUniqueKey in class AbstractPromotion
        Parameters:
        ctx - The hybris context
        builder - A StringBuilder used to build up the immutable key