Class BundleSelectionCriteriaAddToCartMethodHook
- java.lang.Object
-
- de.hybris.platform.configurablebundleservices.order.hook.BundleSelectionCriteriaAddToCartMethodHook
-
- All Implemented Interfaces:
CommerceAddToCartMethodHook
public class BundleSelectionCriteriaAddToCartMethodHook extends java.lang.Object implements CommerceAddToCartMethodHook
A hook that limits amount of particular products in single bundle.
-
-
Constructor Summary
Constructors Constructor Description BundleSelectionCriteriaAddToCartMethodHook()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterAddToCart(CommerceCartParameter parameters, CommerceCartModification result)Execute custom logic after adding product to cartvoidbeforeAddToCart(CommerceCartParameter parameter)Execute custom logic before adding product to cartprotected BundleTemplateServicegetBundleTemplateService()protected L10NServicegetL10NService()protected longgetTotalQuantityInBundle(CartModel cart, java.lang.Integer entryGroupNumber)voidsetBundleTemplateService(BundleTemplateService bundleTemplateService)voidsetL10NService(L10NService l10NService)
-
-
-
Method Detail
-
beforeAddToCart
public void beforeAddToCart(CommerceCartParameter parameter) throws CommerceCartModificationException
Description copied from interface:CommerceAddToCartMethodHookExecute custom logic before adding product to cart- Specified by:
beforeAddToCartin interfaceCommerceAddToCartMethodHook- Parameters:
parameter- A parameter object- Throws:
CommerceCartModificationException
-
getTotalQuantityInBundle
protected long getTotalQuantityInBundle(CartModel cart, java.lang.Integer entryGroupNumber)
-
afterAddToCart
public void afterAddToCart(CommerceCartParameter parameters, CommerceCartModification result) throws CommerceCartModificationException
Description copied from interface:CommerceAddToCartMethodHookExecute custom logic after adding product to cart- Specified by:
afterAddToCartin interfaceCommerceAddToCartMethodHook- Parameters:
parameters- A parameter objectresult- A return value of addToCart method- Throws:
CommerceCartModificationException
-
getL10NService
protected L10NService getL10NService()
-
setL10NService
public void setL10NService(L10NService l10NService)
-
getBundleTemplateService
protected BundleTemplateService getBundleTemplateService()
-
setBundleTemplateService
public void setBundleTemplateService(BundleTemplateService bundleTemplateService)
-
-