Class ResetDeliveryMethodOnAddToCartMethodHook
java.lang.Object
de.hybris.platform.b2ctelcoservices.hook.impl.ResetDeliveryMethodOnAddToCartMethodHook
- All Implemented Interfaces:
de.hybris.platform.commerceservices.order.hook.CommerceAddToCartMethodHook
public class ResetDeliveryMethodOnAddToCartMethodHook
extends Object
implements de.hybris.platform.commerceservices.order.hook.CommerceAddToCartMethodHook
Resets delivery mode to null every time on adding a new product to the cart to avoid keeping inappropriate delivery
mode for the new items.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidafterAddToCart(CommerceCartParameter paramCommerceCartParameter, CommerceCartModification paramCommerceCartModification) voidbeforeAddToCart(CommerceCartParameter paramCommerceCartParameter) protected de.hybris.platform.order.CartServicevoidsetCartService(de.hybris.platform.order.CartService cartService)
-
Constructor Details
-
ResetDeliveryMethodOnAddToCartMethodHook
public ResetDeliveryMethodOnAddToCartMethodHook()
-
-
Method Details
-
beforeAddToCart
public void beforeAddToCart(CommerceCartParameter paramCommerceCartParameter) throws de.hybris.platform.commerceservices.order.CommerceCartModificationException - Specified by:
beforeAddToCartin interfacede.hybris.platform.commerceservices.order.hook.CommerceAddToCartMethodHook- Throws:
de.hybris.platform.commerceservices.order.CommerceCartModificationException
-
afterAddToCart
public void afterAddToCart(CommerceCartParameter paramCommerceCartParameter, CommerceCartModification paramCommerceCartModification) throws de.hybris.platform.commerceservices.order.CommerceCartModificationException - Specified by:
afterAddToCartin interfacede.hybris.platform.commerceservices.order.hook.CommerceAddToCartMethodHook- Throws:
de.hybris.platform.commerceservices.order.CommerceCartModificationException
-
getCartService
protected de.hybris.platform.order.CartService getCartService()- Returns:
- the cartService
-
setCartService
public void setCartService(de.hybris.platform.order.CartService cartService) - Parameters:
cartService- the cartService to set
-