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