Class TmaResourcesCommerceAddToCartMethodHook

  • All Implemented Interfaces:
    de.hybris.platform.commerceservices.order.hook.CommerceAddToCartMethodHook

    public class TmaResourcesCommerceAddToCartMethodHook
    extends java.lang.Object
    implements de.hybris.platform.commerceservices.order.hook.CommerceAddToCartMethodHook
    Resource specific add to cart operations.
    Since:
    1911
    • Constructor Detail

      • TmaResourcesCommerceAddToCartMethodHook

        public TmaResourcesCommerceAddToCartMethodHook​(TmaCommerceCartResourceService tmaCommerceCartResourceService)
    • Method Detail

      • beforeAddToCart

        public void beforeAddToCart​(CommerceCartParameter parameter)
        Perform validation operations for cart entries containing resources.
        Specified by:
        beforeAddToCart in interface de.hybris.platform.commerceservices.order.hook.CommerceAddToCartMethodHook
        Parameters:
        parameter - cart parameter containing new cart entry details
      • afterAddToCart

        public void afterAddToCart​(CommerceCartParameter parameter,
                                   CommerceCartModification result)
        Updates the newly added order entry with resources from the CommerceCartParameter
        Specified by:
        afterAddToCart in interface de.hybris.platform.commerceservices.order.hook.CommerceAddToCartMethodHook
        Parameters:
        parameter - details for the new cart entry, before to be added to cart
        result - details for the new cart entry, after it was added to cart