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 void
afterPlaceOrder(CommerceCheckoutParameter parameter, CommerceOrderResult result)
Executed after the place ordervoid
beforePlaceOrder(CommerceCheckoutParameter parameter)
Executed before the place ordervoid
beforeSubmitOrder(CommerceCheckoutParameter parameter, CommerceOrderResult result)
Executed before the submit orderprotected CustomerCouponService
getCustomerCouponService()
protected SessionService
getSessionService()
void
removeCouponsForCustomer(UserModel currentUser, OrderModel order)
Removes the coupons from the customer and resets the notification statusvoid
setCustomerCouponService(CustomerCouponService customerCouponService)
void
setSessionService(SessionService sessionService)
void
updateContinueUrl()
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:CustomerCouponsPlaceOrderStrategy
Removes the coupons from the customer and resets the notification status- Specified by:
removeCouponsForCustomer
in 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:CustomerCouponsPlaceOrderStrategy
Redirects the continue url to the Open-Catalogue if there is coupon code in continue url- Specified by:
updateContinueUrl
in interfaceCustomerCouponsPlaceOrderStrategy
-
afterPlaceOrder
public void afterPlaceOrder(CommerceCheckoutParameter parameter, CommerceOrderResult result) throws InvalidCartException
Description copied from interface:CommercePlaceOrderMethodHook
Executed after the place order- Specified by:
afterPlaceOrder
in 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:CommercePlaceOrderMethodHook
Executed before the place order- Specified by:
beforePlaceOrder
in 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:CommercePlaceOrderMethodHook
Executed before the submit order- Specified by:
beforeSubmitOrder
in 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)
-
-