Error executing template "Designs/Tefcold/_parsed/basic_Page.parsed.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
   at CompiledRazorTemplates.Dynamic.RazorEngine_85b9aadd028e4eea95615919a33877b1.Execute() in E:\Solutions\Live\Tefcold.Web\Files\Templates\Designs\Tefcold\_parsed\Basic_Page.parsed.cshtml:line 612
   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 System.Globalization 2 @using Dynamicweb 3 @using Dynamicweb.Content 4 @using Dynamicweb.Frontend; 5 @using Dynamicweb.Security.UserManagement 6 @using NLWI.Core.Factory 7 @using NORRIQ.SalesPersonLogin.Services 8 @using Dynamicweb.Ecommerce.International 9 @using Tefcold.Web.CustomCode.Extensions 10 @using Tefcold.Web.CustomCode.Items.Properties 11 @using Tefcold.Web.CustomCode.Items.Settings 12 @using Tefcold.Web.CustomCode.LanguageSwitch 13 @using Tefcold.Web.CustomCode.Razor 14 @inherits Tefcold.Web.CustomCode.Razor.TefcoldViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 15 @{ 16 //Heine: Understående kan bruges såfremt der skal tjekkes på om man er i impersonation mode: 17 var isImpersonating = ImpersonationService.IsCurrentlyImpersonating(); 18 var locationName = Pageview.User?.Name; 19 var websiteSettings = Pageview.Area.Item.ToCodeFirstItem<Websites>(); 20 LanguageService languageService = new LanguageService(); 21 var languagesJson = Newtonsoft.Json.JsonConvert.SerializeObject(languageService.GetLanguages()); 22 } 23 24 <!DOCTYPE html> 25 <html lang="@Pageview.Area.Culture"> 26 <head> 27 <meta charset='utf-8' /> 28 <meta name="description" content="@Model.Description" /> 29 <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=5, user-scalable=yes, shrink-to-fit=no" /> 30 <meta http-equiv="x-ua-compatible" content="ie=edge"> 31 @if (Model.Area.Item.GetBoolean("NoIndex")) 32 { 33 <!-- TODO: remove on launch--> 34 <meta name="robots" content="noindex, nofollow" /> 35 } 36 37 @if (!string.IsNullOrWhiteSpace(websiteSettings.HeaderScript)) 38 { 39 @websiteSettings.HeaderScript 40 } 41 42 @if (!string.IsNullOrWhiteSpace(websiteSettings.GoogleTagManagerId)) 43 { 44 <script> 45 (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': 46 new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], 47 j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 48 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); 49 })(window,document,'script','dataLayer','@websiteSettings.GoogleTagManagerId'); 50 </script> 51 } 52 53 <!-- Begin Mailchimp Signup Form --> 54 <link href="//cdn-images.mailchimp.com/embedcode/classic-10_7.css" rel="stylesheet" type="text/css"> 55 <style type="text/css"> 56 #mc_embed_signup{background:#fff; clear:left; font:14px Helvetica,Arial,sans-serif; } 57 /* Add your own Mailchimp form style overrides in your site stylesheet or in this style block. 58 We recommend moving this block and the preceding CSS link to the HEAD of your HTML file. */ 59 60 </style> 61 62 <title>@Model.Title</title> 63 @Model.MetaTags 64 @if (Model.Area.Item.GetFile("Icon") != null) 65 { 66 <link href="@Model.Area.Item.GetFile("Icon").Path" rel="icon" type="image/png"> 67 } 68 <link rel="preload" href="@NORRIQ.Common8.Razor.TimestampSource.GetSourceWithTimestamp("/Files/dist/css/Tefcold-min.css")" as="style" /> 69 <link rel="stylesheet" async href="@NORRIQ.Common8.Razor.TimestampSource.GetSourceWithTimestamp("/Files/dist/css/Tefcold-min.css")" /> 70 @*<link href="/Files/dist/css/Tefcold-min.css" rel="stylesheet" />*@ 71 </head> 72 <body> 73 @if (!string.IsNullOrWhiteSpace(websiteSettings.GoogleTagManagerId)) 74 { 75 <!-- Google Tag Manager (noscript) --> 76 <noscript> 77 <iframe src="https://www.googletagmanager.com/ns.html?id=@websiteSettings.GoogleTagManagerId" 78 height="0" width="0" style="display: none; visibility: hidden"></iframe> 79 </noscript> 80 <!-- End Google Tag Manager (noscript) --> 81 } 82 <div id="app"> 83 @{ 84 string basicNavbarPrefix = "Header "; 85 var logo = Model.Area.Item.GetFile("Logo"); 86 var currencyCode = Pageview.User?.Currency ?? Pageview.Area.EcomCurrencyId; 87 } 88 <header class="basic_navbar@(websiteSettings.EcomNav ? " has-groupsnavbar":"")" id="header"> 89 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("Notice"))) 90 { 91 <div class="notice-bar"> 92 <div class="basic_navbar-container"> 93 <p class="text-center">@Model.Area.Item.GetString("Notice")</p> 94 </div> 95 </div> 96 } 97 @if (isImpersonating) 98 { 99 <div class="impersonation-bar"> 100 <div class="basic_navbar-container"> 101 <p> 102 @Translate(basicNavbarPrefix + "debitor", "Debitor"): <b>@locationName</b> | <a href="@NORRIQ.Common8.Razor.Navigation.GetUrlByNavigationTag("impersonation-choose-customer")?action=changeuser">@Translate("Change customer")</a> 103 </p> 104 </div> 105 </div> 106 } 107 <div class="basic_navbar-main"> 108 <div class="basic_navbar-container"> 109 <a href="/" class="basic_navbar-logo" title="@Translate(basicNavbarPrefix + "Go to frontpage", "Go to frontpage")"> 110 @if (logo != null) 111 { 112 <img class="img-fluid" src="@logo.Path" alt="@Translate(basicNavbarPrefix + "Website Logo Alttext", "Website Logo Alttext")" /> 113 } 114 else 115 { 116 <i>@Translate(basicNavbarPrefix + "No logo found", "No logo found, please configure it in the Dynamicweb Administration")</i> 117 } 118 </a> 119 <collapse-hack inline-template> 120 <b-collapse class="basic_navbar-navigation" id="basic_navigation" tag="@(websiteSettings.EcomNav ? "div" : "nav")"> 121 @if (!websiteSettings.EcomNav) 122 { 123 @RenderNavigation(new { Template = "basic_navbar.xslt", Expandmode = "all", StartLevel = 1, EndLevel = 4 }) 124 } 125 else 126 { 127 @RenderNavigation(new { Template = "basic_navbar-extreme.xslt", Expandmode = "all", StartLevel = 1, EndLevel = 4 }) 128 } 129 <ul class="basic_navbar-subnav"> 130 <li> 131 <button type="button" 132 v-b-toggle.languages 133 aria-label="@Translate(basicNavbarPrefix + "Choose Language", "Choose Language")" 134 title="@Translate(basicNavbarPrefix + "Choose Language", "Choose Language")"> 135 <img src="/Admin/Public/GetImage.ashx?Width=32&amp;Compression=85&amp;Format=webp&amp;Quality=85&amp;Image=@Pageview.Area.Flag32X32" alt="@Pageview.Area.CultureInfo.EnglishName" /> 136 <span class="sr-only">@Pageview.Area.CultureInfo.EnglishName</span> 137 </button> 138 </li> 139 <li> 140 <button v-b-toggle.contacts 141 type="button" 142 aria-label="@Translate(basicNavbarPrefix + "Show contacts", "Show contacts")" 143 title="@Translate(basicNavbarPrefix + "Show contacts", "Show contacts")"> 144 <svg> 145 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#phone-alt"></use> 146 </svg> 147 <span class="sr-only">@Translate(basicNavbarPrefix + "Contacts", "Contacts")</span> 148 </button> 149 </li> 150 <li> 151 <button v-b-toggle.customer-center 152 type="button" 153 aria-label="@Translate(basicNavbarPrefix + "Show Webshop Login", "Show Webshop Login")" 154 title="@Translate(basicNavbarPrefix + "Show Webshop Login", "Show Webshop Login")"> 155 @if (Pageview.User == null) 156 { 157 <svg> 158 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#user"></use> 159 </svg> 160 } 161 else 162 { 163 <svg style="width: 30px; height: 30px;"> 164 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#user-check"></use> 165 </svg> 166 } 167 <span class="sr-only">@Translate(basicNavbarPrefix + "Login", "Login")</span> 168 </button> 169 </li> 170 @if (Pageview.User != null) 171 { 172 <li> 173 <a href="@NORRIQ.Common8.Razor.Navigation.GetUrlByNavigationTag("quickorder")" title="@Translate(basicNavbarPrefix + "Quickorder", "Quickorder")"> 174 <svg width="28px" height="28px"> 175 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#quickorder"></use> 176 </svg> 177 <span class="sr-only">@Translate(basicNavbarPrefix + "Quickorder", "Quickorder")</span> 178 </a> 179 </li> 180 } 181 @if (Pageview.User != null && Pageview.User.AllowMediaBank()) 182 { 183 @*<media-bank inline-template> 184 <li> 185 <form id="mediabankform" action="https://imagebank.tefcold.com/Home/LoginUser" method="post"> 186 <input id="mediabankformname" type="hidden" name="username" /> 187 <input id="mediabankformpassword" type="hidden" name="password" /> 188 <input type="hidden" value="false" name="persistent" /> 189 </form> 190 <a v-on:click="connect($event)" href="#" title="@Translate(basicNavbarPrefix + "Mediabank", "Mediabank")"> 191 <svg width="28px" height="28px" fill="currentColor"> 192 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#photo-video"></use> 193 </svg> 194 <span class="sr-only">@Translate(basicNavbarPrefix + "Mediabank", "Mediabank")</span> 195 </a> 196 </li> 197 </media-bank>*@ 198 <li> 199 <a href="@Translate(basicNavbarPrefix + "Mediabank Link", "http://media.tefcold.com")" target="_blank" title="@Translate(basicNavbarPrefix + "Mediabank", "Mediabank")"> 200 <svg width="28px" height="28px" fill="currentColor"> 201 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#photo-video"></use> 202 </svg> 203 <span class="sr-only">@Translate(basicNavbarPrefix + "Mediabank", "Mediabank")</span> 204 </a> 205 </li> 206 } 207 <li> 208 <button type="button" 209 class="btn-close" 210 @@click="collapseAll" 211 aria-label="@Translate(basicNavbarPrefix + "Close Navigation", "Close Navigation")" 212 title="@Translate(basicNavbarPrefix + "Close Navigation", "Close Navigation")"> 213 <span></span> 214 <span></span> 215 </button> 216 </li> 217 </ul> 218 </b-collapse> 219 </collapse-hack> 220 @if (websiteSettings.SearchAheadActivated) 221 { 222 <instant-search base-class="basic_navbar-search" :min-search-length="@websiteSettings.KeyStrokes" :number-of-hits="@websiteSettings.SearchHits" :product-search-paragraph-id="@websiteSettings.ProductSearchParagraphId" 223 :content-search-paragraph-id="@websiteSettings.ContentSearchParagraphId"></instant-search> 224 } 225 else 226 { 227 228 <form class="basic_navbar-search" action="/Default.aspx"> 229 <search-shortcut inline-template> 230 <div style="display: none"></div> 231 </search-shortcut> 232 <label for="productsearch">Search</label> 233 <input name="ID" type="hidden" value="@NORRIQ.Common8.Razor.Navigation.GetPageIdByNavigationTag("searchresult")"> 234 <input name="PageSize" type="hidden" value="99" /> 235 <input type="search" placeholder="@Translate(basicNavbarPrefix + "Search", "Search")" id="productsearch" name="productsearch"> 236 <button type="submit"> 237 <span class="sr-only">@Translate(basicNavbarPrefix + "Search", "Search")</span> 238 <svg> 239 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#search"></use> 240 </svg> 241 </button> 242 </form> 243 } 244 245 <ul class="basic_navbar-functions"> 246 <li class="basic_navbar-languages relative"> 247 <button type="button" v-b-toggle.languages aria-label="@Translate(basicNavbarPrefix + "Choose Language", "Choose Language")" title="@Translate(basicNavbarPrefix + "Choose Language", "Choose Language")"> 248 <span class="sr-only">@Pageview.Area.CultureInfo.EnglishName</span> 249 @if (Pageview.Area.Culture == "en-GB") 250 { 251 <img src="/Admin/Public/GetImage.ashx?Width=32&amp;Compression=85&amp;Format=webp&amp;Quality=85&amp;Image=/Files/Images/globe-flag.png" alt="@Pageview.Area.Culture - Flag" width="32" height="32" /> 252 } 253 else 254 { 255 <img src="/Admin/Public/GetImage.ashx?Width=32&amp;Compression=85&amp;Format=webp&amp;Quality=85&amp;Image=@Pageview.Area.Flag32X32" alt="@Pageview.Area.Culture - Flag" width="32" height="32" /> 256 } 257 @*@if (Pageview.Area.Culture == "en-GB") 258 { 259 <svg width="32" height="32" fill="currentColor"> 260 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#globe"></use> 261 </svg> 262 } 263 else 264 { 265 <img src="@Pageview.Area.Flag32X32" alt="@Pageview.Area.Culture - Flag" /> 266 }*@ 267 </button> 268 <b-collapse id="languages" class="basic_navbar-dropdown" accordion="header" v-auto-close> 269 <div class="basic_navbar-body languages-dropdown"> 270 <ul class="master-area"> 271 <li class="head"> 272 @if (Pageview.AreaID == 12 || Pageview.AreaID == 13) 273 { 274 <strong>@Translate(basicNavbarPrefix + "Tefcold Cz Languages", "TEFCOLD CZ s.r.o.")</strong> 275 } 276 else 277 { 278 <strong>@Translate(basicNavbarPrefix + "Tefcol Group Languages", "TEFCOLD A/S")</strong> 279 } 280 </li> 281 @foreach (var lang in Model.Languages) 282 { 283 @RenderLanguage(lang) 284 } 285 </ul> 286 <ul class="sub-area"> 287 288 @foreach (var masterArea in Dynamicweb.Services.Areas.GetMasterAreas().Where(a => !Model.Languages.Any(s => a.ID == s.ID))) 289 { 290 var masterAreaAndLanguages = new List<Area>(); 291 masterAreaAndLanguages.Add(masterArea); 292 masterAreaAndLanguages.AddRange(masterArea.Languages); 293 294 var relevantLanguages = masterAreaAndLanguages.Select(x => 295 new { 296 Area = x , 297 Settings = x.Item.ToCodeFirstItem<Websites>() 298 }). 299 Where(x =>( x.Area.Active && (!x.Settings.NoIndex && !websiteSettings.NoIndex) || websiteSettings.NoIndex)) 300 .ToList(); ; 301 302 if (relevantLanguages.Any()) 303 { 304 305 <li class="head"> 306 @if (Pageview.AreaID == 12 || Pageview.AreaID == 13) 307 { 308 <strong>@Translate(basicNavbarPrefix + "Tefcol Group Languages", "TEFCOLD A/S")</strong> 309 } 310 else 311 { 312 <strong>@Translate(basicNavbarPrefix + "Tefcold Cz Languages", "TEFCOLD CZ s.r.o.")</strong> 313 } 314 </li> 315 316 317 318 if (Pageview.AreaID != masterArea.ID) 319 { 320 <li class="@masterArea.ID"> 321 @renderArea(masterArea, websiteSettings) 322 </li> 323 } 324 325 foreach (var lang in relevantLanguages.Where(x => x.Area.ID != masterArea.ID && x.Area.ID != Pageview.AreaID)) 326 { 327 <li class="is-lang"> 328 @renderArea(lang.Area, websiteSettings) 329 </li> 330 } 331 } 332 333 334 } 335 336 </ul> 337 <ul class="uk-area"> 338 <li class="head"><strong>@Translate(basicNavbarPrefix + "Tefcol UK Languages", "TEFCOLD UK")</strong></li> 339 <li> 340 <a href="@Translate(basicNavbarPrefix + "Tefcold UK Url", "//tefcold.co.uk")" target="_blank"> 341 342 <img src="/Admin/Public/GetImage.ashx?Width=32&amp;Compression=85&amp;Format=webp&amp;Quality=85&amp;Background=dee0e2&amp;Image=/Admin/Images/Flags/flag_GB.png" alt="en-GB - Flag" loading="lazy" /> 343 <span>@Translate(basicNavbarPrefix + "Tefcold UK Label", "tefcold.co.uk")</span> 344 </a> 345 </li> 346 </ul> 347 </div> 348 </b-collapse> 349 </li> 350 <li class="basic_navbar-contacts @(Pageview.User != null ? "static" : "relative")"> 351 <button v-b-toggle.contacts 352 type="button" 353 aria-label="@Translate(basicNavbarPrefix + "Show contacts", "Show contacts")" 354 title="@Translate(basicNavbarPrefix + "Show contacts", "Show contacts")"> 355 <svg> 356 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#phone-alt"></use> 357 </svg> 358 <span class="sr-only">@Translate(basicNavbarPrefix + "Contacts", "Contacts")</span> 359 </button> 360 @{ 361 var impersonationGroupId = websiteSettings.ImpersonationGroup.FirstOrDefault(); 362 IEnumerable<User> users = null; 363 IEnumerable<User> salesPersons = new List<User>(); 364 if (Pageview.User != null) 365 { 366 var salesPersonCode = Pageview.User.CustomFieldValues.FirstOrDefault(field => field.CustomField.Name == "Sales Person Code"); 367 var salesPersonsInitials = salesPersonCode?.Value?.ToString().Split(',') ?? new string[] { }; 368 salesPersonsInitials = salesPersonsInitials.Select(x => x.ToLower()).ToArray(); 369 370 if (!string.IsNullOrEmpty(impersonationGroupId)) 371 { 372 users = Group.GetGroupByID(int.Parse(impersonationGroupId)).Users; 373 } 374 if (users == null || Pageview.User == null) 375 { 376 salesPersons = new List<User>(); 377 } 378 else 379 { 380 salesPersons = users.Where(user => salesPersonsInitials.Contains(user.Email.ToLower().Split('@').FirstOrDefault() ?? "")); 381 } 382 } 383 384 } 385 <b-collapse id="contacts" class="@(Pageview.User != null ? "basic_navbar-megamenu" : "basic_navbar-dropdown")" v-auto-close accordion="header"> 386 <div class="basic_navbar-body"> 387 @if (Pageview.User != null) 388 { 389 if (salesPersons.Any()) 390 { 391 <p class="tefcold_salesperson-byline h1">@Translate(basicNavbarPrefix + "Your Sales Team", "Your Sales Team")</p> 392 } 393 foreach (var salesPerson in salesPersons) 394 { 395 <div class="tefcold_salesperson" itemscope itemtype="http://schema.org/Person"> 396 <figure> 397 <img src="@salesPerson.Image" class="img-fluid" alt="@salesPerson.Name" itemprop="image" loading="lazy" /> 398 </figure> 399 <p itemprop="name">@salesPerson.Name</p> 400 <p itemprop="jobTitle">@salesPerson.JobTitle</p> 401 <p itemprop="telephone"> 402 <svg> 403 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#phone-alt"></use> 404 </svg> 405 <span>@salesPerson.PhonePrivate</span> 406 </p> 407 <p itemprop="telephone"> 408 <svg> 409 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#mobile-alt"></use> 410 </svg> 411 <span>@salesPerson.PhoneMobile</span> 412 </p> 413 <a href="@("mailto:" + @salesPerson.Email)" itemprop="email"> 414 <svg> 415 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#envelope"></use> 416 </svg> 417 <span>@salesPerson.Email</span> 418 </a> 419 </div> 420 } 421 } 422 <ul> 423 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("PhoneLabel")) 424 && !string.IsNullOrEmpty(Model.Area.Item.GetString("Phonenumber"))) 425 { 426 <li class="head"> 427 <strong> 428 @Model.Area.Item.GetString("PhoneLabel") 429 </strong> 430 <strong> 431 @Model.Area.Item.GetString("Phonenumber") 432 </strong> 433 </li> 434 } 435 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("ContactPage")) 436 && !string.IsNullOrEmpty(Model.Area.Item.GetString("ContactLabel"))) 437 { 438 <li> 439 <a href="@Model.Area.Item.GetString("ContactPage")"> 440 @Model.Area.Item.GetString("ContactLabel") 441 </a> 442 </li> 443 } 444 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("SalesPage")) 445 && !string.IsNullOrEmpty(Model.Area.Item.GetString("SalesLabel"))) 446 { 447 <li> 448 <a href="@Model.Area.Item.GetString("SalesPage")"> 449 @Model.Area.Item.GetString("SalesLabel") 450 </a> 451 </li> 452 } 453 </ul> 454 455 </div> 456 </b-collapse> 457 </li> 458 <li class="basic_navbar-user"> 459 <button v-b-toggle.customer-center type="button" aria-label="@Translate(basicNavbarPrefix + "Show Webshop Login", "Show Webshop Login")" title="@Translate(basicNavbarPrefix + "Show Webshop Login", "Show Webshop Login")"> 460 @if (Pageview.User == null) 461 { 462 <svg> 463 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#user"></use> 464 </svg> 465 } 466 else 467 { 468 <svg style="width: 30px; height: 30px;"> 469 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#user-check"></use> 470 </svg> 471 } 472 <span class="sr-only">@Translate(basicNavbarPrefix + "Login", "Login")</span> 473 </button> 474 475 476 <b-collapse id="customer-center" class="basic_navbar-dropdown" accordion="header" v-auto-close> 477 <div class="basic_navbar-body"> 478 @if (Pageview.User == null) 479 { 480 <head-login-form inline-template> 481 <form name="ExtUserForm" id="loginForm" method="post" class="form" role="form" v-on:submit="submitLogin"> 482 <p> 483 <strong> 484 @Translate(basicNavbarPrefix + "Webshop Login", "Webshop Login") 485 </strong> 486 </p> 487 <input type="hidden" name="ID" id="ID" value="" /> 488 <div class="form-group"> 489 <label for="Username">@Translate(basicNavbarPrefix + "Username", "Username")</label> 490 <input id="Username" v-model="username" name="Username" type="text" value="" class="form-control" autocomplete="off"> 491 </div> 492 <div class="form-group"> 493 <label for="Password">@Translate(basicNavbarPrefix + "Password", "Password")</label> 494 <input id="Password" v-model="password" name="Password" type="password" value="" class="form-control" autocomplete="off"> 495 </div> 496 <div v-if="loginFailed"> 497 <p class="alert alert-warning"> 498 @Translate("Login failed", "Invalid credentials") 499 </p> 500 </div> 501 <div v-if="redirecting" class="alert alert-warning"> 502 <p> 503 @Translate("Login wrong shop", "Your login belongs to another language, redirecting you in:") 504 505 </p> 506 <span class="basic_login"><b>{{counter}}</b></span> 507 </div> 508 509 <div class="basic_login-buttons"> 510 <button type="submit" role="button" class="btn btn-primary btn-block" v-bind:class='{"loading": loading}' v-on:click="loading=true" id="loginBtn"> 511 @Translate(basicNavbarPrefix + "Login", "Login") 512 </button> 513 </div> 514 </form> 515 </head-login-form> 516 <ul> 517 <li> 518 <a href="/Default.aspx?ID=@NORRIQ.Common8.Razor.Navigation.GetPageIdByNavigationTag("forgotpassword")&amp;LoginAction=Recovery"> 519 @Translate(basicNavbarPrefix + "Forgot password", "Forgot password") 520 </a> 521 </li> 522 <li> 523 <a href="@NORRIQ.Common8.Razor.Navigation.GetUrlByNavigationTag("contact")"> 524 @Translate(basicNavbarPrefix + "Create Webshop Account", "Create Webshop Account") 525 </a> 526 </li> 527 </ul> 528 } 529 else 530 { 531 <div class="active-user"> 532 <p><strong>@Pageview.User.Name</strong></p> 533 <p> 534 <a v-clear-cache:click.user href='/admin/public/extranetlogoff.aspx?ID=@(NORRIQ.Common8.Razor.Navigation.GetPageIdByNavigationTag("home"))'> 535 @Translate(basicNavbarPrefix + "Sign out", "Sign out") 536 </a> 537 </p> 538 </div> 539 @RenderNavigation(new { Template = "basic_Footer.xslt", Expandmode = "all", StartLevel = 1, EndLevel = 4, NavigationTag = "customer-portal" }) 540 } 541 </div> 542 </b-collapse> 543 </li> 544 @if (Pageview.User != null && Pageview.User.AllowMediaBank()) 545 { 546 @*<media-bank inline-template> 547 <li> 548 <form id="mediabankform" action="https://imagebank.tefcold.com/Home/LoginUser" method="post"> 549 <input id="mediabankformname" type="hidden" name="username" /> 550 <input id="mediabankformpassword" type="hidden" name="password" /> 551 <input type="hidden" value="false" name="persistent" /> 552 </form> 553 <a v-on:click="connect($event)" href="#" title="@Translate(basicNavbarPrefix + "Mediabank", "Mediabank")"> 554 <svg width="28px" height="28px" fill="currentColor"> 555 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#photo-video"></use> 556 </svg> 557 <span class="sr-only">@Translate(basicNavbarPrefix + "Mediabank", "Mediabank")</span> 558 </a> 559 </li> 560 </media-bank>*@ 561 <li> 562 <a href="@Translate(basicNavbarPrefix + "Mediabank Link", "http://media.tefcold.com")" target="_blank" title="@Translate(basicNavbarPrefix + "Mediabank", "Mediabank")"> 563 <svg width="28px" height="28px" fill="currentColor"> 564 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#photo-video"></use> 565 </svg> 566 <span class="sr-only">@Translate(basicNavbarPrefix + "Mediabank", "Mediabank")</span> 567 </a> 568 </li> 569 570 } 571 @if (Pageview.User != null) 572 { 573 <li class="basic_navbar-quick"> 574 <a href="@NORRIQ.Common8.Razor.Navigation.GetUrlByNavigationTag("quickorder")" title="@Translate(basicNavbarPrefix + "Quickorder", "Quickorder")"> 575 <svg width="28px" height="28px"> 576 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#quickorder"></use> 577 </svg> 578 <span class="sr-only">@Translate(basicNavbarPrefix + "Quickorder", "Quickorder")</span> 579 </a> 580 </li> 581 } 582 @if (websiteSettings.b2cshopping || Pageview.User != null) 583 { 584 <cart-icon cartlink="@NORRIQ.Common8.Razor.Navigation.GetUrlByNavigationTag("checkout")"></cart-icon> 585 } 586 <li class="basic_navbar-toggle"> 587 <button type="button" 588 aria-label="@Translate(basicNavbarPrefix + "Open main navigation", "Open main navigation")" 589 title="@Translate(basicNavbarPrefix + "Open main navigation", "Open main navigation")" 590 v-b-toggle.basic_navigation> 591 <svg width="28px" height="28px"> 592 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#bars"></use> 593 </svg> 594 <span class="sr-only">@Translate(basicNavbarPrefix + "Open main navigation", "Open main navigation")</span> 595 </button> 596 </li> 597 </ul> 598 599 </div> 600 </div> 601 </header> 602 @using Dynamicweb.Frontend; 603 @inherits Tefcold.Web.CustomCode.Razor.TefcoldViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 604 605 @Title("Page") 606 @Description("Default page template") 607 @{ 608 string basicPagePrefix = "Page "; 609 } 610 @if (Pageview.IsCurrentUserAllowed) 611 { 612 var pageLayout = !string.IsNullOrEmpty(Model.Item.GetValue<ListViewModel>("Layout").SelectedValue) ? Model.Item.GetValue<ListViewModel>("Layout").SelectedValue : "content-page-sidebar"; 613 var pageClass = pageLayout == "page-wide" ? "basic_page-wide" : "basic_page"; 614 if (!Model.Item.GetBoolean("HideBreadcrumb")) 615 { 616 if (Model.Area.Item.GetFile("TopImage") != null) 617 { 618 <figure> 619 <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" /> 620 </figure> 621 } 622 @RenderNavigation(new { Template = "basic_Breadcrumb.xslt", Expandmode = "all", StartLevel = 1, EndLevel = 5 }) 623 } 624 <main class="@pageClass"> 625 @if (pageLayout == "content-page-sidebar" || pageLayout == "module-page-sidebar") 626 { 627 <aside class="basic_page-sidebar"> 628 @RenderNavigation(new { Template = "basic_Page.xslt", StartLevel = 1, EndLevel = 3 }) 629 </aside> 630 <div class="basic_page-content"> 631 @if (pageLayout == "content-page-sidebar" && !string.IsNullOrEmpty(Model.Item.GetString("Title").ToString()) || !string.IsNullOrEmpty(Model.Item.GetString("Text").ToString())) 632 { 633 <section class="basic_paragraph"> 634 @if (!string.IsNullOrEmpty(Model.Item.GetString("Title").ToString())) 635 { 636 <header> 637 <h1> 638 @Model.Item.GetString("Title") 639 </h1> 640 </header> 641 } 642 @if (Model.Item.GetFile("Image") != null) 643 { 644 <figure> 645 <img src="@Model.Item.GetFile("Image").Path" alt="@Model.Item.GetString("Title")" class="img-fluid" /> 646 </figure> 647 } 648 @if (!string.IsNullOrEmpty(Model.Item.GetString("Text").ToString())) 649 { 650 @Model.Item.GetString("Text") 651 } 652 </section> 653 } 654 @RenderPlaceholder() 655 </div> 656 } 657 else 658 { 659 @RenderPlaceholder() 660 } 661 </main> 662 } 663 else 664 { 665 <main class="basic_page"> 666 @RenderPlaceholder() 667 </main> 668 } 669 @helper RenderPlaceholder() 670 { 671 @Model.Placeholder("Content", "Content", "unwrap:true;default:true") 672 if (!String.IsNullOrEmpty(Model.Placeholder("Boxed"))) 673 { 674 <div class="grouped"> 675 @Model.Placeholder("Boxed", "Grouped Content", "unwrap:true") 676 </div> 677 } 678 } 679 680 @{ 681 string footerPrefix = "Footer "; 682 } 683 <footer class="basic_footer"> 684 <div class="basic_footer-wrap basic_footer-main"> 685 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("FooterOneTitle")) && !string.IsNullOrEmpty(Model.Area.Item.GetString("FooterOneText"))) 686 { 687 <div class="basic_footer-box"> 688 <div class="basic_footer-head" role="button" v-b-toggle.footer-one> 689 <h3>@Model.Area.Item.GetString("FooterOneTitle")</h3> 690 </div> 691 <b-collapse id="footer-one" class="basic_footer-collapse"> 692 <div class="basic_footer-body"> 693 @Model.Area.Item.GetString("FooterOneText") 694 </div> 695 </b-collapse> 696 </div> 697 } 698 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("FooterTwoTitle")) 699 && !string.IsNullOrEmpty(Model.Area.Item.GetString("FooterTwoText")) 700 || !string.IsNullOrEmpty(Model.Area.Item.GetString("FooterTwoTag"))) 701 { 702 <div class="basic_footer-box"> 703 <div class="basic_footer-head" role="button" v-b-toggle.footer-two> 704 <h3>@Model.Area.Item.GetString("FooterTwoTitle")</h3> 705 </div> 706 <b-collapse id="footer-two" class="basic_footer-collapse"> 707 <div class="basic_footer-body"> 708 @Model.Area.Item.GetString("FooterTwoText") 709 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("FooterTwoTag"))) 710 { 711 @RenderNavigation(new { Template = "basic_Footer.xslt", Expandmode = "all", StartLevel = 1, EndLevel = 4, NavigationTag = @Model.Area.Item.GetString("FooterTwoTag").ToString() }) 712 } 713 </div> 714 </b-collapse> 715 </div> 716 } 717 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("FooterThreeTitle")) 718 && !string.IsNullOrEmpty(Model.Area.Item.GetString("FooterThreeText")) 719 || !string.IsNullOrEmpty(Model.Area.Item.GetString("FooterThreeTag"))) 720 { 721 <div class="basic_footer-box"> 722 <div class="basic_footer-head" role="button" v-b-toggle.footer-three> 723 <h3>@Model.Area.Item.GetString("FooterThreeTitle")</h3> 724 </div> 725 <b-collapse id="footer-three" class="basic_footer-collapse"> 726 <div class="basic_footer-body"> 727 @Model.Area.Item.GetString("FooterThreeText") 728 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("FooterThreeTag"))) 729 { 730 @RenderNavigation(new { Template = "basic_Footer.xslt", Expandmode = "all", StartLevel = 1, EndLevel = 4, NavigationTag = @Model.Area.Item.GetString("FooterThreeTag").ToString() }) 731 } 732 </div> 733 </b-collapse> 734 </div> 735 } 736 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("FooterFourTitle")) && !string.IsNullOrEmpty(Model.Area.Item.GetString("FooterFourText"))) 737 { 738 <div class="basic_footer-box"> 739 <div class="basic_footer-head" role="button" v-b-toggle.footer-four> 740 <h3>@Model.Area.Item.GetString("FooterFourTitle")</h3> 741 </div> 742 <b-collapse id="footer-four" class="basic_footer-collapse"> 743 <div class="basic_footer-body"> 744 @Model.Area.Item.GetString("FooterFourText") 745 </div> 746 </b-collapse> 747 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("FacebookUrl")) 748 || !string.IsNullOrEmpty(Model.Area.Item.GetString("LinkedInUrl")) 749 || !string.IsNullOrEmpty(Model.Area.Item.GetString("YoutubeUrl"))) 750 { 751 <div class="some"> 752 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("FacebookUrl"))) 753 { 754 <a href="@Model.Area.Item.GetString("FacebookUrl")" target="_blank" aria-label="Facebook" rel="noreferrer"> 755 <svg> 756 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#facebook-square"></use> 757 </svg> 758 </a> 759 } 760 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("LinkedInUrl"))) 761 { 762 <a href="@Model.Area.Item.GetString("LinkedInUrl")" target="_blank" aria-label="LinkedIn" rel="noreferrer"> 763 <svg> 764 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#linkedin"></use> 765 </svg> 766 </a> 767 } 768 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("YoutubeUrl"))) 769 { 770 <a href="@Model.Area.Item.GetString("YoutubeUrl")" target="_blank" aria-label="Youtube" rel="noreferrer"> 771 <svg> 772 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#youtube-square"></use> 773 </svg> 774 </a> 775 } 776 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("SmileyUrl"))) 777 { 778 <a href="@Model.Area.Item.GetString("SmileyUrl")" target="_blank" aria-label="@Translate(footerPrefix + "smiley", "Elite Smiley")" rel="noreferrer"> 779 <svg> 780 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#happy-smiley"></use> 781 </svg> 782 </a> 783 } 784 </div> 785 } 786 </div> 787 } 788 </div> 789 @if (Model.Area.Item.GetFile("GroupLogo") != null) 790 { 791 <div class="basic_footer-group"> 792 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("GroupLogo"))) 793 { 794 <a href="@Model.Area.Item.GetString("GroupLink")" target="_blank" title="@Translate(footerPrefix + "tefcold group logo alt", "Part of Tefcold Group")"> 795 <img src="@Model.Area.Item.GetFile("GroupLogo").Path" class="img-fluid" alt="@Translate(footerPrefix + "tefcold group logo alt", "Part of Tefcold Group")" /> 796 </a> 797 } 798 else 799 { 800 <img src="@Model.Area.Item.GetFile("GroupLogo").Path" class="img-fluid" alt="@Translate(footerPrefix + "tefcold group logo alt", "Part of Tefcold Group")" /> 801 } 802 </div> 803 } 804 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("FooterCopyright"))) 805 { 806 807 <div class="basic_footer-sub"> 808 <div class="basic_footer-wrap"> 809 810 <p> 811 &copy; @DateTime.Now.Year @Model.Area.Item.GetString("FooterCopyright") 812 </p> 813 @RenderNavigation(new { Template = "basic_Footer.xslt", Expandmode = "all", StartLevel = 1, EndLevel = 4, NavigationTag = "footer" }) 814 815 @if (Model.Area.Item.GetValue<ListViewModel>("Cards").SelectedValues.Any()) 816 { 817 <div class="text-center cards"> 818 @foreach (var cards in Model.Area.Item.GetValue<ListViewModel>("Cards").SelectedValues) 819 { 820 <img src="/Files/Images/cards/@cards" alt="@cards.Split('.').First()" loading="lazy" /> 821 } 822 </div> 823 } 824 825 </div> 826 </div> 827 } 828 </footer> 829 <compare-banner class="comparison-footer" inline-template> 830 <div v-if="productsToCompare >= 1" class="comparison-footer"> 831 @{ 832 string comparisonFooterPrefix = "Comparison "; 833 } 834 <template v-if="productsToCompare >= 2"> 835 <a href="@NORRIQ.Common8.Razor.Navigation.GetUrlByNavigationTag("compare")" class="btn btn-primary btn-lg btn-block"> 836 <svg class="icon"> 837 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#balance-scale"></use> 838 </svg> 839 <span> 840 @Translate(comparisonFooterPrefix + "Click to compare", "Click to compare") 841 <strong>{{productsToCompare}}</strong> 842 @Translate(comparisonFooterPrefix + "products", "products") 843 </span> 844 </a> 845 </template> 846 <template v-else> 847 <a href="@NORRIQ.Common8.Razor.Navigation.GetUrlByNavigationTag("compare")" class="btn btn-primary btn-lg btn-block no-click"> 848 <svg class="icon"> 849 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#balance-scale"></use> 850 </svg> 851 <span> 852 @Translate(comparisonFooterPrefix + "You need 2 product to compare", "You need <strong>2</strong> products to compare") 853 </span> 854 </a> 855 </template> 856 </div> 857 </compare-banner> 858 <basic-alert inline-template alertmessage='@Translate("Internet Explore Alert Message", "Website does not work properly on Internet Explorer, change browser for optimal user experience")' sessionstoragekey='IEHasBeenAlert'> 859 <div></div> 860 </basic-alert> 861 </div> 862 863 @helper RenderLanguage(PageLanguageViewModel lang) 864 { 865 if (Pageview.AreaID == lang.ID) 866 { 867 return; 868 869 } 870 871 if (Pageview.AreaID == lang.ID) 872 { 873 return; 874 875 } 876 877 var langCode = lang.Culture.Split('-').Last(); 878 var cultureInfo = CultureInfo.GetCultureInfo(lang.Culture); 879 var language = cultureInfo.NativeName.Split('(')[0]; 880 var url = SearchEngineFriendlyURLs.GetFriendlyUrl(lang.Page.ID); 881 var query = System.Web.HttpUtility.ParseQueryString(System.Web.HttpContext.Current.Request.QueryString.ToString()); 882 var allowedQuery = new HashSet<string> { "groupid", "productid", "variantid" }; 883 var shopIdSplit = "-at-SHOP"; 884 var shopId = Services.Pages.GetPage(lang.Page.ID).Area.EcomShopId; 885 foreach (var kv in query.AllKeys) 886 { 887 if (kv != null && allowedQuery.Contains(kv.ToLower())) 888 { 889 var queryValue = query[kv]; 890 var indexOfShopId = queryValue.IndexOf(shopIdSplit, StringComparison.InvariantCultureIgnoreCase); 891 if (indexOfShopId > 0) 892 { 893 var withOutShopId = queryValue.Substring(0, indexOfShopId); 894 query[kv] = withOutShopId + "-at-" + shopId; 895 } 896 } 897 else 898 { 899 query.Remove(kv); 900 } 901 } 902 903 904 var langArea = Dynamicweb.Services.Areas.GetArea(lang.ID); 905 var protocol = langArea.SslMode == 2 ? "https:" : "http"; 906 var host = lang.PrimaryDomain; 907 908 if (string.IsNullOrWhiteSpace(host)) 909 { 910 var domains = langArea.Domain.Split(new[] { "\n" }, StringSplitOptions.RemoveEmptyEntries).Select(s => s.Trim()); 911 host = (domains.FirstOrDefault(s => !s.Equals("localhost")) ?? "").TrimEnd('/'); 912 } 913 var urlencodedQuery = $"{protocol}://{host}{url}{(query.HasKeys() ? "?" + query.ToString() : "")}"; 914 915 <li> 916 <a href="@urlencodedQuery"> 917 @if (lang.Culture == "en-GB") 918 { 919 <img src="/Files/Images/globe-flag.png" alt="@lang.Culture - Flag" width="32" height="32" loading="lazy" /> 920 } 921 else 922 { 923 <img src="/Admin/Public/GetImage.ashx?Width=32&amp;Compression=85&amp;Format=webp&amp;Quality=85&amp;Image=/Admin/Images/Flags/flag_@(langCode).png" alt="@lang.Culture - Flag" width="32" height="32" loading="lazy" /> 924 } 925 @*@if (lang.Culture == "en-GB") 926 { 927 <svg width="32" height="32" fill="#3a3b3c"> 928 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#globe"></use> 929 </svg> 930 } 931 else 932 { 933 <img src="/Admin/Images/Flags/flag_@(langCode).png" alt="@lang.Culture - Flag" loading="lazy" /> 934 }*@ 935 <span>@Translate("lang_" + lang.Culture.Split('-').First(), lang.Culture.Split('-').First())</span> 936 </a> 937 </li> 938 } 939 940 941 @helper renderArea(Area lang, Websites websiteSettings) 942 { 943 var protocol = lang.SslMode == 2 ? "https:" : "http"; 944 var host = lang.DomainLock; 945 string countryCode = lang.Culture.Split('-').Last(); 946 if (string.IsNullOrWhiteSpace(host)) 947 { 948 var domains = lang.Domain.Split(new[] { "\n" }, StringSplitOptions.RemoveEmptyEntries).Select(s => s.Trim()); 949 host = (domains.FirstOrDefault(s => !s.Equals("localhost")) ?? "").TrimEnd('/'); 950 } 951 var langUrl = $"{protocol}://{host}"; 952 var langSettings = lang.Item.ToCodeFirstItem<Websites>(); 953 if (langSettings.NoIndex && !websiteSettings.NoIndex) 954 { 955 var pageId = NORRIQ.Common8.Razor.Navigation.GetPageIdByNavigationTag(countryCode + "Redirect"); 956 langUrl = pageId > 0 ? $"/Default.aspx?ID={pageId}" : ""; 957 } 958 <a href="@langUrl"> 959 @if (lang.Culture == "en-GB") 960 { 961 <img src="/Files/Images/globe-flag.png" alt="@lang.Culture - Flag" width="32" height="32" class="img-fluid" loading="lazy" /> 962 } 963 else 964 { 965 <img src="/Admin/Images/Flags/flag_@(countryCode).png" alt="@lang.Culture - Flag" width="32" height="32" class="img-fluid" loading="lazy" /> 966 } 967 <span>@Translate("lang_" + lang.Culture.Split('-').First(), lang.Culture.Split('-').First())</span> 968 </a> 969 970 } 971 972 <script type="text/x-template" id="cart-icon-template"> 973 @{ 974 string cartIconPrefix = "Minicart "; 975 } 976 <li> 977 <a :href="cartlink" title="@Translate(cartIconPrefix + "Checkout", "Checkout")"> 978 <svg> 979 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#shopping-cart"></use> 980 </svg> 981 <span class="label">@Translate(cartIconPrefix + "Checkout", "Checkout")</span> 982 <strong v-if="!cartEmpty" class="cart-quantity">{{quantity}}</strong> 983 </a> 984 </li> 985 </script> 986 987 988 989 <script type="text/x-template" id="basic-facet-filter-template"> 990 @{ 991 string basicFacetPrefix = "Filter "; 992 } 993 <aside> 994 <template v-if="HasActiveFilter()"> 995 996 <p id="selected-filter-label" class="sr-only"> 997 @Translate(basicFacetPrefix + "Active", "Active") 998 </p> 999 <div class="basic_filter-active" aria-labelledby="selected-filter-label"> 1000 <template v-for="facetFilter in facetFilters"> 1001 <span v-for="option in SelectedOptions(facetFilter)" class="custom-control custom-filter"> 1002 <input type="checkbox" 1003 :id="'Selected-' + facetFilter.name + '-' + option.name" 1004 :name="facetFilter.name" 1005 :value="option.value" 1006 :v-model="option.selected" 1007 :checked="option.selected" 1008 v-on:click="ToggleFilter(facetFilter.name,option)" 1009 class="custom-control-input" /> 1010 <label :for="'Selected-' + facetFilter.name + '-' + option.name" class="custom-control-label" :data-name="facetFilter.name"> 1011 <span> 1012 {{option.label}} 1013 </span> 1014 <svg> 1015 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#times"></use> 1016 </svg> 1017 </label> 1018 </span> 1019 </template> 1020 </div> 1021 </template> 1022 <b-collapse class="basic_filter" id="sidebar-filter"> 1023 <template v-if="!error && facetFilters"> 1024 <button type="button" class="btn-close" v-b-toggle.sidebar-filter.sidebar-overlay aria-label="@Translate(basicFacetPrefix + "Close Filter", "Close Filter")"> 1025 <span></span> 1026 <span></span> 1027 </button> 1028 <div class="basic_filter-groups"> 1029 <div class="basic_filter-group" v-for="(facetFilter, index) in facetFilters"> 1030 <p :id="'filter-group-' + facetFilter.name.toLowerCase().trim()" v-b-toggle="'filter-collapse-' + facetFilter.name.toLowerCase().trim()"> 1031 <template v-if="facetFilter.name === 'ModelType'"> 1032 @Translate(basicFacetPrefix + "ModelType", "Model / Type") 1033 </template> 1034 <template v-else-if="facetFilter.name === 'DoorType'"> 1035 @Translate(basicFacetPrefix + "DoorType", " Door type") 1036 </template> 1037 <template v-else-if="facetFilter.name === 'ExternalHeight'"> 1038 @Translate(basicFacetPrefix + "ExternalHeight", "External Height") (mm) 1039 </template> 1040 <template v-else-if="facetFilter.name === 'NetVolume'"> 1041 @Translate(basicFacetPrefix + "NetVolume", "Net Volume") (l) 1042 </template> 1043 <template v-else-if="facetFilter.name === 'DoorNumber'"> 1044 @Translate(basicFacetPrefix + "DoorNumber", " Number of doors") 1045 </template> 1046 <template v-else-if="facetFilter.name === 'ExteriorFinish'"> 1047 @Translate(basicFacetPrefix + "ExteriorFinish", "Exterior Finish") 1048 </template> 1049 <template v-else-if="facetFilter.name === 'ExternalWidth'"> 1050 @Translate(basicFacetPrefix + "ExternalWidth", "External Width") (mm) 1051 </template> 1052 <template v-else-if="facetFilter.name === 'GrossVolume'"> 1053 @Translate(basicFacetPrefix + "GrossVolume", "Gross Volume") (l) 1054 </template> 1055 <template v-else-if="facetFilter.name === 'Bottles330'"> 1056 @Translate(basicFacetPrefix + "Bottles330", "Capacity 330ml bottles") 1057 </template> 1058 <template v-else-if="facetFilter.name === 'Bottles500'"> 1059 @Translate(basicFacetPrefix + "Bottles500", "Capacity 500ml bottles") 1060 </template> 1061 <template v-else-if="facetFilter.name === 'Cans330'"> 1062 @Translate(basicFacetPrefix + "Cans330", "Capacity 300ml cans") 1063 </template> 1064 <template v-else-if="facetFilter.name === 'Cans500'"> 1065 @Translate(basicFacetPrefix + "Cans500", "Capacity 500ml cans") 1066 </template> 1067 <template v-else-if="facetFilter.name === 'TemperatureRange'"> 1068 @Translate(basicFacetPrefix + "TemperatureRange", "Temperature Range") 1069 </template> 1070 <template v-else-if="facetFilter.name === 'TemperatureRangeZone2'"> 1071 @Translate(basicFacetPrefix + "TemperatureRangeZone2", "Tempature Range 2") 1072 </template> 1073 <template v-else-if="facetFilter.name === 'ShelfNumber'"> 1074 @Translate(basicFacetPrefix + "ShelfNumber", "Number of shelfs") 1075 </template> 1076 <template v-else-if="facetFilter.name === 'LidType'"> 1077 @Translate(basicFacetPrefix + "LidType", "Lid Type") 1078 </template> 1079 <template v-else-if="facetFilter.name === 'InteriorFinish'"> 1080 @Translate(basicFacetPrefix + "InteriorFinish", "Interior Finish") 1081 </template> 1082 <template v-else-if="facetFilter.name === 'WineBottles750'"> 1083 @Translate(basicFacetPrefix + "WineBottles750", "Capacity 750ml winebottles") 1084 </template> 1085 <template v-else-if="facetFilter.name === 'CanopyType'"> 1086 @Translate(basicFacetPrefix + "CanopyType", "Canopy Type") 1087 </template> 1088 <template v-else-if="facetFilter.name === 'CoolingType'"> 1089 @Translate(basicFacetPrefix + "CoolingType", "Cooling Type") 1090 </template> 1091 <template v-else> 1092 {{facetFilter.name}} 1093 </template> 1094 <svg> 1095 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/Files/dist/icons/icons.svg#chevron-up"></use> 1096 </svg> 1097 </p> 1098 <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()"> 1099 <template v-if="facetFilter.renderType === 'Range'"> 1100 <basic-range-slider @@change="updateRange(facetFilter,$event)" :min="getMinRange(facetFilter)" :max="getMaxRange(facetFilter)" :init-min="getInitMin(facetFilter)" :init-max="getInitMax(facetFilter)"></basic-range-slider> 1101 </template> 1102 1103 <template v-else-if="facetFilter.optionActiveCount > 5"> 1104 <span v-for="option in facetFilter.options.slice(0, 5)" class="custom-control custom-checkbox facet-option"> 1105 <input type="checkbox" class="custom-control-input" 1106 :id="'UnSelected-' + facetFilter.name + '-' + option.name" 1107 :name="facetFilter.name" 1108 :value="option.value" 1109 :v-model="option.selected" 1110 :checked="option.selected" 1111 v-on:click="ToggleFilter(facetFilter.name,option)" /> 1112 <label :for="'UnSelected-' + facetFilter.name + '-' + option.name" class="custom-control-label"> 1113 {{option.label}} <span class="count">({{option.count}})</span> 1114 </label> 1115 </span> 1116 <b-collapse class="basic_filter-expand" :id="'filter-expand-' + facetFilter.name.toLowerCase().trim()" :visible="ShowMoreIfSelected(facetFilter.options, index)"> 1117 <span v-for="option in facetFilter.options.slice(5)" class="custom-control custom-checkbox facet-option"> 1118 <input type="checkbox" class="custom-control-input" 1119 :id="'UnSelected-' + facetFilter.name + '-' + option.name" 1120 :name="facetFilter.name" 1121 :value="option.value" 1122 :v-model="option.selected" 1123 :checked="option.selected" 1124 v-on:click="ToggleFilter(facetFilter.name,option)" /> 1125 <label :for="'UnSelected-' + facetFilter.name + '-' + option.name" class="custom-control-label"> 1126 {{option.label}} <span class="count">({{option.count}})</span> 1127 </label> 1128 </span> 1129 </b-collapse> 1130 <a v-b-toggle="'filter-expand-' + facetFilter.name.toLowerCase().trim()" class="basic_filter-expanding" v-if="facetFilter.optionActiveCount > 6"> 1131 <span class="show-more">+ @Translate(basicFacetPrefix + "show more", "show more")</span> 1132 <span class="show-less">- @Translate(basicFacetPrefix + "show less", "show less")</span> 1133 </a> 1134 </template> 1135 <template v-else> 1136 <span v-for="option in facetFilter.options" class="custom-control custom-checkbox facet-option"> 1137 <input type="checkbox" class="custom-control-input" 1138 :id="'UnSelected-' + facetFilter.name + '-' + option.name" 1139 :name="facetFilter.name" 1140 :value="option.value" 1141 :v-model="option.selected" 1142 :checked="option.selected" 1143 v-on:click="ToggleFilter(facetFilter.name,option)" /> 1144 <label :for="'UnSelected-' + facetFilter.name + '-' + option.name" class="custom-control-label"> 1145 {{option.label}} <span class="count">({{option.count}})</span> 1146 </label> 1147 </span> 1148 </template> 1149 </b-collapse> 1150 </div> 1151 </div> 1152 </template> 1153 </b-collapse> 1154 </aside> 1155 </script> 1156 <script type="text/x-template" id="add-to-basket-simple-template"> 1157 @{ 1158 string addToBasketSimplePrifix = "BuyButton "; 1159 } 1160 <div class="form-flex" v-if="renderBuy" v-bind:class="[{added: IsAdded}, {adding: IsAdding}, {disabled: !canAdd}]"> 1161 1162 <label for="quantity">@Translate(addToBasketSimplePrifix + "Quantity", "Quantity")</label> 1163 <input class="form-control" type="tel" name="quantity" v-model="quantity" autocomplete="off" onclick="this.setSelectionRange(0, this.value.length)"> 1164 <button :disabled="!canAdd" :class="buttonClass" v-on:click="addToBasketAndResetQuantity()" aria-label="@Translate(addToBasketSimplePrifix + "Add", "Add")"> 1165 <slot> 1166 <svg> 1167 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#shopping-cart"> 1168 </use> 1169 </svg> 1170 <span> 1171 @Translate(addToBasketSimplePrifix + "Add to basket", "Add to basket") 1172 </span> 1173 </slot> 1174 1175 </button> 1176 1177 <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> 1178 <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> 1179 <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> 1180 </div> 1181 </script> 1182 1183 <script type="text/x-template" id="quick-add-template"> 1184 @{ 1185 string quickAddPrifix = "BuyButton "; 1186 } 1187 <div v-bind:class="[{added: IsAdded}, {adding: IsAdding}]"> 1188 <label for="quantity">@Translate(quickAddPrifix + "Quantity", "Quantity")</label> 1189 <input class="form-control" type="number" id="quantity" name="quantity" v-model="quantity" autocomplete="off"> 1190 </div> 1191 </script> 1192 1193 <script type="text/x-template" id="add-to-basket-button-only-template"> 1194 @{ 1195 string addToBasketPrefix = "BuyButton "; 1196 } 1197 <div v-bind:class="[{added: IsAdded}, {adding: IsAdding}]"> 1198 <button :class="buttonClass" v-on:click="addToBasket()"> 1199 <slot> 1200 @Translate(addToBasketPrefix + "Add to basket", "Add to basket") 1201 </slot> 1202 </button> 1203 </div> 1204 </script> 1205 @using Dynamicweb.Frontend 1206 @using Tefcold.Web.CustomCode.Items 1207 @{ 1208 string asyncPrefix = "Async "; 1209 var website = PageView.Current().Area.GetWebsiteSettings(); 1210 } 1211 <script type="text/x-template" id="async-price-template"> 1212 <div :class="classType + (loading ? ' loading' : '') + (hasDiscount ? ' has-discount' : '')"> 1213 <template> 1214 <p :class="classType + '--error'" v-if="error">{{error}}</p> 1215 </template> 1216 <template v-if="!loading"> 1217 @if (!website.ShowPriceWitVatAndDiscount) 1218 { 1219 <template v-if="!forceAskForPrice && price.netUnitPrice.priceWithoutVat"> 1220 <meta itemprop="price" :content="price.netUnitPrice.priceWithoutVat" /> 1221 <meta itemprop="priceCurrency" content="@(Pageview.User?.Currency ?? Pageview.Area.EcomCurrencyId)" /> 1222 <div class="price-withoutvat"> 1223 <span class="price-label">@Translate(asyncPrefix + "price without vat", "Price without VAT")</span> 1224 <p class="price"> 1225 <span class="unit-price">{{ price.netUnitPrice.priceWithoutVat | currency(price.currencyCode) }}</span> 1226 </p> 1227 </div> 1228 </template> 1229 } 1230 @if (website.ShowPriceWitVatAndDiscount) 1231 { 1232 <template v-if="listView &&!forceAskForPrice && price.netUnitPrice.priceWithVat"> 1233 <meta itemprop="price" :content="price.netUnitPrice.priceWithVat" /> 1234 <meta itemprop="priceCurrency" content="@(Pageview.User?.Currency ?? Pageview.Area.EcomCurrencyId)" /> 1235 <div class="price-withoutvat"> 1236 <span class="price-label">@Translate(asyncPrefix + "price with vat", "Price with VAT")</span> 1237 <p class="price"> 1238 <span class="unit-price">{{ price.netUnitPrice.priceWithVat | currency(price.currencyCode) }}</span> 1239 <small class="prev-price" v-if="hasDiscount && price.unitPrice.priceWithVat">{{ price.unitPrice.priceWithVat | currency(price.currencyCode) }}</small> 1240 </p> 1241 </div> 1242 </template> 1243 <template v-if="!listView"> 1244 <template v-if="!forceAskForPrice && price.netUnitPrice.priceWithoutVat"> 1245 <meta itemprop="price" :content="price.netUnitPrice.priceWithoutVat" /> 1246 <meta itemprop="priceCurrency" content="@(Pageview.User?.Currency ?? Pageview.Area.EcomCurrencyId)" /> 1247 <div class="price-withoutvat"> 1248 <span class="price-label">@Translate(asyncPrefix + "price without vat", "Price without VAT")</span> 1249 <p class="price"> 1250 <span class="unit-price">{{ price.netUnitPrice.priceWithoutVat | currency(price.currencyCode) }}</span> 1251 @if (website.ShowPriceWitVatAndDiscount) 1252 { 1253 <small class="prev-price" v-if="hasDiscount && price.unitPrice.priceWithoutVat">{{ price.unitPrice.priceWithoutVat | currency(price.currencyCode) }}</small> 1254 } 1255 </p> 1256 </div> 1257 </template> 1258 <div class="price-withvat"> 1259 <span class="price-label">@Translate(asyncPrefix + "price with vat", "Price with VAT")</span> 1260 <p class="price"> 1261 <span class="unit-price">{{ price.netUnitPrice.priceWithVat | currency(price.currencyCode) }}</span> 1262 <small class="prev-price" v-if="hasDiscount && !listView && price.unitPrice.priceWithVat">{{ price.unitPrice.priceWithVat | currency(price.currencyCode) }}</small> 1263 </p> 1264 1265 </div> 1266 <div class="weee-fee" v-if="price.weeeFee && price.weeeFee > 0"> 1267 <span class="price-label">@Translate("Weee fee", "Weee fee")</span> 1268 <p class="price"> 1269 <span class="unit-price">{{ price.weeeFee | currency(price.currencyCode) }}</span> 1270 </p> 1271 1272 </div> 1273 </template> 1274 } 1275 </template> 1276 <template v-if="allowedHvac && (!price?.netUnitPrice?.priceWithoutVat || forceAskForPrice)"> 1277 <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> 1278 </template> 1279 <template v-else-if="!allowedHvac"> 1280 <a href="@NORRIQ.Common8.Razor.Navigation.GetUrlByNavigationTag("contact")" class="btn btn-outline-secondary btn-sm mt-3"> 1281 @Translate("create account", "Create account") 1282 </a> 1283 </template> 1284 </div> 1285 </script> 1286 <script type="text/x-template" id="pagination-template"> 1287 @{ 1288 string paginationPrefix = "Pagination "; 1289 } 1290 <nav aria-label="@Translate(paginationPrefix + "Productlist pagination", "Productlist pagination")"> 1291 <ul class="pagination"> 1292 <li :class="['page-item', currentPage == 1 ? 'disabled' : '' ]" v-if="currentPage > 1"> 1293 <a class="page-link" v-on:click="togglePrevPage()" aria-label="@Translate(paginationPrefix + "Previous Page", "Previous Page")" v-bind:aria-disabled="currentPage > 1 ? 'true' : null"> 1294 <svg> 1295 <use xmlns:xlink="http://www.w3.org/1999/xlink" 1296 xlink:href="/files/dist/icons/icons.svg#chevron-left"> 1297 </use> 1298 </svg> 1299 </a> 1300 </li> 1301 <template v-if="hasGroupId || true"> 1302 <li v-if="showPage(n)" v-for="n in totalPages" :key="n" :class="(n == currentPage ? 'page-item active' : 'page-item')"> 1303 <a v-on:click="togglePage(n)" v-bind:aria-current="(n == currentPage ? 'true' : '')" class="page-link"> 1304 {{n}} 1305 </a> 1306 </li> 1307 </template> 1308 <template v-else> 1309 <li class="page-item"> 1310 <span class="page-label"> 1311 {{currentPage}} 1312 </span> 1313 </li> 1314 <li class="page-item"> 1315 <span class="page-label"> 1316 @Translate(paginationPrefix + "of", "of") 1317 </span> 1318 </li> 1319 <li class="page-item"> 1320 <span class="page-label"> 1321 {{totalPages}} 1322 </span> 1323 </li> 1324 </template> 1325 <li :class="'page-item' + (currentPage >= totalPages ? ' disabled' : '')" v-if="currentPage < totalPages"> 1326 <a v-on:click="toggleNextPage()" aria-label="@Translate(paginationPrefix + "Next Page", "Next Page")" class="page-link" v-bind:aria-disabled="totalPages > currentPage ? 'true' : null"> 1327 <svg class="icon-pagination"> 1328 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#chevron-right"></use> 1329 </svg> 1330 </a> 1331 </li> 1332 </ul> 1333 </nav> 1334 </script> 1335 <script type="text/x-template" id="product-specification-list-view-template"> 1336 <div class="basic_listview-data"> 1337 <template v-if="!isSparePart"> 1338 <p itemprop="description"> 1339 {{ SpecificationHelpers.GetFirstSpecificationValueOrDefault('GrossNetVolume',productSpecifications)}} {{ SpecificationHelpers.GetSpecificationUnit(SpecificationHelpers.GetSpecificationByKey('GrossNetVolume',productSpecifications))}} 1340 <br /> 1341 {{ SpecificationHelpers.GetFirstSpecificationValueOrDefault('ExternalDimensionWeb',productSpecifications)}} 1342 1343 </p> 1344 </template> 1345 <p itemprop="sku">@Translate("PLP No.", "No.") {{productNumber}}</p> 1346 </div> 1347 </script> 1348 @using Tefcold.Web.CustomCode.Extensions 1349 @inherits Tefcold.Web.CustomCode.Razor.TefcoldViewModelTemplate<Dynamicweb.Ecommerce.ProductCatalog.ProductViewModel> 1350 <script type="text/x-template" id="product-spare-parts-view-template"> 1351 @{ 1352 string basicPimPrefix = "PDP "; 1353 } 1354 <div v-if="hasSparePartReport || hasExplodedDrawing || spareParts.length > 0"> 1355 <button class="btn-collapse" id="spareparts" v-b-toggle.spareparts-list> 1356 @Translate(basicPimPrefix + "spare parts", "Spare Parts") 1357 </button> 1358 <template> 1359 <b-collapse id="spareparts-list" accordion="specs2"> 1360 <template> 1361 <div class="body-collapse full pb-0"> 1362 <ul class="basic_pim-spares"> 1363 <template v-if="hasSparePartReport"> 1364 <li> 1365 <a :href="sparePartReport" target="_blank"> 1366 <svg> 1367 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#download"></use> 1368 </svg> 1369 @Translate(basicPimPrefix + "spare part list", "Spare part list") 1370 </a> 1371 </li> 1372 </template> 1373 <li v-if="hasExplodedDrawing"> 1374 <a :href="explodedDrawing" target="_blank"> 1375 <svg> 1376 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#download"></use> 1377 </svg> 1378 @Translate(basicPimPrefix + "view exploded drawing of spare parts", "View exploded drawing of spare parts") 1379 </a> 1380 </li> 1381 <li :data-point="spare.product.position" class="basic_pim-spare" v-for="spare in spareParts"> 1382 <div class="head"> 1383 <a href="#" v-on:click="navigateToSpare($event,spare.product.id)" class="name">{{spare.product.productName}}</a> 1384 <p class="sku">{{spare.product.number}}</p> 1385 </div> 1386 1387 @if (Pageview.IsAllowedToShop()) 1388 { 1389 <div class="foot"> 1390 <async-price class-type="asyncprice-spare" 1391 :product="spare" 1392 :default-price="spare.product.price" 1393 list-price="true" 1394 :only-standard-price="@(Pageview.IsCurrentlyB2C().ToString().ToLower())" 1395 standard-customer="@(string.IsNullOrEmpty(Pageview.AreaSettings.GetString("StandardCustomer")) ? "" : Pageview.AreaSettings.GetString("StandardCustomer"))"> 1396 1397 </async-price> 1398 <add-to-basket-simple :product="spare" 1399 :unit-of-measure="'PCS'" 1400 :sparepart-location="sparepartLocation" 1401 button-class="btn btn-primary" 1402 class="addtobasketsimple-plp" 1403 :price-without-vat="spare.product.price" 1404 language-id="@Pageview.Area.EcomLanguageId" 1405 :only-spare-parts="@(Pageview.User.OnlySpareParts().ToString().ToLower())" 1406 :is-marketing-user="@(Pageview.User.OnlyView().ToString().ToLower())" 1407 :ishvasuser="@(Pageview.User.IsHVACUser().ToString().ToLower())" 1408 standard-customer="@(string.IsNullOrEmpty(Pageview.AreaSettings.GetString("StandardCustomer")) ? "" : Pageview.AreaSettings.GetString("StandardCustomer"))"> 1409 </add-to-basket-simple> 1410 </div> 1411 } 1412 @*<p>DEBUG: {{spare}}</p>*@ 1413 </li> 1414 1415 </ul> 1416 </div> 1417 </template> 1418 </b-collapse> 1419 </template> 1420 </div> 1421 1422 </script> 1423 <script type="text/x-template" id="variant-list-template"> 1424 <ul class="variants" v-if="initialVariant.product.hasVariants" > 1425 <li> 1426 <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"/> 1427 <label :for="'main-' + initialVariant.product.id" :style="getImageOrColor(initialVariant.product.variantImage,initialVariant.product.variantValue)"></label> 1428 </li> 1429 <li v-for="variant in initialVariant.product.simpleVariants"> 1430 <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" /> 1431 <label :for="'color-'+variant.product.id+ '-' + variant.product.variantId" :style="getImageOrColor(variant.product.variantImage,variant.product.variantValue)"> 1432 </label> 1433 </li> 1434 </ul> 1435 </script> 1436 @using Dynamicweb.Ecommerce.Frontend 1437 @using Dynamicweb.Ecommerce.International 1438 @using Newtonsoft.Json 1439 @using NORRIQ.SalesPersonLogin.Services 1440 @using Tefcold.Web.CustomCode.Items.Settings 1441 @using Tefcold.Web.CustomCode.Stocks.Helpers 1442 @{ 1443 string plpProductPrefix2 = "PLP "; 1444 } 1445 <script type="text/x-template" id="product-template"> 1446 1447 1448 <article itemscope itemtype="https://schema.org/Product" v-if="product.product" v-bind:key="product.product.number"> 1449 <span class="badge"> 1450 <img v-if="SpecificationHelpers.GetFirstSpecificationValueOrDefault('StickersDKNews',product.specifications)" :src="'/Admin/Public/GetImage.ashx?Height=50&amp;Compression=85&amp;Image=' + SpecificationHelpers.GetFirstSpecificationValueOrDefault('StickersDKNews',product.specifications)" alt="@Translate(basicPimPrefix + "Sticker", "Sticker")" v-bind:alt="product.product.name" itemprop="image" class="img-fluid" /> 1451 <img v-else-if="SpecificationHelpers.GetFirstSpecificationValueOrDefault('Stickers',product.specifications)" :src="'/Admin/Public/GetImage.ashx?Height=50&amp;Compression=85&amp;Image=' + SpecificationHelpers.GetFirstSpecificationValueOrDefault('Stickers',product.specifications)" alt="@Translate(basicPimPrefix + "Sticker", "Sticker")" v-bind:alt="product.product.name" itemprop="image" class="img-fluid" /> 1452 </span> 1453 <a :href="product.product.url" itemprop="url"> 1454 <figure style="min-height: 1px;"> 1455 1456 <img v-if="SpecificationHelpers.GetFirstSpecificationValueOrDefault('WebPrimaryImage',product.specifications)" :src="'/Admin/Public/GetImage.ashx?Width=427&amp;Height=427&amp;Compression=85&amp;Crop=5&amp;Format=webp&amp;Quality=85&amp;fillcanvas=true&amp;Image=' + SpecificationHelpers.GetFirstSpecificationValueOrDefault('WebPrimaryImage',product.specifications)" 1457 v-bind:alt="product.product.name" itemprop="image" class="img-fluid" /> 1458 <img v-if="!SpecificationHelpers.GetFirstSpecificationValueOrDefault('WebPrimaryImage',product.specifications)" :src="'/Admin/Public/GetImage.ashx?Width=427&amp;Height=427&amp;Compression=85&amp;Crop=5&amp;Format=webp&amp;Quality=85&amp;fillcanvas=true&amp;Image=/Files/Images/default.jpg'" 1459 v-bind:alt="product.product.name" itemprop="image" class="img-fluid" /> 1460 </figure> 1461 <header> 1462 <h1 itemprop="name">{{product.product.name}}</h1> 1463 <p itemprop="category">{{product.product.shortDescription}}</p> 1464 <div class="flex-list"> 1465 <product-specification-list-view :product-specifications="product.specifications" 1466 :product-number="product.product.number" 1467 :is-spare-part="product.product.isSparePart"> 1468 </product-specification-list-view> 1469 @if (Pageview.IsAllowedToShop()) 1470 { 1471 <template v-if="plpClass=='basic_listview-grid'"> 1472 <buying-component inline-template :selected-product="product" :initial-product="initialProduct"> 1473 <template v-if="SpecificationHelpers.GetFirstSpecificationValueOrDefault('EnergyArrow',selectedProduct.specifications)"> 1474 <div class="energy-data"> 1475 <a :href="SpecificationHelpers.GetFirstSpecificationValueOrDefault('EnergyLabel',selectedProduct.specifications)" target="_blank" class="energy-label"> 1476 <img :src="SpecificationHelpers.GetFirstSpecificationValueOrDefault('EnergyArrow',selectedProduct.specifications)" alt="Energy Label" class="img-fluid img-energy" height="25" /> 1477 </a> 1478 <a href="#" v-on:click="getProductReport($event,selectedProduct.product.number,selectedProduct.product.name,selectedProduct.product.languageId)" target="_blank" class="energy-link"> 1479 <small>@Translate("PDP product sheet", "Product Sheet")</small> 1480 </a> 1481 </div> 1482 </template> 1483 </buying-component> 1484 </template> 1485 } 1486 </div> 1487 </header> 1488 </a> 1489 <template v-if="plpClass=='basic_listview-list'"> 1490 <ul class="basic_listview-specs"> 1491 <li v-for="item in SpecificationHelpers.GetPrettyBulletPoints(product.specifications)"> 1492 {{item}} 1493 </li> 1494 <li v-if="SpecificationHelpers.showMoreDots(product.specifications)"> 1495 <a :href="product.product.url">...</a> 1496 </li> 1497 </ul> 1498 @*{{ product.Product.LongDescription }}*@ 1499 </template> 1500 1501 1502 @if (!Pageview.IsAllowedToShop()) 1503 { 1504 <footer> 1505 1506 <template v-if="SpecificationHelpers.GetFirstSpecificationValueOrDefault('EnergyArrow',product.specifications)"> 1507 <buying-component inline-template :selected-product="product" :initial-product="initialProduct"> 1508 <div class="energy-price"> 1509 <div class="variant-price"> 1510 <variant-list :initial-variant="initialProduct" :currently-selected="selectedProduct" class="mr-2"></variant-list> 1511 1512 <a href="@NORRIQ.Common8.Razor.Navigation.GetUrlByNavigationTag("contact")" class="btn btn-outline-secondary btn-sm ml-auto" style="white-space:nowrap;"> 1513 @Translate("create account", "Create account") 1514 </a> 1515 1516 </div> 1517 <div class="energy-data"> 1518 <a :href="SpecificationHelpers.GetFirstSpecificationValueOrDefault('EnergyLabel',selectedProduct.specifications)" class="energy-label" target="_blank"> 1519 <img :src="SpecificationHelpers.GetFirstSpecificationValueOrDefault('EnergyArrow',selectedProduct.specifications)" alt="Energy Label" class="img-fluid img-energy" height="25" /> 1520 </a> 1521 <a href="#" v-on:click="getProductReport($event,selectedProduct.product.number,selectedProduct.product.name,selectedProduct.product.languageId)" target="_blank" class="energy-link"> 1522 <small>@Translate("PDP product sheet", "Product Sheet")</small> 1523 </a> 1524 </div> 1525 </div> 1526 </buying-component> 1527 </template> 1528 <template v-else> 1529 <buying-component inline-template :selected-product="product" :initial-product="initialProduct"> 1530 <div class="energy-price"> 1531 <div class="variant-price"> 1532 <variant-list :initial-variant="initialProduct" :currently-selected="selectedProduct" class="mr-2"></variant-list> 1533 1534 <a href="@NORRIQ.Common8.Razor.Navigation.GetUrlByNavigationTag("contact")" class="btn btn-outline-secondary btn-sm ml-auto" style="white-space:nowrap;"> 1535 @Translate("create account", "Create account") 1536 </a> 1537 1538 </div> 1539 </div> 1540 1541 </buying-component> 1542 </template> 1543 </footer> 1544 } 1545 else 1546 { 1547 <buying-component inline-template :selected-product="product" :plp-class="plpClass" :initial-product="initialProduct"> 1548 <footer itemprop="offers" itemscope="" itemtype="https://schema.org/Offer"> 1549 1550 <template v-if="SpecificationHelpers.GetFirstSpecificationValueOrDefault('EnergyArrow',selectedProduct.specifications) && plpClass == 'basic_listview-list'"> 1551 <div class="energy-price"> 1552 <div class="variant-price"> 1553 <variant-list :initial-variant="initialProduct" :currently-selected="selectedProduct"></variant-list> 1554 <async-price class-type="asyncprice-plp" 1555 :product="selectedProduct" 1556 :default-price="selectedProduct.product.defaultPrice.priceWithoutVat" 1557 :only-standard-price="@(Pageview.IsCurrentlyB2C().ToString().ToLower())" 1558 list-price="true" 1559 :should-emit-warranties="@((Pageview.IsAllowedToShop()).ToString().ToLower())" 1560 standard-customer="@(string.IsNullOrEmpty(Pageview.AreaSettings.GetString("StandardCustomer")) ? "" : Pageview.AreaSettings.GetString("StandardCustomer"))"> 1561 </async-price> 1562 </div> 1563 <div class="energy-data"> 1564 <a :href="SpecificationHelpers.GetFirstSpecificationValueOrDefault('EnergyLabel',selectedProduct.specifications)" class="energy-label" target="_blank"> 1565 <img :src="SpecificationHelpers.GetFirstSpecificationValueOrDefault('EnergyArrow',selectedProduct.specifications)" alt="Energy Label" class="img-fluid img-energy" height="25" /> 1566 </a> 1567 <a href="#" v-on:click="getProductReport($event,selectedProduct.product.number,selectedProduct.product.name,selectedProduct.product.languageId)" target="_blank" class="energy-link"> 1568 <small>@Translate("PDP product sheet", "Product Sheet")</small> 1569 </a> 1570 </div> 1571 </div> 1572 </template> 1573 <template v-else> 1574 <div class="variant-price"> 1575 <variant-list :initial-variant="initialProduct" :currently-selected="selectedProduct"></variant-list> 1576 <async-price class-type="asyncprice-plp" 1577 :product="selectedProduct" 1578 :default-price="selectedProduct.product.defaultPrice.priceWithoutVat" 1579 :only-standard-price="@(Pageview.IsCurrentlyB2C().ToString().ToLower())" 1580 list-price="true" 1581 :should-emit-warranties="@((Pageview.IsAllowedToShop()).ToString().ToLower())" 1582 standard-customer="@(string.IsNullOrEmpty(Pageview.AreaSettings.GetString("StandardCustomer")) ? "" : Pageview.AreaSettings.GetString("StandardCustomer"))"> 1583 </async-price> 1584 </div> 1585 </template> 1586 1587 <stock-location-component inline-template :remote-stock-shop-ids='@JsonConvert.SerializeObject(websiteSettings.ExternalShopIds)' not-in-stock-text='@Translate("PLP not in stock text", "N/A")' :default-stock-units='selectedProduct.product.stockUnits' :default-remote-stock-units='selectedProduct.product.remoteStock' :product='selectedProduct' :earliest-harbor-arrival-date='selectedProduct.product.EarliestHarborArrival'> 1588 <div class="stockscontainer"> 1589 <template v-if="stockUnits.length > 0 && !loading"> 1590 <div v-for="unit in stockUnits" class="stocks"> 1591 <span style="font-size: 1px">{{unit.quantity}}</span> 1592 <small v-if="stocksHasNoQuantity" class="outofstock"> 1593 {{ unit.stockLocation.description }} {{ GetStockAmountString(unit.quantity) }} 1594 </small> 1595 <small v-else class="instock"> 1596 {{ unit.stockLocation.description }} {{ GetStockAmountString(unit.quantity) }} @Translate("PLP In Stock", "In Stock") 1597 </small> 1598 </div> 1599 </template> 1600 <template v-if="remoteStockUnits.length > 0 && !loading"> 1601 <div v-for="remoteunit in remoteStockUnits" class="stocks"> 1602 <span style="font-size: 1px">{{remoteunit.quantity}}</span> 1603 <small v-if="remoteStocksHasNoQuantity" class="outofstock"> 1604 {{ remoteunit.stockLocation.description }} {{ GetStockAmountString(remoteunit.Quantity) }} 1605 </small> 1606 <small v-else class="instock"> 1607 {{ remoteunit.stockLocation.description }} {{ GetStockAmountString(remoteunit.quantity) }} @Translate("PLP In Stock", "In Stock") 1608 </small> 1609 </div> 1610 </template> 1611 </div> 1612 </stock-location-component> 1613 1614 <div class="plp-buttons"> 1615 <div class="btn-group"> 1616 <add-to-compare :product-number="selectedProduct.product.number"></add-to-compare> 1617 @if (Pageview.IsCurrentlyB2B()) 1618 { 1619 <favorite-lists ui-error-message-translation="@Translate(plpProductPrefix2 + " Error while retrieving favorite list","Error while retrieving favorite list")" :is-favorite-mode="@NORRIQ.Common8.Razor.Navigation.GetPageIdByNavigationTag("favorites") == @Pageview.ID" :product="selectedProduct"></favorite-lists> 1620 } 1621 </div> 1622 <add-to-basket-simple :product="selectedProduct" 1623 :unit-of-measure="'PCS'" 1624 button-class="btn btn-primary" 1625 class="addtobasketsimple-plp" 1626 :price-without-vat="currentItemPriceWithoutVat" 1627 language-id="@Pageview.Area.EcomLanguageId" 1628 :only-spare-parts="@(Pageview.User.OnlySpareParts().ToString().ToLower())" 1629 :is-marketing-user="@(Pageview.User.OnlyView().ToString().ToLower())" 1630 :ishvasuser="@(Pageview.User.IsHVACUser().ToString().ToLower())" 1631 standard-customer="@(string.IsNullOrEmpty(Pageview.AreaSettings.GetString("StandardCustomer")) ? "" : Pageview.AreaSettings.GetString("StandardCustomer"))"> 1632 </add-to-basket-simple> 1633 </div> 1634 </footer> 1635 </buying-component> 1636 } 1637 1638 </article> 1639 1640 </script> 1641 <script type="text/x-template" id="product-template-cz"> 1642 @{ 1643 string plpProductPrefix = "PLP "; 1644 } 1645 <article itemscope itemtype="https://schema.org/Product" v-if="product.product" v-bind:key="product.product.number"> 1646 <span class="stickers"> 1647 <template v-if="SpecificationHelpers.GetFirstSpecificationValueOrDefault('StickersCZNews',product.specifications)"> 1648 <img :src="'/Admin/Public/GetImage.ashx?Height=24&amp;Compression=85&amp;Image=' + SpecificationHelpers.GetFirstSpecificationValueOrDefault('StickersCZNews',product.specifications)" 1649 alt="@Translate(basicPimPrefix + "Sticker", "Sticker")" 1650 class="img-fluid" /> 1651 </template> 1652 <template v-else-if="SpecificationHelpers.GetFirstSpecificationValueOrDefault('StickersCZ',product.specifications)"> 1653 <img :src="'/Admin/Public/GetImage.ashx?Height=24&amp;Compression=85&amp;Image=' + SpecificationHelpers.GetFirstSpecificationValueOrDefault('StickersCZ',product.specifications)" 1654 alt="@Translate(basicPimPrefix + "Sticker", "Sticker")" 1655 class="img-fluid" /> 1656 </template> 1657 <span v-if="ShowDiscount" class="sticker discount"> 1658 -{{discount}}% 1659 </span> 1660 </span> 1661 <a :href="product.product.url" itemprop="url" :title="['@Translate(plpProductPrefix + "More info about", "More info about") ' + product.product.name]"> 1662 <figure style="min-height: 1px;"> 1663 1664 <img v-if="SpecificationHelpers.GetFirstSpecificationValueOrDefault('WebPrimaryImage',product.specifications)" :src="'/Admin/Public/GetImage.ashx?Width=427&amp;Height=427&amp;Compression=85&amp;Crop=5&amp;Format=webp&amp;Quality=85&amp;fillcanvas=true&amp;Image=' + SpecificationHelpers.GetFirstSpecificationValueOrDefault('WebPrimaryImage',product.specifications)" 1665 v-bind:alt="product.product.name" itemprop="image" class="img-fluid" /> 1666 <img v-if="!SpecificationHelpers.GetFirstSpecificationValueOrDefault('WebPrimaryImage',product.specifications)" :src="'/Admin/Public/GetImage.ashx?Width=427&amp;Height=427&amp;Compression=85&amp;Crop=5&amp;Format=webp&amp;Quality=85&amp;fillcanvas=true&amp;Image=/Files/Images/default.jpg'" 1667 v-bind:alt="product.product.name" itemprop="image" class="img-fluid" /> 1668 </figure> 1669 <header> 1670 <h1 itemprop="name">{{product.product.name}}</h1> 1671 <p itemprop="category">{{product.product.shortDescription}}</p> 1672 <div class="flex-list"> 1673 <product-specification-list-view :product-specifications="product.specifications" 1674 :product-number="product.product.number" 1675 :is-spare-part="product.product.isSparePart"> 1676 </product-specification-list-view> 1677 <template v-if="plpClass=='basic_listview-grid'"> 1678 <buying-component inline-template :selected-product="product" :initial-product="initialProduct"> 1679 <template v-if="SpecificationHelpers.GetFirstSpecificationValueOrDefault('EnergyArrow',selectedProduct.specifications)"> 1680 <div class="energy-data"> 1681 <a :href="SpecificationHelpers.GetFirstSpecificationValueOrDefault('EnergyLabel',selectedProduct.specifications)" target="_blank" class="energy-label"> 1682 <img :src="SpecificationHelpers.GetFirstSpecificationValueOrDefault('EnergyArrow',selectedProduct.specifications)" alt="Energy Label" class="img-fluid img-energy" height="25" /> 1683 </a> 1684 <a href="#" v-on:click="getProductReport($event,selectedProduct.product.number,selectedProduct.product.name,selectedProduct.product.languageId)" target="_blank" class="energy-link"> 1685 <small>@Translate("PDP product sheet", "Product Sheet")</small> 1686 </a> 1687 </div> 1688 </template> 1689 </buying-component> 1690 </template> 1691 </div> 1692 </header> 1693 </a> 1694 <template v-if="plpClass=='basic_listview-list'"> 1695 <ul class="basic_listview-specs"> 1696 <li v-for="item in SpecificationHelpers.GetPrettyBulletPoints(product.specifications)"> 1697 {{item}} 1698 </li> 1699 <li v-if="SpecificationHelpers.showMoreDots(product.specifications)"> 1700 <a :href="product.product.url">...</a> 1701 </li> 1702 </ul> 1703 </template> 1704 <buying-component @@discount="onDiscount($event)" inline-template :selected-product="product" :plp-class="plpClass" :initial-product="initialProduct"> 1705 <footer itemprop="offers" itemscope="" itemtype="https://schema.org/Offer"> 1706 1707 <template v-if="SpecificationHelpers.GetFirstSpecificationValueOrDefault('EnergyArrow',selectedProduct.specifications) && plpClass == 'basic_listview-list'"> 1708 <div class="energy-price"> 1709 <div class="variant-price"> 1710 <variant-list :initial-variant="initialProduct" :currently-selected="selectedProduct"></variant-list> 1711 <async-price class-type="asyncprice-plp" 1712 :product="selectedProduct" 1713 :default-price="selectedProduct.product.defaultPrice.priceWithoutVat" 1714 :only-standard-price="@(Pageview.IsCurrentlyB2C().ToString().ToLower())" 1715 list-price="true" 1716 :should-emit-warranties="@((Pageview.IsAllowedToShop()).ToString().ToLower())" 1717 standard-customer="@(string.IsNullOrEmpty(Pageview.AreaSettings.GetString("StandardCustomer")) ? "" : Pageview.AreaSettings.GetString("StandardCustomer"))" 1718 @@discount="onDiscount($event)" 1719 :list-view="true"> 1720 </async-price> 1721 </div> 1722 <div class="energy-data"> 1723 <a :href="SpecificationHelpers.GetFirstSpecificationValueOrDefault('EnergyLabel',selectedProduct.specifications)" class="energy-label" target="_blank"> 1724 <img :src="SpecificationHelpers.GetFirstSpecificationValueOrDefault('EnergyArrow',selectedProduct.specifications)" alt="Energy Label" class="img-fluid img-energy" height="25" /> 1725 </a> 1726 <a href="#" v-on:click="getProductReport($event,selectedProduct.product.number,selectedProduct.product.name,selectedProduct.product.languageId)" target="_blank" class="energy-link"> 1727 <small>@Translate("PDP product sheet", "Product Sheet")</small> 1728 </a> 1729 </div> 1730 </div> 1731 </template> 1732 <template v-else> 1733 <div class="variant-price"> 1734 <variant-list :initial-variant="initialProduct" :currently-selected="selectedProduct"></variant-list> 1735 <async-price class-type="asyncprice-plp" 1736 :product="selectedProduct" 1737 :default-price="selectedProduct.product.defaultPrice.priceWithoutVat" 1738 :only-standard-price="@(Pageview.IsCurrentlyB2C().ToString().ToLower())" 1739 list-price="true" 1740 :should-emit-warranties="@((Pageview.IsAllowedToShop()).ToString().ToLower())" 1741 standard-customer="@(string.IsNullOrEmpty(Pageview.AreaSettings.GetString("StandardCustomer")) ? "" : Pageview.AreaSettings.GetString("StandardCustomer"))" 1742 @@discount="onDiscount($event)" 1743 :list-view="true"> 1744 </async-price> 1745 </div> 1746 </template> 1747 1748 <stock-location-component inline-template :remote-stock-shop-ids='@JsonConvert.SerializeObject(websiteSettings.ExternalShopIds)' not-in-stock-text='@Translate("PLP not in stock text", "N/A")' :default-stock-units='selectedProduct.product.stockUnits' :default-remote-stock-units='selectedProduct.product.remoteStock' :product='selectedProduct' :earliest-harbor-arrival-date='selectedProduct.product.EarliestHarborArrival'> 1749 <div class="stockscontainer"> 1750 <template v-if="stockUnits.length > 0 && !loading"> 1751 <div v-for="unit in stockUnits" class="stocks"> 1752 <span style="font-size: 1px">{{unit.quantity}}</span> 1753 <small v-if="stocksHasNoQuantity" class="outofstock"> 1754 {{ unit.stockLocation.description }} {{ GetStockAmountString(unit.quantity) }} 1755 </small> 1756 <small v-else class="instock"> 1757 {{ unit.stockLocation.description }} {{ GetStockAmountString(unit.quantity) }} @Translate("PLP In Stock", "In Stock") 1758 </small> 1759 </div> 1760 </template> 1761 <template v-if="remoteStockUnits.length > 0 && !loading"> 1762 <div v-for="remoteunit in remoteStockUnits" class="stocks"> 1763 <span style="font-size: 1px">{{remoteunit.quantity}}</span> 1764 <small v-if="remoteStocksHasNoQuantity" class="outofstock"> 1765 {{ remoteunit.stockLocation.description }} {{ GetStockAmountString(remoteunit.Quantity) }} 1766 </small> 1767 <small v-else class="instock"> 1768 {{ remoteunit.stockLocation.description }} {{ GetStockAmountString(remoteunit.quantity) }} @Translate("PLP In Stock", "In Stock") 1769 </small> 1770 </div> 1771 </template> 1772 </div> 1773 </stock-location-component> 1774 <div class="plp-buttons"> 1775 <div class="btn-group"> 1776 <add-to-compare :product-number="selectedProduct.product.number"></add-to-compare> 1777 @if (Pageview.IsCurrentlyB2B()) 1778 { 1779 <favorite-lists ui-error-message-translation="@Translate(plpProductPrefix + " Error while retrieving favorite list","Error while retrieving favorite list")" :is-favorite-mode="@NORRIQ.Common8.Razor.Navigation.GetPageIdByNavigationTag("favorites") == @Pageview.ID" :product="selectedProduct"></favorite-lists> 1780 } 1781 </div> 1782 <add-to-basket-simple :product="selectedProduct" 1783 :unit-of-measure="'PCS'" 1784 button-class="btn btn-primary" 1785 class="addtobasketsimple-plp" 1786 :price-without-vat="currentItemPriceWithoutVat" 1787 language-id="@Pageview.Area.EcomLanguageId" 1788 :only-spare-parts="@(Pageview.User.OnlySpareParts().ToString().ToLower())" 1789 :is-marketing-user="@(Pageview.User.OnlyView().ToString().ToLower())" 1790 :ishvasuser="@(Pageview.User.IsHVACUser().ToString().ToLower())" 1791 standard-customer="@(string.IsNullOrEmpty(Pageview.AreaSettings.GetString("StandardCustomer")) ? "" : Pageview.AreaSettings.GetString("StandardCustomer"))"> 1792 </add-to-basket-simple> 1793 </div> 1794 </footer> 1795 </buying-component> 1796 </article> 1797 </script> 1798 <script type="text/x-template" id="quick-search-template"> 1799 <div class="quicksearch-component"> 1800 <div class="quickorder-form"> 1801 <slot name="right-box"></slot> 1802 <div class="quickorder-box"> 1803 <h2>@Translate("Find products")</h2> 1804 <div class="quickorder-input"> 1805 <label for="quickOrderSearch">@Translate("Product name or number")</label> 1806 <input type="text" 1807 :id="id" 1808 v-model="search" 1809 @@keydown.enter="enter" 1810 @@keydown.down="down" 1811 @@keydown.up="up" 1812 @@input="onSearchInput" 1813 class="form-control form-control-lg" 1814 autocomplete="chrome-off" 1815 placeholder="@Translate("Quick order search term")" 1816 :disabled="disabled"/> 1817 <label for="quickOrderQty">@Translate("Quantity")</label> 1818 <input type="number" 1819 v-model.number="quantity" 1820 @@change="chosenProduct()" 1821 @@keydown.enter="chosenProduct()" 1822 class="form-control form-control-lg" 1823 id="quickOrderQty" 1824 placeholder="0" 1825 autocomplete="chrome-off" 1826 :disabled="disabled"/> 1827 1828 </div> 1829 <ul v-if="filterList.length > 0 && open" class="quickorder-list"> 1830 <li v-for="(product,index) in filterList" 1831 :class="{'active': isSelected(index)}"> 1832 <button @@click="suggestClick(index)"> 1833 {{concatNameAndNumber(product)}} 1834 </button> 1835 1836 </li> 1837 </ul> 1838 1839 <div class="quickorder-product" v-if="currentChosenProduct"> 1840 <p><strong>{{currentChosenProduct.name}}</strong><small>{{currentChosenProduct.shortDescription}}</small></p> 1841 <product-specification-list-view v-if="searchProductSpecs !== null" 1842 :product-specifications="searchProductSpecs" 1843 :product-number="currentChosenProduct.number"> 1844 </product-specification-list-view> 1845 <async-price class-type="quickorder-product-price" 1846 :product="currentChosenProduct" 1847 unit-of-measure="" 1848 :only-price="true" 1849 default-price-without-vat="0" 1850 @@price="handlePriceUpdate" 1851 standard-customer="@(string.IsNullOrEmpty(Pageview.AreaSettings.GetString("StandardCustomer")) ? "" : Pageview.AreaSettings.GetString("StandardCustomer"))"> 1852 </async-price> 1853 </div> 1854 </div> 1855 </div> 1856 <p v-if="showPriceError">@Translate("QuickOrderZeroPriceError","Can not add product with zero price")</p> 1857 <div class="quickorder-cart" v-if="productsToOrder.length > 0"> 1858 <table class="table table-striped table-flex"> 1859 <thead> 1860 <tr> 1861 <th>@Translate("Product")</th> 1862 <th>@Translate("Specifications")</th> 1863 <th>@Translate("Quantity")</th> 1864 <th class="cell-right">@Translate("Price")</th> 1865 <th>&nbsp;</th> 1866 </tr> 1867 </thead> 1868 <tbody> 1869 <tr v-for="(product,index) in productsToOrder"> 1870 <td class="cell-prod"> 1871 <strong>{{product.name}}</strong> 1872 <small>{{product.shortDescription}}</small> 1873 </td> 1874 <td class="cell-specs"> 1875 <product-specification-list-view :product-specifications="product.productSpecifications" 1876 :product-number="product.number"> 1877 </product-specification-list-view> 1878 </td> 1879 <td class="cell-specs"> 1880 <input class="form-control" type="number" v-model="product.quantity" @@input="updateQuantity()" /> 1881 </td> 1882 <td class="cell-price cell-right"> 1883 <async-price class-type="quickorder-product-price" 1884 :product="quickOrderProductToSimpleProduct(product)" 1885 unit-of-measure="" 1886 :only-price="true" 1887 default-price-without-vat="0" 1888 :should-emit-warranties="true" 1889 @@qo-warranty-update="setWarranty($event,product)" 1890 standard-customer="@(string.IsNullOrEmpty(Pageview.AreaSettings.GetString("StandardCustomer")) ? "" : Pageview.AreaSettings.GetString("StandardCustomer"))"> 1891 1892 </async-price> 1893 </td> 1894 <td class="cell-trash"> 1895 <button @@click="removeOrderline(index)" aria-label="@Translate("Delete product")" class="text-danger"> 1896 <svg> 1897 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#trash-alt"></use> 1898 </svg> 1899 </button> 1900 </td> 1901 </tr> 1902 </tbody> 1903 </table> 1904 <slot name="button"></slot> 1905 1906 </div> 1907 </div> 1908 </script> 1909 @inherits Tefcold.Web.CustomCode.Razor.TefcoldViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 1910 @{ 1911 //This template contains everything for the favoritelist items. 1912 string favoriteListPrefix = "FavoriteList "; 1913 } 1914 <span id="favoritelistitem_confirm_delete_on_all" style="display: none; visibility: hidden">@Translate(favoriteListPrefix + "_confirm_delete_all", "Er du sikker på at du vil fjerne produktet {0} fra alle lister ?")</span> 1915 1916 <script type="text/x-template" id="favorite-item-template"> 1917 <div class="custom-control custom-checkbox"> 1918 <input type="checkbox" :checked="isActive" v-on:change="toggleItem()" :id="'fav-' +favoriteList.id" class="custom-control-input" /> 1919 <label :for="'fav-' + favoriteList.id" class="custom-control-label"> 1920 {{favoriteList.name}} 1921 </label> 1922 1923 @*<input type="checkbox" :value="favoriteList.id" :checked="isItemAddedToThisList(favoriteList)" v-on:change="toggleItem($event, favoriteList.id)" class="form-check-input" /> 1924 <label :for="'fav-' + favoriteList.id" class="form-check-label"> 1925 {{favoriteList.name}} 1926 </label>*@ 1927 </div> 1928 </script> 1929 <!-- 1930 1931 <button class="btn btn-favorite favorite" title="Add to favorite" aria-label="@Translate("Favorite", "Favorite" )" v-on:click="toggleItem()"> 1932 <svg> 1933 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#snowflake"></use> 1934 </svg> 1935 </button> 1936 --> 1937 <script type="text/x-template" id="favorite-list-template"> 1938 <div class="fav"> 1939 <button :aria-controls="'favorite' + product.product.id" :class="['btn btn-favorite', {'is-open': showingMenu}, {'is-selected': isActive}]" aria-label="@Translate(favoriteListPrefix + "Favorite", "Favorite" )" :title="isActive ? '@Translate(favoriteListPrefix + "Remove from favorites","Remove from favorites")' : '@Translate(favoriteListPrefix + "Add to favorites","Add to favorites")'" v-on:click="toggleItem()"> 1940 <svg> 1941 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#snowflake"></use> 1942 </svg> 1943 </button> 1944 <div class="fav-overlay" v-autoClose.nonPath="closeToggle" :id="'favorite' + product.product.id"> 1945 <div class="fav-arrow" v-if="showingMenu"></div> 1946 <div class="fav-inwrap" v-if="showingMenu"> 1947 <template v-if="loading"> 1948 <div class="text-center"> 1949 <span class="spinner-md-default"></span> 1950 </div> 1951 </template> 1952 <em class="error" v-if="uiErrorMessage">{{uiErrorMessage}}</em> 1953 <template v-if="!loading && !uiErrorMessage"> 1954 <p class="fav-title">@Translate(favoriteListPrefix + "Favoritliste", "Favoritliste")</p> 1955 <template v-if="favoriteLists && favoriteLists.length > '0'"> 1956 <p class="fav-teaser"> 1957 @Translate(favoriteListPrefix + "Tilføj eller fjern markering.", "Tilføj eller fjern markering.") 1958 </p> 1959 <div class="fav-lists"> 1960 <favorite-item v-for="favoriteList in favoriteLists" :favorite-list="favoriteList" :product="product" :key="favoriteList.id" /> 1961 </div> 1962 <div class="fav-new"> 1963 <div class="custom-control custom-checkbox"> 1964 <input type="checkbox" v-model="addNewList" id="addNewListCheckbox" class="custom-control-input" /> 1965 <label for="addNewListCheckbox" class="custom-control-label"> 1966 @Translate(favoriteListPrefix + "Ny favoritliste", "Ny favoritliste") 1967 </label> 1968 </div> 1969 </div> 1970 <div v-if="addNewList" class="fav-form"> 1971 <label for="addNewListNameInput" class="sr-only">@Translate(favoriteListPrefix + "Navn", "Navn")</label> 1972 <input type="text" id="addNewListNameInput" v-model="addNewListNameInput" class="form-control form-control-sm new-list-name-input" placeholder="@Translate(favoriteListPrefix + "Navn", "Navn")" v-on:keyup.enter="saveAsNewList" /> 1973 <button v-on:click="saveAsNewList" class="btn btn-secondary btn-sm">@Translate(favoriteListPrefix + "Gem", "Gem")</button> 1974 </div> 1975 </template> 1976 <template v-else> 1977 <p class="fav-teaser">@Translate(favoriteListPrefix + "NoFavoritliste", "Du har endnu ingen favoritlister, angiv navn for at oprette en.")</p> 1978 <div class="fav-form"> 1979 <label for="addNewListNameInput" class="sr-only">@Translate(favoriteListPrefix + "Navn", "Navn")</label> 1980 <input type="text" id="addNewListNameInput" v-model="addNewListNameInput" class="form-control form-control-sm new-list-name-input" placeholder="@Translate(favoriteListPrefix + "Navn", "Navn")" v-on:keyup.enter="saveAsNewList" /> 1981 <button v-on:click="saveAsNewList" class="btn btn-secondary btn-sm">@Translate(favoriteListPrefix + "Gem", "Gem")</button> 1982 </div> 1983 </template> 1984 </template> 1985 </div> 1986 </div> 1987 </div> 1988 </script> 1989 1990 <script type="text/x-template" id="basic-range-slider-template"> 1991 @{ 1992 string rangeFacetPrefix = "Filter "; 1993 } 1994 <div class="facet-option"> 1995 <vue-slider :key="key" @@drag-end="onChange" @@click="onChange" :min-range="1" v-model="value" :dotSize="20" :min="min" :max="max" :clickable="false"></vue-slider> 1996 <div class="vue-slider-fields"> 1997 <div class="form-group"> 1998 <label for="minValue" class="sr-only">@Translate(rangeFacetPrefix + "Minimum Value", "Minimum Value")</label> 1999 <input class="form-control form-control-sm" type="number" @@blur="onChange" id="minValue" name="minValue" v-model="minValue" /> 2000 </div> 2001 <div class="form-group"> 2002 <label for="maxValue" class="sr-only">@Translate(rangeFacetPrefix + "Maximum Value", "Maximum Value")</label> 2003 <input class="form-control form-control-sm" type="number" @@blur="onChange" id="maxValue" name="maxValue" v-model="maxValue" /> 2004 </div> 2005 </div> 2006 </div> 2007 </script> 2008 2009 2010 2011 <script type="text/x-template" id="add-compare-template"> 2012 <button @@click="onClick" :class="['btn btn-compare', {'is-selected':isInCompare}]" :title="[isInCompare ? '@Translate(plpProductPrefix + "Remove from Compare", "Remove from Compare")' : '@Translate(plpProductPrefix + "Add to compare", "Add to compare")']"> 2013 <svg> 2014 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#balance-scale"></use> 2015 </svg> 2016 </button> 2017 </script> 2018 @using Dynamicweb.Frontend 2019 @{ 2020 string instantSearchPrefix = "InstantSearch "; 2021 } 2022 <script type="text/x-template" id="instant-search-template"> 2023 <form v-bind:class="baseClass" action="@NORRIQ.Common8.Razor.Navigation.GetUrlByNavigationTag("searchresult")" v-autoClose="closeFoldOut"> 2024 <div class="basic_instantsearch"> 2025 <label for="searchTerm" class="sr-only">@Translate(instantSearchPrefix + "Search", "Search")</label> 2026 <input type="search" 2027 placeholder="@Translate(instantSearchPrefix + "Search", "Search")" 2028 id="searchTerm" 2029 name="search" 2030 autocomplete="off" 2031 v-model="searchTerm" 2032 @*v-on:focus="openSearch"*@ 2033 @*v-on:blur="closeFoldOut()"*@ 2034 autofocus> 2035 <button type="submit"> 2036 <span class="sr-only">@Translate(instantSearchPrefix + "Search", "Search")</span> 2037 <svg> 2038 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/Files/dist/icons/icons.svg#search"></use> 2039 </svg> 2040 </button> 2041 <div class="fold-out" id="fold-popup" aria-controls="fold-popup" v-bind:class="{ active: foldActive && showResults, 'has-results': showResults }" v-auto-close> 2042 <template v-if="searchTerm == null"> 2043 <p class="search-string">@Translate(instantSearchPrefix + "Type something", "Type something")</p> 2044 </template> 2045 <template v-else-if="queryLoading"> 2046 <div class="is-loading"> 2047 <span class="spinner-lg-default"></span> 2048 </div> 2049 </template> 2050 <template v-else-if="!showResults"> 2051 <p class="search-string"> 2052 @Translate(instantSearchPrefix + "Empty search...", "Empty search...") 2053 </p> 2054 </template> 2055 <div class="fold-out-grid" v-else> 2056 <div class="fold-out-col is-content"> 2057 <ul v-if="groups?.length>0" class="fold-out-content"> 2058 <li> 2059 <strong>@Translate(instantSearchPrefix + "Categories", "Categories")</strong> 2060 </li> 2061 <li v-for="group in groups"> 2062 <a :href="group.url"> 2063 {{group.groupName}} 2064 </a> 2065 </li> 2066 </ul> 2067 <ul v-if="contents?.length>0" class="fold-out-content"> 2068 <li> 2069 <strong>@Translate(instantSearchPrefix + "Content", "Content")</strong> 2070 </li> 2071 <li v-for="content in contents"> 2072 <a :href="content.url"> 2073 {{content.pageTitle}} 2074 </a> 2075 </li> 2076 <li v-if="hasMoreContent" class="show-all"> 2077 <a :href="'@NORRIQ.Common8.Razor.Navigation.GetUrlByNavigationTag("searchresult")?search=' + searchTerm + '&show=content'">@Translate(instantSearchPrefix + "See all", "Se alle")</a> 2078 </li> 2079 </ul> 2080 </div> 2081 <div class="fold-out-col is-products" v-if="products?.length > 0"> 2082 <ul class="fold-out-products"> 2083 <li> 2084 <strong>@Translate(instantSearchPrefix + "Products", "Products")</strong> 2085 </li> 2086 <li v-for="product in products"> 2087 <figure> 2088 <img :src="'/Admin/Public/GetImage.ashx?Width=50&amp;Height=50&amp;fillcanvas=true&amp;Compression=85&amp;Crop=5&amp;Image=' + (product.imageLink ? product.imageLink : '/Files/Images/Default.jpg')" /> 2089 </figure> 2090 <div> 2091 <a :href="product.url"> 2092 {{product.name}} 2093 </a> 2094 <small>{{product.number}}</small> 2095 </div> 2096 </li> 2097 <li v-if="hasMoreProducts" class="show-all"> 2098 <a :href="'@NORRIQ.Common8.Razor.Navigation.GetUrlByNavigationTag("searchresult")?search=' + searchTerm + '&show=products'">@Translate(instantSearchPrefix + "See all", "Se alle")</a> 2099 </li> 2100 </ul> 2101 2102 </div> 2103 <div class="fold-out-col is-spareparts" v-if="spareParts?.length > 0"> 2104 <ul class="fold-out-products"> 2105 <li> 2106 <strong>@Translate(instantSearchPrefix + "Spareparts", "Spare parts")</strong> 2107 </li> 2108 <li v-for="product in spareParts"> 2109 <figure> 2110 <img :src="'/Admin/Public/GetImage.ashx?Width=50&amp;Height=50&amp;fillcanvas=true&amp;Compression=85&amp;Crop=5&amp;Image=' + (product.imageLink ? product.imageLink : '/Files/Images/Default.jpg')" /> 2111 </figure> 2112 <div> 2113 <a :href="product.url"> 2114 {{product.name}} 2115 </a> 2116 <small>{{product.number}}</small> 2117 </div> 2118 </li> 2119 <li v-if="hasMoreSpares" class="show-all"> 2120 <a :href="'@NORRIQ.Common8.Razor.Navigation.GetUrlByNavigationTag("searchresult")?search=' + searchTerm + '&show=spares'">@Translate(instantSearchPrefix + "See all", "Se alle")</a> 2121 </li> 2122 </ul> 2123 </div> 2124 </div> 2125 @*<div v-if="searchTerm != '' && showResults && !queryLoading" class="actions"> 2126 <a :href="'@NORRIQ.Common8.Razor.Navigation.GetUrlByNavigationTag("searchresult")?search=' + searchTerm">@Translate(instantSearchPrefix + "See all", "Se alle")</a> 2127 </div>*@ 2128 </div> 2129 </div> 2130 </form> 2131 </script> 2132 2133 2134 2135 <script src="@NORRIQ.Common8.Razor.TimestampSource.GetSourceWithTimestamp("/Files/dist/scripts/vendors~bundle.min.js")"></script> 2136 <script src="@NORRIQ.Common8.Razor.TimestampSource.GetSourceWithTimestamp("/Files/dist/scripts/bundle.min.js")"></script> 2137 @{ 2138 var currentUser = NORRIQ.Universal.Identity.Dw.UserViewModel.GetCurrentUser<Tefcold.Web.Api.Models.UserViewModelWithMediaBank>(); 2139 var jsonUser = Newtonsoft.Json.JsonConvert.SerializeObject(currentUser); 2140 } 2141 <script async> 2142 AppStart.VueProvider.init({ 2143 webApiUrl: '@System.Web.Configuration.WebConfigurationManager.AppSettings["WebApiProxyUrl"]', 2144 user: @jsonUser, 2145 currencyCode: '@currencyCode', 2146 locale: '@Pageview.Area.Culture', 2147 currencyLeft: false, 2148 currencySpacing: true, 2149 currencySymbol: '@currencyCode', 2150 currencyDecimalSeparator: ',', 2151 currencyGroupSeparator: '.', 2152 currencyDecimalDigits: 2, 2153 dateFormatShort: '@Pageview.Area.Dateformat', 2154 shopId: '@Pageview.Area.EcomShopId', 2155 languages: `@languagesJson`, 2156 langId: '@Pageview.Area.EcomLanguageId', 2157 areaId: '@Pageview.Area.ID' 2158 }); 2159 </script> 2160 2161 <script type='text/javascript' src='//s3.amazonaws.com/downloads.mailchimp.com/js/mc-validate.js'></script> 2162 <script type='text/javascript'>(function ($) { window.fnames = new Array(); window.ftypes = new Array(); fnames[0] = 'EMAIL'; ftypes[0] = 'email'; fnames[11] = 'INTEREST'; ftypes[11] = 'dropdown'; fnames[8] = 'COMPANY'; ftypes[8] = 'text'; fnames[12] = 'FNAME'; ftypes[12] = 'text'; fnames[1] = 'LNAME'; ftypes[1] = 'text'; fnames[2] = 'PHONE'; ftypes[2] = 'phone'; fnames[4] = 'COUNTRY'; ftypes[4] = 'dropdown'; fnames[5] = 'WEBSITE'; ftypes[5] = 'url'; fnames[9] = 'COMMENT'; ftypes[9] = 'text'; fnames[10] = 'HEARABOUT2'; ftypes[10] = 'dropdown'; }(jQuery)); var $mcj = jQuery.noConflict(true);</script> 2163 2164 <script append="replace"></script> 2165 @if (!string.IsNullOrEmpty(Model.PropertyItem.GetString("FormScript"))) 2166 { 2167 2168 @Model.PropertyItem.GetString("FormScript") 2169 2170 } 2171 </body> 2172 </html>