close

Piké tröjor

0 Produkter

Error executing template "Designs/identity_v2/ecom/productlist/partials/item.cshtml"
System.ArgumentException: An item with the same key has already been added.
   at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at Co3.ID.Dw.Models.Frontend.Ecommerce.IdentityProduct.get_ListItemHoverImage()
   at CompiledRazorTemplates.Dynamic.RazorEngine_097c4ad723274e17883661d353efd390.Execute() in D:\dynamicweb.net\Solutions\staging-id.espresso4.dk-e5\Files\Templates\Designs\identity_v2\ecom\productlist\partials\item.cshtml:line 29
   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.Dw.Helpers 9 @using Co3.ID.Dw.Models.Frontend.Ecommerce 10 @using Co3.ID.Dw.Models.Frontend.Users 11 @using Dynamicweb.Rendering 12 @using Co3.ID.Dw.Services 13 @using Dynamicweb.Frontend 14 @using Dynamicweb.Security.UserManagement 15 @using RenderingService = Co3.Espresso.Website.Services.RenderingService 16 17 @{ 18 string productName = Model.Name; 19 string productNumber = Model.Number; 20 21 User currentUser = PageView.Current().User; 22 ShopType shopContext = SiteContext.CurrentSiteContext(); 23 bool isCustomerShop = (PageView.Current().Area.Item["IsCustomerShop"] != null && (bool)PageView.Current().Area.Item["IsCustomerShop"] == true); 24 string discountGroup = currentUser != null ? currentUser.GetCustomFieldValue< string >( "DiscountGroup" ) : string.Empty; 25 bool showPrices = !isCustomerShop || UserContext.Current.CustomerShop != null && UserContext.Current.CustomerShop.Settings.ShowPrices == true; 26 27 string hoverImage = string.Empty; 28 29 if (!isCustomerShop && Model.ListItemHoverImage != null) 30 { 31 hoverImage = Model.ListItemHoverImage.Medium; 32 } 33 34 bool showBrands = Model.BrandCode == "SS" || Model.BrandCode == "GEYSER" || Model.BrandCode == "PRO WEAR"; 35 } 36 37 <div class="e-block-link e-productlist-item js-e-block-link js-e-productlist-item js-e-productlist-item- p-1 @(Model.IsAlternativeProduct ? "ml-4" : string.Empty)" data-product-id="@Model.Id" data-variant-id="@Model.VariantId" data-brand-code="@Model.BrandCode"> 38 39 @if (Model.IsAlternativeProduct) 40 { 41 <h4 class="is-alternative-product-header"> 42 @Translate("eCom Product - AlternativeProduct - Header", "Se også denne") 43 </h4> 44 } 45 @if (Model.IsDiscontinuedProduct) 46 { 47 <div class="discontinued-overlay"> 48 <h4 class="m-0"> 49 @Translate("eCom Product - Discontinued - Overlay - Text", "Produktet er udgået") 50 51 </h4> 52 </div> 53 } 54 55 @if (showBrands) 56 { 57 <div class="productlist-brand-wrapper"> 58 @if ( Model.BrandCode == "SS" ) 59 { 60 @ImageService.Instance.GetSvgMarkup( "/Files/Images/products/Labels/SevenSeasByID.svg" ) 61 } 62 @if ( Model.BrandCode == "GEYSER" ) 63 { 64 @ImageService.Instance.GetSvgMarkup( "/Files/Images/products/Labels/GEYSER.svg" ) 65 } 66 @if ( Model.BrandCode == "PRO WEAR" ) 67 { 68 @ImageService.Instance.GetSvgMarkup( "/Files/Images/products/Labels/ProWearByID.svg" ) 69 } 70 </div> 71 } 72 73 74 <div class="productlist-label-container"> 75 @if ( Model.ProductLabels != null ) 76 { 77 foreach ( IdentityProductLabel label in Model.ProductLabels ) 78 { 79 <span class="productlist-label label-@label.ClassName ">@label.Text</span> 80 } 81 } 82 83 </div> 84 85 <div class="e-productlist-item-container"> 86 <div class="e-productlist-item-image-container"> 87 <a class="e-productlist-item-image-wrapper" href="@Model.Link"> 88 <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"> 89 </a> 90 91 @if (Model.VariantPrimaryImages != null && Model.VariantPrimaryImages.Any() ) 92 { 93 <div class="identity-variant-listitem-select-option-container d-none d-md-block"> 94 <div class="d-flex identity-variant-listitem-select-option-wrapper"> 95 96 @{ 97 int variantCount = Model.VariantPrimaryImages.Count; 98 int variantCountTake = variantCount <= 5 ? 5 : 4; 99 } 100 @foreach ( IdentityProductVariants variantImage in Model.VariantPrimaryImages.Take( variantCountTake ) ) 101 { 102 if (!string.IsNullOrEmpty(variantImage.Link) && variantImage.Image != null) 103 { 104 <span class="select-option-color-wrapper js-select-option-color-wrapper"> 105 <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> 106 </span> 107 } 108 109 } 110 @if ( Model.VariantPrimaryImages.Count > 5 ) 111 { 112 string moreVariantText = string.Format( "+{0}", Model.VariantPrimaryImages.Count - 4 ); 113 <span class="select-option-color-wrapper bg-light variant-option-extra-count"> 114 <span class="identity-variant-listitem-select-option-color">@moreVariantText</span> 115 </span> 116 } 117 </div> 118 </div> 119 120 } 121 122 </div> 123 <div class="e-productlist-item-text-container small"> @* CSS ADD text-truncate *@ 124 <p class="e-productlist-item-name mb-0 list-style-d-none"> 125 <a href="@Model.Link" class="text-ellipsis"> 126 @Translate("eCom Product - Product Number - List - Text", "No.") @Model.Number 127 @productName 128 </a> 129 </p> 130 <p class="e-productlist-item-name mb-1 grid-style-d-none d-none"> 131 <a href="@Model.Link"> 132 <span class="d-block font-weight-bold">@Translate("eCom Product - Product Number - List - Text", "No.") @Model.Number</span> 133 @productName 134 </a> 135 </p> 136 137 <div class="e-productlist-item-text mb-0"> 138 @if (shopContext == ShopType.B2B && string.IsNullOrEmpty(discountGroup) == false && Model.ListPrices != null && Model.ListPrices.Any()) 139 { 140 <p class="e-product-price mb-0 mt-0"> 141 142 @if (SiteContext.ShowPrices()) 143 { 144 <span class="d-block font-weight-bold"> 145 @Translate("Product Netto Price - Text", "Nettopris") 146 <span class="js-e-product-price"> 147 @Model.Price.Formatted 148 </span> 149 </span> 150 } 151 152 153 <span class="d-block text-muted id-product-details-list-price"> 154 @Translate("Product List Price - Text", "Listepris") 155 <span class="js-e-product-listprice"> 156 @Co3.Espresso.Website.Services.PriceService.Instance.GetPrice(new PriceSettings() 157 { 158 Value = Model.ListPrices.FirstOrDefault()?.Amount 159 }) 160 </span> 161 </span> 162 </p> 163 } 164 @if (shopContext == ShopType.B2C || shopContext == ShopType.CustomerShop) 165 { 166 <p class="e-product-price mb-1 mt-0 @(SiteContext.ShowPrices() == false ? "hidden-price" : string.Empty)"> 167 <span class="e-productlist-item-price"> 168 <a href="@Model.Link"> 169 @Model.Price.Formatted 170 </a> 171 </span> 172 <small>(@(Model.PriceWithoutVat.Value > 0 && Model.PriceWithoutVat.Value.Equals(Model.Price.Value) == false ? Model.PriceWithoutVat.Formatted : string.Empty) @Translate("Ecom - Price without VAT - text", "ekskl. moms") )</small> 173 </p> 174 } 175 176 </div> 177 @if ( Model.VariantPrimaryImages != null && Model.VariantPrimaryImages.Any() ) { 178 179 int variantCount = Model.VariantPrimaryImages.Count; 180 181 if ( Model.VariantPrimaryImages.Count > 1 ) { 182 <div class="d-block d-md-none"> 183 <p class="p-0 m-0 font-weight-semibold"><small>+ @variantCount @Translate("Product List Colors - Text", "farver")</small></p> 184 </div> 185 } 186 } 187 </div> 188 @if (shopContext == ShopType.B2B || shopContext == ShopType.CustomerShop) 189 { 190 <form class="e-productlist-item-form-container d-flex justify-content-end"> 191 <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"> 192 <span class="identity-productlist-get-variant-matrix-modal-text"> 193 @ImageService.Instance.GetSvgMarkup("/Files/Images/icons/outline/41-shopping/shopping-cart-add-2.svg") 194 </span> 195 </a> 196 </form> 197 198 <div class="e-loading-overlay e-productlist-loading-overlay js-e-matrix-loading-overlay"> 199 @RenderingService.Instance.PartialView( "_partials/loading-spinner.cshtml" ) 200 </div> 201 } 202 </div> 203 <code class="js-identity-product-data" hidden> 204 @{ 205 dynamic productImperssionClick = new 206 { 207 item_name = Model.Name, 208 item_id = Model.Id, 209 price = Model.Price.Value.ToJavaScript(), 210 item_brand = Model.BrandName, 211 item_category = Model.Category, 212 item_variant = Model.ColorVariantText 213 }; 214 @Co3.Espresso.Website.Services.JsonService.Instance.ToJson(productImperssionClick) 215 } 216 </code> 217 </div> 218

Ska vi hjälpa med logotypsättning?

Profilkläderna gör betydligt större intryck med företagets logo. Vi hjälper till att applicera den.

Läs mer

Corporate Wear

More than sportswear

Passion for shirts

Made to last

Hitta er färg

Välj mellan mer än 60
olika färger – det finns en
färg för er också

Tidlöst Corporate Wear

Corporate Wear med en klassisk
och tidlös design som har förfinats
sedan 1983

Gemensam identitet

Kläder som betonar en
gemensam identitet
och stärker

Inga kompromisser

Skapad för att kunna användas om
och om igen – behåller passformen
och färgen

keyboard_arrow_up