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