Error executing template "/Designs/Swift/Paragraph/Custom_Swift_BrandBannerParagraph.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
   at CompiledRazorTemplates.Dynamic.RazorEngine_fb393b4efa7749a3af7267b429a6ca8b.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.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 else if (Pageview.Page.Item["DummyProductGroup"] != null && Pageview.IsVisualEditorMode) 14 { 15 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 16 ProductListViewModel groupList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 17 18 if (groupList?.Products is object) 19 { 20 productList = groupList; 21 } 22 } 23 } 24 25 @if (productList is object) 26 { 27 string groupImage = productList?.Group?.Assets != null ? productList.Group.Assets.FirstOrDefault(x => x.Name == "LargeImage").Value : string.Empty; 28 if (groupImage.StartsWith("/") && !groupImage.StartsWith("/Files", StringComparison.OrdinalIgnoreCase)) 29 { 30 groupImage = $"/Files{groupImage}"; 31 } 32 33 string groupName = productList?.Group?.Name != null ? productList.Group.Name : string.Empty; 34 35 36 if (!string.IsNullOrEmpty(groupImage)) 37 { 38 <div class="item_@Model.Item.SystemName.ToLower()"> 39 <div class="cus-brandgrp__container"> 40 <div class="cus-brandgrp__imgdiv"> 41 <img src="@groupImage" class="cus-brandgrp_img"/> 42 </div> 43 <div class="cus-brandgrp__content"> 44 <h3 class="cus-brandgrp__title">@productList?.Group?.Name</h3> 45 <div class="cus-brandgrp__desc"> 46 @productList?.Group?.Description 47 </div> 48 </div> 49 </div> 50 </div> 51 } 52 else if (Pageview.IsVisualEditorMode) 53 { 54 <div class="alert alert-dark m-0" role="alert"> 55 <span>@Translate("Product list brand info")</span> 56 </div> 57 } 58 } 59 else if (Pageview.IsVisualEditorMode) 60 { 61 <div class="alert alert-dark m-0" role="alert"> 62 <span>@Translate("Product list brand info")</span> 63 </div> 64 } 65 66

Brand

Price Range

Stock

BABYLISS ST395E IPRO 230 STEAM WET AMD DRY
BABYLISS ST395E IPRO 230 STEAM WET AMD DRY

BABYLISS

BABYLISS ST395E IPRO 230 STEAM WET AMD DRY

(0)
LYD 400,000 InStock
BABYLISS-SMOOTHING HEATED BRUSH HSB101E
BABYLISS-SMOOTHING HEATED BRUSH HSB101E

BABYLISS

BABYLISS-SMOOTHING HEATED BRUSH HSB101E

(0)
LYD 260,000 InStock
BABY ST330E 2IN1 WET &DRY HAIR CURLER &STRAIGHTENER
BABY ST330E 2IN1 WET &DRY HAIR CURLER &STRAIGHTENER

BABYLISS

BABY ST330E 2IN1 WET &DRY HAIR CURLER &STRAIGHTENER

(0)
LYD 292,500 InStock
3 out of 3 products
;