public class ExternalOfferProvider extends AbstractExternalProvider implements OfferProvider
Constructor and Description |
---|
ExternalOfferProvider(org.springframework.web.reactive.function.client.WebClient webClient,
com.fasterxml.jackson.databind.ObjectMapper objectMapper,
com.broadleafcommerce.common.extension.TypeFactory typeFactory,
ExternalOfferProperties properties,
UserTargetGenerationService userTargetGenerationService,
CartTotalsCalculator cartTotalsCalculator) |
Modifier and Type | Method and Description |
---|---|
protected <T extends com.broadleafcommerce.promotion.offer.client.web.context.info.ProratedItemOfferAdjustmentDto> |
addQualifierAndTargetDetails(com.broadleafcommerce.promotion.offer.client.web.context.discounts.ItemResponse<T> orderItemResponse,
com.broadleafcommerce.cart.client.domain.CartItem cartItem)
Adds offer qualifier and target
OfferItemDetails from the given
ItemResponse to the given CartItem . |
void |
applyOffers(@NonNull com.broadleafcommerce.cart.client.domain.Cart cart,
boolean runOrderAndItemOffers,
com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Handles requests against the Offer Engine to retrieve and apply discounts for a
Cart
and its contents. |
void |
applyOffers(@NonNull com.broadleafcommerce.cart.client.domain.Cart cart,
com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Handles requests against the Offer Engine to retrieve and apply discounts for a
Cart
and its contents. |
protected com.broadleafcommerce.order.common.domain.Adjustment |
buildAdjustment(com.broadleafcommerce.promotion.offer.client.web.context.info.OfferRef myItemOffer,
com.broadleafcommerce.promotion.offer.client.web.context.info.Adjustment offerAdjustment) |
protected com.broadleafcommerce.order.common.domain.OfferItemDetail |
buildOfferItemDetails(com.broadleafcommerce.promotion.offer.client.web.context.info.OfferItemDetail offerItemDetail)
Builds an
OfferItemDetail from the given
OfferItemDetail . |
protected com.broadleafcommerce.promotion.offer.client.web.context.OrderDto<com.broadleafcommerce.promotion.offer.client.web.context.FulfillmentGroupDto<com.broadleafcommerce.promotion.offer.client.web.context.FulfillmentLineItemDto>> |
buildOrderDto(com.broadleafcommerce.cart.client.domain.Cart cart,
boolean runOrderAndItemOffers,
com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) |
protected com.broadleafcommerce.order.common.domain.Voucher |
buildVoucher(com.broadleafcommerce.promotion.offer.client.web.context.info.Voucher voucher)
Builds a
Voucher from the given
Voucher . |
protected com.broadleafcommerce.promotion.offer.client.web.context.Destination |
convertAddressToDestination(@NonNull com.broadleafcommerce.order.common.domain.Address address)
Converts an
Address to a Destination . |
protected com.broadleafcommerce.promotion.offer.client.web.context.CustomerContext |
createCustomerContext()
Create a
CustomerContext and add customer and customer segments. |
protected List<com.broadleafcommerce.order.common.domain.Adjustment> |
getAdjustments(List<com.broadleafcommerce.promotion.offer.client.web.context.info.Adjustment> adjustments) |
protected List<com.broadleafcommerce.order.common.domain.Adjustment> |
getCartItemAdjustmentsToAdd(com.broadleafcommerce.promotion.offer.client.web.context.discounts.ItemResponseDetail<? extends com.broadleafcommerce.promotion.offer.client.web.context.info.ProratedItemOfferAdjustmentDto> itemResponseDetail) |
protected CartOperationServiceOfferUtils |
getCartOpsServiceOfferUtils() |
protected CartTotalsCalculator |
getCartTotalsCalculator() |
String |
getCodeUsabilityType(@NonNull String code,
@NonNull com.broadleafcommerce.cart.client.domain.Cart cart,
com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Determines the usability type of the promo
code in the context of the given
cart . |
protected Object |
getProductType(com.broadleafcommerce.cart.client.domain.CartItem cartItem) |
protected Optional<javax.money.MonetaryAmount> |
getStandardPrice(com.broadleafcommerce.cart.client.domain.CartItem cartItem) |
protected UserTargetGenerationService |
getUserTargetGenerationService() |
protected List<com.broadleafcommerce.order.common.domain.Voucher> |
getVouchers(List<com.broadleafcommerce.promotion.offer.client.web.context.info.Voucher> vouchers) |
protected boolean |
hasSalePrice(com.broadleafcommerce.cart.client.domain.CartItem cartItem) |
protected boolean |
hasStandardPrice(com.broadleafcommerce.cart.client.domain.CartItem cartItem) |
protected com.broadleafcommerce.promotion.offer.client.web.context.Codes |
populateCodes(com.broadleafcommerce.cart.client.domain.Cart cart) |
protected void |
populateDependentLineItemDto(List<com.broadleafcommerce.promotion.offer.client.web.context.OrderLineItemDto> lineItems,
com.broadleafcommerce.cart.client.domain.CartItem cartItem) |
protected com.broadleafcommerce.promotion.offer.client.web.context.FulfillmentGroupDto<com.broadleafcommerce.promotion.offer.client.web.context.FulfillmentLineItemDto> |
populateFulfillmentGroupDto(Map<String,com.broadleafcommerce.promotion.offer.client.web.context.OrderLineItemDto> lineItemIdMap,
com.broadleafcommerce.cart.client.domain.FulfillmentGroup fulfillmentGroup) |
protected List<com.broadleafcommerce.promotion.offer.client.web.context.FulfillmentGroupDto<com.broadleafcommerce.promotion.offer.client.web.context.FulfillmentLineItemDto>> |
populateFulfillmentGroupDtos(List<com.broadleafcommerce.promotion.offer.client.web.context.OrderLineItemDto> lineItems,
com.broadleafcommerce.cart.client.domain.Cart cart) |
protected com.broadleafcommerce.promotion.offer.client.web.context.FulfillmentLineItemDto |
populateFulfillmentLineItemDto(Map<String,com.broadleafcommerce.promotion.offer.client.web.context.OrderLineItemDto> lineItemIdMap,
com.broadleafcommerce.cart.client.domain.FulfillmentItem fulfillmentItem) |
protected com.broadleafcommerce.promotion.offer.client.web.context.OrderLineItemDto |
populateLineItemDto(com.broadleafcommerce.cart.client.domain.CartItem cartItem)
Returns a populated
OrderLineItemDto from given CartItem . |
protected void |
populateLineItemDto(List<com.broadleafcommerce.promotion.offer.client.web.context.OrderLineItemDto> lineItems,
com.broadleafcommerce.cart.client.domain.CartItem cartItem)
Deprecated.
in favor of
populateLineItemDto(CartItem) for simpler client extension |
protected List<com.broadleafcommerce.promotion.offer.client.web.context.OrderLineItemDto> |
populateLineItems(com.broadleafcommerce.cart.client.domain.Cart cart) |
protected <T extends com.broadleafcommerce.promotion.offer.client.web.context.info.ProratedItemOfferAdjustmentDto> |
processFreeGiftOffers(@NonNull com.broadleafcommerce.cart.client.domain.Cart cart,
@NonNull com.broadleafcommerce.promotion.offer.client.web.context.discounts.OrderResponse<T> orderResponse) |
void |
setCartOpsServiceOfferUtils(CartOperationServiceOfferUtils cartOpsServiceOfferUtils) |
protected <T extends com.broadleafcommerce.promotion.offer.client.web.context.info.ProratedItemOfferAdjustmentDto> |
updateCartAdjustments(com.broadleafcommerce.cart.client.domain.Cart cart,
com.broadleafcommerce.promotion.offer.client.web.context.discounts.OrderResponse<T> orderResponse,
boolean didRunOrderAndItemOffers)
Updates the cart, items, and fulfillment groups and items with the discount adjustments
contained in the response from the offer engine.
|
protected <T extends com.broadleafcommerce.promotion.offer.client.web.context.info.ProratedItemOfferAdjustmentDto> |
updateCartForFulfillmentOffers(@NonNull com.broadleafcommerce.cart.client.domain.Cart cart,
@NonNull com.broadleafcommerce.promotion.offer.client.web.context.discounts.OrderResponse<T> orderResponse)
Updates fulfillment groups and items with adjustments after the offer engine has processed
the order.
|
protected <T extends com.broadleafcommerce.promotion.offer.client.web.context.info.ProratedItemOfferAdjustmentDto> |
updateCartForOrderAndOrderItemOffers(@NonNull com.broadleafcommerce.cart.client.domain.Cart cart,
@NonNull com.broadleafcommerce.promotion.offer.client.web.context.discounts.OrderResponse<T> orderResponse)
Updates order and order items with adjustments after the offer engine has processed the
order.
|
protected <T extends com.broadleafcommerce.promotion.offer.client.web.context.info.ProratedItemOfferAdjustmentDto> |
updateCartItem(com.broadleafcommerce.promotion.offer.client.web.context.discounts.ItemResponse<T> orderItemResponse,
com.broadleafcommerce.cart.client.domain.CartItem cartItem) |
protected <T extends com.broadleafcommerce.promotion.offer.client.web.context.info.ProratedItemOfferAdjustmentDto> |
updateFulfillmentGroup(com.broadleafcommerce.cart.client.domain.Cart cart,
com.broadleafcommerce.promotion.offer.client.web.context.discounts.FulfillmentGroupResponse<T> fgResponse,
com.broadleafcommerce.cart.client.domain.FulfillmentGroup fulfillmentGroup) |
protected <T extends com.broadleafcommerce.promotion.offer.client.web.context.info.ProratedItemOfferAdjustmentDto> |
updateFulfillmentItem(com.broadleafcommerce.cart.client.domain.Cart cart,
com.broadleafcommerce.promotion.offer.client.web.context.discounts.ItemResponse<T> itemResponse,
com.broadleafcommerce.cart.client.domain.FulfillmentItem fulfillmentItem) |
com.broadleafcommerce.promotion.offer.client.web.context.OfferAndOfferCodeUsageValidationResult |
validateOfferAndOfferCodeUsages(com.broadleafcommerce.cart.client.domain.Cart cart,
List<String> offerCodes,
List<String> offerIds,
com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Retrieve validation information regarding the cart's usage of the provided offers and offer
codes to determine if the usage is still valid.
|
executeRequest, getHeaders, getObjectMapper, getTypeFactory, getWebClient, pageableToParams, uriVars
public ExternalOfferProvider(org.springframework.web.reactive.function.client.WebClient webClient, com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.broadleafcommerce.common.extension.TypeFactory typeFactory, ExternalOfferProperties properties, UserTargetGenerationService userTargetGenerationService, CartTotalsCalculator cartTotalsCalculator)
public void applyOffers(@NonNull @NonNull com.broadleafcommerce.cart.client.domain.Cart cart, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
OfferProvider
Cart
and its contents. This method should apply all kinds of offers applicable to the contents
including all order, order item, fulfillment, and fulfillment item offers.
To control whether order and order item offers are applied use
OfferProvider.applyOffers(Cart, boolean, ContextInfo)
and set `runOrderAndItemOffers` as desired.
Set it to false
if you only want to run fulfillment and fulfillment item offers. By
default, fulfillment pricing occurs after order and order items have been priced and their
offers applied since fulfillment pricing and promotions can depend on the price of the
merchandise being fulfilled.
applyOffers
in interface OfferProvider
cart
- The Cart
whose contents to send to the offer engine for evaluationcontextInfo
- Additional sandbox and tenancy infopublic void applyOffers(@NonNull @NonNull com.broadleafcommerce.cart.client.domain.Cart cart, boolean runOrderAndItemOffers, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
OfferProvider
Cart
and its contents. Allows specifying whether order and order item offers will be applied in
the calculation. Set runOrderAndItemOffers
to false
if you only want to run
fulfillment and fulfillment item offers.
By default, fulfillment pricing occurs after order and order items have been priced and their offers applied since fulfillment pricing and promotions can depend on the price of the merchandise being fulfilled. Thus, when fulfillment offers are processed, order and order item offers should not also be reprocessed or the results can be incorrect—this also makes the request run faster since only fulfillment will be considered.
applyOffers
in interface OfferProvider
cart
- The Cart
whose contents to send to the offer engine for evaluationrunOrderAndItemOffers
- Whether to have the Offer Engine run order and order item level
offers. Set this to false
if you only want to run fulfillment and fulfillment
item offers. By default, fulfillment pricing occurs after order and order items have
been priced and their offers applied since fulfillment pricing and promotions can
depend on the price of the merchandise being fulfilled.contextInfo
- Additional sandbox and tenancy infopublic String getCodeUsabilityType(@NonNull @NonNull String code, @NonNull @NonNull com.broadleafcommerce.cart.client.domain.Cart cart, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
OfferProvider
code
in the context of the given
cart
. Possible values are defined in CodeUsabilityType
and include whether
the code is usable, cannot be used because it has reached its max uses limit, or cannot be
used because it does not match any offers (may be a campaign code or some other type in this
case).getCodeUsabilityType
in interface OfferProvider
code
- The promo code to apply to cart
cart
- The Cart
that promo code
is to be applied tocontextInfo
- Additional sandbox and tenancy infoCodeUsabilityType
public com.broadleafcommerce.promotion.offer.client.web.context.OfferAndOfferCodeUsageValidationResult validateOfferAndOfferCodeUsages(com.broadleafcommerce.cart.client.domain.Cart cart, List<String> offerCodes, List<String> offerIds, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
OfferProvider
validateOfferAndOfferCodeUsages
in interface OfferProvider
cart
- The cart against which to validate offer and code uses.offerCodes
- The codes to check for validity.offerIds
- The offer ids to check for validity.contextInfo
- Context information around sandbox and multitenant state.protected com.broadleafcommerce.promotion.offer.client.web.context.OrderDto<com.broadleafcommerce.promotion.offer.client.web.context.FulfillmentGroupDto<com.broadleafcommerce.promotion.offer.client.web.context.FulfillmentLineItemDto>> buildOrderDto(com.broadleafcommerce.cart.client.domain.Cart cart, boolean runOrderAndItemOffers, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
protected List<com.broadleafcommerce.promotion.offer.client.web.context.OrderLineItemDto> populateLineItems(com.broadleafcommerce.cart.client.domain.Cart cart)
protected List<com.broadleafcommerce.promotion.offer.client.web.context.FulfillmentGroupDto<com.broadleafcommerce.promotion.offer.client.web.context.FulfillmentLineItemDto>> populateFulfillmentGroupDtos(List<com.broadleafcommerce.promotion.offer.client.web.context.OrderLineItemDto> lineItems, com.broadleafcommerce.cart.client.domain.Cart cart)
protected com.broadleafcommerce.promotion.offer.client.web.context.Codes populateCodes(com.broadleafcommerce.cart.client.domain.Cart cart)
@Nullable protected Object getProductType(com.broadleafcommerce.cart.client.domain.CartItem cartItem)
protected void populateDependentLineItemDto(List<com.broadleafcommerce.promotion.offer.client.web.context.OrderLineItemDto> lineItems, com.broadleafcommerce.cart.client.domain.CartItem cartItem)
@Deprecated protected void populateLineItemDto(List<com.broadleafcommerce.promotion.offer.client.web.context.OrderLineItemDto> lineItems, com.broadleafcommerce.cart.client.domain.CartItem cartItem)
populateLineItemDto(CartItem)
for simpler client extensionOrderLineItemDto
from given CartItem
and adds it to the given
list of OrderLineItemDtos
.lineItems
- the list of OrderLineItemDtos
to add the populated
OrderLineItemDto
tocartItem
- the CartItem
to populate an OrderLineItemDto
fromprotected com.broadleafcommerce.promotion.offer.client.web.context.OrderLineItemDto populateLineItemDto(com.broadleafcommerce.cart.client.domain.CartItem cartItem)
OrderLineItemDto
from given CartItem
.cartItem
- the CartItem
to populate an OrderLineItemDto
fromOrderLineItemDto
from given CartItem
protected com.broadleafcommerce.promotion.offer.client.web.context.FulfillmentGroupDto<com.broadleafcommerce.promotion.offer.client.web.context.FulfillmentLineItemDto> populateFulfillmentGroupDto(Map<String,com.broadleafcommerce.promotion.offer.client.web.context.OrderLineItemDto> lineItemIdMap, com.broadleafcommerce.cart.client.domain.FulfillmentGroup fulfillmentGroup)
protected com.broadleafcommerce.promotion.offer.client.web.context.Destination convertAddressToDestination(@NonNull @NonNull com.broadleafcommerce.order.common.domain.Address address)
Address
to a Destination
.address
- Address
to be convertedDestination
from the Address
.protected com.broadleafcommerce.promotion.offer.client.web.context.FulfillmentLineItemDto populateFulfillmentLineItemDto(Map<String,com.broadleafcommerce.promotion.offer.client.web.context.OrderLineItemDto> lineItemIdMap, com.broadleafcommerce.cart.client.domain.FulfillmentItem fulfillmentItem)
protected boolean hasStandardPrice(com.broadleafcommerce.cart.client.domain.CartItem cartItem)
protected boolean hasSalePrice(com.broadleafcommerce.cart.client.domain.CartItem cartItem)
protected Optional<javax.money.MonetaryAmount> getStandardPrice(com.broadleafcommerce.cart.client.domain.CartItem cartItem)
protected <T extends com.broadleafcommerce.promotion.offer.client.web.context.info.ProratedItemOfferAdjustmentDto> void updateCartAdjustments(com.broadleafcommerce.cart.client.domain.Cart cart, com.broadleafcommerce.promotion.offer.client.web.context.discounts.OrderResponse<T> orderResponse, boolean didRunOrderAndItemOffers)
Fulfillment offers cannot be applied until after regular fulfillment pricing occurs, which
cannot be calculated until after non-fulfillment subtotals and adjustments are calculated
since fulfillment pricing is usually based on merchandise totals. Therefore, which part of
the flow we're in needs to be determined since not all adjustments are calculated at the same
time and we do not want to overwrite the previously calculated adjustments with null or 0
values. This determination is done using the didRunOrderAndItemOffers
flag.
T
- The specific type of ProratedItemOfferAdjustmentDto
being used in the
OrderResponse
cart
- The cart containing the fulfillment groups being discountedorderResponse
- The response from the offer engine after processing the cart to
determine applicable discountsdidRunOrderAndItemOffers
- Indicates whether fulfillment or merchandise (order/item)
adjustments have just been calculatedprotected <T extends com.broadleafcommerce.promotion.offer.client.web.context.info.ProratedItemOfferAdjustmentDto> void updateCartForFulfillmentOffers(@NonNull @NonNull com.broadleafcommerce.cart.client.domain.Cart cart, @NonNull @NonNull com.broadleafcommerce.promotion.offer.client.web.context.discounts.OrderResponse<T> orderResponse)
updateCartForOrderAndOrderItemOffers(com.broadleafcommerce.cart.client.domain.Cart, com.broadleafcommerce.promotion.offer.client.web.context.discounts.OrderResponse<T>)
since
fulfillment offers cannot be applied until after regular fulfillment pricing occurs, which
cannot be calculated until after non-fulfillment subtotals and adjustments are calculated
since fulfillment pricing is usually based on merchandise totals.T
- The specific type of ProratedItemOfferAdjustmentDto
being used in the
OrderResponse
cart
- The cart containing the fulfillment groups being discountedorderResponse
- The response from the offer engine after processing the cart to
determine applicable discountsprotected <T extends com.broadleafcommerce.promotion.offer.client.web.context.info.ProratedItemOfferAdjustmentDto> void updateCartForOrderAndOrderItemOffers(@NonNull @NonNull com.broadleafcommerce.cart.client.domain.Cart cart, @NonNull @NonNull com.broadleafcommerce.promotion.offer.client.web.context.discounts.OrderResponse<T> orderResponse)
updateCartForFulfillmentOffers(com.broadleafcommerce.cart.client.domain.Cart, com.broadleafcommerce.promotion.offer.client.web.context.discounts.OrderResponse<T>)
since fulfillment
offers cannot be applied until after regular fulfillment pricing occurs, which cannot be
calculated until after non-fulfillment subtotals and adjustments are calculated since
fulfillment pricing is usually based on merchandise totals.T
- The specific type of ProratedItemOfferAdjustmentDto
being used in the
OrderResponse
cart
- The cart and its items being discountedorderResponse
- The response from the offer engine after processing the cart to
determine applicable discountsprotected <T extends com.broadleafcommerce.promotion.offer.client.web.context.info.ProratedItemOfferAdjustmentDto> void processFreeGiftOffers(@NonNull @NonNull com.broadleafcommerce.cart.client.domain.Cart cart, @NonNull @NonNull com.broadleafcommerce.promotion.offer.client.web.context.discounts.OrderResponse<T> orderResponse)
protected <T extends com.broadleafcommerce.promotion.offer.client.web.context.info.ProratedItemOfferAdjustmentDto> void updateFulfillmentGroup(com.broadleafcommerce.cart.client.domain.Cart cart, com.broadleafcommerce.promotion.offer.client.web.context.discounts.FulfillmentGroupResponse<T> fgResponse, com.broadleafcommerce.cart.client.domain.FulfillmentGroup fulfillmentGroup)
protected List<com.broadleafcommerce.order.common.domain.Adjustment> getAdjustments(List<com.broadleafcommerce.promotion.offer.client.web.context.info.Adjustment> adjustments)
protected List<com.broadleafcommerce.order.common.domain.Voucher> getVouchers(List<com.broadleafcommerce.promotion.offer.client.web.context.info.Voucher> vouchers)
protected com.broadleafcommerce.order.common.domain.Voucher buildVoucher(com.broadleafcommerce.promotion.offer.client.web.context.info.Voucher voucher)
Voucher
from the given
Voucher
.voucher
- the
Voucher
to build
the Voucher
fromVoucher
from the given
Voucher
protected <T extends com.broadleafcommerce.promotion.offer.client.web.context.info.ProratedItemOfferAdjustmentDto> void updateFulfillmentItem(com.broadleafcommerce.cart.client.domain.Cart cart, com.broadleafcommerce.promotion.offer.client.web.context.discounts.ItemResponse<T> itemResponse, com.broadleafcommerce.cart.client.domain.FulfillmentItem fulfillmentItem)
protected <T extends com.broadleafcommerce.promotion.offer.client.web.context.info.ProratedItemOfferAdjustmentDto> void updateCartItem(com.broadleafcommerce.promotion.offer.client.web.context.discounts.ItemResponse<T> orderItemResponse, com.broadleafcommerce.cart.client.domain.CartItem cartItem)
protected List<com.broadleafcommerce.order.common.domain.Adjustment> getCartItemAdjustmentsToAdd(com.broadleafcommerce.promotion.offer.client.web.context.discounts.ItemResponseDetail<? extends com.broadleafcommerce.promotion.offer.client.web.context.info.ProratedItemOfferAdjustmentDto> itemResponseDetail)
protected com.broadleafcommerce.order.common.domain.Adjustment buildAdjustment(com.broadleafcommerce.promotion.offer.client.web.context.info.OfferRef myItemOffer, com.broadleafcommerce.promotion.offer.client.web.context.info.Adjustment offerAdjustment)
protected <T extends com.broadleafcommerce.promotion.offer.client.web.context.info.ProratedItemOfferAdjustmentDto> void addQualifierAndTargetDetails(com.broadleafcommerce.promotion.offer.client.web.context.discounts.ItemResponse<T> orderItemResponse, com.broadleafcommerce.cart.client.domain.CartItem cartItem)
OfferItemDetails
from the given
ItemResponse
to the given CartItem
.orderItemResponse
- the ItemResponse
to get the
ItemResponse.getQualifierItemDetails()
and
ItemResponse.getTargetItemDetails()
fromcartItem
- the CartItem
to add the offer qualifier and target
OfferItemDetails
toprotected com.broadleafcommerce.order.common.domain.OfferItemDetail buildOfferItemDetails(com.broadleafcommerce.promotion.offer.client.web.context.info.OfferItemDetail offerItemDetail)
OfferItemDetail
from the given
OfferItemDetail
.offerItemDetail
- the
OfferItemDetail
to build the OfferItemDetail
fromOfferItemDetail
from the given
OfferItemDetail
protected com.broadleafcommerce.promotion.offer.client.web.context.CustomerContext createCustomerContext()
CustomerContext
and add customer and customer segments. Uses the current
authentication token to determine principal and details.CustomerContext
protected UserTargetGenerationService getUserTargetGenerationService()
protected CartTotalsCalculator getCartTotalsCalculator()
protected CartOperationServiceOfferUtils getCartOpsServiceOfferUtils()
@Autowired public void setCartOpsServiceOfferUtils(CartOperationServiceOfferUtils cartOpsServiceOfferUtils)
Copyright © 2021. All rights reserved.