Class ProductPercentageDiscountPromotion

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable

    public class ProductPercentageDiscountPromotion
    extends GeneratedProductPercentageDiscountPromotion
    ProductPercentageDiscountPromotion. Get a percentage off of the price of any of these products. For example: 15% off of all garden furniture, 10% off of all chart CDs. Each cart product in the set of qualifying products will have its price reduced by the specified percentage.
    See Also:
    Serialized Form
    • Constructor Detail

      • ProductPercentageDiscountPromotion

        public ProductPercentageDiscountPromotion()
    • Method Detail

      • getResultDescription

        public java.lang.String getResultDescription​(SessionContext ctx,
                                                     PromotionResult promotionResult,
                                                     java.util.Locale locale)
        Description copied from class: AbstractPromotion
        Get a localized user presentable description for the result of this promotion.
        Specified by:
        getResultDescription in class AbstractPromotion
        Parameters:
        ctx - The context
        promotionResult - The promotion result to be described
        locale - The locale to use to generate the message
        Returns:
        a string description
      • 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 ProductPromotion
        Parameters:
        ctx - The hybris context
        builder - A StringBuilder used to build up the immutable key