Class CustomerCouponCommercePlaceOrderMethodHook
- java.lang.Object
-
- de.hybris.platform.customercouponservices.order.impl.CustomerCouponCommercePlaceOrderMethodHook
-
- All Implemented Interfaces:
CommercePlaceOrderMethodHook,CustomerCouponsPlaceOrderStrategy
public class CustomerCouponCommercePlaceOrderMethodHook extends java.lang.Object implements CommercePlaceOrderMethodHook, CustomerCouponsPlaceOrderStrategy
Deals with customer coupon for the customer when placing order
-
-
Constructor Summary
Constructors Constructor Description CustomerCouponCommercePlaceOrderMethodHook()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterPlaceOrder(CommerceCheckoutParameter parameter, CommerceOrderResult result)Executed after the place ordervoidbeforePlaceOrder(CommerceCheckoutParameter parameter)Executed before the place ordervoidbeforeSubmitOrder(CommerceCheckoutParameter parameter, CommerceOrderResult result)Executed before the submit orderprotected CustomerCouponServicegetCustomerCouponService()protected SessionServicegetSessionService()voidremoveCouponsForCustomer(UserModel currentUser, OrderModel order)Removes the coupons from the customer and resets the notification statusvoidsetCustomerCouponService(CustomerCouponService customerCouponService)voidsetSessionService(SessionService sessionService)voidupdateContinueUrl()Redirects the continue url to the Open-Catalogue if there is coupon code in continue url
-
-
-
Method Detail
-
removeCouponsForCustomer
public void removeCouponsForCustomer(UserModel currentUser, OrderModel order)
Description copied from interface:CustomerCouponsPlaceOrderStrategyRemoves the coupons from the customer and resets the notification status- Specified by:
removeCouponsForCustomerin interfaceCustomerCouponsPlaceOrderStrategy- Parameters:
currentUser- the current user used for removing from related user grouporder- the order used for finding the applied coupons
-
updateContinueUrl
public void updateContinueUrl()
Description copied from interface:CustomerCouponsPlaceOrderStrategyRedirects the continue url to the Open-Catalogue if there is coupon code in continue url- Specified by:
updateContinueUrlin interfaceCustomerCouponsPlaceOrderStrategy
-
afterPlaceOrder
public void afterPlaceOrder(CommerceCheckoutParameter parameter, CommerceOrderResult result) throws InvalidCartException
Description copied from interface:CommercePlaceOrderMethodHookExecuted after the place order- Specified by:
afterPlaceOrderin interfaceCommercePlaceOrderMethodHook- Parameters:
parameter- object containing all the information for checkoutresult- object containing the order model- Throws:
InvalidCartException
-
beforePlaceOrder
public void beforePlaceOrder(CommerceCheckoutParameter parameter) throws InvalidCartException
Description copied from interface:CommercePlaceOrderMethodHookExecuted before the place order- Specified by:
beforePlaceOrderin interfaceCommercePlaceOrderMethodHook- Parameters:
parameter- object containing all the information for checkout- Throws:
InvalidCartException
-
beforeSubmitOrder
public void beforeSubmitOrder(CommerceCheckoutParameter parameter, CommerceOrderResult result) throws InvalidCartException
Description copied from interface:CommercePlaceOrderMethodHookExecuted before the submit order- Specified by:
beforeSubmitOrderin interfaceCommercePlaceOrderMethodHook- Parameters:
parameter- object containing all the information for checkoutresult- object containing the order model- Throws:
InvalidCartException
-
getCustomerCouponService
protected CustomerCouponService getCustomerCouponService()
-
setCustomerCouponService
public void setCustomerCouponService(CustomerCouponService customerCouponService)
-
getSessionService
protected SessionService getSessionService()
-
setSessionService
public void setSessionService(SessionService sessionService)
-
-