2 Replies Latest reply on Oct 11, 2013 8:18 PM by Grando

    ATG 10.2 coupon issue


      Hi all,


      I am using ATG10.2 and I am getting a problema with coupons.

      At my shopping cart, I am using CouponFormHandler to apply coupons, and it is being applied normally, giving the correct discount.

      But when I passed to checkout step, the coupon is removed by PromotionTools.


      Loggingdebug show me this log:


      **** debugMon Oct 07 14:00:24 BRT 20131381165224481/atg/commerce/promotion/PromotionToolsremovePromotion: pProfile=Profile[4604715]; pPromotion=Item Discount:promo5270014
      **** debugMon Oct 07 14:00:24 BRT 20131381165224481/atg/commerce/promotion/PromotionToolsfiring PromotionRevoked Event with messageSender atg.commerce.messaging.MessageSender@2e40777
      **** debugMon Oct 07 14:00:24 BRT 20131381165224482/atg/commerce/promotion/PromotionToolsSetting siteId of PromotionRevokedEvent to current context site id: mySiteId
      **** debugMon Oct 07 14:00:24 BRT 20131381165224482/atg/commerce/promotion/PromotionToolsPromotionRevokedMessage has been sent.


      I don't know why my coupon is being removed.

      Any help?


      Thanks in advance

        • 1. Re: ATG 10.2 coupon issue
          Nooruddin Shaik

          For some reason PromotionTools.removePromotion() is getting called by some of the API's.


          ATG provided source code for PromotionTools.java which you can copy into your module workspace and debug.

          Add a break point in removePromotion() method to see the stack thread who is calling it. Or modify this method to print the stack trace to find the calling method.



          This will lead you to find out why the promotion is revoked.




          • 2. Re: ATG 10.2 coupon issue

            Hi Shaik,


            I couldn't find the reason why my coupon is being removed.

            I tried to use another component, /atg/commerce/promotion/CouponFormHandler. When I put the couponCode in the form, it applies the discount but not the coupon code.

            It gives the discount in the order, but the couponCode is not persisted, so it seems like just a promotion (without my coupon) is being applied.


            Any suggestion? I really don't know why it is happening and why my couponCode is not being persisted.