Class TmaCommerceAddToCartStrategy
- java.lang.Object
-
- de.hybris.platform.commerceservices.order.impl.AbstractCommerceCartStrategy
-
- de.hybris.platform.commerceservices.order.impl.AbstractCommerceAddToCartStrategy
-
- de.hybris.platform.commerceservices.order.impl.DefaultCommerceAddToCartStrategy
-
- de.hybris.platform.b2ctelcoservices.order.impl.TmaCommerceAddToCartStrategy
-
- All Implemented Interfaces:
TmaCartStrategy,de.hybris.platform.commerceservices.order.CommerceAddToCartStrategy
public class TmaCommerceAddToCartStrategy extends de.hybris.platform.commerceservices.order.impl.DefaultCommerceAddToCartStrategy implements TmaCartStrategy
OverridesDefaultCommerceAddToCartStrategyto calculate the cart before triggering add to cart and also after merging the entry.- Since:
- 6.7
-
-
Constructor Summary
Constructors Constructor Description TmaCommerceAddToCartStrategy(TmaCommerceCartResourceService tmaCommerceCartResourceService)
-
Method Summary
-
Methods inherited from class de.hybris.platform.commerceservices.order.impl.DefaultCommerceAddToCartStrategy
addCartEntry, addToCart, createAddToCartResp, createEmptyCartEntry, getEntryMergeStrategy, getStatusCodeAllowedQuantityChange, getStatusCodeForNotAllowedQuantityChange, getUnit, isProductForCode, mergeEntry, setEntryMergeStrategy
-
Methods inherited from class de.hybris.platform.commerceservices.order.impl.AbstractCommerceAddToCartStrategy
afterAddToCart, getCommerceAddToCartMethodHooks, getConfigurationService, setCommerceAddToCartMethodHooks, setConfigurationService, validateAddToCart
-
Methods inherited from class de.hybris.platform.commerceservices.order.impl.AbstractCommerceCartStrategy
checkCartLevel, getAllowedCartAdjustmentForProduct, getAvailableStockLevel, getBaseStoreService, getCartEntryDao, getCartService, getCommerceCartCalculationStrategy, getCommerceStockService, getEntryForNumber, getEntryForProductAndPointOfService, getEntryOrderChecker, getForceInStockMaxQuantity, getModelService, getProductService, isMaxOrderQuantitySet, isOrderEntryUpdatable, isStockLevelSufficient, normalizeEntryNumbers, setBaseStoreService, setCartEntryDao, setCartService, setCommerceCartCalculationStrategy, setCommerceStockService, setEntryOrderChecker, setForceInStockMaxQuantity, setModelService, setProductService
-
-
-
-
Constructor Detail
-
TmaCommerceAddToCartStrategy
public TmaCommerceAddToCartStrategy(TmaCommerceCartResourceService tmaCommerceCartResourceService)
-
-
Method Detail
-
processCartAction
public java.util.List<CommerceCartModification> processCartAction(java.util.List<CommerceCartParameter> commerceCartParameterList) throws de.hybris.platform.commerceservices.order.CommerceCartModificationException
Description copied from interface:TmaCartStrategyProcesses cart updates.- Specified by:
processCartActionin interfaceTmaCartStrategy- Parameters:
commerceCartParameterList- contains attributes used for cart updates- Returns:
- list
CommerceCartModification - Throws:
de.hybris.platform.commerceservices.order.CommerceCartModificationException- in case of any error occurs during cart update
-
addToCart
public CommerceCartModification addToCart(CommerceCartParameter parameter) throws de.hybris.platform.commerceservices.order.CommerceCartModificationException
- Specified by:
addToCartin interfacede.hybris.platform.commerceservices.order.CommerceAddToCartStrategy- Overrides:
addToCartin classde.hybris.platform.commerceservices.order.impl.DefaultCommerceAddToCartStrategy- Throws:
de.hybris.platform.commerceservices.order.CommerceCartModificationException
-
doAddToCart
protected CommerceCartModification doAddToCart(CommerceCartParameter parameter) throws de.hybris.platform.commerceservices.order.CommerceCartModificationException
- Overrides:
doAddToCartin classde.hybris.platform.commerceservices.order.impl.DefaultCommerceAddToCartStrategy- Throws:
de.hybris.platform.commerceservices.order.CommerceCartModificationException
-
createSubscriptionInfo
protected TmaCartSubscriptionInfoModel createSubscriptionInfo(PriceRowModel minimumPrice)
Creates a newTmaCartSubscriptionInfoModelbased on the information retrieved from the minimum identified price. In case no subscription term is found on the price, a default value is configured.- Parameters:
minimumPrice-- Returns:
- subscriptionInfo populated with the subscription term
-
beforeAddToCart
protected void beforeAddToCart(CommerceCartParameter parameters) throws de.hybris.platform.commerceservices.order.CommerceCartModificationException
- Overrides:
beforeAddToCartin classde.hybris.platform.commerceservices.order.impl.AbstractCommerceAddToCartStrategy- Throws:
de.hybris.platform.commerceservices.order.CommerceCartModificationException
-
validateApplicableEligiblity
protected void validateApplicableEligiblity(CommerceCartParameter parameter) throws de.hybris.platform.commerceservices.order.CommerceCartModificationException
Checks current user eligibility- Parameters:
parameter- the CommerceCartParameter- Throws:
de.hybris.platform.commerceservices.order.CommerceCartModificationException- the cart modification exception
-
getEnumerationService
protected de.hybris.platform.enumeration.EnumerationService getEnumerationService()
-
setEnumerationService
public void setEnumerationService(de.hybris.platform.enumeration.EnumerationService enumerationService)
-
getTmaPoService
protected TmaPoService getTmaPoService()
-
setTmaPoService
public void setTmaPoService(TmaPoService tmaPoService)
-
getCommercePriceService
protected TmaCommercePriceService getCommercePriceService()
-
setCommercePriceService
public void setCommercePriceService(TmaCommercePriceService commercePriceService)
-
getSubscriptionTermService
protected TmaSubscriptionTermService getSubscriptionTermService()
-
setSubscriptionTermService
public void setSubscriptionTermService(TmaSubscriptionTermService subscriptionTermService)
-
getTmaCommerceCartResourceService
protected TmaCommerceCartResourceService getTmaCommerceCartResourceService()
-
getCustomerInventoryService
protected TmaCustomerInventoryService getCustomerInventoryService()
-
setCustomerInventoryService
public void setCustomerInventoryService(TmaCustomerInventoryService customerInventoryService)
-
-