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_c34cbdc0188344859f73bd6c1b04e014.Execute() in E:\Solutions\Live\Tefcold.Web\Files\Templates\Designs\Tefcold\_parsed\Basic_Page.parsed.cshtml:line 600
   at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader)
   at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.b__0(TextWriter writer)
   at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()

1 @using System.Globalization 2 @using Dynamicweb 3 @using Dynamicweb.Content 4 @using Dynamicweb.Frontend; 5 @using Dynamicweb.Security.UserManagement 6 @using NLWI.Core.Factory 7 @using NORRIQ.SalesPersonLogin.Services 8 @using Dynamicweb.Ecommerce.International 9 @using Tefcold.Web.CustomCode.Extensions 10 @using Tefcold.Web.CustomCode.Items.Properties 11 @using Tefcold.Web.CustomCode.Items.Settings 12 @using Tefcold.Web.CustomCode.LanguageSwitch 13 @using Tefcold.Web.CustomCode.Razor 14 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 15 @{ 16 //Heine: Understående kan bruges såfremt der skal tjekkes på om man er i impersonation mode: 17 var isImpersonating = ImpersonationService.IsCurrentlyImpersonating(); 18 var locationName = Pageview.User?.Name; 19 var websiteSettings = Pageview.Area.Item.ToCodeFirstItem<Websites>(); 20 LanguageService languageService = new LanguageService(); 21 var languagesJson = Newtonsoft.Json.JsonConvert.SerializeObject(languageService.GetLanguages()); 22 } 23 24 <!DOCTYPE html> 25 <html lang="@Pageview.Area.Culture"> 26 <head> 27 <meta charset='utf-8' /> 28 <meta name="description" content="@Model.Description" /> 29 <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=5, user-scalable=yes, shrink-to-fit=no" /> 30 <meta http-equiv="x-ua-compatible" content="ie=edge"> 31 @if (Model.Area.Item.GetBoolean("NoIndex")) 32 { 33 <!-- TODO: remove on launch--> 34 <meta name="robots" content="noindex, nofollow" /> 35 } 36 37 @if (!string.IsNullOrWhiteSpace(websiteSettings.HeaderScript)) 38 { 39 @websiteSettings.HeaderScript 40 } 41 42 @if (!string.IsNullOrWhiteSpace(websiteSettings.GoogleTagManagerId)) 43 { 44 <script> 45 (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': 46 new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], 47 j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 48 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); 49 })(window,document,'script','dataLayer','@websiteSettings.GoogleTagManagerId'); 50 </script> 51 } 52 53 <!-- Begin Mailchimp Signup Form --> 54 <link href="//cdn-images.mailchimp.com/embedcode/classic-10_7.css" rel="stylesheet" type="text/css"> 55 <style type="text/css"> 56 #mc_embed_signup{background:#fff; clear:left; font:14px Helvetica,Arial,sans-serif; } 57 /* Add your own Mailchimp form style overrides in your site stylesheet or in this style block. 58 We recommend moving this block and the preceding CSS link to the HEAD of your HTML file. */ 59 60 </style> 61 62 <title>@Model.Title</title> 63 @Model.MetaTags 64 @if (Model.Area.Item.GetFile("Icon") != null) 65 { 66 <link href="@Model.Area.Item.GetFile("Icon").Path" rel="icon" type="image/png"> 67 } 68 <link rel="preload" href="@NORRIQ.Common8.Razor.TimestampSource.GetSourceWithTimestamp("/Files/dist/css/Tefcold-min.css")" as="style" /> 69 <link rel="stylesheet" async href="@NORRIQ.Common8.Razor.TimestampSource.GetSourceWithTimestamp("/Files/dist/css/Tefcold-min.css")" /> 70 @*<link href="/Files/dist/css/Tefcold-min.css" rel="stylesheet" />*@ 71 </head> 72 <body> 73 @if (!string.IsNullOrWhiteSpace(websiteSettings.GoogleTagManagerId)) 74 { 75 <!-- Google Tag Manager (noscript) --> 76 <noscript> 77 <iframe src="https://www.googletagmanager.com/ns.html?id=@websiteSettings.GoogleTagManagerId" 78 height="0" width="0" style="display: none; visibility: hidden"></iframe> 79 </noscript> 80 <!-- End Google Tag Manager (noscript) --> 81 } 82 <div id="app"> 83 @{ 84 string basicNavbarPrefix = "Header "; 85 var logo = Model.Area.Item.GetFile("Logo"); 86 var currencyCode = Pageview.User?.Currency ?? Pageview.Area.EcomCurrencyId; 87 } 88 <header class="basic_navbar@(websiteSettings.EcomNav ? " has-groupsnavbar":"")" id="header"> 89 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("Notice"))) 90 { 91 <div class="notice-bar"> 92 <div class="basic_navbar-container"> 93 <p class="text-center">@Model.Area.Item.GetString("Notice")</p> 94 </div> 95 </div> 96 } 97 @if (isImpersonating) 98 { 99 <div class="impersonation-bar"> 100 <div class="basic_navbar-container"> 101 <p> 102 @Translate(basicNavbarPrefix + "debitor", "Debitor"): <b>@locationName</b> | <a href="@NORRIQ.Common8.Razor.Navigation.GetUrlByNavigationTag("impersonation-choose-customer")?action=changeuser">@Translate("Change customer")</a> 103 </p> 104 </div> 105 </div> 106 } 107 <div class="basic_navbar-main"> 108 <div class="basic_navbar-container"> 109 <a href="/" class="basic_navbar-logo" title="@Translate(basicNavbarPrefix + "Go to frontpage", "Go to frontpage")"> 110 @if (logo != null) 111 { 112 <img class="img-fluid" src="@logo.Path" alt="@Translate(basicNavbarPrefix + "Website Logo Alttext", "Website Logo Alttext")" /> 113 } 114 else 115 { 116 <i>@Translate(basicNavbarPrefix + "No logo found", "No logo found, please configure it in the Dynamicweb Administration")</i> 117 } 118 </a> 119 <collapse-hack inline-template> 120 <b-collapse class="basic_navbar-navigation" id="basic_navigation" tag="@(websiteSettings.EcomNav ? "div" : "nav")"> 121 @if (!websiteSettings.EcomNav) 122 { 123 @RenderNavigation(new { Template = "basic_navbar.xslt", Expandmode = "all", StartLevel = 1, EndLevel = 4 }) 124 } 125 else 126 { 127 @RenderNavigation(new { Template = "basic_navbar-extreme.xslt", Expandmode = "all", StartLevel = 1, EndLevel = 4 }) 128 } 129 <ul class="basic_navbar-subnav"> 130 <li> 131 <button type="button" 132 v-b-toggle.languages 133 aria-label="@Translate(basicNavbarPrefix + "Choose Language", "Choose Language")" 134 title="@Translate(basicNavbarPrefix + "Choose Language", "Choose Language")"> 135 <img src="/Admin/Public/GetImage.ashx?Width=32&amp;Compression=85&amp;Format=webp&amp;Quality=85&amp;Image=@Pageview.Area.Flag32X32" alt="@Pageview.Area.CultureInfo.EnglishName" /> 136 <span class="sr-only">@Pageview.Area.CultureInfo.EnglishName</span> 137 </button> 138 </li> 139 <li> 140 <button v-b-toggle.contacts 141 type="button" 142 aria-label="@Translate(basicNavbarPrefix + "Show contacts", "Show contacts")" 143 title="@Translate(basicNavbarPrefix + "Show contacts", "Show contacts")"> 144 <svg> 145 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#phone-alt"></use> 146 </svg> 147 <span class="sr-only">@Translate(basicNavbarPrefix + "Contacts", "Contacts")</span> 148 </button> 149 </li> 150 <li> 151 <button v-b-toggle.customer-center 152 type="button" 153 aria-label="@Translate(basicNavbarPrefix + "Show Webshop Login", "Show Webshop Login")" 154 title="@Translate(basicNavbarPrefix + "Show Webshop Login", "Show Webshop Login")"> 155 @if (Pageview.User == null) 156 { 157 <svg> 158 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#user"></use> 159 </svg> 160 } 161 else 162 { 163 <svg style="width: 30px; height: 30px;"> 164 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#user-check"></use> 165 </svg> 166 } 167 <span class="sr-only">@Translate(basicNavbarPrefix + "Login", "Login")</span> 168 </button> 169 </li> 170 @if (Pageview.User != null) 171 { 172 <li> 173 <a href="@NORRIQ.Common8.Razor.Navigation.GetUrlByNavigationTag("quickorder")" title="@Translate(basicNavbarPrefix + "Quickorder", "Quickorder")"> 174 <svg width="28px" height="28px"> 175 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#quickorder"></use> 176 </svg> 177 <span class="sr-only">@Translate(basicNavbarPrefix + "Quickorder", "Quickorder")</span> 178 </a> 179 </li> 180 } 181 @if (Pageview.User != null && Pageview.User.AllowMediaBank()) 182 { 183 @*<media-bank inline-template> 184 <li> 185 <form id="mediabankform" action="https://imagebank.tefcold.com/Home/LoginUser" method="post"> 186 <input id="mediabankformname" type="hidden" name="username" /> 187 <input id="mediabankformpassword" type="hidden" name="password" /> 188 <input type="hidden" value="false" name="persistent" /> 189 </form> 190 <a v-on:click="connect($event)" href="#" title="@Translate(basicNavbarPrefix + "Mediabank", "Mediabank")"> 191 <svg width="28px" height="28px" fill="currentColor"> 192 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#photo-video"></use> 193 </svg> 194 <span class="sr-only">@Translate(basicNavbarPrefix + "Mediabank", "Mediabank")</span> 195 </a> 196 </li> 197 </media-bank>*@ 198 <li> 199 <a href="@Translate(basicNavbarPrefix + "Mediabank Link", "http://media.tefcold.com")" target="_blank" title="@Translate(basicNavbarPrefix + "Mediabank", "Mediabank")"> 200 <svg width="28px" height="28px" fill="currentColor"> 201 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#photo-video"></use> 202 </svg> 203 <span class="sr-only">@Translate(basicNavbarPrefix + "Mediabank", "Mediabank")</span> 204 </a> 205 </li> 206 } 207 <li> 208 <button type="button" 209 class="btn-close" 210 @@click="collapseAll" 211 aria-label="@Translate(basicNavbarPrefix + "Close Navigation", "Close Navigation")" 212 title="@Translate(basicNavbarPrefix + "Close Navigation", "Close Navigation")"> 213 <span></span> 214 <span></span> 215 </button> 216 </li> 217 </ul> 218 </b-collapse> 219 </collapse-hack> 220 @if (websiteSettings.SearchAheadActivated) 221 { 222 <instant-search base-class="basic_navbar-search" :min-search-length="@websiteSettings.KeyStrokes" :number-of-hits="@websiteSettings.SearchHits" :product-search-paragraph-id="@websiteSettings.ProductSearchParagraphId" 223 :content-search-paragraph-id="@websiteSettings.ContentSearchParagraphId"></instant-search> 224 } 225 else 226 { 227 228 <form class="basic_navbar-search" action="/Default.aspx"> 229 <search-shortcut inline-template> 230 <div style="display: none"></div> 231 </search-shortcut> 232 <label for="productsearch">Search</label> 233 <input name="ID" type="hidden" value="@NORRIQ.Common8.Razor.Navigation.GetPageIdByNavigationTag("searchresult")"> 234 <input name="PageSize" type="hidden" value="99" /> 235 <input type="search" placeholder="@Translate(basicNavbarPrefix + "Search", "Search")" id="productsearch" name="productsearch"> 236 <button type="submit"> 237 <span class="sr-only">@Translate(basicNavbarPrefix + "Search", "Search")</span> 238 <svg> 239 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#search"></use> 240 </svg> 241 </button> 242 </form> 243 } 244 245 <ul class="basic_navbar-functions"> 246 <li class="basic_navbar-languages relative"> 247 <button type="button" v-b-toggle.languages aria-label="@Translate(basicNavbarPrefix + "Choose Language", "Choose Language")" title="@Translate(basicNavbarPrefix + "Choose Language", "Choose Language")"> 248 <span class="sr-only">@Pageview.Area.CultureInfo.EnglishName</span> 249 @if (Pageview.Area.Culture == "en-GB") 250 { 251 <img src="/Admin/Public/GetImage.ashx?Width=32&amp;Compression=85&amp;Format=webp&amp;Quality=85&amp;Image=/Files/Images/globe-flag.png" alt="@Pageview.Area.Culture - Flag" width="32" height="32" /> 252 } 253 else 254 { 255 <img src="/Admin/Public/GetImage.ashx?Width=32&amp;Compression=85&amp;Format=webp&amp;Quality=85&amp;Image=@Pageview.Area.Flag32X32" alt="@Pageview.Area.Culture - Flag" width="32" height="32" /> 256 } 257 @*@if (Pageview.Area.Culture == "en-GB") 258 { 259 <svg width="32" height="32" fill="currentColor"> 260 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#globe"></use> 261 </svg> 262 } 263 else 264 { 265 <img src="@Pageview.Area.Flag32X32" alt="@Pageview.Area.Culture - Flag" /> 266 }*@ 267 </button> 268 <b-collapse id="languages" class="basic_navbar-dropdown" accordion="header" v-auto-close> 269 <div class="basic_navbar-body languages-dropdown"> 270 <ul class="master-area"> 271 <li class="head"> 272 @if (Pageview.AreaID == 12 || Pageview.AreaID == 13) 273 { 274 <strong>@Translate(basicNavbarPrefix + "Tefcold Cz Languages", "TEFCOLD CZ s.r.o.")</strong> 275 } 276 else 277 { 278 <strong>@Translate(basicNavbarPrefix + "Tefcol Group Languages", "TEFCOLD A/S")</strong> 279 } 280 </li> 281 @foreach (var lang in Model.Languages) 282 { 283 @RenderLanguage(lang) 284 } 285 </ul> 286 <ul class="sub-area"> 287 288 @foreach (var masterArea in Dynamicweb.Services.Areas.GetMasterAreas().Where(a => !Model.Languages.Any(s => a.ID == s.ID))) 289 { 290 <li class="head"> 291 @if (Pageview.AreaID == 12 || Pageview.AreaID == 13) 292 { 293 <strong>@Translate(basicNavbarPrefix + "Tefcol Group Languages", "TEFCOLD A/S")</strong> 294 } 295 else 296 { 297 <strong>@Translate(basicNavbarPrefix + "Tefcold Cz Languages", "TEFCOLD CZ s.r.o.")</strong> 298 } 299 </li> 300 if (Pageview.AreaID != masterArea.ID) 301 { 302 <li class="@masterArea.ID"> 303 @renderArea(masterArea, websiteSettings) 304 </li> 305 } 306 foreach (var lang in masterArea.Languages.Where(s => s.Active && s.ID != Pageview.AreaID)) 307 { 308 <li class="is-lang"> 309 @renderArea(lang, websiteSettings) 310 </li> 311 } 312 } 313 314 </ul> 315 <ul class="uk-area"> 316 <li class="head"><strong>@Translate(basicNavbarPrefix + "Tefcol UK Languages", "TEFCOLD UK")</strong></li> 317 <li> 318 <a href="@Translate(basicNavbarPrefix + "Tefcold UK Url", "//tefcold.co.uk")" target="_blank"> 319 320 <img src="/Admin/Public/GetImage.ashx?Width=32&amp;Compression=85&amp;Format=webp&amp;Quality=85&amp;Background=dee0e2&amp;Image=/Admin/Images/Flags/flag_GB.png" alt="en-GB - Flag" loading="lazy" /> 321 <span>@Translate(basicNavbarPrefix + "Tefcold UK Label", "tefcold.co.uk")</span> 322 </a> 323 </li> 324 </ul> 325 </div> 326 </b-collapse> 327 </li> 328 <li class="basic_navbar-contacts @(Pageview.User != null ? "static" : "relative")"> 329 <button v-b-toggle.contacts 330 type="button" 331 aria-label="@Translate(basicNavbarPrefix + "Show contacts", "Show contacts")" 332 title="@Translate(basicNavbarPrefix + "Show contacts", "Show contacts")"> 333 <svg> 334 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#phone-alt"></use> 335 </svg> 336 <span class="sr-only">@Translate(basicNavbarPrefix + "Contacts", "Contacts")</span> 337 </button> 338 @{ 339 var impersonationGroupId = websiteSettings.ImpersonationGroup.FirstOrDefault(); 340 IEnumerable<User> users = null; 341 IEnumerable<User> salesPersons = new List<User>(); 342 if (Pageview.User != null) 343 { 344 var salesPersonCode = Pageview.User.CustomFieldValues.FirstOrDefault(field => field.CustomField.Name == "Sales Person Code"); 345 var salesPersonsInitials = salesPersonCode?.Value?.ToString().Split(',') ?? new string[] { }; 346 salesPersonsInitials = salesPersonsInitials.Select(x => x.ToLower()).ToArray(); 347 348 if (!string.IsNullOrEmpty(impersonationGroupId)) 349 { 350 users = Group.GetGroupByID(int.Parse(impersonationGroupId)).Users; 351 } 352 if (users == null || Pageview.User == null) 353 { 354 salesPersons = new List<User>(); 355 } 356 else 357 { 358 salesPersons = users.Where(user => salesPersonsInitials.Contains(user.Email.ToLower().Split('@').FirstOrDefault() ?? "")); 359 } 360 } 361 362 } 363 <b-collapse id="contacts" class="@(Pageview.User != null ? "basic_navbar-megamenu" : "basic_navbar-dropdown")" v-auto-close accordion="header"> 364 <div class="basic_navbar-body"> 365 @if (Pageview.User != null) 366 { 367 if (salesPersons.Any()) 368 { 369 <p class="tefcold_salesperson-byline h1">@Translate(basicNavbarPrefix + "Your Sales Team", "Your Sales Team")</p> 370 } 371 foreach (var salesPerson in salesPersons) 372 { 373 <div class="tefcold_salesperson" itemscope itemtype="http://schema.org/Person"> 374 <figure> 375 <img src="@salesPerson.Image" class="img-fluid" alt="@salesPerson.Name" itemprop="image" loading="lazy" /> 376 </figure> 377 <p itemprop="name">@salesPerson.Name</p> 378 <p itemprop="jobTitle">@salesPerson.JobTitle</p> 379 <p itemprop="telephone"> 380 <svg> 381 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#phone-alt"></use> 382 </svg> 383 <span>@salesPerson.PhonePrivate</span> 384 </p> 385 <p itemprop="telephone"> 386 <svg> 387 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#mobile-alt"></use> 388 </svg> 389 <span>@salesPerson.PhoneMobile</span> 390 </p> 391 <a href="@("mailto:" + @salesPerson.Email)" itemprop="email"> 392 <svg> 393 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#envelope"></use> 394 </svg> 395 <span>@salesPerson.Email</span> 396 </a> 397 </div> 398 } 399 } 400 <ul> 401 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("PhoneLabel")) 402 && !string.IsNullOrEmpty(Model.Area.Item.GetString("Phonenumber"))) 403 { 404 <li class="head"> 405 <strong> 406 @Model.Area.Item.GetString("PhoneLabel") 407 </strong> 408 <strong> 409 @Model.Area.Item.GetString("Phonenumber") 410 </strong> 411 </li> 412 } 413 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("ContactPage")) 414 && !string.IsNullOrEmpty(Model.Area.Item.GetString("ContactLabel"))) 415 { 416 <li> 417 <a href="@Model.Area.Item.GetString("ContactPage")"> 418 @Model.Area.Item.GetString("ContactLabel") 419 </a> 420 </li> 421 } 422 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("SalesPage")) 423 && !string.IsNullOrEmpty(Model.Area.Item.GetString("SalesLabel"))) 424 { 425 <li> 426 <a href="@Model.Area.Item.GetString("SalesPage")"> 427 @Model.Area.Item.GetString("SalesLabel") 428 </a> 429 </li> 430 } 431 </ul> 432 433 </div> 434 </b-collapse> 435 </li> 436 <li class="basic_navbar-user"> 437 <button v-b-toggle.customer-center type="button" aria-label="@Translate(basicNavbarPrefix + "Show Webshop Login", "Show Webshop Login")" title="@Translate(basicNavbarPrefix + "Show Webshop Login", "Show Webshop Login")"> 438 @if (Pageview.User == null) 439 { 440 <svg> 441 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#user"></use> 442 </svg> 443 } 444 else 445 { 446 <svg style="width: 30px; height: 30px;"> 447 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#user-check"></use> 448 </svg> 449 } 450 <span class="sr-only">@Translate(basicNavbarPrefix + "Login", "Login")</span> 451 </button> 452 453 454 <b-collapse id="customer-center" class="basic_navbar-dropdown" accordion="header" v-auto-close> 455 <div class="basic_navbar-body"> 456 @if (Pageview.User == null) 457 { 458 <head-login-form inline-template> 459 <form name="ExtUserForm" id="loginForm" method="post" class="form" role="form" v-on:submit="submitLogin"> 460 <p> 461 <strong> 462 @Translate(basicNavbarPrefix + "Webshop Login", "Webshop Login") 463 </strong> 464 </p> 465 <input type="hidden" name="ID" id="ID" value="" /> 466 <div class="form-group"> 467 <label for="Username">@Translate(basicNavbarPrefix + "Username", "Username")</label> 468 <input id="Username" v-model="username" name="Username" type="text" value="" class="form-control" autocomplete="off"> 469 </div> 470 <div class="form-group"> 471 <label for="Password">@Translate(basicNavbarPrefix + "Password", "Password")</label> 472 <input id="Password" v-model="password" name="Password" type="password" value="" class="form-control" autocomplete="off"> 473 </div> 474 <div v-if="loginFailed"> 475 <p class="alert alert-warning"> 476 @Translate("Login failed", "Invalid credentials") 477 </p> 478 </div> 479 <div v-if="redirecting" class="alert alert-warning"> 480 <p> 481 @Translate("Login wrong shop", "Your login belongs to another language, redirecting you in:") 482 483 </p> 484 <span class="basic_login"><b>{{counter}}</b></span> 485 </div> 486 487 <div class="basic_login-buttons"> 488 <button type="submit" role="button" class="btn btn-primary btn-block" v-bind:class='{"loading": loading}' v-on:click="loading=true" id="loginBtn"> 489 @Translate(basicNavbarPrefix + "Login", "Login") 490 </button> 491 </div> 492 </form> 493 </head-login-form> 494 <ul> 495 <li> 496 <a href="/Default.aspx?ID=@NORRIQ.Common8.Razor.Navigation.GetPageIdByNavigationTag("forgotpassword")&amp;LoginAction=Recovery"> 497 @Translate(basicNavbarPrefix + "Forgot password", "Forgot password") 498 </a> 499 </li> 500 <li> 501 <a href="@NORRIQ.Common8.Razor.Navigation.GetUrlByNavigationTag("contact")"> 502 @Translate(basicNavbarPrefix + "Create Webshop Account", "Create Webshop Account") 503 </a> 504 </li> 505 </ul> 506 } 507 else 508 { 509 <div class="active-user"> 510 <p><strong>@Pageview.User.Name</strong></p> 511 <p> 512 <a v-clear-cache:click.user href='/admin/public/extranetlogoff.aspx?ID=@(NORRIQ.Common8.Razor.Navigation.GetPageIdByNavigationTag("home"))'> 513 @Translate(basicNavbarPrefix + "Sign out", "Sign out") 514 </a> 515 </p> 516 </div> 517 @RenderNavigation(new { Template = "basic_Footer.xslt", Expandmode = "all", StartLevel = 1, EndLevel = 4, NavigationTag = "customer-portal" }) 518 } 519 </div> 520 </b-collapse> 521 </li> 522 @if (Pageview.User != null && Pageview.User.AllowMediaBank()) 523 { 524 @*<media-bank inline-template> 525 <li> 526 <form id="mediabankform" action="https://imagebank.tefcold.com/Home/LoginUser" method="post"> 527 <input id="mediabankformname" type="hidden" name="username" /> 528 <input id="mediabankformpassword" type="hidden" name="password" /> 529 <input type="hidden" value="false" name="persistent" /> 530 </form> 531 <a v-on:click="connect($event)" href="#" title="@Translate(basicNavbarPrefix + "Mediabank", "Mediabank")"> 532 <svg width="28px" height="28px" fill="currentColor"> 533 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#photo-video"></use> 534 </svg> 535 <span class="sr-only">@Translate(basicNavbarPrefix + "Mediabank", "Mediabank")</span> 536 </a> 537 </li> 538 </media-bank>*@ 539 <li> 540 <a href="@Translate(basicNavbarPrefix + "Mediabank Link", "http://media.tefcold.com")" target="_blank" title="@Translate(basicNavbarPrefix + "Mediabank", "Mediabank")"> 541 <svg width="28px" height="28px" fill="currentColor"> 542 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#photo-video"></use> 543 </svg> 544 <span class="sr-only">@Translate(basicNavbarPrefix + "Mediabank", "Mediabank")</span> 545 </a> 546 </li> 547 548 } 549 @if (Pageview.User != null) 550 { 551 <li class="basic_navbar-quick"> 552 <a href="@NORRIQ.Common8.Razor.Navigation.GetUrlByNavigationTag("quickorder")" title="@Translate(basicNavbarPrefix + "Quickorder", "Quickorder")"> 553 <svg width="28px" height="28px"> 554 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#quickorder"></use> 555 </svg> 556 <span class="sr-only">@Translate(basicNavbarPrefix + "Quickorder", "Quickorder")</span> 557 </a> 558 </li> 559 } 560 @if (websiteSettings.b2cshopping || Pageview.User != null) 561 { 562 <cart-icon cartlink="@NORRIQ.Common8.Razor.Navigation.GetUrlByNavigationTag("checkout")"></cart-icon> 563 } 564 <li class="basic_navbar-toggle"> 565 <button type="button" 566 aria-label="@Translate(basicNavbarPrefix + "Open main navigation", "Open main navigation")" 567 title="@Translate(basicNavbarPrefix + "Open main navigation", "Open main navigation")" 568 v-b-toggle.basic_navigation> 569 <svg width="28px" height="28px"> 570 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#bars"></use> 571 </svg> 572 <span class="sr-only">@Translate(basicNavbarPrefix + "Open main navigation", "Open main navigation")</span> 573 </button> 574 </li> 575 </ul> 576 577 </div> 578 </div> 579 </header> 580 @using Dynamicweb.Frontend; 581 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 582 583 @Title("Page") 584 @Description("Default page template") 585 @{ 586 string basicPagePrefix = "Page "; 587 } 588 @if (Pageview.IsCurrentUserAllowed) 589 { 590 var pageLayout = !string.IsNullOrEmpty(Model.Item.GetValue<ListViewModel>("Layout").SelectedValue) ? Model.Item.GetValue<ListViewModel>("Layout").SelectedValue : "content-page-sidebar"; 591 var pageClass = pageLayout == "page-wide" ? "basic_page-wide" : "basic_page"; 592 if (!Model.Item.GetBoolean("HideBreadcrumb")) 593 { 594 if (Model.Area.Item.GetFile("TopImage") != null) 595 { 596 <figure> 597 <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" /> 598 </figure> 599 } 600 @RenderNavigation(new { Template = "basic_Breadcrumb.xslt", Expandmode = "all", StartLevel = 1, EndLevel = 5 }) 601 } 602 <main class="@pageClass"> 603 @if (pageLayout == "content-page-sidebar" || pageLayout == "module-page-sidebar") 604 { 605 <aside class="basic_page-sidebar"> 606 @RenderNavigation(new { Template = "basic_Page.xslt", StartLevel = 1, EndLevel = 3 }) 607 </aside> 608 <div class="basic_page-content"> 609 @if (pageLayout == "content-page-sidebar" && !string.IsNullOrEmpty(Model.Item.GetString("Title").ToString()) || !string.IsNullOrEmpty(Model.Item.GetString("Text").ToString())) 610 { 611 <section class="basic_paragraph"> 612 @if (!string.IsNullOrEmpty(Model.Item.GetString("Title").ToString())) 613 { 614 <header> 615 <h1> 616 @Model.Item.GetString("Title") 617 </h1> 618 </header> 619 } 620 @if (Model.Item.GetFile("Image") != null) 621 { 622 <figure> 623 <img src="@Model.Item.GetFile("Image").Path" alt="@Model.Item.GetString("Title")" class="img-fluid" /> 624 </figure> 625 } 626 @if (!string.IsNullOrEmpty(Model.Item.GetString("Text").ToString())) 627 { 628 @Model.Item.GetString("Text") 629 } 630 </section> 631 } 632 @RenderPlaceholder() 633 </div> 634 } 635 else 636 { 637 @RenderPlaceholder() 638 } 639 </main> 640 } 641 else 642 { 643 <main class="basic_page"> 644 @RenderPlaceholder() 645 </main> 646 } 647 @helper RenderPlaceholder() 648 { 649 @Model.Placeholder("Content", "Content", "unwrap:true;default:true") 650 if (!String.IsNullOrEmpty(Model.Placeholder("Boxed"))) 651 { 652 <div class="grouped"> 653 @Model.Placeholder("Boxed", "Grouped Content", "unwrap:true") 654 </div> 655 } 656 } 657 658 @{ 659 string footerPrefix = "Footer "; 660 } 661 <footer class="basic_footer"> 662 <div class="basic_footer-wrap basic_footer-main"> 663 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("FooterOneTitle")) && !string.IsNullOrEmpty(Model.Area.Item.GetString("FooterOneText"))) 664 { 665 <div class="basic_footer-box"> 666 <div class="basic_footer-head" role="button" v-b-toggle.footer-one> 667 <h3>@Model.Area.Item.GetString("FooterOneTitle")</h3> 668 </div> 669 <b-collapse id="footer-one" class="basic_footer-collapse"> 670 <div class="basic_footer-body"> 671 @Model.Area.Item.GetString("FooterOneText") 672 </div> 673 </b-collapse> 674 </div> 675 } 676 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("FooterTwoTitle")) 677 && !string.IsNullOrEmpty(Model.Area.Item.GetString("FooterTwoText")) 678 || !string.IsNullOrEmpty(Model.Area.Item.GetString("FooterTwoTag"))) 679 { 680 <div class="basic_footer-box"> 681 <div class="basic_footer-head" role="button" v-b-toggle.footer-two> 682 <h3>@Model.Area.Item.GetString("FooterTwoTitle")</h3> 683 </div> 684 <b-collapse id="footer-two" class="basic_footer-collapse"> 685 <div class="basic_footer-body"> 686 @Model.Area.Item.GetString("FooterTwoText") 687 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("FooterTwoTag"))) 688 { 689 @RenderNavigation(new { Template = "basic_Footer.xslt", Expandmode = "all", StartLevel = 1, EndLevel = 4, NavigationTag = @Model.Area.Item.GetString("FooterTwoTag").ToString() }) 690 } 691 </div> 692 </b-collapse> 693 </div> 694 } 695 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("FooterThreeTitle")) 696 && !string.IsNullOrEmpty(Model.Area.Item.GetString("FooterThreeText")) 697 || !string.IsNullOrEmpty(Model.Area.Item.GetString("FooterThreeTag"))) 698 { 699 <div class="basic_footer-box"> 700 <div class="basic_footer-head" role="button" v-b-toggle.footer-three> 701 <h3>@Model.Area.Item.GetString("FooterThreeTitle")</h3> 702 </div> 703 <b-collapse id="footer-three" class="basic_footer-collapse"> 704 <div class="basic_footer-body"> 705 @Model.Area.Item.GetString("FooterThreeText") 706 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("FooterThreeTag"))) 707 { 708 @RenderNavigation(new { Template = "basic_Footer.xslt", Expandmode = "all", StartLevel = 1, EndLevel = 4, NavigationTag = @Model.Area.Item.GetString("FooterThreeTag").ToString() }) 709 } 710 </div> 711 </b-collapse> 712 </div> 713 } 714 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("FooterFourTitle")) && !string.IsNullOrEmpty(Model.Area.Item.GetString("FooterFourText"))) 715 { 716 <div class="basic_footer-box"> 717 <div class="basic_footer-head" role="button" v-b-toggle.footer-four> 718 <h3>@Model.Area.Item.GetString("FooterFourTitle")</h3> 719 </div> 720 <b-collapse id="footer-four" class="basic_footer-collapse"> 721 <div class="basic_footer-body"> 722 @Model.Area.Item.GetString("FooterFourText") 723 </div> 724 </b-collapse> 725 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("FacebookUrl")) 726 || !string.IsNullOrEmpty(Model.Area.Item.GetString("LinkedInUrl")) 727 || !string.IsNullOrEmpty(Model.Area.Item.GetString("YoutubeUrl"))) 728 { 729 <div class="some"> 730 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("FacebookUrl"))) 731 { 732 <a href="@Model.Area.Item.GetString("FacebookUrl")" target="_blank" aria-label="Facebook" rel="noreferrer"> 733 <svg> 734 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#facebook-square"></use> 735 </svg> 736 </a> 737 } 738 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("LinkedInUrl"))) 739 { 740 <a href="@Model.Area.Item.GetString("LinkedInUrl")" target="_blank" aria-label="LinkedIn" rel="noreferrer"> 741 <svg> 742 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#linkedin"></use> 743 </svg> 744 </a> 745 } 746 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("YoutubeUrl"))) 747 { 748 <a href="@Model.Area.Item.GetString("YoutubeUrl")" target="_blank" aria-label="Youtube" rel="noreferrer"> 749 <svg> 750 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#youtube-square"></use> 751 </svg> 752 </a> 753 } 754 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("SmileyUrl"))) 755 { 756 <a href="@Model.Area.Item.GetString("SmileyUrl")" target="_blank" aria-label="@Translate(footerPrefix + "smiley", "Elite Smiley")" rel="noreferrer"> 757 <svg> 758 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#happy-smiley"></use> 759 </svg> 760 </a> 761 } 762 </div> 763 } 764 </div> 765 } 766 </div> 767 @if (Model.Area.Item.GetFile("GroupLogo") != null) 768 { 769 <div class="basic_footer-group"> 770 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("GroupLogo"))) 771 { 772 <a href="@Model.Area.Item.GetString("GroupLink")" target="_blank" title="@Translate(footerPrefix + "tefcold group logo alt", "Part of Tefcold Group")"> 773 <img src="@Model.Area.Item.GetFile("GroupLogo").Path" class="img-fluid" alt="@Translate(footerPrefix + "tefcold group logo alt", "Part of Tefcold Group")" /> 774 </a> 775 } 776 else 777 { 778 <img src="@Model.Area.Item.GetFile("GroupLogo").Path" class="img-fluid" alt="@Translate(footerPrefix + "tefcold group logo alt", "Part of Tefcold Group")" /> 779 } 780 </div> 781 } 782 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("FooterCopyright"))) 783 { 784 785 <div class="basic_footer-sub"> 786 <div class="basic_footer-wrap"> 787 788 <p> 789 &copy; @DateTime.Now.Year @Model.Area.Item.GetString("FooterCopyright") 790 </p> 791 @RenderNavigation(new { Template = "basic_Footer.xslt", Expandmode = "all", StartLevel = 1, EndLevel = 4, NavigationTag = "footer" }) 792 793 @if (Model.Area.Item.GetValue<ListViewModel>("Cards").SelectedValues.Any()) 794 { 795 <div class="text-center cards"> 796 @foreach (var cards in Model.Area.Item.GetValue<ListViewModel>("Cards").SelectedValues) 797 { 798 <img src="/Files/Images/cards/@cards" alt="@cards.Split('.').First()" loading="lazy" /> 799 } 800 </div> 801 } 802 803 </div> 804 </div> 805 } 806 </footer> 807 <compare-banner class="comparison-footer" inline-template> 808 <div v-if="productsToCompare >= 1" class="comparison-footer"> 809 @{ 810 string comparisonFooterPrefix = "Comparison "; 811 } 812 <template v-if="productsToCompare >= 2"> 813 <a href="@NORRIQ.Common8.Razor.Navigation.GetUrlByNavigationTag("compare")" class="btn btn-primary btn-lg btn-block"> 814 <svg class="icon"> 815 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#balance-scale"></use> 816 </svg> 817 <span> 818 @Translate(comparisonFooterPrefix + "Click to compare", "Click to compare") 819 <strong>{{productsToCompare}}</strong> 820 @Translate(comparisonFooterPrefix + "products", "products") 821 </span> 822 </a> 823 </template> 824 <template v-else> 825 <a href="@NORRIQ.Common8.Razor.Navigation.GetUrlByNavigationTag("compare")" class="btn btn-primary btn-lg btn-block no-click"> 826 <svg class="icon"> 827 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#balance-scale"></use> 828 </svg> 829 <span> 830 @Translate(comparisonFooterPrefix + "You need 2 product to compare", "You need <strong>2</strong> products to compare") 831 </span> 832 </a> 833 </template> 834 </div> 835 </compare-banner> 836 <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'> 837 <div></div> 838 </basic-alert> 839 </div> 840 841 @helper RenderLanguage(PageLanguageViewModel lang) 842 { 843 if (Pageview.AreaID == lang.ID) 844 { 845 return; 846 847 } 848 849 if (Pageview.AreaID == lang.ID) 850 { 851 return; 852 853 } 854 855 var langCode = lang.Culture.Split('-').Last(); 856 var cultureInfo = CultureInfo.GetCultureInfo(lang.Culture); 857 var language = cultureInfo.NativeName.Split('(')[0]; 858 var url = SearchEngineFriendlyURLs.GetFriendlyUrl(lang.Page.ID); 859 var query = System.Web.HttpUtility.ParseQueryString(System.Web.HttpContext.Current.Request.QueryString.ToString()); 860 var allowedQuery = new HashSet<string> { "groupid", "productid", "variantid" }; 861 var shopIdSplit = "-at-SHOP"; 862 var shopId = Services.Pages.GetPage(lang.Page.ID).Area.EcomShopId; 863 foreach (var kv in query.AllKeys) 864 { 865 if (kv != null && allowedQuery.Contains(kv.ToLower())) 866 { 867 var queryValue = query[kv]; 868 var indexOfShopId = queryValue.IndexOf(shopIdSplit, StringComparison.InvariantCultureIgnoreCase); 869 if (indexOfShopId > 0) 870 { 871 var withOutShopId = queryValue.Substring(0, indexOfShopId); 872 query[kv] = withOutShopId + "-at-" + shopId; 873 } 874 } 875 else 876 { 877 query.Remove(kv); 878 } 879 } 880 881 882 var langArea = Dynamicweb.Services.Areas.GetArea(lang.ID); 883 var protocol = langArea.SslMode == 2 ? "https:" : "http"; 884 var host = lang.PrimaryDomain; 885 886 if (string.IsNullOrWhiteSpace(host)) 887 { 888 var domains = langArea.Domain.Split(new[] { "\n" }, StringSplitOptions.RemoveEmptyEntries).Select(s => s.Trim()); 889 host = (domains.FirstOrDefault(s => !s.Equals("localhost")) ?? "").TrimEnd('/'); 890 } 891 var urlencodedQuery = $"{protocol}://{host}{url}{(query.HasKeys() ? "?" + query.ToString() : "")}"; 892 893 <li> 894 <a href="@urlencodedQuery"> 895 @if (lang.Culture == "en-GB") 896 { 897 <img src="/Files/Images/globe-flag.png" alt="@lang.Culture - Flag" width="32" height="32" loading="lazy" /> 898 } 899 else 900 { 901 <img src="/Admin/Public/GetImage.ashx?Width=32&amp;Compression=85&amp;Format=webp&amp;Quality=85&amp;Image=/Admin/Images/Flags/flag_@(langCode).png" alt="@lang.Culture - Flag" width="32" height="32" loading="lazy" /> 902 } 903 @*@if (lang.Culture == "en-GB") 904 { 905 <svg width="32" height="32" fill="#3a3b3c"> 906 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#globe"></use> 907 </svg> 908 } 909 else 910 { 911 <img src="/Admin/Images/Flags/flag_@(langCode).png" alt="@lang.Culture - Flag" loading="lazy" /> 912 }*@ 913 <span>@Translate("lang_" + lang.Culture.Split('-').First(), lang.Culture.Split('-').First())</span> 914 </a> 915 </li> 916 } 917 918 919 @helper renderArea(Area lang, Websites websiteSettings) 920 { 921 var protocol = lang.SslMode == 2 ? "https:" : "http"; 922 var host = lang.DomainLock; 923 string countryCode = lang.Culture.Split('-').Last(); 924 if (string.IsNullOrWhiteSpace(host)) 925 { 926 var domains = lang.Domain.Split(new[] { "\n" }, StringSplitOptions.RemoveEmptyEntries).Select(s => s.Trim()); 927 host = (domains.FirstOrDefault(s => !s.Equals("localhost")) ?? "").TrimEnd('/'); 928 } 929 var langUrl = $"{protocol}://{host}"; 930 var langSettings = lang.Item.ToCodeFirstItem<Websites>(); 931 if (langSettings.NoIndex && !websiteSettings.NoIndex) 932 { 933 var pageId = NORRIQ.Common8.Razor.Navigation.GetPageIdByNavigationTag(countryCode + "Redirect"); 934 langUrl = pageId > 0 ? $"/Default.aspx?ID={pageId}" : ""; 935 } 936 <a href="@langUrl"> 937 @if (lang.Culture == "en-GB") 938 { 939 <img src="/Files/Images/globe-flag.png" alt="@lang.Culture - Flag" width="32" height="32" class="img-fluid" loading="lazy" /> 940 } 941 else 942 { 943 <img src="/Admin/Images/Flags/flag_@(countryCode).png" alt="@lang.Culture - Flag" width="32" height="32" class="img-fluid" loading="lazy" /> 944 } 945 <span>@Translate("lang_" + lang.Culture.Split('-').First(), lang.Culture.Split('-').First())</span> 946 </a> 947 948 } 949 950 <script type="text/x-template" id="cart-icon-template"> 951 @{ 952 string cartIconPrefix = "Minicart "; 953 } 954 <li> 955 <a :href="cartlink" title="@Translate(cartIconPrefix + "Checkout", "Checkout")"> 956 <svg> 957 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#shopping-cart"></use> 958 </svg> 959 <span class="label">@Translate(cartIconPrefix + "Checkout", "Checkout")</span> 960 <strong v-if="!cartEmpty" class="cart-quantity">{{quantity}}</strong> 961 </a> 962 </li> 963 </script> 964 965 966 967 <script type="text/x-template" id="basic-facet-filter-template"> 968 @{ 969 string basicFacetPrefix = "Filter "; 970 } 971 <aside> 972 <template v-if="HasActiveFilter()"> 973 974 <p id="selected-filter-label" class="sr-only"> 975 @Translate(basicFacetPrefix + "Active", "Active") 976 </p> 977 <div class="basic_filter-active" aria-labelledby="selected-filter-label"> 978 <template v-for="facetFilter in facetFilters"> 979 <span v-for="option in SelectedOptions(facetFilter)" class="custom-control custom-filter"> 980 <input type="checkbox" 981 :id="'Selected-' + facetFilter.name + '-' + option.name" 982 :name="facetFilter.name" 983 :value="option.value" 984 :v-model="option.selected" 985 :checked="option.selected" 986 v-on:click="ToggleFilter(facetFilter.name,option)" 987 class="custom-control-input" /> 988 <label :for="'Selected-' + facetFilter.name + '-' + option.name" class="custom-control-label" :data-name="facetFilter.name"> 989 <span> 990 {{option.label}} 991 </span> 992 <svg> 993 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#times"></use> 994 </svg> 995 </label> 996 </span> 997 </template> 998 </div> 999 </template> 1000 <b-collapse class="basic_filter" id="sidebar-filter"> 1001 <template v-if="!error && facetFilters"> 1002 <button type="button" class="btn-close" v-b-toggle.sidebar-filter.sidebar-overlay aria-label="@Translate(basicFacetPrefix + "Close Filter", "Close Filter")"> 1003 <span></span> 1004 <span></span> 1005 </button> 1006 <div class="basic_filter-groups"> 1007 <div class="basic_filter-group" v-for="(facetFilter, index) in facetFilters"> 1008 <p :id="'filter-group-' + facetFilter.name.toLowerCase().trim()" v-b-toggle="'filter-collapse-' + facetFilter.name.toLowerCase().trim()"> 1009 <template v-if="facetFilter.name === 'ModelType'"> 1010 @Translate(basicFacetPrefix + "ModelType", "Model / Type") 1011 </template> 1012 <template v-else-if="facetFilter.name === 'DoorType'"> 1013 @Translate(basicFacetPrefix + "DoorType", " Door type") 1014 </template> 1015 <template v-else-if="facetFilter.name === 'ExternalHeight'"> 1016 @Translate(basicFacetPrefix + "ExternalHeight", "External Height") (mm) 1017 </template> 1018 <template v-else-if="facetFilter.name === 'NetVolume'"> 1019 @Translate(basicFacetPrefix + "NetVolume", "Net Volume") (l) 1020 </template> 1021 <template v-else-if="facetFilter.name === 'DoorNumber'"> 1022 @Translate(basicFacetPrefix + "DoorNumber", " Number of doors") 1023 </template> 1024 <template v-else-if="facetFilter.name === 'ExteriorFinish'"> 1025 @Translate(basicFacetPrefix + "ExteriorFinish", "Exterior Finish") 1026 </template> 1027 <template v-else-if="facetFilter.name === 'ExternalWidth'"> 1028 @Translate(basicFacetPrefix + "ExternalWidth", "External Width") (mm) 1029 </template> 1030 <template v-else-if="facetFilter.name === 'GrossVolume'"> 1031 @Translate(basicFacetPrefix + "GrossVolume", "Gross Volume") (l) 1032 </template> 1033 <template v-else-if="facetFilter.name === 'Bottles330'"> 1034 @Translate(basicFacetPrefix + "Bottles330", "Capacity 330ml bottles") 1035 </template> 1036 <template v-else-if="facetFilter.name === 'Bottles500'"> 1037 @Translate(basicFacetPrefix + "Bottles500", "Capacity 500ml bottles") 1038 </template> 1039 <template v-else-if="facetFilter.name === 'Cans330'"> 1040 @Translate(basicFacetPrefix + "Cans330", "Capacity 300ml cans") 1041 </template> 1042 <template v-else-if="facetFilter.name === 'Cans500'"> 1043 @Translate(basicFacetPrefix + "Cans500", "Capacity 500ml cans") 1044 </template> 1045 <template v-else-if="facetFilter.name === 'TemperatureRange'"> 1046 @Translate(basicFacetPrefix + "TemperatureRange", "Temperature Range") 1047 </template> 1048 <template v-else-if="facetFilter.name === 'TemperatureRangeZone2'"> 1049 @Translate(basicFacetPrefix + "TemperatureRangeZone2", "Tempature Range 2") 1050 </template> 1051 <template v-else-if="facetFilter.name === 'ShelfNumber'"> 1052 @Translate(basicFacetPrefix + "ShelfNumber", "Number of shelfs") 1053 </template> 1054 <template v-else-if="facetFilter.name === 'LidType'"> 1055 @Translate(basicFacetPrefix + "LidType", "Lid Type") 1056 </template> 1057 <template v-else-if="facetFilter.name === 'InteriorFinish'"> 1058 @Translate(basicFacetPrefix + "InteriorFinish", "Interior Finish") 1059 </template> 1060 <template v-else-if="facetFilter.name === 'WineBottles750'"> 1061 @Translate(basicFacetPrefix + "WineBottles750", "Capacity 750ml winebottles") 1062 </template> 1063 <template v-else-if="facetFilter.name === 'CanopyType'"> 1064 @Translate(basicFacetPrefix + "CanopyType", "Canopy Type") 1065 </template> 1066 <template v-else-if="facetFilter.name === 'CoolingType'"> 1067 @Translate(basicFacetPrefix + "CoolingType", "Cooling Type") 1068 </template> 1069 <template v-else> 1070 {{facetFilter.name}} 1071 </template> 1072 <svg> 1073 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/Files/dist/icons/icons.svg#chevron-up"></use> 1074 </svg> 1075 </p> 1076 <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()"> 1077 <template v-if="facetFilter.renderType === 'Range'"> 1078 <basic-range-slider @@change="updateRange(facetFilter,$event)" :min="getMinRange(facetFilter)" :max="getMaxRange(facetFilter)" :init-min="getInitMin(facetFilter)" :init-max="getInitMax(facetFilter)"></basic-range-slider> 1079 </template> 1080 1081 <template v-else-if="facetFilter.optionActiveCount > 5"> 1082 <span v-for="option in facetFilter.options.slice(0, 5)" class="custom-control custom-checkbox facet-option"> 1083 <input type="checkbox" class="custom-control-input" 1084 :id="'UnSelected-' + facetFilter.name + '-' + option.name" 1085 :name="facetFilter.name" 1086 :value="option.value" 1087 :v-model="option.selected" 1088 :checked="option.selected" 1089 v-on:click="ToggleFilter(facetFilter.name,option)" /> 1090 <label :for="'UnSelected-' + facetFilter.name + '-' + option.name" class="custom-control-label"> 1091 {{option.label}} <span class="count">({{option.count}})</span> 1092 </label> 1093 </span> 1094 <b-collapse class="basic_filter-expand" :id="'filter-expand-' + facetFilter.name.toLowerCase().trim()" :visible="ShowMoreIfSelected(facetFilter.options, index)"> 1095 <span v-for="option in facetFilter.options.slice(5)" class="custom-control custom-checkbox facet-option"> 1096 <input type="checkbox" class="custom-control-input" 1097 :id="'UnSelected-' + facetFilter.name + '-' + option.name" 1098 :name="facetFilter.name" 1099 :value="option.value" 1100 :v-model="option.selected" 1101 :checked="option.selected" 1102 v-on:click="ToggleFilter(facetFilter.name,option)" /> 1103 <label :for="'UnSelected-' + facetFilter.name + '-' + option.name" class="custom-control-label"> 1104 {{option.label}} <span class="count">({{option.count}})</span> 1105 </label> 1106 </span> 1107 </b-collapse> 1108 <a v-b-toggle="'filter-expand-' + facetFilter.name.toLowerCase().trim()" class="basic_filter-expanding" v-if="facetFilter.optionActiveCount > 6"> 1109 <span class="show-more">+ @Translate(basicFacetPrefix + "show more", "show more")</span> 1110 <span class="show-less">- @Translate(basicFacetPrefix + "show less", "show less")</span> 1111 </a> 1112 </template> 1113 <template v-else> 1114 <span v-for="option in facetFilter.options" class="custom-control custom-checkbox facet-option"> 1115 <input type="checkbox" class="custom-control-input" 1116 :id="'UnSelected-' + facetFilter.name + '-' + option.name" 1117 :name="facetFilter.name" 1118 :value="option.value" 1119 :v-model="option.selected" 1120 :checked="option.selected" 1121 v-on:click="ToggleFilter(facetFilter.name,option)" /> 1122 <label :for="'UnSelected-' + facetFilter.name + '-' + option.name" class="custom-control-label"> 1123 {{option.label}} <span class="count">({{option.count}})</span> 1124 </label> 1125 </span> 1126 </template> 1127 </b-collapse> 1128 </div> 1129 </div> 1130 </template> 1131 </b-collapse> 1132 </aside> 1133 </script> 1134 <script type="text/x-template" id="add-to-basket-simple-template"> 1135 @{ 1136 string addToBasketSimplePrifix = "BuyButton "; 1137 } 1138 <div class="form-flex" v-if="renderBuy" v-bind:class="[{added: IsAdded}, {adding: IsAdding}, {disabled: !canAdd}]"> 1139 1140 <label for="quantity">@Translate(addToBasketSimplePrifix + "Quantity", "Quantity")</label> 1141 <input class="form-control" type="tel" name="quantity" v-model="quantity" autocomplete="off" onclick="this.setSelectionRange(0, this.value.length)"> 1142 <button :disabled="!canAdd" :class="buttonClass" v-on:click="addToBasketAndResetQuantity()" aria-label="@Translate(addToBasketSimplePrifix + "Add", "Add")"> 1143 <slot> 1144 <svg> 1145 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#shopping-cart"> 1146 </use> 1147 </svg> 1148 <span> 1149 @Translate(addToBasketSimplePrifix + "Add to basket", "Add to basket") 1150 </span> 1151 </slot> 1152 1153 </button> 1154 1155 <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> 1156 <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> 1157 <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> 1158 </div> 1159 </script> 1160 1161 <script type="text/x-template" id="quick-add-template"> 1162 @{ 1163 string quickAddPrifix = "BuyButton "; 1164 } 1165 <div v-bind:class="[{added: IsAdded}, {adding: IsAdding}]"> 1166 <label for="quantity">@Translate(quickAddPrifix + "Quantity", "Quantity")</label> 1167 <input class="form-control" type="number" id="quantity" name="quantity" v-model="quantity" autocomplete="off"> 1168 </div> 1169 </script> 1170 1171 <script type="text/x-template" id="add-to-basket-button-only-template"> 1172 @{ 1173 string addToBasketPrefix = "BuyButton "; 1174 } 1175 <div v-bind:class="[{added: IsAdded}, {adding: IsAdding}]"> 1176 <button :class="buttonClass" v-on:click="addToBasket()"> 1177 <slot> 1178 @Translate(addToBasketPrefix + "Add to basket", "Add to basket") 1179 </slot> 1180 </button> 1181 </div> 1182 </script> 1183 @using Dynamicweb.Frontend 1184 @using Tefcold.Web.CustomCode.Items 1185 @{ 1186 string asyncPrefix = "Async "; 1187 var website = PageView.Current().Area.GetWebsiteSettings(); 1188 } 1189 <script type="text/x-template" id="async-price-template"> 1190 <div :class="classType + (loading ? ' loading' : '') + (hasDiscount ? ' has-discount' : '')"> 1191 <template> 1192 <p :class="classType + '--error'" v-if="error">{{error}}</p> 1193 </template> 1194 <template v-if="!loading"> 1195 @if (!website.ShowPriceWitVatAndDiscount) 1196 { 1197 <template v-if="!forceAskForPrice && price.netUnitPrice.priceWithoutVat"> 1198 <meta itemprop="price" :content="price.netUnitPrice.priceWithoutVat" /> 1199 <meta itemprop="priceCurrency" content="@(Pageview.User?.Currency ?? Pageview.Area.EcomCurrencyId)" /> 1200 <div class="price-withoutvat"> 1201 <span class="price-label">@Translate(asyncPrefix + "price without vat", "Price without VAT")</span> 1202 <p class="price"> 1203 <span class="unit-price">{{ price.netUnitPrice.priceWithoutVat | currency(price.currencyCode) }}</span> 1204 </p> 1205 </div> 1206 </template> 1207 } 1208 @if (website.ShowPriceWitVatAndDiscount) 1209 { 1210 <template v-if="listView &&!forceAskForPrice && price.netUnitPrice.priceWithVat"> 1211 <meta itemprop="price" :content="price.netUnitPrice.priceWithVat" /> 1212 <meta itemprop="priceCurrency" content="@(Pageview.User?.Currency ?? Pageview.Area.EcomCurrencyId)" /> 1213 <div class="price-withoutvat"> 1214 <span class="price-label">@Translate(asyncPrefix + "price with vat", "Price with VAT")</span> 1215 <p class="price"> 1216 <span class="unit-price">{{ price.netUnitPrice.priceWithVat | currency(price.currencyCode) }}</span> 1217 <small class="prev-price" v-if="hasDiscount && price.unitPrice.priceWithVat">{{ price.unitPrice.priceWithVat | currency(price.currencyCode) }}</small> 1218 </p> 1219 </div> 1220 </template> 1221 <template v-if="!listView"> 1222 <template v-if="!forceAskForPrice && price.netUnitPrice.priceWithoutVat"> 1223 <meta itemprop="price" :content="price.netUnitPrice.priceWithoutVat" /> 1224 <meta itemprop="priceCurrency" content="@(Pageview.User?.Currency ?? Pageview.Area.EcomCurrencyId)" /> 1225 <div class="price-withoutvat"> 1226 <span class="price-label">@Translate(asyncPrefix + "price without vat", "Price without VAT")</span> 1227 <p class="price"> 1228 <span class="unit-price">{{ price.netUnitPrice.priceWithoutVat | currency(price.currencyCode) }}</span> 1229 @if (website.ShowPriceWitVatAndDiscount) 1230 { 1231 <small class="prev-price" v-if="hasDiscount && price.unitPrice.priceWithoutVat">{{ price.unitPrice.priceWithoutVat | currency(price.currencyCode) }}</small> 1232 } 1233 </p> 1234 </div> 1235 </template> 1236 <div class="price-withvat"> 1237 <span class="price-label">@Translate(asyncPrefix + "price with vat", "Price with VAT")</span> 1238 <p class="price"> 1239 <span class="unit-price">{{ price.netUnitPrice.priceWithVat | currency(price.currencyCode) }}</span> 1240 <small class="prev-price" v-if="hasDiscount && !listView && price.unitPrice.priceWithVat">{{ price.unitPrice.priceWithVat | currency(price.currencyCode) }}</small> 1241 </p> 1242 1243 </div> 1244 <div class="weee-fee" v-if="price.weeeFee && price.weeeFee > 0"> 1245 <span class="price-label">@Translate("Weee fee", "Weee fee")</span> 1246 <p class="price"> 1247 <span class="unit-price">{{ price.weeeFee | currency(price.currencyCode) }}</span> 1248 </p> 1249 1250 </div> 1251 </template> 1252 } 1253 </template> 1254 <template v-if="allowedHvac && (!price?.netUnitPrice?.priceWithoutVat || forceAskForPrice)"> 1255 <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> 1256 </template> 1257 <template v-else-if="!allowedHvac"> 1258 <a href="@NORRIQ.Common8.Razor.Navigation.GetUrlByNavigationTag("contact")" class="btn btn-outline-secondary btn-sm mt-3"> 1259 @Translate("create account", "Create account") 1260 </a> 1261 </template> 1262 </div> 1263 </script> 1264 <script type="text/x-template" id="pagination-template"> 1265 @{ 1266 string paginationPrefix = "Pagination "; 1267 } 1268 <nav aria-label="@Translate(paginationPrefix + "Productlist pagination", "Productlist pagination")"> 1269 <ul class="pagination"> 1270 <li :class="['page-item', currentPage == 1 ? 'disabled' : '' ]" v-if="currentPage > 1"> 1271 <a class="page-link" v-on:click="togglePrevPage()" aria-label="@Translate(paginationPrefix + "Previous Page", "Previous Page")" v-bind:aria-disabled="currentPage > 1 ? 'true' : null"> 1272 <svg> 1273 <use xmlns:xlink="http://www.w3.org/1999/xlink" 1274 xlink:href="/files/dist/icons/icons.svg#chevron-left"> 1275 </use> 1276 </svg> 1277 </a> 1278 </li> 1279 <template v-if="hasGroupId || true"> 1280 <li v-if="showPage(n)" v-for="n in totalPages" :key="n" :class="(n == currentPage ? 'page-item active' : 'page-item')"> 1281 <a v-on:click="togglePage(n)" v-bind:aria-current="(n == currentPage ? 'true' : '')" class="page-link"> 1282 {{n}} 1283 </a> 1284 </li> 1285 </template> 1286 <template v-else> 1287 <li class="page-item"> 1288 <span class="page-label"> 1289 {{currentPage}} 1290 </span> 1291 </li> 1292 <li class="page-item"> 1293 <span class="page-label"> 1294 @Translate(paginationPrefix + "of", "of") 1295 </span> 1296 </li> 1297 <li class="page-item"> 1298 <span class="page-label"> 1299 {{totalPages}} 1300 </span> 1301 </li> 1302 </template> 1303 <li :class="'page-item' + (currentPage >= totalPages ? ' disabled' : '')" v-if="currentPage < totalPages"> 1304 <a v-on:click="toggleNextPage()" aria-label="@Translate(paginationPrefix + "Next Page", "Next Page")" class="page-link" v-bind:aria-disabled="totalPages > currentPage ? 'true' : null"> 1305 <svg class="icon-pagination"> 1306 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#chevron-right"></use> 1307 </svg> 1308 </a> 1309 </li> 1310 </ul> 1311 </nav> 1312 </script> 1313 <script type="text/x-template" id="product-specification-list-view-template"> 1314 <div class="basic_listview-data"> 1315 <template v-if="!isSparePart"> 1316 <p itemprop="description"> 1317 {{ SpecificationHelpers.GetFirstSpecificationValueOrDefault('GrossNetVolume',productSpecifications)}} {{ SpecificationHelpers.GetSpecificationUnit(SpecificationHelpers.GetSpecificationByKey('GrossNetVolume',productSpecifications))}} 1318 <br /> 1319 {{ SpecificationHelpers.GetFirstSpecificationValueOrDefault('ExternalDimensionWeb',productSpecifications)}} 1320 1321 </p> 1322 </template> 1323 <p itemprop="sku">@Translate("PLP No.", "No.") {{productNumber}}</p> 1324 </div> 1325 </script> 1326 @using Tefcold.Web.CustomCode.Extensions 1327 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Ecommerce.ProductCatalog.ProductViewModel> 1328 <script type="text/x-template" id="product-spare-parts-view-template"> 1329 @{ 1330 string basicPimPrefix = "PDP "; 1331 } 1332 <div v-if="sparePartReportExist || hasExplodedDrawing || spareParts.length > 0"> 1333 <button class="btn-collapse" id="spareparts" v-b-toggle.spareparts-list> 1334 @Translate(basicPimPrefix + "spare parts", "Spare Parts") 1335 </button> 1336 <template> 1337 <b-collapse id="spareparts-list" accordion="specs2"> 1338 <template> 1339 <div class="body-collapse full pb-0"> 1340 <ul class="basic_pim-spares"> 1341 <template v-if="sparePartReportExist"> 1342 <li> 1343 <a href="#" v-on:click="getSparePartReport($event)" target="_blank"> 1344 <svg> 1345 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#download"></use> 1346 </svg> 1347 @Translate(basicPimPrefix + "spare part list", "Spare part list") 1348 </a> 1349 </li> 1350 </template> 1351 <li v-if="hasExplodedDrawing"> 1352 <a :href="explodedDrawing" target="_blank"> 1353 <svg> 1354 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#download"></use> 1355 </svg> 1356 @Translate(basicPimPrefix + "view exploded drawing of spare parts", "View exploded drawing of spare parts") 1357 </a> 1358 </li> 1359 <li :data-point="spare.product.position" class="basic_pim-spare" v-for="spare in spareParts"> 1360 <div class="head"> 1361 <a href="#" v-on:click="navigateToSpare($event,spare.product.id)" class="name">{{spare.product.productName}}</a> 1362 <p class="sku">{{spare.product.number}}</p> 1363 </div> 1364 1365 @if (Pageview.IsAllowedToShop()) 1366 { 1367 <div class="foot"> 1368 <async-price class-type="asyncprice-spare" 1369 :product="spare" 1370 :default-price="spare.product.price" 1371 list-price="true" 1372 :only-standard-price="@(Pageview.IsCurrentlyB2C().ToString().ToLower())" 1373 standard-customer="@(string.IsNullOrEmpty(Pageview.AreaSettings.GetString("StandardCustomer")) ? "" : Pageview.AreaSettings.GetString("StandardCustomer"))"> 1374 1375 </async-price> 1376 <add-to-basket-simple :product="spare" 1377 :unit-of-measure="'PCS'" 1378 :sparepart-location="sparepartLocation" 1379 button-class="btn btn-primary" 1380 class="addtobasketsimple-plp" 1381 :price-without-vat="spare.product.price" 1382 language-id="@Pageview.Area.EcomLanguageId" 1383 :only-spare-parts="@(Pageview.User.OnlySpareParts().ToString().ToLower())" 1384 :is-marketing-user="@(Pageview.User.OnlyView().ToString().ToLower())" 1385 :ishvasuser="@(Pageview.User.IsHVACUser().ToString().ToLower())" 1386 standard-customer="@(string.IsNullOrEmpty(Pageview.AreaSettings.GetString("StandardCustomer")) ? "" : Pageview.AreaSettings.GetString("StandardCustomer"))"> 1387 </add-to-basket-simple> 1388 </div> 1389 } 1390 @*<p>DEBUG: {{spare}}</p>*@ 1391 </li> 1392 1393 </ul> 1394 </div> 1395 </template> 1396 </b-collapse> 1397 </template> 1398 </div> 1399 1400 </script> 1401 <script type="text/x-template" id="variant-list-template"> 1402 <ul class="variants" v-if="initialVariant.product.hasVariants" > 1403 <li> 1404 <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"/> 1405 <label :for="'main-' + initialVariant.product.id" :style="getImageOrColor(initialVariant.product.variantImage,initialVariant.product.variantValue)"></label> 1406 </li> 1407 <li v-for="variant in initialVariant.product.simpleVariants"> 1408 <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" /> 1409 <label :for="'color-'+variant.product.id+ '-' + variant.product.variantId" :style="getImageOrColor(variant.product.variantImage,variant.product.variantValue)"> 1410 </label> 1411 </li> 1412 </ul> 1413 </script> 1414 @using Dynamicweb.Ecommerce.Frontend 1415 @using Dynamicweb.Ecommerce.International 1416 @using Newtonsoft.Json 1417 @using NORRIQ.SalesPersonLogin.Services 1418 @using Tefcold.Web.CustomCode.Items.Settings 1419 @using Tefcold.Web.CustomCode.Stocks.Helpers 1420 @{ 1421 string plpProductPrefix2 = "PLP "; 1422 } 1423 <script type="text/x-template" id="product-template"> 1424 1425 1426 <article itemscope itemtype="https://schema.org/Product" v-if="product.product" v-bind:key="product.product.number"> 1427 <span class="badge"> 1428 <img v-if="SpecificationHelpers.GetFirstSpecificationValueOrDefault('StickersDKNews',product.specifications)" :src="'/Admin/Public/GetImage.ashx?Height=50&amp;Compression=85&amp;Image=' + SpecificationHelpers.GetFirstSpecificationValueOrDefault('StickersDKNews',product.specifications)" alt="@Translate(basicPimPrefix + "Sticker", "Sticker")" v-bind:alt="product.product.name" itemprop="image" class="img-fluid" /> 1429 <img v-else-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" /> 1430 </span> 1431 <a :href="product.product.url" itemprop="url"> 1432 <figure style="min-height: 1px;"> 1433 1434 <img v-if="SpecificationHelpers.GetFirstSpecificationValueOrDefault('WebPrimaryImage',product.specifications)" :src="'/Admin/Public/GetImage.ashx?Width=427&amp;Height=427&amp;Compression=85&amp;Crop=5&amp;Format=webp&amp;Quality=85&amp;fillcanvas=true&amp;Image=' + SpecificationHelpers.GetFirstSpecificationValueOrDefault('WebPrimaryImage',product.specifications)" 1435 v-bind:alt="product.product.name" itemprop="image" class="img-fluid" /> 1436 <img v-if="!SpecificationHelpers.GetFirstSpecificationValueOrDefault('WebPrimaryImage',product.specifications)" :src="'/Admin/Public/GetImage.ashx?Width=427&amp;Height=427&amp;Compression=85&amp;Crop=5&amp;Format=webp&amp;Quality=85&amp;fillcanvas=true&amp;Image=/Files/Images/default.jpg'" 1437 v-bind:alt="product.product.name" itemprop="image" class="img-fluid" /> 1438 </figure> 1439 <header> 1440 <h1 itemprop="name">{{product.product.name}}</h1> 1441 <p itemprop="category">{{product.product.shortDescription}}</p> 1442 <div class="flex-list"> 1443 <product-specification-list-view :product-specifications="product.specifications" 1444 :product-number="product.product.number" 1445 :is-spare-part="product.product.isSparePart"> 1446 </product-specification-list-view> 1447 @if (Pageview.IsAllowedToShop()) 1448 { 1449 <template v-if="plpClass=='basic_listview-grid'"> 1450 <buying-component inline-template :selected-product="product" :initial-product="initialProduct"> 1451 <template v-if="SpecificationHelpers.GetFirstSpecificationValueOrDefault('EnergyArrow',selectedProduct.specifications)"> 1452 <div class="energy-data"> 1453 <a :href="SpecificationHelpers.GetFirstSpecificationValueOrDefault('EnergyLabel',selectedProduct.specifications)" target="_blank" class="energy-label"> 1454 <img :src="SpecificationHelpers.GetFirstSpecificationValueOrDefault('EnergyArrow',selectedProduct.specifications)" alt="Energy Label" class="img-fluid img-energy" height="25" /> 1455 </a> 1456 <a href="#" v-on:click="getProductReport($event,selectedProduct.product.number,selectedProduct.product.name,selectedProduct.product.languageId)" target="_blank" class="energy-link"> 1457 <small>@Translate("PDP product sheet", "Product Sheet")</small> 1458 </a> 1459 </div> 1460 </template> 1461 </buying-component> 1462 </template> 1463 } 1464 </div> 1465 </header> 1466 </a> 1467 <template v-if="plpClass=='basic_listview-list'"> 1468 <ul class="basic_listview-specs"> 1469 <li v-for="item in SpecificationHelpers.GetPrettyBulletPoints(product.specifications)"> 1470 {{item}} 1471 </li> 1472 </ul> 1473 @*{{ product.Product.LongDescription }}*@ 1474 </template> 1475 1476 1477 @if (!Pageview.IsAllowedToShop()) 1478 { 1479 <footer> 1480 1481 <template v-if="SpecificationHelpers.GetFirstSpecificationValueOrDefault('EnergyArrow',product.specifications)"> 1482 <buying-component inline-template :selected-product="product" :initial-product="initialProduct"> 1483 <div class="energy-price"> 1484 <div class="variant-price"> 1485 <variant-list :initial-variant="initialProduct" :currently-selected="selectedProduct" class="mr-2"></variant-list> 1486 1487 <a href="@NORRIQ.Common8.Razor.Navigation.GetUrlByNavigationTag("contact")" class="btn btn-outline-secondary btn-sm ml-auto" style="white-space:nowrap;"> 1488 @Translate("create account", "Create account") 1489 </a> 1490 1491 </div> 1492 <div class="energy-data"> 1493 <a :href="SpecificationHelpers.GetFirstSpecificationValueOrDefault('EnergyLabel',selectedProduct.specifications)" class="energy-label" target="_blank"> 1494 <img :src="SpecificationHelpers.GetFirstSpecificationValueOrDefault('EnergyArrow',selectedProduct.specifications)" alt="Energy Label" class="img-fluid img-energy" height="25" /> 1495 </a> 1496 <a href="#" v-on:click="getProductReport($event,selectedProduct.product.number,selectedProduct.product.name,selectedProduct.product.languageId)" target="_blank" class="energy-link"> 1497 <small>@Translate("PDP product sheet", "Product Sheet")</small> 1498 </a> 1499 </div> 1500 </div> 1501 </buying-component> 1502 </template> 1503 <template v-else> 1504 <buying-component inline-template :selected-product="product" :initial-product="initialProduct"> 1505 <div class="energy-price"> 1506 <div class="variant-price"> 1507 <variant-list :initial-variant="initialProduct" :currently-selected="selectedProduct" class="mr-2"></variant-list> 1508 1509 <a href="@NORRIQ.Common8.Razor.Navigation.GetUrlByNavigationTag("contact")" class="btn btn-outline-secondary btn-sm ml-auto" style="white-space:nowrap;"> 1510 @Translate("create account", "Create account") 1511 </a> 1512 1513 </div> 1514 </div> 1515 1516 </buying-component> 1517 </template> 1518 </footer> 1519 } 1520 else 1521 { 1522 <buying-component inline-template :selected-product="product" :plp-class="plpClass" :initial-product="initialProduct"> 1523 <footer itemprop="offers" itemscope="" itemtype="https://schema.org/Offer"> 1524 1525 <template v-if="SpecificationHelpers.GetFirstSpecificationValueOrDefault('EnergyArrow',selectedProduct.specifications) && plpClass == 'basic_listview-list'"> 1526 <div class="energy-price"> 1527 <div class="variant-price"> 1528 <variant-list :initial-variant="initialProduct" :currently-selected="selectedProduct"></variant-list> 1529 <async-price class-type="asyncprice-plp" 1530 :product="selectedProduct" 1531 :default-price="selectedProduct.product.defaultPrice.priceWithoutVat" 1532 :only-standard-price="@(Pageview.IsCurrentlyB2C().ToString().ToLower())" 1533 list-price="true" 1534 :should-emit-warranties="@((Pageview.IsAllowedToShop()).ToString().ToLower())" 1535 standard-customer="@(string.IsNullOrEmpty(Pageview.AreaSettings.GetString("StandardCustomer")) ? "" : Pageview.AreaSettings.GetString("StandardCustomer"))"> 1536 </async-price> 1537 </div> 1538 <div class="energy-data"> 1539 <a :href="SpecificationHelpers.GetFirstSpecificationValueOrDefault('EnergyLabel',selectedProduct.specifications)" class="energy-label" target="_blank"> 1540 <img :src="SpecificationHelpers.GetFirstSpecificationValueOrDefault('EnergyArrow',selectedProduct.specifications)" alt="Energy Label" class="img-fluid img-energy" height="25" /> 1541 </a> 1542 <a href="#" v-on:click="getProductReport($event,selectedProduct.product.number,selectedProduct.product.name,selectedProduct.product.languageId)" target="_blank" class="energy-link"> 1543 <small>@Translate("PDP product sheet", "Product Sheet")</small> 1544 </a> 1545 </div> 1546 </div> 1547 </template> 1548 <template v-else> 1549 <div class="variant-price"> 1550 <variant-list :initial-variant="initialProduct" :currently-selected="selectedProduct"></variant-list> 1551 <async-price class-type="asyncprice-plp" 1552 :product="selectedProduct" 1553 :default-price="selectedProduct.product.defaultPrice.priceWithoutVat" 1554 :only-standard-price="@(Pageview.IsCurrentlyB2C().ToString().ToLower())" 1555 list-price="true" 1556 :should-emit-warranties="@((Pageview.IsAllowedToShop()).ToString().ToLower())" 1557 standard-customer="@(string.IsNullOrEmpty(Pageview.AreaSettings.GetString("StandardCustomer")) ? "" : Pageview.AreaSettings.GetString("StandardCustomer"))"> 1558 </async-price> 1559 </div> 1560 </template> 1561 1562 <stock-location-component inline-template :remote-stock-shop-ids='@JsonConvert.SerializeObject(websiteSettings.ExternalShopIds)' not-in-stock-text='@Translate("PLP not in stock text", "N/A")' :default-stock-units='selectedProduct.product.stockUnits' :default-remote-stock-units='selectedProduct.product.remoteStock' :product='selectedProduct' :earliest-harbor-arrival-date='selectedProduct.product.EarliestHarborArrival'> 1563 <div class="stockscontainer"> 1564 <template v-if="stockUnits.length > 0 && !loading"> 1565 <div v-for="unit in stockUnits" class="stocks"> 1566 <span style="font-size: 1px">{{unit.quantity}}</span> 1567 <small v-if="stocksHasNoQuantity" class="outofstock"> 1568 {{ unit.stockLocation.description }} {{ GetStockAmountString(unit.quantity) }} 1569 </small> 1570 <small v-else class="instock"> 1571 {{ unit.stockLocation.description }} {{ GetStockAmountString(unit.quantity) }} @Translate("PLP In Stock", "In Stock") 1572 </small> 1573 </div> 1574 </template> 1575 <template v-if="remoteStockUnits.length > 0 && !loading"> 1576 <div v-for="remoteunit in remoteStockUnits" class="stocks"> 1577 <span style="font-size: 1px">{{remoteunit.quantity}}</span> 1578 <small v-if="remoteStocksHasNoQuantity" class="outofstock"> 1579 {{ remoteunit.stockLocation.description }} {{ GetStockAmountString(remoteunit.Quantity) }} 1580 </small> 1581 <small v-else class="instock"> 1582 {{ remoteunit.stockLocation.description }} {{ GetStockAmountString(remoteunit.quantity) }} @Translate("PLP In Stock", "In Stock") 1583 </small> 1584 </div> 1585 </template> 1586 </div> 1587 </stock-location-component> 1588 1589 <div class="plp-buttons"> 1590 <div class="btn-group"> 1591 <add-to-compare :product-number="selectedProduct.product.number"></add-to-compare> 1592 @if (Pageview.IsCurrentlyB2B()) 1593 { 1594 <favorite-lists ui-error-message-translation="@Translate(plpProductPrefix2 + " Error while retrieving favorite list","Error while retrieving favorite list")" :is-favorite-mode="@NORRIQ.Common8.Razor.Navigation.GetPageIdByNavigationTag("favorites") == @Pageview.ID" :product="selectedProduct"></favorite-lists> 1595 } 1596 </div> 1597 <add-to-basket-simple :product="selectedProduct" 1598 :unit-of-measure="'PCS'" 1599 button-class="btn btn-primary" 1600 class="addtobasketsimple-plp" 1601 :price-without-vat="currentItemPriceWithoutVat" 1602 language-id="@Pageview.Area.EcomLanguageId" 1603 :only-spare-parts="@(Pageview.User.OnlySpareParts().ToString().ToLower())" 1604 :is-marketing-user="@(Pageview.User.OnlyView().ToString().ToLower())" 1605 :ishvasuser="@(Pageview.User.IsHVACUser().ToString().ToLower())" 1606 standard-customer="@(string.IsNullOrEmpty(Pageview.AreaSettings.GetString("StandardCustomer")) ? "" : Pageview.AreaSettings.GetString("StandardCustomer"))"> 1607 </add-to-basket-simple> 1608 </div> 1609 </footer> 1610 </buying-component> 1611 } 1612 1613 </article> 1614 1615 </script> 1616 <script type="text/x-template" id="product-template-cz"> 1617 @{ 1618 string plpProductPrefix = "PLP "; 1619 } 1620 <article itemscope itemtype="https://schema.org/Product" v-if="product.product" v-bind:key="product.product.number"> 1621 <span class="stickers"> 1622 <template v-if="SpecificationHelpers.GetFirstSpecificationValueOrDefault('StickersCZNews',product.specifications)"> 1623 <img :src="'/Admin/Public/GetImage.ashx?Height=24&amp;Compression=85&amp;Image=' + SpecificationHelpers.GetFirstSpecificationValueOrDefault('StickersCZNews',product.specifications)" 1624 alt="@Translate(basicPimPrefix + "Sticker", "Sticker")" 1625 class="img-fluid" /> 1626 </template> 1627 <template v-else-if="SpecificationHelpers.GetFirstSpecificationValueOrDefault('StickersCZ',product.specifications)"> 1628 <img :src="'/Admin/Public/GetImage.ashx?Height=24&amp;Compression=85&amp;Image=' + SpecificationHelpers.GetFirstSpecificationValueOrDefault('StickersCZ',product.specifications)" 1629 alt="@Translate(basicPimPrefix + "Sticker", "Sticker")" 1630 class="img-fluid" /> 1631 </template> 1632 <span v-if="ShowDiscount" class="sticker discount"> 1633 -{{discount}}% 1634 </span> 1635 </span> 1636 <a :href="product.product.url" itemprop="url" :title="['@Translate(plpProductPrefix + "More info about", "More info about") ' + product.product.name]"> 1637 <figure style="min-height: 1px;"> 1638 1639 <img v-if="SpecificationHelpers.GetFirstSpecificationValueOrDefault('WebPrimaryImage',product.specifications)" :src="'/Admin/Public/GetImage.ashx?Width=427&amp;Height=427&amp;Compression=85&amp;Crop=5&amp;Format=webp&amp;Quality=85&amp;fillcanvas=true&amp;Image=' + SpecificationHelpers.GetFirstSpecificationValueOrDefault('WebPrimaryImage',product.specifications)" 1640 v-bind:alt="product.product.name" itemprop="image" class="img-fluid" /> 1641 <img v-if="!SpecificationHelpers.GetFirstSpecificationValueOrDefault('WebPrimaryImage',product.specifications)" :src="'/Admin/Public/GetImage.ashx?Width=427&amp;Height=427&amp;Compression=85&amp;Crop=5&amp;Format=webp&amp;Quality=85&amp;fillcanvas=true&amp;Image=/Files/Images/default.jpg'" 1642 v-bind:alt="product.product.name" itemprop="image" class="img-fluid" /> 1643 </figure> 1644 <header> 1645 <h1 itemprop="name">{{product.product.name}}</h1> 1646 <p itemprop="category">{{product.product.shortDescription}}</p> 1647 <div class="flex-list"> 1648 <product-specification-list-view :product-specifications="product.specifications" 1649 :product-number="product.product.number" 1650 :is-spare-part="product.product.isSparePart"> 1651 </product-specification-list-view> 1652 <template v-if="plpClass=='basic_listview-grid'"> 1653 <buying-component inline-template :selected-product="product" :initial-product="initialProduct"> 1654 <template v-if="SpecificationHelpers.GetFirstSpecificationValueOrDefault('EnergyArrow',selectedProduct.specifications)"> 1655 <div class="energy-data"> 1656 <a :href="SpecificationHelpers.GetFirstSpecificationValueOrDefault('EnergyLabel',selectedProduct.specifications)" target="_blank" class="energy-label"> 1657 <img :src="SpecificationHelpers.GetFirstSpecificationValueOrDefault('EnergyArrow',selectedProduct.specifications)" alt="Energy Label" class="img-fluid img-energy" height="25" /> 1658 </a> 1659 <a href="#" v-on:click="getProductReport($event,selectedProduct.product.number,selectedProduct.product.name,selectedProduct.product.languageId)" target="_blank" class="energy-link"> 1660 <small>@Translate("PDP product sheet", "Product Sheet")</small> 1661 </a> 1662 </div> 1663 </template> 1664 </buying-component> 1665 </template> 1666 </div> 1667 </header> 1668 </a> 1669 <template v-if="plpClass=='basic_listview-list'"> 1670 <ul class="basic_listview-specs"> 1671 <li v-for="item in SpecificationHelpers.GetPrettyBulletPoints(product.specifications)"> 1672 {{item}} 1673 </li> 1674 </ul> 1675 </template> 1676 <buying-component @@discount="onDiscount($event)" inline-template :selected-product="product" :plp-class="plpClass" :initial-product="initialProduct"> 1677 <footer itemprop="offers" itemscope="" itemtype="https://schema.org/Offer"> 1678 1679 <template v-if="SpecificationHelpers.GetFirstSpecificationValueOrDefault('EnergyArrow',selectedProduct.specifications) && plpClass == 'basic_listview-list'"> 1680 <div class="energy-price"> 1681 <div class="variant-price"> 1682 <variant-list :initial-variant="initialProduct" :currently-selected="selectedProduct"></variant-list> 1683 <async-price class-type="asyncprice-plp" 1684 :product="selectedProduct" 1685 :default-price="selectedProduct.product.defaultPrice.priceWithoutVat" 1686 :only-standard-price="@(Pageview.IsCurrentlyB2C().ToString().ToLower())" 1687 list-price="true" 1688 :should-emit-warranties="@((Pageview.IsAllowedToShop()).ToString().ToLower())" 1689 standard-customer="@(string.IsNullOrEmpty(Pageview.AreaSettings.GetString("StandardCustomer")) ? "" : Pageview.AreaSettings.GetString("StandardCustomer"))" 1690 @@discount="onDiscount($event)" 1691 :list-view="true"> 1692 </async-price> 1693 </div> 1694 <div class="energy-data"> 1695 <a :href="SpecificationHelpers.GetFirstSpecificationValueOrDefault('EnergyLabel',selectedProduct.specifications)" class="energy-label" target="_blank"> 1696 <img :src="SpecificationHelpers.GetFirstSpecificationValueOrDefault('EnergyArrow',selectedProduct.specifications)" alt="Energy Label" class="img-fluid img-energy" height="25" /> 1697 </a> 1698 <a href="#" v-on:click="getProductReport($event,selectedProduct.product.number,selectedProduct.product.name,selectedProduct.product.languageId)" target="_blank" class="energy-link"> 1699 <small>@Translate("PDP product sheet", "Product Sheet")</small> 1700 </a> 1701 </div> 1702 </div> 1703 </template> 1704 <template v-else> 1705 <div class="variant-price"> 1706 <variant-list :initial-variant="initialProduct" :currently-selected="selectedProduct"></variant-list> 1707 <async-price class-type="asyncprice-plp" 1708 :product="selectedProduct" 1709 :default-price="selectedProduct.product.defaultPrice.priceWithoutVat" 1710 :only-standard-price="@(Pageview.IsCurrentlyB2C().ToString().ToLower())" 1711 list-price="true" 1712 :should-emit-warranties="@((Pageview.IsAllowedToShop()).ToString().ToLower())" 1713 standard-customer="@(string.IsNullOrEmpty(Pageview.AreaSettings.GetString("StandardCustomer")) ? "" : Pageview.AreaSettings.GetString("StandardCustomer"))" 1714 @@discount="onDiscount($event)" 1715 :list-view="true"> 1716 </async-price> 1717 </div> 1718 </template> 1719 1720 <stock-location-component inline-template :remote-stock-shop-ids='@JsonConvert.SerializeObject(websiteSettings.ExternalShopIds)' not-in-stock-text='@Translate("PLP not in stock text", "N/A")' :default-stock-units='selectedProduct.product.stockUnits' :default-remote-stock-units='selectedProduct.product.remoteStock' :product='selectedProduct' :earliest-harbor-arrival-date='selectedProduct.product.EarliestHarborArrival'> 1721 <div class="stockscontainer"> 1722 <template v-if="stockUnits.length > 0 && !loading"> 1723 <div v-for="unit in stockUnits" class="stocks"> 1724 <span style="font-size: 1px">{{unit.quantity}}</span> 1725 <small v-if="stocksHasNoQuantity" class="outofstock"> 1726 {{ unit.stockLocation.description }} {{ GetStockAmountString(unit.quantity) }} 1727 </small> 1728 <small v-else class="instock"> 1729 {{ unit.stockLocation.description }} {{ GetStockAmountString(unit.quantity) }} @Translate("PLP In Stock", "In Stock") 1730 </small> 1731 </div> 1732 </template> 1733 <template v-if="remoteStockUnits.length > 0 && !loading"> 1734 <div v-for="remoteunit in remoteStockUnits" class="stocks"> 1735 <span style="font-size: 1px">{{remoteunit.quantity}}</span> 1736 <small v-if="remoteStocksHasNoQuantity" class="outofstock"> 1737 {{ remoteunit.stockLocation.description }} {{ GetStockAmountString(remoteunit.Quantity) }} 1738 </small> 1739 <small v-else class="instock"> 1740 {{ remoteunit.stockLocation.description }} {{ GetStockAmountString(remoteunit.quantity) }} @Translate("PLP In Stock", "In Stock") 1741 </small> 1742 </div> 1743 </template> 1744 </div> 1745 </stock-location-component> 1746 1747 <div class="btn-group"> 1748 <add-to-compare :product-number="selectedProduct.product.number"></add-to-compare> 1749 @if (Pageview.IsCurrentlyB2B()) 1750 { 1751 <favorite-lists ui-error-message-translation="@Translate(plpProductPrefix + " Error while retrieving favorite list","Error while retrieving favorite list")" :is-favorite-mode="@NORRIQ.Common8.Razor.Navigation.GetPageIdByNavigationTag("favorites") == @Pageview.ID" :product="selectedProduct"></favorite-lists> 1752 } 1753 </div> 1754 <add-to-basket-simple :product="selectedProduct" 1755 :unit-of-measure="'PCS'" 1756 button-class="btn btn-primary" 1757 class="addtobasketsimple-plp" 1758 :price-without-vat="currentItemPriceWithoutVat" 1759 language-id="@Pageview.Area.EcomLanguageId" 1760 :only-spare-parts="@(Pageview.User.OnlySpareParts().ToString().ToLower())" 1761 :is-marketing-user="@(Pageview.User.OnlyView().ToString().ToLower())" 1762 :ishvasuser="@(Pageview.User.IsHVACUser().ToString().ToLower())" 1763 standard-customer="@(string.IsNullOrEmpty(Pageview.AreaSettings.GetString("StandardCustomer")) ? "" : Pageview.AreaSettings.GetString("StandardCustomer"))"> 1764 </add-to-basket-simple> 1765 </footer> 1766 </buying-component> 1767 </article> 1768 </script> 1769 <script type="text/x-template" id="quick-search-template"> 1770 <div class="quicksearch-component"> 1771 <div class="quickorder-form"> 1772 <slot name="right-box"></slot> 1773 <div class="quickorder-box"> 1774 <h2>@Translate("Find products")</h2> 1775 <div class="quickorder-input"> 1776 <label for="quickOrderSearch">@Translate("Product name or number")</label> 1777 <input type="text" 1778 :id="id" 1779 v-model="search" 1780 @@keydown.enter="enter" 1781 @@keydown.down="down" 1782 @@keydown.up="up" 1783 @@input="onSearchInput" 1784 class="form-control form-control-lg" 1785 autocomplete="chrome-off" 1786 placeholder="@Translate("Quick order search term")" 1787 :disabled="disabled"/> 1788 <label for="quickOrderQty">@Translate("Quantity")</label> 1789 <input type="number" 1790 v-model.number="quantity" 1791 @@change="chosenProduct()" 1792 @@keydown.enter="chosenProduct()" 1793 class="form-control form-control-lg" 1794 id="quickOrderQty" 1795 placeholder="0" 1796 autocomplete="chrome-off" 1797 :disabled="disabled"/> 1798 1799 </div> 1800 <ul v-if="filterList.length > 0 && open" class="quickorder-list"> 1801 <li v-for="(product,index) in filterList" 1802 :class="{'active': isSelected(index)}"> 1803 <button @@click="suggestClick(index)"> 1804 {{concatNameAndNumber(product)}} 1805 </button> 1806 1807 </li> 1808 </ul> 1809 1810 <div class="quickorder-product" v-if="currentChosenProduct"> 1811 <p><strong>{{currentChosenProduct.name}}</strong><small>{{currentChosenProduct.shortDescription}}</small></p> 1812 <product-specification-list-view v-if="searchProductSpecs !== null" 1813 :product-specifications="searchProductSpecs" 1814 :product-number="currentChosenProduct.number"> 1815 </product-specification-list-view> 1816 <async-price class-type="quickorder-product-price" 1817 :product="currentChosenProduct" 1818 unit-of-measure="" 1819 :only-price="true" 1820 default-price-without-vat="0" 1821 @@price="handlePriceUpdate" 1822 standard-customer="@(string.IsNullOrEmpty(Pageview.AreaSettings.GetString("StandardCustomer")) ? "" : Pageview.AreaSettings.GetString("StandardCustomer"))"> 1823 </async-price> 1824 </div> 1825 </div> 1826 </div> 1827 <p v-if="showPriceError">@Translate("QuickOrderZeroPriceError","Can not add product with zero price")</p> 1828 <div class="quickorder-cart" v-if="productsToOrder.length > 0"> 1829 <table class="table table-striped table-flex"> 1830 <thead> 1831 <tr> 1832 <th>@Translate("Product")</th> 1833 <th>@Translate("Specifications")</th> 1834 <th>@Translate("Quantity")</th> 1835 <th class="cell-right">@Translate("Price")</th> 1836 <th>&nbsp;</th> 1837 </tr> 1838 </thead> 1839 <tbody> 1840 <tr v-for="(product,index) in productsToOrder"> 1841 <td class="cell-prod"> 1842 <strong>{{product.name}}</strong> 1843 <small>{{product.shortDescription}}</small> 1844 </td> 1845 <td class="cell-specs"> 1846 <product-specification-list-view :product-specifications="product.productSpecifications" 1847 :product-number="product.number"> 1848 </product-specification-list-view> 1849 </td> 1850 <td class="cell-specs"> 1851 <input class="form-control" type="number" v-model="product.quantity" @@input="updateQuantity()" /> 1852 </td> 1853 <td class="cell-price cell-right"> 1854 <async-price class-type="quickorder-product-price" 1855 :product="quickOrderProductToSimpleProduct(product)" 1856 unit-of-measure="" 1857 :only-price="true" 1858 default-price-without-vat="0" 1859 :should-emit-warranties="true" 1860 @@qo-warranty-update="setWarranty($event,product)" 1861 standard-customer="@(string.IsNullOrEmpty(Pageview.AreaSettings.GetString("StandardCustomer")) ? "" : Pageview.AreaSettings.GetString("StandardCustomer"))"> 1862 1863 </async-price> 1864 </td> 1865 <td class="cell-trash"> 1866 <button @@click="removeOrderline(index)" aria-label="@Translate("Delete product")" class="text-danger"> 1867 <svg> 1868 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#trash-alt"></use> 1869 </svg> 1870 </button> 1871 </td> 1872 </tr> 1873 </tbody> 1874 </table> 1875 <slot name="button"></slot> 1876 1877 </div> 1878 </div> 1879 </script> 1880 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 1881 @{ 1882 //This template contains everything for the favoritelist items. 1883 string favoriteListPrefix = "FavoriteList "; 1884 } 1885 <span id="favoritelistitem_confirm_delete_on_all" style="display: none; visibility: hidden">@Translate(favoriteListPrefix + "_confirm_delete_all", "Er du sikker på at du vil fjerne produktet {0} fra alle lister ?")</span> 1886 1887 <script type="text/x-template" id="favorite-item-template"> 1888 <div class="custom-control custom-checkbox"> 1889 <input type="checkbox" :checked="isActive" v-on:change="toggleItem()" :id="'fav-' +favoriteList.id" class="custom-control-input" /> 1890 <label :for="'fav-' + favoriteList.id" class="custom-control-label"> 1891 {{favoriteList.name}} 1892 </label> 1893 1894 @*<input type="checkbox" :value="favoriteList.id" :checked="isItemAddedToThisList(favoriteList)" v-on:change="toggleItem($event, favoriteList.id)" class="form-check-input" /> 1895 <label :for="'fav-' + favoriteList.id" class="form-check-label"> 1896 {{favoriteList.name}} 1897 </label>*@ 1898 </div> 1899 </script> 1900 <!-- 1901 1902 <button class="btn btn-favorite favorite" title="Add to favorite" aria-label="@Translate("Favorite", "Favorite" )" v-on:click="toggleItem()"> 1903 <svg> 1904 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#snowflake"></use> 1905 </svg> 1906 </button> 1907 --> 1908 <script type="text/x-template" id="favorite-list-template"> 1909 <div class="fav"> 1910 <button :aria-controls="'favorite' + product.product.id" :class="['btn btn-favorite', {'is-open': showingMenu}, {'is-selected': isActive}]" aria-label="@Translate(favoriteListPrefix + "Favorite", "Favorite" )" :title="isActive ? '@Translate(favoriteListPrefix + "Remove from favorites","Remove from favorites")' : '@Translate(favoriteListPrefix + "Add to favorites","Add to favorites")'" v-on:click="toggleItem()"> 1911 <svg> 1912 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#snowflake"></use> 1913 </svg> 1914 </button> 1915 <div class="fav-overlay" v-autoClose.nonPath="closeToggle" :id="'favorite' + product.product.id"> 1916 <div class="fav-arrow" v-if="showingMenu"></div> 1917 <div class="fav-inwrap" v-if="showingMenu"> 1918 <template v-if="loading"> 1919 <div class="text-center"> 1920 <span class="spinner-md-default"></span> 1921 </div> 1922 </template> 1923 <em class="error" v-if="uiErrorMessage">{{uiErrorMessage}}</em> 1924 <template v-if="!loading && !uiErrorMessage"> 1925 <p class="fav-title">@Translate(favoriteListPrefix + "Favoritliste", "Favoritliste")</p> 1926 <template v-if="favoriteLists && favoriteLists.length > '0'"> 1927 <p class="fav-teaser"> 1928 @Translate(favoriteListPrefix + "Tilføj eller fjern markering.", "Tilføj eller fjern markering.") 1929 </p> 1930 <div class="fav-lists"> 1931 <favorite-item v-for="favoriteList in favoriteLists" :favorite-list="favoriteList" :product="product" :key="favoriteList.id" /> 1932 </div> 1933 <div class="fav-new"> 1934 <div class="custom-control custom-checkbox"> 1935 <input type="checkbox" v-model="addNewList" id="addNewListCheckbox" class="custom-control-input" /> 1936 <label for="addNewListCheckbox" class="custom-control-label"> 1937 @Translate(favoriteListPrefix + "Ny favoritliste", "Ny favoritliste") 1938 </label> 1939 </div> 1940 </div> 1941 <div v-if="addNewList" class="fav-form"> 1942 <label for="addNewListNameInput" class="sr-only">@Translate(favoriteListPrefix + "Navn", "Navn")</label> 1943 <input type="text" id="addNewListNameInput" v-model="addNewListNameInput" class="form-control form-control-sm new-list-name-input" placeholder="@Translate(favoriteListPrefix + "Navn", "Navn")" v-on:keyup.enter="saveAsNewList" /> 1944 <button v-on:click="saveAsNewList" class="btn btn-secondary btn-sm">@Translate(favoriteListPrefix + "Gem", "Gem")</button> 1945 </div> 1946 </template> 1947 <template v-else> 1948 <p class="fav-teaser">@Translate(favoriteListPrefix + "NoFavoritliste", "Du har endnu ingen favoritlister, angiv navn for at oprette en.")</p> 1949 <div class="fav-form"> 1950 <label for="addNewListNameInput" class="sr-only">@Translate(favoriteListPrefix + "Navn", "Navn")</label> 1951 <input type="text" id="addNewListNameInput" v-model="addNewListNameInput" class="form-control form-control-sm new-list-name-input" placeholder="@Translate(favoriteListPrefix + "Navn", "Navn")" v-on:keyup.enter="saveAsNewList" /> 1952 <button v-on:click="saveAsNewList" class="btn btn-secondary btn-sm">@Translate(favoriteListPrefix + "Gem", "Gem")</button> 1953 </div> 1954 </template> 1955 </template> 1956 </div> 1957 </div> 1958 </div> 1959 </script> 1960 1961 <script type="text/x-template" id="basic-range-slider-template"> 1962 @{ 1963 string rangeFacetPrefix = "Filter "; 1964 } 1965 <div class="facet-option"> 1966 <vue-slider :key="key" @@drag-end="onChange" @@click="onChange" :min-range="1" v-model="value" :dotSize="20" :min="min" :max="max" :clickable="false"></vue-slider> 1967 <div class="vue-slider-fields"> 1968 <div class="form-group"> 1969 <label for="minValue" class="sr-only">@Translate(rangeFacetPrefix + "Minimum Value", "Minimum Value")</label> 1970 <input class="form-control form-control-sm" type="number" @@blur="onChange" id="minValue" name="minValue" v-model="minValue" /> 1971 </div> 1972 <div class="form-group"> 1973 <label for="maxValue" class="sr-only">@Translate(rangeFacetPrefix + "Maximum Value", "Maximum Value")</label> 1974 <input class="form-control form-control-sm" type="number" @@blur="onChange" id="maxValue" name="maxValue" v-model="maxValue" /> 1975 </div> 1976 </div> 1977 </div> 1978 </script> 1979 1980 1981 1982 <script type="text/x-template" id="add-compare-template"> 1983 <button @@click="onClick" :class="['btn btn-compare', {'is-selected':isInCompare}]" :title="[isInCompare ? '@Translate(plpProductPrefix + "Remove from Compare", "Remove from Compare")' : '@Translate(plpProductPrefix + "Add to compare", "Add to compare")']"> 1984 <svg> 1985 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#balance-scale"></use> 1986 </svg> 1987 </button> 1988 </script> 1989 @using Dynamicweb.Frontend 1990 @{ 1991 string instantSearchPrefix = "InstantSearch "; 1992 } 1993 <script type="text/x-template" id="instant-search-template"> 1994 <form v-bind:class="baseClass" action="@NORRIQ.Common8.Razor.Navigation.GetUrlByNavigationTag("searchresult")" v-autoClose="closeFoldOut"> 1995 <div class="basic_instantsearch"> 1996 <label for="searchTerm" class="sr-only">@Translate(instantSearchPrefix + "Search", "Search")</label> 1997 <input type="search" 1998 placeholder="@Translate(instantSearchPrefix + "Search", "Search")" 1999 id="searchTerm" 2000 name="search" 2001 autocomplete="off" 2002 v-model="searchTerm" 2003 @*v-on:focus="openSearch"*@ 2004 @*v-on:blur="closeFoldOut()"*@ 2005 autofocus> 2006 <button type="submit"> 2007 <span class="sr-only">@Translate(instantSearchPrefix + "Search", "Search")</span> 2008 <svg> 2009 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/Files/dist/icons/icons.svg#search"></use> 2010 </svg> 2011 </button> 2012 <div class="fold-out" id="fold-popup" aria-controls="fold-popup" v-bind:class="{ active: foldActive && showResults, 'has-results': showResults }" v-auto-close> 2013 <template v-if="searchTerm == null"> 2014 <p class="search-string">@Translate(instantSearchPrefix + "Type something", "Type something")</p> 2015 </template> 2016 <template v-else-if="queryLoading"> 2017 <div class="is-loading"> 2018 <span class="spinner-lg-default"></span> 2019 </div> 2020 </template> 2021 <template v-else-if="!showResults"> 2022 <p class="search-string"> 2023 @Translate(instantSearchPrefix + "Empty search...", "Empty search...") 2024 </p> 2025 </template> 2026 <div class="fold-out-grid" v-else> 2027 <div class="fold-out-col is-content"> 2028 <ul v-if="groups?.length>0" class="fold-out-content"> 2029 <li> 2030 <strong>@Translate(instantSearchPrefix + "Categories", "Categories")</strong> 2031 </li> 2032 <li v-for="group in groups"> 2033 <a :href="group.url"> 2034 {{group.groupName}} 2035 </a> 2036 </li> 2037 </ul> 2038 <ul v-if="contents?.length>0" class="fold-out-content"> 2039 <li> 2040 <strong>@Translate(instantSearchPrefix + "Content", "Content")</strong> 2041 </li> 2042 <li v-for="content in contents"> 2043 <a :href="content.url"> 2044 {{content.pageTitle}} 2045 </a> 2046 </li> 2047 <li v-if="hasMoreContent" class="show-all"> 2048 <a :href="'@NORRIQ.Common8.Razor.Navigation.GetUrlByNavigationTag("searchresult")?search=' + searchTerm + '&show=content'">@Translate(instantSearchPrefix + "See all", "Se alle")</a> 2049 </li> 2050 </ul> 2051 </div> 2052 <div class="fold-out-col is-products" v-if="products?.length > 0"> 2053 <ul class="fold-out-products"> 2054 <li> 2055 <strong>@Translate(instantSearchPrefix + "Products", "Products")</strong> 2056 </li> 2057 <li v-for="product in products"> 2058 <figure> 2059 <img :src="'/Admin/Public/GetImage.ashx?Width=50&amp;Height=50&amp;fillcanvas=true&amp;Compression=85&amp;Crop=5&amp;Image=' + (product.imageLink ? product.imageLink : '/Files/Images/Default.jpg')" /> 2060 </figure> 2061 <div> 2062 <a :href="product.url"> 2063 {{product.name}} 2064 </a> 2065 <small>{{product.number}}</small> 2066 </div> 2067 </li> 2068 <li v-if="hasMoreProducts" class="show-all"> 2069 <a :href="'@NORRIQ.Common8.Razor.Navigation.GetUrlByNavigationTag("searchresult")?search=' + searchTerm + '&show=products'">@Translate(instantSearchPrefix + "See all", "Se alle")</a> 2070 </li> 2071 </ul> 2072 2073 </div> 2074 <div class="fold-out-col is-spareparts" v-if="spareParts?.length > 0"> 2075 <ul class="fold-out-products"> 2076 <li> 2077 <strong>@Translate(instantSearchPrefix + "Spareparts", "Spare parts")</strong> 2078 </li> 2079 <li v-for="product in spareParts"> 2080 <figure> 2081 <img :src="'/Admin/Public/GetImage.ashx?Width=50&amp;Height=50&amp;fillcanvas=true&amp;Compression=85&amp;Crop=5&amp;Image=' + (product.imageLink ? product.imageLink : '/Files/Images/Default.jpg')" /> 2082 </figure> 2083 <div> 2084 <a :href="product.url"> 2085 {{product.name}} 2086 </a> 2087 <small>{{product.number}}</small> 2088 </div> 2089 </li> 2090 <li v-if="hasMoreSpares" class="show-all"> 2091 <a :href="'@NORRIQ.Common8.Razor.Navigation.GetUrlByNavigationTag("searchresult")?search=' + searchTerm + '&show=spares'">@Translate(instantSearchPrefix + "See all", "Se alle")</a> 2092 </li> 2093 </ul> 2094 </div> 2095 </div> 2096 @*<div v-if="searchTerm != '' && showResults && !queryLoading" class="actions"> 2097 <a :href="'@NORRIQ.Common8.Razor.Navigation.GetUrlByNavigationTag("searchresult")?search=' + searchTerm">@Translate(instantSearchPrefix + "See all", "Se alle")</a> 2098 </div>*@ 2099 </div> 2100 </div> 2101 </form> 2102 </script> 2103 2104 2105 2106 <script src="@NORRIQ.Common8.Razor.TimestampSource.GetSourceWithTimestamp("/Files/dist/scripts/vendors~bundle.min.js")"></script> 2107 <script src="@NORRIQ.Common8.Razor.TimestampSource.GetSourceWithTimestamp("/Files/dist/scripts/bundle.min.js")"></script> 2108 @{ 2109 var currentUser = NORRIQ.Universal.Identity.Dw.UserViewModel.GetCurrentUser<Tefcold.Web.Api.Models.UserViewModelWithMediaBank>(); 2110 var jsonUser = Newtonsoft.Json.JsonConvert.SerializeObject(currentUser); 2111 } 2112 <script async> 2113 AppStart.VueProvider.init({ 2114 webApiUrl: '@System.Web.Configuration.WebConfigurationManager.AppSettings["WebApiProxyUrl"]', 2115 user: @jsonUser, 2116 currencyCode: '@currencyCode', 2117 locale: '@Pageview.Area.Culture', 2118 currencyLeft: false, 2119 currencySpacing: true, 2120 currencySymbol: '@currencyCode', 2121 currencyDecimalSeparator: ',', 2122 currencyGroupSeparator: '.', 2123 currencyDecimalDigits: 2, 2124 dateFormatShort: '@Pageview.Area.Dateformat', 2125 shopId: '@Pageview.Area.EcomShopId', 2126 languages: `@languagesJson`, 2127 langId: '@Pageview.Area.EcomLanguageId', 2128 areaId: '@Pageview.Area.ID' 2129 }); 2130 </script> 2131 2132 <script type='text/javascript' src='//s3.amazonaws.com/downloads.mailchimp.com/js/mc-validate.js'></script> 2133 <script type='text/javascript'>(function ($) { window.fnames = new Array(); window.ftypes = new Array(); fnames[0] = 'EMAIL'; ftypes[0] = 'email'; fnames[11] = 'INTEREST'; ftypes[11] = 'dropdown'; fnames[8] = 'COMPANY'; ftypes[8] = 'text'; fnames[12] = 'FNAME'; ftypes[12] = 'text'; fnames[1] = 'LNAME'; ftypes[1] = 'text'; fnames[2] = 'PHONE'; ftypes[2] = 'phone'; fnames[4] = 'COUNTRY'; ftypes[4] = 'dropdown'; fnames[5] = 'WEBSITE'; ftypes[5] = 'url'; fnames[9] = 'COMMENT'; ftypes[9] = 'text'; fnames[10] = 'HEARABOUT2'; ftypes[10] = 'dropdown'; }(jQuery)); var $mcj = jQuery.noConflict(true);</script> 2134 2135 <script append="replace"></script> 2136 @if (!string.IsNullOrEmpty(Model.PropertyItem.GetString("FormScript"))) 2137 { 2138 2139 @Model.PropertyItem.GetString("FormScript") 2140 2141 } 2142 </body> 2143 </html>