예제 #1
0
        private CartResult GetFullCartResult(string cartName, string message = null)
        {
            var totalAmount = Cart.Service.GetTotalAmount(cartName);
            var result =  new CartResult()
            {
                Success = true,
                Result = message,
                Total = Cart.Service.GetTotal(cartName),
                TotalAmount = totalAmount,
                TotalLineItemsAmount = Cart.Service.GetTotalLineItemsAmount(cartName),
                Tax = Cart.Service.GetTax(cartName),
                Shipping = Cart.Service.GetShipping(cartName),
                Discount = Cart.Service.GetTotalDiscount(cartName),
                LineItems = Cart.Service.GetItems(cartName, this.Language),
                DiscountCodes = Cart.Service.GetAllDiscountCodes(cartName)
            };

            return result;
        }