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

Quality Wear

More than sportswear

Made for business

Made to last

Odzież firmowa classic

Odzież profilowa &
firmowa z ponadczasowym
designem od 1983

Wzmocnij wspólnotę

Odzież z logo, która
buduje wspólną
tożsamość

Znajdź swój kolor

Wybierz spośród 60+
kolorów – dopasuj
do profilu Twojej firmy

Jakość, która trwa

Odzież firmowa w wysokiej
jakoś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