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