Skip to Content
0
Former Member
Aug 07, 2016 at 09:40 PM

voucher redemption Issue in 5.0.3.1

93 Views

Hi, In my current Project, we are using Hybris 5.0.3.1. When we are trying to apply Serial Voucher for Cart, we are getting successfully applied message and the discount amount was not updated from total cmount. I have verified below method in Voucher.class and got some doubt.

aCart.addDiscount(this); is showing me that it deprecated

 public boolean redeem(String aVoucherCode, CCart)
             throws JaloPriceFactoryException {
         if ((checkVoucherCode(aVoucherCode))
                 && (isReservable(aVoucherCode, aCart))) {
             aCart.addDiscount(this);
             aCart.recalculate();
             Collection appliedVoucherCodes = new LinkedHashSet(VoucherManager
                     .getInstance().getAppliedVoucherCodes(aCart));
             appliedVoucherCodes.add(aVoucherCode);
             VoucherManager.getInstance().setAppliedVoucherCodes(aCart,
                     appliedVoucherCodes);
             return true;
         }
         return false;
     }
 

IF the method is deprecated and the same method we are already used in the code base,then it will work or not. Really appreciate if anybody gives a quick response to this question.

Thanks, Mallikharjuna