Error executing template "Designs/identity_v2/eCom/Product/espresso.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.Espresso.Website.Models.FrontEnd.Ecommerce.EspressoProduct.get_VariantCombinations()
   at CompiledRazorTemplates.Dynamic.RazorEngine_08f52eb49c6840fcb6ffd38ae20d7c58.Execute() in D:\dynamicweb.net\Solutions\id.espresso4.dk-e5\Files\Templates\Designs\identity_v2\eCom\Product\espresso.cshtml:line 244
   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.Web 3 @using Co3.Espresso.Base.Extensions 4 @using Co3.Espresso.Website.Models 5 @using Co3.Espresso.Website.Services 6 @using Co3.Espresso.Website.Models.FrontEnd 7 @using Co3.Espresso.Website.Models.FrontEnd.Settings 8 @using Co3.Espresso.Website.Models.FrontEnd.Ecommerce 9 @using Co3.Espresso.Website.Models.FrontEnd.Elements 10 @using Co3.Espresso.Website.Models.FrontEnd.Handlebars 11 @using Co3.ID.Dw.Helpers 12 @using Co3.ID.Dw.Models.Frontend.Ecommerce 13 @using Co3.ID.Dw.Models.Frontend.Users 14 @using Co3.ID.Dw.Services 15 @using Dynamicweb.Content.Items 16 @using Dynamicweb.Ecommerce.Products 17 @using Dynamicweb.Ecommerce.Products.Categories 18 @using Dynamicweb.Frontend 19 @using Dynamicweb.Security.UserManagement 20 @using Newtonsoft.Json 21 @using ProductService = Co3.Espresso.Website.Services.ProductService 22 @using RenderingService = Co3.Espresso.Website.Services.RenderingService 23 24 @{ 25 ShopType shopContext = SiteContext.CurrentSiteContext(); 26 User currentUser = PageView.Current().User; 27 bool isCustomerShop = (PageView.Current().Area.Item["IsCustomerShop"] != null && (bool)PageView.Current().Area.Item["IsCustomerShop"] == true); 28 29 IdentityProduct espressoProduct = (IdentityProduct) ProductService.Instance.GetEspressoProduct( 30 new ProductSettings() 31 { 32 Id = GetString("Ecom:Product.ID"), 33 VariantId = GetString("Ecom:Product.VariantID"), 34 PrimaryVariantId = GetString("Ecom:Product.DefaultVariantComboID") 35 } 36 ); 37 38 HttpContext.Current.Items["IdentityProduct"] = espressoProduct; 39 string relewiseRecommendationsSettings = PageView.Current().Area.Item["RelewiseProductDetailsRecommendations"]?.ToString(); 40 string relewiseShowRecommendations = PageView.Current().Area.Item["ShowRecommendations"]?.ToString(); 41 42 ScriptService.Instance.AddScript("identity.pdf"); 43 ScriptService.Instance.AddScript("identity.ui.popover"); 44 ScriptService.Instance.AddScript("identity.swiper"); 45 } 46 @RenderingService.Instance.SectionEnd() 47 48 <div class="e-product js-e-product" data-has-variants="@espressoProduct.HasVariants.ToString().ToLower()" data-product-id="@espressoProduct.Id" data-variant-id="@espressoProduct.VariantId"> 49 50 @RenderingService.Instance.SectionStart(new SectionSettings 51 { 52 Classes = new ClassList("e-section pb-0 px-0"), 53 ContainerClasses = new ClassList("container-fluid overflow-hidden p-0"), 54 OuterRowClasses = new ClassList("row"), 55 InnerRowClasses = new ClassList("row"), 56 }) 57 <div class="col-12"> 58 <div class="row"> 59 <div class="col-12 col-sm-4 px-sm-3"> 60 <div class="e-product-text-container"> 61 @if (!isCustomerShop) 62 { 63 <div class="d-block d-sm-none text-center no-gutters"> 64 @RenderingService.Instance.PartialView("ecom/product/partials/identity-part-genders.cshtml", espressoProduct) 65 </div> 66 } 67 <div class="identity-corner-brackets-container identity-corner-brackets-left border-primary @(!isCustomerShop ? "py-1 px-2" : string.Empty ) my-2 bracket-productname"> 68 <div class="identity-corner-brackets-wrapper border-primary"> 69 <h1 class="e-product-name font-weight-bold h2 mb-0 "> 70 @espressoProduct.Name 71 </h1> 72 <p class="lead font-weight-normal mb-0"> 73 @Translate("eCom Product - Product Number - Text", "Number") @espressoProduct.Number 74 </p> 75 </div> 76 </div> 77 @if (!isCustomerShop) 78 { 79 <div class="d-none d-sm-block no-gutters"> 80 @RenderingService.Instance.PartialView("ecom/product/partials/identity-part-genders.cshtml", espressoProduct) 81 </div> 82 } 83 @RenderingService.Instance.PartialView("ecom/product/partials/prices.cshtml", espressoProduct) 84 <div class="e-product-text mb-2 d-none d-sm-block"> 85 @{ 86 bool doTruncate = espressoProduct.DescriptionLong.Length > 180; 87 } 88 @RenderingService.Instance.SectionStart(new SectionSettings 89 { 90 Classes = new ClassList("identity-product-text js-identity-product-text p-0 m-0 position-relative"), 91 ContainerClasses = new ClassList("p-0 m-0"), 92 ContentClasses = new ClassList("col-12"), 93 Collapsible = doTruncate, 94 CollapseToggleTextCollapse = "&nbsp;", 95 CollapseToggleTextExpand = "&nbsp;" 96 }) 97 <div class="col-12"> 98 @{ 99 string description = espressoProduct.DescriptionLong; 100 101 if (doTruncate) 102 { 103 string truncatedDescription = espressoProduct.DescriptionLong.Substring(0, 180); 104 105 description = string.Format("{0}...<span class='identity-inline-collapse-link'>{1}</span>", truncatedDescription, Translate("Product description - show more", "Vis mere")); 106 } 107 108 <div class="@(doTruncate ? "js-identity-product-description-truncated" : string.Empty)" data-full-text="@(doTruncate ? HttpUtility.HtmlAttributeEncode(espressoProduct.DescriptionLong) : string.Empty)" data-partial-text="@(doTruncate ? description : string.Empty)"> 109 @description 110 </div> 111 } 112 </div> 113 @RenderingService.Instance.SectionEnd() 114 </div> 115 @RenderingService.Instance.PartialView("ecom/product/partials/add-to-cart.cshtml", espressoProduct) 116 @if ( shopContext == ShopType.B2B ) 117 { 118 <a class="btn btn-primary position-relative mb-2 js-toggle-matrix-modal-btn" href="" data-toggle="modal" data-target=".js-e-product-matrix-modal"> 119 @Translate("eCom Product - Open Matrix - Button", "Vælg størrelser") 120 </a> 121 } else if (shopContext == ShopType.CustomerShop) 122 { 123 <a class="btn btn-primary position-relative mb-2 js-toggle-matrix-modal-btn js-toggle-matrix-modal-btn-customershop" href="#"> 124 @Translate("eCom Product - Open Matrix - Button", "Vælg størrelser") 125 </a> 126 } 127 <div class="row d-block d-sm-none"> 128 <div class="e-product-text mt-3 mb-4"> 129 <div class="col-12"> 130 @espressoProduct.DescriptionLong 131 </div> 132 </div> 133 </div> 134 @if (shopContext == ShopType.B2B && isCustomerShop == false) 135 { 136 <div class="e-product-downloads"> 137 @RenderingService.Instance.PartialView("ecom/product/partials/part-downloads.cshtml", espressoProduct) 138 </div> 139 } 140 @if ((shopContext != ShopType.B2B && shopContext != ShopType.CustomerShop) && PageView.Current().IsBasketEnabled()) 141 { 142 <div class="e-product-delivery font-weight-bold mb-2 text-heading"> 143 @RenderingService.Instance.PartialView("ecom/product/partials/delivery-info.cshtml", espressoProduct) 144 </div> 145 } 146 147 </div> 148 </div> 149 <div class="col-12 col-sm-1"></div> 150 <div class="col-12 col-sm-7 order-first"> 151 <div class="e-product-image-container js-e-product-images"> 152 @RenderingService.Instance.PartialView("ecom/product/partials/images_swiper.cshtml", espressoProduct) 153 </div> 154 </div> 155 156 </div> 157 </div> 158 @RenderingService.Instance.SectionEnd() 159 160 @{ 161 int uspPageContentPageId; 162 int.TryParse(PageView.Current().CurrentParagraph.Item["USPPageId"]?.ToString(), out uspPageContentPageId); 163 } 164 @if (uspPageContentPageId > 0 && shopContext == ShopType.B2B) 165 { 166 @RenderingService.Instance.SectionStart(new SectionSettings 167 { 168 Classes = new ClassList("e-section p-section mx-auto py-0"), 169 ContentClasses = new ClassList("col-12 col-lg-8 col-xl-7 mx-auto") 170 }) 171 <div class="row"> 172 @RenderPageContent(uspPageContentPageId) 173 </div> 174 @RenderingService.Instance.SectionEnd() 175 176 } 177 @RenderingService.Instance.SectionStart(new SectionSettings 178 { 179 Classes = new ClassList("e-section p-section mx-auto py-0"), 180 ContentClasses = new ClassList("col-12 mx-auto"), 181 InnerRowClasses = new ClassList("row js-identity-specifications-container identity-specifications-container"), 182 183 184 }) 185 186 187 188 @RenderingService.Instance.SectionEnd() 189 @{ 190 int detailsPageContetPageId; 191 192 int.TryParse(PageView.Current().Area.Item["ProductDetailsPage"]?.ToString(), out detailsPageContetPageId); 193 } 194 195 196 @if (detailsPageContetPageId > 0) 197 { 198 @RenderingService.Instance.SectionStart(new SectionSettings 199 { 200 Classes = new ClassList("e-section p-section mx-auto py-0"), 201 ContentClasses = new ClassList("col-12 col-lg-8 col-xl-7 mx-auto") 202 }) 203 <div class="row"> 204 @RenderPageContent(detailsPageContetPageId) 205 </div> 206 @RenderingService.Instance.SectionEnd() 207 } 208 209 210 211 212 @if (relewiseShowRecommendations == "True" && string.IsNullOrEmpty(relewiseRecommendationsSettings) == false) 213 { 214 @RenderingService.Instance.SectionStart(new SectionSettings 215 { 216 Classes = new ClassList("e-section py-1"), 217 ContentClasses = new ClassList("col-12 mx-auto"), 218 InnerRowClasses = new ClassList("row js-identity-recommendations-container"), 219 }) 220 221 @RenderingService.Instance.SectionEnd() 222 } 223 224 225 226 @if (shopContext == ShopType.B2B) 227 { 228 @RenderingService.Instance.PartialView("eCom/Product/partials/part-product-matrix.cshtml", espressoProduct) 229 } else if (shopContext == ShopType.CustomerShop) 230 { 231 <div class="js-identity-customershop-matrix-modal-placeholder" data-product-id="@espressoProduct.Id" data-variant-id="@espressoProduct.VariantId" data-brand-code="@espressoProduct.BrandCode"></div> 232 } 233 234 @RenderingService.Instance.PartialView("ecom/product/partials/identity-part-sizeguide-modal.cshtml", espressoProduct) 235 @RenderingService.Instance.PartialView("ecom/product/partials/identity-part-deliveryinfo-modal.cshtml", espressoProduct) 236 237 @RenderingService.Instance.PartialView("ecom/product/partials/metadata.cshtml", espressoProduct) 238 @RenderingService.Instance.PartialView("ecom/product/partials/gtm-tracking.cshtml", espressoProduct) 239 240 <code class="js-e-breadcrumb-item-append" data-link="@HttpUtility.HtmlAttributeEncode(espressoProduct.Link)" data-text="@HttpUtility.HtmlAttributeEncode(espressoProduct.Name)"></code> 241 242 <script> 243 e4.data.set( '@(espressoProduct.Id)_VariantCombinationTree', JSON.parse('@HttpUtility.JavaScriptStringEncode(JsonService.Instance.ToJson(espressoProduct.VariantCombinationTree))') ); 244 e4.data.set( '@(espressoProduct.Id)_VariantCombinationIds', JSON.parse('@HttpUtility.JavaScriptStringEncode(JsonService.Instance.ToJson(espressoProduct.VariantCombinations.Keys))') ); 245 e4.data.set( '@(espressoProduct.Id)_PdfData', JSON.parse('@HttpUtility.JavaScriptStringEncode(RenderingService.Instance.PartialView("ecom/product/partials/part-pdf-data.cshtml", espressoProduct))') ); 246 </script> 247 248 </div> 249 @RenderingService.Instance.SectionStart(new SectionSettings())

Corporate wear

More than sportswear

Passion for shirts

Made to last

Corporate Wear

Odzież Corporate Wear o klasycznym,
ponadczasowym designie, który
udoskonalaliśmy od 1983 roku

Wspólna tożsamość

Ubrania podkreślające wspólną
tożsamość i wzmacniające
ducha wspólnoty

Znajdź swój kolor

Wybieraj spośród ponad 60
kolorów – na pewno znajdziesz
coś dla siebie

Jakość, która trwa

Odzież zaprojektowana z myślą
o wieloletniej trwałości – zachowuje
kształt i kolor

Oświadczenie o odpowiedzialności społecznej, por. art. 99a duńskiej ustawy o składaniu rocznych sprawozdań finansowych. BCI cotton Zobacz nasz raport dot. odpowiedzialności tutaj

keyboard_arrow_up