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