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