Style No. 08-3734-LN

Style 08-3734-LN  55,20

 149,00


Error executing template "Designs/lilly/ecom/product/partials/add-to-cart.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() in C:\git\Espresso\Co3.Espresso.Website\Models\FrontEnd\Ecommerce\EspressoProduct.cs:line 387at CompiledRazorTemplates.Dynamic.RazorEngine_7f126b07f33b4f2abb7f7d365c7195e9.Execute() in E:\dynamicweb.net\SolutionsCustom\lilly.espresso4.dk\files\Templates\Designs\lilly\ecom\product\partials\add-to-cart.cshtml:line 12at 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.b__0(TextWriter writer)at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)at Dynamicweb.Rendering.Template.RenderRazorTemplate()
1 @inherits ViewModelTemplate< Co3.Lilly.Website.Models.Frontend.Ecommerce.LillyProduct >@using Co3.Espresso.Base.Extensions@using Co3.Espresso.Website.Models.FrontEnd.Ecommerce@using Co3.Lilly.Website.Services@using Dynamicweb.Ecommerce.Common@using Dynamicweb.Rendering@using Dynamicweb.Security.UserManagement@{bool isUserAuthenticated = User.IsExtranetUserLoggedIn();double variantStockQuantity = 0;bool hasStock = Model.VariantCombinations.Any(vc => vc.Value.Stock.Quantity > 0);}<form action="/system/data/cart" class="e-product-form js-e-product-form js-e-product-form-addtocart py-1 mb-2 js-lilly-stock-in-cart" method="post" data-parent-stock="@Model.Stock.Quantity"><input name="CartCmd" type="hidden" value="Add"><input name="ProductID" type="hidden" value="@Model.Id">@* <input name="VariantID" type="hidden" value="@Model.VariantId"> *@@*<input class="js-input-stock-change js-lilly-cart-quantity" name="Quantity" type="hidden" value="1" max="@Model.Stock.Quantity">*@<input name="Redirect" type="hidden" value=""><input name="Name" type="hidden" value="@Model.Name"><input name="Number" type="hidden" value="@Model.Number"><input name="Price" type="hidden" value="@Model.Price.Value.ToJavaScript()"><input name="CurrencyCode" type="hidden" value="@Model.Price.CurrencyCode">@if ( LillyProductService.Instance.IsB2B == true ){<input name="OrderContext" type="hidden" value="B2B">}@if ( isUserAuthenticated && Model.IsPreorder == true ){@*<input class="js-product-ispreorder-orderlinefield" type="hidden" name="EcomOrderLineFieldInput_IsPreorder" value="">*@}@if ( Model.VariantGroups.Any() ){<h4 class="small">@Translate( "eCom Product - Choose size - Label", "Vælg størrelse" )</h4><div class="float-left pl-0">@foreach ( KeyValuePair<string, EspressoVariantGroup> variantGroup in Model.VariantGroups ){string variantInputFieldId = string.Format( "{0}_{1}", Model.Id, variantGroup.Value.Id );if ( hasStock == false && Model.IsPreorder == false ){} else {<div class="form-group mb-0">@* <label for="@variantInputFieldId" class="font-weight-bold form-control-label h4">@variantGroup.Value.Name</label> *@<select class="form-control js-e-product-form-variant-group-input required selectpicker" data-variant-group-id="@variantGroup.Value.Id" name="VariantID" id="@variantInputFieldId">@* <option disabled value=""></option> *@@foreach ( KeyValuePair<string, string> variantOption in variantGroup.Value.Options.OrderBy( o => o.Value ) ){variantStockQuantity = Model.VariantCombinations[variantOption.Key].Stock.Quantity;bool isSelected = variantOption.Key == variantGroup.Value.SelectedOptionId;if ( Model.VariantCombinations.ContainsKey( variantOption.Key ) ){if ( LillyProductService.Instance.IsB2B ){if ( Model.IsPreorder == true ){<option value="@variantOption.Key" @( isSelected ? "selected" : string.Empty )>@variantOption.Value</option>}else{if ( Model.VariantCombinations[variantOption.Key].Stock.Quantity > 0 ){<option value="@variantOption.Key" @( isSelected ? "selected" : string.Empty )>@variantOption.Value</option>}}}else{if ( Model.VariantCombinations[variantOption.Key].Stock.Quantity > 0 ){<option value="@variantOption.Key" @( isSelected ? "selected" : string.Empty )>@variantOption.Value</option>}}}}</select></div>}}</div>}<div class="d-flex ml-1">@if ( Model.VariantId.Any() == false && Model.IsPreorder != true && Model.Stock.Quantity < 1 ){<p>@Translate( "Not on stock", "Not on stock" )</p>} else if ( Model.VariantId.Any() == true && Model.IsPreorder == false && hasStock == false ){<p>@Translate( "Not on stock", "Not on stock" )</p>}else{<input min="1" data-stock="" data-stockMinusWhatsInCart="" style="max-width: 4em;border-radius: 0;" name="Quantity" type="number" value="1" autocomplete="off" class="js-lilly-cart-quantity form-control" data-toggle="popover" data-content="@Translate( "eCom Product - Over in stock quantity - Text", "Varen findes ikke i denne mængde - derfor har vi justeret til den maksimale beholdning." )"><button class="btn btn-success" type="submit">@Translate( "eCom Product - Add To Cart - Button", "Add to cart" )</button>}</div></form>
keyboard_arrow_down
keyboard_arrow_up