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_14280606998642ebbbf3da32c3123894.Execute() in E:\Solutions\Live\Tefcold.Web\Files\Templates\Designs\Tefcold\_parsed\Basic_Page.parsed.cshtml:line 108
   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 Dynamicweb.Content 2 @using Dynamicweb.Frontend; 3 @using Dynamicweb.Security.UserManagement 4 @using NLWI.Core.Factory 5 @using NORRIQ.SalesPersonLogin.Services 6 @using Dynamicweb.Ecommerce.International 7 @using Tefcold.Web.CustomCode.Extensions 8 @using Tefcold.Web.CustomCode.Items.Properties 9 @using Tefcold.Web.CustomCode.LanguageSwitch 10 @using Tefcold.Web.CustomCode.Razor 11 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 12 @{ 13 //Heine: Understående kan bruges såfremt der skal tjekkes på om man er i impersonation mode: 14 var isImpersonating = ImpersonationService.IsCurrentlyImpersonating(); 15 var locationName = Pageview.User?.Name; 16 var websiteSettings = Pageview.Area.Item.ToCodeFirstItem<Websites>(); 17 LanguageService languageService = new LanguageService(); 18 var languagesJson = Newtonsoft.Json.JsonConvert.SerializeObject(languageService.GetLanguages()); 19 } 20 21 <!DOCTYPE html> 22 <html lang="@Pageview.Area.Culture"> 23 <head> 24 <meta charset='utf-8' /> 25 <meta name="description" content="@Model.Description" /> 26 <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=5, user-scalable=yes, shrink-to-fit=no" /> 27 <meta http-equiv="x-ua-compatible" content="ie=edge"> 28 @if (Model.Area.Item.GetBoolean("NoIndex")) 29 { 30 <!-- TODO: remove on launch--> 31 <meta name="robots" content="noindex, nofollow" /> 32 } 33 34 @if (!string.IsNullOrWhiteSpace(websiteSettings.HeaderScript)) 35 { 36 @websiteSettings.HeaderScript 37 } 38 39 @if (!string.IsNullOrWhiteSpace(websiteSettings.GoogleTagManagerId)) 40 { 41 <script> 42 (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': 43 new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], 44 j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 45 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); 46 })(window,document,'script','dataLayer','@websiteSettings.GoogleTagManagerId'); 47 </script> 48 } 49 50 <title>@Model.Title</title> 51 @Model.MetaTags 52 @if (Model.Area.Item.GetFile("Icon") != null) 53 { 54 <link href="@Model.Area.Item.GetFile("Icon").Path" rel="icon" type="image/png"> 55 } 56 <link async href="@NORRIQ.Common8.Razor.TimestampSource.GetSourceWithTimestamp("/Files/dist/css/Tefcold-min.css")" rel="stylesheet" /> 57 </head> 58 <body> 59 @if (!string.IsNullOrWhiteSpace(websiteSettings.GoogleTagManagerId)) 60 { 61 <!-- Google Tag Manager (noscript) --> 62 <noscript> 63 <iframe src="https://www.googletagmanager.com/ns.html?id=@websiteSettings.GoogleTagManagerId" 64 height="0" width="0" style="display: none; visibility: hidden"></iframe> 65 </noscript> 66 <!-- End Google Tag Manager (noscript) --> 67 } 68 <div id="app"> 69 @{ 70 string basicNavbarPrefix = "Header "; 71 var logo = Model.Area.Item.GetFile("Logo"); 72 var currencyCode = Pageview.User?.Currency ?? Pageview.Area.EcomCurrencyId; 73 } 74 <header class="basic_navbar" id="header"> 75 @if (isImpersonating) 76 { 77 <div class="impersonation-bar"> 78 <div class="basic_navbar-container"> 79 <p> 80 @Translate(basicNavbarPrefix + "debitor", "Debitor"): <b>@locationName</b> | <a href="@NORRIQ.Common8.Razor.Navigation.GetUrlByNavigationTag("impersonation-choose-customer")?action=changeuser">@Translate("Change customer")</a> 81 </p> 82 </div> 83 </div> 84 } 85 <div class="basic_navbar-main"> 86 <div class="basic_navbar-container"> 87 88 <button type="button" 89 class="basic_navbar-burger" 90 aria-label="@Translate(basicNavbarPrefix + "Open main navigation", "Open main navigation")" 91 v-b-toggle.basic_navigation> 92 <span></span> 93 <span></span> 94 <span></span> 95 </button> 96 <a href="/" class="basic_navbar-logo" title="@Translate(basicNavbarPrefix + "Go to frontpage", "Go to frontpage")"> 97 @if (logo != null) 98 { 99 <img class="img-fluid" src="@logo.Path" alt="@Translate(basicNavbarPrefix + "Website Logo Alttext", "Website Logo Alttext")" /> 100 } 101 else 102 { 103 <i>@Translate(basicNavbarPrefix + "No logo found", "No logo found, please configure it in the Dynamicweb Administration")</i> 104 } 105 </a> 106 <collapse-hack inline-template> 107 <b-collapse class="basic_navbar-navigation" id="basic_navigation" tag="nav"> 108 @RenderNavigation(new { Template = "basic_navbar.xslt", Expandmode = "all", StartLevel = 1, EndLevel = 4 }) 109 <ul class="basic_navbar-subnav"> 110 <li> 111 <button type="button" 112 v-b-toggle.languages 113 aria-label="@Translate(basicNavbarPrefix + "Choose Language", "Choose Language")"> 114 <img src="@Pageview.Area.Flag32X32" alt="@Pageview.Area.CultureInfo.EnglishName" /> 115 <span class="sr-only">@Pageview.Area.CultureInfo.EnglishName</span> 116 </button> 117 </li> 118 <li> 119 <button v-b-toggle.contacts 120 type="button" 121 aria-label="@Translate(basicNavbarPrefix + "Show contacts", "Show contacts")"> 122 <svg> 123 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#phone-alt"></use> 124 </svg> 125 <span class="sr-only">@Translate(basicNavbarPrefix + "Contacts", "Contacts")</span> 126 </button> 127 </li> 128 <li> 129 <button v-b-toggle.customer-center 130 type="button" 131 aria-label="@Translate(basicNavbarPrefix + "Show Webshop Login", "Show Webshop Login")"> 132 @if (Pageview.User == null) 133 { 134 <svg> 135 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#user"></use> 136 </svg> 137 } 138 else 139 { 140 <svg style="width: 30px; height: 30px;"> 141 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#user-check"></use> 142 </svg> 143 } 144 <span class="sr-only">@Translate(basicNavbarPrefix + "Login", "Login")</span> 145 </button> 146 </li> 147 @if (Pageview.User != null) 148 { 149 <li> 150 <a href="@NORRIQ.Common8.Razor.Navigation.GetUrlByNavigationTag("quickorder")" title="@Translate(basicNavbarPrefix + "Quickorder", "Quickorder")"> 151 <svg width="28px" height="28px"> 152 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#quickorder"></use> 153 </svg> 154 <span class="sr-only">@Translate(basicNavbarPrefix + "Quickorder", "Quickorder")</span> 155 </a> 156 </li> 157 } 158 @if (Pageview.User != null && Pageview.User.AllowMediaBank()) 159 { 160 <media-bank inline-template> 161 <li> 162 163 <form id="mediabankform" action="https://imagebank.tefcold.com/Home/LoginUser" method="post"> 164 <input id="mediabankformname" type="hidden" name="username" /> 165 <input id="mediabankformpassword" type="hidden" name="password" /> 166 <input type="hidden" value="false" name="persistent" /> 167 </form> 168 <a v-on:click="connect($event)" href="#"> 169 <svg width="28px" height="28px" fill="currentColor"> 170 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#photo-video"></use> 171 </svg> 172 <span class="sr-only">@Translate(basicNavbarPrefix + "Mediabank", "Mediabank")</span> 173 </a> 174 </li> 175 </media-bank> 176 } 177 <li> 178 <button type="button" 179 class="btn-close" 180 @@click="collapseAll" 181 aria-label="@Translate(basicNavbarPrefix + "Close Navigation", "Close Navigation")"> 182 <span></span> 183 <span></span> 184 </button> 185 </li> 186 </ul> 187 </b-collapse> 188 </collapse-hack> 189 <form class="basic_navbar-search" action="/Default.aspx"> 190 <search-shortcut inline-template> 191 <div style="display: none"></div> 192 </search-shortcut> 193 <label for="productsearch">Search</label> 194 <input name="ID" type="hidden" value="@NORRIQ.Common8.Razor.Navigation.GetPageIdByNavigationTag("searchresult")"> 195 <input name="PageSize" type="hidden" value="99" /> 196 <input type="search" placeholder="@Translate(basicNavbarPrefix + "Search", "Search")" id="productsearch" name="productsearch"> 197 <button type="submit"> 198 <span class="sr-only">@Translate(basicNavbarPrefix + "Search", "Search")</span> 199 <svg> 200 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#search"></use> 201 </svg> 202 </button> 203 </form> 204 <ul class="basic_navbar-functions"> 205 <li class="basic_navbar-languages relative"> 206 <button type="button" v-b-toggle.languages aria-label="@Translate(basicNavbarPrefix + "Choose Language", "Choose Language")"> 207 <span class="sr-only">@Pageview.Area.CultureInfo.EnglishName</span> 208 <img src="@Pageview.Area.Flag32X32" alt="@Pageview.Area.Culture - Flag" /> 209 </button> 210 <b-collapse id="languages" class="basic_navbar-dropdown" accordion="header" v-auto-close> 211 <div class="basic_navbar-body"> 212 <ul> 213 @foreach (var lang in Model.Area.Languages.Where(a => !a.IsCurrent)) 214 { 215 string langUrl; 216 string countryCode = lang.Culture.Split('-').Last(); 217 218 if (Dynamicweb.Context.Current.Request["GroupID"] != null) 219 { 220 langUrl = this.GetGroupUrl(Dynamicweb.Context.Current.Request["GroupID"], countryCode); 221 } 222 223 else if (Dynamicweb.Context.Current.Request["ProductID"] != null) 224 { 225 try 226 { 227 var uriBuilder = new UriBuilder(Pageview.SearchFriendlyUrl); 228 uriBuilder.Host = !lang.PrimaryDomain.Contains("http") ? lang.PrimaryDomain : "https://" + lang.PrimaryDomain; 229 langUrl = uriBuilder.Uri.AbsoluteUri; 230 } 231 catch (Exception e) 232 { 233 langUrl = Pageview.SearchFriendlyUrl; 234 } 235 236 } 237 238 else //if (!string.IsNullOrEmpty(lang.PrimaryDomain)) 239 { 240 try 241 { 242 243 var lss = ObjectFactory.GetInstance<LanguageSwitchService>(); 244 langUrl = lss.GetLanguagePage(lang.Culture, this.Pageview.ID); 245 } 246 catch (Exception) 247 { 248 langUrl = Pageview.SearchFriendlyUrl; 249 } 250 } 251 252 <li> 253 <a href="@langUrl"> 254 <img src="/Admin/Images/Flags/flag_@(countryCode).png" alt="@lang.Culture - Flag" loading="lazy" /> 255 <span>@Translate("lang_" + lang.Culture.Split('-').First(), lang.Culture.Split('-').First())</span> 256 </a> 257 </li> 258 } 259 <li> 260 <hr class="m-0" /> 261 <a href="/Default.aspx?ID=@GetPageIdByNavigationTag("CzechRedirect")"> 262 <img src="/Admin/Images/Flags/flag_cz.png" alt="cs-CZ - Flag" loading="lazy" /> 263 <span>@Translate("lang_cs", "cs")</span> 264 </a> 265 </li> 266 <li> 267 <a href="/Default.aspx?ID=@GetPageIdByNavigationTag("SlovakRedirect")"> 268 <img src="/Admin/Images/Flags/flag_sk.png" alt="sk-SK - Flag" loading="lazy" /> 269 <span>@Translate("lang_sk", "sk")</span> 270 </a> 271 </li> 272 273 </ul> 274 </div> 275 </b-collapse> 276 </li> 277 <li class="basic_navbar-contacts @(Pageview.User != null ? "static" : "relative")"> 278 <button v-b-toggle.contacts 279 type="button" 280 aria-label="@Translate(basicNavbarPrefix + "Show contacts", "Show contacts")"> 281 <svg> 282 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#phone-alt"></use> 283 </svg> 284 <span class="sr-only">@Translate(basicNavbarPrefix + "Contacts", "Contacts")</span> 285 </button> 286 @{ 287 var impersonationGroupId = websiteSettings.ImpersonationGroup.FirstOrDefault(); 288 IEnumerable<User> users = null; 289 IEnumerable<User> salesPersons = new List<User>(); 290 if (Pageview.User != null) 291 { 292 var salesPersonCode = Pageview.User.CustomFieldValues.FirstOrDefault(field => field.CustomField.Name == "Sales Person Code"); 293 var salesPersonsInitials = salesPersonCode?.Value?.ToString().Split(',') ?? new string[] { }; 294 salesPersonsInitials = salesPersonsInitials.Select(x => x.ToLower()).ToArray(); 295 296 if (!string.IsNullOrEmpty(impersonationGroupId)) 297 { 298 users = Group.GetGroupByID(int.Parse(impersonationGroupId)).Users; 299 } 300 if (users == null || Pageview.User == null) 301 { 302 salesPersons = new List<User>(); 303 } 304 else 305 { 306 salesPersons = users.Where(user => salesPersonsInitials.Contains(user.Email.ToLower().Split('@').FirstOrDefault() ?? "")); 307 } 308 } 309 310 } 311 <b-collapse id="contacts" class="@(Pageview.User != null ? "basic_navbar-megamenu" : "basic_navbar-dropdown")" v-auto-close accordion="header"> 312 <div class="basic_navbar-body"> 313 @if (Pageview.User != null) 314 { 315 if (salesPersons.Any()) 316 { 317 <p class="tefcold_salesperson-byline h1">@Translate(basicNavbarPrefix + "Your Sales Team", "Your Sales Team")</p> 318 } 319 foreach (var salesPerson in salesPersons) 320 { 321 <div class="tefcold_salesperson" itemscope itemtype="http://schema.org/Person"> 322 <figure> 323 <img src="@salesPerson.Image" class="img-fluid" alt="@salesPerson.Name" itemprop="image" loading="lazy" /> 324 </figure> 325 <p itemprop="name">@salesPerson.Name</p> 326 <p itemprop="jobTitle">@salesPerson.JobTitle</p> 327 <p itemprop="telephone"> 328 <svg> 329 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#phone-alt"></use> 330 </svg> 331 <span>@salesPerson.PhonePrivate</span> 332 </p> 333 <p itemprop="telephone"> 334 <svg> 335 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#mobile-alt"></use> 336 </svg> 337 <span>@salesPerson.PhoneMobile</span> 338 </p> 339 <a href="@("mailto:" + @salesPerson.Email)" itemprop="email"> 340 <svg> 341 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#envelope"></use> 342 </svg> 343 <span>@salesPerson.Email</span> 344 </a> 345 </div> 346 } 347 } 348 <ul> 349 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("PhoneLabel")) 350 && !string.IsNullOrEmpty(Model.Area.Item.GetString("Phonenumber"))) 351 { 352 <li class="head"> 353 <strong> 354 @Model.Area.Item.GetString("PhoneLabel") 355 </strong> 356 <strong> 357 @Model.Area.Item.GetString("Phonenumber") 358 </strong> 359 </li> 360 } 361 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("ContactPage")) 362 && !string.IsNullOrEmpty(Model.Area.Item.GetString("ContactLabel"))) 363 { 364 <li> 365 <a href="@Model.Area.Item.GetString("ContactPage")"> 366 @Model.Area.Item.GetString("ContactLabel") 367 </a> 368 </li> 369 } 370 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("SalesPage")) 371 && !string.IsNullOrEmpty(Model.Area.Item.GetString("SalesLabel"))) 372 { 373 <li> 374 <a href="@Model.Area.Item.GetString("SalesPage")"> 375 @Model.Area.Item.GetString("SalesLabel") 376 </a> 377 </li> 378 } 379 </ul> 380 381 </div> 382 </b-collapse> 383 </li> 384 <li class="basic_navbar-user"> 385 <button v-b-toggle.customer-center type="button" aria-label="@Translate(basicNavbarPrefix + "Show Webshop Login", "Show Webshop Login")"> 386 @if (Pageview.User == null) 387 { 388 <svg> 389 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#user"></use> 390 </svg> 391 } 392 else 393 { 394 <svg style="width: 30px; height: 30px;"> 395 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#user-check"></use> 396 </svg> 397 } 398 <span class="sr-only">@Translate(basicNavbarPrefix + "Login", "Login")</span> 399 </button> 400 401 402 <b-collapse id="customer-center" class="basic_navbar-dropdown" accordion="header" v-auto-close> 403 <div class="basic_navbar-body"> 404 @if (Pageview.User == null) 405 { 406 <head-login-form inline-template> 407 <form name="ExtUserForm" id="loginForm" method="post" class="form" role="form" v-on:submit="submitLogin"> 408 <p> 409 <strong> 410 @Translate(basicNavbarPrefix + "Webshop Login", "Webshop Login") 411 </strong> 412 </p> 413 <input type="hidden" name="ID" id="ID" value="" /> 414 <div class="form-group"> 415 <label for="Username">@Translate(basicNavbarPrefix + "Username", "Username")</label> 416 <input id="Username" v-model="username" name="Username" type="text" value="" class="form-control" autocomplete="off"> 417 </div> 418 <div class="form-group"> 419 <label for="Password">@Translate(basicNavbarPrefix + "Password", "Password")</label> 420 <input id="Password" v-model="password" name="Password" type="password" value="" class="form-control" autocomplete="off"> 421 </div> 422 <div v-if="loginFailed"> 423 <p class="alert alert-warning"> 424 @Translate("Login failed", "Invalid credentials") 425 </p> 426 </div> 427 <div class="basic_login-buttons"> 428 <button type="submit" role="button" class="btn btn-primary btn-block" v-bind:class='{"loading": loading}' v-on:click="loading=true" id="loginBtn"> 429 @Translate(basicNavbarPrefix + "Login", "Login") 430 </button> 431 </div> 432 </form> 433 </head-login-form> 434 <ul> 435 <li> 436 <a href="/Default.aspx?ID=@NORRIQ.Common8.Razor.Navigation.GetPageIdByNavigationTag("forgotpassword")&amp;LoginAction=Recovery"> 437 @Translate(basicNavbarPrefix + "Forgot password", "Forgot password") 438 </a> 439 </li> 440 <li> 441 <a href="@NORRIQ.Common8.Razor.Navigation.GetUrlByNavigationTag("contact")"> 442 @Translate(basicNavbarPrefix + "Create Webshop Account", "Create Webshop Account") 443 </a> 444 </li> 445 </ul> 446 } 447 else 448 { 449 <div class="active-user"> 450 <p><strong>@Pageview.User.Name</strong></p> 451 <p> 452 <a v-clear-cache:click.user href='/admin/public/extranetlogoff.aspx?ID=@(NORRIQ.Common8.Razor.Navigation.GetPageIdByNavigationTag("home"))'> 453 @Translate(basicNavbarPrefix + "Sign out", "Sign out") 454 </a> 455 </p> 456 </div> 457 @RenderNavigation(new { Template = "basic_Footer.xslt", Expandmode = "all", StartLevel = 1, EndLevel = 4, NavigationTag = "customer-portal" }) 458 } 459 </div> 460 </b-collapse> 461 </li> 462 @if (Pageview.User != null && Pageview.User.AllowMediaBank()) 463 { 464 <media-bank inline-template> 465 <li class="basic_navbar-media"> 466 <form id="mediabankform" action="https://imagebank.tefcold.com/Home/LoginUser" method="post"> 467 <input id="mediabankformname" type="hidden" name="username" /> 468 <input id="mediabankformpassword" type="hidden" name="password" /> 469 <input type="hidden" value="false" name="persistent" /> 470 </form> 471 <a v-on:click="connect($event)" href="#" class="media"> 472 <svg width="28px" height="28px"> 473 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#photo-video"></use> 474 </svg> 475 <span class="sr-only">@Translate(basicNavbarPrefix + "Mediabank", "Mediabank")</span> 476 </a> 477 </li> 478 </media-bank> 479 480 } 481 @if (Pageview.User != null) 482 { 483 <li class="basic_navbar-quick"> 484 <a href="@NORRIQ.Common8.Razor.Navigation.GetUrlByNavigationTag("quickorder")" title="@Translate(basicNavbarPrefix + "Quickorder", "Quickorder")"> 485 <svg width="28px" height="28px"> 486 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#quickorder"></use> 487 </svg> 488 <span class="sr-only">@Translate(basicNavbarPrefix + "Quickorder", "Quickorder")</span> 489 </a> 490 </li> 491 } 492 @if (Pageview.Area.Culture == "da-DK" || Pageview.User != null) 493 { 494 <cart-icon cartlink="@NORRIQ.Common8.Razor.Navigation.GetUrlByNavigationTag("checkout")"></cart-icon> 495 } 496 </ul> 497 </div> 498 </div> 499 </header> 500 @using Dynamicweb.Frontend; 501 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 502 503 @Title("Page") 504 @Description("Default page template") 505 @{ 506 string basicPagePrefix = "Page "; 507 } 508 @if (Pageview.IsCurrentUserAllowed) 509 { 510 var pageLayout = !string.IsNullOrEmpty(Model.Item.GetValue<ListViewModel>("Layout").SelectedValue) ? Model.Item.GetValue<ListViewModel>("Layout").SelectedValue : "content-page-sidebar"; 511 var pageClass = pageLayout == "page-wide" ? "basic_page-wide" : "basic_page"; 512 if (!Model.Item.GetBoolean("HideBreadcrumb")) 513 { 514 if (Model.Area.Item.GetFile("TopImage") != null) 515 { 516 <figure> 517 <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" /> 518 </figure> 519 } 520 @RenderNavigation(new { Template = "basic_Breadcrumb.xslt", Expandmode = "all", StartLevel = 1, EndLevel = 5 }) 521 } 522 <main class="@pageClass"> 523 @if (pageLayout == "content-page-sidebar" || pageLayout == "module-page-sidebar") 524 { 525 <aside class="basic_page-sidebar"> 526 @RenderNavigation(new { Template = "basic_Page.xslt", StartLevel = 1, EndLevel = 3 }) 527 </aside> 528 <div class="basic_page-content"> 529 @if (pageLayout == "content-page-sidebar" && !string.IsNullOrEmpty(Model.Item.GetString("Title").ToString()) || !string.IsNullOrEmpty(Model.Item.GetString("Text").ToString())) 530 { 531 <section class="basic_paragraph"> 532 @if (!string.IsNullOrEmpty(Model.Item.GetString("Title").ToString())) 533 { 534 <header> 535 <h1> 536 @Model.Item.GetString("Title") 537 </h1> 538 </header> 539 } 540 @if (Model.Item.GetFile("Image") != null) 541 { 542 <figure> 543 <img src="@Model.Item.GetFile("Image").Path" alt="@Model.Item.GetString("Title")" class="img-fluid" /> 544 </figure> 545 } 546 @if (!string.IsNullOrEmpty(Model.Item.GetString("Text").ToString())) 547 { 548 @Model.Item.GetString("Text") 549 } 550 </section> 551 } 552 @RenderPlaceholder() 553 </div> 554 } 555 else 556 { 557 @RenderPlaceholder() 558 } 559 </main> 560 } 561 else 562 { 563 <main class="basic_page"> 564 @RenderPlaceholder() 565 </main> 566 } 567 @helper RenderPlaceholder() 568 { 569 @Model.Placeholder("Content", "Content", "unwrap:true;default:true") 570 if (!String.IsNullOrEmpty(Model.Placeholder("Boxed"))) 571 { 572 <div class="grouped"> 573 @Model.Placeholder("Boxed", "Grouped Content", "unwrap:true") 574 </div> 575 } 576 } 577 578 @{ 579 string footerPrefix = "Footer "; 580 } 581 <footer class="basic_footer"> 582 <div class="basic_footer-wrap basic_footer-main"> 583 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("FooterOneTitle")) && !string.IsNullOrEmpty(Model.Area.Item.GetString("FooterOneText"))) 584 { 585 <div class="basic_footer-box"> 586 <div class="basic_footer-head" role="button" v-b-toggle.footer-one> 587 <h3>@Model.Area.Item.GetString("FooterOneTitle")</h3> 588 </div> 589 <b-collapse id="footer-one" class="basic_footer-collapse"> 590 <div class="basic_footer-body"> 591 @Model.Area.Item.GetString("FooterOneText") 592 </div> 593 </b-collapse> 594 </div> 595 } 596 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("FooterTwoTitle")) 597 && !string.IsNullOrEmpty(Model.Area.Item.GetString("FooterTwoText")) 598 || !string.IsNullOrEmpty(Model.Area.Item.GetString("FooterTwoTag"))) 599 { 600 <div class="basic_footer-box"> 601 <div class="basic_footer-head" role="button" v-b-toggle.footer-two> 602 <h3>@Model.Area.Item.GetString("FooterTwoTitle")</h3> 603 </div> 604 <b-collapse id="footer-two" class="basic_footer-collapse"> 605 <div class="basic_footer-body"> 606 @Model.Area.Item.GetString("FooterTwoText") 607 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("FooterTwoTag"))) 608 { 609 @RenderNavigation(new { Template = "basic_Footer.xslt", Expandmode = "all", StartLevel = 1, EndLevel = 4, NavigationTag = @Model.Area.Item.GetString("FooterTwoTag").ToString() }) 610 } 611 </div> 612 </b-collapse> 613 </div> 614 } 615 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("FooterThreeTitle")) 616 && !string.IsNullOrEmpty(Model.Area.Item.GetString("FooterThreeText")) 617 || !string.IsNullOrEmpty(Model.Area.Item.GetString("FooterThreeTag"))) 618 { 619 <div class="basic_footer-box"> 620 <div class="basic_footer-head" role="button" v-b-toggle.footer-three> 621 <h3>@Model.Area.Item.GetString("FooterThreeTitle")</h3> 622 </div> 623 <b-collapse id="footer-three" class="basic_footer-collapse"> 624 <div class="basic_footer-body"> 625 @Model.Area.Item.GetString("FooterThreeText") 626 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("FooterThreeTag"))) 627 { 628 @RenderNavigation(new { Template = "basic_Footer.xslt", Expandmode = "all", StartLevel = 1, EndLevel = 4, NavigationTag = @Model.Area.Item.GetString("FooterThreeTag").ToString() }) 629 } 630 </div> 631 </b-collapse> 632 </div> 633 } 634 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("FooterFourTitle")) && !string.IsNullOrEmpty(Model.Area.Item.GetString("FooterFourText"))) 635 { 636 <div class="basic_footer-box"> 637 <div class="basic_footer-head" role="button" v-b-toggle.footer-four> 638 <h3>@Model.Area.Item.GetString("FooterFourTitle")</h3> 639 </div> 640 <b-collapse id="footer-four" class="basic_footer-collapse"> 641 <div class="basic_footer-body"> 642 @Model.Area.Item.GetString("FooterFourText") 643 </div> 644 </b-collapse> 645 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("FacebookUrl")) 646 || !string.IsNullOrEmpty(Model.Area.Item.GetString("LinkedInUrl")) 647 || !string.IsNullOrEmpty(Model.Area.Item.GetString("YoutubeUrl"))) 648 { 649 <div class="some"> 650 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("FacebookUrl"))) 651 { 652 <a href="@Model.Area.Item.GetString("FacebookUrl")" target="_blank" aria-label="Facebook" rel="noreferrer"> 653 <svg> 654 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#facebook-square"></use> 655 </svg> 656 </a> 657 } 658 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("LinkedInUrl"))) 659 { 660 <a href="@Model.Area.Item.GetString("LinkedInUrl")" target="_blank" aria-label="LinkedIn" rel="noreferrer"> 661 <svg> 662 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#linkedin"></use> 663 </svg> 664 </a> 665 } 666 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("YoutubeUrl"))) 667 { 668 <a href="@Model.Area.Item.GetString("YoutubeUrl")" target="_blank" aria-label="Youtube" rel="noreferrer"> 669 <svg> 670 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#youtube-square"></use> 671 </svg> 672 </a> 673 } 674 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("SmileyUrl"))) 675 { 676 <a href="@Model.Area.Item.GetString("SmileyUrl")" target="_blank" aria-label="@Translate(footerPrefix + "smiley", "Elite Smiley")" rel="noreferrer"> 677 <svg> 678 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#elite-smiley-nocolor"></use> 679 </svg> 680 </a> 681 } 682 </div> 683 } 684 </div> 685 } 686 </div> 687 @if (Model.Area.Item.GetFile("GroupLogo") != null) 688 { 689 <div class="basic_footer-group"> 690 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("GroupLogo"))) 691 { 692 <a href="@Model.Area.Item.GetString("GroupLink")" target="_blank" title="@Translate(footerPrefix + "tefcold group logo alt", "Part of Tefcold Group")"> 693 <img src="@Model.Area.Item.GetFile("GroupLogo").Path" class="img-fluid" alt="@Translate(footerPrefix + "tefcold group logo alt", "Part of Tefcold Group")" /> 694 </a> 695 } 696 else 697 { 698 <img src="@Model.Area.Item.GetFile("GroupLogo").Path" class="img-fluid" alt="@Translate(footerPrefix + "tefcold group logo alt", "Part of Tefcold Group")" /> 699 } 700 </div> 701 } 702 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("FooterCopyright"))) 703 { 704 705 <div class="basic_footer-sub"> 706 <div class="basic_footer-wrap"> 707 708 <p> 709 &copy; @DateTime.Now.Year @Model.Area.Item.GetString("FooterCopyright") 710 </p> 711 @RenderNavigation(new { Template = "basic_Footer.xslt", Expandmode = "all", StartLevel = 1, EndLevel = 4, NavigationTag = "footer" }) 712 713 @if (Model.Area.Item.GetValue<ListViewModel>("Cards").SelectedValues.Any()) 714 { 715 <div class="text-center cards"> 716 @foreach (var cards in Model.Area.Item.GetValue<ListViewModel>("Cards").SelectedValues) 717 { 718 <img src="/Files/Images/cards/@cards" alt="@cards.Split('.').First()" loading="lazy" /> 719 } 720 </div> 721 } 722 723 </div> 724 </div> 725 } 726 </footer> 727 <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'> 728 <div></div> 729 </basic-alert> 730 </div> 731 732 <script type="text/x-template" id="cart-icon-template"> 733 @{ 734 string cartIconPrefix = "Minicart "; 735 } 736 <li> 737 <a :href="cartlink"> 738 <svg> 739 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#shopping-cart"></use> 740 </svg> 741 <span class="label">@Translate(cartIconPrefix + "Checkout", "Checkout")</span> 742 <strong v-if="!cartEmpty" class="cart-quantity">{{quantity}}</strong> 743 </a> 744 </li> 745 </script> 746 747 748 749 <script type="text/x-template" id="basic-facet-filter-template"> 750 @{ 751 string basicFacetPrefix = "Filter "; 752 } 753 <aside> 754 <template v-if="HasActiveFilter()"> 755 756 <p id="selected-filter-label" class="sr-only"> 757 @Translate(basicFacetPrefix + "Active", "Active") 758 </p> 759 <div class="basic_filter-active" aria-labelledby="selected-filter-label"> 760 <template v-for="facetFilter in facetFilters"> 761 <span v-for="option in SelectedOptions(facetFilter)" class="custom-control custom-filter"> 762 <input type="checkbox" 763 :id="'Selected-' + facetFilter.name + '-' + option.name" 764 :name="facetFilter.name" 765 :value="option.value" 766 :v-model="option.selected" 767 :checked="option.selected" 768 v-on:click="ToggleFilter(facetFilter.name,option)" 769 class="custom-control-input" /> 770 <label :for="'Selected-' + facetFilter.name + '-' + option.name" class="custom-control-label" :data-name="facetFilter.name"> 771 <span> 772 {{option.label}} 773 </span> 774 <svg> 775 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#times"></use> 776 </svg> 777 </label> 778 </span> 779 </template> 780 </div> 781 </template> 782 <b-collapse class="basic_filter" id="sidebar-filter"> 783 <template v-if="!error && facetFilters"> 784 <button type="button" class="btn-close" v-b-toggle.sidebar-filter.sidebar-overlay aria-label="@Translate(basicFacetPrefix + "Close Filter", "Close Filter")"> 785 <span></span> 786 <span></span> 787 </button> 788 <div class="basic_filter-groups"> 789 <div class="basic_filter-group" v-for="(facetFilter, index) in facetFilters"> 790 <p :id="'filter-group-' + facetFilter.name.toLowerCase().trim()" v-b-toggle="'filter-collapse-' + facetFilter.name.toLowerCase().trim()"> 791 <template v-if="facetFilter.name === 'ModelType'"> 792 @Translate(basicFacetPrefix + "ModelType", "Model / Type") 793 </template> 794 <template v-else-if="facetFilter.name === 'DoorType'"> 795 @Translate(basicFacetPrefix + "DoorType", " Door type") 796 </template> 797 <template v-else-if="facetFilter.name === 'ExternalHeight'"> 798 @Translate(basicFacetPrefix + "ExternalHeight", "External Height") (mm) 799 </template> 800 <template v-else-if="facetFilter.name === 'NetVolume'"> 801 @Translate(basicFacetPrefix + "NetVolume", "Net Volume") (l) 802 </template> 803 <template v-else-if="facetFilter.name === 'DoorNumber'"> 804 @Translate(basicFacetPrefix + "DoorNumber", " Number of doors") 805 </template> 806 <template v-else-if="facetFilter.name === 'ExteriorFinish'"> 807 @Translate(basicFacetPrefix + "ExteriorFinish", "Exterior Finish") 808 </template> 809 <template v-else-if="facetFilter.name === 'ExternalWidth'"> 810 @Translate(basicFacetPrefix + "ExternalWidth", "External Width") (mm) 811 </template> 812 <template v-else-if="facetFilter.name === 'GrossVolume'"> 813 @Translate(basicFacetPrefix + "GrossVolume", "Gross Volume") (l) 814 </template> 815 <template v-else-if="facetFilter.name === 'Bottles330'"> 816 @Translate(basicFacetPrefix + "Bottles330", "Capacity 330ml bottles") 817 </template> 818 <template v-else-if="facetFilter.name === 'Bottles500'"> 819 @Translate(basicFacetPrefix + "Bottles500", "Capacity 500ml bottles") 820 </template> 821 <template v-else-if="facetFilter.name === 'Cans330'"> 822 @Translate(basicFacetPrefix + "Cans330", "Capacity 300ml cans") 823 </template> 824 <template v-else-if="facetFilter.name === 'Cans500'"> 825 @Translate(basicFacetPrefix + "Cans500", "Capacity 500ml cans") 826 </template> 827 <template v-else-if="facetFilter.name === 'TemperatureRange'"> 828 @Translate(basicFacetPrefix + "TemperatureRange", "Temperature Range") 829 </template> 830 <template v-else-if="facetFilter.name === 'TemperatureRangeZone2'"> 831 @Translate(basicFacetPrefix + "TemperatureRangeZone2", "Tempature Range 2") 832 </template> 833 <template v-else-if="facetFilter.name === 'ShelfNumber'"> 834 @Translate(basicFacetPrefix + "ShelfNumber", "Number of shelfs") 835 </template> 836 <template v-else-if="facetFilter.name === 'LidType'"> 837 @Translate(basicFacetPrefix + "LidType", "Lid Type") 838 </template> 839 <template v-else-if="facetFilter.name === 'InteriorFinish'"> 840 @Translate(basicFacetPrefix + "InteriorFinish", "Interior Finish") 841 </template> 842 <template v-else-if="facetFilter.name === 'WineBottles750'"> 843 @Translate(basicFacetPrefix + "WineBottles750", "Capacity 750ml winebottles") 844 </template> 845 <template v-else> 846 {{facetFilter.name}} 847 </template> 848 <svg> 849 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/Files/dist/icons/icons.svg#chevron-up"></use> 850 </svg> 851 </p> 852 <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()"> 853 <template v-if="facetFilter.optionActiveCount > 5"> 854 <span v-for="option in facetFilter.options.slice(0, 5)" class="custom-control custom-checkbox facet-option"> 855 <input type="checkbox" class="custom-control-input" 856 :id="'UnSelected-' + facetFilter.name + '-' + option.name" 857 :name="facetFilter.name" 858 :value="option.value" 859 :v-model="option.selected" 860 :checked="option.selected" 861 v-on:click="ToggleFilter(facetFilter.name,option)" /> 862 <label :for="'UnSelected-' + facetFilter.name + '-' + option.name" class="custom-control-label"> 863 {{option.label}} <span class="count">({{option.count}})</span> 864 </label> 865 </span> 866 <b-collapse class="basic_filter-expand" :id="'filter-expand-' + facetFilter.name.toLowerCase().trim()" :visible="ShowMoreIfSelected(facetFilter.options, index)"> 867 <span v-for="option in facetFilter.options.slice(5)" class="custom-control custom-checkbox facet-option"> 868 <input type="checkbox" class="custom-control-input" 869 :id="'UnSelected-' + facetFilter.name + '-' + option.name" 870 :name="facetFilter.name" 871 :value="option.value" 872 :v-model="option.selected" 873 :checked="option.selected" 874 v-on:click="ToggleFilter(facetFilter.name,option)" /> 875 <label :for="'UnSelected-' + facetFilter.name + '-' + option.name" class="custom-control-label"> 876 {{option.label}} <span class="count">({{option.count}})</span> 877 </label> 878 </span> 879 </b-collapse> 880 <a v-b-toggle="'filter-expand-' + facetFilter.name.toLowerCase().trim()" class="basic_filter-expanding" v-if="facetFilter.optionActiveCount > 6"> 881 <span class="show-more">+ @Translate(basicFacetPrefix + "show more", "show more")</span> 882 <span class="show-less">- @Translate(basicFacetPrefix + "show less", "show less")</span> 883 </a> 884 </template> 885 <template v-else> 886 <span v-for="option in facetFilter.options" class="custom-control custom-checkbox facet-option"> 887 <input type="checkbox" class="custom-control-input" 888 :id="'UnSelected-' + facetFilter.name + '-' + option.name" 889 :name="facetFilter.name" 890 :value="option.value" 891 :v-model="option.selected" 892 :checked="option.selected" 893 v-on:click="ToggleFilter(facetFilter.name,option)" /> 894 <label :for="'UnSelected-' + facetFilter.name + '-' + option.name" class="custom-control-label"> 895 {{option.label}} <span class="count">({{option.count}})</span> 896 </label> 897 </span> 898 </template> 899 </b-collapse> 900 </div> 901 </div> 902 </template> 903 </b-collapse> 904 </aside> 905 </script> 906 <script type="text/x-template" id="add-to-basket-simple-template"> 907 @{ 908 string addToBasketSimplePrifix = "BuyButton "; 909 } 910 <div class="form-flex" v-if="priceWithoutVat > 0" v-bind:class="[{added: IsAdded}, {adding: IsAdding}, {disabled: !canAdd}]"> 911 912 <label for="quantity">@Translate(addToBasketSimplePrifix + "Quantity", "Quantity")</label> 913 <input class="form-control" type="number" name="quantity" v-model="quantity" autocomplete="off" onclick="this.setSelectionRange(0, this.value.length)"> 914 <button :disabled="!canAdd" :class="buttonClass" v-on:click="addToBasketAndResetQuantity()" aria-label="@Translate(addToBasketSimplePrifix + "Add", "Add")"> 915 <slot> 916 <svg> 917 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#shopping-cart"> 918 </use> 919 </svg> 920 <span> 921 @Translate(addToBasketSimplePrifix + "Add to basket", "Add to basket") 922 </span> 923 </slot> 924 925 </button> 926 927 <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> 928 <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> 929 <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> 930 </div> 931 </script> 932 933 <script type="text/x-template" id="quick-add-template"> 934 @{ 935 string quickAddPrifix = "BuyButton "; 936 } 937 <div v-bind:class="[{added: IsAdded}, {adding: IsAdding}]"> 938 <label for="quantity">@Translate(quickAddPrifix + "Quantity", "Quantity")</label> 939 <input class="form-control" type="number" id="quantity" name="quantity" v-model="quantity" autocomplete="off"> 940 </div> 941 </script> 942 943 <script type="text/x-template" id="add-to-basket-button-only-template"> 944 @{ 945 string addToBasketPrefix = "BuyButton "; 946 } 947 <div v-bind:class="[{added: IsAdded}, {adding: IsAdding}]"> 948 <button :class="buttonClass" v-on:click="addToBasket()"> 949 <slot> 950 @Translate(addToBasketPrefix + "Add to basket", "Add to basket") 951 </slot> 952 </button> 953 </div> 954 </script> 955 <script type="text/x-template" id="async-price-template"> 956 @{ 957 string asyncPrefix = "Async "; 958 959 } 960 961 <div :class="classType + (loading ? ' loading' : '')"> 962 <template> 963 <p :class="classType + '--error'" v-if="error">{{error}}</p> 964 </template> 965 <template v-if="!loading"> 966 <template v-if="!forceAskForPrice && price.netUnitPrice.priceWithoutVat"> 967 968 <p class="price"> 969 <span itemprop="price" :content="price.netUnitPrice.priceWithoutVat">{{ price.netUnitPrice.priceWithoutVat | currency(price.currencyCode) }}</span> 970 <span class="sr-only" itemprop="priceCurrency" content="@(Pageview.User?.Currency ?? Pageview.Area.EcomCurrencyId)">@(Pageview.User?.Currency ?? Pageview.Area.EcomCurrencyId)</span> 971 </p> 972 <small>@Translate(asyncPrefix + "price without vat", "Price without VAT")</small> 973 </template> 974 <template v-if="!price?.netUnitPrice?.priceWithoutVat || forceAskForPrice"> 975 <a :href="'mailto:@Translate("Ask for a price EMAIL.","info@tefcold.dk")?subject=' + '@Translate("Ask for a price.")' + ' - ' + product.product.name + ' - ' + product.product.shortDescription + '&body=@Translate("ProductName EMAIL (BODY)", "Produktnavn: ") ' + product.product.name + ' - @Translate("ProductShortName EMAIL (BODY)", "Kort produktnavn: ") ' + product.product.shortDescription" class="btn btn-outline-secondary btn-sm">@Translate("Ask for a price.", "Spørg om pris.")</a> 976 </template> 977 </template> 978 </div> 979 </script> 980 <script type="text/x-template" id="pagination-template"> 981 @{ 982 string paginationPrefix = "Pagination "; 983 } 984 <nav aria-label="@Translate(paginationPrefix + "Productlist pagination", "Productlist pagination")"> 985 <ul class="pagination"> 986 <li :class="['page-item', currentPage == 1 ? 'disabled' : '' ]"> 987 <a class="page-link" v-on:click="togglePrevPage()" aria-label="@Translate(paginationPrefix + "Previous Page", "Previous Page")" v-bind:aria-disabled="currentPage > 1 ? 'true' : null"> 988 <svg> 989 <use xmlns:xlink="http://www.w3.org/1999/xlink" 990 xlink:href="/files/dist/icons/icons.svg#chevron-left"> 991 </use> 992 </svg> 993 </a> 994 </li> 995 <template v-if="hasGroupId"> 996 <li v-if="showPage(n)" v-for="n in totalPages" :key="n" :class="(n == currentPage ? 'page-item active' : 'page-item')"> 997 <a v-on:click="togglePage(n)" v-bind:aria-current="(n == currentPage ? 'true' : '')" class="page-link"> 998 {{n}} 999 </a> 1000 </li> 1001 </template> 1002 <template v-else> 1003 <li class="page-item"> 1004 <span class="page-label"> 1005 {{currentPage}} 1006 </span> 1007 </li> 1008 <li class="page-item"> 1009 <span class="page-label"> 1010 @Translate(paginationPrefix + "of", "of") 1011 </span> 1012 </li> 1013 <li class="page-item"> 1014 <span class="page-label"> 1015 {{totalPages}} 1016 </span> 1017 </li> 1018 </template> 1019 <li :class="'page-item' + (currentPage >= totalPages ? ' disabled' : '')"> 1020 <a v-on:click="toggleNextPage()" aria-label="@Translate(paginationPrefix + "Next Page", "Next Page")" class="page-link" v-bind:aria-disabled="totalPages > currentPage ? 'true' : null"> 1021 <svg class="icon-pagination"> 1022 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#chevron-right"></use> 1023 </svg> 1024 </a> 1025 </li> 1026 </ul> 1027 </nav> 1028 </script> 1029 <script type="text/x-template" id="product-specification-list-view-template"> 1030 <div class="basic_listview-data"> 1031 <template v-if="!isSparePart"> 1032 <p itemprop="description"> 1033 {{ SpecificationHelpers.GetFirstSpecificationValueOrDefault('GrossNetVolume',productSpecifications)}} {{ SpecificationHelpers.GetSpecificationUnit(SpecificationHelpers.GetSpecificationByKey('GrossNetVolume',productSpecifications))}} 1034 <br /> 1035 {{ SpecificationHelpers.GetFirstSpecificationValueOrDefault('ExternalDimensionWeb',productSpecifications)}} 1036 1037 </p> 1038 </template> 1039 <p itemprop="sku">@Translate("PLP No.", "No.") {{productNumber}}</p> 1040 </div> 1041 </script> 1042 <script type="text/x-template" id="product-spare-parts-view-template"> 1043 @{ 1044 string basicPimPrefix = "PDP "; 1045 } 1046 <div> 1047 <button class="btn-collapse" id="spareparts" v-b-toggle.spareparts-list> 1048 @Translate(basicPimPrefix + "spare parts", "Spare Parts") 1049 </button> 1050 <template> 1051 <b-collapse id="spareparts-list" visible accordion="specs2"> 1052 <template> 1053 <div class="body-collapse full pb-0"> 1054 <ul class="basic_pim-spares"> 1055 <template v-if="sparePartReportExist"> 1056 <li> 1057 <a href="#" v-on:click="getSparePartReport($event)" target="_blank"> 1058 <svg> 1059 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#download"></use> 1060 </svg> 1061 @Translate(basicPimPrefix + "spare part list", "Spare part list") 1062 </a> 1063 </li> 1064 </template> 1065 <li> 1066 <a :href="explodedDrawing" target="_blank"> 1067 <svg> 1068 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#download"></use> 1069 </svg> 1070 @Translate(basicPimPrefix + "view exploded drawing of spare parts", "View exploded drawing of spare parts") 1071 </a> 1072 </li> 1073 <li :data-point="spare.product.position" class="basic_pim-spare" v-for="spare in spareParts"> 1074 <div class="head"> 1075 <a href="#" v-on:click="navigateToSpare($event,spare.product.id)" class="name">{{spare.product.productName}}</a> 1076 <p class="sku">{{spare.product.number}}</p> 1077 </div> 1078 1079 @if (Pageview.IsAllowedToShop()) 1080 { 1081 <div class="foot"> 1082 <async-price class-type="asyncprice-spare" 1083 :product="spare" 1084 :default-price="spare.product.price" 1085 list-price="true" 1086 :only-standard-price="@(Pageview.IsCurrentlyB2C().ToString().ToLower())" 1087 standard-customer="@(string.IsNullOrEmpty(Pageview.AreaSettings.GetString("StandardCustomer")) ? "" : Pageview.AreaSettings.GetString("StandardCustomer"))"> 1088 > 1089 </async-price> 1090 <add-to-basket-simple 1091 :product="spare" 1092 :unit-of-measure="'PCS'" 1093 button-class="btn btn-primary" 1094 class="addtobasketsimple-plp" 1095 :price-without-vat="spare.product.price" 1096 language-id="@Pageview.Area.EcomLanguageId" 1097 :only-spare-parts="@(Pageview.User.OnlySpareParts().ToString().ToLower())" 1098 :is-marketing-user="@(Pageview.User.OnlyView().ToString().ToLower())" 1099 standard-customer="@(string.IsNullOrEmpty(Pageview.AreaSettings.GetString("StandardCustomer")) ? "" : Pageview.AreaSettings.GetString("StandardCustomer"))"> 1100 </add-to-basket-simple> 1101 </div> 1102 } 1103 @*<p>DEBUG: {{spare}}</p>*@ 1104 </li> 1105 1106 </ul> 1107 </div> 1108 </template> 1109 </b-collapse> 1110 </template> 1111 </div> 1112 1113 </script> 1114 <script type="text/x-template" id="variant-list-template"> 1115 <ul class="variants" v-if="initialVariant.product.hasVariants" > 1116 <li> 1117 <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"/> 1118 <label :for="'main-' + initialVariant.product.id" :style="getImageOrColor(initialVariant.product.variantImage,initialVariant.product.variantValue)"></label> 1119 </li> 1120 <li v-for="variant in initialVariant.product.simpleVariants"> 1121 <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" /> 1122 <label :for="'color-'+variant.product.id+ '-' + variant.product.variantId" :style="getImageOrColor(variant.product.variantImage,variant.product.variantValue)"> 1123 </label> 1124 </li> 1125 </ul> 1126 </script> 1127 @using Dynamicweb.Ecommerce.International 1128 <script type="text/x-template" id="product-template"> 1129 1130 <article itemscope itemtype="https://schema.org/Product" v-if="product.product" v-bind:key="product.product.number"> 1131 <span class="badge"> 1132 <img v-if="SpecificationHelpers.GetFirstSpecificationValueOrDefault('Stickers',product.specifications)" :src="'/Admin/Public/GetImage.ashx?Height=50&amp;Compression=85&amp;Image=' + SpecificationHelpers.GetFirstSpecificationValueOrDefault('Stickers',product.specifications)" alt="@Translate(basicPimPrefix + "Sticker", "Sticker")" v-bind:alt="product.product.name" itemprop="image" class="img-fluid" /> 1133 </span> 1134 <a :href="product.product.url" itemprop="url"> 1135 <figure style="min-height: 1px;"> 1136 1137 <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;fillcanvas=true&amp;Image=' + SpecificationHelpers.GetFirstSpecificationValueOrDefault('WebPrimaryImage',product.specifications)" 1138 v-bind:alt="product.product.name" itemprop="image" class="img-fluid" /> 1139 <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;fillcanvas=true&amp;Image=/Files/Images/default.jpg'" 1140 v-bind:alt="product.product.name" itemprop="image" class="img-fluid" /> 1141 </figure> 1142 <header> 1143 <h1 itemprop="name">{{product.product.name}}</h1> 1144 <p itemprop="category">{{product.product.shortDescription}}</p> 1145 <div class="flex-list"> 1146 <product-specification-list-view :product-specifications="product.specifications" 1147 :product-number="product.product.number" 1148 :is-spare-part="product.product.isSparePart"> 1149 </product-specification-list-view> 1150 @if (Pageview.IsAllowedToShop()) 1151 { 1152 <template v-if="plpClass=='basic_listview-grid'"> 1153 <buying-component inline-template :selected-product="product" :initial-product="initialProduct"> 1154 <template v-if="SpecificationHelpers.GetFirstSpecificationValueOrDefault('EnergyArrow',selectedProduct.specifications)"> 1155 <div class="energy-data"> 1156 <a :href="SpecificationHelpers.GetFirstSpecificationValueOrDefault('EnergyLabel',selectedProduct.specifications)" target="_blank" class="energy-label"> 1157 <img :src="SpecificationHelpers.GetFirstSpecificationValueOrDefault('EnergyArrow',selectedProduct.specifications)" alt="Energy Label" class="img-fluid img-energy" height="25" /> 1158 </a> 1159 <a href="#" v-on:click="getProductReport($event,selectedProduct.product.number,selectedProduct.product.name,selectedProduct.product.languageId)" target="_blank" class="energy-link"> 1160 <small>@Translate("PDP product sheet", "Product Sheet")</small> 1161 </a> 1162 </div> 1163 </template> 1164 </buying-component> 1165 </template> 1166 } 1167 </div> 1168 </header> 1169 </a> 1170 <template v-if="plpClass=='basic_listview-list'"> 1171 <ul class="basic_listview-specs"> 1172 <li v-for="item in SpecificationHelpers.GetPrettyBulletPoints(product.specifications)"> 1173 {{item}} 1174 </li> 1175 </ul> 1176 @*{{ product.Product.LongDescription }}*@ 1177 </template> 1178 1179 @if (!Pageview.IsAllowedToShop()) 1180 { 1181 <footer> 1182 <a href="@NORRIQ.Common8.Razor.Navigation.GetUrlByNavigationTag("contact")" class="btn btn-outline-secondary btn-sm"> 1183 @Translate("create account", "Create account") 1184 </a> 1185 <buying-component inline-template :selected-product="product" :initial-product="initialProduct"> 1186 <variant-list :initial-variant="initialProduct" :currently-selected="selectedProduct"></variant-list> 1187 </buying-component> 1188 </footer> 1189 } 1190 else 1191 { 1192 <buying-component inline-template :selected-product="product" :plp-class="plpClass" :initial-product="initialProduct"> 1193 <footer itemprop="offers" itemscope="" itemtype="https://schema.org/Offer"> 1194 <variant-list :initial-variant="initialProduct" :currently-selected="selectedProduct"></variant-list> 1195 <template v-if="SpecificationHelpers.GetFirstSpecificationValueOrDefault('EnergyArrow',selectedProduct.specifications) && plpClass == 'basic_listview-list'"> 1196 <div class="energy-price"> 1197 <async-price class-type="asyncprice-plp" 1198 :product="selectedProduct" 1199 :default-price="selectedProduct.product.defaultPrice.priceWithoutVat" 1200 :only-standard-price="@(Pageview.IsCurrentlyB2C().ToString().ToLower())" 1201 list-price="true" 1202 :should-emit-warranties="@((Pageview.IsAllowedToShop()).ToString().ToLower())" 1203 :force-ask-for-price="(!selectedProduct.product.isSparePart && @((Pageview.User.OnlySpareParts()).ToString().ToLower())) || @(Pageview.User.OnlyView().ToString().ToLower())" 1204 standard-customer="@(string.IsNullOrEmpty(Pageview.AreaSettings.GetString("StandardCustomer")) ? "" : Pageview.AreaSettings.GetString("StandardCustomer"))"> 1205 </async-price> 1206 <div class="energy-data"> 1207 <a :href="SpecificationHelpers.GetFirstSpecificationValueOrDefault('EnergyLabel',selectedProduct.specifications)" class="energy-label" target="_blank"> 1208 <img :src="SpecificationHelpers.GetFirstSpecificationValueOrDefault('EnergyArrow',selectedProduct.specifications)" alt="Energy Label" class="img-fluid img-energy" height="25" /> 1209 </a> 1210 <a href="#" v-on:click="getProductReport($event,selectedProduct.product.number,selectedProduct.product.name,selectedProduct.product.languageId)" target="_blank" class="energy-link"> 1211 <small>@Translate("PDP product sheet", "Product Sheet")</small> 1212 </a> 1213 </div> 1214 </div> 1215 </template> 1216 <template v-else> 1217 <async-price class-type="asyncprice-plp" 1218 :product="selectedProduct" 1219 :default-price="selectedProduct.product.defaultPrice.priceWithoutVat" 1220 :only-standard-price="@(Pageview.IsCurrentlyB2C().ToString().ToLower())" 1221 list-price="true" 1222 :should-emit-warranties="@((Pageview.IsAllowedToShop()).ToString().ToLower())" 1223 :force-ask-for-price="(!selectedProduct.product.isSparePart && @((Pageview.User.OnlySpareParts()).ToString().ToLower())) || @(Pageview.User.OnlyView().ToString().ToLower())" 1224 standard-customer="@(string.IsNullOrEmpty(Pageview.AreaSettings.GetString("StandardCustomer")) ? "" : Pageview.AreaSettings.GetString("StandardCustomer"))"> 1225 </async-price> 1226 </template> 1227 1228 <add-to-basket-simple :product="selectedProduct" 1229 :unit-of-measure="'PCS'" 1230 button-class="btn btn-primary" 1231 class="addtobasketsimple-plp" 1232 :price-without-vat="currentItemPriceWithoutVat" 1233 language-id="@Pageview.Area.EcomLanguageId" 1234 :only-spare-parts="@(Pageview.User.OnlySpareParts().ToString().ToLower())" 1235 :is-marketing-user="@(Pageview.User.OnlyView().ToString().ToLower())" 1236 standard-customer="@(string.IsNullOrEmpty(Pageview.AreaSettings.GetString("StandardCustomer")) ? "" : Pageview.AreaSettings.GetString("StandardCustomer"))"> 1237 </add-to-basket-simple> 1238 </footer> 1239 </buying-component> 1240 } 1241 1242 </article> 1243 1244 </script> 1245 <script type="text/x-template" id="quick-search-template"> 1246 <div class="quicksearch-component"> 1247 <div class="quickorder-form"> 1248 <slot name="right-box"></slot> 1249 <div class="quickorder-box"> 1250 <h2>@Translate("Find products")</h2> 1251 <div class="quickorder-input"> 1252 <label for="quickOrderSearch">@Translate("Product name or number")</label> 1253 <input type="text" 1254 :id="id" 1255 v-model="search" 1256 @@keydown.enter="enter" 1257 @@keydown.down="down" 1258 @@keydown.up="up" 1259 @@input="onSearchInput" 1260 class="form-control form-control-lg" 1261 autocomplete="chrome-off" 1262 placeholder="@Translate("Quick order search term")" 1263 :disabled="disabled"/> 1264 <label for="quickOrderQty">@Translate("Quantity")</label> 1265 <input type="number" 1266 v-model.number="quantity" 1267 @@change="chosenProduct()" 1268 @@keydown.enter="chosenProduct()" 1269 class="form-control form-control-lg" 1270 id="quickOrderQty" 1271 placeholder="0" 1272 autocomplete="chrome-off" 1273 :disabled="disabled"/> 1274 1275 </div> 1276 <ul v-if="filterList.length > 0 && open" class="quickorder-list"> 1277 <li v-for="(product,index) in filterList" 1278 :class="{'active': isSelected(index)}"> 1279 <button @@click="suggestClick(index)"> 1280 {{concatNameAndNumber(product)}} 1281 </button> 1282 1283 </li> 1284 </ul> 1285 1286 <div class="quickorder-product" v-if="currentChosenProduct"> 1287 <p><strong>{{currentChosenProduct.name}}</strong><small>{{currentChosenProduct.shortDescription}}</small></p> 1288 <product-specification-list-view v-if="searchProductSpecs !== null" 1289 :product-specifications="searchProductSpecs" 1290 :product-number="currentChosenProduct.number"> 1291 </product-specification-list-view> 1292 <async-price class-type="quickorder-product-price" 1293 :product="currentChosenProduct" 1294 unit-of-measure="" 1295 :only-price="true" 1296 default-price-without-vat="0" 1297 :force-ask-for-price="(!currentChosenProduct.isSparePart && @(Pageview.User.OnlySpareParts().ToString().ToLower())) || @(Pageview.User.OnlyView().ToString().ToLower())" 1298 @@price="handlePriceUpdate" 1299 standard-customer="@(string.IsNullOrEmpty(Pageview.AreaSettings.GetString("StandardCustomer")) ? "" : Pageview.AreaSettings.GetString("StandardCustomer"))"> 1300 </async-price> 1301 </div> 1302 </div> 1303 </div> 1304 <p v-if="showPriceError">@Translate("QuickOrderZeroPriceError","Can not add product with zero price")</p> 1305 <div class="quickorder-cart" v-if="productsToOrder.length > 0"> 1306 <table class="table table-striped table-flex"> 1307 <thead> 1308 <tr> 1309 <th>@Translate("Product")</th> 1310 <th>@Translate("Specifications")</th> 1311 <th>@Translate("Quantity")</th> 1312 <th class="cell-right">@Translate("Price")</th> 1313 <th>&nbsp;</th> 1314 </tr> 1315 </thead> 1316 <tbody> 1317 <tr v-for="(product,index) in productsToOrder"> 1318 <td class="cell-prod"> 1319 <strong>{{product.name}}</strong> 1320 <small>{{product.shortDescription}}</small> 1321 </td> 1322 <td class="cell-specs"> 1323 <product-specification-list-view :product-specifications="product.productSpecifications" 1324 :product-number="product.number"> 1325 </product-specification-list-view> 1326 </td> 1327 <td class="cell-specs"> 1328 <input class="form-control" type="number" v-model="product.quantity" @@input="updateQuantity()" /> 1329 </td> 1330 <td class="cell-price cell-right"> 1331 <async-price class-type="quickorder-product-price" 1332 :product="quickOrderProductToSimpleProduct(product)" 1333 unit-of-measure="" 1334 :only-price="true" 1335 default-price-without-vat="0" 1336 :should-emit-warranties="true" 1337 @@qo-warranty-update="setWarranty($event,product)" 1338 :force-ask-for-price="(!product.isSparePart && @(Pageview.User.OnlySpareParts().ToString().ToLower())) || @(Pageview.User.OnlyView().ToString().ToLower())" 1339 standard-customer="@(string.IsNullOrEmpty(Pageview.AreaSettings.GetString("StandardCustomer")) ? "" : Pageview.AreaSettings.GetString("StandardCustomer"))"> 1340 1341 </async-price> 1342 </td> 1343 <td class="cell-trash"> 1344 <button @@click="removeOrderline(index)" aria-label="@Translate("Delete product")" class="text-danger"> 1345 <svg> 1346 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#trash-alt"></use> 1347 </svg> 1348 </button> 1349 </td> 1350 </tr> 1351 </tbody> 1352 </table> 1353 <slot name="button"></slot> 1354 1355 </div> 1356 </div> 1357 </script> 1358 <script src="@NORRIQ.Common8.Razor.TimestampSource.GetSourceWithTimestamp("/Files/dist/scripts/vendors~bundle.min.js")"></script> 1359 <script src="@NORRIQ.Common8.Razor.TimestampSource.GetSourceWithTimestamp("/Files/dist/scripts/bundle.min.js")"></script> 1360 <script async> 1361 AppStart.VueProvider.init({ 1362 webApiUrl: '@System.Web.Configuration.WebConfigurationManager.AppSettings["WebApiProxyUrl"]', 1363 currencyCode: '@currencyCode', 1364 locale: '@Pageview.Area.Culture', 1365 currencyLeft: false, 1366 currencySpacing: true, 1367 currencySymbol: '@currencyCode', 1368 currencyDecimalSeparator: ',', 1369 currencyGroupSeparator: '.', 1370 currencyDecimalDigits: 2, 1371 dateFormatShort: '@Pageview.Area.Dateformat', 1372 languages: `@languagesJson` 1373 }); 1374 </script> 1375 1376 <script append="replace"></script> 1377 </body> 1378 </html>