Class AddOrderItemWithPromotionCodeOrCouponCmdImpl

  • All Implemented Interfaces:
    AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, AddOrderItemWithPromotionCodeOrCouponCmd, OrderItemAddCmd, OrderItemUpdateCmd, Protectable,,,,,,

    public class AddOrderItemWithPromotionCodeOrCouponCmdImpl
    extends OrderItemAddCmdImpl
    implements AddOrderItemWithPromotionCodeOrCouponCmd
    This Controller Command implementation adds a promotion code or coupon to an order by invoking the backend runtime promotion engine. It implements the AddOrderItemWithPromotionCodeOrCouponCmd interface. It is called in nested controller commands and redirects to page with different types of error messages in case there is an error in running this command.
    • If partNumber or catEntryId parameters are set, then add the item to the customer's pending order. If partNumber or catEntryId parameters are not set, then only create a pending order if one does not currently exist.
    • If the promoCode parameter is provided, then apply the promotion code to the pending order. Otherwise, if the promoName parameter is provided, then find the specified promotion, and issue a coupon to the customer associated with that promotion. Then apply the coupon to the customer's pending order.
    See Also:
    Serialized Form