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