• Veganski
  • Za profesionalce iz sveta lepote
  • Naručite do 12h, isporučujemo sledećeg radnog dana
Error executing template "Designs/ProNails_generated/eCom/ProductCatalog/pdp_config.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
   at CompiledRazorTemplates.Dynamic.RazorEngine_ca32c2e15df24427840fbfb08e32f285.Execute() in D:\dynamicweb.net\Solutions\Bluedesk\pronails.cloud.dynamicweb-cms.com\files\Templates\Designs\ProNails_generated\eCom\ProductCatalog\pdp_config.cshtml:line 21
   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<ProductViewModel> 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.Configuration; 10 @using Bluedesk.DynamicWeb.ItemTypes.Settings.Configuration; 11 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution 12 13 14 @{ 15 16 var master_configuration = Services.Pages.GetPageByNavigationTag(Pageview.AreaID, "MasterConfiguration"); 17 MasterConfig mc = master_configuration.Item.ToCodeFirstItem<MasterConfig>(); 18 19 string ItemTypeId = mc.EcomConfiguration.ProductDetailConfigurationID; 20 21 int ProductDetailLayoutID = Services.Pages.GetPageForItem("ProductDetailConfigurationPage", ItemTypeId).ID; 22 int FooProductDetailLayoutID = 0; 23 24 string minWidth = ""; 25 string maxWidth = ""; 26 } 27 28 @foreach (GridRow g in Services.Grids.GetGridRowsByPageId(ProductDetailLayoutID)) 29 { 30 31 ProductDetailPageBreakpointRow _data = ItemManager.Storage.GetById<ProductDetailPageBreakpointRow>(g.ItemId.ToString()); 32 33 minWidth = _data.Device.minWidth != 0 ? " and (min-width: " + _data.Device.minWidth + "px)" : ""; 34 maxWidth = _data.Device.maxWidth != 0 ? " and (max-width: " + _data.Device.maxWidth + "px)" : ""; 35 36 FooProductDetailLayoutID = Services.Pages.GetPageForItem("ProductDetailPage", _data.ProductDetailConfiguration.Id).ID; 37 38 <section class="productDetail productDetail--@g.ItemId.ToString()"> 39 @RenderGrid(FooProductDetailLayoutID) 40 </section> 41 42 <style> 43 44 .productDetail--@g.ItemId.ToString() { 45 display: none; 46 } 47 48 @@media screen @minWidth @maxWidth { 49 .productDetail--@g.ItemId.ToString() { 50 display: flex; 51 flex-direction: column; 52 } 53 } 54 55 </style> 56 57 } 58
To Top
Cookies

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