예제 #1
0
        /// <summary>
        /// Sepete kupon tanımlame methodu
        /// </summary>
        /// <param name="coupon">Kupon</param>
        public void ApplyCoupon(ICoupon coupon)
        {
            var nPrice = coupon.CalculateCoupon(CartPrice);

            if (nPrice != CartPrice)
            {
                _UsedCoupon     = coupon;
                _discountCoupon = CartPrice - nPrice;
                CartPrice       = CartPrice - _discountCoupon;
            }
        }