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