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