Error executing template "eCom/Productlist/ProductList.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()

1
Frostgaranti

Testet af det Skandinaviske klima

Vores tagsten er hårdtbrændte og ekstremt formfaste, så de modstår selv den hårdeste vinterkulde. Det kalder vi frostgaranti.

Tagstensgaranti
Testet af det
Skandinaviske klima.
Nyt tag

Den store guide til nyt tag

Et nyt tag er en stor investering, og det er derfor en beslutning, der skal træffes på det rigtige grundlag. Hvilket tag passer til dit hus, hvilke materialer skal du vælge, og hvordan sikrer du dig, at du overholder de gældende love og regler?

For at gøre processen mere overskuelig for dig, der planlægger at skifte tag på din bolig, har vi sammensat "Den store tagguide."

Se guiden til nyt tag
Den store guide til nyt tag.
Error executing template "Designs/randers-tegl/eCom7/CartV2/Step/sample-cart.roof.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
   at CompiledRazorTemplates.Dynamic.RazorEngine_7fced9d3347b48ce87292ba1441b1877.Execute() in D:\dynamicweb.net\Solutions\Gotcha\randerstegl.cloud.dynamicweb-cms.com\files\Templates\Designs\randers-tegl\eCom7\CartV2\Step\sample-cart.roof.cshtml:line 3
   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 @{ 2 int orderlineCount = GetInteger("Ecom:Order.OrderLines.Count"); 3 var sampleIsInCart = System.Web.HttpContext.Current.Items["CurrentSampleInCart"].ToString().ToLower(); 4 } 5 6 @SnippetStart("ProductSampleCart") 7 @if (orderlineCount > 0) { 8 string cssClass = sampleIsInCart == "true" ? "product-cta__cart product-cta__cart--tease" : "product-cta__cart"; 9 10 <a href="/Default.aspx?Id=7921" class="@cssClass" data-orderline-count="@orderlineCount"><span class="product-cta__cart-text">@Translate("Translate_Your-cart")</span> 11 @if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images/icon-sample-cart.svg"))) { 12 <span class="icon icon-sample-cart"> 13 @System.IO.File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath("/Files/Templates/Designs/randers-tegl/images/icon-sample-cart.svg")) 14 <span class="product-cta__cart-count">@orderlineCount</span></span> 15 } 16 </a> 17 } 18 @SnippetEnd("ProductSampleCart") 19 20 <script> 21 const cartTeaserText = document.querySelector('.product-cta__cart--tease .product-cta__cart-text'); 22 23 function stopTeasing(e) { 24 const cart = e.currentTarget; 25 26 if (cart) { 27 cartTeaserText.closest('.product-cta__cart--tease').classList.remove('product-cta__cart--tease'); 28 cartTeaserText.removeEventListener('transitionend', stopTeasing); 29 } 30 } 31 32 if (cartTeaserText) { 33 cartTeaserText.addEventListener('transitionend', stopTeasing); 34 } 35 </script> 36