Brug for hjælp? (+45) 71 96 12 20 (Hverdage 9:00 — 15:00)

Error executing template "Designs/juuls/eCom7/CartV2/Step/espresso-checkout.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
at CompiledRazorTemplates.Dynamic.RazorEngine_4bbc7fb932e04a7a9b3d72320cc29e39.Execute() in E:\Dynamicweb.NET\Solutions\Co3\juuls.espresso4.dk\Espresso5Prod\Files\Templates\Designs\juuls\eCom7\CartV2\Step\espresso-checkout.cshtml:line 18
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 Co3.Espresso.Website.TemplateBases.Paragraphs.Module 2 @using System.Collections 3 @using Co3.Espresso.Website.Services 4 @using Co3.Juuls.Website.Frontend.Models.Frontend.Ecommerce 5 @using Co3.Juuls.Website.Frontend.Models.Frontend.Settings 6 @using Co3.Juuls.Website.Frontend.Services 7 @using Dynamicweb.Ecommerce.Common 8 @using Dynamicweb.Ecommerce.Orders 9 @using Dynamicweb.Frontend 10 @using Dynamicweb.Modules 11 @using Dynamicweb.Security.UserManagement 12 @using Namotion.Reflection 13 @using OrderService = Dynamicweb.Ecommerce.Orders.OrderService 14 15 @{ 16 bool isB2BCheckout = User.IsExtranetUserLoggedIn(); 17 18 JuulsOrder juulsOrder = JuulsOrderService.Instance.GetJuulsOrder(new JuulsOrderSettings() 19 { 20 OrderId = Context.Cart.Id 21 }); 22 23 24 25 } 26 27 <div class="row"> 28 <div class="col-12 mx-xl-auto"> 29 <div class="e-checkout js-e-checkout js-e-require"data-require="checkout" data-validate="true"> 30 <form class="e-checkout-form js-e-checkout-form" method="post" data-validate="true"> 31 <input class="js-e-checkout-shipping-id-gls" name="EspressoGlsShippingMethodId" type="hidden" value="@Espresso.Item.GlsShippingMethodId"> 32 <input class="js-e-checkout-shipping-id-postnord" name="EspressoPostnordShippingMethodId" type="hidden" value="@Espresso.Item.PostnordShippingMethodId"> 33 34 <div class="no-gutters row"> 35 <div class="col-12 col-lg-8 mb-2 mb-lg-0"> 36 <div class="e-checkout-main js-e-checkout-main"> 37 <div class="card shadow-none small"> 38 <div id="e-checkout-steps"> 39 @if (isB2BCheckout) 40 { 41 <div class="e-checkout-block-customer js-e-checkout-block-container" data-key="customer"> 42 @RenderingService.Instance.PartialView("eCom7/CartV2/Step/partials/b2b/part-customer.cshtml", juulsOrder) 43 </div> 44 <div class="e-checkout-block-shipping js-e-checkout-block-container" data-key="shipping"> 45 @RenderingService.Instance.PartialView("eCom7/CartV2/Step/partials/b2b/part-shipping.cshtml", juulsOrder) 46 </div> 47 <div class="e-checkout-block-payment js-e-checkout-block-container" data-key="payment"> 48 @RenderingService.Instance.PartialView("eCom7/CartV2/Step/partials/b2b/part-payment.cshtml", juulsOrder) 49 </div> 50 <div class="e-checkout-block-payment js-e-checkout-block-container" data-key="information"> 51 @RenderingService.Instance.PartialView("eCom7/CartV2/Step/partials/b2b/part-information.cshtml", juulsOrder) 52 </div> 53 } 54 else 55 { 56 <div class="e-checkout-block-customer js-e-checkout-block-container" data-key="customer"> 57 @RenderingService.Instance.PartialView("eCom7/CartV2/Step/partials/b2c/part-customer.cshtml", juulsOrder) 58 </div> 59 <div class="e-checkout-block-shipping js-e-checkout-block-container" data-key="shipping"> 60 @RenderingService.Instance.PartialView("eCom7/CartV2/Step/partials/b2c/part-shipping.cshtml", juulsOrder) 61 </div> 62 <div class="e-checkout-block-payment js-e-checkout-block-container" data-key="payment"> 63 @RenderingService.Instance.PartialView("eCom7/CartV2/Step/partials/b2c/part-payment.cshtml", juulsOrder) 64 </div> 65 } 66 </div> 67 </div> 68 </div> 69 <div class="e-loading-overlay js-e-loading-overlay"> 70 @RenderingService.Instance.PartialView("_partials/loading-spinner.cshtml") 71 </div> 72 </div> 73 74 <div class="col-12 col-lg-4 pl-lg-2"> 75 <div class="e-checkout-aside js-e-checkout-aside border"> 76 <div class="card small"> 77 <div class="card-header bg-white"> 78 <h3>@Translate("eCom Checkout - Your Order - Heading", "Your order")</h3> 79 </div> 80 <div class="card-body bg-white pt-0"> 81 <div class="js-e-cart-block-container" data-key="orderSummery"> 82 @RenderingService.Instance.PartialView("eCom7/CartV2/Step/partials/part-order-summery.cshtml", juulsOrder) 83 </div> 84 <hr> 85 <div class="e-checkout-block-approve-aside js-e-checkout-block-container" data-key="approve"> 86 @RenderingService.Instance.PartialView("eCom7/CartV2/Step/partials/part-approve.cshtml", juulsOrder) 87 </div> 88 <div class="js-e-cart-block-container" data-key="orderlineSummery"> 89 @RenderingService.Instance.PartialView("eCom7/CartV2/Step/partials/part-orderlines-summery.cshtml", juulsOrder) 90 </div> 91 </div> 92 </div> 93 </div> 94 <div class="e-loading-overlay js-e-loading-overlay"> 95 @RenderingService.Instance.PartialView("_partials/loading-spinner.cshtml") 96 </div> 97 </div> 98 </div> 99 <div class="no-gutters row part-approve-sticky"> 100 <div class="col-12 mb-2 mb-lg-0"> 101 <div class="e-checkout-block-approve js-e-checkout-block-container" data-key="approve"> 102 <div class="e-checkout-step-form border"> 103 <div class="form-group mr-auto checkout-back-link"> 104 <a class="btn btn-secondary px-4" href="/shop/cart"><i class="material-icons ml-1">west</i>@Translate( "eCom Checkout - Edit cart - link", "Edit cart" ) 105 </a> 106 </div> 107 <div class="form-group"> 108 <div class="form-check m-0"> 109 <label class="form-check-label e-checkout-customer-accept-label" for="EcomOrderCustomerAccepted2"> 110 <input class="form-check-input js-e-checkout-customer-accept mr-1 required" id="EcomOrderCustomerAccepted2" name="EcomOrderCustomerAccepted2" type="checkbox" value="1"> @Translate("eCom Checkout Approve - Customer Accept - Text", "I accept the") <a data-target=".modal.e-checkout-modal-term-and-conditions" data-toggle="modal" tabindex> @Translate("eCom Checkout Approve - Customer Accept - Link", "terms and conditions")</a> 111 </label> 112 </div> 113 </div> 114 <div class="form-group mb-0"> 115 <button type="submit" name="CartV2.GotoStep1" class="btn btn-success btn-block arrow-right e-checkout-next-step px-4">@Translate("eCom Checkout Approve - Next - Button", "Checkout") <i class="material-icons ml-1">east</i></button> 116 </div> 117 </div> 118 </div> 119 </div> 120 </div> 121 </form> 122123 @* <!-- MODALS --> *@ 124 @RenderingService.Instance.PartialView("eCom7/CartV2/Step/partials/part-terms-and-conditions-modal.cshtml") 125 @RenderingService.Instance.PartialView("eCom7/CartV2/Step/partials/part-opening-hours-modal.cshtml") 126127128 </div> 129 </div> 130 </div> 131132 <script> 133 var objVirtualPageview = { 134 'event': 'VirtualPageview', 135 'vpevent': 'VirtualPageview', 136 'virtualPageURL': '/shop/cart/checkout?step=1 Checkout', 137 'virtualPageTitle': 'Order Step 1 Checkout' 138 }, 139 objCheckout = { 140 'event': 'checkout', 141 'ecommerce': { 142 'checkout': { 143 'actionField': { 144 'step': 1 145 } 146 } 147 } 148 }; 149 if ( window.dataLayer !== undefined ) { 150 window.dataLayer.push( objVirtualPageview ); 151 window.dataLayer.push( objCheckout ); 152 } 153154 </script>