Ejemplo n.º 1
0
 public FindProduct(EntryContentBase entryContentBase, string language)
 {
     IndexId            = entryContentBase.ContentLink.ID + "_" + language;
     Id                 = entryContentBase.ContentLink.ID;
     Code               = entryContentBase.Code;
     Name               = entryContentBase.Name;
     DisplayName        = entryContentBase.DisplayName;
     Language           = language;
     Description        = Description ?? null;
     Overview           = Overview ?? null;
     ParentCategoryId   = entryContentBase.GetProductCategoryIds(language);
     ParentCategoryName = entryContentBase.GetParentCategoryNames(language);
     MainCategoryName   = entryContentBase.GetMainCategory(language);
     CategoryName       = entryContentBase.GetCategoryName(language);
     ProductUrl         = _urlResolver.Service.GetUrl(entryContentBase.ContentLink, language);
     DefaultImageUrl    = entryContentBase.GetDefaultImage();
     AverageRating      = entryContentBase.GetAverageRating();
     DefaultInventory   = entryContentBase.GetStock();
 }
Ejemplo n.º 2
0
 public FindProduct(EntryContentBase entryContentBase, string language)
 {
     IndexId = entryContentBase.ContentLink.ID + "_" + language;
     Id = entryContentBase.ContentLink.ID;
     Code = entryContentBase.Code;
     Name = entryContentBase.Name;
     DisplayName = entryContentBase.DisplayName;
     Language = language;
     Description = Description ?? null;
     Overview = Overview ?? null;
     ParentCategoryId = entryContentBase.GetProductCategoryIds(language);
     ParentCategoryName = entryContentBase.GetParentCategoryNames(language);
     MainCategoryName = entryContentBase.GetMainCategory(language);
     CategoryName = entryContentBase.GetCategoryName(language);
     ProductUrl = _urlResolver.Service.GetUrl(entryContentBase.ContentLink, language);
     DefaultImageUrl = entryContentBase.GetDefaultImage();
     AverageRating = entryContentBase.GetAverageRating();
     DefaultInventory = entryContentBase.GetStock();
 }
        protected void PopulateCommonData(EntryContentBase content, IMarket currentMarket, CustomerContact currentContact)
        {
            Code          = content.Code;
            ContentLink   = content.ContentLink;
            DisplayName   = content.DisplayName ?? content.Name;
            ProductUrl    = _urlResolver.GetUrl(ContentLink);
            Description   = content.GetPropertyValue("Description");
            Overview      = content.GetPropertyValue("Overview");
            AverageRating = content.GetPropertyValue <double>("AverageRating");

            InStock = content.GetStock() > 0;

            ContentType = content.GetType().Name;

            if (string.IsNullOrEmpty(Overview))
            {
                Overview = Description;
            }

            CurrentContactIsCustomerClubMember = currentContact.IsCustomerClubMember();
        }
        protected void PopulateCommonData(EntryContentBase content, IMarket currentMarket, CustomerContact currentContact)
        {
            Code = content.Code;
            ContentLink = content.ContentLink;
            DisplayName = content.DisplayName ?? content.Name;
            ProductUrl = _urlResolver.GetUrl(ContentLink);
            Description = content.GetPropertyValue("Description");
            Overview = content.GetPropertyValue("Overview");
            AverageRating = content.GetPropertyValue<double>("AverageRating");

            InStock = content.GetStock() > 0;

            ContentType = content.GetType().Name;

            if (string.IsNullOrEmpty(Overview))
                Overview = Description;

            CurrentContactIsCustomerClubMember = currentContact.IsCustomerClubMember();
        }