Swift

Classic bikes

Error executing template "Designs/Swift-v2/Paragraph/Swift-v2_ProductListGroupImage.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
   at CompiledRazorTemplates.Dynamic.RazorEngine_f35259b651d8410a9e8b5ef9b5d84dda.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) in /_/src/Application/Providers/Dynamicweb.Rendering.Providers.NetCore/Razor/RazorTemplateRenderingProvider.cs:line 68
   at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template) in C:\dwxa1\_w\1\s\src\Core\Dynamicweb.Core\Rendering\TemplateRenderingService.cs:line 14
   at Dynamicweb.Rendering.Template.RenderRazorTemplate() in C:\dwxa1\_w\1\s\src\Core\Dynamicweb.Core\Rendering\Template.cs:line 805

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Frontend.Navigation 3 @using Dynamicweb.Ecommerce.ProductCatalog 4 @using Dynamicweb.Environment 5 @using Dynamicweb.Frontend 6 7 @{ 8 ProductListViewModel productList = null; 9 if (Dynamicweb.Context.Current.Items.Contains("ProductList")) 10 { 11 productList = (ProductListViewModel)Dynamicweb.Context.Current.Items["ProductList"]; 12 } 13 } 14 15 @if (productList is object) { 16 string groupImage = productList?.Group?.Assets != null ? productList.Group.Assets.FirstOrDefault(x => x.Name == "LargeImage").Value : string.Empty; 17 if (groupImage.StartsWith("/") && !groupImage.StartsWith("/Files", StringComparison.OrdinalIgnoreCase)) 18 { 19 groupImage = $"/Files{groupImage}"; 20 } 21 22 string groupName = productList?.Group?.Name != null ? productList.Group.Name : string.Empty; 23 24 string ratio = Model.Item.GetRawValueString("ImageAspectRatio", string.Empty); 25 ratio = ratio != "0" ? ratio : string.Empty; 26 string ratioCssClass = ratio != string.Empty && ratio != "fill" ? " ratio" : string.Empty; 27 string ratioVariable = ratio != string.Empty ? "style=\"--bs-aspect-ratio: " + ratio + "\"" : string.Empty; 28 string fillClass = ratio == "fill" ? " h-100" : ""; 29 30 var parms = new Dictionary<string, object>(); 31 parms.Add("loading", "lazy"); 32 parms.Add("columns", Model.GridRowColumnCount); 33 34 if (ratio == "fill") { 35 parms.Add("cssClass", "w-100 h-100"); 36 } 37 else 38 { 39 parms.Add("cssClass", "mw-100 mh-100"); 40 } 41 42 parms.Add("style", string.Empty); 43 parms.Add("alt", groupName); 44 45 if (!string.IsNullOrEmpty(groupImage)) { 46 <div class="item_@Model.Item.SystemName.ToLower()" data-dw-colorscheme="@Model.ColorScheme?.Id"> 47 <figure class="m-0@(ratioCssClass)@(fillClass)" @ratioVariable> 48 @RenderPartial("Components/Image.cshtml", new FileViewModel { Path = groupImage }, parms) 49 </figure> 50 </div> 51 } else if (Pageview.IsVisualEditorMode) { 52 <div class="alert alert-dark m-0" role="alert"> 53 <span>@Translate("Product list group image: The image will be shown here, if any")</span> 54 </div> 55 } 56 } else if (Pageview.IsVisualEditorMode) 57 { 58 <div class="alert alert-dark m-0" role="alert"> 59 <span>@Translate("Product list group image: The image will be shown here, if any")</span> 60 </div> 61 } 62 63
Mongoose Crossway 450 Disc Lady
Mongoose Crossway 450 Disc Lady

Mongoose Crossway 450 Disc Lady

2.660,00 kr. excl. VAT På lager
Mongoose Crossway 450 Disc
Mongoose Crossway 450 Disc

Mongoose Crossway 450 Disc

2.660,00 kr. excl. VAT På lager
Montague 34XZA
Montague 34XZA

Montague 34XZA

6.660,00 kr. excl. VAT På lager
Schwinn Sid Coasting Bike
Schwinn Sid Coasting Bike

Schwinn Sid Coasting Bike

2.326,67 kr. excl. VAT På lager
Nirve Forty-Nine 3-Speed Cruiser Bike
Nirve Forty-Nine 3-Speed Cruiser Bike

Nirve Forty-Nine 3-Speed Cruiser Bike

3.986,67 kr. excl. VAT På lager
Nirve Classic Single Speed Bike
Nirve Classic Single Speed Bike

Nirve Classic Single Speed Bike

1.933,33 kr. excl. VAT Ikke på lager
San Diego Aztec
San Diego Aztec

San Diego Aztec

1.993,33 kr. excl. VAT På lager
SPEEDER 300 ANTHRACITE/BLACK XS 47CM
SPEEDER 300 ANTHRACITE/BLACK XS 47CM

SPEEDER 300 ANTHRACITE/BLACK XS 47CM

11.253,33 kr. excl. VAT Ikke på lager
SPEEDER 200 MATT BLACK/SILVER XS 47CM
SPEEDER 200 MATT BLACK/SILVER XS 47CM

SPEEDER 200 MATT BLACK/SILVER XS 47CM

7.700,00 kr. excl. VAT Ikke på lager
SPEEDER 500 MATT ANTHRACITE/BLACK/BLUE XS 47CM
SPEEDER 500 MATT ANTHRACITE/BLACK/BLUE XS 47CM

SPEEDER 500 MATT ANTHRACITE/BLACK/BLUE XS 47CM

15.033,33 kr. excl. VAT Ikke på lager
SPEEDER 400 MATT BLACK/GLOSSY BLACK XS 47CM
SPEEDER 400 MATT BLACK/GLOSSY BLACK XS 47CM

SPEEDER 400 MATT BLACK/GLOSSY BLACK XS 47CM

13.166,67 kr. excl. VAT Ikke på lager
E-totem WS20
E-totem WS20

E-totem WS20

7.993,33 kr. excl. VAT På lager
12 ud af 16 produkter
Hent flere produkter

Classic bikes