com.ibm.commerce.tools.ecoupon

Class ECouponPromotionSaveCmdImpl

  • All Implemented Interfaces:
    AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, Protectable, ECConstants, ToolsControllerCommand, ECToolsConstants, ECECouponConstant, ECouponPromotionSaveCmd, com.ibm.websphere.cache.Sizeable, com.ibm.websphere.command.CacheableCommand, com.ibm.websphere.command.Command, com.ibm.websphere.command.CommandCaller, com.ibm.websphere.command.TargetableCommand, java.io.Serializable

    Deprecated. 
    The WC54 coupon feature will be replaced by the WC56 promotion engine coupon feature.

    public class ECouponPromotionSaveCmdImpl
    extends ToolsControllerCommandImpl
    implements ECConstants, ECToolsConstants, ECECouponConstant, ECouponPromotionSaveCmd
    This is the default implementation of the ECouponPromotionSaveCmd command. It creates a coupon promotion. It uses the CreateCouponDiscountCmd to create the calculation code related entries. It also uses the following access beans: CouponPromotionAccessBean, PromoDescriptionAccessBean, PromoOrderAccessBean, PromoProdAccessBean and PromoCatAccessBean. It assumes that the parameters are passed in the request as a hashtable. Here is a summary of all the parameters.
    Parameter Name Valid Type Optional/Mandatory
    eCouponName String - Name of promotion Mandatory
    eCouponCurr String - Currency Mandatory
    eCouponDesc String - Merchant viewable description Optional
    shortDesc String - shopper viewable short description Optional
    longDesc String - shopper viewable long description Optional
    fullImagePath String - shopper viewable full image path Optional
    thumbNailPath String - shopper viewable thumbnail path Optional
    hasDateTimeRange "true"/"false" Mandatory
    eCouponStartYear String representing an year Mandatory if hasDateTimeRange="true"
    eCouponStartMonth String representing a month Mandatory if hasDateTimeRange="true"
    eCouponStartDay String representing a day Mandatory if hasDateTimeRange="true"
    eCouponEndYear String representing an year Mandatory if hasDateTimeRange="true"
    eCouponEndMonth String representing a month Mandatory if hasDateTimeRange="true"
    eCouponEndDay String representing a day Mandatory if hasDateTimeRange="true"
    eCouponStartTimeSelectedIndex String representing an hour Mandatory if hasDateTimeRange="true"
    hasNumOffer "true"/"false" Mandatory
    eCouponNumOffer integer - number of coupons Mandatory if hasNumOffer="true"
    purchaseConditionType 0 - product, 1 - order, 2 - category Mandatory
    minAmt a double representing minimum qualifying amount for order type coupon Mandatory if purchaseConditionType=0
    hasMax "true"/"false" Mandatory if purchaseConditionType=0
    maxAmt a double representing minimum qualifying amount for order type coupon Mandatory if purchaseConditionType=0
    orderType 0 - percentage 1 - fixed amount discount on order Mandatory if purchaseConditionType=0
    orderPercentageAmt percentage discount amount Mandatory if orderType=0
    orderFixedAmt fixed discount amount Mandatory if orderType=1
    product Hashtable of product SKUs in the purchase condition Mandatory if purchaseConditionType=1
    checkedProducts Hashtable of product SKUs to be discounted Mandatory if purchaseConditionType=1
    productType 0 - percentage 1 - fixed amount discount on products Mandatory if purchaseConditionType=1
    productPercentageAmt percentage discount amount Mandatory if productType=0
    productFixedAmt fixed discount amount Mandatory if productType=1
    catalogId The catalogId on which the coupon is defined Mandatory if purchaseConditionType=2
    category Hashtable of category identifiers in the purchase condition Mandatory if purchaseConditionType=2
    checkedCategorys Hashtable of category identifiers to be discounted Mandatory if purchaseConditionType=2
    categoryType 0 - percentage 1 - fixed amount discount on categories Mandatory if purchaseConditionType=2
    categoryPercentageAmt percentage discount amount Mandatory if productType=2
    categoryFixedAmt fixed discount amount Mandatory if productType=2

    Behaviour If any of the required parameter to this command is missing then it throws ECSystemException.

    The command first checks if the Coupon promotion name already exists in CPPMN table or in CALCODE table. If yes, then the name modification page is displayed to the user, else the coupon promotion is created.

    See Also:
    Serialized Form
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        Deprecated. 
        IBM copyright notice field.
        See Also:
        Constant Field Values
    • Constructor Detail

      • ECouponPromotionSaveCmdImpl

        public ECouponPromotionSaveCmdImpl()
        Deprecated.