1.5 Bug in the ApplyDiscountCouponCode() method

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
Hace 14 años
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");
            }
        }
Hace 14 años
Can you please add this to codeplex? nopcommerce.codeplex.com
Hace 14 años
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.