close

Børnetøj til drenge

0 Produkter

Error executing template "Designs/identity_b2c/ecom/productlist/partials/item.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
   at Co3.ID.Dw.Services.ProductService.GetVariantImages(IdentityProduct product, KeyValuePair`2 variantGroup)
   at Co3.ID.Dw.Models.Frontend.Ecommerce.IdentityProduct.GetVariantCombinationsPrimaryImages()
   at CompiledRazorTemplates.Dynamic.RazorEngine_0d6c01879b184b3c803c1520e23e0c62.Execute() in D:\dynamicweb.net\Solutions\id.espresso4.dk\Files\Templates\Designs\identity_b2c\ecom\productlist\partials\item.cshtml:line 54
   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.b__0(TextWriter writer)
   at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()

1 @inherits ViewModelTemplate< Co3.ID.Dw.Models.Frontend.Ecommerce.IdentityProduct > 2 @using Co3.Espresso.Base.Extensions 3 @using Co3.Espresso.Website.Models.FrontEnd.Ecommerce 4 @using Co3.Espresso.Website.Models.FrontEnd.Handlebars 5 @using Co3.Espresso.Website.Services 6 @using Co3.ID.Dw.Models.Frontend.Ecommerce 7 @using Dynamicweb.Rendering 8 @using Co3.ID.Dw.Services 9 10 @{ 11 string productName = Model.Name; 12 if ( productName.Length > 28 ) 13 { 14 productName = string.Format( "{0}...", productName.Substring( 0, 28 ) ); 15 } 16 } 17 18 <div class="e-block-link e-productlist-item js-e-block-link js-e-productlist-item js-e-productlist-item- p-1" data-product-id="@Model.Id" data-variant-id="@Model.VariantId"> 19 20 <div class="productlist-brand-wrapper"> 21 @if ( Model.BrandCode == "SS SOS" ) 22 { 23 @ImageService.Instance.GetSvgMarkup( "/Files/Images/products/Labels/SevenSeasByID.svg" ) 24 } 25 26 @if ( Model.BrandCode == "GEYSER" ) 27 { 28 @ImageService.Instance.GetSvgMarkup( "/Files/Images/products/Labels/GEYSER.svg" ) 29 } 30 31 @if ( Model.BrandCode == "PRO WEAR" ) 32 { 33 @ImageService.Instance.GetSvgMarkup( "/Files/Images/products/Labels/ProWearByID.svg" ) 34 } 35 </div> 36 37 <div class="productlist-label-container"> 38 @if ( Model.ProductLabels != null ) 39 { 40 foreach ( IdentityProductLabel label in Model.ProductLabels ) 41 { 42 <span class="productlist-label label-@label.ClassName ">@label.Text</span> 43 } 44 } 45 46 </div> 47 48 <div class="e-productlist-item-container"> 49 <div class="e-productlist-item-image-container"> 50 <a class="e-productlist-item-image-wrapper" href="@Model.Link"> 51 <img alt="@Model.Name" class="e-productlist-item-image js-e-productlist-item-image" src="@Model.ImagePrimary.Medium" data-base-image="@Model.ImagePrimary.Medium"> 52 </a> 53 54 @if ( Model.VariantPrimaryImages.Any() ) 55 { 56 <div class="identity-variant-listitem-select-option-container d-none d-md-block"> 57 <div class="d-flex identity-variant-listitem-select-option-wrapper"> 58 59 @{ 60 int variantCount = Model.VariantPrimaryImages.Count; 61 int variantCountTake = variantCount <= 5 ? 5 : 4; 62 } 63 @foreach ( IdentityProductVariants variantImage in Model.VariantPrimaryImages.Take( variantCountTake ) ) 64 { 65 <span class="select-option-color-wrapper js-select-option-color-wrapper"> 66 <a href="@variantImage.Link"><span class="identity-variant-listitem-select-option-color js-identity-variant-listitem-select-option-color" style="background-image: url(@variantImage.Image.Small);" data-hover-image="@variantImage.Image.Medium"></span></a> 67 </span> 68 } 69 @if ( Model.VariantPrimaryImages.Count > 5 ) 70 { 71 string moreVariantText = string.Format( "+{0}", Model.VariantPrimaryImages.Count - 4 ); 72 <span class="select-option-color-wrapper bg-light variant-option-extra-count"> 73 <span class="identity-variant-listitem-select-option-color">@moreVariantText</span> 74 </span> 75 } 76 </div> 77 </div> 78 79 } 80 81 </div> 82 <div class="e-productlist-item-text-container small"> @* CSS ADD text-truncate *@ 83 <p class="e-productlist-item-name mb-0"> 84 <a href="@Model.Link"> 85 @productName 86 </a> 87 </p> 88 <p class="e-productlist-item-text mb-0"> 89 <span class="e-productlist-item-price"> 90 <a href="@Model.Link"> 91 @Model.Price.Formatted 92 </a> 93 </span> 94 </p> 95 @if ( Model.VariantPrimaryImages.Any() ) { 96 97 int variantCount = Model.VariantPrimaryImages.Count; 98 99 if ( Model.VariantPrimaryImages.Count > 1 ) { 100 <div class="d-block d-md-none"> 101 <p class="p-0 m-0 font-weight-semibold"><small>+ @variantCount farver</small></p> 102 </div> 103 } 104 } 105 </div> 106 107 108 </div> 109 <code class="js-identity-product-data" hidden> 110 @{ 111 dynamic productImperssionClick = new 112 { 113 name = Model.Name, 114 id = Model.Id, 115 price = Model.Price.Value.ToJavaScript(), 116 brand = Model.BrandName, 117 category = Model.Category, 118 variant = Model.ColorVariantText 119 }; 120 @JsonService.Instance.ToJson(productImperssionClick) 121 } 122 </code> 123 </div> 124

Everyday wear

More than sportswear

Passion for shirts

Made to last

Tidløst Everyday Wear

Everyday Wear med et klassisk
og tidløst design forfinet
siden 1983

Sustainable wear

Skabt til at kunne bruges igen
og igen - holder pasform
og farve

Bæredygtig emballage

Din ordre sendes i bæredygtig
emballage, der er ansvarligt
produceret

Omtanke for miljøet

Alt hvad vi gør er med omtanke
og ansvar for mennesker
og miljø

keyboard_arrow_up