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