close

Hemden

0 Produkte

Error executing template "Designs/identity_v2/ecom/productlist/partials/item.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
   at CompiledRazorTemplates.Dynamic.RazorEngine_f123411a61a6446cb54d356da6b04165.Execute() in D:\dynamicweb.net\Solutions\staging-id.espresso4.dk-e5\Files\Templates\Designs\identity_v2\ecom\productlist\partials\item.cshtml:line 34
   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 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.Elements 5 @using Co3.Espresso.Website.Models.FrontEnd.Handlebars 6 @using Co3.Espresso.Website.Models.FrontEnd.Settings 7 @using Co3.Espresso.Website.Services 8 @using Co3.ID.Data.App 9 @using Co3.ID.Dw.Helpers 10 @using Co3.ID.Dw.Models.Frontend.Ecommerce 11 @using Co3.ID.Dw.Models.Frontend.Users 12 @using Dynamicweb.Rendering 13 @using Co3.ID.Dw.Services 14 @using Dynamicweb.Frontend 15 @using Dynamicweb.Security.UserManagement 16 @using RenderingService = Co3.Espresso.Website.Services.RenderingService 17 18 @{ 19 string productName = Model.Name; 20 string productNumber = Model.Number; 21 22 User currentUser = PageView.Current().User; 23 ShopType shopContext = SiteContext.CurrentSiteContext(); 24 bool isCustomerShop = (PageView.Current().Area.Item["IsCustomerShop"] != null && (bool)PageView.Current().Area.Item["IsCustomerShop"] == true); 25 string discountGroup = currentUser != null ? currentUser.GetCustomFieldValue< string >( "DiscountGroup" ) : string.Empty; 26 bool showPrices = !isCustomerShop || UserContext.Current.CustomerShop != null && UserContext.Current.CustomerShop.Settings.ShowPrices == true; 27 28 bool isProductDiscontinued = Model.IsDiscontinuedProduct; 29 30 string hoverImage = string.Empty; 31 32 if (!isCustomerShop && Model.ListItemHoverImage != null) 33 { 34 hoverImage = Model.ListItemHoverImage.Medium; 35 } 36 37 bool showBrands = Model.BrandCode == "SS" || Model.BrandCode == "GEYSER" || Model.BrandCode == "PRO WEAR"; 38 } 39 40 <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" data-brand-code="@Model.BrandCode" style="@(isProductDiscontinued ? "pointer-events: none;" : string.Empty)"> 41 42 @if (Model.IsAlternativeProduct) 43 { 44 <h4 class="is-alternative-product-header"> 45 @Translate("eCom Product - AlternativeProduct - Header", "Se også denne") 46 </h4> 47 } 48 49 @if (isProductDiscontinued) 50 { 51 <div class="discontinued-overlay"> 52 <div class="discontinued-overlay-text"> 53 @Translate("eCom Product - Discontinued - Overlay - Text", "Produktet er udgået") 54 </div> 55 </div> 56 } 57 58 @if (showBrands) 59 { 60 <div class="productlist-brand-wrapper"> 61 @if ( Model.BrandCode == "SS" ) 62 { 63 @ImageService.Instance.GetSvgMarkup( "/Files/Images/products/Labels/SevenSeasByID.svg" ) 64 } 65 @if ( Model.BrandCode == "GEYSER" ) 66 { 67 @ImageService.Instance.GetSvgMarkup( "/Files/Images/products/Labels/GEYSER.svg" ) 68 } 69 @if ( Model.BrandCode == "PRO WEAR" ) 70 { 71 @ImageService.Instance.GetSvgMarkup( "/Files/Images/products/Labels/ProWearByID.svg" ) 72 } 73 </div> 74 } 75 76 77 <div class="productlist-label-container"> 78 @if ( Model.ProductLabels != null ) 79 { 80 foreach ( IdentityProductLabel label in Model.ProductLabels ) 81 { 82 <span class="productlist-label label-@label.ClassName ">@label.Text</span> 83 } 84 } 85 86 </div> 87 88 <div class="e-productlist-item-container"> 89 <div class="e-productlist-item-image-container"> 90 <a class="e-productlist-item-image-wrapper" href="@Model.Link"> 91 <img alt="@Model.Name" class="e-productlist-item-image js-e-productlist-item-image" src="@Model.ImagePrimary.Medium" data-base-image="@Model.ImagePrimary.Medium" data-hover-image="@hoverImage"> 92 </a> 93 94 @if (Model.VariantPrimaryImages != null && Model.VariantPrimaryImages.Any() ) 95 { 96 <div class="identity-variant-listitem-select-option-container d-none d-md-block"> 97 <div class="d-flex identity-variant-listitem-select-option-wrapper"> 98 99 @{ 100 int variantCount = Model.VariantPrimaryImages.Count; 101 int variantCountTake = variantCount <= 5 ? 5 : 4; 102 } 103 @foreach ( IdentityProductVariants variantImage in Model.VariantPrimaryImages.Take( variantCountTake ) ) 104 { 105 if (!string.IsNullOrEmpty(variantImage.Link) && variantImage.Image != null) 106 { 107 <span class="select-option-color-wrapper js-select-option-color-wrapper"> 108 <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> 109 </span> 110 } 111 112 } 113 @if ( Model.VariantPrimaryImages.Count > 5 ) 114 { 115 string moreVariantText = string.Format( "+{0}", Model.VariantPrimaryImages.Count - 4 ); 116 <span class="select-option-color-wrapper bg-light variant-option-extra-count"> 117 <span class="identity-variant-listitem-select-option-color">@moreVariantText</span> 118 </span> 119 } 120 </div> 121 </div> 122 123 } 124 125 </div> 126 <div class="e-productlist-item-text-container small"> @* CSS ADD text-truncate *@ 127 <p class="e-productlist-item-name mb-0 list-style-d-none"> 128 <a href="@Model.Link" class="text-ellipsis"> 129 @Translate("eCom Product - Product Number - List - Text", "No.") @Model.Number 130 @productName 131 </a> 132 </p> 133 <p class="e-productlist-item-name mb-1 grid-style-d-none d-none"> 134 <a href="@Model.Link"> 135 <span class="d-block font-weight-bold">@Translate("eCom Product - Product Number - List - Text", "No.") @Model.Number</span> 136 @productName 137 </a> 138 </p> 139 140 <div class="e-productlist-item-text mb-0"> 141 @RenderingService.Instance.PartialView("/eCom/ProductList/partials/list-price.cshtml", Model) 142 </div> 143 @if ( Model.VariantPrimaryImages != null && Model.VariantPrimaryImages.Any() ) { 144 145 int variantCount = Model.VariantPrimaryImages.Count; 146 147 if ( Model.VariantPrimaryImages.Count > 1 ) { 148 <div class="d-block d-md-none"> 149 <p class="p-0 m-0 font-weight-semibold"><small>+ @variantCount @Translate("Product List Colors - Text", "farver")</small></p> 150 </div> 151 } 152 } 153 </div> 154 @if (shopContext == ShopType.B2B || shopContext == ShopType.CustomerShop) 155 { 156 <form class="e-productlist-item-form-container d-flex justify-content-end"> 157 <a class="btn btn-primary text-white mt-0 position-relative js-identity-productlist-get-variant-matrix-modal identity-productlist-get-variant-matrix-modal-btn"> 158 <span class="identity-productlist-get-variant-matrix-modal-text"> 159 @ImageService.Instance.GetSvgMarkup("/Files/Images/icons/outline/41-shopping/shopping-cart-add-2.svg") 160 </span> 161 </a> 162 </form> 163 164 <div class="e-loading-overlay e-productlist-loading-overlay js-e-matrix-loading-overlay"> 165 @RenderingService.Instance.PartialView( "_partials/loading-spinner.cshtml" ) 166 </div> 167 } 168 </div> 169 <code class="js-identity-product-data" hidden> 170 @{ 171 dynamic productImperssionClick = new 172 { 173 item_name = Model.Name, 174 item_id = Model.Id, 175 price = Model.Price.Value.ToJavaScript(), 176 item_brand = Model.BrandName, 177 item_category = Model.Category, 178 item_variant = Model.ColorVariantText 179 }; 180 @Co3.Espresso.Website.Services.JsonService.Instance.ToJson(productImperssionClick) 181 } 182 </code> 183 </div> 184

Sollen wir beim Logodruck helfen?

Mit dem Firmenlogo verstärkt Corporate Wear ihre Wirkung deutlich. Wir helfen Ihnen bei der individuellen Gestaltung.

Lesen Sie mehr

Everyday wear

More than sportswear

Passion for shirts

Made to last

Zeitlose Corporate Wear

Corporate Wear mit einem klassischen
und zeitlosen Design, das seit
1983 weiter verfeinert wurde

Gemeinsame Identität

Kleidung, die eine gemeinsame
Identität unterstreicht und den
Gemeinschaftssinn stärkt

Finden Sie Ihre Farbe

Wählen Sie aus mehr als 60
Farbvarianten – es ist garantiert auch
eine Farbe für Sie dabei

Keine Kompromisse

Immer und immer wieder
verwendet zu werden – behält
die Passform und Farbe

keyboard_arrow_up