@Deprecated public class PerfectPartnerPromotionHandler extends java.lang.Object implements PromotionHandler
PerfectPartnerPromotionHandler applies a configured discount
(percentage or absolute) on a product, if the product itself and its partner
product have been added to the cart.TYPE| Constructor and Description |
|---|
PerfectPartnerPromotionHandler()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
PriceInfo |
applyCartEntryPromotion(CommerceSession commerceSession,
Promotion promotion,
CommerceSession.CartEntry cartEntry)
Deprecated.
Apply a promotion to a cart line item.
|
PriceInfo |
applyOrderPromotion(CommerceSession commerceSession,
Promotion promotion)
Deprecated.
Apply a promotion to an order.
|
PriceInfo |
applyShippingPromotion(CommerceSession commerceSession,
Promotion promotion)
Deprecated.
Apply a promotion to an order's shipping amount.
|
java.lang.String |
getDescription(SlingHttpServletRequest request,
CommerceSession commerceSession,
Promotion promotion)
Deprecated.
Allows a promotion handler to define a custom, author-oriented message for a promotion.
|
java.lang.String |
getMessage(SlingHttpServletRequest request,
CommerceSession commerceSession,
Promotion promotion)
Deprecated.
|
java.util.Map<java.lang.Integer,java.lang.String> |
getMessages(SlingHttpServletRequest request,
CommerceSession commerceSession,
Promotion promotion)
Deprecated.
Allows a promotion handler to define shopper-oriented messages for a promotion.
|
void |
getPotentials(CommerceSession commerceSession,
Promotion promotion,
java.util.Map<java.lang.String,java.lang.String> potentials)
Deprecated.
|
void |
invalidateCaches()
Deprecated.
Informs the promotion handler that something under the promotions root has been edited, and the
handler should invalidate any caches it might be keeping.
|
public PerfectPartnerPromotionHandler()
public PriceInfo applyCartEntryPromotion(CommerceSession commerceSession, Promotion promotion, CommerceSession.CartEntry cartEntry) throws CommerceException
PromotionHandlerPriceInfo instance
or null if no discount was applied.applyCartEntryPromotion in interface PromotionHandlercommerceSession - The commerce session containing the cart.promotion - The Promotion to apply.cartEntry - The cart line item within the session's cart.PriceInfo), or null.CommerceExceptionpublic PriceInfo applyOrderPromotion(CommerceSession commerceSession, Promotion promotion) throws CommerceException
PromotionHandlerPriceInfo instance or
null if no discount was applied.applyOrderPromotion in interface PromotionHandlercommerceSession - The commerce session containing the order.promotion - The Promotion to apply.PriceInfo), or null.CommerceExceptionpublic PriceInfo applyShippingPromotion(CommerceSession commerceSession, Promotion promotion) throws CommerceException
PromotionHandlerPriceInfo instance or null if no discount was applied.applyShippingPromotion in interface PromotionHandlercommerceSession - The commerce session containing the order.promotion - The Promotion to apply.PriceInfo), or null.CommerceException@Deprecated public java.lang.String getMessage(SlingHttpServletRequest request, CommerceSession commerceSession, Promotion promotion) throws CommerceException
getMessage in interface PromotionHandlerCommerceExceptionpublic java.lang.String getDescription(SlingHttpServletRequest request, CommerceSession commerceSession, Promotion promotion) throws CommerceException
PromotionHandlerThe info.geometrixx.commons.impl.PerfectPartnerPromotionHandler, for
instance, uses this to list the qualifying pairs of products in the current cart.
getDescription in interface PromotionHandlerrequest - The current request (used for access-control).commerceSession - The current CommerceSession.promotion - The Promotion.CommerceExceptionpublic java.util.Map<java.lang.Integer,java.lang.String> getMessages(SlingHttpServletRequest request, CommerceSession commerceSession, Promotion promotion) throws CommerceException
PromotionHandlerAn order-specific promotion should return a single message with a -1 key.
A cart-entry-specific promotion should return its message(s) keyed to the cart entries they apply to.
getMessages in interface PromotionHandlerrequest - The current request (used for access-control).commerceSession - The current CommerceSession.promotion - The Promotion.-1).CommerceExceptionpublic void getPotentials(CommerceSession commerceSession, Promotion promotion, java.util.Map<java.lang.String,java.lang.String> potentials) throws CommerceException
CommerceExceptionpublic void invalidateCaches()
PromotionHandlerinvalidateCaches in interface PromotionHandlerCopyright © 2010 - 2023 Adobe. All Rights Reserved