Error executing template "Designs/Tefcold/_parsed/Basic_Page.parsed.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
   at Tefcold.Web.CustomCode.Razor.TemplateExtensions.<>c__DisplayClass0_0.b__0()
   at NORRIQ.Common8.Caching.CacheItemContainer.BuildItem[T](Func`1 buildmethod, Type dependencyType)
   at NORRIQ.Common8.Caching.HttpCache.GetOrInsert[T](String cacheKey, Func`1 buildCacheDependency, Func`1 buildNewItem)
   at NORRIQ.Common8.Caching.HttpCache`1.GetOrInsert[T](String cacheKey, Func`1 buildNewItem)
   at NORRIQ.Common8.Caching.AreaCache.GetOrInsert[T](String cacheKey, Func`1 buildNewItem)
   at NORRIQ.Common8.Caching.DwCaching.CacheByArea(String cacheKey, Func`1 buildFunc)
   at Tefcold.Web.CustomCode.Razor.TemplateExtensions.GetGroupUrl(ViewModelTemplate`1 page, String groupId, String countryCode)
   at CompiledRazorTemplates.Dynamic.RazorEngine_577a608a49c046499b0ce307b81e8067.Execute() in E:\Solutions\Live\Tefcold.Web\Files\Templates\Designs\Tefcold\_parsed\Basic_Page.parsed.cshtml:line 181
   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.Content 2 @using Dynamicweb.Frontend; 3 @using Dynamicweb.Security.UserManagement 4 @using NLWI.Core.Factory 5 @using Tefcold.Web.CustomCode.Extensions 6 @using Tefcold.Web.CustomCode.Items.Properties 7 @using Tefcold.Web.CustomCode.Razor 8 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 9 @{ 10 //Heine: Understående kan bruges såfremt der skal tjekkes på om man er i impersonation mode: 11 var isImpersonating = ObjectFactory.GetInstance<NORRIQ.SalesPersonLogin.Services.ImpersonationService>().IsCurrentlyImpersonating(); 12 var locationName = Pageview.User?.Name; 13 var item = Pageview.Area.Item.ToCodeFirstItem<Websites>(); 14 } 15 16 <!DOCTYPE html> 17 <html lang="@Pageview.Area.Culture"> 18 <head> 19 <meta charset='utf-8' /> 20 <meta name="description" content="@Model.Description" /> 21 <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=5, user-scalable=yes, shrink-to-fit=no" /> 22 <meta http-equiv="x-ua-compatible" content="ie=edge"> 23 @if (Model.Area.Item.GetBoolean("NoIndex")) 24 { 25 <!-- TODO: remove on launch--> 26 <meta name="robots" content="noindex, nofollow" /> 27 } 28 29 @if (!string.IsNullOrWhiteSpace(item.HeaderScript)) 30 { 31 @item.HeaderScript 32 } 33 34 <title>@Model.Title</title> 35 @Model.MetaTags 36 @if (Model.Area.Item.GetFile("Icon") != null) 37 { 38 <link href="@Model.Area.Item.GetFile("Icon").Path" rel="icon" type="image/png"> 39 } 40 <link href="@NORRIQ.Common8.Razor.TimestampSource.GetSourceWithTimestamp("/Files/dist/css/Tefcold-min.css")" rel="stylesheet" /> 41 </head> 42 <body> 43 @* GTM **@ 44 <div id="app"> 45 @{ 46 string basicNavbarPrefix = "Header "; 47 var logo = Model.Area.Item.GetFile("Logo"); 48 var currencyCode = Pageview.User?.Currency ?? Pageview.Area.EcomCurrencyId; 49 } 50 <header class="basic_navbar" id="header"> 51 @if (isImpersonating) 52 { 53 <div class="impersonation-bar"> 54 <div class="basic_navbar-container"> 55 <p> 56 @Translate(basicNavbarPrefix + "debitor", "Debitor"): <b>@locationName</b> | <a href="@NORRIQ.Common8.Razor.Navigation.GetUrlByNavigationTag("impersonation-choose-customer")">@Translate("Change customer")</a> 57 </p> 58 </div> 59 </div> 60 } 61 <div class="basic_navbar-main"> 62 <div class="basic_navbar-container"> 63 64 <button type="button" 65 class="basic_navbar-burger" 66 aria-label="@Translate(basicNavbarPrefix + "Open main navigation", "Open main navigation")" 67 v-b-toggle.basic_navigation> 68 <span></span> 69 <span></span> 70 <span></span> 71 </button> 72 <a href="/" class="basic_navbar-logo" title="@Translate(basicNavbarPrefix + "Go to frontpage", "Go to frontpage")"> 73 @if (logo != null) 74 { 75 <img class="img-fluid" src="@logo.Path" alt="@Translate(basicNavbarPrefix + "Website Logo Alttext", "Website Logo Alttext")"/> 76 } 77 else 78 { 79 <i>@Translate(basicNavbarPrefix + "No logo found", "No logo found, please configure it in the Dynamicweb Administration")</i> 80 } 81 </a> 82 <collapse-hack inline-template> 83 <b-collapse class="basic_navbar-navigation" id="basic_navigation" tag="nav"> 84 @RenderNavigation(new {Template = "basic_navbar.xslt", Expandmode = "all", StartLevel = 1, EndLevel = 4}) 85 <ul class="basic_navbar-subnav"> 86 <li> 87 <button type="button" 88 v-b-toggle.languages 89 aria-label="@Translate(basicNavbarPrefix + "Choose Language", "Choose Language")"> 90 <img src="@Pageview.Area.Flag32X32" alt="@Pageview.Area.CultureInfo.EnglishName"/> 91 <span class="sr-only">@Pageview.Area.CultureInfo.EnglishName</span> 92 </button> 93 </li> 94 <li> 95 <button v-b-toggle.contacts 96 type="button" 97 aria-label="@Translate(basicNavbarPrefix + "Show contacts", "Show contacts")"> 98 <svg> 99 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#phone-alt"></use> 100 </svg> 101 <span class="sr-only">@Translate(basicNavbarPrefix + "Contacts", "Contacts")</span> 102 </button> 103 </li> 104 <li> 105 <button v-b-toggle.customer-center 106 type="button" 107 aria-label="@Translate(basicNavbarPrefix + "Show Webshop Login", "Show Webshop Login")"> 108 @if (Pageview.User == null) 109 { 110 <svg> 111 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#user"></use> 112 </svg> 113 } 114 else 115 { 116 <svg style="width: 30px; height: 30px;"> 117 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#user-check"></use> 118 </svg> 119 } 120 <span class="sr-only">@Translate(basicNavbarPrefix + "Login", "Login")</span> 121 </button> 122 </li> 123 <media-bank inline-template> 124 <li> 125 126 <form id="mediabankform" action="https://imagebank.tefcold.com/Home/LoginUser" method="post"> 127 <input id="mediabankformname" type="hidden" name="username"/> 128 <input id="mediabankformpassword" type="hidden" name="password"/> 129 <input type="hidden" value="false" name="persistent"/> 130 </form> 131 <a v-on:click="connect($event)" href="#"> 132 <svg width="28px" height="28px" fill="currentColor"> 133 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#photo-video"></use> 134 </svg> 135 <span class="sr-only">@Translate(basicNavbarPrefix + "Mediabank", "Mediabank")</span> 136 </a> 137 </li> 138 </media-bank> 139 <li> 140 <button type="button" 141 class="btn-close" 142 @@click="collapseAll" 143 aria-label="@Translate(basicNavbarPrefix + "Close Navigation", "Close Navigation")"> 144 <span></span> 145 <span></span> 146 </button> 147 </li> 148 </ul> 149 </b-collapse> 150 </collapse-hack> 151 <form class="basic_navbar-search" action="/Default.aspx"> 152 <search-shortcut inline-template> 153 <div style="display: none"></div></search-shortcut> 154 <label for="productsearch">Search</label> 155 <input name="ID" type="hidden" value="@NORRIQ.Common8.Razor.Navigation.GetPageIdByNavigationTag("searchresult")"> 156 <input name="PageSize" type="hidden" value="99"/> 157 <input type="search" placeholder="@Translate(basicNavbarPrefix + "Search", "Search")" id="productsearch" name="productsearch"> 158 <button type="submit"> 159 <span class="sr-only">@Translate(basicNavbarPrefix + "Search", "Search")</span> 160 <svg> 161 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#search"></use> 162 </svg> 163 </button> 164 </form> 165 <ul class="basic_navbar-functions"> 166 <li class="basic_navbar-languages relative"> 167 <button type="button" v-b-toggle.languages aria-label="@Translate(basicNavbarPrefix + "Choose Language", "Choose Language")"> 168 <span class="sr-only">@Pageview.Area.CultureInfo.EnglishName</span> 169 <img src="@Pageview.Area.Flag32X32" alt="@Pageview.Area.Culture - Flag"/> 170 </button> 171 <b-collapse id="languages" class="basic_navbar-dropdown" accordion="header" v-auto-close> 172 <div class="basic_navbar-body"> 173 <ul> 174 @foreach (var lang in Model.Area.Languages.Where(a => !a.IsCurrent)) 175 { 176 string langUrl; 177 string countryCode = lang.Culture.Split('-').Last(); 178 179 if (Dynamicweb.Context.Current.Request["GroupID"] != null) 180 { 181 langUrl = this.GetGroupUrl(Dynamicweb.Context.Current.Request["GroupID"], countryCode); 182 } 183 else if (!string.IsNullOrEmpty(lang.PrimaryDomain)) 184 { 185 try 186 { 187 var uriBuilder = new UriBuilder(Pageview.SearchFriendlyUrl); 188 uriBuilder.Host = !lang.PrimaryDomain.Contains("http") ? lang.PrimaryDomain : "https://" + lang.PrimaryDomain; 189 langUrl = uriBuilder.Uri.AbsoluteUri; 190 } 191 catch (Exception) 192 { 193 langUrl = Pageview.SearchFriendlyUrl; 194 } 195 } 196 else 197 { 198 langUrl = Pageview.SearchFriendlyUrl; 199 } 200 <li> 201 <a href="@langUrl"> 202 <img src="/Admin/Images/Flags/flag_@(countryCode).png" alt="@lang.Culture - Flag" /> 203 <span>@lang.Culture.Split('-').First()</span> 204 </a> 205 </li> 206 } 207 </ul> 208 </div> 209 </b-collapse> 210 </li> 211 <li class="basic_navbar-contacts @(Pageview.User != null ? "static" : "relative")"> 212 <button v-b-toggle.contacts 213 type="button" 214 aria-label="@Translate(basicNavbarPrefix + "Show contacts", "Show contacts")"> 215 <svg> 216 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#phone-alt"></use> 217 </svg> 218 <span class="sr-only">@Translate(basicNavbarPrefix + "Contacts", "Contacts")</span> 219 </button> 220 @{ 221 var impersonationGroupId = item.ImpersonationGroup.FirstOrDefault(); 222 IEnumerable<User> users = null; 223 IEnumerable<User> salesPersons = null; 224 if (!string.IsNullOrEmpty(impersonationGroupId)) 225 { 226 users = Group.GetGroupByID(int.Parse(impersonationGroupId)).Users; 227 } 228 if (users==null || Pageview.User==null) 229 { 230 salesPersons = new List<User>(); 231 } 232 else 233 { 234 salesPersons = users.Where(user => Pageview.User.CanImpersonateMe(user)).ToList(); 235 } 236 } 237 <b-collapse id="contacts" class="@(Pageview.User != null ? "basic_navbar-megamenu" : "basic_navbar-dropdown")" v-auto-close accordion="header"> 238 <div class="basic_navbar-body"> 239 @if (Pageview.User != null) 240 { 241 foreach (var salesPerson in salesPersons) 242 { 243 <div class="tefcold_salesperson" itemscope itemtype="http://schema.org/Person"> 244 <figure> 245 <img src="@salesPerson.Image" class="img-fluid" alt="@salesPerson.Name" itemprop="image" /> 246 </figure> 247 <p itemprop="name">@salesPerson.Name</p> 248 <p itemprop="jobTitle">@salesPerson.JobTitle</p> 249 <p itemprop="telephone"> 250 <svg> 251 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#phone-alt"></use> 252 </svg> 253 <span>@salesPerson.PhonePrivate</span> 254 </p> 255 <p itemprop="telephone"> 256 <svg> 257 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#mobile-alt"></use> 258 </svg> 259 <span>@salesPerson.PhoneMobile</span> 260 </p> 261 <a href="@("mailto:" + @salesPerson.Email)" itemprop="email"> 262 <svg> 263 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#envelope"></use> 264 </svg> 265 <span>@salesPerson.Email</span> 266 </a> 267 </div> 268 } 269 } 270 <ul> 271 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("PhoneLabel")) 272 && !string.IsNullOrEmpty(Model.Area.Item.GetString("Phonenumber"))) 273 { 274 <li class="head"> 275 <strong> 276 @Model.Area.Item.GetString("PhoneLabel") 277 </strong> 278 <strong> 279 @Model.Area.Item.GetString("Phonenumber") 280 </strong> 281 </li> 282 } 283 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("ContactPage")) 284 && !string.IsNullOrEmpty(Model.Area.Item.GetString("ContactLabel"))) 285 { 286 <li> 287 <a href="@Model.Area.Item.GetString("ContactPage")"> 288 @Model.Area.Item.GetString("ContactLabel") 289 </a> 290 </li> 291 } 292 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("SalesPage")) 293 && !string.IsNullOrEmpty(Model.Area.Item.GetString("SalesLabel"))) 294 { 295 <li> 296 <a href="@Model.Area.Item.GetString("SalesPage")"> 297 @Model.Area.Item.GetString("SalesLabel") 298 </a> 299 </li> 300 } 301 </ul> 302 303 </div> 304 </b-collapse> 305 </li> 306 <li class="basic_navbar-user"> 307 <button v-b-toggle.customer-center type="button" aria-label="@Translate(basicNavbarPrefix + "Show Webshop Login", "Show Webshop Login")"> 308 @if (Pageview.User == null) 309 { 310 <svg> 311 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#user"></use> 312 </svg> 313 } 314 else 315 { 316 <svg style="width: 30px; height: 30px;"> 317 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#user-check"></use> 318 </svg> 319 } 320 <span class="sr-only">@Translate(basicNavbarPrefix + "Login", "Login")</span> 321 </button> 322 323 324 <b-collapse id="customer-center" class="basic_navbar-dropdown" accordion="header" v-auto-close> 325 <div class="basic_navbar-body"> 326 @if (Pageview.User == null) 327 { 328 <head-login-form inline-template> 329 <form name="ExtUserForm" id="loginForm" method="post" class="form" role="form" v-on:submit="submitLogin"> 330 <p> 331 <strong> 332 @Translate(basicNavbarPrefix + "Webshop Login", "Webshop Login") 333 </strong> 334 </p> 335 <input type="hidden" name="ID" id="ID" value=""/> 336 <div class="form-group"> 337 <label for="Username">@Translate(basicNavbarPrefix + "Username", "Username")</label> 338 <input id="Username" v-model="username" name="Username" type="text" value="" class="form-control" autocomplete="off"> 339 </div> 340 <div class="form-group"> 341 <label for="Password">@Translate(basicNavbarPrefix + "Password", "Password")</label> 342 <input id="Password" v-model="password" name="Password" type="password" value="" class="form-control" autocomplete="off"> 343 </div> 344 <div v-if="loginFailed"> 345 <p class="alert alert-warning"> 346 @Translate("Login failed", "Invalid credentials") 347 </p> 348 </div> 349 <div class="basic_login-buttons"> 350 <button type="submit" role="button" class="btn btn-primary btn-block" v-bind:class='{"loading": loading}' v-on:click="loading=true" id="loginBtn"> 351 @Translate(basicNavbarPrefix + "Login", "Login") 352 </button> 353 </div> 354 </form> 355 </head-login-form> 356 <ul> 357 <li> 358 <a href="/Default.aspx?ID=@NORRIQ.Common8.Razor.Navigation.GetPageIdByNavigationTag("forgotpassword")&amp;LoginAction=Recovery"> 359 @Translate(basicNavbarPrefix + "Forgot password", "Forgot password") 360 </a> 361 </li> 362 <li> 363 <a href="@NORRIQ.Common8.Razor.Navigation.GetUrlByNavigationTag("create-account")"> 364 @Translate(basicNavbarPrefix + "Create Webshop Account", "Create Webshop Account") 365 </a> 366 </li> 367 </ul> 368 } 369 else 370 { 371 <div class="active-user"> 372 <p><strong>@Pageview.User.Name</strong></p> 373 <p> 374 <a v-clear-cache:click.user href='/admin/public/extranetlogoff.aspx?ID=@(NORRIQ.Common8.Razor.Navigation.GetPageIdByNavigationTag("home"))'> 375 @Translate(basicNavbarPrefix + "Sign out", "Sign out") 376 </a> 377 </p> 378 </div> 379 @RenderNavigation(new {Template = "basic_Footer.xslt", Expandmode = "all", StartLevel = 1, EndLevel = 4, NavigationTag = "customer-portal"}) 380 } 381 </div> 382 </b-collapse> 383 </li> 384 @if (Pageview.User != null && Pageview.User.AllowMediaBank()) 385 { 386 <media-bank inline-template> 387 <li class="basic_navbar-media"> 388 <form id="mediabankform" action="https://imagebank.tefcold.com/Home/LoginUser" method="post"> 389 <input id="mediabankformname" type="hidden" name="username"/> 390 <input id="mediabankformpassword" type="hidden" name="password"/> 391 <input type="hidden" value="false" name="persistent"/> 392 </form> 393 <a v-on:click="connect($event)" href="#" class="media"> 394 <svg width="28px" height="28px"> 395 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#photo-video"></use> 396 </svg> 397 <span class="sr-only">@Translate(basicNavbarPrefix + "Mediabank", "Mediabank")</span> 398 </a> 399 </li> 400 </media-bank> 401 402 } 403 @if (Pageview.Area.Culture == "da-DK" || Pageview.User != null) 404 { 405 <cart-icon cartlink="@NORRIQ.Common8.Razor.Navigation.GetUrlByNavigationTag("checkout")"></cart-icon> 406 } 407 </ul> 408 </div> 409 </div> 410 </header> 411 @using Dynamicweb.Frontend; 412 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 413 414 @Title("Page") 415 @Description("Default page template") 416 @{ 417 string basicPagePrefix = "Page "; 418 } 419 @if (Pageview.IsCurrentUserAllowed) 420 { 421 var pageLayout = !string.IsNullOrEmpty(Model.Item.GetValue<ListViewModel>("Layout").SelectedValue) ? Model.Item.GetValue<ListViewModel>("Layout").SelectedValue : "content-page-sidebar"; 422 var pageClass = pageLayout == "page-wide" ? "basic_page-wide" : "basic_page"; 423 if (!Model.Item.GetBoolean("HideBreadcrumb")) 424 { 425 if (Model.Area.Item.GetFile("TopImage") != null) 426 { 427 <figure> 428 <img src="/Admin/Public/GetImage.ashx?Height=200&amp;Compression=85&amp;Crop=6&amp;Image=@Model.Area.Item.GetFile("TopImage").Path" class="img-fluid" alt="webbanner" /> 429 </figure> 430 } 431 @RenderNavigation(new { Template = "basic_Breadcrumb.xslt", Expandmode = "all", StartLevel = 1, EndLevel = 5 }) 432 } 433 <main class="@pageClass"> 434 @if (pageLayout == "content-page-sidebar" || pageLayout == "module-page-sidebar") 435 { 436 <aside class="basic_page-sidebar"> 437 @RenderNavigation(new { Template = "basic_Page.xslt", StartLevel = 1, EndLevel = 3 }) 438 </aside> 439 <div class="basic_page-content"> 440 @if (pageLayout == "content-page-sidebar" && !string.IsNullOrEmpty(Model.Item.GetString("Title").ToString()) || !string.IsNullOrEmpty(Model.Item.GetString("Text").ToString())) 441 { 442 <section class="basic_paragraph"> 443 @if (!string.IsNullOrEmpty(Model.Item.GetString("Title").ToString())) 444 { 445 <header> 446 <h1> 447 @Model.Item.GetString("Title") 448 </h1> 449 </header> 450 } 451 @if (Model.Item.GetFile("Image") != null) 452 { 453 <figure> 454 <img src="@Model.Item.GetFile("Image").Path" alt="@Model.Item.GetString("Title")" class="img-fluid" /> 455 </figure> 456 } 457 @if (!string.IsNullOrEmpty(Model.Item.GetString("Text").ToString())) 458 { 459 @Model.Item.GetString("Text") 460 } 461 </section> 462 } 463 @RenderPlaceholder() 464 </div> 465 } 466 else 467 { 468 @RenderPlaceholder() 469 } 470 </main> 471 } 472 else 473 { 474 <main class="basic_page"> 475 @RenderPlaceholder() 476 </main> 477 } 478 @helper RenderPlaceholder() 479 { 480 @Model.Placeholder("Content", "Content", "unwrap:true;default:true") 481 if (!String.IsNullOrEmpty(Model.Placeholder("Boxed"))) 482 { 483 <div class="grouped"> 484 @Model.Placeholder("Boxed", "Grouped Content", "unwrap:true") 485 </div> 486 } 487 } 488 489 @{ 490 string footerPrefix = "Footer "; 491 } 492 <footer class="basic_footer"> 493 <div class="basic_footer-wrap"> 494 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("FooterOneTitle")) && !string.IsNullOrEmpty(Model.Area.Item.GetString("FooterOneText"))) 495 { 496 <div class="basic_footer-box"> 497 <div class="basic_footer-head" role="button" v-b-toggle.footer-one> 498 <h3>@Model.Area.Item.GetString("FooterOneTitle")</h3> 499 </div> 500 <b-collapse id="footer-one" class="basic_footer-collapse"> 501 <div class="basic_footer-body"> 502 @Model.Area.Item.GetString("FooterOneText") 503 </div> 504 </b-collapse> 505 </div> 506 } 507 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("FooterTwoTitle")) 508 && !string.IsNullOrEmpty(Model.Area.Item.GetString("FooterTwoText")) 509 || !string.IsNullOrEmpty(Model.Area.Item.GetString("FooterTwoTag"))) 510 { 511 <div class="basic_footer-box"> 512 <div class="basic_footer-head" role="button" v-b-toggle.footer-two> 513 <h3>@Model.Area.Item.GetString("FooterTwoTitle")</h3> 514 </div> 515 <b-collapse id="footer-two" class="basic_footer-collapse"> 516 <div class="basic_footer-body"> 517 @Model.Area.Item.GetString("FooterTwoText") 518 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("FooterTwoTag"))) 519 { 520 @RenderNavigation(new {Template = "basic_Footer.xslt", Expandmode = "all", StartLevel = 1, EndLevel = 4, NavigationTag = @Model.Area.Item.GetString("FooterTwoTag").ToString()}) 521 } 522 </div> 523 </b-collapse> 524 </div> 525 } 526 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("FooterThreeTitle")) 527 && !string.IsNullOrEmpty(Model.Area.Item.GetString("FooterThreeText")) 528 || !string.IsNullOrEmpty(Model.Area.Item.GetString("FooterThreeTag"))) 529 { 530 <div class="basic_footer-box"> 531 <div class="basic_footer-head" role="button" v-b-toggle.footer-three> 532 <h3>@Model.Area.Item.GetString("FooterThreeTitle")</h3> 533 </div> 534 <b-collapse id="footer-three" class="basic_footer-collapse"> 535 <div class="basic_footer-body"> 536 @Model.Area.Item.GetString("FooterThreeText") 537 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("FooterThreeTag"))) 538 { 539 @RenderNavigation(new {Template = "basic_Footer.xslt", Expandmode = "all", StartLevel = 1, EndLevel = 4, NavigationTag = @Model.Area.Item.GetString("FooterThreeTag").ToString()}) 540 } 541 </div> 542 </b-collapse> 543 </div> 544 } 545 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("FooterFourTitle")) && !string.IsNullOrEmpty(Model.Area.Item.GetString("FooterFourText"))) 546 { 547 <div class="basic_footer-box"> 548 <div class="basic_footer-head" role="button" v-b-toggle.footer-four> 549 <h3>@Model.Area.Item.GetString("FooterFourTitle")</h3> 550 </div> 551 <b-collapse id="footer-four" class="basic_footer-collapse"> 552 <div class="basic_footer-body"> 553 @Model.Area.Item.GetString("FooterFourText") 554 </div> 555 </b-collapse> 556 </div> 557 } 558 </div> 559 560 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("FooterCopyright"))) 561 { 562 563 <div class="basic_footer-sub"> 564 <div class="basic_footer-wrap"> 565 <div class="basic_footer-col"> 566 <p> 567 &copy; @DateTime.Now.Year @Model.Area.Item.GetString("FooterCopyright") 568 </p> 569 </div> 570 @if (Model.Area.Item.GetValue<ListViewModel>("Cards").SelectedValues.Any()) 571 { 572 <div class="basic_footer-col text-center cards"> 573 @foreach (var cards in Model.Area.Item.GetValue<ListViewModel>("Cards").SelectedValues) 574 { 575 <img src="/Files/Images/cards/@cards" alt="@cards.Split('.').First()"/> 576 } 577 </div> 578 } 579 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("FacebookUrl")) 580 || !string.IsNullOrEmpty(Model.Area.Item.GetString("LinkedInUrl")) 581 || !string.IsNullOrEmpty(Model.Area.Item.GetString("YoutubeUrl"))) 582 { 583 <div class="basic_footer-col text-right some"> 584 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("FacebookUrl"))) 585 { 586 <a href="@Model.Area.Item.GetString("FacebookUrl")" target="_blank" aria-label="Facebook" rel="noreferrer"> 587 <svg> 588 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#facebook-square"></use> 589 </svg> 590 </a> 591 } 592 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("LinkedInUrl"))) 593 { 594 <a href="@Model.Area.Item.GetString("LinkedInUrl")" target="_blank" aria-label="LinkedIn" rel="noreferrer"> 595 <svg> 596 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#linkedin"></use> 597 </svg> 598 </a> 599 } 600 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("YoutubeUrl"))) 601 { 602 <a href="@Model.Area.Item.GetString("YoutubeUrl")" target="_blank" aria-label="Youtube" rel="noreferrer"> 603 <svg> 604 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#youtube-square"></use> 605 </svg> 606 </a> 607 } 608 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("SmileyUrl"))) 609 { 610 <a href="@Model.Area.Item.GetString("SmileyUrl")" target="_blank" aria-label="@Translate(footerPrefix + "smiley", "Elite Smiley")"> 611 <svg> 612 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#elite-smiley-nocolor"></use> 613 </svg> 614 </a> 615 } 616 </div> 617 } 618 </div> 619 </div> 620 } 621 </footer> 622 </div> 623 <script type="text/x-template" id="cart-icon-template"> 624 @{ 625 string cartIconPrefix = "Minicart "; 626 } 627 <li> 628 <a :href="cartlink"> 629 <svg> 630 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#shopping-cart"></use> 631 </svg> 632 <span class="label">@Translate(cartIconPrefix + "Checkout", "Checkout")</span> 633 <strong v-if="!cartEmpty" class="cart-quantity">{{quantity}}</strong> 634 </a> 635 </li> 636 </script> 637 638 639 640 <script type="text/x-template" id="basic-facet-filter-template"> 641 @{ 642 string basicFacetPrefix = "Filter "; 643 } 644 <aside> 645 <template v-if="HasActiveFilter()"> 646 647 <p id="selected-filter-label" class="sr-only"> 648 @Translate(basicFacetPrefix + "Active", "Active") 649 </p> 650 <div class="basic_filter-active" aria-labelledby="selected-filter-label"> 651 <template v-for="facetFilter in facetFilters"> 652 <span v-for="option in SelectedOptions(facetFilter)" class="custom-control custom-filter"> 653 <input type="checkbox" 654 :id="'Selected-' + facetFilter.name + '-' + option.name" 655 :name="facetFilter.name" 656 :value="option.value" 657 :v-model="option.selected" 658 :checked="option.selected" 659 v-on:click="ToggleFilter(facetFilter.name,option)" 660 class="custom-control-input" /> 661 <label :for="'Selected-' + facetFilter.name + '-' + option.name" class="custom-control-label" :data-name="facetFilter.name"> 662 <span> 663 {{option.label}} 664 </span> 665 <svg> 666 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#times"></use> 667 </svg> 668 </label> 669 </span> 670 </template> 671 </div> 672 </template> 673 <b-collapse class="basic_filter" id="sidebar-filter"> 674 <template v-if="!error && facetFilters"> 675 <button type="button" class="btn-close" v-b-toggle.sidebar-filter.sidebar-overlay aria-label="@Translate(basicFacetPrefix + "Close Filter", "Close Filter")"> 676 <span></span> 677 <span></span> 678 </button> 679 <div class="basic_filter-groups"> 680 <div class="basic_filter-group" v-for="(facetFilter, index) in facetFilters"> 681 <p :id="'filter-group-' + facetFilter.name.toLowerCase().trim()" v-b-toggle="'filter-collapse-' + facetFilter.name.toLowerCase().trim()"> 682 <template v-if="facetFilter.name === 'ModelType'"> 683 @Translate(basicFacetPrefix + "ModelType", "Model / Type") 684 </template> 685 <template v-else-if="facetFilter.name === 'DoorType'"> 686 @Translate(basicFacetPrefix + "DoorType", " Door type") 687 </template> 688 <template v-else-if="facetFilter.name === 'ExternalHeight'"> 689 @Translate(basicFacetPrefix + "ExternalHeight", "External Height") (mm) 690 </template> 691 <template v-else-if="facetFilter.name === 'NetVolume'"> 692 @Translate(basicFacetPrefix + "NetVolume", "Net Volume") (l) 693 </template> 694 <template v-else-if="facetFilter.name === 'DoorNumber'"> 695 @Translate(basicFacetPrefix + "DoorNumber", " Number of doors") 696 </template> 697 <template v-else-if="facetFilter.name === 'ExteriorFinish'"> 698 @Translate(basicFacetPrefix + "ExteriorFinish", "Exterior Finish") 699 </template> 700 <template v-else-if="facetFilter.name === 'ExternalWidth'"> 701 @Translate(basicFacetPrefix + "ExternalWidth", "External Width") (mm) 702 </template> 703 <template v-else-if="facetFilter.name === 'GrossVolume'"> 704 @Translate(basicFacetPrefix + "GrossVolume", "Gross Volume") (l) 705 </template> 706 <template v-else-if="facetFilter.name === 'Bottles330'"> 707 @Translate(basicFacetPrefix + "Bottles330", "Capacity 330ml bottles") 708 </template> 709 <template v-else-if="facetFilter.name === 'Bottles500'"> 710 @Translate(basicFacetPrefix + "Bottles500", "Capacity 500ml bottles") 711 </template> 712 <template v-else-if="facetFilter.name === 'Cans330'"> 713 @Translate(basicFacetPrefix + "Cans330", "Capacity 300ml cans") 714 </template> 715 <template v-else-if="facetFilter.name === 'Cans500'"> 716 @Translate(basicFacetPrefix + "Cans500", "Capacity 500ml cans") 717 </template> 718 <template v-else-if="facetFilter.name === 'TemperatureRange'"> 719 @Translate(basicFacetPrefix + "TemperatureRange", "Temperature Range") 720 </template> 721 <template v-else-if="facetFilter.name === 'TemperatureRangeZone2'"> 722 @Translate(basicFacetPrefix + "TemperatureRangeZone2", "Tempature Range 2") 723 </template> 724 <template v-else-if="facetFilter.name === 'ShelfNumber'"> 725 @Translate(basicFacetPrefix + "ShelfNumber", "Number of shelfs") 726 </template> 727 <template v-else-if="facetFilter.name === 'LidType'"> 728 @Translate(basicFacetPrefix + "LidType", "Lid Type") 729 </template> 730 <template v-else-if="facetFilter.name === 'InteriorFinish'"> 731 @Translate(basicFacetPrefix + "InteriorFinish", "Interior Finish") 732 </template> 733 <template v-else-if="facetFilter.name === 'WineBottles750'"> 734 @Translate(basicFacetPrefix + "WineBottles750", "Capacity 750ml winebottles") 735 </template> 736 <template v-else> 737 {{facetFilter.name}} 738 </template> 739 <svg> 740 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/Files/dist/icons/icons.svg#chevron-up"></use> 741 </svg> 742 </p> 743 <b-collapse :id="'filter-collapse-' + facetFilter.name.toLowerCase().trim()" :visible="ShowGroupIfSelected(facetFilter.options, index)" class="basic_filter-collapsing" :aria-labelledby="'filter-group-' + facetFilter.name.toLowerCase().trim()"> 744 <template v-if="facetFilter.optionActiveCount > 5"> 745 <span v-for="option in facetFilter.options.slice(0, 5)" class="custom-control custom-checkbox facet-option"> 746 <input type="checkbox" class="custom-control-input" 747 :id="'UnSelected-' + facetFilter.name + '-' + option.name" 748 :name="facetFilter.name" 749 :value="option.value" 750 :v-model="option.selected" 751 :checked="option.selected" 752 v-on:click="ToggleFilter(facetFilter.name,option)" /> 753 <label :for="'UnSelected-' + facetFilter.name + '-' + option.name" class="custom-control-label"> 754 {{option.label}} <span class="count">({{option.count}})</span> 755 </label> 756 </span> 757 <b-collapse class="basic_filter-expand" :id="'filter-expand-' + facetFilter.name.toLowerCase().trim()" :visible="ShowMoreIfSelected(facetFilter.options, index)"> 758 <span v-for="option in facetFilter.options.slice(5)" class="custom-control custom-checkbox facet-option"> 759 <input type="checkbox" class="custom-control-input" 760 :id="'UnSelected-' + facetFilter.name + '-' + option.name" 761 :name="facetFilter.name" 762 :value="option.value" 763 :v-model="option.selected" 764 :checked="option.selected" 765 v-on:click="ToggleFilter(facetFilter.name,option)" /> 766 <label :for="'UnSelected-' + facetFilter.name + '-' + option.name" class="custom-control-label"> 767 {{option.label}} <span class="count">({{option.count}})</span> 768 </label> 769 </span> 770 </b-collapse> 771 <a v-b-toggle="'filter-expand-' + facetFilter.name.toLowerCase().trim()" class="basic_filter-expanding" v-if="facetFilter.optionActiveCount > 6"> 772 <span class="show-more">+ @Translate(basicFacetPrefix + "show more", "show more")</span> 773 <span class="show-less">- @Translate(basicFacetPrefix + "show less", "show less")</span> 774 </a> 775 </template> 776 <template v-else> 777 <span v-for="option in facetFilter.options" class="custom-control custom-checkbox facet-option"> 778 <input type="checkbox" class="custom-control-input" 779 :id="'UnSelected-' + facetFilter.name + '-' + option.name" 780 :name="facetFilter.name" 781 :value="option.value" 782 :v-model="option.selected" 783 :checked="option.selected" 784 v-on:click="ToggleFilter(facetFilter.name,option)" /> 785 <label :for="'UnSelected-' + facetFilter.name + '-' + option.name" class="custom-control-label"> 786 {{option.label}} <span class="count">({{option.count}})</span> 787 </label> 788 </span> 789 </template> 790 </b-collapse> 791 </div> 792 </div> 793 </template> 794 </b-collapse> 795 </aside> 796 </script> 797 <script type="text/x-template" id="add-to-basket-simple-template"> 798 @{ 799 string addToBasketSimplePrifix = "BuyButton "; 800 } 801 <div class="form-flex" v-if="priceWithoutVat > 0" v-bind:class="[{added: IsAdded}, {adding: IsAdding}, {disabled: !canAdd}]"> 802 803 <label for="quantity">@Translate(addToBasketSimplePrifix + "Quantity", "Quantity")</label> 804 <input class="form-control" type="number" name="quantity" v-model="quantity" autocomplete="off" onclick="this.setSelectionRange(0, this.value.length)"> 805 <button :disabled="!canAdd" :class="buttonClass" v-on:click="addToBasketAndResetQuantity()" aria-label="@Translate(addToBasketSimplePrifix + "Add", "Add")"> 806 <slot> 807 <svg> 808 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#shopping-cart"> 809 </use> 810 </svg> 811 <span> 812 @Translate(addToBasketSimplePrifix + "Add to basket", "Add to basket") 813 </span> 814 </slot> 815 816 </button> 817 818 <span v-if="itemStockLocationState == 5" v-b-tooltip.hover.focus="'@Translate(addToBasketSimplePrifix + "The item is out of stock","The item is out of stock").Replace(System.Environment.NewLine,"").Replace("'","\\'")'" class="addtobasket-help">?</span> 819 <span v-if="itemStockLocationState == 4" v-b-tooltip.hover.focus="'@Translate(addToBasketSimplePrifix + "cant buy this product info","This product is not available from the currently chosen stock location!").Replace(System.Environment.NewLine,"").Replace("'","\\'")'" class="addtobasket-help">?</span> 820 <span v-if="itemStockLocationState == 50" v-b-tooltip.hover.focus="'@Translate(addToBasketSimplePrifix + "no stock information available","Could not find any stock information on this product!").Replace(System.Environment.NewLine,"").Replace("'","\\'")'" class="addtobasket-help">?</span> 821 </div> 822 </script> 823 824 <script type="text/x-template" id="quick-add-template"> 825 @{ 826 string quickAddPrifix = "BuyButton "; 827 } 828 <div v-bind:class="[{added: IsAdded}, {adding: IsAdding}]"> 829 <label for="quantity">@Translate(quickAddPrifix + "Quantity", "Quantity")</label> 830 <input class="form-control" type="number" id="quantity" name="quantity" v-model="quantity" autocomplete="off"> 831 </div> 832 </script> 833 834 <script type="text/x-template" id="add-to-basket-button-only-template"> 835 @{ 836 string addToBasketPrefix = "BuyButton "; 837 } 838 <div v-bind:class="[{added: IsAdded}, {adding: IsAdding}]"> 839 <button :class="buttonClass" v-on:click="addToBasket()"> 840 <slot> 841 @Translate(addToBasketPrefix + "Add to basket", "Add to basket") 842 </slot> 843 </button> 844 </div> 845 </script> 846 <script type="text/x-template" id="async-price-template"> 847 @{ 848 string asyncPrefix = "Async "; 849 850 } 851 852 <div :class="classType + (loading ? ' loading' : '')"> 853 <template> 854 <p :class="classType + '--error'" v-if="error">{{error}}</p> 855 </template> 856 <template v-if="!loading"> 857 <template v-if="!forceAskForPrice && price.netUnitPrice.priceWithoutVat"> 858 859 <p class="price"> 860 <span itemprop="price" :content="price.netUnitPrice.priceWithoutVat">{{ price.netUnitPrice.priceWithoutVat | currency(price.currencyCode) }}</span> 861 <span class="sr-only" itemprop="priceCurrency" content="@(Pageview.User?.Currency ?? Pageview.Area.EcomCurrencyId)">@(Pageview.User?.Currency ?? Pageview.Area.EcomCurrencyId)</span> 862 </p> 863 <small>@Translate(asyncPrefix + "price without vat", "Price without VAT")</small> 864 </template> 865 <template v-if="!price?.netUnitPrice?.priceWithoutVat || forceAskForPrice"> 866 <a :href="'mailto:@Translate("Ask for a price EMAIL.","info@tefcold.dk")?subject=' + '@Translate("Ask for a price.")' + ' - ' + product.product.name + ' - ' + product.product.shortDescription + '&body=@Translate("ProductName EMAIL (BODY)", "Produktnavn: ") ' + product.product.name + ' - @Translate("ProductShortName EMAIL (BODY)", "Kort produktnavn: ") ' + product.product.shortDescription" class="btn btn-outline-secondary btn-sm">@Translate("Ask for a price.", "Spørg om pris.")</a> 867 </template> 868 </template> 869 </div> 870 </script> 871 <script type="text/x-template" id="pagination-template"> 872 @{ 873 string paginationPrefix = "Pagination "; 874 } 875 <nav aria-label="@Translate(paginationPrefix + "Productlist pagination", "Productlist pagination")"> 876 <ul class="pagination"> 877 <li :class="['page-item', currentPage == 1 ? 'disabled' : '' ]"> 878 <a class="page-link" v-on:click="togglePrevPage()" aria-label="@Translate(paginationPrefix + "Previous Page", "Previous Page")" v-bind:aria-disabled="currentPage > 1 ? 'true' : null"> 879 <svg> 880 <use xmlns:xlink="http://www.w3.org/1999/xlink" 881 xlink:href="/files/dist/icons/icons.svg#chevron-left"> 882 </use> 883 </svg> 884 </a> 885 </li> 886 <template v-if="hasGroupId"> 887 <li v-if="showPage(n)" v-for="n in totalPages" :key="n" :class="(n == currentPage ? 'page-item active' : 'page-item')"> 888 <a v-on:click="togglePage(n)" v-bind:aria-current="(n == currentPage ? 'true' : '')" class="page-link"> 889 {{n}} 890 </a> 891 </li> 892 </template> 893 <template v-else> 894 <li class="page-item"> 895 <span class="page-label"> 896 {{currentPage}} 897 </span> 898 </li> 899 <li class="page-item"> 900 <span class="page-label"> 901 @Translate(paginationPrefix + "of", "of") 902 </span> 903 </li> 904 <li class="page-item"> 905 <span class="page-label"> 906 {{totalPages}} 907 </span> 908 </li> 909 </template> 910 <li :class="'page-item' + (currentPage >= totalPages ? ' disabled' : '')"> 911 <a v-on:click="toggleNextPage()" aria-label="@Translate(paginationPrefix + "Next Page", "Next Page")" class="page-link" v-bind:aria-disabled="totalPages > currentPage ? 'true' : null"> 912 <svg class="icon-pagination"> 913 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#chevron-right"></use> 914 </svg> 915 </a> 916 </li> 917 </ul> 918 </nav> 919 </script> 920 <script type="text/x-template" id="product-specification-list-view-template"> 921 <div class="basic_listview-data"> 922 <template v-if="!isSparePart"> 923 <p itemprop="description"> 924 {{ SpecificationHelpers.GetFirstSpecificationValueOrDefault('GrossNetVolume',productSpecifications)}} {{ SpecificationHelpers.GetSpecificationUnit(SpecificationHelpers.GetSpecificationByKey('GrossNetVolume',productSpecifications))}} 925 <br /> 926 {{ SpecificationHelpers.GetFirstSpecificationValueOrDefault('ExternalDimensionWeb',productSpecifications)}} 927 928 </p> 929 </template> 930 <p itemprop="sku">@Translate("PLP No.", "No.") {{productNumber}}</p> 931 </div> 932 </script> 933 <script type="text/x-template" id="product-spare-parts-view-template"> 934 @{ 935 string basicPimPrefix = "PDP "; 936 } 937 <div> 938 <button class="btn-collapse" id="spareparts" v-b-toggle.spareparts-list> 939 @Translate(basicPimPrefix + "spare parts", "Spare Parts") 940 </button> 941 <template> 942 <b-collapse id="spareparts-list" accordion="specs2"> 943 <template> 944 <div class="body-collapse full"> 945 <ul class="basic_pim-spares"> 946 <li> 947 <a :href="explodedDrawing" target="_blank"> 948 <svg> 949 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#download"></use> 950 </svg> 951 @Translate(basicPimPrefix + "view exploded drawing of spare parts", "View exploded drawing of spare parts") 952 </a> 953 </li> 954 <li :data-point="spare.position" class="basic_pim-spare" v-for="spare in spareParts"> 955 <div class="head"> 956 <a href="#" v-on:click="navigateToSpare($event,spare.id)" class="name">{{spare.productName}}</a> 957 <p class="sku">{{spare.productNumber}}</p> 958 </div> 959 @if (Pageview.User != null) 960 { 961 <div class="foot"> 962 <async-price class-type="asyncprice-spare" 963 :product="spare" 964 :default-price="spare.price" 965 list-price="true" 966 > 967 </async-price> 968 @*<add-to-basket-simple class="addtobasketsimple-plp" 969 :product="spare" 970 button-clas="btn btn-primary" 971 unit-of-measure="STK"> 972 </add-to-basket-simple>*@ 973 </div> 974 } 975 @*<p>DEBUG: {{spare}}</p>*@ 976 </li> 977 978 </ul> 979 </div> 980 </template> 981 </b-collapse> 982 </template> 983 </div> 984 985 </script> 986 <script type="text/x-template" id="variant-list-template"> 987 <ul class="variants" v-if="initialVariant.product.hasVariants" > 988 <li> 989 <input v-model="variantId" @@click="changeVariantClickHandler($event)" :value="initialVariant.product.variantId" type="radio" :name="'main-' + initialVariant.product.id" :id="'main-' + initialVariant.product.id" :disabled="readOnly"/> 990 <label :for="'main-' + initialVariant.product.id" :style="getImageOrColor(initialVariant.product.variantImage,initialVariant.product.variantValue)"></label> 991 </li> 992 <li v-for="variant in initialVariant.product.simpleVariants"> 993 <input v-model="variantId" @@click="changeVariantClickHandler($event)" :value="variant.product.variantId" type="radio" :name="'color-'+variant.product.id + '-' + variant.product.variantId" :id="'color-'+variant.product.id + '-' + variant.product.variantId" /> 994 <label :for="'color-'+variant.product.id+ '-' + variant.product.variantId" :style="getImageOrColor(variant.product.variantImage,variant.product.variantValue)"> 995 </label> 996 </li> 997 </ul> 998 </script> 999 1000 <script type="text/x-template" id="product-template"> 1001 <article itemscope itemtype="https://schema.org/Product" v-if="product.product" v-bind:key="product.product.number"> 1002 <span class="badge"> 1003 @if (false) 1004 { 1005 @*//Denne feature er udkommenteret, da der ikke er nogen definition på et nyt produkt, udbedt af THF*@ 1006 <img src="~/Files/Images/Grafik/nyhed-dummy-lg.png" alt="@Translate(basicPimPrefix + "new product", "New product")" /> 1007 } 1008 </span> 1009 <a :href="product.product.url" itemprop="url"> 1010 <figure style="min-height: 1px;"> 1011 1012 <img v-if="SpecificationHelpers.GetFirstSpecificationValueOrDefault('WebPrimaryImage',product.specifications) != null" :src="'/Admin/Public/GetImage.ashx?Width=427&amp;Height=427&amp;Compression=85&amp;Crop=5&amp;fillcanvas=true&amp;Image=' + SpecificationHelpers.GetFirstSpecificationValueOrDefault('WebPrimaryImage',product.specifications)" 1013 v-bind:alt="product.product.name" itemprop="image" class="img-fluid" /> 1014 <img v-if="SpecificationHelpers.GetFirstSpecificationValueOrDefault('WebPrimaryImage',product.specifications) == null" :src="'/Admin/Public/GetImage.ashx?Width=427&amp;Height=427&amp;Compression=85&amp;Crop=5&amp;fillcanvas=true&amp;Image=/Files/Images/default.jpg'" 1015 v-bind:alt="product.product.name" itemprop="image" class="img-fluid" /> 1016 </figure> 1017 <header> 1018 <h1 itemprop="name">{{product.product.name}}</h1> 1019 <p itemprop="category">{{product.product.shortDescription}}</p> 1020 <product-specification-list-view :product-specifications="product.specifications" 1021 :product-number="product.product.number" 1022 :is-spare-part="product.product.isSparePart"> 1023 </product-specification-list-view> 1024 </header> 1025 </a> 1026 <template v-if="plpClass=='basic_listview-list'"> 1027 <ul class="basic_listview-specs"> 1028 <li v-for="item in SpecificationHelpers.GetPrettyBulletPoints(product.specifications)"> 1029 {{item}} 1030 </li> 1031 </ul> 1032 @*{{ product.Product.LongDescription }}*@ 1033 </template> 1034 1035 @if (!Pageview.IsAllowedToShop()) 1036 { 1037 <footer> 1038 <a href="@NORRIQ.Common8.Razor.Navigation.GetUrlByNavigationTag("create-account")" class="btn btn-outline-secondary btn-sm"> 1039 @Translate("create account", "Create account") 1040 </a> 1041 <buying-component inline-template :selected-product="product" :initial-product="initialProduct"> 1042 <variant-list :initial-variant="initialProduct" :currently-selected="selectedProduct"></variant-list> 1043 </buying-component> 1044 </footer> 1045 } 1046 else 1047 { 1048 <buying-component inline-template :selected-product="product" :initial-product="initialProduct"> 1049 <footer itemprop="offers" itemscope="" itemtype="https://schema.org/Offer"> 1050 <variant-list :initial-variant="initialProduct" :currently-selected="selectedProduct"></variant-list> 1051 <async-price class-type="asyncprice-plp" 1052 :product="selectedProduct" 1053 :default-price="selectedProduct.product.defaultPrice.priceWithoutVat" 1054 :only-standard-price="@(Pageview.IsCurrentlyB2C().ToString().ToLower())" 1055 list-price="true" 1056 :should-emit-warranties="@((Pageview.IsAllowedToShop()).ToString().ToLower())" 1057 :force-ask-for-price="(!selectedProduct.product.isSparePart && @((Pageview.User.OnlySpareParts()).ToString().ToLower())) || @(Pageview.User.OnlyView().ToString().ToLower())"> 1058 </async-price> 1059 <add-to-basket-simple :product="selectedProduct" 1060 :unit-of-measure="'PCS'" 1061 button-class="btn btn-primary" 1062 class="addtobasketsimple-plp" 1063 :price-without-vat="currentItemPriceWithoutVat" 1064 language-id="@Pageview.Area.EcomLanguageId" 1065 :only-spare-parts="@(Pageview.User.OnlySpareParts().ToString().ToLower())" 1066 :is-marketing-user="@(Pageview.User.OnlyView().ToString().ToLower())"> 1067 </add-to-basket-simple> 1068 </footer> 1069 </buying-component> 1070 } 1071 1072 </article> 1073 1074 </script> 1075 1076 <script type="text/x-template" id="quick-search-template"> 1077 <div class="quicksearch-component"> 1078 <div class="quickorder-form"> 1079 <slot name="right-box"></slot> 1080 <div class="quickorder-box"> 1081 <h2>@Translate("Find products")</h2> 1082 <div class="quickorder-input"> 1083 <label for="quickOrderSearch">@Translate("Product name or number")</label> 1084 <input type="text" 1085 :id="id" 1086 v-model="search" 1087 @@keydown.enter="enter" 1088 @@keydown.down="down" 1089 @@keydown.up="up" 1090 @@input="onSearchInput" 1091 class="form-control form-control-lg" 1092 autocomplete="chrome-off" 1093 placeholder="@Translate("Quick order search term")" /> 1094 <label for="quickOrderQty">@Translate("Quantity")</label> 1095 <input type="number" 1096 v-model.number="quantity" 1097 @@change="chosenProduct()" 1098 @@keydown.enter="chosenProduct()" 1099 class="form-control form-control-lg" 1100 id="quickOrderQty" 1101 placeholder="0" 1102 autocomplete="chrome-off" /> 1103 1104 </div> 1105 <ul v-if="filterList.length > 0 && open" class="quickorder-list"> 1106 <li v-for="(product,index) in filterList" 1107 :class="{'active': isSelected(index)}"> 1108 <button @@click="suggestClick(index)"> 1109 {{concatNameAndNumber(product)}} 1110 </button> 1111 1112 </li> 1113 </ul> 1114 1115 <div class="quickorder-product" v-if="currentChosenProduct"> 1116 <p><strong>{{currentChosenProduct.name}}</strong><small>{{currentChosenProduct.shortDescription}}</small></p> 1117 <product-specification-list-view v-if="searchProductSpecs !== null" 1118 :product-specifications="searchProductSpecs" 1119 :product-number="currentChosenProduct.number"> 1120 </product-specification-list-view> 1121 <async-price class-type="quickorder-product-price" 1122 :product="currentChosenProduct" 1123 unit-of-measure="" 1124 :only-price="true" 1125 default-price-without-vat="0" 1126 :force-ask-for-price="(!currentChosenProduct.isSparePart && @(Pageview.User.OnlySpareParts().ToString().ToLower())) || @(Pageview.User.OnlyView().ToString().ToLower())" 1127 @@price="handlePriceUpdate"> 1128 </async-price> 1129 </div> 1130 </div> 1131 </div> 1132 <p v-if="showPriceError">@Translate("QuickOrderZeroPriceError","Can not add product with zero price")</p> 1133 <div class="quickorder-cart" v-if="productsToOrder.length > 0"> 1134 <table class="table table-striped table-flex"> 1135 <thead> 1136 <tr> 1137 <th>@Translate("Product")</th> 1138 <th>@Translate("Specifications")</th> 1139 <th>@Translate("Quantity")</th> 1140 <th class="cell-right">@Translate("Price")</th> 1141 <th>&nbsp;</th> 1142 </tr> 1143 </thead> 1144 <tbody> 1145 <tr v-for="(product,index) in productsToOrder"> 1146 <td class="cell-prod"> 1147 <strong>{{product.name}}</strong> 1148 <small>{{product.shortDescription}}</small> 1149 </td> 1150 <td class="cell-specs"> 1151 <product-specification-list-view :product-specifications="product.productSpecifications" 1152 :product-number="product.number"> 1153 </product-specification-list-view> 1154 </td> 1155 <td class="cell-specs"> 1156 <strong>{{product.quantity}}</strong> 1157 </td> 1158 <td class="cell-price cell-right"> 1159 <async-price class-type="quickorder-product-price" 1160 :product="quickOrderProductToSimpleProduct(product)" 1161 unit-of-measure="" 1162 :only-price="true" 1163 default-price-without-vat="0" 1164 @@warranty-update="setWarranty($event,product)" 1165 :force-ask-for-price="(!product.isSparePart && @(Pageview.User.OnlySpareParts().ToString().ToLower())) || @(Pageview.User.OnlyView().ToString().ToLower())"> 1166 1167 </async-price> 1168 </td> 1169 <td class="cell-trash"> 1170 <button @@click="removeOrderline(index)" aria-label="@Translate("Delete product")" class="text-danger"> 1171 <svg> 1172 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#trash-alt"></use> 1173 </svg> 1174 </button> 1175 </td> 1176 </tr> 1177 </tbody> 1178 </table> 1179 <slot name="button"></slot> 1180 1181 </div> 1182 </div> 1183 </script> 1184 1185 <script src="@NORRIQ.Common8.Razor.TimestampSource.GetSourceWithTimestamp("/Files/dist/scripts/bundle.min.js")"></script> 1186 <script> 1187 AppStart.VueProvider.init({ 1188 webApiUrl: '@System.Web.Configuration.WebConfigurationManager.AppSettings["WebApiProxyUrl"]', 1189 currencyCode: '@currencyCode', 1190 locale: '@Pageview.Area.Culture', 1191 currencyLeft: false, 1192 currencySpacing: true, 1193 currencySymbol: '@currencyCode', 1194 currencyDecimalSeparator: ',', 1195 currencyGroupSeparator: '.', 1196 currencyDecimalDigits: 2, 1197 dateFormatShort: '@Pageview.Area.Dateformat' 1198 }); 1199 </script> 1200 <script append="replace"></script> 1201 </body> 1202 </html>