Backpack
No. 1810
Error executing template "Designs/identity_v2/ecom/product/partials/prices.cshtml" System.NullReferenceException: Object reference not set to an instance of an object. at CompiledRazorTemplates.Dynamic.RazorEngine_e794a93948d545e3af59806b49ab9251.Execute() in D:\dynamicweb.net\Solutions\id.espresso4.dk-e5\Files\Templates\Designs\identity_v2\ecom\product\partials\prices.cshtml:line 16 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 @using Co3.Espresso.Base.Extensions 2 @using Co3.Espresso.Website.Models.FrontEnd.Settings 3 @using Co3.Espresso.Website.Services 4 @using Co3.ID.Dw.Helpers 5 @using Co3.ID.Dw.Models.Frontend.Ecommerce 6 @using Co3.ID.Dw.Models.Frontend.Users 7 @using Dynamicweb.Frontend 8 @using Dynamicweb.Security.UserManagement 9 @inherits Dynamicweb.Rendering.ViewModelTemplate<Co3.ID.Dw.Models.Frontend.Ecommerce.IdentityProduct> 10 11 @{ 12 ShopType shopContext = SiteContext.CurrentSiteContext(); 13 User currentUser = PageView.Current().User; 14 bool isCustomerShop = (PageView.Current().Area.Item["IsCustomerShop"] != null && (bool) PageView.Current().Area.Item["IsCustomerShop"] == true); 15 string discountGroup = currentUser != null ? currentUser.GetCustomFieldValue<string>("DiscountGroup") : string.Empty; 16 bool showPrices = !isCustomerShop || (isCustomerShop && UserContext.Current.CustomerShop.Settings.ShowPrices == true); 17 PriceDetails priceDetails = Model.PriceDetails; 18 } 19 20 @if (shopContext == ShopType.B2B && string.IsNullOrEmpty(discountGroup) == false && Model.ListPrices != null && Model.ListPrices.Any()) 21 { 22 <div class="mb-2 e-product-price "> 23 24 @if (SiteContext.ShowPrices()) 25 { 26 <span class="h2 text-primary mb-1"> 27 <span class="font-weight-bold js-e-price"> 28 @priceDetails.CurrentPrice.Formatted 29 </span> 30 </span> 31 <p class="text-muted small id-product-details-list-price mb-0"> 32 <span class="small"> 33 34 @Translate("Product Your Price - Text", "Din pris"): 35 <span > 36 <span class="font-weight-bold" style="text-decoration: line-through;">@priceDetails.BasePrice.Formatted</span> <span class="font-weight-bold text-primary"> - @priceDetails.DiscountPercentageFormatted</span> 37 </span> 38 39 </span> 40 </p> 41 42 if (!priceDetails.IsBasePriceFromAll) 43 { 44 <p class="text-muted small id-product-details-list-price mb-0"> 45 <span class="small"> 46 ( 47 @Translate("Product List Price - Text", "Listepris") 48 <span class="js-e-product-listprice"> 49 @PriceService.Instance.GetPrice(new PriceSettings() 50 { 51 Value = Model.ListPrices.FirstOrDefault()?.Amount 52 }) 53 </span> 54 ) 55 </span> 56 </p> 57 } 58 59 60 } 61 else 62 { 63 <span class="text-muted"> 64 @Translate("Product List Price - Text", "Listepris") 65 <span class="js-e-product-listprice"> 66 @PriceService.Instance.GetPrice(new PriceSettings() 67 { 68 Value = Model.ListPrices.FirstOrDefault()?.Amount 69 }) 70 </span> 71 </span> 72 } 73 </div> 74 } 75 76 77 @if (shopContext == ShopType.B2C) 78 { 79 <p class="e-product-price mb-1 mt-0"> 80 <span class="h2 font-weight-bold text-primary mr-1">@Model.Price.Format()</span> 81 <span class="font-family-headings font-weight-semibold small text-muted"> 82 <small>(@Model.PriceWithoutVat.Formatted @Translate("Ecom - Price without VAT - text", "ekskl. moms"))</small> 83 </span> 84 </p> 85 } 86 87 @if (shopContext == ShopType.CustomerShop) 88 { 89 <p class="e-product-price mb-1 mt-0 @(showPrices == false ? "hidden-price" : string.Empty)"> 90 <span class="h2 font-weight-bold text-primary">@Model.Price.Format()</span> 91 <span class="font-family-headings font-weight-semibold small text-muted"> 92 <small>(@Translate("Ecom - Price without VAT - text", "ekskl. moms"))</small> 93 </span> 94 </p> 95 }
Large main compartment with extra pocket. Front compartment with many practical pockets. Two side pockets, one with zipper. Smart pocket at the top. Strong padded back and shoulder...Show more
Large main compartment with extra pocket. Front compartment with many practical pockets. Two side pockets, one with zipper. Smart pocket at the top. Strong padded back and shoulder strap. Comfortable rubber handle. SBS zippers. 48 x 29 x 14 cm/ 18 L
ID® Ansvarlighedsrapport 2024/2025 Redegørelse for samfundsansvar, jf. årsregnskabslovens § 99 a". Se her