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

العلامة التجارية

نطاق السعر

المخزون

the hair loss shampoo 250ml
the hair loss shampoo 250ml

sergilac

the hair loss shampoo 250ml

(0)
LYD 78,000 InStock
the dundruff free shampoo
the dundruff free shampoo

sergilac

the dundruff free shampoo

(0)
LYD 90,000 InStock
the hair loss lotion 150ml
the hair loss lotion 150ml

sergilac

the hair loss lotion 150ml

(0)
LYD 110,000 InStock
the argan elixir
the argan elixir

sergilac

the argan elixir

(0)
LYD 97,000 InStock
the hair loss treatments 12ampx10ml
the hair loss treatments 12ampx10ml

sergilac

the hair loss treatments 12ampx10ml

(0)
LYD 220,000 InStock
the argan shampoo
the argan shampoo

sergilac

the argan shampoo

(0)
LYD 59,000 InStock
the argan mask
the argan mask

sergilac

the argan mask

(0)
LYD 75,000 InStock
the curler gel
the curler gel

sergilac

the curler gel

(0)
LYD 85,000 InStock
the silver shampoo
the silver shampoo

sergilac

the silver shampoo

(0)
LYD 75,000 InStock
9 من أصل 9 المنتجات
;