Topic
  • 7 replies
  • Latest Post - ‏2015-01-23T08:34:19Z by Remya Thampi
kianwei
kianwei
8 Posts

Pinned topic Apply 2 coupons ( same coupon promotion ) but only applicable for 1 time!!

‏2012-04-14T10:52:51Z |
I have created the Coupon Promotion
  • Catalog-entry-level promotions
  • Combine with other promotions – stackable
  • Amount Off : $10
  • Minimum Quantity : 1
and issue the coupon via dialog activity for ( issue after customer places order ) .

I apply the first coupon, it deducts $10 from the product.
When i try to apply the second coupon ( same coupon promotion as first coupon ), it won,t deduct anymore or no price changes.

Question : Only applicable for 1 time on category entry/product even apply multiple coupons ( same coupon promotion ) ?
Is it the correct behavior of WebSphere Commerce or the wrong configuration of coupon promotion?

Thanks;

Best Regards,
Updated on 2012-04-19T18:45:08Z at 2012-04-19T18:45:08Z by SystemAdmin
  • jwbarnes
    jwbarnes
    42 Posts

    Re: Apply 2 coupons ( same coupon promotion ) but only applicable for 1 time!!

    ‏2012-04-19T14:57:57Z  
    Did you state it could be applied more than once to an order? there is an order redemption limit usually


    IBM Certified System Administrator -- WebSphere Portal V6.0,
    IBM Certified Solution Developer -- WebSphere Portal v6.0, v6.1, V7.0

    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM
  • SystemAdmin
    SystemAdmin
    8614 Posts

    Re: Apply 2 coupons ( same coupon promotion ) but only applicable for 1 time!!

    ‏2012-04-19T18:45:08Z  
    This is as designed. A coupon of a particular promotion can be used only once in an order.
  • Fra_nk_
    Fra_nk_
    15 Posts

    Re: Apply 2 coupons ( same coupon promotion ) but only applicable for 1 time!!

    ‏2014-04-03T14:43:11Z  
    This is as designed. A coupon of a particular promotion can be used only once in an order.

    Anybody got- in the meanwhile- same requirement as kianwei?

    Apply 2 coupons- referring the same promotion- to the same order.

    We have seen wen can customize the promotion XML in order to cover this requirement, however there are complications when the order is placed and both the coupons should be made unavailable.

    So, do you know if there is any suggested way to make it possible?

     

    Thanks in advance

    Fran 

  • Arjun Sarkar
    Arjun Sarkar
    16 Posts

    Re: Apply 2 coupons ( same coupon promotion ) but only applicable for 1 time!!

    ‏2014-07-15T14:24:47Z  
    • Fra_nk_
    • ‏2014-04-03T14:43:11Z

    Anybody got- in the meanwhile- same requirement as kianwei?

    Apply 2 coupons- referring the same promotion- to the same order.

    We have seen wen can customize the promotion XML in order to cover this requirement, however there are complications when the order is placed and both the coupons should be made unavailable.

    So, do you know if there is any suggested way to make it possible?

     

    Thanks in advance

    Fran 

    Hi,

    You can perform the below steps. 

    A) Create a new adjustment class

    This code determines if there is more than one coupon applied for the promotion. If there is, the adjustment is modified by the number of coupons applied. The number of coupons applied is set into the adjustment (this value will be used when the order is placed). If too many coupons are applied, only the maximum number required to reduce the order to $0.00 will be applied.

    com.custom.commerce.marketing.promotion.reward.ExtFixedAmountOffAdjustment


    B) Update the order level amount off XSL template to use the new adjustment class

    Create the file <WC_eardir>\xml\config\com.ibm.commerce.promotion-ext\template\ExtOrderAmountOffPurchaseConditionTemplate.xsl

    This is a copy of the OOB OrderAmountOffPurchaseConditionTemplate template - the only change is to set the adjustment implementation class to be the custom adjustment class

    C) Register the new template

    Edit or create <WC_eardir>\xml\config\com.ibm.commerce.promotion-ext\com.ibm.commerce.promotion.facade.server.config.PromotionComponentConfigurationImpl.xml

    D) New coupon daemon

    This code is called when the order is placed. If more than one coupon was applied for a promotion, then the additional coupons need to be cancelled so that they cannot be used again

    E) Register the new coupon daemon class

    Edit <WC_eardir>\xml\PromotionEngineConfiguration\WCSPromotionEngineConfig.xml

    Change

            <Listener impl="com.ibm.commerce.marketing.promotion.coupon.CouponDaemon">
                <Name>[SYSTEM]COUPONDAEMON</Name>
                <ListensFor>com.ibm.commerce.marketing.promotion.event.PromotionAppliedEvent</ListensFor>
            </Listener>

    to

            <Listener impl="com.custom.commerce.marketing.promotion.coupon.ExtCouponDaemon">
                <Name>[SYSTEM]COUPONDAEMON</Name>
                <ListensFor>com.ibm.commerce.marketing.promotion.event.PromotionAppliedEvent</ListensFor>
            </Listener>

    F) Restart the server
    G) New promotions using coupons need to be created.

    Thanks,

    Arjun

  • Remya Thampi
    Remya Thampi
    11 Posts

    Re: Apply 2 coupons ( same coupon promotion ) but only applicable for 1 time!!

    ‏2015-01-16T09:10:46Z  

    Hi,

    You can perform the below steps. 

    A) Create a new adjustment class

    This code determines if there is more than one coupon applied for the promotion. If there is, the adjustment is modified by the number of coupons applied. The number of coupons applied is set into the adjustment (this value will be used when the order is placed). If too many coupons are applied, only the maximum number required to reduce the order to $0.00 will be applied.

    com.custom.commerce.marketing.promotion.reward.ExtFixedAmountOffAdjustment


    B) Update the order level amount off XSL template to use the new adjustment class

    Create the file <WC_eardir>\xml\config\com.ibm.commerce.promotion-ext\template\ExtOrderAmountOffPurchaseConditionTemplate.xsl

    This is a copy of the OOB OrderAmountOffPurchaseConditionTemplate template - the only change is to set the adjustment implementation class to be the custom adjustment class

    C) Register the new template

    Edit or create <WC_eardir>\xml\config\com.ibm.commerce.promotion-ext\com.ibm.commerce.promotion.facade.server.config.PromotionComponentConfigurationImpl.xml

    D) New coupon daemon

    This code is called when the order is placed. If more than one coupon was applied for a promotion, then the additional coupons need to be cancelled so that they cannot be used again

    E) Register the new coupon daemon class

    Edit <WC_eardir>\xml\PromotionEngineConfiguration\WCSPromotionEngineConfig.xml

    Change

            <Listener impl="com.ibm.commerce.marketing.promotion.coupon.CouponDaemon">
                <Name>[SYSTEM]COUPONDAEMON</Name>
                <ListensFor>com.ibm.commerce.marketing.promotion.event.PromotionAppliedEvent</ListensFor>
            </Listener>

    to

            <Listener impl="com.custom.commerce.marketing.promotion.coupon.ExtCouponDaemon">
                <Name>[SYSTEM]COUPONDAEMON</Name>
                <ListensFor>com.ibm.commerce.marketing.promotion.event.PromotionAppliedEvent</ListensFor>
            </Listener>

    F) Restart the server
    G) New promotions using coupons need to be created.

    Thanks,

    Arjun

    Hi ,

     

    I did the above mentioned steps till Step c, but still on applying the promoCode it is again taking the FixedAmountOffAdjustment instead of invoking my custom command. What can be the issue?

  • Arjun Sarkar
    Arjun Sarkar
    16 Posts

    Re: Apply 2 coupons ( same coupon promotion ) but only applicable for 1 time!!

    ‏2015-01-17T14:41:57Z  

    Hi ,

     

    I did the above mentioned steps till Step c, but still on applying the promoCode it is again taking the FixedAmountOffAdjustment instead of invoking my custom command. What can be the issue?

    Hi Remya,

    I guess that is happening because you have not created the new Coupon Daemon. I would suggest you complete all the steps mentioned above.

    Arjun

  • Remya Thampi
    Remya Thampi
    11 Posts

    Re: Apply 2 coupons ( same coupon promotion ) but only applicable for 1 time!!

    ‏2015-01-23T08:34:19Z  

    Hi Remya,

    I guess that is happening because you have not created the new Coupon Daemon. I would suggest you complete all the steps mentioned above.

    Arjun

    Hi Arjun,

     

    I had to reactivate the old promotion created in order to pickup the changes. It is working fine now. Thanks

     

    Remya