Error executing template "Designs/IBH/_parsed/SidebarLeft.parsed.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
   at CompiledRazorTemplates.Dynamic.RazorEngine_78bf96fe98bb450b9046cb9244c44223.Execute() in E:\Solutions\IBH\Web\Live\Files\Templates\Designs\IBH\_parsed\SidebarLeft.parsed.cshtml:line 74
   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.b__0(TextWriter writer)
   at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()

1 @using Dynamicweb 2 @using Dynamicweb.Content 3 @using Dynamicweb.Ecommerce.Common; 4 @using Dynamicweb.Ecommerce.Orders 5 @using Dynamicweb.Ecommerce.Prices 6 @using Dynamicweb.Frontend; 7 @using StandardWebshop.CustomCode.Razor; 8 @using NORRIQ.Common8.Factory 9 @using NORRIQ.Common8.Caching 10 @using Page = System.Web.UI.Page 11 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 12 @{ 13 var navigationTag = Pageview.Page.NavigationTag.ToString(); 14 string canonical = null; 15 string canonicalBase = string.Format("{0}://{1}", System.Web.HttpContext.Current.Request.Url.Scheme, System.Web.HttpContext.Current.Request.Url.Host); 16 if (System.Web.HttpContext.Current.Response.StatusCode == 200) 17 { 18 canonical = Pageview.Page.NavigationTag.Contains("home") ? 19 canonicalBase + "/" 20 : canonicalBase + (Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(System.Web.HttpContext.Current.Request.Url.PathAndQuery.TrimStart('/')) ?? "").Split('?')[0]; 21 } 22 } 23 <!DOCTYPE html> 24 <html lang="@Pageview.Area.Culture"> 25 <head> 26 <title>@Model.Title</title> 27 @if (Model.Area.Item.GetBoolean("NoIndex")) 28 { 29 <meta name="robots" content="noindex, nofollow" /> 30 <!-- TODO: remove on launch--> 31 } 32 <meta charset='utf-8' /> 33 <meta name="description" content="@Model.Description" /> 34 <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=yes, shrink-to-fit=no" /> 35 <meta http-equiv="x-ua-compatible" content="ie=edge"> 36 <link rel="shortcut icon" href="/Files/dist/images/favicon.ico"> 37 <link rel="apple-touch-icon" href="/Files/dist/images/ibh-appleicon.png"> 38 <link rel="preload" href="/Files/dist/fonts/BerlingLTStd-Roman.woff" as="font" crossorigin> 39 <link href="@NORRIQ.Common8.Razor.TimestampSource.GetSourceWithTimestamp("/Files/dist/css/master-min.css")" rel="stylesheet" /> 40 @*Canonical, assuming all url's have friendly names :) *@ 41 @if (!string.IsNullOrEmpty(canonical)) 42 { 43 <link rel="canonical" href="@System.Web.HttpUtility.HtmlAttributeEncode(canonical)" /> 44 } 45 </head> 46 <body class="@Pageview.Item.SystemName.ToString().ToLower() @(navigationTag.Contains("checkout") ? "not-fixed" : "fixed")" id="top"> 47 @if (!String.IsNullOrEmpty(Model.Area.Item.GetString("GoogleTagManager"))) 48 { 49 <!-- Google Tag Manager (noscript) --> 50 var gtmid = Model.Area.Item.GetString("GoogleTagManager"); 51 <noscript> 52 <iframe src="https://www.googletagmanager.com/ns.html?id=@gtmid" 53 height="0" width="0" style="display:none;visibility:hidden"></iframe> 54 </noscript> 55 <!-- End Google Tag Manager (noscript) --> 56 } 57 <div class="overlay"></div> 58 @if (navigationTag.Contains("checkout")) 59 { 60 @HeaderCheckout() 61 } 62 else 63 { 64 @HeaderDefault() 65 } 66 <main class="@(navigationTag.Contains("checkout") ? "main-checkout" : "main-pages")"> 67 @using Dynamicweb.Frontend; 68 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 69 @using NORRIQ.Common8.Caching 70 @using StandardWebshop.CustomCode.Razor 71 72 @Title("Stadard Page") 73 @Description("Template with boxed layout and a sidebar") 74 @if (!String.IsNullOrEmpty(Model.Item.GetString("TopImageText")) && !String.IsNullOrEmpty(Model.Item.GetValue<ListViewModel>("TopStyle").SelectedValue) ) 75 { 76 var backgroundImage = Model.Item.GetFile("TopImage") != null ? " style=\"background-image:url(" + Model.Item.GetFile("TopImage").Path + ");\"" : ""; 77 78 <section class="top-banner @(Model.Item.GetValue<ListViewModel>("TopStyle").SelectedValue) @(Model.Item.GetBoolean("BrandPage") ? "top-banner-brand" : "top-banner-default")"@backgroundImage> 79 <div class="container"> 80 @Model.Item.GetString("TopImageText") 81 </div> 82 </section> 83 } 84 <div class="container @(Model.Item.GetBoolean("BrandPage") ? "brand-page" : "default-page")"> 85 @if (!Model.Item.GetBoolean("HideBreadcrumb")) 86 { 87 @DwCaching.CacheByPage("breadcrumb.xslt", () => RenderNavigation(new { Template = "Breadcrumb.xslt", Expandmode = "all", StartLevel = 1, EndLevel = 5 })) 88 } 89 @if (Model.Item.GetBoolean("EcomPage")) 90 { 91 @SnippetStart("PageHead")@RenderPageHead()@SnippetEnd("PageHead") 92 93 @RenderContent() 94 95 @SnippetStart("Navigation") 96 if (!Model.Item.GetBoolean("HideNavigation")) 97 { 98 if (!Model.Item.GetBoolean("BrandPage")) 99 { 100 @DwCaching.CacheByPage("sidebar.xslt", () => RenderNavigation(new { Template = "Sidebar.xslt", Expandmode = "all", StartLevel = 1, EndLevel = 3 })) 101 } 102 } 103 @SnippetEnd("Navigation") 104 @SnippetStart("Sidebar")@RenderSidebar()@SnippetEnd("Sidebar") 105 } 106 else 107 { 108 if (Model.Item.GetBoolean("BoxedPage")) 109 { 110 111 @RenderPageHead() 112 @RenderContent() 113 } 114 else 115 { 116 <div class="row"> 117 <div class="col-12 col-lg-3 section-sidebar"> 118 @if (!Model.Item.GetBoolean("HideNavigation")) 119 { 120 if (!Model.Item.GetBoolean("BrandPage")) 121 { 122 @DwCaching.CacheByPage("sidebar.xslt", () => RenderNavigation(new { Template = "Sidebar.xslt", Expandmode = "all", StartLevel = 1, EndLevel = 3 })) 123 } 124 } 125 @RenderSidebar() 126 </div> 127 <div class="col-12 col-lg-9 section-content"> 128 @RenderPageHead() 129 @RenderContent() 130 </div> 131 </div> 132 } 133 } 134 </div> 135 @RenderContentBottom() 136 137 @helper RenderContent() 138 { 139 if (!String.IsNullOrEmpty(Model.Placeholder("contentcontainer"))) 140 { 141 <div class="row"> 142 @Model.Placeholder("contentcontainer", "Content Default", "unwrap:true;default:true") 143 </div> 144 } 145 } 146 @helper RenderSidebar() 147 { 148 if (!String.IsNullOrEmpty(Model.Placeholder("row03"))) 149 { 150 <div class="row"> 151 @Model.Placeholder("row03", "Sidebar", "unwrap:true;") 152 </div> 153 154 } 155 } 156 @helper RenderContentBottom() 157 { 158 if (!String.IsNullOrEmpty(Model.Placeholder("row02"))) 159 { 160 @Model.Placeholder("row02", "Content Bottom", "unwrap:true;") 161 162 } 163 } 164 165 @helper RenderPageHead() 166 { 167 if (Model.Item.GetFile("Image") != null) 168 { 169 <div class="page-image"> 170 <picture> 171 <img src="@Pageview.CdnWrap(string.Format("/Admin/Public/GetImage.ashx?Image={0}&amp;Width=1600&amp;Crop=5&amp;Compression=90", Model.Item.GetFile("Image").Path))" 172 alt="@(!String.IsNullOrEmpty(Model.Item.GetString("ImageText")) ? Model.Item.GetString("ImageText") : Model.Item.GetString("Title"))" 173 class="img-fluid" /> 174 </picture> 175 </div> 176 } 177 178 if (!String.IsNullOrEmpty(Model.Item.GetString("Text")) || !Model.Item.GetBoolean("HideTitle")) 179 { 180 <div class="page-text"> 181 @if (!Model.Item.GetBoolean("HideTitle")) 182 { 183 <h1> 184 @Model.Item.GetString("Title") 185 </h1> 186 } 187 @if (!String.IsNullOrEmpty(Model.Item.GetString("Text"))) 188 { 189 @Model.Item.GetString("Text") 190 } 191 </div> 192 } 193 } 194 </main> 195 <footer class="footer"> 196 @if (navigationTag.Contains("checkout")) 197 { 198 @FooterSub() 199 } 200 else 201 { 202 @FooterMain() 203 @FooterSub() 204 } 205 </footer> 206 <script src="@NORRIQ.Common8.Razor.TimestampSource.GetSourceWithTimestamp("/files/dist/scripts/bundle.min.js")" data-category-consent="cookie_cat_necessary"></script> 207 @{ 208 var locale = Pageview.Area.Culture.Split('-').FirstOrDefault() ?? ""; 209 } 210 <script> 211 $(document).ready(function() { 212 var jqueryValidatelocalization = new AppStart.JqueryValidateLocalizationManager(); 213 jqueryValidatelocalization.LoadLocale("@locale.ToUpper()"); 214 }); 215 </script> 216 @{ 217 var websiteScript = DwCaching.CacheByArea("website_scripts", () => 218 { 219 object scriptObj = null; 220 return Pageview.Area.Item.TryGetValue("Scripts", ref scriptObj) ? scriptObj.ToString() : null; 221 }); 222 } 223 @if (!string.IsNullOrWhiteSpace(websiteScript)) 224 { 225 @websiteScript 226 } 227 228 <script append="replace"></script> 229 <script> 230 // This is used for testing cloudflare 231 console.log('@(DateTime.Now.ToString("s"))'); 232 </script> 233 </body> 234 </html> 235 236 @helper FooterLinkItem(ItemViewModel item) 237 { 238 if (!String.IsNullOrEmpty(item.GetString("Link"))) 239 { 240 <a href="@item.GetString("Link")"> 241 @item.GetString("Label") 242 </a> 243 } 244 else 245 { 246 <span> 247 @item.GetString("Label") 248 </span> 249 } 250 } 251 @helper FooterMain() 252 { 253 var topLinks = Model.Area.Item.GetItemsCached("TopLinks"); 254 if (topLinks.Any()) 255 { 256 <div class="footer-top"> 257 <div class="container"> 258 <ul class="nav-foot"> 259 @foreach (var link in topLinks) 260 { 261 <li class="nav-foot-item"> 262 @FooterLinkItem(link) 263 </li> 264 } 265 <li class="nav-foot-item"> 266 <a href="#top"> 267 @Translate("Scroll top", "Til toppen") 268 </a> 269 </li> 270 </ul> 271 </div> 272 </div> 273 } 274 <div class="footer-main"> 275 <div class="container"> 276 <div class="row"> 277 <div class="col-12 col-md-4 col-lg-2"> 278 @if (!String.IsNullOrEmpty(Model.Area.Item.GetString("ColumnOneTitle"))) 279 { 280 var columnOneLinks = Model.Area.Item.GetItemsCached("ColumnOneLinks"); 281 if (columnOneLinks.Any()) 282 { 283 <div class="footer-box"> 284 <div class="footer-heading"> 285 <a role="button" href="#col-1-links" data-toggle="collapse" aria-expanded="false" aria-controls="col-1-links" class="footer-title"> 286 @Model.Area.Item.GetString("ColumnOneTitle") 287 </a> 288 </div> 289 <nav class="collapse collapse-foot" id="col-1-links"> 290 <ul class="nav-foot"> 291 @foreach (var link in columnOneLinks) 292 { 293 <li class="nav-foot-item"> 294 @FooterLinkItem(link) 295 </li> 296 } 297 </ul> 298 </nav> 299 </div> 300 } 301 302 } 303 </div> 304 <div class="col-0 col-lg-2"></div> 305 <div class="col-12 col-md-4 col-lg-2"> 306 @if (!String.IsNullOrEmpty(Model.Area.Item.GetString("ColumnTwoTitle"))) 307 { 308 var columnTwoLinks = Model.Area.Item.GetItemsCached("ColumnTwoLinks"); 309 if (columnTwoLinks.Any()) 310 { 311 <div class="footer-box"> 312 <div> 313 <a role="button" href="#col-2-links" data-toggle="collapse" aria-expanded="false" aria-controls="col-2-links" class="footer-title"> 314 @Model.Area.Item.GetString("ColumnTwoTitle") 315 </a> 316 </div> 317 <nav class="collapse collapse-foot" id="col-2-links"> 318 <ul class="nav-foot"> 319 @foreach (var link in columnTwoLinks) 320 { 321 <li class="nav-foot-item"> 322 @FooterLinkItem(link) 323 </li> 324 } 325 </ul> 326 </nav> 327 </div> 328 } 329 330 } 331 </div> 332 <div class="col-0 col-lg-2"></div> 333 <div class="col-12 col-md-4 col-lg-2"> 334 @if (!String.IsNullOrEmpty(Model.Area.Item.GetString("ContactTitle"))) 335 { 336 <div class="footer-box footer-contact"> 337 <div> 338 <a role="button" 339 href="#foot-contact" 340 class="footer-title" 341 data-toggle="collapse" 342 aria-expanded="false" 343 aria-controls="foot-contact"> 344 @Model.Area.Item.GetString("ContactTitle") 345 </a> 346 </div> 347 @if (!String.IsNullOrEmpty(Model.Area.Item.GetString("ContactPhone")) || !String.IsNullOrEmpty(Model.Area.Item.GetString("ContactEmail"))) 348 { 349 <div class="collapse collapse-foot" id="foot-contact"> 350 @if (!String.IsNullOrEmpty(Model.Area.Item.GetString("ContactPhone"))) 351 { 352 <p>@Model.Area.Item.GetString("ContactPhone")</p> 353 } 354 @if (!String.IsNullOrEmpty(Model.Area.Item.GetString("ContactEmail"))) 355 { 356 <p> 357 <a href="mailto:@Model.Area.Item.GetString("ContactEmail")"> 358 @Model.Area.Item.GetString("ContactEmail") 359 </a> 360 </p> 361 } 362 </div> 363 } 364 </div> 365 } 366 @if (!String.IsNullOrEmpty(Model.Area.Item.GetString("FindUsTitle"))) 367 { 368 <div class="footer-box footer-shops"> 369 <div class="footer-heading"> 370 <a role="button" 371 href="#foot-shops" 372 class="footer-title" 373 data-toggle="collapse" 374 aria-expanded="false" 375 aria-controls="foot-shops"> 376 @Model.Area.Item.GetString("FindUsTitle") 377 </a> 378 </div> 379 <div class="collapse collapse-foot" id="foot-shops"> 380 <p> 381 @if (!String.IsNullOrEmpty(Model.Area.Item.GetString("FindUsStoreName"))) 382 { 383 @Model.Area.Item.GetString("FindUsStoreName")<br /> 384 } 385 @if (!String.IsNullOrEmpty(Model.Area.Item.GetString("FindUsStoreAddress"))) 386 { 387 @Model.Area.Item.GetString("FindUsStoreAddress")<br /> 388 } 389 @if (!String.IsNullOrEmpty(Model.Area.Item.GetString("FindUsStoreCity"))) 390 { 391 @Model.Area.Item.GetString("FindUsStoreCity") 392 } 393 </p> 394 @if (!String.IsNullOrEmpty(Model.Area.Item.GetString("FindUsLink")) && !String.IsNullOrEmpty(Model.Area.Item.GetString("FindUsLinkLabel"))) 395 { 396 <p> 397 <a href="@Model.Area.Item.GetString("FindUsLink")"> 398 @Model.Area.Item.GetString("FindUsLinkLabel") 399 </a> 400 </p> 401 } 402 </div> 403 </div> 404 } 405 @if (!String.IsNullOrEmpty(Model.Area.Item.GetString("FollowUsTitle")) && !String.IsNullOrEmpty(Model.Area.Item.GetString("InstagramLink")) || !String.IsNullOrEmpty(Model.Area.Item.GetString("FacebookLink"))) 406 { 407 <div class="footer-box footer-social"> 408 <p class="footer-title"> 409 @Model.Area.Item.GetString("FollowUsTitle") 410 </p> 411 412 @if (!String.IsNullOrEmpty(Model.Area.Item.GetString("FacebookLink"))) 413 { 414 <p> 415 <a href="@Model.Area.Item.GetString("FacebookLink")"> 416 <svg class="icon icon-sm"> 417 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/Files/dist/icons/icons.svg#facebook"></use> 418 </svg> 419 @if (!String.IsNullOrEmpty(Model.Area.Item.GetString("FacebookLabel"))) 420 { 421 <span> 422 @Model.Area.Item.GetString("FacebookLabel") 423 </span> 424 } 425 </a> 426 </p> 427 } 428 @if (!String.IsNullOrEmpty(Model.Area.Item.GetString("InstagramLink"))) 429 { 430 <p> 431 <a href="@Model.Area.Item.GetString("InstagramLink")"> 432 <svg class="icon icon-sm"> 433 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/Files/dist/icons/icons.svg#instagram"></use> 434 </svg> 435 @if (!String.IsNullOrEmpty(Model.Area.Item.GetString("InstagramLabel"))) 436 { 437 <span> 438 @Model.Area.Item.GetString("InstagramLabel") 439 </span> 440 } 441 </a> 442 </p> 443 } 444 </div> 445 } 446 @if (!String.IsNullOrEmpty(Model.Area.Item.GetString("KlarnaLogo"))) 447 { 448 <p> 449 @if (!String.IsNullOrEmpty(Model.Area.Item.GetString("KlarnaLink"))) 450 { 451 <a href="@Model.Area.Item.GetString("KlarnaLink")" target="_blank"> 452 <img src="@Model.Area.Item.GetFile("KlarnaLogo").Path" alt="Klarna" class="img-fluid"/> 453 </a> 454 } 455 else 456 { 457 <img src="@Model.Area.Item.GetFile("KlarnaLogo").Path" alt="Klarna" class="img-fluid"/> 458 } 459 </p> 460 } 461 </div> 462 <div class="col-12"> 463 <div class="footer-box footer-logo"> 464 @if (Model.Area.Item.GetFile("Logo") != null) 465 { 466 <img src="@Pageview.CdnWrap(string.Format("/Admin/Public/GetImage.ashx?Image={0}&amp;Width=300&amp;Compression=90", Model.Area.Item.GetFile("Logo").Path))" alt="Illums Bolighus A/S" class="img-fluid" /> 467 } 468 else 469 { 470 <span>@Translate("No logo defined in website properties!!!")</span> 471 } 472 </div> 473 </div> 474 </div> 475 </div> 476 </div> 477 } 478 479 @helper FooterSub() 480 { 481 var subLinks = Model.Area.Item.GetItemsCached("SubLinks"); 482 if (subLinks.Any()) 483 { 484 <div class="footer-sub"> 485 <div class="container"> 486 <ul class="nav-foot"> 487 @foreach (var link in subLinks) 488 { 489 <li class="nav-foot-item"> 490 @FooterLinkItem(link) 491 </li> 492 } 493 </ul> 494 </div> 495 </div> 496 } 497 } 498 499 @helper HeaderDefault() 500 { 501 502 var currency = Dynamicweb.Ecommerce.Common.Context.Currency.Code; 503 <header class="header"> 504 <div class="header-top"> 505 @{ var uspList = Model.Area.Item.GetItemsCached("USPList");} 506 @if (uspList.Any()) 507 { 508 <div class="header-usp" data-slick='{"slidesToShow": 1, "slidesToScroll": 1, "dots": false, "arrows": false, "autoplay": true, "autoplaySpeed": 5000, "speed": 1000,"fade": true, "infinite": true, "adaptiveHeight":false}'> 509 @foreach (var usp in uspList) 510 { 511 <div class="header-usp-item"> 512 513 @if (!String.IsNullOrEmpty(usp.GetString("Link"))) 514 { 515 <a href="@usp.GetString("Link")" class="header-usp-link"> 516 @usp.GetString("Title") 517 </a> 518 } 519 else 520 { 521 <span class="header-usp-label"> 522 @usp.GetString("Title") 523 </span> 524 } 525 </div> 526 } 527 </div> 528 } 529 </div> 530 <div class="header-main"> 531 <div class="header-left"> 532 <div class="btn-toggle btn-toggle-menu" data-target="#navigation"> 533 <span></span> 534 <span></span> 535 <span></span> 536 </div> 537 </div> 538 <div class="header-logo"> 539 <a href="/" title="@Translate("logo_title", "Til forsiden")"> 540 @if (Model.Area.Item.GetFile("Logo") != null) 541 { 542 <img src="@Pageview.CdnWrap(string.Format("/Admin/Public/GetImage.ashx?Image={0}&amp;Width=300&amp;Crop=5&amp;Compression=90", Model.Area.Item.GetFile("Logo").Path))" alt="Illums Bolighus A/S" class="img-fluid" /> 543 } 544 else 545 { 546 <span>@Translate("No logo defined in website properties!!!")</span> 547 } 548 </a> 549 </div> 550 <div class="header-right"> 551 <div class="header-search" id="searchbar"> 552 <div class="instantsearch" id="instantsearch"> 553 <form class="form-search " id="search-form" method="get" action="@SearchEngineFriendlyURLs.GetFriendlyUrl(GetPageIdByNavigationTag("search"))"> 554 <label for="searchTerm2">@Translate("Search", "Søg")</label> 555 <input type="search" class="form-control" id="searchTerm2" name="eComQuery" autocomplete="off" placeholder="@Translate("Searchlabel", "Varesøgning")" /> 556 <button type="submit" role="button" class="btn btn-search" name="@Translate("Search", "Søg")"> 557 <svg class="icon icon-xs"> 558 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/Files/dist/icons/icons.svg#search"></use> 559 </svg> 560 </button> 561 </form> 562 </div> 563 </div> 564 <div class="header-mini"> 565 <div class="btn-toggle" data-target="#minicart"> 566 <svg class="icon"> 567 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/Files/dist/icons/icons.svg#shopping"></use> 568 </svg> 569 <span data-bind="text: Quantity" class="header-mini-qty" style="display: none;"> 570 0 571 </span> 572 </div> 573 <div class="header-cart header-toggle" id="minicart"> 574 <div class="header-cart-head"> 575 <span>@Translate("Shoppingcart", "Indkøbskurv")</span> 576 </div> 577 <div class="header-cart-inner loaded"> 578 @*TODO: SIN - Remove/Add loaded to show spinner instead of orderlines*@ 579 <div class="cart-summary-loader"> 580 <span class="loader loading"></span> 581 <span>@Translate("Loading orderlines", "Henter ordrelinjer...")</span> 582 </div> 583 <div data-bind="foreach: OrderLines" class="cart-summary-products"> 584 @*Products: LineType === 0, Discount: LineType === 3*@ 585 <div class="cart-summary-item" data-bind="if:LineType === 0"> 586 <figure class="cart-summary-thumb"> 587 <a data-bind="attr: {href: OrderProduct.ProductLink}, visible: OrderProduct.ProductImage" href="#"> 588 <img data-bind="attr: { src: OrderProduct.ProductImage, alt: OrderProduct.Name }" src="" alt="@Translate("Tomt billede", "Tomt billede")" /> 589 </a> 590 </figure> 591 <div class="cart-summary-product"> 592 <div class="cart-summary-head"> 593 <span data-bind="text: OrderProduct.ProductBrand" class="cart-summary-brand"></span> 594 </div> 595 <div class="cart-summary-body"> 596 <span class="cart-summary-info"> 597 <a data-bind="attr: {href: OrderProduct.ProductLink}" href="#" class="cart-summary-name"><span data-bind="text: OrderProduct.Name"></span></a> 598 <span class="cart-summary-sku"> 599 <span>@Translate("Product ID", "Varenummer"):</span> 600 <span data-bind="text: OrderProduct.ProductNumber"></span> 601 </span> 602 </span> 603 604 <span class="cart-summary-data"> 605 <span class="cart-summary-qty"> 606 <span>@Translate("Number", "Antal"):</span> 607 <span data-bind="text: Quantity">1</span> 608 </span> 609 <span class="cart-summary-price"> 610 <span>@Translate("Price", "Pris"):</span> 611 <span data-bind="text: LinePrice">1.050.00 DKK</span> 612 <span>@currency</span> 613 </span> 614 </span> 615 </div> 616 </div> 617 618 </div> 619 <div class="cart-summary-discount" data-bind="if:LineType === 3"> 620 <span data-bind="text: OrderProduct.Name"></span> <span data-bind="text: LinePrice"></span> <span>@currency</span> 621 </div> 622 </div> 623 <div class="cart-summary-total"> 624 <span class="cart-summary-totalprice"> 625 <span>@Translate("Total price without VAT", "Pris ekskl. moms")</span> 626 <span data-bind="text: TotalPriceWithoutVAT">1.239,20 DKK</span> 627 <span>@currency</span> 628 </span> 629 <span class="cart-summary-totalprice"> 630 <span>@Translate("Total price with VAT", "Pris i alt")</span> 631 <span data-bind="text: TotalPriceWithVAT"></span> 632 <span>@currency</span> 633 </span> 634 </div> 635 </div> 636 <div class="header-cart-foot"> 637 <a href="@NORRIQ.Common8.Razor.Navigation.GetUrlByNavigationTag("cart")" class="btn btn-outline-dark"> 638 @Translate("Show cart", "Vis kurv") 639 </a> 640 <a href="@NORRIQ.Common8.Razor.Navigation.GetUrlByNavigationTag("checkout")" class="btn btn-secondary"> 641 @Translate("Checkout", "Checkout") 642 </a> 643 </div> 644 </div> 645 </div> 646 </div> 647 </div> 648 <nav class="header-nav header-toggle" id="navigation"> 649 <div class="nav-overflow"> 650 @{var languages = Model.Area.Item.GetItemsCached("Languages");} 651 @if (languages.Any()) 652 { 653 <ul class="nav-lang"> 654 @foreach (var lang in languages) 655 { 656 var activeLang = Pageview.Area.Culture.ToLower().Contains(lang.GetString("Title").ToLower()) ? " active" : ""; 657 <li class="nav-lang-item"> 658 <a href="@lang.GetString("Link")" class="nav-lang-link@(activeLang)"> 659 @lang.GetString("Title") 660 </a> 661 </li> 662 } 663 </ul> 664 } 665 666 <ul class="nav-icon"> 667 <li class="nav-icon-item"> 668 <a href="@NORRIQ.Common8.Razor.Navigation.GetUrlByNavigationTag("findstore")" class="nav-icon-link"> 669 <svg class="icon"> 670 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/Files/dist/icons/icons.svg#map-marker"></use> 671 </svg> 672 <span> 673 @Translate("FindStore", "Find butik") 674 </span> 675 </a> 676 </li> 677 <li class="nav-icon-item nav-icon-user dropdown"> 678 <a href="javascript:void()" class="nav-icon-link"> 679 <svg class="icon"> 680 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/Files/dist/icons/icons.svg#account"></use> 681 </svg> 682 @*Label not logged in*@ 683 <span id="loggedOutName" class="nav-icon-label" style="display: none;"> 684 @Translate("Login", "Log ind") 685 </span> 686 <span id="loggedInName" data-bind="text: UserName" class="nav-icon-label" style="display: none;"> 687 </span> 688 </a> 689 <form class="form" data-action="submitLogin" id="loginForm" name="loginForm"> 690 <div class="dropdown-menu"> 691 @*Dropdown not logged in*@ 692 <div id="notLoggedInMenu" class="dropdown-menu-inner "> 693 <div class="form-group"> 694 <label for="Username">@Translate("usernameLabel", "Brugernavn")</label> 695 <input id="Username" name="Username" type="text" value="" class="form-control" required> 696 </div> 697 <div class="form-group"> 698 <label for="Password">@Translate("password", "Adgangskode")</label> 699 <input id="Password" name="Password" type="password" value="" class="form-control" required> 700 </div> 701 <div id="loginFeedback" style="display: none;" class="loginFeedback"> 702 <p class="alert alert-warning"> 703 @Translate("Cart Login Error", "Har du glemt dit brugernavn eller adgangskode?") 704 <a href="@NORRIQ.Common8.Razor.Navigation.GetUriByNavigationTag("forgot-password")">@Translate("Cart Login Error Label", " Så klik her")</a> 705 </p> 706 </div> 707 <button type="submit" role="button" class="btn btn-primary btn-block"> 708 <span data-bind="ifnot: $root.loggingIn"> 709 <span class="login-btn-label">@Translate("buttonLogin", "Log ind")</span> 710 </span> 711 <span data-bind="if: $root.loggingIn, attr: { 'style': 'display:flex' }" style="display: none;"> 712 <span class="loader loader-xs loader-light loading"></span> <span class="login-btn-label">@Translate("Signing in")</span> 713 </span> 714 </button> 715 <a href="@NORRIQ.Common8.Razor.Navigation.GetUrlByNavigationTag("forgot-password")" class="dropdown-item">@Translate("label_forgotten_password", "Glemt adgangskode")</a> 716 <a href="@NORRIQ.Common8.Razor.Navigation.GetUrlByNavigationTag("new-user")" class="dropdown-item">@Translate("label_create_new_user", "Opret ny bruger")</a> 717 <a href="@NORRIQ.Common8.Razor.Navigation.GetUrlByNavigationTag("user-activation-page")" class="dropdown-item">@Translate("label_activate_your_user", "Aktiver din No1 konto")</a> 718 </div> 719 @*Dropdown logged in*@ 720 <div id="loggedInMenu" class="dropdown-menu-inner" style="display: none;"> 721 @{ 722 var pageService = ObjectFactory.GetInstance<PageService>(); 723 var pages = pageService.GetPagesByParentID(GetPageIdByNavigationTag("user")).Where(page => !page.NavigationTag.Contains("onlyNotAuth") && page.Active); 724 } 725 726 <ul class="nav-user"> 727 @foreach (var page in pages) 728 { 729 <li class="nav-item"> 730 @{var href = "/Default.aspx?ID=" + page.ID;} 731 <a class="nav-link" href="@href">@page.GetDisplayName()</a> 732 </li> 733 } 734 </ul> 735 736 @*@RenderNavigation(new {Template = "UserLoggedIn.xslt", Expandmode = "all", StartLevel = 1, EndLevel = 2, NavigationTag = "user"})*@ 737 <a id="logoutButton" class="btn btn-outline-dark btn-sm btn-block"> 738 <span> 739 @Translate("Logout", "Log ud") 740 </span> 741 </a> 742 </div> 743 </div> 744 </form> 745 </li> 746 </ul> 747 748 @DwCaching.CacheByArea("primary.xslt", () => RenderNavigation(new { Template = "Primary.xslt", Expandmode = "all", StartLevel = 1, EndLevel = 3 })) 749 @{ var secondaryNavigation = Model.Area.Item.GetItemsCached("SecondaryNavigation");} 750 @if (secondaryNavigation.Any()) 751 { 752 <ul class="nav-top"> 753 @foreach (var link in secondaryNavigation) 754 { 755 <li class="nav-top-item"> 756 <a href="@link.GetString("Link")" class="nav-top-link"> 757 @link.GetString("Label") 758 </a> 759 </li> 760 } 761 </ul> 762 } 763 </div> 764 </nav> 765 </header> 766 } 767 768 @helper HeaderCheckout() 769 { 770 <header class="header-checkout"> 771 <div class="header-main"> 772 <div class="header-logo"> 773 <a href="/" title="@Translate("logo_title", "Til forsiden")"> 774 @if (Model.Area.Item.GetFile("Logo") != null) 775 { 776 <img src="@Pageview.CdnWrap(string.Format("/Admin/Public/GetImage.ashx?Image={0}&amp;Width=300&amp;Crop=5&amp;Compression=90", Model.Area.Item.GetFile("Logo").Path))" alt="Illums Bolighus A/S" class="img-fluid" /> 777 } 778 else 779 { 780 <span>@Translate("No logo defined in website properties!!!")</span> 781 } 782 </a> 783 </div> 784 </div> 785 </header> 786 }