Example #1
0
        public decimal CheckoutCart(CartDTO cartViewModelObj)
        {
            decimal totalBillAmount = 0;

            if (cartViewModelObj != null && cartViewModelObj.CartItems != null && cartViewModelObj.CartItems.Count > 0)
            {
                var promotionCodes = promotionObj.GetActivePromotionCode();
                totalBillAmount = promotionObj.ApplyPromotionCode(cartViewModelObj.CartItems, promotionCodes);
            }
            return(totalBillAmount);
        }