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 Co3.ID.Dw.Models.Frontend.Ecommerce.IdentityProduct.get_VariantCombinations() in C:\Data\Development\git\id-dev\Co3.ID.Dynamicweb\Models\Frontend\Ecommerce\IdentityProduct.cs:line 1373
   at CompiledRazorTemplates.Dynamic.RazorEngine_d6e1c5c81c3740e6acb1f9d18c1322cd.Execute() in D:\dynamicweb.net\Solutions\id.espresso4.dk-e5\Application\Files\Templates\Designs\identity_v2\eCom\Product\espresso.cshtml:line 217
   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 } 45 @RenderingService.Instance.SectionEnd() 46 47 <div class="e-product js-e-product" data-has-variants="@espressoProduct.HasVariants.ToString().ToLower()" data-product-id="@espressoProduct.Id" data-variant-id="@espressoProduct.VariantId"> 48 49 @RenderingService.Instance.SectionStart(new SectionSettings 50 { 51 Classes = new ClassList("e-section pb-0") 52 }) 53 <div class="col-12"> 54 <div class="row"> 55 <div class="col-12 col-sm-5"> 56 <div class="e-product-text-container"> 57 <div class="identity-corner-brackets-container identity-corner-brackets-left border-primary @(!isCustomerShop ? "py-1 px-2" : string.Empty ) my-2 bracket-productname"> 58 <div class="identity-corner-brackets-wrapper border-primary"> 59 <h1 class="e-product-name font-weight-bold h2 mb-0 "> 60 @espressoProduct.Name 61 </h1> 62 <p class="lead font-weight-normal mb-0"> 63 @Translate("eCom Product - Product Number - Text", "Number") @espressoProduct.Number 64 </p> 65 </div> 66 </div> 67 @RenderingService.Instance.PartialView("ecom/product/partials/prices.cshtml", espressoProduct) 68 <div class="e-product-text mb-2 d-none d-sm-block"> 69 @{ 70 bool doTruncate = espressoProduct.DescriptionLong.Length > 180; 71 } 72 @RenderingService.Instance.SectionStart(new SectionSettings 73 { 74 Classes = new ClassList("identity-product-text js-identity-product-text p-0 m-0 position-relative"), 75 ContainerClasses = new ClassList("p-0 m-0"), 76 ContentClasses = new ClassList("col-12"), 77 Collapsible = doTruncate, 78 CollapseToggleTextCollapse = "&nbsp;", 79 CollapseToggleTextExpand = "&nbsp;" 80 }) 81 <div class="col-12"> 82 @{ 83 string description = espressoProduct.DescriptionLong; 84 85 if (doTruncate) 86 { 87 string truncatedDescription = espressoProduct.DescriptionLong.Substring(0, 180); 88 89 description = string.Format("{0}...<span class='identity-inline-collapse-link'>{1}</span>", truncatedDescription, Translate("Product description - show more", "Vis mere")); 90 } 91 92 <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)"> 93 @description 94 </div> 95 } 96 </div> 97 @RenderingService.Instance.SectionEnd() 98 </div> 99 @RenderingService.Instance.PartialView("ecom/product/partials/add-to-cart.cshtml", espressoProduct) 100 @if ( shopContext == ShopType.B2B ) 101 { 102 <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"> 103 @Translate("eCom Product - Open Matrix - Button", "Vælg størrelser") 104 </a> 105 } else if (shopContext == ShopType.CustomerShop) 106 { 107 <a class="btn btn-primary position-relative mb-2 js-toggle-matrix-modal-btn js-toggle-matrix-modal-btn-customershop" href="#"> 108 @Translate("eCom Product - Open Matrix - Button", "Vælg størrelser") 109 </a> 110 } 111 <div class="row d-block d-sm-none"> 112 <div class="e-product-text mt-3 mb-4"> 113 <div class="col-12"> 114 @espressoProduct.DescriptionLong 115 </div> 116 </div> 117 </div> 118 @if (shopContext == ShopType.B2B && isCustomerShop == false) 119 { 120 <div class="e-product-downloads"> 121 @RenderingService.Instance.PartialView("ecom/product/partials/part-downloads.cshtml", espressoProduct) 122 </div> 123 } 124 @if ((shopContext != ShopType.B2B && shopContext != ShopType.CustomerShop) && PageView.Current().IsBasketEnabled()) 125 { 126 <div class="e-product-delivery font-weight-bold mb-2 text-heading"> 127 @RenderingService.Instance.PartialView("ecom/product/partials/delivery-info.cshtml", espressoProduct) 128 </div> 129 } 130 131 </div> 132 </div> 133 <div class="col-12 col-sm-7 order-first"> 134 <div class="e-product-image-container js-e-product-images"> 135 @RenderingService.Instance.PartialView("ecom/product/partials/images_optimized.cshtml", espressoProduct) 136 </div> 137 <div class="js-e-product-modal-images"></div> 138 </div> 139 140 </div> 141 </div> 142 @RenderingService.Instance.SectionEnd() 143 144 @{ 145 int uspPageContentPageId; 146 int.TryParse(PageView.Current().CurrentParagraph.Item["USPPageId"]?.ToString(), out uspPageContentPageId); 147 } 148 @if (uspPageContentPageId > 0 && shopContext == ShopType.B2B) 149 { 150 @RenderingService.Instance.SectionStart(new SectionSettings 151 { 152 Classes = new ClassList("e-section p-section mx-auto py-0"), 153 ContentClasses = new ClassList("col-12 col-lg-8 col-xl-7 mx-auto") 154 }) 155 <div class="row"> 156 @RenderPageContent(uspPageContentPageId) 157 </div> 158 @RenderingService.Instance.SectionEnd() 159 160 } 161 @RenderingService.Instance.SectionStart(new SectionSettings 162 { 163 Classes = new ClassList("e-section p-section mx-auto py-0"), 164 ContentClasses = new ClassList("col-12 mx-auto"), 165 InnerRowClasses = new ClassList("row js-identity-specifications-container identity-specifications-container"), 166 167 168 }) 169 170 171 @RenderingService.Instance.SectionEnd() 172 @{ 173 int detailsPageContetPageId; 174 175 int.TryParse(PageView.Current().Area.Item["ProductDetailsPage"]?.ToString(), out detailsPageContetPageId); 176 } 177 178 <div class="js-render-page-content" data-page-id="@detailsPageContetPageId"> 179 <div class="identity-variant-loader js-identity-variant-loader position-relative pb-1 pt-6"> 180 @RenderingService.Instance.PartialView( "_partials/loading-spinner.cshtml" ) 181 </div> 182 </div> 183 184 185 @if (relewiseShowRecommendations == "True" && string.IsNullOrEmpty(relewiseRecommendationsSettings) == false) 186 { 187 @RenderingService.Instance.SectionStart(new SectionSettings 188 { 189 Classes = new ClassList("e-section py-1"), 190 ContentClasses = new ClassList("col-12 mx-auto"), 191 InnerRowClasses = new ClassList("row js-identity-recommendations-container"), 192 }) 193 194 @RenderingService.Instance.SectionEnd() 195 } 196 197 198 199 @if (shopContext == ShopType.B2B) 200 { 201 @RenderingService.Instance.PartialView("eCom/Product/partials/part-product-matrix.cshtml", espressoProduct) 202 } else if (shopContext == ShopType.CustomerShop) 203 { 204 <div class="js-identity-customershop-matrix-modal-placeholder" data-product-id="@espressoProduct.Id" data-variant-id="@espressoProduct.VariantId" data-brand-code="@espressoProduct.BrandCode"></div> 205 } 206 207 @RenderingService.Instance.PartialView("ecom/product/partials/identity-part-sizeguide-modal.cshtml", espressoProduct) 208 @RenderingService.Instance.PartialView("ecom/product/partials/identity-part-deliveryinfo-modal.cshtml", espressoProduct) 209 210 @RenderingService.Instance.PartialView("ecom/product/partials/metadata.cshtml", espressoProduct) 211 @RenderingService.Instance.PartialView("ecom/product/partials/gtm-tracking.cshtml", espressoProduct) 212 213 <code class="js-e-breadcrumb-item-append" data-link="@HttpUtility.HtmlAttributeEncode(espressoProduct.Link)" data-text="@HttpUtility.HtmlAttributeEncode(espressoProduct.Name)"></code> 214 215 <script> 216 e4.data.set( '@(espressoProduct.Id)_VariantCombinationTree', JSON.parse('@HttpUtility.JavaScriptStringEncode(JsonService.Instance.ToJson(espressoProduct.VariantCombinationTree))') ); 217 e4.data.set( '@(espressoProduct.Id)_VariantCombinationIds', JSON.parse('@HttpUtility.JavaScriptStringEncode(JsonService.Instance.ToJson(espressoProduct.VariantCombinations.Keys))') ); 218 e4.data.set( '@(espressoProduct.Id)_PdfData', JSON.parse('@HttpUtility.JavaScriptStringEncode(RenderingService.Instance.PartialView("ecom/product/partials/part-pdf-data.cshtml", espressoProduct))') ); 219 </script> 220 221 </div> 222 @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

Bez kompromisów

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