Bends

Discover our range of precision-engineered bends for flexible routing of piping systems. Optimize your installation with smooth airflow and minimal pressure loss using our high-quality galvanized bends.

90° Pressed Bend
90° Pressed Bend

90° Pressed Bend

0121

Diameter

Ø80

Variant Name

90° Pressed Bend, Ø80

Variant Price

0.00 $

Ø100

Variant Name

90° Pressed Bend, Ø100

Variant Price

0.00 $

Ø120

Variant Name

90° Pressed Bend, Ø120

Variant Price

0.00 $

Ø125

Variant Name

90° Pressed Bend, Ø125

Variant Price

0.00 $

Ø140

Variant Name

90° Pressed Bend, Ø140

Variant Price

0.00 $

Ø150

Variant Name

90° Pressed Bend, Ø150

Variant Price

0.00 $

Ø160

Variant Name

90° Pressed Bend, Ø160

Variant Price

0.00 $

Ø180

Variant Name

90° Pressed Bend, Ø180

Variant Price

0.00 $

Ø200

Variant Name

90° Pressed Bend, Ø200

Variant Price

0.00 $

Ø250

Variant Name

90° Pressed Bend, Ø250

Variant Price

0.00 $

Ø300

Variant Name

90° Pressed Bend, Ø300

Variant Price

0.00 $

60° Pressed Bend
60° Pressed Bend

60° Pressed Bend

0122

Diameter

Ø80

Variant Name

60° Pressed Bend, Ø80

Variant Price

0.00 $

Ø100

Variant Name

60° Pressed Bend, Ø100

Variant Price

0.00 $

Ø120

Variant Name

60° Pressed Bend, Ø120

Variant Price

0.00 $

Ø125

Variant Name

60° Pressed Bend, Ø125

Variant Price

0.00 $

Ø140

Variant Name

60° Pressed Bend, Ø140

Variant Price

0.00 $

Ø150

Variant Name

60° Pressed Bend, Ø150

Variant Price

0.00 $

Ø160

Variant Name

60° Pressed Bend, Ø160

Variant Price

0.00 $

Ø180

Variant Name

60° Pressed Bend, Ø180

Variant Price

0.00 $

Ø200

Variant Name

60° Pressed Bend, Ø200

Variant Price

0.00 $

Ø250

Variant Name

60° Pressed Bend, Ø250

Variant Price

0.00 $

Ø300

Variant Name

60° Pressed Bend, Ø300

Variant Price

0.00 $

45° Pressed Bend
45° Pressed Bend

45° Pressed Bend

0123

Diameter

Ø80

Variant Name

45° Pressed Bend, Ø80

Variant Price

0.00 $

Ø100

Variant Name

45° Pressed Bend, Ø100

Variant Price

0.00 $

Ø120

Variant Name

45° Pressed Bend, Ø120

Variant Price

0.00 $

Ø125

Variant Name

45° Pressed Bend, Ø125

Variant Price

0.00 $

Ø140

Variant Name

45° Pressed Bend, Ø140

Variant Price

0.00 $

Ø150

Variant Name

45° Pressed Bend, Ø150

Variant Price

0.00 $

Ø160

Variant Name

45° Pressed Bend, Ø160

Variant Price

0.00 $

Ø180

Variant Name

45° Pressed Bend, Ø180

Variant Price

0.00 $

Ø200

Variant Name

45° Pressed Bend, Ø200

Variant Price

0.00 $

Ø250

Variant Name

45° Pressed Bend, Ø250

Variant Price

0.00 $

Ø300

Variant Name

45° Pressed Bend, Ø300

Variant Price

0.00 $

30° Pressed Bend
30° Pressed Bend

30° Pressed Bend

0124

Diameter

Ø80

Variant Name

30° Pressed Bend, Ø80

Variant Price

0.00 $

Ø100

Variant Name

30° Pressed Bend, Ø100

Variant Price

0.00 $

Ø120

Variant Name

30° Pressed Bend, Ø120

Variant Price

0.00 $

Ø125

Variant Name

30° Pressed Bend, Ø125

Variant Price

0.00 $

Ø140

Variant Name

30° Pressed Bend, Ø140

Variant Price

0.00 $

Ø150

Variant Name

30° Pressed Bend, Ø150

Variant Price

0.00 $

Ø160

Variant Name

30° Pressed Bend, Ø160

Variant Price

0.00 $

Ø180

Variant Name

30° Pressed Bend, Ø180

Variant Price

0.00 $

Ø200

Variant Name

30° Pressed Bend, Ø200

Variant Price

0.00 $

Ø250

Variant Name

30° Pressed Bend, Ø250

Variant Price

0.00 $

Ø300

Variant Name

30° Pressed Bend, Ø300

Variant Price

0.00 $

15° Pressed Bend
15° Pressed Bend

15° Pressed Bend

0125

Diameter

Ø80

Variant Name

15° Pressed Bend, Ø80

Variant Price

0.00 $

Ø100

Variant Name

15° Pressed Bend, Ø100

Variant Price

0.00 $

Ø120

Variant Name

15° Pressed Bend, Ø120

Variant Price

0.00 $

Ø125

Variant Name

15° Pressed Bend, Ø125

Variant Price

0.00 $

Ø140

Variant Name

15° Pressed Bend, Ø140

Variant Price

0.00 $

Ø150

Variant Name

15° Pressed Bend, Ø150

Variant Price

0.00 $

Ø160

Variant Name

15° Pressed Bend, Ø160

Variant Price

0.00 $

Ø180

Variant Name

15° Pressed Bend, Ø180

Variant Price

0.00 $

Ø200

Variant Name

15° Pressed Bend, Ø200

Variant Price

0.00 $

Ø250

Variant Name

15° Pressed Bend, Ø250

Variant Price

0.00 $

Ø300

Variant Name

15° Pressed Bend, Ø300

Variant Price

0.00 $

90° Segmented Bend
90° Segmented Bend

90° Segmented Bend

0126

Diameter

Ø225

Variant Name

90° Segmented Bend, Ø225

Variant Price

0.00 $

Ø250

Variant Name

90° Segmented Bend, Ø250

Variant Price

0.00 $

Ø275

Variant Name

90° Segmented Bend, Ø275

Variant Price

0.00 $

Ø300

Variant Name

90° Segmented Bend, Ø300

Variant Price

0.00 $

Ø315

Variant Name

90° Segmented Bend, Ø315

Variant Price

0.00 $

Ø350

Variant Name

90° Segmented Bend, Ø350

Variant Price

0.00 $

Ø400

Variant Name

90° Segmented Bend, Ø400

Variant Price

0.00 $

Ø450

Variant Name

90° Segmented Bend, Ø450

Variant Price

0.00 $

Ø500

Variant Name

90° Segmented Bend, Ø500

Variant Price

0.00 $

Ø550

Variant Name

90° Segmented Bend, Ø550

Variant Price

0.00 $

Ø600

Variant Name

90° Segmented Bend, Ø600

Variant Price

0.00 $

Ø630

Variant Name

90° Segmented Bend, Ø630

Variant Price

0.00 $

Ø650

Variant Name

90° Segmented Bend, Ø650

Variant Price

0.00 $

Ø700

Variant Name

90° Segmented Bend, Ø700

Variant Price

0.00 $

Ø750

Variant Name

90° Segmented Bend, Ø750

Variant Price

0.00 $

Ø800

Variant Name

90° Segmented Bend, Ø800

Variant Price

0.00 $

Ø850

Variant Name

90° Segmented Bend, Ø850

Variant Price

0.00 $

Ø900

Variant Name

90° Segmented Bend, Ø900

Variant Price

0.00 $

Ø950

Variant Name

90° Segmented Bend, Ø950

Variant Price

0.00 $

Ø1000

Variant Name

90° Segmented Bend, Ø1000

Variant Price

0.00 $

60° Segmented Bend
60° Segmented Bend

60° Segmented Bend

0127

Diameter

Ø225

Variant Name

60° Segmented Bend, Ø225

Variant Price

0.00 $

Ø250

Variant Name

60° Segmented Bend, Ø250

Variant Price

0.00 $

Ø275

Variant Name

60° Segmented Bend, Ø275

Variant Price

0.00 $

Ø300

Variant Name

60° Segmented Bend, Ø300

Variant Price

0.00 $

Ø315

Variant Name

60° Segmented Bend, Ø315

Variant Price

0.00 $

Ø350

Variant Name

60° Segmented Bend, Ø350

Variant Price

0.00 $

Ø400

Variant Name

60° Segmented Bend, Ø400

Variant Price

0.00 $

Ø450

Variant Name

60° Segmented Bend, Ø450

Variant Price

0.00 $

Ø500

Variant Name

60° Segmented Bend, Ø500

Variant Price

0.00 $

Ø550

Variant Name

60° Segmented Bend, Ø550

Variant Price

0.00 $

Ø600

Variant Name

60° Segmented Bend, Ø600

Variant Price

0.00 $

Ø630

Variant Name

60° Segmented Bend, Ø630

Variant Price

0.00 $

Ø650

Variant Name

60° Segmented Bend, Ø650

Variant Price

0.00 $

Ø700

Variant Name

60° Segmented Bend, Ø700

Variant Price

0.00 $

Ø750

Variant Name

60° Segmented Bend, Ø750

Variant Price

0.00 $

Ø800

Variant Name

60° Segmented Bend, Ø800

Variant Price

0.00 $

Ø850

Variant Name

60° Segmented Bend, Ø850

Variant Price

0.00 $

Ø900

Variant Name

60° Segmented Bend, Ø900

Variant Price

0.00 $

Ø950

Variant Name

60° Segmented Bend, Ø950

Variant Price

0.00 $

Ø1000

Variant Name

60° Segmented Bend, Ø1000

Variant Price

0.00 $

45° Segmented Bend
45° Segmented Bend

45° Segmented Bend

0128

Diameter

Ø225

Variant Name

45° Segmented Bend, Ø225

Variant Price

0.00 $

Ø250

Variant Name

45° Segmented Bend, Ø250

Variant Price

0.00 $

Ø275

Variant Name

45° Segmented Bend, Ø275

Variant Price

0.00 $

Ø300

Variant Name

45° Segmented Bend, Ø300

Variant Price

0.00 $

Ø315

Variant Name

45° Segmented Bend, Ø315

Variant Price

0.00 $

Ø350

Variant Name

45° Segmented Bend, Ø350

Variant Price

0.00 $

Ø400

Variant Name

45° Segmented Bend, Ø400

Variant Price

0.00 $

Ø450

Variant Name

45° Segmented Bend, Ø450

Variant Price

0.00 $

Ø500

Variant Name

45° Segmented Bend, Ø500

Variant Price

0.00 $

Ø550

Variant Name

45° Segmented Bend, Ø550

Variant Price

0.00 $

Ø600

Variant Name

45° Segmented Bend, Ø600

Variant Price

0.00 $

Ø630

Variant Name

45° Segmented Bend, Ø630

Variant Price

0.00 $

Ø650

Variant Name

45° Segmented Bend, Ø650

Variant Price

0.00 $

Ø700

Variant Name

45° Segmented Bend, Ø700

Variant Price

0.00 $

Ø750

Variant Name

45° Segmented Bend, Ø750

Variant Price

0.00 $

Ø800

Variant Name

45° Segmented Bend, Ø800

Variant Price

0.00 $

Ø850

Variant Name

45° Segmented Bend, Ø850

Variant Price

0.00 $

Ø900

Variant Name

45° Segmented Bend, Ø900

Variant Price

0.00 $

Ø950

Variant Name

45° Segmented Bend, Ø950

Variant Price

0.00 $

Ø1000

Variant Name

45° Segmented Bend, Ø1000

Variant Price

0.00 $

30° Segmented Bend
30° Segmented Bend

30° Segmented Bend

0129

Diameter

Ø225

Variant Name

30° Segmented Bend, Ø225

Variant Price

0.00 $

Ø250

Variant Name

30° Segmented Bend, Ø250

Variant Price

0.00 $

Ø275

Variant Name

30° Segmented Bend, Ø275

Variant Price

0.00 $

Ø300

Variant Name

30° Segmented Bend, Ø300

Variant Price

0.00 $

Ø315

Variant Name

30° Segmented Bend, Ø315

Variant Price

0.00 $

Ø350

Variant Name

30° Segmented Bend, Ø350

Variant Price

0.00 $

Ø400

Variant Name

30° Segmented Bend, Ø400

Variant Price

0.00 $

Ø450

Variant Name

30° Segmented Bend, Ø450

Variant Price

0.00 $

Ø500

Variant Name

30° Segmented Bend, Ø500

Variant Price

0.00 $

Ø550

Variant Name

30° Segmented Bend, Ø550

Variant Price

0.00 $

Ø600

Variant Name

30° Segmented Bend, Ø600

Variant Price

0.00 $

Ø630

Variant Name

30° Segmented Bend, Ø630

Variant Price

0.00 $

Ø650

Variant Name

30° Segmented Bend, Ø650

Variant Price

0.00 $

Ø700

Variant Name

30° Segmented Bend, Ø700

Variant Price

0.00 $

Ø750

Variant Name

30° Segmented Bend, Ø750

Variant Price

0.00 $

Ø800

Variant Name

30° Segmented Bend, Ø800

Variant Price

0.00 $

Ø850

Variant Name

30° Segmented Bend, Ø850

Variant Price

0.00 $

Ø900

Variant Name

30° Segmented Bend, Ø900

Variant Price

0.00 $

Ø950

Variant Name

30° Segmented Bend, Ø950

Variant Price

0.00 $

Ø1000

Variant Name

30° Segmented Bend, Ø1000

Variant Price

0.00 $

15° Segmented Bend
15° Segmented Bend

15° Segmented Bend

0130

Diameter

Ø225

Variant Name

15° Segmented Bend, Ø225

Variant Price

0.00 $

Ø250

Variant Name

15° Segmented Bend, Ø250

Variant Price

0.00 $

Ø275

Variant Name

15° Segmented Bend, Ø275

Variant Price

0.00 $

Ø300

Variant Name

15° Segmented Bend, Ø300

Variant Price

0.00 $

Ø315

Variant Name

15° Segmented Bend, Ø315

Variant Price

0.00 $

Ø350

Variant Name

15° Segmented Bend, Ø350

Variant Price

0.00 $

Ø400

Variant Name

15° Segmented Bend, Ø400

Variant Price

0.00 $

Ø450

Variant Name

15° Segmented Bend, Ø450

Variant Price

0.00 $

Ø500

Variant Name

15° Segmented Bend, Ø500

Variant Price

0.00 $

Ø550

Variant Name

15° Segmented Bend, Ø550

Variant Price

0.00 $

Ø600

Variant Name

15° Segmented Bend, Ø600

Variant Price

0.00 $

Ø630

Variant Name

15° Segmented Bend, Ø630

Variant Price

0.00 $

Ø650

Variant Name

15° Segmented Bend, Ø650

Variant Price

0.00 $

Ø700

Variant Name

15° Segmented Bend, Ø700

Variant Price

0.00 $

Ø750

Variant Name

15° Segmented Bend, Ø750

Variant Price

0.00 $

Ø800

Variant Name

15° Segmented Bend, Ø800

Variant Price

0.00 $

Ø850

Variant Name

15° Segmented Bend, Ø850

Variant Price

0.00 $

Ø900

Variant Name

15° Segmented Bend, Ø900

Variant Price

0.00 $

Ø950

Variant Name

15° Segmented Bend, Ø950

Variant Price

0.00 $

Ø1000

Variant Name

15° Segmented Bend, Ø1000

Variant Price

0.00 $

90° Segmented Bend with Flanges

90° Segmented Bend with Flanges

0126-F
Error executing template "Designs/Swift/Paragraph/Swift_ProductStaticVariants.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
   at CompiledRazorTemplates.Dynamic.RazorEngine_b0b39d30fd374ab894c0cb8ac10db3cf.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 Dynamicweb.Ecommerce.Variants 4 @using Dynamicweb.Frontend 5 @using System.IO 6 7 @{ 8 ProductViewModel product = null; 9 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 10 { 11 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 12 } 13 else if (Pageview.Page.Item["DummyProduct"] != null && Pageview.IsVisualEditorMode) 14 { 15 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 16 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 17 18 if (productList?.Products is object) 19 { 20 product = productList.Products[0]; 21 } 22 } 23 } 24 25 @if (product is object) 26 { 27 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 28 horizontalAlign = horizontalAlign == "center" ? "align-items-center text-center" : horizontalAlign; 29 horizontalAlign = horizontalAlign == "end" ? "align-items-end text-end" : horizontalAlign; 30 31 bool hideGroupHeaders = Model.Item.GetBoolean("HideGroupHeaders"); 32 string variantsLayout = Model.Item.GetRawValueString("Layout", "images"); 33 34 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 35 36 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 37 bool anonymousUser = Pageview.User == null; 38 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 39 40 var selectedGroups = Model.Item.GetList("Groups")?.GetRawValue().OfType<string>(); 41 int showMaxVariants = Model.Item.GetInt32("MaxVariantsToRender") != 0 ? Model.Item.GetInt32("MaxVariantsToRender") : 1; 42 43 if (product.VariantGroups().Count != 0) 44 { 45 <div class="d-flex flex-column @horizontalAlign item_@Model.Item.SystemName.ToLower()"> 46 @foreach (var variantGroup in product.VariantGroups()) 47 { 48 int variantsCount = 0; 49 string groupId = variantGroup.Id; 50 var displayType = variantGroup.DisplayType; 51 52 <div> 53 @foreach (var selectedGroupId in selectedGroups) 54 { 55 if (!hideGroupHeaders && groupId == selectedGroupId) 56 { 57 <h3 class="h6 m-0">@variantGroup.Name</h3> 58 } 59 } 60 <div class="d-flex gap-2 mb-2"> 61 @foreach (var variant in variantGroup.Options) 62 { 63 foreach (var selectedGroupId in selectedGroups) 64 { 65 if (groupId == selectedGroupId) 66 { 67 var optionsCount = variantGroup.Options.Count(); 68 69 if (variantsCount < showMaxVariants) 70 { 71 <article title="@product.Name @variant.Name @variant.Id" class="d-flex" style="z-index: 1"> 72 @{ 73 string defaultProductImage = Dynamicweb.Context.Current.Server.UrlEncode(product.DefaultImage.Value); 74 string variantImage = Dynamicweb.Context.Current.Server.UrlEncode(variant.Image.Value); 75 string defaultPrice = !hidePrice ? product.Price.PriceFormatted : "0"; 76 string variantPrice = !hidePrice ? product.Price.PriceFormatted : "0"; 77 displayType = displayType == VariantGroupDisplayType.NothingSelected && !string.IsNullOrEmpty(variant.Color) ? VariantGroupDisplayType.VariantColor : displayType; 78 displayType = displayType == VariantGroupDisplayType.NothingSelected && string.IsNullOrEmpty(variant.OptionImage.Value) && string.IsNullOrEmpty(variant.Color) ? VariantGroupDisplayType.VariantName : displayType; 79 displayType = displayType == VariantGroupDisplayType.NothingSelected && !string.IsNullOrEmpty(variant.OptionImage.Value) ? VariantGroupDisplayType.VariantOptionImage : displayType; 80 81 82 if (variantsLayout == "images") 83 { 84 switch (displayType) 85 { 86 case VariantGroupDisplayType.VariantImage: 87 if (isLazyLoadingForProductInfoEnabled) 88 { 89 <figure class="w-100 d-block m-0" data-price-formatted="" 90 onmouseover="swift.StaticVariants.SwitchProduct(event, '@product.Id', this.getAttribute('data-price-formatted'), '@variantImage'); event.stopPropagation();" 91 onmouseout="swift.StaticVariants.SwitchProduct(event, '@product.Id', this.getAttribute('data-price-formatted'), '@defaultProductImage')" 92 style="z-index: 1"> 93 <div class="d-flex align-items-center justify-content-center"> 94 <img src="/admin/public/GetImage.ashx?image=@variantImage&width=75&height=75&crop=5&FillCanvas=true&format=webp" height="75" width="75" class="p-1 text-small w-100 h-100" loading="lazy" decoding="async" alt="@product.Name, @variant.Name" style="z-index: 1"> 95 </div> 96 </figure> 97 } 98 else 99 { 100 <figure class="w-100 d-block m-0" 101 onmouseover="swift.StaticVariants.SwitchProduct(event, '@product.Id', '@defaultPrice', '@variantImage')" 102 onmouseout="swift.StaticVariants.SwitchProduct(event, '@product.Id', '@variantPrice', '@defaultProductImage')" 103 style="z-index: 1"> 104 <div class="d-flex align-items-center justify-content-center"> 105 <img src="/admin/public/GetImage.ashx?image=@variantImage&width=75&height=75&crop=5&FillCanvas=true&format=webp" height="75" width="75" class="p-1 text-small w-100 h-100" loading="lazy" decoding="async" alt="@product.Name, @variant.Name"> 106 </div> 107 </figure> 108 } 109 break; 110 case VariantGroupDisplayType.VariantColor: 111 if (!string.IsNullOrEmpty(variant.Color)) 112 { 113 <span class="colorbox border" style="background-color: @variant.Color"></span> 114 } 115 else if (!string.IsNullOrEmpty(variant.OptionImage.Value) && string.IsNullOrEmpty(variant.Color)) 116 { 117 <img src="/Admin/Public/GetImage.ashx?image=@(variant.OptionImage.Value)&width=40&format=webp" class="border" style="width: 42px; height: 42px;"> 118 } 119 else 120 { 121 <div class="d-flex align-items-center justify-content-center"> 122 @variant.Name 123 </div> 124 } 125 break; 126 case VariantGroupDisplayType.VariantName: 127 <div class="d-flex align-items-center justify-content-center"> 128 @variant.Name 129 </div> 130 break; 131 case VariantGroupDisplayType.VariantOptionImage: 132 if (!string.IsNullOrEmpty(variant.OptionImage.Value)) 133 { 134 <img src="/Admin/Public/GetImage.ashx?image=@(variant.OptionImage.Value)&width=42&format=webp" style="width: 42px; height: 42px;"> 135 } 136 else 137 { 138 <span class="colorbox border" style="background-color:@variant.Color;"></span> 139 } 140 break; 141 case VariantGroupDisplayType.NothingSelected: 142 <span class="colorbox border" style="background-color: @variant.Color"></span> 143 break; 144 default: 145 <div class="d-flex align-items-center justify-content-center"> 146 @variant.Name 147 </div> 148 break; 149 } 150 151 } 152 else if (variantsLayout == "swatches") 153 { 154 if (!string.IsNullOrEmpty(variant.Color)) 155 { 156 <span class="colorbox colorbox-sm rounded-circle border me-1" style="background-color: @variant.Color" 157 onmouseover="swift.StaticVariants.SwitchProduct(event, '@product.Id', '@defaultPrice', '@variantImage')" 158 onmouseout="swift.StaticVariants.SwitchProduct(event, '@product.Id', '@variantPrice', '@defaultProductImage')"> 159 </span> 160 } 161 else if (!string.IsNullOrEmpty(variant.OptionImage.Value) && string.IsNullOrEmpty(variant.Color)) 162 { 163 <span class="ratio ratio-1x1 colorbox-sm rounded-circle border me-1 overflow-hidden" 164 onmouseover="swift.StaticVariants.SwitchProduct(event, '@product.Id', '@defaultPrice', '@variantImage')" 165 onmouseout="swift.StaticVariants.SwitchProduct(event, '@product.Id', '@variantPrice', '@defaultProductImage')"> 166 <img src="/Admin/Public/GetImage.ashx?image=@(variant.OptionImage.Value)&width=42&format=webp"> 167 </span> 168 } 169 else 170 { 171 <div class="d-flex align-items-center justify-content-center"> 172 @variant.Name 173 </div> 174 } 175 } 176 177 <div class="visually-hidden"> 178 <h4>@Translate("Variant Name")</h4> 179 <p>@product.Name, @variant.Name</p> 180 @if (!hidePrice) 181 { 182 <h4>@Translate("Variant Price")</h4> 183 if (isLazyLoadingForProductInfoEnabled) 184 { 185 <p><span class="text-price js-text-price"></span></p> 186 } 187 else 188 { 189 <p><span class="text-price">@product.Price.PriceFormatted</span></p> 190 } 191 } 192 </div> 193 } 194 </article> 195 196 variantsCount++; 197 198 if (variantsCount == showMaxVariants && optionsCount != showMaxVariants) 199 { 200 int left = optionsCount - showMaxVariants; 201 <div class="variant-option ms-1 d-flex justify-content-center align-items-center"> 202 <span>+@left</span> 203 </div> 204 } 205 } 206 207 } 208 } 209 } 210 211 @if (variantsCount == 0 && Pageview.IsVisualEditorMode) 212 { 213 <div class="alert alert-dark m-0">@Translate("No variants available")</div> 214 } 215 </div> 216 </div> 217 } 218 </div> 219 } 220 } 221 else if (Pageview.IsVisualEditorMode) 222 { 223 <div class="alert alert-dark m-0">@Translate("No products available")</div> 224 } 225
60° Segmented Bend with Flanges

60° Segmented Bend with Flanges

0127-F
Error executing template "Designs/Swift/Paragraph/Swift_ProductStaticVariants.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
   at CompiledRazorTemplates.Dynamic.RazorEngine_b0b39d30fd374ab894c0cb8ac10db3cf.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 Dynamicweb.Ecommerce.Variants 4 @using Dynamicweb.Frontend 5 @using System.IO 6 7 @{ 8 ProductViewModel product = null; 9 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 10 { 11 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 12 } 13 else if (Pageview.Page.Item["DummyProduct"] != null && Pageview.IsVisualEditorMode) 14 { 15 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 16 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 17 18 if (productList?.Products is object) 19 { 20 product = productList.Products[0]; 21 } 22 } 23 } 24 25 @if (product is object) 26 { 27 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 28 horizontalAlign = horizontalAlign == "center" ? "align-items-center text-center" : horizontalAlign; 29 horizontalAlign = horizontalAlign == "end" ? "align-items-end text-end" : horizontalAlign; 30 31 bool hideGroupHeaders = Model.Item.GetBoolean("HideGroupHeaders"); 32 string variantsLayout = Model.Item.GetRawValueString("Layout", "images"); 33 34 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 35 36 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 37 bool anonymousUser = Pageview.User == null; 38 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 39 40 var selectedGroups = Model.Item.GetList("Groups")?.GetRawValue().OfType<string>(); 41 int showMaxVariants = Model.Item.GetInt32("MaxVariantsToRender") != 0 ? Model.Item.GetInt32("MaxVariantsToRender") : 1; 42 43 if (product.VariantGroups().Count != 0) 44 { 45 <div class="d-flex flex-column @horizontalAlign item_@Model.Item.SystemName.ToLower()"> 46 @foreach (var variantGroup in product.VariantGroups()) 47 { 48 int variantsCount = 0; 49 string groupId = variantGroup.Id; 50 var displayType = variantGroup.DisplayType; 51 52 <div> 53 @foreach (var selectedGroupId in selectedGroups) 54 { 55 if (!hideGroupHeaders && groupId == selectedGroupId) 56 { 57 <h3 class="h6 m-0">@variantGroup.Name</h3> 58 } 59 } 60 <div class="d-flex gap-2 mb-2"> 61 @foreach (var variant in variantGroup.Options) 62 { 63 foreach (var selectedGroupId in selectedGroups) 64 { 65 if (groupId == selectedGroupId) 66 { 67 var optionsCount = variantGroup.Options.Count(); 68 69 if (variantsCount < showMaxVariants) 70 { 71 <article title="@product.Name @variant.Name @variant.Id" class="d-flex" style="z-index: 1"> 72 @{ 73 string defaultProductImage = Dynamicweb.Context.Current.Server.UrlEncode(product.DefaultImage.Value); 74 string variantImage = Dynamicweb.Context.Current.Server.UrlEncode(variant.Image.Value); 75 string defaultPrice = !hidePrice ? product.Price.PriceFormatted : "0"; 76 string variantPrice = !hidePrice ? product.Price.PriceFormatted : "0"; 77 displayType = displayType == VariantGroupDisplayType.NothingSelected && !string.IsNullOrEmpty(variant.Color) ? VariantGroupDisplayType.VariantColor : displayType; 78 displayType = displayType == VariantGroupDisplayType.NothingSelected && string.IsNullOrEmpty(variant.OptionImage.Value) && string.IsNullOrEmpty(variant.Color) ? VariantGroupDisplayType.VariantName : displayType; 79 displayType = displayType == VariantGroupDisplayType.NothingSelected && !string.IsNullOrEmpty(variant.OptionImage.Value) ? VariantGroupDisplayType.VariantOptionImage : displayType; 80 81 82 if (variantsLayout == "images") 83 { 84 switch (displayType) 85 { 86 case VariantGroupDisplayType.VariantImage: 87 if (isLazyLoadingForProductInfoEnabled) 88 { 89 <figure class="w-100 d-block m-0" data-price-formatted="" 90 onmouseover="swift.StaticVariants.SwitchProduct(event, '@product.Id', this.getAttribute('data-price-formatted'), '@variantImage'); event.stopPropagation();" 91 onmouseout="swift.StaticVariants.SwitchProduct(event, '@product.Id', this.getAttribute('data-price-formatted'), '@defaultProductImage')" 92 style="z-index: 1"> 93 <div class="d-flex align-items-center justify-content-center"> 94 <img src="/admin/public/GetImage.ashx?image=@variantImage&width=75&height=75&crop=5&FillCanvas=true&format=webp" height="75" width="75" class="p-1 text-small w-100 h-100" loading="lazy" decoding="async" alt="@product.Name, @variant.Name" style="z-index: 1"> 95 </div> 96 </figure> 97 } 98 else 99 { 100 <figure class="w-100 d-block m-0" 101 onmouseover="swift.StaticVariants.SwitchProduct(event, '@product.Id', '@defaultPrice', '@variantImage')" 102 onmouseout="swift.StaticVariants.SwitchProduct(event, '@product.Id', '@variantPrice', '@defaultProductImage')" 103 style="z-index: 1"> 104 <div class="d-flex align-items-center justify-content-center"> 105 <img src="/admin/public/GetImage.ashx?image=@variantImage&width=75&height=75&crop=5&FillCanvas=true&format=webp" height="75" width="75" class="p-1 text-small w-100 h-100" loading="lazy" decoding="async" alt="@product.Name, @variant.Name"> 106 </div> 107 </figure> 108 } 109 break; 110 case VariantGroupDisplayType.VariantColor: 111 if (!string.IsNullOrEmpty(variant.Color)) 112 { 113 <span class="colorbox border" style="background-color: @variant.Color"></span> 114 } 115 else if (!string.IsNullOrEmpty(variant.OptionImage.Value) && string.IsNullOrEmpty(variant.Color)) 116 { 117 <img src="/Admin/Public/GetImage.ashx?image=@(variant.OptionImage.Value)&width=40&format=webp" class="border" style="width: 42px; height: 42px;"> 118 } 119 else 120 { 121 <div class="d-flex align-items-center justify-content-center"> 122 @variant.Name 123 </div> 124 } 125 break; 126 case VariantGroupDisplayType.VariantName: 127 <div class="d-flex align-items-center justify-content-center"> 128 @variant.Name 129 </div> 130 break; 131 case VariantGroupDisplayType.VariantOptionImage: 132 if (!string.IsNullOrEmpty(variant.OptionImage.Value)) 133 { 134 <img src="/Admin/Public/GetImage.ashx?image=@(variant.OptionImage.Value)&width=42&format=webp" style="width: 42px; height: 42px;"> 135 } 136 else 137 { 138 <span class="colorbox border" style="background-color:@variant.Color;"></span> 139 } 140 break; 141 case VariantGroupDisplayType.NothingSelected: 142 <span class="colorbox border" style="background-color: @variant.Color"></span> 143 break; 144 default: 145 <div class="d-flex align-items-center justify-content-center"> 146 @variant.Name 147 </div> 148 break; 149 } 150 151 } 152 else if (variantsLayout == "swatches") 153 { 154 if (!string.IsNullOrEmpty(variant.Color)) 155 { 156 <span class="colorbox colorbox-sm rounded-circle border me-1" style="background-color: @variant.Color" 157 onmouseover="swift.StaticVariants.SwitchProduct(event, '@product.Id', '@defaultPrice', '@variantImage')" 158 onmouseout="swift.StaticVariants.SwitchProduct(event, '@product.Id', '@variantPrice', '@defaultProductImage')"> 159 </span> 160 } 161 else if (!string.IsNullOrEmpty(variant.OptionImage.Value) && string.IsNullOrEmpty(variant.Color)) 162 { 163 <span class="ratio ratio-1x1 colorbox-sm rounded-circle border me-1 overflow-hidden" 164 onmouseover="swift.StaticVariants.SwitchProduct(event, '@product.Id', '@defaultPrice', '@variantImage')" 165 onmouseout="swift.StaticVariants.SwitchProduct(event, '@product.Id', '@variantPrice', '@defaultProductImage')"> 166 <img src="/Admin/Public/GetImage.ashx?image=@(variant.OptionImage.Value)&width=42&format=webp"> 167 </span> 168 } 169 else 170 { 171 <div class="d-flex align-items-center justify-content-center"> 172 @variant.Name 173 </div> 174 } 175 } 176 177 <div class="visually-hidden"> 178 <h4>@Translate("Variant Name")</h4> 179 <p>@product.Name, @variant.Name</p> 180 @if (!hidePrice) 181 { 182 <h4>@Translate("Variant Price")</h4> 183 if (isLazyLoadingForProductInfoEnabled) 184 { 185 <p><span class="text-price js-text-price"></span></p> 186 } 187 else 188 { 189 <p><span class="text-price">@product.Price.PriceFormatted</span></p> 190 } 191 } 192 </div> 193 } 194 </article> 195 196 variantsCount++; 197 198 if (variantsCount == showMaxVariants && optionsCount != showMaxVariants) 199 { 200 int left = optionsCount - showMaxVariants; 201 <div class="variant-option ms-1 d-flex justify-content-center align-items-center"> 202 <span>+@left</span> 203 </div> 204 } 205 } 206 207 } 208 } 209 } 210 211 @if (variantsCount == 0 && Pageview.IsVisualEditorMode) 212 { 213 <div class="alert alert-dark m-0">@Translate("No variants available")</div> 214 } 215 </div> 216 </div> 217 } 218 </div> 219 } 220 } 221 else if (Pageview.IsVisualEditorMode) 222 { 223 <div class="alert alert-dark m-0">@Translate("No products available")</div> 224 } 225
12 out of 15 products
Load more products