@Deprecated public class PerfectPartnerPromotionHandler extends 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.
|
String |
getDescription(SlingHttpServletRequest request,
CommerceSession commerceSession,
Promotion promotion)
Deprecated.
Allows a promotion handler to define a custom, author-oriented message for a promotion.
|
String |
getMessage(SlingHttpServletRequest request,
CommerceSession commerceSession,
Promotion promotion)
Deprecated.
|
Map<Integer,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,
Map<String,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 String getMessage(SlingHttpServletRequest request, CommerceSession commerceSession, Promotion promotion) throws CommerceException
getMessage in interface PromotionHandlerCommerceExceptionpublic 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 Map<Integer,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, Map<String,String> potentials) throws CommerceException
CommerceExceptionpublic void invalidateCaches()
PromotionHandlerinvalidateCaches in interface PromotionHandler"Copyright © 2010 - 2017 Adobe Systems Incorporated. All Rights Reserved"