Slangestuds lige 10mm, L1=30
Varenummer:
100-081
L1=30 MM 6,35 x 11,3 da =10 MM
Hose stud straight for high pressure
Error executing template "Designs/Swift/Paragraph/Swift_ProductFieldDisplayGroups.cshtml" System.ArgumentException: An item with the same key has already been added. Key: GROUP61 at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior) at Dynamicweb.Ecommerce.ProductCategoryFieldService.GetCategoriesFromGroups(List`1 categories, HashSet`1& idsHash, IEnumerable`1 groups, Int32 currentLevel, Int32 minLevel, Nullable`1 maxLevel) at Dynamicweb.Ecommerce.ProductCatalog.ViewEngine.GetFieldDisplayGroupValues(ProductViewModelSettings settings, Product product, String languageID, Lazy`1 productIds) at Dynamicweb.Ecommerce.ProductCatalog.ViewEngine.<>c__DisplayClass9_1.<BulkCreateView>b__61() at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode) at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor) at System.Lazy`1.CreateValue() at Dynamicweb.Ecommerce.ProductCatalog.ViewEngine.CreateProductFieldGroupsView(ProductViewModel model, IEnumerable`1 groupSystemNames, Boolean hideZeroValues) at CompiledRazorTemplates.Dynamic.RazorEngine_ec2cbd2c7b7e4f45970e829d0824dfca.GetDisplayGroups(ProductViewModel product) at CompiledRazorTemplates.Dynamic.RazorEngine_ec2cbd2c7b7e4f45970e829d0824dfca.ExecuteAsync() at RazorEngine.Templating.TemplateBase.Run(ExecuteContext context, TextWriter reader) at RazorEngine.Templating.RazorEngineCore.RunTemplate(ICompiledTemplate template, TextWriter writer, Object model, DynamicViewBag viewBag) at RazorEngine.Templating.RazorEngineService.Run(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag) at RazorEngine.Templating.DynamicWrapperService.Run(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag) at RazorEngine.Templating.RazorEngineServiceExtensions.Run(IRazorEngineService service, String name, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag) at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass23_0.<Run>b__0(TextWriter writer) at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter) at RazorEngine.Templating.RazorEngineServiceExtensions.Run(IRazorEngineService service, String name, Type modelType, Object model, DynamicViewBag viewBag) at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template) at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template) at Dynamicweb.Rendering.Template.RenderRazorTemplate()
1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @functions { 5 6 ProductViewModel GetProduct() 7 { 8 ProductViewModel product = null; 9 10 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 11 { 12 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 13 } 14 15 return product; 16 } 17 18 List<FieldGroupViewModel> GetDisplayGroups(ProductViewModel product) 19 { 20 21 bool hideFieldsWithZeroValue = Model.Item.GetBoolean("HideFieldsWithZeroValue"); 22 var selectedDisplayGroupSystemName = Model.Item.GetList("DisplayGroups")?.GetRawValue().OfType<string>(); 23 var displayGroups = product.GetProductDisplayGroupFieldsByGroupSystemNames(selectedDisplayGroupSystemName, hideFieldsWithZeroValue); 24 25 return displayGroups.ToList(); 26 } 27 28 public static string FirstCharToUpper(string input) 29 { 30 return input[0].ToString().ToUpper() + input.Substring(1); 31 } 32 } 33 34 @{ 35 ProductViewModel product = GetProduct(); 36 37 if (product is object) 38 { 39 40 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? " theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 41 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 42 contentPadding = contentPadding == "none" ? string.Empty : contentPadding; 43 contentPadding = contentPadding == "small" ? " p-2 p-md-3" : contentPadding; 44 contentPadding = contentPadding == "large" ? " p-4 p-md-5" : contentPadding; 45 46 string size = "compact"; 47 string gapCss = size == "full" ? " gap-4" : " gap-2"; 48 49 var displayGroups = GetDisplayGroups(product); 50 51 var templateParams = new Dictionary<string, object> 52 { 53 { "Groups", displayGroups }, 54 { "Size", size }, 55 { "HideGroupHeaders", Model.Item.GetBoolean("HideGroupHeaders") }, 56 { "HideTitle", Model.Item.GetBoolean("HideTitle") } 57 }; 58 59 string templateLayout = Model.Item.GetRawValueString("Layout", "list"); 60 string templateLayoutPath = $"Components/Specifications/{FirstCharToUpper(templateLayout)}.cshtml"; 61 62 <div class="h-100@(theme)@(contentPadding) item_@Model.Item.SystemName.ToLower()"> 63 <div class="grid@(gapCss)"> 64 @RenderPartial(templateLayoutPath, Model, templateParams) 65 </div> 66 </div> 67 68 } 69 else 70 { 71 <div class="alert alert-warning m-0">@Translate("Product Specification will be shown here if any")</div> 72 } 73 } 74
24
På lager
Du skal være logget ind for at se priser og specifikationer samt bestille online.
Error executing template "Designs/Swift/Paragraph/Swift_ProductFieldDisplayGroupsAccordion.cshtml" System.ArgumentException: An item with the same key has already been added. Key: GROUP61 at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior) at Dynamicweb.Ecommerce.ProductCategoryFieldService.GetCategoriesFromGroups(List`1 categories, HashSet`1& idsHash, IEnumerable`1 groups, Int32 currentLevel, Int32 minLevel, Nullable`1 maxLevel) at Dynamicweb.Ecommerce.ProductCatalog.ViewEngine.GetFieldDisplayGroupValues(ProductViewModelSettings settings, Product product, String languageID, Lazy`1 productIds) at Dynamicweb.Ecommerce.ProductCatalog.ViewEngine.<>c__DisplayClass9_1.<BulkCreateView>b__61() at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode) --- End of stack trace from previous location --- at System.Lazy`1.CreateValue() at Dynamicweb.Ecommerce.ProductCatalog.ViewEngine.CreateProductFieldGroupsView(ProductViewModel model, IEnumerable`1 groupSystemNames, Boolean hideZeroValues) at CompiledRazorTemplates.Dynamic.RazorEngine_d7cccac28bdc4068bf2054be2d13cac8.GetDisplayGroups(ProductViewModel product) at CompiledRazorTemplates.Dynamic.RazorEngine_d7cccac28bdc4068bf2054be2d13cac8.GetContentSettings(ProductViewModel product) at CompiledRazorTemplates.Dynamic.RazorEngine_d7cccac28bdc4068bf2054be2d13cac8.ExecuteAsync() at RazorEngine.Templating.TemplateBase.Run(ExecuteContext context, TextWriter reader) at RazorEngine.Templating.RazorEngineCore.RunTemplate(ICompiledTemplate template, TextWriter writer, Object model, DynamicViewBag viewBag) at RazorEngine.Templating.RazorEngineService.Run(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag) at RazorEngine.Templating.DynamicWrapperService.Run(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag) at RazorEngine.Templating.RazorEngineServiceExtensions.Run(IRazorEngineService service, String name, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag) at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass23_0.<Run>b__0(TextWriter writer) at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter) at RazorEngine.Templating.RazorEngineServiceExtensions.Run(IRazorEngineService service, String name, Type modelType, Object model, DynamicViewBag viewBag) at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template) at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template) at Dynamicweb.Rendering.Template.RenderRazorTemplate()
1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 @using System.Linq 4 5 @functions { 6 7 class ContentSetting 8 { 9 public FieldGroupViewModel FieldDisplayGroup { get; set; } 10 public string LayoutPath { get; set; } 11 12 public ContentSetting(FieldGroupViewModel fieldDisplayGroup, string layoutPath) 13 { 14 FieldDisplayGroup = fieldDisplayGroup; 15 LayoutPath = GetLayoutPathFormatted(layoutPath); 16 } 17 } 18 19 ProductViewModel GetProduct() 20 { 21 ProductViewModel product = null; 22 23 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 24 { 25 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 26 } 27 28 return product; 29 } 30 31 List<ContentSetting> GetContentSettings(ProductViewModel product) 32 { 33 var displayGroups = GetDisplayGroups(product); 34 string defaultLayout = Model.Item.GetRawValueString("Layout", "list"); 35 var contentSettings = displayGroups.Select(displayGroup => new ContentSetting(displayGroup, defaultLayout)).ToList(); 36 bool layoutsCustomized = Model.Item.GetBoolean("CustomizeLayouts"); 37 38 return layoutsCustomized ? GetContentSettingsCustomizedLayoutSelection(contentSettings) : contentSettings; 39 } 40 41 List<FieldGroupViewModel> GetDisplayGroups(ProductViewModel product) 42 { 43 44 bool hideFieldsWithZeroValue = Model.Item.GetBoolean("HideFieldsWithZeroValue"); 45 var selectedDisplayGroupSystemName = Model.Item.GetList("FieldDisplayGroups")?.GetRawValue().OfType<string>(); 46 var displayGroups = product.GetProductDisplayGroupFieldsByGroupSystemNames(selectedDisplayGroupSystemName, hideFieldsWithZeroValue); 47 48 return displayGroups.ToList(); 49 } 50 51 List<ContentSetting> GetContentSettingsCustomizedLayoutSelection(List<ContentSetting> contentSettings) 52 { 53 var selections = Model.Item.GetItems("FieldDisplayGroupLayoutSelector"); 54 55 foreach (var contentSetting in contentSettings) 56 { 57 foreach (var selection in selections) 58 { 59 string displayGroupSystemName = string.Empty; 60 string layoutPath = string.Empty; 61 62 foreach (var field in selection.Fields) 63 { 64 displayGroupSystemName = field.SystemName == "FieldDisplayGroups" ? field.GetRawValueString() : displayGroupSystemName; 65 layoutPath = field.SystemName == "Layout" ? field.GetRawValueString() : layoutPath; 66 } 67 68 if (displayGroupSystemName == contentSetting.FieldDisplayGroup.SystemName) 69 { 70 contentSetting.LayoutPath = GetLayoutPathFormatted(layoutPath); 71 } 72 } 73 } 74 75 return contentSettings; 76 } 77 78 public static string GetLayoutPathFormatted(string layout) 79 { 80 string layoutPathInCapitalCase = layout[0].ToString().ToUpper() + layout.Substring(1); 81 return $"Components/Specifications/{layoutPathInCapitalCase}.cshtml"; 82 } 83 84 } 85 86 @{ 87 var product = GetProduct(); 88 89 if (product is object) 90 { 91 92 var accordionContentSettings = GetContentSettings(product); 93 94 string title = Model.Item.GetString("Title"); 95 bool hideLabels = Model.Item.GetBoolean("HideFieldLabels"); 96 bool hideTitle = Model.Item.GetBoolean("HideTitle"); 97 string titleFontSize = Model.Item.GetRawValueString("TitleFontSize", "display-4"); 98 var templateParams = new Dictionary<string, object> 99 { 100 {"Size", "compact" }, 101 //Hide title and group headers only apply to the accordion layout, not its tab content layouts 102 { "HideGroupHeaders", true }, 103 { "HideTitle", true } 104 }; 105 106 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? " theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 107 string gapCss = "gap-2"; 108 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 109 contentPadding = contentPadding == "none" ? string.Empty : contentPadding; 110 contentPadding = contentPadding == "small" ? " p-2 p-md-3" : contentPadding; 111 contentPadding = contentPadding == "large" ? " p-4 p-md-5" : contentPadding; 112 113 <div class="h-100@(theme)@(contentPadding) item_@Model.Item.SystemName.ToLower()"> 114 <div class="grid @(gapCss)"> 115 @if (!hideTitle) 116 { 117 <h2 class="g-col-12 @titleFontSize">@Model.Item.GetString("Title")</h2> 118 } 119 <div class="g-col-12"> 120 <div class="accordion accordion-flush w-100" id="Specifications_@Model.ID"> 121 @foreach (var contentSetting in accordionContentSettings) 122 { 123 var id = Guid.NewGuid().ToString(); 124 string groupHeadingId = $"SpecificationHeading_{Model.ID}_{id}"; 125 string groupItemId = $"SpecificationItem_{Model.ID}_{id}"; 126 127 <div class="accordion-item"> 128 <h2 class="accordion-header" id="@groupHeadingId"> 129 <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#@groupItemId" aria-expanded="false" aria-controls="@groupItemId"> 130 @contentSetting.FieldDisplayGroup.Name 131 </button> 132 </h2> 133 134 <div id="@groupItemId" class="accordion-collapse collapse" aria-labelledby="@groupHeadingId" data-bs-parent="#Specifications_@Model.ID"> 135 <div class="accordion-body"> 136 <div class="g-col-12"> 137 <dl class="grid @(gapCss)"> 138 @{ 139 templateParams["Groups"] = new List<FieldGroupViewModel> { contentSetting.FieldDisplayGroup }; 140 @RenderPartial(contentSetting.LayoutPath, Model, templateParams); 141 } 142 </dl> 143 </div> 144 </div> 145 </div> 146 </div> 147 } 148 </div> 149 </div> 150 </div> 151 </div> 152 } 153 else 154 { 155 <div class="alert alert-warning m-0">@Translate("Product Specification will be shown here if any")</div> 156 } 157 } 158