示例#1
0
        public double GetCartTotalAmountAfterDiscounts(CartHelper.CartExamples cartExample, int productFirstQuantity, int productSecondQuantity, int productThirdQuantity, bool applyCoupon)
        {
            Cart cart = CartHelper.GetCart(cartExample, productFirstQuantity, productSecondQuantity, productThirdQuantity);

            if (applyCoupon)
            {
                Coupon coupon = new RateCoupon("100 TL üzeri %20 İndirim", 100, 20);
                cart.ApplyCoupon(coupon);
            }

            return(cart.GetCartTotalAmountAfterDiscounts());
        }
示例#2
0
        public double GetCouponDiscount(CartHelper.CartExamples cartExample, int productPrice10Quantity, int productPrice250Quantity, int productPrice50Quantity, bool applyCoupon)
        {
            Cart cart = CartHelper.GetCart(cartExample, productPrice10Quantity, productPrice250Quantity, productPrice50Quantity);

            if (applyCoupon)
            {
                Coupon coupon = new RateCoupon("100 TL üzeri %20 İndirim", 100, 20);
                cart.ApplyCoupon(coupon);
            }

            return(cart.GetCouponDiscount());
        }
        public double CalculateDeliveryCost(CartHelper.CartExamples cartExample, int quantity1, int quantity2, int quantity3)
        {
            Cart cart = CartHelper.GetCart(cartExample, quantity1, quantity2, quantity3);

            return(_deliveryService.CalculateDeliveryCost(cart));
        }
示例#4
0
        public double GetCartAmountAfterCampaignDiscount(CartHelper.CartExamples cartExample, int productPrice10Quantity, int productPrice250Quantity, int productPrice50Quantity)
        {
            Cart cart = CartHelper.GetCart(cartExample, productPrice10Quantity, productPrice250Quantity, productPrice50Quantity);

            return(cart.GetCartAmountAfterCampaignDiscount());
        }
示例#5
0
        public double GetProductCount(CartHelper.CartExamples cartExample, int productPrice10Quantity, int productPrice250Quantity, int productPrice50Quantity)
        {
            Cart cart = CartHelper.GetCart(cartExample, productPrice10Quantity, productPrice250Quantity, productPrice50Quantity);

            return(cart.ProductCount);
        }