public List <LineItem> GetItems(string cart, string language)
        {
            CartHelper      ch    = new CartHelper(cart);
            List <LineItem> items = new List <LineItem>();

            if (ch.LineItems != null)
            {
                foreach (Mediachase.Commerce.Orders.LineItem lineItem in ch.LineItems)
                {
                    var item = new LineItem(lineItem, language);
                    item.UpdateData(lineItem);
                    items.Add(item);
                }
            }

            return(items);
        }
        private void AddCustomProperties(LineItem lineItem, Cart cart)
        {
            Mediachase.Commerce.Orders.LineItem item = cart.OrderForms[0].LineItems.FindItemByCatalogEntryId(lineItem.Code);

            // Make sure we have all available data on the item before
            // we proceed
            lineItem.UpdateData(item);

            //TODO: Let specific model implementation populate these fields, we need to know too much about the model here
            item[Constants.Metadata.LineItem.DisplayName]   = lineItem.Name;
            item[Constants.Metadata.LineItem.ImageUrl]      = lineItem.ImageUrl;
            item[Constants.Metadata.LineItem.Size]          = lineItem.Size;
            item[Constants.Metadata.LineItem.Description]   = lineItem.Description;
            item[Constants.Metadata.LineItem.Color]         = lineItem.Color;
            item[Constants.Metadata.LineItem.ColorImageUrl] = lineItem.ColorImageUrl;
            item[Constants.Metadata.LineItem.ArticleNumber] = lineItem.ArticleNumber;

            cart.AcceptChanges();
        }
        private void AddCustomProperties(LineItem lineItem, Cart cart)
        {
            Mediachase.Commerce.Orders.LineItem item = cart.OrderForms[0].LineItems.FindItemByCatalogEntryId(lineItem.Code);

            // Make sure we have all available data on the item before
            // we proceed
            lineItem.UpdateData(item);

            //TODO: Let specific model implementation populate these fields, we need to know too much about the model here
            item[Constants.Metadata.LineItem.DisplayName] = lineItem.Name;
            item[Constants.Metadata.LineItem.ImageUrl] = lineItem.ImageUrl;
            item[Constants.Metadata.LineItem.Size] = lineItem.Size;
            item[Constants.Metadata.LineItem.Description] = lineItem.Description;
            item[Constants.Metadata.LineItem.Color] = lineItem.Color;
            item[Constants.Metadata.LineItem.ColorImageUrl] = lineItem.ColorImageUrl;
            item[Constants.Metadata.LineItem.ArticleNumber] = lineItem.ArticleNumber;

            cart.AcceptChanges();
        }
        public List<LineItem> GetItems(string cart, string language)
        {
            CartHelper ch = new CartHelper(cart);
            List<LineItem> items = new List<LineItem>();
            if (ch.LineItems != null)
            {
                foreach (Mediachase.Commerce.Orders.LineItem lineItem in ch.LineItems)
                {
                    var item = new LineItem(lineItem, language);
                    item.UpdateData(lineItem);
                    items.Add(item);
                }
            }

            return items;
        }