• Veganski
  • Za profesionalce iz sveta lepote
  • Naručite do 12h, isporučujemo sledećeg radnog dana
Error executing template "Designs/ProNails_generated/eCom/ProductCatalog/plist_config.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
   at CompiledRazorTemplates.Dynamic.RazorEngine_fdfa2d3c02f84bd2a24f0423897a8154.Execute() in D:\dynamicweb.net\Solutions\Bluedesk\pronails.cloud.dynamicweb-cms.com\files\Templates\Designs\ProNails_generated\eCom\ProductCatalog\plist_config.cshtml:line 19
   at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader)
   at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<RunCompile>b__0(TextWriter writer)
   at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
   at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template)
   at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template)
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()

1 @inherits ViewModelTemplate<ProductListViewModel> 2 3 @using Dynamicweb; 4 @using Dynamicweb.Rendering 5 @using Dynamicweb.Content; 6 @using Dynamicweb.Content.Items; 7 @using Dynamicweb.Ecommerce.ProductCatalog 8 9 @using Bluedesk.DynamicWeb.ItemTypes.Settings.Configuration; 10 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution 11 12 13 @{ 14 var master_configuration = Services.Pages.GetPageByNavigationTag(Pageview.AreaID, "MasterConfiguration"); 15 MasterConfig mc = master_configuration.Item.ToCodeFirstItem<MasterConfig>(); 16 17 string ItemTypeId = mc.EcomConfiguration.ProductDetailConfigurationID; 18 19 int ProductOverviewLayoutID = Services.Pages.GetPageForItem("ProductOverviewConfigurationPage", ItemTypeId).ID; 20 int FooProductOverviewLayoutID = 0; 21 22 string minWidth = ""; 23 string maxWidth = ""; 24 } 25 26 @foreach (GridRow g in Services.Grids.GetGridRowsByPageId(ProductOverviewLayoutID)) 27 { 28 ProductOverviewPageBreakpointRow _data = ItemManager.Storage.GetById<ProductOverviewPageBreakpointRow>(g.ItemId.ToString()); 29 30 minWidth = _data.Device.minWidth != 0 ? " and (min-width: " + _data.Device.minWidth + "px)" : ""; 31 maxWidth = _data.Device.maxWidth != 0 ? " and (max-width: " + _data.Device.maxWidth + "px)" : ""; 32 33 FooProductOverviewLayoutID = Services.Pages.GetPageForItem("ProductOverviewPage", _data.ProductOverviewConfiguration.Id).ID; 34 35 <section class="productOverview productOverview--@g.ItemId.ToString()"> 36 @RenderGrid(FooProductOverviewLayoutID) 37 </section> 38 39 <style> 40 41 .productOverview { 42 display: none; 43 flex-direction: column; 44 } 45 46 @@media screen @minWidth @maxWidth { 47 .productOverview--@g.ItemId.ToString() { 48 display: flex; 49 } 50 } 51 52 </style> 53 54 } 55
To Top
Cookies

This website uses cookies to track your behavior and to improve your experience on the site.