Filter:

Error executing template "Designs/Swift/Components/DataLayers/ViewItemList_Custom.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 System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
   at Custom.EvaSolo.Tracking.Extensions.ProductExtensions.ResolveTrackingNamesByIds(IEnumerable`1 idCombinations) in D:\a\1\s\Custom.EvaSolo.Tracking\Extensions\ProductExtensions.cs:line 23
   at CompiledRazorTemplates.Dynamic.RazorEngine_f26b5d692c78478484c1e99a6a982676.Execute() in D:\dynamicweb.net\Solutions\twodayco3\evasolo.cloud.dynamicweb-cms.com\Files\Templates\Designs\Swift\Components\DataLayers\ViewItemList_Custom.cshtml:line 12
   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 Dynamicweb.Rendering.ViewModelTemplate<Custom.EvaSolo.Tracking.Model.DataLayerViewModel> 2 @using Dynamicweb.Core.Encoders; 3 @using Dynamicweb.Ecommerce; 4 @using Dynamicweb.Ecommerce.ProductCatalog; 5 @using Custom.EvaSolo.Tracking.Extensions; 6 7 @* CUSTOM TEMPLATE SUPPORTET BY SWIFT (v1.25.0) *@ 8 @* NOTE: USED BY CUSTOM PROJECT *@ 9 10 @if (Model.Products is object) 11 { 12 var trackingNames = ProductExtensions.ResolveTrackingNames(Model.Products); 13 14 <script> 15 gtag("event", "view_item_list", { 16 item_list_id: "@Model.ListId", 17 item_list_name: "@HtmlEncoder.JavaScriptStringEncode(Model.ListName)", 18 items: [ 19 @foreach (ProductViewModel product in Model.Products) 20 { 21 <text> 22 { 23 item_id: "@product.Number", 24 item_name: "@HtmlEncoder.JavaScriptStringEncode(product.GetTrackingName(trackingNames) ?? product.Name)", 25 currency: "@product.Price.CurrencyCode", 26 price: @product.Price.Price.ToString("0.00", System.Globalization.CultureInfo.InvariantCulture), 27 discount: @product.Discount.Price.ToString("0.00", System.Globalization.CultureInfo.InvariantCulture) 28 }, 29 </text> 30 } 31 ] 32 }); 33 </script> 34 } 35

0,00 kr. OutOfStock

0,00 kr. OutOfStock

0,00 kr. OutOfStock

0,00 kr. OutOfStock

799,95 kr. OutOfStock

0,00 kr. OutOfStock

0,00 kr. OutOfStock

0,00 kr. OutOfStock

1.499,00 kr. OutOfStock

0,00 kr. OutOfStock

0,00 kr. OutOfStock

0,00 kr. OutOfStock

799,95 kr. OutOfStock

0,00 kr. OutOfStock

0,00 kr. OutOfStock

0,00 kr. OutOfStock
168 ud af 5397 produkter
Hent flere produkter