1.5 Bug in the ApplyDiscountCouponCode() method

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
14 anos atrás
Thanks Nop Team, thanks for sharing this App to all of us.

The warning message will not be showed, because "isDiscountValid" will always have the true value.


Daoming.



protected void ApplyDiscountCouponCode()
        {
            string couponCode = this.txtDiscountCouponCode.Text.Trim();
            if (String.IsNullOrEmpty(couponCode))
                return;

            bool isDiscountValid = true;
            if (isDiscountValid)
            {
                pnlDiscountWarnings.Visible = false;
                lblDiscountWarning.Visible = false;

                CustomerManager.ApplyDiscountCouponCode(couponCode);
                this.BindData();
            }
            else
            {
                pnlDiscountWarnings.Visible = true;
                lblDiscountWarning.Visible = true;
                lblDiscountWarning.Text = GetLocaleResourceString("ShoppingCart.DiscountCouponCode.WrongDiscount");
            }
        }
14 anos atrás
Can you please add this to codeplex? nopcommerce.codeplex.com
14 anos atrás
It' not the bug. It's by design now
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.