public CartItemViewModel(CartItem item) { this.Id = item.Id.ToString(); this.Guid = item.Id; this.Title = item.Product.Title; this.Cost = item.Product.Cost.ToString("C2"); this.Total = item.Total.ToString("C2"); this.Quantity = item.Quantity; this.Key = item.Product.Title.ToUrl(); this.ProductGuid = item.Product.Guid; this.AvailableInventory = item.Product.Inventory; this.IsHire = item.Product.Type == ProductType.Hire; this.IsBuy = item.Product.Type == ProductType.Buy; this.IsDelivery = item.Product.Type == ProductType.Delivery; this.IsTheme = item.Product.Type == ProductType.Theme; this.ProductType = item.Product.Type; }
internal void AddProduct(CartItem cartItem) { this.Items.Add(new OrderItem(cartItem)); }
public OrderItem(CartItem cartItem) : this() { this.Product = cartItem.Product; this.Quantity = cartItem.Quantity; }