Error executing template "Designs/Tefcold/_parsed/Basic_Page.parsed.cshtml"
System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
   at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
   at System.Collections.Generic.List`1.Enumerator.MoveNextRare()
   at Dynamicweb.Ecommerce.Frontend.NavigationProviders.GroupNavigationProvider.MakeGroupTree(GroupCollection groups, Page page, NavigationItem parentNode, Int32 thisLevel, Int32 maxLevel, Page productPage)
   at Dynamicweb.Ecommerce.Frontend.NavigationProviders.GroupNavigationProvider.MakeGroupTree(Page page, NavigationItem parentNode)
   at Dynamicweb.Ecommerce.Frontend.NavigationProviders.GroupNavigationProvider.Process(NavigationItem node)
   at Dynamicweb.Ecommerce.Frontend.NavigationProviders.GroupNavigationProvider.ProcessTree(RootNavigationItem rootNode, NavigationType navigationType)
   at Dynamicweb.Frontend.XmlNavigation.MakeXml(Int32 parentId, Int32 levelStart, Int32 levelStop, Expand expand, Int32 selectedAreaId)
   at Dynamicweb.Frontend.XmlNavigation.GetNavigationHtml(Int32 parentId, Int32 levelStart, Int32 levelStop, Expand expand, String name, String xsltPath, Int32 selectedAreaId, Boolean sitemapMode, NameValueCollection settings, NameValueCollection attributes, IncludeMode mode)
   at Dynamicweb.Frontend.XmlNavigation.GetNavigationHtml(NameValueCollection settings, NameValueCollection attributes)
   at Dynamicweb.Rendering.TemplateBase`1.RenderNavigation(Object settings)
   at CompiledRazorTemplates.Dynamic.RazorEngine_9a6d4e4f2e694948bea57911464652cc.Execute() in E:\Solutions\Live\Tefcold.Web\Files\Templates\Designs\Tefcold\_parsed\Basic_Page.parsed.cshtml:line 123
   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 @{ 606 string basicPagePrefix = "Page "; 607 } 608 @if (Pageview.IsCurrentUserAllowed) 609 { 610 var pageLayout = !string.IsNullOrEmpty(Model.Item.GetValue<ListViewModel>("Layout").SelectedValue) ? Model.Item.GetValue<ListViewModel>("Layout").SelectedValue : "content-page-sidebar"; 611 var pageClass = pageLayout == "page-wide" ? "basic_page-wide" : "basic_page"; 612 if (!Model.Item.GetBoolean("HideBreadcrumb")) 613 { 614 if (Model.Area.Item.GetFile("TopImage") != null) 615 { 616 <figure> 617 <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" /> 618 </figure> 619 } 620 @RenderNavigation(new { Template = "basic_Breadcrumb.xslt", Expandmode = "all", StartLevel = 1, EndLevel = 5 }) 621 } 622 <main class="@pageClass"> 623 @if (pageLayout == "content-page-sidebar" || pageLayout == "module-page-sidebar") 624 { 625 <aside class="basic_page-sidebar"> 626 @RenderNavigation(new { Template = "basic_Page.xslt", StartLevel = 1, EndLevel = 3 }) 627 </aside> 628 <div class="basic_page-content"> 629 @if (pageLayout == "content-page-sidebar" && !string.IsNullOrEmpty(Model.Item.GetString("Title").ToString()) || !string.IsNullOrEmpty(Model.Item.GetString("Text").ToString())) 630 { 631 <section class="basic_paragraph"> 632 @if (!string.IsNullOrEmpty(Model.Item.GetString("Title").ToString())) 633 { 634 <header> 635 <h1> 636 @Model.Item.GetString("Title") 637 </h1> 638 </header> 639 } 640 @if (Model.Item.GetFile("Image") != null) 641 { 642 <figure> 643 <img src="@Model.Item.GetFile("Image").Path" alt="@Model.Item.GetString("Title")" class="img-fluid" /> 644 </figure> 645 } 646 @if (!string.IsNullOrEmpty(Model.Item.GetString("Text").ToString())) 647 { 648 @Model.Item.GetString("Text") 649 } 650 </section> 651 } 652 @RenderPlaceholder() 653 </div> 654 } 655 else 656 { 657 @RenderPlaceholder() 658 } 659 </main> 660 } 661 else 662 { 663 <main class="basic_page"> 664 @RenderPlaceholder() 665 </main> 666 } 667 @helper RenderPlaceholder() 668 { 669 @Model.Placeholder("Content", "Content", "unwrap:true;default:true") 670 if (!String.IsNullOrEmpty(Model.Placeholder("Boxed"))) 671 { 672 <div class="grouped"> 673 @Model.Placeholder("Boxed", "Grouped Content", "unwrap:true") 674 </div> 675 } 676 } 677 678 @{ 679 string footerPrefix = "Footer "; 680 } 681 <footer class="basic_footer"> 682 <div class="basic_footer-wrap basic_footer-main"> 683 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("FooterOneTitle")) && !string.IsNullOrEmpty(Model.Area.Item.GetString("FooterOneText"))) 684 { 685 <div class="basic_footer-box"> 686 <div class="basic_footer-head" role="button" v-b-toggle.footer-one> 687 <h3>@Model.Area.Item.GetString("FooterOneTitle")</h3> 688 </div> 689 <b-collapse id="footer-one" class="basic_footer-collapse"> 690 <div class="basic_footer-body"> 691 @Model.Area.Item.GetString("FooterOneText") 692 </div> 693 </b-collapse> 694 </div> 695 } 696 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("FooterTwoTitle")) 697 && !string.IsNullOrEmpty(Model.Area.Item.GetString("FooterTwoText")) 698 || !string.IsNullOrEmpty(Model.Area.Item.GetString("FooterTwoTag"))) 699 { 700 <div class="basic_footer-box"> 701 <div class="basic_footer-head" role="button" v-b-toggle.footer-two> 702 <h3>@Model.Area.Item.GetString("FooterTwoTitle")</h3> 703 </div> 704 <b-collapse id="footer-two" class="basic_footer-collapse"> 705 <div class="basic_footer-body"> 706 @Model.Area.Item.GetString("FooterTwoText") 707 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("FooterTwoTag"))) 708 { 709 @RenderNavigation(new { Template = "basic_Footer.xslt", Expandmode = "all", StartLevel = 1, EndLevel = 4, NavigationTag = @Model.Area.Item.GetString("FooterTwoTag").ToString() }) 710 } 711 </div> 712 </b-collapse> 713 </div> 714 } 715 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("FooterThreeTitle")) 716 && !string.IsNullOrEmpty(Model.Area.Item.GetString("FooterThreeText")) 717 || !string.IsNullOrEmpty(Model.Area.Item.GetString("FooterThreeTag"))) 718 { 719 <div class="basic_footer-box"> 720 <div class="basic_footer-head" role="button" v-b-toggle.footer-three> 721 <h3>@Model.Area.Item.GetString("FooterThreeTitle")</h3> 722 </div> 723 <b-collapse id="footer-three" class="basic_footer-collapse"> 724 <div class="basic_footer-body"> 725 @Model.Area.Item.GetString("FooterThreeText") 726 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("FooterThreeTag"))) 727 { 728 @RenderNavigation(new { Template = "basic_Footer.xslt", Expandmode = "all", StartLevel = 1, EndLevel = 4, NavigationTag = @Model.Area.Item.GetString("FooterThreeTag").ToString() }) 729 } 730 </div> 731 </b-collapse> 732 </div> 733 } 734 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("FooterFourTitle")) && !string.IsNullOrEmpty(Model.Area.Item.GetString("FooterFourText"))) 735 { 736 <div class="basic_footer-box"> 737 <div class="basic_footer-head" role="button" v-b-toggle.footer-four> 738 <h3>@Model.Area.Item.GetString("FooterFourTitle")</h3> 739 </div> 740 <b-collapse id="footer-four" class="basic_footer-collapse"> 741 <div class="basic_footer-body"> 742 @Model.Area.Item.GetString("FooterFourText") 743 </div> 744 </b-collapse> 745 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("FacebookUrl")) 746 || !string.IsNullOrEmpty(Model.Area.Item.GetString("LinkedInUrl")) 747 || !string.IsNullOrEmpty(Model.Area.Item.GetString("YoutubeUrl"))) 748 { 749 <div class="some"> 750 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("FacebookUrl"))) 751 { 752 <a href="@Model.Area.Item.GetString("FacebookUrl")" target="_blank" aria-label="Facebook" rel="noreferrer"> 753 <svg> 754 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#facebook-square"></use> 755 </svg> 756 </a> 757 } 758 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("LinkedInUrl"))) 759 { 760 <a href="@Model.Area.Item.GetString("LinkedInUrl")" target="_blank" aria-label="LinkedIn" rel="noreferrer"> 761 <svg> 762 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#linkedin"></use> 763 </svg> 764 </a> 765 } 766 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("YoutubeUrl"))) 767 { 768 <a href="@Model.Area.Item.GetString("YoutubeUrl")" target="_blank" aria-label="Youtube" rel="noreferrer"> 769 <svg> 770 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#youtube-square"></use> 771 </svg> 772 </a> 773 } 774 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("SmileyUrl"))) 775 { 776 <a href="@Model.Area.Item.GetString("SmileyUrl")" target="_blank" aria-label="@Translate(footerPrefix + "smiley", "Elite Smiley")" rel="noreferrer"> 777 <svg> 778 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#happy-smiley"></use> 779 </svg> 780 </a> 781 } 782 </div> 783 } 784 </div> 785 } 786 </div> 787 @if (Model.Area.Item.GetFile("GroupLogo") != null) 788 { 789 <div class="basic_footer-group"> 790 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("GroupLogo"))) 791 { 792 <a href="@Model.Area.Item.GetString("GroupLink")" target="_blank" title="@Translate(footerPrefix + "tefcold group logo alt", "Part of Tefcold Group")"> 793 <img src="@Model.Area.Item.GetFile("GroupLogo").Path" class="img-fluid" alt="@Translate(footerPrefix + "tefcold group logo alt", "Part of Tefcold Group")" /> 794 </a> 795 } 796 else 797 { 798 <img src="@Model.Area.Item.GetFile("GroupLogo").Path" class="img-fluid" alt="@Translate(footerPrefix + "tefcold group logo alt", "Part of Tefcold Group")" /> 799 } 800 </div> 801 } 802 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("FooterCopyright"))) 803 { 804 805 <div class="basic_footer-sub"> 806 <div class="basic_footer-wrap"> 807 808 <p> 809 &copy; @DateTime.Now.Year @Model.Area.Item.GetString("FooterCopyright") 810 </p> 811 @RenderNavigation(new { Template = "basic_Footer.xslt", Expandmode = "all", StartLevel = 1, EndLevel = 4, NavigationTag = "footer" }) 812 813 @if (Model.Area.Item.GetValue<ListViewModel>("Cards").SelectedValues.Any()) 814 { 815 <div class="text-center cards"> 816 @foreach (var cards in Model.Area.Item.GetValue<ListViewModel>("Cards").SelectedValues) 817 { 818 <img src="/Files/Images/cards/@cards" alt="@cards.Split('.').First()" loading="lazy" /> 819 } 820 </div> 821 } 822 823 </div> 824 </div> 825 } 826 </footer> 827 <compare-banner class="comparison-footer" inline-template> 828 <div v-if="productsToCompare >= 1" class="comparison-footer"> 829 @{ 830 string comparisonFooterPrefix = "Comparison "; 831 } 832 <template v-if="productsToCompare >= 2"> 833 <a href="@NORRIQ.Common8.Razor.Navigation.GetUrlByNavigationTag("compare")" class="btn btn-primary btn-lg btn-block"> 834 <svg class="icon"> 835 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#balance-scale"></use> 836 </svg> 837 <span> 838 @Translate(comparisonFooterPrefix + "Click to compare", "Click to compare") 839 <strong>{{productsToCompare}}</strong> 840 @Translate(comparisonFooterPrefix + "products", "products") 841 </span> 842 </a> 843 </template> 844 <template v-else> 845 <a href="@NORRIQ.Common8.Razor.Navigation.GetUrlByNavigationTag("compare")" class="btn btn-primary btn-lg btn-block no-click"> 846 <svg class="icon"> 847 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#balance-scale"></use> 848 </svg> 849 <span> 850 @Translate(comparisonFooterPrefix + "You need 2 product to compare", "You need <strong>2</strong> products to compare") 851 </span> 852 </a> 853 </template> 854 </div> 855 </compare-banner> 856 <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'> 857 <div></div> 858 </basic-alert> 859 </div> 860 861 @helper RenderLanguage(PageLanguageViewModel lang) 862 { 863 if (Pageview.AreaID == lang.ID) 864 { 865 return; 866 867 } 868 869 if (Pageview.AreaID == lang.ID) 870 { 871 return; 872 873 } 874 875 var langCode = lang.Culture.Split('-').Last(); 876 var cultureInfo = CultureInfo.GetCultureInfo(lang.Culture); 877 var language = cultureInfo.NativeName.Split('(')[0]; 878 var url = SearchEngineFriendlyURLs.GetFriendlyUrl(lang.Page.ID); 879 var query = System.Web.HttpUtility.ParseQueryString(System.Web.HttpContext.Current.Request.QueryString.ToString()); 880 var allowedQuery = new HashSet<string> { "groupid", "productid", "variantid" }; 881 var shopIdSplit = "-at-SHOP"; 882 var shopId = Services.Pages.GetPage(lang.Page.ID).Area.EcomShopId; 883 foreach (var kv in query.AllKeys) 884 { 885 if (kv != null && allowedQuery.Contains(kv.ToLower())) 886 { 887 var queryValue = query[kv]; 888 var indexOfShopId = queryValue.IndexOf(shopIdSplit, StringComparison.InvariantCultureIgnoreCase); 889 if (indexOfShopId > 0) 890 { 891 var withOutShopId = queryValue.Substring(0, indexOfShopId); 892 query[kv] = withOutShopId + "-at-" + shopId; 893 } 894 } 895 else 896 { 897 query.Remove(kv); 898 } 899 } 900 901 902 var langArea = Dynamicweb.Services.Areas.GetArea(lang.ID); 903 var protocol = langArea.SslMode == 2 ? "https:" : "http"; 904 var host = lang.PrimaryDomain; 905 906 if (string.IsNullOrWhiteSpace(host)) 907 { 908 var domains = langArea.Domain.Split(new[] { "\n" }, StringSplitOptions.RemoveEmptyEntries).Select(s => s.Trim()); 909 host = (domains.FirstOrDefault(s => !s.Equals("localhost")) ?? "").TrimEnd('/'); 910 } 911 var urlencodedQuery = $"{protocol}://{host}{url}{(query.HasKeys() ? "?" + query.ToString() : "")}"; 912 913 <li> 914 <a href="@urlencodedQuery"> 915 @if (lang.Culture == "en-GB") 916 { 917 <img src="/Files/Images/globe-flag.png" alt="@lang.Culture - Flag" width="32" height="32" loading="lazy" /> 918 } 919 else 920 { 921 <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" /> 922 } 923 @*@if (lang.Culture == "en-GB") 924 { 925 <svg width="32" height="32" fill="#3a3b3c"> 926 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#globe"></use> 927 </svg> 928 } 929 else 930 { 931 <img src="/Admin/Images/Flags/flag_@(langCode).png" alt="@lang.Culture - Flag" loading="lazy" /> 932 }*@ 933 <span>@Translate("lang_" + lang.Culture.Split('-').First(), lang.Culture.Split('-').First())</span> 934 </a> 935 </li> 936 } 937 938 939 @helper renderArea(Area lang, Websites websiteSettings) 940 { 941 var protocol = lang.SslMode == 2 ? "https:" : "http"; 942 var host = lang.DomainLock; 943 string countryCode = lang.Culture.Split('-').Last(); 944 if (string.IsNullOrWhiteSpace(host)) 945 { 946 var domains = lang.Domain.Split(new[] { "\n" }, StringSplitOptions.RemoveEmptyEntries).Select(s => s.Trim()); 947 host = (domains.FirstOrDefault(s => !s.Equals("localhost")) ?? "").TrimEnd('/'); 948 } 949 var langUrl = $"{protocol}://{host}"; 950 var langSettings = lang.Item.ToCodeFirstItem<Websites>(); 951 if (langSettings.NoIndex && !websiteSettings.NoIndex) 952 { 953 var pageId = NORRIQ.Common8.Razor.Navigation.GetPageIdByNavigationTag(countryCode + "Redirect"); 954 langUrl = pageId > 0 ? $"/Default.aspx?ID={pageId}" : ""; 955 } 956 <a href="@langUrl"> 957 @if (lang.Culture == "en-GB") 958 { 959 <img src="/Files/Images/globe-flag.png" alt="@lang.Culture - Flag" width="32" height="32" class="img-fluid" loading="lazy" /> 960 } 961 else 962 { 963 <img src="/Admin/Images/Flags/flag_@(countryCode).png" alt="@lang.Culture - Flag" width="32" height="32" class="img-fluid" loading="lazy" /> 964 } 965 <span>@Translate("lang_" + lang.Culture.Split('-').First(), lang.Culture.Split('-').First())</span> 966 </a> 967 968 } 969 970 <script type="text/x-template" id="cart-icon-template"> 971 @{ 972 string cartIconPrefix = "Minicart "; 973 } 974 <li> 975 <a :href="cartlink" title="@Translate(cartIconPrefix + "Checkout", "Checkout")"> 976 <svg> 977 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#shopping-cart"></use> 978 </svg> 979 <span class="label">@Translate(cartIconPrefix + "Checkout", "Checkout")</span> 980 <strong v-if="!cartEmpty" class="cart-quantity">{{quantity}}</strong> 981 </a> 982 </li> 983 </script> 984 985 986 987 <script type="text/x-template" id="basic-facet-filter-template"> 988 @{ 989 string basicFacetPrefix = "Filter "; 990 } 991 <aside> 992 <template v-if="HasActiveFilter()"> 993 994 <p id="selected-filter-label" class="sr-only"> 995 @Translate(basicFacetPrefix + "Active", "Active") 996 </p> 997 <div class="basic_filter-active" aria-labelledby="selected-filter-label"> 998 <template v-for="facetFilter in facetFilters"> 999 <span v-for="option in SelectedOptions(facetFilter)" class="custom-control custom-filter"> 1000 <input type="checkbox" 1001 :id="'Selected-' + facetFilter.name + '-' + option.name" 1002 :name="facetFilter.name" 1003 :value="option.value" 1004 :v-model="option.selected" 1005 :checked="option.selected" 1006 v-on:click="ToggleFilter(facetFilter.name,option)" 1007 class="custom-control-input" /> 1008 <label :for="'Selected-' + facetFilter.name + '-' + option.name" class="custom-control-label" :data-name="facetFilter.name"> 1009 <span> 1010 {{option.label}} 1011 </span> 1012 <svg> 1013 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#times"></use> 1014 </svg> 1015 </label> 1016 </span> 1017 </template> 1018 </div> 1019 </template> 1020 <b-collapse class="basic_filter" id="sidebar-filter"> 1021 <template v-if="!error && facetFilters"> 1022 <button type="button" class="btn-close" v-b-toggle.sidebar-filter.sidebar-overlay aria-label="@Translate(basicFacetPrefix + "Close Filter", "Close Filter")"> 1023 <span></span> 1024 <span></span> 1025 </button> 1026 <div class="basic_filter-groups"> 1027 <div class="basic_filter-group" v-for="(facetFilter, index) in facetFilters"> 1028 <p :id="'filter-group-' + facetFilter.name.toLowerCase().trim()" v-b-toggle="'filter-collapse-' + facetFilter.name.toLowerCase().trim()"> 1029 <template v-if="facetFilter.name === 'ModelType'"> 1030 @Translate(basicFacetPrefix + "ModelType", "Model / Type") 1031 </template> 1032 <template v-else-if="facetFilter.name === 'DoorType'"> 1033 @Translate(basicFacetPrefix + "DoorType", " Door type") 1034 </template> 1035 <template v-else-if="facetFilter.name === 'ExternalHeight'"> 1036 @Translate(basicFacetPrefix + "ExternalHeight", "External Height") (mm) 1037 </template> 1038 <template v-else-if="facetFilter.name === 'NetVolume'"> 1039 @Translate(basicFacetPrefix + "NetVolume", "Net Volume") (l) 1040 </template> 1041 <template v-else-if="facetFilter.name === 'DoorNumber'"> 1042 @Translate(basicFacetPrefix + "DoorNumber", " Number of doors") 1043 </template> 1044 <template v-else-if="facetFilter.name === 'ExteriorFinish'"> 1045 @Translate(basicFacetPrefix + "ExteriorFinish", "Exterior Finish") 1046 </template> 1047 <template v-else-if="facetFilter.name === 'ExternalWidth'"> 1048 @Translate(basicFacetPrefix + "ExternalWidth", "External Width") (mm) 1049 </template> 1050 <template v-else-if="facetFilter.name === 'GrossVolume'"> 1051 @Translate(basicFacetPrefix + "GrossVolume", "Gross Volume") (l) 1052 </template> 1053 <template v-else-if="facetFilter.name === 'Bottles330'"> 1054 @Translate(basicFacetPrefix + "Bottles330", "Capacity 330ml bottles") 1055 </template> 1056 <template v-else-if="facetFilter.name === 'Bottles500'"> 1057 @Translate(basicFacetPrefix + "Bottles500", "Capacity 500ml bottles") 1058 </template> 1059 <template v-else-if="facetFilter.name === 'Cans330'"> 1060 @Translate(basicFacetPrefix + "Cans330", "Capacity 300ml cans") 1061 </template> 1062 <template v-else-if="facetFilter.name === 'Cans500'"> 1063 @Translate(basicFacetPrefix + "Cans500", "Capacity 500ml cans") 1064 </template> 1065 <template v-else-if="facetFilter.name === 'TemperatureRange'"> 1066 @Translate(basicFacetPrefix + "TemperatureRange", "Temperature Range") 1067 </template> 1068 <template v-else-if="facetFilter.name === 'TemperatureRangeZone2'"> 1069 @Translate(basicFacetPrefix + "TemperatureRangeZone2", "Tempature Range 2") 1070 </template> 1071 <template v-else-if="facetFilter.name === 'ShelfNumber'"> 1072 @Translate(basicFacetPrefix + "ShelfNumber", "Number of shelfs") 1073 </template> 1074 <template v-else-if="facetFilter.name === 'LidType'"> 1075 @Translate(basicFacetPrefix + "LidType", "Lid Type") 1076 </template> 1077 <template v-else-if="facetFilter.name === 'InteriorFinish'"> 1078 @Translate(basicFacetPrefix + "InteriorFinish", "Interior Finish") 1079 </template> 1080 <template v-else-if="facetFilter.name === 'WineBottles750'"> 1081 @Translate(basicFacetPrefix + "WineBottles750", "Capacity 750ml winebottles") 1082 </template> 1083 <template v-else-if="facetFilter.name === 'CanopyType'"> 1084 @Translate(basicFacetPrefix + "CanopyType", "Canopy Type") 1085 </template> 1086 <template v-else-if="facetFilter.name === 'CoolingType'"> 1087 @Translate(basicFacetPrefix + "CoolingType", "Cooling Type") 1088 </template> 1089 <template v-else> 1090 {{facetFilter.name}} 1091 </template> 1092 <svg> 1093 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/Files/dist/icons/icons.svg#chevron-up"></use> 1094 </svg> 1095 </p> 1096 <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()"> 1097 <template v-if="facetFilter.renderType === 'Range'"> 1098 <basic-range-slider @@change="updateRange(facetFilter,$event)" :min="getMinRange(facetFilter)" :max="getMaxRange(facetFilter)" :init-min="getInitMin(facetFilter)" :init-max="getInitMax(facetFilter)"></basic-range-slider> 1099 </template> 1100 1101 <template v-else-if="facetFilter.optionActiveCount > 5"> 1102 <span v-for="option in facetFilter.options.slice(0, 5)" class="custom-control custom-checkbox facet-option"> 1103 <input type="checkbox" class="custom-control-input" 1104 :id="'UnSelected-' + facetFilter.name + '-' + option.name" 1105 :name="facetFilter.name" 1106 :value="option.value" 1107 :v-model="option.selected" 1108 :checked="option.selected" 1109 v-on:click="ToggleFilter(facetFilter.name,option)" /> 1110 <label :for="'UnSelected-' + facetFilter.name + '-' + option.name" class="custom-control-label"> 1111 {{option.label}} <span class="count">({{option.count}})</span> 1112 </label> 1113 </span> 1114 <b-collapse class="basic_filter-expand" :id="'filter-expand-' + facetFilter.name.toLowerCase().trim()" :visible="ShowMoreIfSelected(facetFilter.options, index)"> 1115 <span v-for="option in facetFilter.options.slice(5)" class="custom-control custom-checkbox facet-option"> 1116 <input type="checkbox" class="custom-control-input" 1117 :id="'UnSelected-' + facetFilter.name + '-' + option.name" 1118 :name="facetFilter.name" 1119 :value="option.value" 1120 :v-model="option.selected" 1121 :checked="option.selected" 1122 v-on:click="ToggleFilter(facetFilter.name,option)" /> 1123 <label :for="'UnSelected-' + facetFilter.name + '-' + option.name" class="custom-control-label"> 1124 {{option.label}} <span class="count">({{option.count}})</span> 1125 </label> 1126 </span> 1127 </b-collapse> 1128 <a v-b-toggle="'filter-expand-' + facetFilter.name.toLowerCase().trim()" class="basic_filter-expanding" v-if="facetFilter.optionActiveCount > 6"> 1129 <span class="show-more">+ @Translate(basicFacetPrefix + "show more", "show more")</span> 1130 <span class="show-less">- @Translate(basicFacetPrefix + "show less", "show less")</span> 1131 </a> 1132 </template> 1133 <template v-else> 1134 <span v-for="option in facetFilter.options" class="custom-control custom-checkbox facet-option"> 1135 <input type="checkbox" class="custom-control-input" 1136 :id="'UnSelected-' + facetFilter.name + '-' + option.name" 1137 :name="facetFilter.name" 1138 :value="option.value" 1139 :v-model="option.selected" 1140 :checked="option.selected" 1141 v-on:click="ToggleFilter(facetFilter.name,option)" /> 1142 <label :for="'UnSelected-' + facetFilter.name + '-' + option.name" class="custom-control-label"> 1143 {{option.label}} <span class="count">({{option.count}})</span> 1144 </label> 1145 </span> 1146 </template> 1147 </b-collapse> 1148 </div> 1149 </div> 1150 </template> 1151 </b-collapse> 1152 </aside> 1153 </script> 1154 <script type="text/x-template" id="add-to-basket-simple-template"> 1155 @{ 1156 string addToBasketSimplePrifix = "BuyButton "; 1157 } 1158 <div class="form-flex" v-if="renderBuy" v-bind:class="[{added: IsAdded}, {adding: IsAdding}, {disabled: !canAdd}]"> 1159 1160 <label for="quantity">@Translate(addToBasketSimplePrifix + "Quantity", "Quantity")</label> 1161 <input class="form-control" type="tel" name="quantity" v-model="quantity" autocomplete="off" onclick="this.setSelectionRange(0, this.value.length)"> 1162 <button :disabled="!canAdd" :class="buttonClass" v-on:click="addToBasketAndResetQuantity()" aria-label="@Translate(addToBasketSimplePrifix + "Add", "Add")"> 1163 <slot> 1164 <svg> 1165 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#shopping-cart"> 1166 </use> 1167 </svg> 1168 <span> 1169 @Translate(addToBasketSimplePrifix + "Add to basket", "Add to basket") 1170 </span> 1171 </slot> 1172 1173 </button> 1174 1175 <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> 1176 <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> 1177 <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> 1178 </div> 1179 </script> 1180 1181 <script type="text/x-template" id="quick-add-template"> 1182 @{ 1183 string quickAddPrifix = "BuyButton "; 1184 } 1185 <div v-bind:class="[{added: IsAdded}, {adding: IsAdding}]"> 1186 <label for="quantity">@Translate(quickAddPrifix + "Quantity", "Quantity")</label> 1187 <input class="form-control" type="number" id="quantity" name="quantity" v-model="quantity" autocomplete="off"> 1188 </div> 1189 </script> 1190 1191 <script type="text/x-template" id="add-to-basket-button-only-template"> 1192 @{ 1193 string addToBasketPrefix = "BuyButton "; 1194 } 1195 <div v-bind:class="[{added: IsAdded}, {adding: IsAdding}]"> 1196 <button :class="buttonClass" v-on:click="addToBasket()"> 1197 <slot> 1198 @Translate(addToBasketPrefix + "Add to basket", "Add to basket") 1199 </slot> 1200 </button> 1201 </div> 1202 </script> 1203 @using Dynamicweb.Frontend 1204 @using Tefcold.Web.CustomCode.Items 1205 @{ 1206 string asyncPrefix = "Async "; 1207 var website = PageView.Current().Area.GetWebsiteSettings(); 1208 } 1209 <script type="text/x-template" id="async-price-template"> 1210 <div :class="classType + (loading ? ' loading' : '') + (hasDiscount ? ' has-discount' : '')"> 1211 <template> 1212 <p :class="classType + '--error'" v-if="error">{{error}}</p> 1213 </template> 1214 <template v-if="!loading"> 1215 @if (!website.ShowPriceWitVatAndDiscount) 1216 { 1217 <template v-if="!forceAskForPrice && price.netUnitPrice.priceWithoutVat"> 1218 <meta itemprop="price" :content="price.netUnitPrice.priceWithoutVat" /> 1219 <meta itemprop="priceCurrency" content="@(Pageview.User?.Currency ?? Pageview.Area.EcomCurrencyId)" /> 1220 <div class="price-withoutvat"> 1221 <span class="price-label">@Translate(asyncPrefix + "price without vat", "Price without VAT")</span> 1222 <p class="price"> 1223 <span class="unit-price">{{ price.netUnitPrice.priceWithoutVat | currency(price.currencyCode) }}</span> 1224 </p> 1225 </div> 1226 </template> 1227 } 1228 @if (website.ShowPriceWitVatAndDiscount) 1229 { 1230 <template v-if="listView &&!forceAskForPrice && price.netUnitPrice.priceWithVat"> 1231 <meta itemprop="price" :content="price.netUnitPrice.priceWithVat" /> 1232 <meta itemprop="priceCurrency" content="@(Pageview.User?.Currency ?? Pageview.Area.EcomCurrencyId)" /> 1233 <div class="price-withoutvat"> 1234 <span class="price-label">@Translate(asyncPrefix + "price with vat", "Price with VAT")</span> 1235 <p class="price"> 1236 <span class="unit-price">{{ price.netUnitPrice.priceWithVat | currency(price.currencyCode) }}</span> 1237 <small class="prev-price" v-if="hasDiscount && price.unitPrice.priceWithVat">{{ price.unitPrice.priceWithVat | currency(price.currencyCode) }}</small> 1238 </p> 1239 </div> 1240 </template> 1241 <template v-if="!listView"> 1242 <template v-if="!forceAskForPrice && price.netUnitPrice.priceWithoutVat"> 1243 <meta itemprop="price" :content="price.netUnitPrice.priceWithoutVat" /> 1244 <meta itemprop="priceCurrency" content="@(Pageview.User?.Currency ?? Pageview.Area.EcomCurrencyId)" /> 1245 <div class="price-withoutvat"> 1246 <span class="price-label">@Translate(asyncPrefix + "price without vat", "Price without VAT")</span> 1247 <p class="price"> 1248 <span class="unit-price">{{ price.netUnitPrice.priceWithoutVat | currency(price.currencyCode) }}</span> 1249 @if (website.ShowPriceWitVatAndDiscount) 1250 { 1251 <small class="prev-price" v-if="hasDiscount && price.unitPrice.priceWithoutVat">{{ price.unitPrice.priceWithoutVat | currency(price.currencyCode) }}</small> 1252 } 1253 </p> 1254 </div> 1255 </template> 1256 <div class="price-withvat"> 1257 <span class="price-label">@Translate(asyncPrefix + "price with vat", "Price with VAT")</span> 1258 <p class="price"> 1259 <span class="unit-price">{{ price.netUnitPrice.priceWithVat | currency(price.currencyCode) }}</span> 1260 <small class="prev-price" v-if="hasDiscount && !listView && price.unitPrice.priceWithVat">{{ price.unitPrice.priceWithVat | currency(price.currencyCode) }}</small> 1261 </p> 1262 1263 </div> 1264 <div class="weee-fee" v-if="price.weeeFee && price.weeeFee > 0"> 1265 <span class="price-label">@Translate("Weee fee", "Weee fee")</span> 1266 <p class="price"> 1267 <span class="unit-price">{{ price.weeeFee | currency(price.currencyCode) }}</span> 1268 </p> 1269 1270 </div> 1271 </template> 1272 } 1273 </template> 1274 <template v-if="allowedHvac && (!price?.netUnitPrice?.priceWithoutVat || forceAskForPrice)"> 1275 <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> 1276 </template> 1277 <template v-else-if="!allowedHvac"> 1278 <a href="@NORRIQ.Common8.Razor.Navigation.GetUrlByNavigationTag("contact")" class="btn btn-outline-secondary btn-sm mt-3"> 1279 @Translate("create account", "Create account") 1280 </a> 1281 </template> 1282 </div> 1283 </script> 1284 <script type="text/x-template" id="pagination-template"> 1285 @{ 1286 string paginationPrefix = "Pagination "; 1287 } 1288 <nav aria-label="@Translate(paginationPrefix + "Productlist pagination", "Productlist pagination")"> 1289 <ul class="pagination"> 1290 <li :class="['page-item', currentPage == 1 ? 'disabled' : '' ]" v-if="currentPage > 1"> 1291 <a class="page-link" v-on:click="togglePrevPage()" aria-label="@Translate(paginationPrefix + "Previous Page", "Previous Page")" v-bind:aria-disabled="currentPage > 1 ? 'true' : null"> 1292 <svg> 1293 <use xmlns:xlink="http://www.w3.org/1999/xlink" 1294 xlink:href="/files/dist/icons/icons.svg#chevron-left"> 1295 </use> 1296 </svg> 1297 </a> 1298 </li> 1299 <template v-if="hasGroupId || true"> 1300 <li v-if="showPage(n)" v-for="n in totalPages" :key="n" :class="(n == currentPage ? 'page-item active' : 'page-item')"> 1301 <a v-on:click="togglePage(n)" v-bind:aria-current="(n == currentPage ? 'true' : '')" class="page-link"> 1302 {{n}} 1303 </a> 1304 </li> 1305 </template> 1306 <template v-else> 1307 <li class="page-item"> 1308 <span class="page-label"> 1309 {{currentPage}} 1310 </span> 1311 </li> 1312 <li class="page-item"> 1313 <span class="page-label"> 1314 @Translate(paginationPrefix + "of", "of") 1315 </span> 1316 </li> 1317 <li class="page-item"> 1318 <span class="page-label"> 1319 {{totalPages}} 1320 </span> 1321 </li> 1322 </template> 1323 <li :class="'page-item' + (currentPage >= totalPages ? ' disabled' : '')" v-if="currentPage < totalPages"> 1324 <a v-on:click="toggleNextPage()" aria-label="@Translate(paginationPrefix + "Next Page", "Next Page")" class="page-link" v-bind:aria-disabled="totalPages > currentPage ? 'true' : null"> 1325 <svg class="icon-pagination"> 1326 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#chevron-right"></use> 1327 </svg> 1328 </a> 1329 </li> 1330 </ul> 1331 </nav> 1332 </script> 1333 <script type="text/x-template" id="product-specification-list-view-template"> 1334 <div class="basic_listview-data"> 1335 <template v-if="!isSparePart"> 1336 <p itemprop="description"> 1337 {{ SpecificationHelpers.GetFirstSpecificationValueOrDefault('GrossNetVolume',productSpecifications)}} {{ SpecificationHelpers.GetSpecificationUnit(SpecificationHelpers.GetSpecificationByKey('GrossNetVolume',productSpecifications))}} 1338 <br /> 1339 {{ SpecificationHelpers.GetFirstSpecificationValueOrDefault('ExternalDimensionWeb',productSpecifications)}} 1340 1341 </p> 1342 </template> 1343 <p itemprop="sku">@Translate("PLP No.", "No.") {{productNumber}}</p> 1344 </div> 1345 </script> 1346 @using Tefcold.Web.CustomCode.Extensions 1347 @inherits Tefcold.Web.CustomCode.Razor.TefcoldViewModelTemplate<Dynamicweb.Ecommerce.ProductCatalog.ProductViewModel> 1348 <script type="text/x-template" id="product-spare-parts-view-template"> 1349 @{ 1350 string basicPimPrefix = "PDP "; 1351 } 1352 <div v-if="hasSparePartReport || hasExplodedDrawing || spareParts.length > 0"> 1353 <button class="btn-collapse" id="spareparts" v-b-toggle.spareparts-list> 1354 @Translate(basicPimPrefix + "spare parts", "Spare Parts") 1355 </button> 1356 <template> 1357 <b-collapse id="spareparts-list" accordion="specs2"> 1358 <template> 1359 <div class="body-collapse full pb-0"> 1360 <ul class="basic_pim-spares"> 1361 <template v-if="hasSparePartReport"> 1362 <li> 1363 <a :href="sparePartReport" target="_blank"> 1364 <svg> 1365 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#download"></use> 1366 </svg> 1367 @Translate(basicPimPrefix + "spare part list", "Spare part list") 1368 </a> 1369 </li> 1370 </template> 1371 <li v-if="hasExplodedDrawing"> 1372 <a :href="explodedDrawing" target="_blank"> 1373 <svg> 1374 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#download"></use> 1375 </svg> 1376 @Translate(basicPimPrefix + "view exploded drawing of spare parts", "View exploded drawing of spare parts") 1377 </a> 1378 </li> 1379 <li :data-point="spare.product.position" class="basic_pim-spare" v-for="spare in spareParts"> 1380 <div class="head"> 1381 <a href="#" v-on:click="navigateToSpare($event,spare.product.id)" class="name">{{spare.product.productName}}</a> 1382 <p class="sku">{{spare.product.number}}</p> 1383 </div> 1384 1385 @if (Pageview.IsAllowedToShop()) 1386 { 1387 <div class="foot"> 1388 <async-price class-type="asyncprice-spare" 1389 :product="spare" 1390 :default-price="spare.product.price" 1391 list-price="true" 1392 :only-standard-price="@(Pageview.IsCurrentlyB2C().ToString().ToLower())" 1393 standard-customer="@(string.IsNullOrEmpty(Pageview.AreaSettings.GetString("StandardCustomer")) ? "" : Pageview.AreaSettings.GetString("StandardCustomer"))"> 1394 1395 </async-price> 1396 <add-to-basket-simple :product="spare" 1397 :unit-of-measure="'PCS'" 1398 :sparepart-location="sparepartLocation" 1399 button-class="btn btn-primary" 1400 class="addtobasketsimple-plp" 1401 :price-without-vat="spare.product.price" 1402 language-id="@Pageview.Area.EcomLanguageId" 1403 :only-spare-parts="@(Pageview.User.OnlySpareParts().ToString().ToLower())" 1404 :is-marketing-user="@(Pageview.User.OnlyView().ToString().ToLower())" 1405 :ishvasuser="@(Pageview.User.IsHVACUser().ToString().ToLower())" 1406 standard-customer="@(string.IsNullOrEmpty(Pageview.AreaSettings.GetString("StandardCustomer")) ? "" : Pageview.AreaSettings.GetString("StandardCustomer"))"> 1407 </add-to-basket-simple> 1408 </div> 1409 } 1410 @*<p>DEBUG: {{spare}}</p>*@ 1411 </li> 1412 1413 </ul> 1414 </div> 1415 </template> 1416 </b-collapse> 1417 </template> 1418 </div> 1419 1420 </script> 1421 <script type="text/x-template" id="variant-list-template"> 1422 <ul class="variants" v-if="initialVariant.product.hasVariants" > 1423 <li> 1424 <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"/> 1425 <label :for="'main-' + initialVariant.product.id" :style="getImageOrColor(initialVariant.product.variantImage,initialVariant.product.variantValue)"></label> 1426 </li> 1427 <li v-for="variant in initialVariant.product.simpleVariants"> 1428 <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" /> 1429 <label :for="'color-'+variant.product.id+ '-' + variant.product.variantId" :style="getImageOrColor(variant.product.variantImage,variant.product.variantValue)"> 1430 </label> 1431 </li> 1432 </ul> 1433 </script> 1434 @using Dynamicweb.Ecommerce.Frontend 1435 @using Dynamicweb.Ecommerce.International 1436 @using Newtonsoft.Json 1437 @using NORRIQ.SalesPersonLogin.Services 1438 @using Tefcold.Web.CustomCode.Items.Settings 1439 @using Tefcold.Web.CustomCode.Stocks.Helpers 1440 @{ 1441 string plpProductPrefix2 = "PLP "; 1442 } 1443 <script type="text/x-template" id="product-template"> 1444 1445 1446 <article itemscope itemtype="https://schema.org/Product" v-if="product.product" v-bind:key="product.product.number"> 1447 <span class="badge"> 1448 <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" /> 1449 <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" /> 1450 </span> 1451 <a :href="product.product.url" itemprop="url"> 1452 <figure style="min-height: 1px;"> 1453 1454 <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)" 1455 v-bind:alt="product.product.name" itemprop="image" class="img-fluid" /> 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=/Files/Images/default.jpg'" 1457 v-bind:alt="product.product.name" itemprop="image" class="img-fluid" /> 1458 </figure> 1459 <header> 1460 <h1 itemprop="name">{{product.product.name}}</h1> 1461 <p itemprop="category">{{product.product.shortDescription}}</p> 1462 <div class="flex-list"> 1463 <product-specification-list-view :product-specifications="product.specifications" 1464 :product-number="product.product.number" 1465 :is-spare-part="product.product.isSparePart"> 1466 </product-specification-list-view> 1467 @if (Pageview.IsAllowedToShop()) 1468 { 1469 <template v-if="plpClass=='basic_listview-grid'"> 1470 <buying-component inline-template :selected-product="product" :initial-product="initialProduct"> 1471 <template v-if="SpecificationHelpers.GetFirstSpecificationValueOrDefault('EnergyArrow',selectedProduct.specifications)"> 1472 <div class="energy-data"> 1473 <a :href="SpecificationHelpers.GetFirstSpecificationValueOrDefault('EnergyLabel',selectedProduct.specifications)" target="_blank" class="energy-label"> 1474 <img :src="SpecificationHelpers.GetFirstSpecificationValueOrDefault('EnergyArrow',selectedProduct.specifications)" alt="Energy Label" class="img-fluid img-energy" height="25" /> 1475 </a> 1476 <a href="#" v-on:click="getProductReport($event,selectedProduct.product.number,selectedProduct.product.name,selectedProduct.product.languageId)" target="_blank" class="energy-link"> 1477 <small>@Translate("PDP product sheet", "Product Sheet")</small> 1478 </a> 1479 </div> 1480 </template> 1481 </buying-component> 1482 </template> 1483 } 1484 </div> 1485 </header> 1486 </a> 1487 <template v-if="plpClass=='basic_listview-list'"> 1488 <ul class="basic_listview-specs"> 1489 <li v-for="item in SpecificationHelpers.GetPrettyBulletPoints(product.specifications)"> 1490 {{item}} 1491 </li> 1492 <li v-if="SpecificationHelpers.showMoreDots(product.specifications)"> 1493 <a :href="product.product.url">...</a> 1494 </li> 1495 </ul> 1496 @*{{ product.Product.LongDescription }}*@ 1497 </template> 1498 1499 1500 @if (!Pageview.IsAllowedToShop()) 1501 { 1502 <footer> 1503 1504 <template v-if="SpecificationHelpers.GetFirstSpecificationValueOrDefault('EnergyArrow',product.specifications)"> 1505 <buying-component inline-template :selected-product="product" :initial-product="initialProduct"> 1506 <div class="energy-price"> 1507 <div class="variant-price"> 1508 <variant-list :initial-variant="initialProduct" :currently-selected="selectedProduct" class="mr-2"></variant-list> 1509 1510 <a href="@NORRIQ.Common8.Razor.Navigation.GetUrlByNavigationTag("contact")" class="btn btn-outline-secondary btn-sm ml-auto" style="white-space:nowrap;"> 1511 @Translate("create account", "Create account") 1512 </a> 1513 1514 </div> 1515 <div class="energy-data"> 1516 <a :href="SpecificationHelpers.GetFirstSpecificationValueOrDefault('EnergyLabel',selectedProduct.specifications)" class="energy-label" target="_blank"> 1517 <img :src="SpecificationHelpers.GetFirstSpecificationValueOrDefault('EnergyArrow',selectedProduct.specifications)" alt="Energy Label" class="img-fluid img-energy" height="25" /> 1518 </a> 1519 <a href="#" v-on:click="getProductReport($event,selectedProduct.product.number,selectedProduct.product.name,selectedProduct.product.languageId)" target="_blank" class="energy-link"> 1520 <small>@Translate("PDP product sheet", "Product Sheet")</small> 1521 </a> 1522 </div> 1523 </div> 1524 </buying-component> 1525 </template> 1526 <template v-else> 1527 <buying-component inline-template :selected-product="product" :initial-product="initialProduct"> 1528 <div class="energy-price"> 1529 <div class="variant-price"> 1530 <variant-list :initial-variant="initialProduct" :currently-selected="selectedProduct" class="mr-2"></variant-list> 1531 1532 <a href="@NORRIQ.Common8.Razor.Navigation.GetUrlByNavigationTag("contact")" class="btn btn-outline-secondary btn-sm ml-auto" style="white-space:nowrap;"> 1533 @Translate("create account", "Create account") 1534 </a> 1535 1536 </div> 1537 </div> 1538 1539 </buying-component> 1540 </template> 1541 </footer> 1542 } 1543 else 1544 { 1545 <buying-component inline-template :selected-product="product" :plp-class="plpClass" :initial-product="initialProduct"> 1546 <footer itemprop="offers" itemscope="" itemtype="https://schema.org/Offer"> 1547 1548 <template v-if="SpecificationHelpers.GetFirstSpecificationValueOrDefault('EnergyArrow',selectedProduct.specifications) && plpClass == 'basic_listview-list'"> 1549 <div class="energy-price"> 1550 <div class="variant-price"> 1551 <variant-list :initial-variant="initialProduct" :currently-selected="selectedProduct"></variant-list> 1552 <async-price class-type="asyncprice-plp" 1553 :product="selectedProduct" 1554 :default-price="selectedProduct.product.defaultPrice.priceWithoutVat" 1555 :only-standard-price="@(Pageview.IsCurrentlyB2C().ToString().ToLower())" 1556 list-price="true" 1557 :should-emit-warranties="@((Pageview.IsAllowedToShop()).ToString().ToLower())" 1558 standard-customer="@(string.IsNullOrEmpty(Pageview.AreaSettings.GetString("StandardCustomer")) ? "" : Pageview.AreaSettings.GetString("StandardCustomer"))"> 1559 </async-price> 1560 </div> 1561 <div class="energy-data"> 1562 <a :href="SpecificationHelpers.GetFirstSpecificationValueOrDefault('EnergyLabel',selectedProduct.specifications)" class="energy-label" target="_blank"> 1563 <img :src="SpecificationHelpers.GetFirstSpecificationValueOrDefault('EnergyArrow',selectedProduct.specifications)" alt="Energy Label" class="img-fluid img-energy" height="25" /> 1564 </a> 1565 <a href="#" v-on:click="getProductReport($event,selectedProduct.product.number,selectedProduct.product.name,selectedProduct.product.languageId)" target="_blank" class="energy-link"> 1566 <small>@Translate("PDP product sheet", "Product Sheet")</small> 1567 </a> 1568 </div> 1569 </div> 1570 </template> 1571 <template v-else> 1572 <div class="variant-price"> 1573 <variant-list :initial-variant="initialProduct" :currently-selected="selectedProduct"></variant-list> 1574 <async-price class-type="asyncprice-plp" 1575 :product="selectedProduct" 1576 :default-price="selectedProduct.product.defaultPrice.priceWithoutVat" 1577 :only-standard-price="@(Pageview.IsCurrentlyB2C().ToString().ToLower())" 1578 list-price="true" 1579 :should-emit-warranties="@((Pageview.IsAllowedToShop()).ToString().ToLower())" 1580 standard-customer="@(string.IsNullOrEmpty(Pageview.AreaSettings.GetString("StandardCustomer")) ? "" : Pageview.AreaSettings.GetString("StandardCustomer"))"> 1581 </async-price> 1582 </div> 1583 </template> 1584 1585 <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'> 1586 <div class="stockscontainer"> 1587 <template v-if="stockUnits.length > 0 && !loading"> 1588 <div v-for="unit in stockUnits" class="stocks"> 1589 <span style="font-size: 1px">{{unit.quantity}}</span> 1590 <small v-if="stocksHasNoQuantity" class="outofstock"> 1591 {{ unit.stockLocation.description }} {{ GetStockAmountString(unit.quantity) }} 1592 </small> 1593 <small v-else class="instock"> 1594 {{ unit.stockLocation.description }} {{ GetStockAmountString(unit.quantity) }} @Translate("PLP In Stock", "In Stock") 1595 </small> 1596 </div> 1597 </template> 1598 <template v-if="remoteStockUnits.length > 0 && !loading"> 1599 <div v-for="remoteunit in remoteStockUnits" class="stocks"> 1600 <span style="font-size: 1px">{{remoteunit.quantity}}</span> 1601 <small v-if="remoteStocksHasNoQuantity" class="outofstock"> 1602 {{ remoteunit.stockLocation.description }} {{ GetStockAmountString(remoteunit.Quantity) }} 1603 </small> 1604 <small v-else class="instock"> 1605 {{ remoteunit.stockLocation.description }} {{ GetStockAmountString(remoteunit.quantity) }} @Translate("PLP In Stock", "In Stock") 1606 </small> 1607 </div> 1608 </template> 1609 </div> 1610 </stock-location-component> 1611 1612 <div class="plp-buttons"> 1613 <div class="btn-group"> 1614 <add-to-compare :product-number="selectedProduct.product.number"></add-to-compare> 1615 @if (Pageview.IsCurrentlyB2B()) 1616 { 1617 <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> 1618 } 1619 </div> 1620 <add-to-basket-simple :product="selectedProduct" 1621 :unit-of-measure="'PCS'" 1622 button-class="btn btn-primary" 1623 class="addtobasketsimple-plp" 1624 :price-without-vat="currentItemPriceWithoutVat" 1625 language-id="@Pageview.Area.EcomLanguageId" 1626 :only-spare-parts="@(Pageview.User.OnlySpareParts().ToString().ToLower())" 1627 :is-marketing-user="@(Pageview.User.OnlyView().ToString().ToLower())" 1628 :ishvasuser="@(Pageview.User.IsHVACUser().ToString().ToLower())" 1629 standard-customer="@(string.IsNullOrEmpty(Pageview.AreaSettings.GetString("StandardCustomer")) ? "" : Pageview.AreaSettings.GetString("StandardCustomer"))"> 1630 </add-to-basket-simple> 1631 </div> 1632 </footer> 1633 </buying-component> 1634 } 1635 1636 </article> 1637 1638 </script> 1639 <script type="text/x-template" id="product-template-cz"> 1640 @{ 1641 string plpProductPrefix = "PLP "; 1642 } 1643 <article itemscope itemtype="https://schema.org/Product" v-if="product.product" v-bind:key="product.product.number"> 1644 <span class="stickers"> 1645 <template v-if="SpecificationHelpers.GetFirstSpecificationValueOrDefault('StickersCZNews',product.specifications)"> 1646 <img :src="'/Admin/Public/GetImage.ashx?Height=24&amp;Compression=85&amp;Image=' + SpecificationHelpers.GetFirstSpecificationValueOrDefault('StickersCZNews',product.specifications)" 1647 alt="@Translate(basicPimPrefix + "Sticker", "Sticker")" 1648 class="img-fluid" /> 1649 </template> 1650 <template v-else-if="SpecificationHelpers.GetFirstSpecificationValueOrDefault('StickersCZ',product.specifications)"> 1651 <img :src="'/Admin/Public/GetImage.ashx?Height=24&amp;Compression=85&amp;Image=' + SpecificationHelpers.GetFirstSpecificationValueOrDefault('StickersCZ',product.specifications)" 1652 alt="@Translate(basicPimPrefix + "Sticker", "Sticker")" 1653 class="img-fluid" /> 1654 </template> 1655 <span v-if="ShowDiscount" class="sticker discount"> 1656 -{{discount}}% 1657 </span> 1658 </span> 1659 <a :href="product.product.url" itemprop="url" :title="['@Translate(plpProductPrefix + "More info about", "More info about") ' + product.product.name]"> 1660 <figure style="min-height: 1px;"> 1661 1662 <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)" 1663 v-bind:alt="product.product.name" itemprop="image" class="img-fluid" /> 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=/Files/Images/default.jpg'" 1665 v-bind:alt="product.product.name" itemprop="image" class="img-fluid" /> 1666 </figure> 1667 <header> 1668 <h1 itemprop="name">{{product.product.name}}</h1> 1669 <p itemprop="category">{{product.product.shortDescription}}</p> 1670 <div class="flex-list"> 1671 <product-specification-list-view :product-specifications="product.specifications" 1672 :product-number="product.product.number" 1673 :is-spare-part="product.product.isSparePart"> 1674 </product-specification-list-view> 1675 <template v-if="plpClass=='basic_listview-grid'"> 1676 <buying-component inline-template :selected-product="product" :initial-product="initialProduct"> 1677 <template v-if="SpecificationHelpers.GetFirstSpecificationValueOrDefault('EnergyArrow',selectedProduct.specifications)"> 1678 <div class="energy-data"> 1679 <a :href="SpecificationHelpers.GetFirstSpecificationValueOrDefault('EnergyLabel',selectedProduct.specifications)" target="_blank" class="energy-label"> 1680 <img :src="SpecificationHelpers.GetFirstSpecificationValueOrDefault('EnergyArrow',selectedProduct.specifications)" alt="Energy Label" class="img-fluid img-energy" height="25" /> 1681 </a> 1682 <a href="#" v-on:click="getProductReport($event,selectedProduct.product.number,selectedProduct.product.name,selectedProduct.product.languageId)" target="_blank" class="energy-link"> 1683 <small>@Translate("PDP product sheet", "Product Sheet")</small> 1684 </a> 1685 </div> 1686 </template> 1687 </buying-component> 1688 </template> 1689 </div> 1690 </header> 1691 </a> 1692 <template v-if="plpClass=='basic_listview-list'"> 1693 <ul class="basic_listview-specs"> 1694 <li v-for="item in SpecificationHelpers.GetPrettyBulletPoints(product.specifications)"> 1695 {{item}} 1696 </li> 1697 <li v-if="SpecificationHelpers.showMoreDots(product.specifications)"> 1698 <a :href="product.product.url">...</a> 1699 </li> 1700 </ul> 1701 </template> 1702 <buying-component @@discount="onDiscount($event)" inline-template :selected-product="product" :plp-class="plpClass" :initial-product="initialProduct"> 1703 <footer itemprop="offers" itemscope="" itemtype="https://schema.org/Offer"> 1704 1705 <template v-if="SpecificationHelpers.GetFirstSpecificationValueOrDefault('EnergyArrow',selectedProduct.specifications) && plpClass == 'basic_listview-list'"> 1706 <div class="energy-price"> 1707 <div class="variant-price"> 1708 <variant-list :initial-variant="initialProduct" :currently-selected="selectedProduct"></variant-list> 1709 <async-price class-type="asyncprice-plp" 1710 :product="selectedProduct" 1711 :default-price="selectedProduct.product.defaultPrice.priceWithoutVat" 1712 :only-standard-price="@(Pageview.IsCurrentlyB2C().ToString().ToLower())" 1713 list-price="true" 1714 :should-emit-warranties="@((Pageview.IsAllowedToShop()).ToString().ToLower())" 1715 standard-customer="@(string.IsNullOrEmpty(Pageview.AreaSettings.GetString("StandardCustomer")) ? "" : Pageview.AreaSettings.GetString("StandardCustomer"))" 1716 @@discount="onDiscount($event)" 1717 :list-view="true"> 1718 </async-price> 1719 </div> 1720 <div class="energy-data"> 1721 <a :href="SpecificationHelpers.GetFirstSpecificationValueOrDefault('EnergyLabel',selectedProduct.specifications)" class="energy-label" target="_blank"> 1722 <img :src="SpecificationHelpers.GetFirstSpecificationValueOrDefault('EnergyArrow',selectedProduct.specifications)" alt="Energy Label" class="img-fluid img-energy" height="25" /> 1723 </a> 1724 <a href="#" v-on:click="getProductReport($event,selectedProduct.product.number,selectedProduct.product.name,selectedProduct.product.languageId)" target="_blank" class="energy-link"> 1725 <small>@Translate("PDP product sheet", "Product Sheet")</small> 1726 </a> 1727 </div> 1728 </div> 1729 </template> 1730 <template v-else> 1731 <div class="variant-price"> 1732 <variant-list :initial-variant="initialProduct" :currently-selected="selectedProduct"></variant-list> 1733 <async-price class-type="asyncprice-plp" 1734 :product="selectedProduct" 1735 :default-price="selectedProduct.product.defaultPrice.priceWithoutVat" 1736 :only-standard-price="@(Pageview.IsCurrentlyB2C().ToString().ToLower())" 1737 list-price="true" 1738 :should-emit-warranties="@((Pageview.IsAllowedToShop()).ToString().ToLower())" 1739 standard-customer="@(string.IsNullOrEmpty(Pageview.AreaSettings.GetString("StandardCustomer")) ? "" : Pageview.AreaSettings.GetString("StandardCustomer"))" 1740 @@discount="onDiscount($event)" 1741 :list-view="true"> 1742 </async-price> 1743 </div> 1744 </template> 1745 1746 <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'> 1747 <div class="stockscontainer"> 1748 <template v-if="stockUnits.length > 0 && !loading"> 1749 <div v-for="unit in stockUnits" class="stocks"> 1750 <span style="font-size: 1px">{{unit.quantity}}</span> 1751 <small v-if="stocksHasNoQuantity" class="outofstock"> 1752 {{ unit.stockLocation.description }} {{ GetStockAmountString(unit.quantity) }} 1753 </small> 1754 <small v-else class="instock"> 1755 {{ unit.stockLocation.description }} {{ GetStockAmountString(unit.quantity) }} @Translate("PLP In Stock", "In Stock") 1756 </small> 1757 </div> 1758 </template> 1759 <template v-if="remoteStockUnits.length > 0 && !loading"> 1760 <div v-for="remoteunit in remoteStockUnits" class="stocks"> 1761 <span style="font-size: 1px">{{remoteunit.quantity}}</span> 1762 <small v-if="remoteStocksHasNoQuantity" class="outofstock"> 1763 {{ remoteunit.stockLocation.description }} {{ GetStockAmountString(remoteunit.Quantity) }} 1764 </small> 1765 <small v-else class="instock"> 1766 {{ remoteunit.stockLocation.description }} {{ GetStockAmountString(remoteunit.quantity) }} @Translate("PLP In Stock", "In Stock") 1767 </small> 1768 </div> 1769 </template> 1770 </div> 1771 </stock-location-component> 1772 <div class="plp-buttons"> 1773 <div class="btn-group"> 1774 <add-to-compare :product-number="selectedProduct.product.number"></add-to-compare> 1775 @if (Pageview.IsCurrentlyB2B()) 1776 { 1777 <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> 1778 } 1779 </div> 1780 <add-to-basket-simple :product="selectedProduct" 1781 :unit-of-measure="'PCS'" 1782 button-class="btn btn-primary" 1783 class="addtobasketsimple-plp" 1784 :price-without-vat="currentItemPriceWithoutVat" 1785 language-id="@Pageview.Area.EcomLanguageId" 1786 :only-spare-parts="@(Pageview.User.OnlySpareParts().ToString().ToLower())" 1787 :is-marketing-user="@(Pageview.User.OnlyView().ToString().ToLower())" 1788 :ishvasuser="@(Pageview.User.IsHVACUser().ToString().ToLower())" 1789 standard-customer="@(string.IsNullOrEmpty(Pageview.AreaSettings.GetString("StandardCustomer")) ? "" : Pageview.AreaSettings.GetString("StandardCustomer"))"> 1790 </add-to-basket-simple> 1791 </div> 1792 </footer> 1793 </buying-component> 1794 </article> 1795 </script> 1796 <script type="text/x-template" id="quick-search-template"> 1797 <div class="quicksearch-component"> 1798 <div class="quickorder-form"> 1799 <slot name="right-box"></slot> 1800 <div class="quickorder-box"> 1801 <h2>@Translate("Find products")</h2> 1802 <div class="quickorder-input"> 1803 <label for="quickOrderSearch">@Translate("Product name or number")</label> 1804 <input type="text" 1805 :id="id" 1806 v-model="search" 1807 @@keydown.enter="enter" 1808 @@keydown.down="down" 1809 @@keydown.up="up" 1810 @@input="onSearchInput" 1811 class="form-control form-control-lg" 1812 autocomplete="chrome-off" 1813 placeholder="@Translate("Quick order search term")" 1814 :disabled="disabled"/> 1815 <label for="quickOrderQty">@Translate("Quantity")</label> 1816 <input type="number" 1817 v-model.number="quantity" 1818 @@change="chosenProduct()" 1819 @@keydown.enter="chosenProduct()" 1820 class="form-control form-control-lg" 1821 id="quickOrderQty" 1822 placeholder="0" 1823 autocomplete="chrome-off" 1824 :disabled="disabled"/> 1825 1826 </div> 1827 <ul v-if="filterList.length > 0 && open" class="quickorder-list"> 1828 <li v-for="(product,index) in filterList" 1829 :class="{'active': isSelected(index)}"> 1830 <button @@click="suggestClick(index)"> 1831 {{concatNameAndNumber(product)}} 1832 </button> 1833 1834 </li> 1835 </ul> 1836 1837 <div class="quickorder-product" v-if="currentChosenProduct"> 1838 <p><strong>{{currentChosenProduct.name}}</strong><small>{{currentChosenProduct.shortDescription}}</small></p> 1839 <product-specification-list-view v-if="searchProductSpecs !== null" 1840 :product-specifications="searchProductSpecs" 1841 :product-number="currentChosenProduct.number"> 1842 </product-specification-list-view> 1843 <async-price class-type="quickorder-product-price" 1844 :product="currentChosenProduct" 1845 unit-of-measure="" 1846 :only-price="true" 1847 default-price-without-vat="0" 1848 @@price="handlePriceUpdate" 1849 standard-customer="@(string.IsNullOrEmpty(Pageview.AreaSettings.GetString("StandardCustomer")) ? "" : Pageview.AreaSettings.GetString("StandardCustomer"))"> 1850 </async-price> 1851 </div> 1852 </div> 1853 </div> 1854 <p v-if="showPriceError">@Translate("QuickOrderZeroPriceError","Can not add product with zero price")</p> 1855 <div class="quickorder-cart" v-if="productsToOrder.length > 0"> 1856 <table class="table table-striped table-flex"> 1857 <thead> 1858 <tr> 1859 <th>@Translate("Product")</th> 1860 <th>@Translate("Specifications")</th> 1861 <th>@Translate("Quantity")</th> 1862 <th class="cell-right">@Translate("Price")</th> 1863 <th>&nbsp;</th> 1864 </tr> 1865 </thead> 1866 <tbody> 1867 <tr v-for="(product,index) in productsToOrder"> 1868 <td class="cell-prod"> 1869 <strong>{{product.name}}</strong> 1870 <small>{{product.shortDescription}}</small> 1871 </td> 1872 <td class="cell-specs"> 1873 <product-specification-list-view :product-specifications="product.productSpecifications" 1874 :product-number="product.number"> 1875 </product-specification-list-view> 1876 </td> 1877 <td class="cell-specs"> 1878 <input class="form-control" type="number" v-model="product.quantity" @@input="updateQuantity()" /> 1879 </td> 1880 <td class="cell-price cell-right"> 1881 <async-price class-type="quickorder-product-price" 1882 :product="quickOrderProductToSimpleProduct(product)" 1883 unit-of-measure="" 1884 :only-price="true" 1885 default-price-without-vat="0" 1886 :should-emit-warranties="true" 1887 @@qo-warranty-update="setWarranty($event,product)" 1888 standard-customer="@(string.IsNullOrEmpty(Pageview.AreaSettings.GetString("StandardCustomer")) ? "" : Pageview.AreaSettings.GetString("StandardCustomer"))"> 1889 1890 </async-price> 1891 </td> 1892 <td class="cell-trash"> 1893 <button @@click="removeOrderline(index)" aria-label="@Translate("Delete product")" class="text-danger"> 1894 <svg> 1895 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#trash-alt"></use> 1896 </svg> 1897 </button> 1898 </td> 1899 </tr> 1900 </tbody> 1901 </table> 1902 <slot name="button"></slot> 1903 1904 </div> 1905 </div> 1906 </script> 1907 @inherits Tefcold.Web.CustomCode.Razor.TefcoldViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 1908 @{ 1909 //This template contains everything for the favoritelist items. 1910 string favoriteListPrefix = "FavoriteList "; 1911 } 1912 <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> 1913 1914 <script type="text/x-template" id="favorite-item-template"> 1915 <div class="custom-control custom-checkbox"> 1916 <input type="checkbox" :checked="isActive" v-on:change="toggleItem()" :id="'fav-' +favoriteList.id" class="custom-control-input" /> 1917 <label :for="'fav-' + favoriteList.id" class="custom-control-label"> 1918 {{favoriteList.name}} 1919 </label> 1920 1921 @*<input type="checkbox" :value="favoriteList.id" :checked="isItemAddedToThisList(favoriteList)" v-on:change="toggleItem($event, favoriteList.id)" class="form-check-input" /> 1922 <label :for="'fav-' + favoriteList.id" class="form-check-label"> 1923 {{favoriteList.name}} 1924 </label>*@ 1925 </div> 1926 </script> 1927 <!-- 1928 1929 <button class="btn btn-favorite favorite" title="Add to favorite" aria-label="@Translate("Favorite", "Favorite" )" v-on:click="toggleItem()"> 1930 <svg> 1931 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#snowflake"></use> 1932 </svg> 1933 </button> 1934 --> 1935 <script type="text/x-template" id="favorite-list-template"> 1936 <div class="fav"> 1937 <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()"> 1938 <svg> 1939 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#snowflake"></use> 1940 </svg> 1941 </button> 1942 <div class="fav-overlay" v-autoClose.nonPath="closeToggle" :id="'favorite' + product.product.id"> 1943 <div class="fav-arrow" v-if="showingMenu"></div> 1944 <div class="fav-inwrap" v-if="showingMenu"> 1945 <template v-if="loading"> 1946 <div class="text-center"> 1947 <span class="spinner-md-default"></span> 1948 </div> 1949 </template> 1950 <em class="error" v-if="uiErrorMessage">{{uiErrorMessage}}</em> 1951 <template v-if="!loading && !uiErrorMessage"> 1952 <p class="fav-title">@Translate(favoriteListPrefix + "Favoritliste", "Favoritliste")</p> 1953 <template v-if="favoriteLists && favoriteLists.length > '0'"> 1954 <p class="fav-teaser"> 1955 @Translate(favoriteListPrefix + "Tilføj eller fjern markering.", "Tilføj eller fjern markering.") 1956 </p> 1957 <div class="fav-lists"> 1958 <favorite-item v-for="favoriteList in favoriteLists" :favorite-list="favoriteList" :product="product" :key="favoriteList.id" /> 1959 </div> 1960 <div class="fav-new"> 1961 <div class="custom-control custom-checkbox"> 1962 <input type="checkbox" v-model="addNewList" id="addNewListCheckbox" class="custom-control-input" /> 1963 <label for="addNewListCheckbox" class="custom-control-label"> 1964 @Translate(favoriteListPrefix + "Ny favoritliste", "Ny favoritliste") 1965 </label> 1966 </div> 1967 </div> 1968 <div v-if="addNewList" class="fav-form"> 1969 <label for="addNewListNameInput" class="sr-only">@Translate(favoriteListPrefix + "Navn", "Navn")</label> 1970 <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" /> 1971 <button v-on:click="saveAsNewList" class="btn btn-secondary btn-sm">@Translate(favoriteListPrefix + "Gem", "Gem")</button> 1972 </div> 1973 </template> 1974 <template v-else> 1975 <p class="fav-teaser">@Translate(favoriteListPrefix + "NoFavoritliste", "Du har endnu ingen favoritlister, angiv navn for at oprette en.")</p> 1976 <div class="fav-form"> 1977 <label for="addNewListNameInput" class="sr-only">@Translate(favoriteListPrefix + "Navn", "Navn")</label> 1978 <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" /> 1979 <button v-on:click="saveAsNewList" class="btn btn-secondary btn-sm">@Translate(favoriteListPrefix + "Gem", "Gem")</button> 1980 </div> 1981 </template> 1982 </template> 1983 </div> 1984 </div> 1985 </div> 1986 </script> 1987 1988 <script type="text/x-template" id="basic-range-slider-template"> 1989 @{ 1990 string rangeFacetPrefix = "Filter "; 1991 } 1992 <div class="facet-option"> 1993 <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> 1994 <div class="vue-slider-fields"> 1995 <div class="form-group"> 1996 <label for="minValue" class="sr-only">@Translate(rangeFacetPrefix + "Minimum Value", "Minimum Value")</label> 1997 <input class="form-control form-control-sm" type="number" @@blur="onChange" id="minValue" name="minValue" v-model="minValue" /> 1998 </div> 1999 <div class="form-group"> 2000 <label for="maxValue" class="sr-only">@Translate(rangeFacetPrefix + "Maximum Value", "Maximum Value")</label> 2001 <input class="form-control form-control-sm" type="number" @@blur="onChange" id="maxValue" name="maxValue" v-model="maxValue" /> 2002 </div> 2003 </div> 2004 </div> 2005 </script> 2006 2007 2008 2009 <script type="text/x-template" id="add-compare-template"> 2010 <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")']"> 2011 <svg> 2012 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#balance-scale"></use> 2013 </svg> 2014 </button> 2015 </script> 2016 @using Dynamicweb.Frontend 2017 @{ 2018 string instantSearchPrefix = "InstantSearch "; 2019 } 2020 <script type="text/x-template" id="instant-search-template"> 2021 <form v-bind:class="baseClass" action="@NORRIQ.Common8.Razor.Navigation.GetUrlByNavigationTag("searchresult")" v-autoClose="closeFoldOut"> 2022 <div class="basic_instantsearch"> 2023 <label for="searchTerm" class="sr-only">@Translate(instantSearchPrefix + "Search", "Search")</label> 2024 <input type="search" 2025 placeholder="@Translate(instantSearchPrefix + "Search", "Search")" 2026 id="searchTerm" 2027 name="search" 2028 autocomplete="off" 2029 v-model="searchTerm" 2030 @*v-on:focus="openSearch"*@ 2031 @*v-on:blur="closeFoldOut()"*@ 2032 autofocus> 2033 <button type="submit"> 2034 <span class="sr-only">@Translate(instantSearchPrefix + "Search", "Search")</span> 2035 <svg> 2036 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/Files/dist/icons/icons.svg#search"></use> 2037 </svg> 2038 </button> 2039 <div class="fold-out" id="fold-popup" aria-controls="fold-popup" v-bind:class="{ active: foldActive && showResults, 'has-results': showResults }" v-auto-close> 2040 <template v-if="searchTerm == null"> 2041 <p class="search-string">@Translate(instantSearchPrefix + "Type something", "Type something")</p> 2042 </template> 2043 <template v-else-if="queryLoading"> 2044 <div class="is-loading"> 2045 <span class="spinner-lg-default"></span> 2046 </div> 2047 </template> 2048 <template v-else-if="!showResults"> 2049 <p class="search-string"> 2050 @Translate(instantSearchPrefix + "Empty search...", "Empty search...") 2051 </p> 2052 </template> 2053 <div class="fold-out-grid" v-else> 2054 <div class="fold-out-col is-content"> 2055 <ul v-if="groups?.length>0" class="fold-out-content"> 2056 <li> 2057 <strong>@Translate(instantSearchPrefix + "Categories", "Categories")</strong> 2058 </li> 2059 <li v-for="group in groups"> 2060 <a :href="group.url"> 2061 {{group.groupName}} 2062 </a> 2063 </li> 2064 </ul> 2065 <ul v-if="contents?.length>0" class="fold-out-content"> 2066 <li> 2067 <strong>@Translate(instantSearchPrefix + "Content", "Content")</strong> 2068 </li> 2069 <li v-for="content in contents"> 2070 <a :href="content.url"> 2071 {{content.pageTitle}} 2072 </a> 2073 </li> 2074 <li v-if="hasMoreContent" class="show-all"> 2075 <a :href="'@NORRIQ.Common8.Razor.Navigation.GetUrlByNavigationTag("searchresult")?search=' + searchTerm + '&show=content'">@Translate(instantSearchPrefix + "See all", "Se alle")</a> 2076 </li> 2077 </ul> 2078 </div> 2079 <div class="fold-out-col is-products" v-if="products?.length > 0"> 2080 <ul class="fold-out-products"> 2081 <li> 2082 <strong>@Translate(instantSearchPrefix + "Products", "Products")</strong> 2083 </li> 2084 <li v-for="product in products"> 2085 <figure> 2086 <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')" /> 2087 </figure> 2088 <div> 2089 <a :href="product.url"> 2090 {{product.name}} 2091 </a> 2092 <small>{{product.number}}</small> 2093 </div> 2094 </li> 2095 <li v-if="hasMoreProducts" class="show-all"> 2096 <a :href="'@NORRIQ.Common8.Razor.Navigation.GetUrlByNavigationTag("searchresult")?search=' + searchTerm + '&show=products'">@Translate(instantSearchPrefix + "See all", "Se alle")</a> 2097 </li> 2098 </ul> 2099 2100 </div> 2101 <div class="fold-out-col is-spareparts" v-if="spareParts?.length > 0"> 2102 <ul class="fold-out-products"> 2103 <li> 2104 <strong>@Translate(instantSearchPrefix + "Spareparts", "Spare parts")</strong> 2105 </li> 2106 <li v-for="product in spareParts"> 2107 <figure> 2108 <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')" /> 2109 </figure> 2110 <div> 2111 <a :href="product.url"> 2112 {{product.name}} 2113 </a> 2114 <small>{{product.number}}</small> 2115 </div> 2116 </li> 2117 <li v-if="hasMoreSpares" class="show-all"> 2118 <a :href="'@NORRIQ.Common8.Razor.Navigation.GetUrlByNavigationTag("searchresult")?search=' + searchTerm + '&show=spares'">@Translate(instantSearchPrefix + "See all", "Se alle")</a> 2119 </li> 2120 </ul> 2121 </div> 2122 </div> 2123 @*<div v-if="searchTerm != '' && showResults && !queryLoading" class="actions"> 2124 <a :href="'@NORRIQ.Common8.Razor.Navigation.GetUrlByNavigationTag("searchresult")?search=' + searchTerm">@Translate(instantSearchPrefix + "See all", "Se alle")</a> 2125 </div>*@ 2126 </div> 2127 </div> 2128 </form> 2129 </script> 2130 2131 2132 2133 <script src="@NORRIQ.Common8.Razor.TimestampSource.GetSourceWithTimestamp("/Files/dist/scripts/vendors~bundle.min.js")"></script> 2134 <script src="@NORRIQ.Common8.Razor.TimestampSource.GetSourceWithTimestamp("/Files/dist/scripts/bundle.min.js")"></script> 2135 @{ 2136 var currentUser = NORRIQ.Universal.Identity.Dw.UserViewModel.GetCurrentUser<Tefcold.Web.Api.Models.UserViewModelWithMediaBank>(); 2137 var jsonUser = Newtonsoft.Json.JsonConvert.SerializeObject(currentUser); 2138 } 2139 <script async> 2140 AppStart.VueProvider.init({ 2141 webApiUrl: '@System.Web.Configuration.WebConfigurationManager.AppSettings["WebApiProxyUrl"]', 2142 user: @jsonUser, 2143 currencyCode: '@currencyCode', 2144 locale: '@Pageview.Area.Culture', 2145 currencyLeft: false, 2146 currencySpacing: true, 2147 currencySymbol: '@currencyCode', 2148 currencyDecimalSeparator: ',', 2149 currencyGroupSeparator: '.', 2150 currencyDecimalDigits: 2, 2151 dateFormatShort: '@Pageview.Area.Dateformat', 2152 shopId: '@Pageview.Area.EcomShopId', 2153 languages: `@languagesJson`, 2154 langId: '@Pageview.Area.EcomLanguageId', 2155 areaId: '@Pageview.Area.ID' 2156 }); 2157 </script> 2158 2159 <script type='text/javascript' src='//s3.amazonaws.com/downloads.mailchimp.com/js/mc-validate.js'></script> 2160 <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> 2161 2162 <script append="replace"></script> 2163 @if (!string.IsNullOrEmpty(Model.PropertyItem.GetString("FormScript"))) 2164 { 2165 2166 @Model.PropertyItem.GetString("FormScript") 2167 2168 } 2169 </body> 2170 </html>