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 Details

    • ResetDeliveryMethodOnAddToCartMethodHook

      public ResetDeliveryMethodOnAddToCartMethodHook()
  • Method Details

    • beforeAddToCart

      public void beforeAddToCart(CommerceCartParameter paramCommerceCartParameter) throws de.hybris.platform.commerceservices.order.CommerceCartModificationException
      Specified by:
      beforeAddToCart in interface de.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:
      afterAddToCart in interface de.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