Error executing template "Designs/exhibition_site/eCom/Product/MCH365-profile.cshtml" System.Exception: Product is not of type Co3.MCH.Website.Frontend.Models.Frontend.MCH365.Profile. Check asset type of product id : TSP06bef93f522f068897d9dbea6f3. at Co3.MCH.Website.Frontend.Models.Frontend.Ecommerce.ProfileProduct.Populate(ProductSettings settings) in C:\Data\Development\git\mch365mb-dev\Co3.MCH.Website.Frontend\Models\Frontend\Ecommerce\ProfileProduct.cs:line 85 at Co3.MCH.Website.Frontend.Services.Ecommerce.ProductService.GetEspressoProduct(ProductSettings settings, String key) in C:\Data\Development\git\mch365mb-dev\Co3.MCH.Website.Frontend\Services\Ecommerce\ProductService.cs:line 59 at CompiledRazorTemplates.Dynamic.RazorEngine_5b8031cf87654b70bec6fbcb8ea79fd5.Execute() in E:\Websites\mch365.espresso5.dk\Files\Templates\Designs\exhibition_site\eCom\Product\MCH365-profile.cshtml:line 14 at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader) at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag) at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<RunCompile>b__0(TextWriter writer) at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter) at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template) at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template) at Dynamicweb.Rendering.Template.RenderRazorTemplate()1 @inherits Co3.Espresso.Website.TemplateBases.Paragraphs.Module 2 @using System.Text.RegularExpressions 3 @using Co3.Espresso.Base.Extensions 4 @using Co3.Espresso.Website.Services 5 @using Co3.Espresso.Website.Models.FrontEnd 6 @using Co3.Espresso.Website.Models.FrontEnd.Settings 7 @using Co3.MCH.Data.Models.MCH365 8 @using Co3.MCH.Website.Frontend.Helpers 9 @using Co3.MCH.Website.Frontend.Models.Frontend 10 @using Co3.MCH.Website.Frontend.Models.Frontend.Ecommerce 11 @using Dynamicweb.Core 12 13 @{ 14 ProfileProduct espressoProduct = Co3.MCH.Website.Frontend.Services.Ecommerce.ProductService.Instance.GetEspressoProduct( 15 new ProductSettings() 16 { 17 Id = GetString("Ecom:Product.ID"), 18 VariantId = GetString("Ecom:Product.VariantID"), 19 PrimaryVariantId = GetString("Ecom:Product.DefaultVariantComboID"), 20 EmbeddedInModelList = false 21 }, nameof(ProfileProduct) 22 ) as ProfileProduct; 23 24 // EXAMPLE 25 bool hasPresentation = espressoProduct.HasPresentation; 26 int presentationContactPersons = 0; 27 if (hasPresentation) 28 { 29 presentationContactPersons = espressoProduct.Presentation.ContactPersons.Products.Count(); 30 } 31 32 IEnumerable<BoothInfo> booths = espressoProduct.Booths; 33 34 // CUSTOM COMPANY FIELDS 35 string companyDescriptionFormatted = espressoProduct.Company.DescriptionFormatted; 36 37 string companyDescriptionFormattedStrippedHtml = companyDescriptionFormatted.StripHtml(); 38 39 string companyDescriptionFormattedMetaDesc = !string.IsNullOrEmpty(companyDescriptionFormattedStrippedHtml) ? companyDescriptionFormattedStrippedHtml : espressoProduct.Company.Name; 40 41 if ( companyDescriptionFormattedStrippedHtml.Length > 160 ) 42 { 43 companyDescriptionFormattedMetaDesc = !string.IsNullOrEmpty(companyDescriptionFormattedStrippedHtml) ? companyDescriptionFormattedStrippedHtml.Substring(0, 160) : espressoProduct.Company.Name; 44 } 45 46 string companyColor = ""; 47 48 if (espressoProduct.Company.BrandColor.IsNullOrEmpty()) 49 { 50 companyColor = MCH365Context.Current.TradeShowDetails.PrimaryColor; 51 } 52 else 53 { 54 companyColor = espressoProduct.Company.BrandColor; 55 } 56 57 // CUSTOM COMPANY COLOR SCHEME 58 Regex hexcodeRegex = new Regex(@"^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$"); 59 companyColor = hexcodeRegex.IsMatch( companyColor ) ? companyColor : "#000000"; 60 ColorHelper.HSL brandExhibitor = ColorHelper.Instance.HexToHsl(companyColor); 61 62 ViewBag.TextColor = brandExhibitor.L < 60 ? "e-text-light" : "e-text-dark"; 63 64 // VIDEO 65 string presentationVideo = ""; 66 67 if (espressoProduct.Presentation != null && espressoProduct.Presentation.Video != null && !string.IsNullOrEmpty(espressoProduct.Presentation.Video)) 68 { 69 string presentationVideoRaw = espressoProduct.Presentation.Video; 70 71 if (presentationVideoRaw.Contains("https://vimeo.com/")) 72 { 73 presentationVideo = "https://player.vimeo.com/video/" + (presentationVideoRaw.Replace("https://vimeo.com/", "")); 74 } 75 else if (presentationVideoRaw.Contains("https://youtu")) 76 { 77 presentationVideo = ("https://www.youtube.com/embed/" + presentationVideoRaw.Replace("https://youtu.be/", "").Replace("https://www.youtube.com/embed/", "")); 78 } 79 else if (presentationVideoRaw.Contains("https://www.youtube.com/watch?v=")) 80 { 81 presentationVideo = ("https://www.youtube.com/embed/" + presentationVideoRaw.Replace("https://www.youtube.com/watch?v=", "")); 82 } 83 else 84 { 85 presentationVideo = ("https://www.youtube.com/embed/" + presentationVideoRaw); 86 } 87 } 88 } 89 90 <style> 91 :root { 92 --exhibitor-color: @brandExhibitor.ToString(); 93 --exhibitor-color-darken: @brandExhibitor.Darken(10).ToString(); 94 --exhibition-profile-exhibitor-brand-color: hsl(var(--exhibitor-color)); 95 --exhibition-profile-exhibitor-brand-color-darken: hsl(var(--exhibitor-color-darken)); 96 --exhibition-profile-exhibitor-brand-color-opaque: hsla(var(--exhibitor-color), 0.85); 97 } 98 99 .breadcrumb.nav { 100 background-color: var(--exhibition-profile-exhibitor-brand-color-darken); 101 } 102103 </style> 104105 @RenderingService.Instance.SectionEnd() 106 @RenderingService.Instance.PartialView("ecom/product/partials/profile-details/MCH365-topsection.cshtml", espressoProduct) 107 @RenderingService.Instance.SectionStart(new SectionSettings 108 { 109 Classes = new ClassList("e-section mch365-custom-product-details-wrapper") 110 }) 111112113 @RenderingService.Instance.PartialView("ecom/product/partials/profile-details/MCH365-sidebar.cshtml", espressoProduct) 114 <div class="col-12 col-md-8 col-lg-9 p-columns mch365-custom-product-details-wrapper-main-content"> 115116 <div class="row align-items-end pt-3"> 117 <div class="col-12 col-md-6 col-lg-7"> 118 @if ( hasPresentation ) 119 { 120 <p class="lead font-weight-light mb-0">@Translate( "MCH365 - Exhibitor details topSectionFairInfoOn - Text", "på" ) @MCH365Context.Current.TradeShowDetails.Name</p> 121 } 122 <h1 class="mega my-0">@espressoProduct.Company.Name</h1> 123 </div> 124 @if (booths != null) 125 { 126 <div class="col-12 col-md-6 col-lg-5 mt-3 mt-md-0 d-flex flex-column justify-content-md-end align-items-md-end"> 127 <p class="h4 mb-0">@Translate("Stand")</p> 128 @if (booths.Count() == 1) 129 { 130 BoothInfo booth = booths.FirstOrDefault(); 131 if (booth.Hall != null && booth.Booth != null) 132 { 133 <h2 class="mb-0 font-weight-extrabold mt-0"> 134 <span class="enlarge-text">@booth.Hall.Name</span> @booth.Booth.Number 135 </h2> 136 } 137 } 138 else 139 { 140 <div class="d-flex flex-wrap justify-content-md-end w-100" style="column-gap: 1em;"> 141 @foreach (BoothInfo booth in booths) 142 { 143144 if (booth.Hall != null && booth.Booth != null) 145 { 146 <h2 class="small mt-0 mb-0 font-weight-extrabold flex-nowrap"> 147 @booth.Hall.Name <span class="text-downsize-notched">@booth.Booth.Number</span> 148 </h2> 149 } 150 } 151 </div> 152 } 153 </div> 154 } 155 <div class="col-12 pt-1"> 156 <hr/> 157 </div> 158 </div> 159160 <div class="row mt-2"> 161 <div class="col-12"> 162 <div class="row"> 163 <div class="col-12 col-lg-8 mb-2 pr-lg-2 pr-xl-3" id="presentation"> 164 @if (!string.IsNullOrEmpty(companyDescriptionFormatted)) 165 { 166 <p>@companyDescriptionFormatted</p> 167 } 168 else 169 { 170 <h4>@Translate("MCH365 - Exhibitor details descriptionNoInfoHeader - Heading", "Vi har registreret udstilleren som leverandør eller udstiller på messen.")</h4> 171 <p>@Translate("MCH365 - Exhibitor details descriptionNoInfoText - Text", "Dog har de endnu ikke oplyst yderligere beskrivelse på deres profil.")</p> 172 } 173174175 </div> 176 @if (espressoProduct.ContactPersons.Products.Any()) 177 { 178 @RenderingService.Instance.PartialView("ecom/product/partials/profile-details/MCH365-contactpersons.cshtml", espressoProduct) 179 } 180 </div> 181182 @if (espressoProduct.Products.Products.Any()) 183 { 184 <div class="row"> 185 @RenderingService.Instance.PartialView("ecom/product/partials/profile-details/MCH365-products.cshtml", espressoProduct) 186 </div> 187 } 188 @if (espressoProduct.Articles.Products.Any()) 189 { 190 <div class="row"> 191 @RenderingService.Instance.PartialView("ecom/product/partials/profile-details/MCH365-articles.cshtml", espressoProduct) 192 </div> 193 } 194 @if (espressoProduct.Cases.Products.Any()) 195 { 196 <div class="row"> 197 @RenderingService.Instance.PartialView("ecom/product/partials/profile-details/MCH365-cases.cshtml", espressoProduct) 198 </div> 199 } 200 @if (espressoProduct.Events.Products.Any()) 201 { 202 <div class="row"> 203 @RenderingService.Instance.PartialView("ecom/product/partials/profile-details/MCH365-events.cshtml", espressoProduct) 204 </div> 205 } 206207 </div> 208 </div> 209 </div> 210 @RenderingService.Instance.SectionEnd() 211 @RenderingService.Instance.SectionStart(new SectionSettings()) 212213 @SnippetStart("profileProductCompanyDescription")@companyDescriptionFormattedMetaDesc@SnippetEnd("profileProductCompanyDescription") @* Avoid using linebreaks in this snippet, as it will also add linebreaks to the content *@
Rettigheder
Virksomhedsprofiler, produktbeskrivelser, nyheder, billeder og andet visuelt materiale samt valgte interesseområder (herunder oplysninger om bæredygtighed og evt. AI-genereret indhold) uploades og vedligeholdes direkte af de enkelte udstillere.
Udstilleren er selv ansvarlig for det uploadede indhold og for at sikre, at vedkommende har de nødvendige rettigheder og tilladelser til at anvende og offentliggøre indholdet, herunder billeder, grafik og andet ophavsretligt beskyttet materiale, og at indholdet ikke krænker tredjemands rettigheder.
Indholdet repræsenterer udstillerens egne oplysninger og er ikke verificeret eller godkendt af Agromek/MCH A/S. Agromek/MCH A/S fraskriver sig ethvert ansvar for indholdets nøjagtighed, lovlighed samt eventuelle krænkelser af ophavsret eller andre tredjemandsrettigheder og for øvrige fejl og mangler i udstillernes indhold.