Exception in template (Designs/HCCargo_2015/_parsed/404.parsed.cshtml): System.FormatException: String was not recognized as a valid Boolean.
   at System.Boolean.Parse(String value)
   at CompiledRazorTemplates.Dynamic.cefdcaeaddb.Execute()
   at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context)
   at RazorEngine.Razor.Parse[T](String razorTemplate, T model, String cacheName)
   at Dynamicweb.Rendering.Template.Output()
@inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> @using System.Web @{ var vm = new { Environment = GetGlobalValue("NOV:Environment"), IsDev = GetGlobalValue("NOV:Environment") == "DEV", IsTest = GetGlobalValue("NOV:Environment") == "TEST", IsStage = GetGlobalValue("NOV:Environment") == "STAGE", IsLive = GetGlobalValue("NOV:Environment") == "LIVE", IsFrontPage = GetGlobalValue("Global:Pageview.LayoutTemplate") == "frontpage.cshtml", RobotNoFollow = new string[] { "dev", "test", "stage", "cax", "caxstage", "caxlive" }, AreaItem = new { isSublanguage = StringToBool(GetString("Item.Area.IsSublanguage")), upsellingVehicleListPageID = GetString("Item.Area.Upselling_Vehicle_List_Page_ID"), upsellingProductListPageID = GetString("Item.Area.Upselling_Product_List_Page_ID"), cookiePageID = GetString("Item.Area.Cookie_Page_ID"), newUserPageID = GetString("Item.Area.NewUserPage_ID"), checkoutPageID = GetString("Item.Area.Checkout_ID") }, Global = new { AreaID = int.Parse(GetGlobalValue("Global:Area.ID")), LayoutTemplateName = GetGlobalValue("Global:Pageview.LayoutTemplate"), LanguageCode = GetGlobalValue("Global:Area.Lang"), CultureCode = GetGlobalValue("Global:Area.LongLang"), Title = GetString("Title"), SearchApiUrl = GetGlobalValue("NOV:SearchApiUrl") }, User = new { Id = int.Parse(GetGlobalValue("Global:Extranet.UserID")), CustomerNumber = GetGlobalValue("NOV:Customer.Number"), DataAreaId = GetGlobalValue("CIT:User.DataAreaId"), IsLoggedOn = StringToBool(GetGlobalValue("CIT:User.IsLoggedOn")), IsExport = StringToBool(GetGlobalValue("NOV:User.IsExport")), IsInvoicePaymentAvailable = StringToBool(GetGlobalValue("NOV:Customer.IsInvoicePaymentAvailable")), CanBuyCentralStock = StringToBool(GetGlobalValue("NOV:User.Claims.CanBuyCentralStock")), FreeDeliveryLimitAmountFormatted = GetString("NOV:User.FreeDeliveryLimitAmountFormatted"), ShoppingListFeatureEnabled = StringToBool(GetGlobalValue("NOV:Customer.ShoppingListFeatureEnabled")), ShoppingListFeature = GetGlobalValue("NOV:Customer.ShoppingListFeature"), ShoppingListDealerId = GetGlobalValue("NOV:Customer.ShoppingListDealerId"), ShoppingListDealerEmail = GetGlobalValue("NOV:Customer.ShoppingListDealerEmail"), ShoppingListDealerName = GetGlobalValue("NOV:Customer.ShoppingListDealerName"), }, RenderingRules = new { GoogleIndexAreaIds = new int[] { 1, 3, 5, 6, 9, 10, 11, 12, 13, 14, 16, 20, 21, 22 }, } }; var brandAccessViewModel = HCCargo.Commerce.Subscribers.ElasticSearchBrandAccessComponent.GetOrCreateViewModel(); bool useNewCart = false; string accessPolicyId = HCCargo.Commerce.Account.UserAccessPolicy.ANONYMOUS; if (HCBase.Util.IsLoggedIn) { var user = HCBase.ServiceLocatorSession.GetUser(); useNewCart = user.Customer.IsNewCartActive; accessPolicyId = user.AccessPolicyId; } var denyRobots = vm.RobotNoFollow.Contains(HttpContext.Current.Request.Url.Host.Split('.')[0].ToLower()); } @functions{ bool StringToBool(string value) { bool result; return bool.TryParse(value, out result) ? result : false; } string LanguageCodeToLocale(string languageCode) { switch (languageCode) { case "en": return "en-gb"; default: return languageCode; } } string ListGroups() { if (HttpContext.Current.Session["DW_extranet_groups"] == null) return "NULL"; var list = (System.Collections.ArrayList)HttpContext.Current.Session["DW_extranet_groups"]; string output = ""; foreach (var txt in list) { output += ", " + txt; } return output; } string GetRootPage(string languageCode, bool isSubLanguage) { if (isSubLanguage == false) return ""; var topDomain = HttpContext.Current.Request.Url.Host.Split('.').Last(); return topDomain + "-" + languageCode; } string GetConfig(string key) { return System.Configuration.ConfigurationManager.AppSettings[key]; } } <!doctype html> <html lang="@vm.Global.LanguageCode" culture="@vm.Global.CultureCode" ng-app="hccargoApp" is-sublang="@vm.AreaItem.isSublanguage.ToString().ToLower()" root-page="@GetRootPage(vm.Global.LanguageCode, vm.AreaItem.isSublanguage)"> <head ng-controller="pageHeaderController"> <title ng-bind="state.title" ng-init="state.title='@vm.Global.Title'">@GetValue("Title")</title> @GetValue("MetaTags") @GetValue("CopyRightNotice") <meta charset="utf-8"> <meta name="format-detection" content="telephone=no"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="new-relic-content-verification" content="UMr55cKj3by_xECXrzFRLxt--rY6NXcsnDmUvm5n7A0"> <meta name="referrer" content="no-referrer, strict-origin-when-cross-origin"> @if (denyRobots) { <meta name="robots" content="noindex, nofollow"> } @if (vm.IsFrontPage) { <link rel="alternate" href="https://hc-cargo.co.uk/" hreflang="en-gb"> <link rel="alternate" href="https://hc-cargo.nl/nl-nl/" hreflang="nl-nl"> <link rel="alternate" href="https://hc-cargo.nl/nl-nl/" hreflang="nl-be"> <link rel="alternate" href="https://hc-cargo.nl/nl-fr/" hreflang="fr-be"> <link rel="alternate" href="https://hc-cargo.it/" hreflang="it-it"> <link rel="alternate" href="https://hc-cargo.dk/" hreflang="da-dk"> <link rel="alternate" href="https://hc-cargo.fr/" hreflang="fr-fr"> <link rel="alternate" href="https://hc-cargo.pl/" hreflang="pl-pl"> <link rel="alternate" href="https://hc-cargo.se/" hreflang="sv-se"> <link rel="alternate" href="https://hc-cargo.es/" hreflang="es-es"> <link rel="alternate" href="https://hc-cargo.es/" hreflang="es-ad"> <link rel="alternate" href="https://hc-cargo.es/" hreflang="es-gi"> <link rel="alternate" href="https://hc-cargo.com/" hreflang="en-us"> } @* <link rel="manifest" href="/manifest.json"> <meta name="mobile-web-app-capable" content="yes"> <meta name="theme-color" content="#ffffff"> <meta name="application-name" content="HC CARGO"> <!-- for safari --> <meta name="apple-mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-status-bar-style" content="#06616f"> <meta name="apple-mobile-web-app-title" content="HC CARGO"> <link rel="apple-touch-icon" href="/Admin/Public/GetImage.ashx?Image=/Files/Templates/Designs/HCCargo_2015/images/logo_print.png&Format=png&Width=192&Height=192&Resolution=300&Crop=6"> <!-- for internet explorer --> <meta name="msapplication-TitleColor" content="#fff"> <meta name="theme-color" content="#06616f"> <meta name="msapplication-TitleImage" content="/Admin/Public/GetImage.ashx?Image=/Files/Templates/Designs/HCCargo_2015/images/logo_print.png&Format=png&Width=192&Height=192&Resolution=300&Crop=6"> *@ <script> var HC = HC || {}; HC.user = { id: @vm.User.Id, dataAreaId: "@vm.User.DataAreaId", customerNumber: "@vm.User.CustomerNumber", isLoggedOn: @vm.User.IsLoggedOn.ToString().ToLower(), isExport: @vm.User.IsExport.ToString().ToLower(), freeDeliveryLimitAmount: 0, freeDeliveryLimitAmountFormatted: "@vm.User.FreeDeliveryLimitAmountFormatted", accessPolicyId: "@accessPolicyId", isInvoicePaymentAvailable: @vm.User.IsInvoicePaymentAvailable.ToString().ToLower(), canBuyCentralStock: @vm.User.CanBuyCentralStock.ToString().ToLower(), featureSettings: { "SHOPPINGLIST": { enabled: @vm.User.ShoppingListFeatureEnabled.ToString().ToLower(), level: "@vm.User.ShoppingListFeature", dealer: { id: "@vm.User.ShoppingListDealerId", name: "@vm.User.ShoppingListDealerName", email: "@vm.User.ShoppingListDealerEmail" } } } }; HC.settings = HC.settings || {}; HC.settings.cart = HC.settings.cart || {}; HC.settings.area = HC.settings.area || {}; HC.settings.apis = HC.settings.apis || { dataService: { endpoint: "@GetConfig("Api.DataService.Endpoint")" }, frontLogService: { endpoint: "@GetConfig("Api.FrontLogService.Endpoint")", econdaActive: false }, signupService: { endpoint: "@GetConfig("Api.SignupService.Endpoint")" } }; </script> @if (denyRobots == false) { if (vm.RenderingRules.GoogleIndexAreaIds.Contains(vm.Global.AreaID)) { <meta name="robots" content="index, follow"> } else { <meta name="robots" content="noindex, nofollow"> } if (vm.Global.AreaID == 5 || vm.Global.AreaID == 6) /* Holland NL and FR */ { <meta name="google-site-verification" content="uXBqGqdgo_ATVsMdEThjnr670rhIfk0COW9WkxbO_2Y"> } if (vm.Global.AreaID == 3) /* Holland - NOT IN USE! */ { <meta name="google-site-verification" content="Aq5-pWf1aguNf7Slffx3vveeTTWYg5D_d42QWP-DPYk"> } if (vm.Global.AreaID == 10) /* Dansk DA */ { <meta name="google-site-verification" content="UMr55cKj3by_xECXrzFRLxt--rY6NXcsnDmUvm5n7A0"> } } <link href='@Application.RazorHelpers.GetFileWithCacheBuster("~/files/templates/designs/hccargo_2015/dist/css/master.min.css")' rel="stylesheet" type="text/css"> <link href="https://fonts.googleapis.com/css?family=Lato:300,400" rel="stylesheet" type="text/css"> <link media="print" href="/Files/Templates/Designs/HCCargo_2015/dist/css/print.min.css" rel="stylesheet" type="text/css"> <script> window.ParsleyConfig = { excluded: "input[type=button], input[type=submit], input[type=reset], input[type=hidden], [disabled], .no-validate, :hidden, .hidden" }; </script> <script src='@Application.RazorHelpers.GetFileWithCacheBuster("~/files/templates/designs/hccargo_2015/dist/scripts/vendor.min.js")'></script> <script src="https://www.recaptcha.net/recaptcha/api.js?hl=@(vm.Global.LanguageCode)" async="" defer=""></script> <!--[if lt IE 9]> <link href='https://hc-cargo.co.uk/files/Templates/Designs/HCCargo_2015/dist/css/ie.min.css' rel='stylesheet' type='text/css'> <script src="https://hc-cargo.co.uk/files/Templates/Designs/HCCargo_2015/scripts/libs/external/placeholders.min.js"></script> <script src="https://hc-cargo.co.uk/files/Templates/Designs/HCCargo_2015/scripts/libs/external/svg4everybody.ie8.min.js"></script> <script src="https://hc-cargo.co.uk/files/Templates/Designs/HCCargo_2015/scripts/libs/external/html5shiv.min.js"></script> <script src="https://hc-cargo.co.uk/files/Templates/Designs/HCCargo_2015/scripts/libs/external/respond.min.js"></script> <![endif]--> @if (!string.IsNullOrWhiteSpace(GetGlobalValue("NOV:CookieLevel3Active"))) { <text> @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> @if (GetGlobalValue("NOV:Environment") == "LIVE") { <!-- Google Tag Manager - Live --> <noscript> <iframe src="https://www.googletagmanager.com/ns.html?id=GTM-N8FZJX" height="0" width="0" style="display:none;visibility:hidden"></iframe> </noscript> <script> (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= '//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-N8FZJX'); </script> <!-- End Google Tag Manager --> } else if (GetGlobalValue("NOV:Environment") == "TEST" || GetGlobalValue("NOV:Environment") == "STAGE") { <!-- Google Tag Manager - Test & Stage --> <noscript> <iframe src="https://www.googletagmanager.com/ns.html?id=GTM-59P6MK" height="0" width="0" style="display:none;visibility:hidden"></iframe> </noscript> <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-59P6MK');</script> <!-- End Google Tag Manager --> } </text> } <script> HC.path = {}; HC.path.ajax = 'ajax/'; @*HC.elasticSearchBrands = brandAccessViewModel.SearchApiBrandAccess;*@ HC.elasticSearchAllowedCatalogs = @HCBase.Util.ConvertObjectToJson(brandAccessViewModel.AllowedCatalogs); HC.elasticSearchRestrictedItemGroups = @HCBase.Util.ConvertObjectToJson(brandAccessViewModel.RestrictedItemGroups); HC.elasticSearchDataArea = '@brandAccessViewModel.SearchApiDataAreaId'; HC.contactPageId = '@GetString("Item.Area.ContactPage_ID")'; HC.defaultDealershipCountryId = '@GetString("Item.Area.DefaultDealershipCountryID")'; HC.invoiceDetailsPageId = '@Pageview.Area.Item["Invoice_Detail_Page_ID"]'; HC.languageId = '@GetGlobalValue("Global:Area.Lang")'; HC.cookieLevel = @GetGlobalValue("NOV:CookieLevelValue"); </script> <script> HC.settings.area.areaId = @vm.Global.AreaID; </script> @if (vm.IsDev) { <script> HC.isSiteDown = "@RenderParagraphContent(613)" === "True" ? true : false; HC.settings.cart.useNew = @(useNewCart == true ? "true" : "false"); HC.settings.cart.showChangeLog = true; HC.settings.cart.sessionId = "@HttpContext.Current.Session.SessionID.Substring(0, 6)" + "..."; HC.apiRoot = "http://dev.hc-cargo.com/api/"; </script> } else if (vm.IsTest) { <script> HC.isSiteDown = "@RenderParagraphContent(5439)" === "True" ? true : false; HC.settings.cart.useNew = @(useNewCart == true ? "true" : "false"); HC.settings.cart.showChangeLog = true; HC.settings.cart.sessionId = "@HttpContext.Current.Session.SessionID.Substring(0, 6)" + "..."; HC.apiRoot = "https://cax.hc-cargo.com/api/"; </script> } else if (vm.IsStage) { <script> HC.isSiteDown = "@RenderParagraphContent(5439)" === "True" ? true : false; HC.settings.cart.useNew = @(useNewCart == true ? "true" : "false"); HC.settings.cart.showChangeLog = true; HC.settings.cart.sessionId = "@HttpContext.Current.Session.SessionID.Substring(0, 6)" + "..."; HC.apiRoot = "https://caxstage.hc-cargo.com/api/"; </script> } else if (vm.IsLive) { <script> HC.isSiteDown = "@RenderParagraphContent(5439)" === "True" ? true : false; HC.settings.cart.useNew = @(useNewCart == true ? "true" : "false"); HC.settings.cart.showChangeLog = false; HC.settings.cart.sessionId = "@HttpContext.Current.Session.SessionID.Substring(0, 6)" + "..."; HC.apiRoot = "https://hc-cargo.com/api/"; </script> } @if (vm.IsTest || vm.IsStage) { <script> $.get(HC.apiRoot + "search/api/da/vehicle/selectoptions") .fail(function (xhr) { console.log("SSL check on .COM domain failed - ", xhr.status); var msg = "Message from the HC-CARGO team:\r\n"; msg += "This TEST site requires access to " + HC.apiRoot + " - Please accept SSL errors for that domain!\r\n"; msg += "(Catalog will not be visible until that is done)"; alert(msg); }); </script> } @if (!string.IsNullOrWhiteSpace(GetGlobalValue("CIT:IsTestApplication"))) { <script> HC.isTest = true; </script> } @if (!string.IsNullOrWhiteSpace(GetGlobalValue("NOV:CookieLevel2Active"))) { <text> @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> @{ string dataAreaId = GetGlobalValue("CIT:User.DataAreaId") + (StringToBoolLocal(GetGlobalValue("NOV:User.IsExport")) ? "_EX" : ""); } @functions{ bool StringToBoolLocal(string value) { bool result; return bool.TryParse(value, out result) ? result : false; } } @if (GetGlobalValue("NOV:Environment") == "LIVE") { <script> var HC = HC || {}; HC.econdaSettings = { sendToConsole: true, sendToEconda: true, suppressDefault: false, siteId: 'hccargo2015', pageId: '@GetGlobalValue("Global:Page.ID")', dataAreaId: '@dataAreaId', segmentation: '@GetGlobalValue("CIT:Econda.CustomerSegmentation")', values: '@GetGlobalValue("NOV:Econda.CustomerTracking")' }; </script> } else { <script> var HC = HC || {}; HC.econdaSettings = { sendToConsole: true, sendToEconda: false, suppressDefault: false, siteId: 'hccargo2015', pageId: '@GetGlobalValue("Global:Page.ID")', dataAreaId: '@dataAreaId', segmentation: '@GetGlobalValue("CIT:Econda.CustomerSegmentation")', values: '@GetGlobalValue("NOV:Econda.CustomerTracking")' }; </script> } <script> window.emos3 = { stored: [], send: function (p) { this.stored.push(p); } }; </script> <script type="text/javascript" src="/files/system/js/custom/hc.econda.js?v=20170222"></script> <script type="text/javascript"> HC.econda.init('@GetGlobalValue("Global:Page.ID")', 'hccargo2015', '@dataAreaId', '@GetGlobalValue("CIT:Econda.CustomerSegmentation")'); </script> @if (!string.IsNullOrWhiteSpace(GetGlobalValue("CIT:IsVisible.EcondaLoginSuccess"))) { <script type="text/javascript"> HC.econda.addLoginSuccess('@GetGlobalValue("CIT.User.AccessUserId.MD5Hash")'); </script> } <script type="text/javascript"> HC.econda.addPagePath(HC.econda.content()); </script> </text> } <script> window.dataLayer = window.dataLayer || []; dataLayer.push( { 'user': { 'isLoggedIn': '@GetGlobalValue("CIT:User.IsLoggedOn")' } } ); </script> <script src="//maps.googleapis.com/maps/api/js?key=AIzaSyAsszc33S78BQJ0KN8NVhI0miZwPvBvUoc&v=3&sensor=false"></script> @GetValue("Stylesheets") @GetValue("Javascripts") </head> <body data-searchapi-url="@vm.Global.SearchApiUrl"> @if (!string.IsNullOrWhiteSpace(GetGlobalValue("HC:GTM.UserSignedUp.ShowEvent"))) { <script> dataLayer = dataLayer || []; dataLayer.push({ 'event': 'signup' }); </script> } <script> var HCCargo = HCCargo || {}; HCCargo.languageSelector = (function () { var COOKIE_NAME = "cultureCode"; var _currentLanguageCode = ""; _currentCultureCode = ""; return { start: start }; @* PUBLIC *@ function start() { debug("start()"); var cookieCultureCode, hasSublanguages; _currentLanguageCode = document.documentElement.lang; _currentCultureCode = document.documentElement.getAttribute("culture"); hasSublanguages = document.documentElement.getAttribute("is-sublang") === "true"; cookieCultureCode = getCultureCodeFromCookie(); if (cookieCultureCode === undefined || cookieCultureCode === null) { debug(" - no cookie found"); setCultureCodeSession(_currentCultureCode); setCultureCodeCookie(_currentCultureCode); } if (!hasSublanguages) { return; } @* // If this is the root page (.com/com-en) but the cookie says otherwise, then redirect // else stay here... *@ cookieCultureCode = cookieCultureCode || getCultureCodeFromCookie(); if (cookieCultureCode !== _currentCultureCode) { debug(" - cookie different from current"); if (shouldRedirectToCookieLanguage()) { setCultureCodeSession(cookieCultureCode); navigateToLanguage(cookieCultureCode); return; } else { setCultureCodeSession(_currentCultureCode); setCultureCodeCookie(_currentCultureCode); } } debug("ready to accept language change") $('body').on('change', ".select-language", onLanguageSelected); } @* PRIVATE *@ function shouldRedirectToCookieLanguage() { return window.location.pathname === "/" + document.documentElement.getAttribute("root-page"); } function getCultureCodeFromCookie() { debug("getCultureCodeFromCookie"); return $.cookie(COOKIE_NAME); } function setCultureCodeCookie(cultureCode) { debug("setCultureCodeCookie"); $.cookie(COOKIE_NAME, cultureCode, { expires: 365, path: "/" }); } function deleteCultureCodeCookie() { $.removeCookie(COOKIE_NAME, { path: "/" }); } function setCultureCodeSession(cultureCode) { debug("setCultureCodeSession"); $.ajax({ url: HC.path.ajax + 'account.aspx/setculturecode', type: 'POST', async: true, contentType: 'application/json; charset=utf-8', dataType: 'json', data: JSON.stringify({ "cultureCode": cultureCode }) }); } function navigateToLanguage(cultureCode) { debug("navigateToLanguage"); var languageCode = cultureCode.split("-")[0]; var rootDomain = document.location.hostname.split('.').pop(); var navigateTo = "/" + rootDomain + "-" + languageCode; window.location = navigateTo; } function onLanguageSelected(event) { debug("onLanguageSelected"); var selectedLanguageCode = $(this).find('option:selected').attr('data-language-code').toLowerCase().split("-").pop(); if (selectedLanguageCode === _currentLanguageCode) { return; } deleteCultureCodeCookie(); navigateToLanguage(selectedLanguageCode); } function debug(message) { @*console.log("LanguageSelector: " + message);*@ } })(); HCCargo.languageSelector.start(); </script> <div id="print-logo"><img src="/Files/Templates/Designs/HCCargo_2015/images/logo_print.png" alt="HC Cargo logo for print"></div> <div id="header-language-select-container" class="header-language-select-container"> <div> @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> @if (System.Web.HttpContext.Current.Request.Url.Host.Contains("nl") || System.Web.HttpContext.Current.Request.Url.Host.Contains("com")) { <form> <select class="select-language form-control"> <option>@Translate("ChooseLanguage", "Choose language", true)</option> @if (System.Web.HttpContext.Current.Request.Url.Host.Contains("com")) { @RenderParagraphContent(GetInteger("Item.Area.ExportLanguageListParagraphID")) } else if (System.Web.HttpContext.Current.Request.Url.Host.Contains("nl")) { @RenderParagraphContent(GetInteger("Item.Area.BelgiumLanguageListParagraphID")) } </select> </form> } </div> </div> @if (GetGlobalValue("Global:Extranet.UserID") == "0") { @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> <div> @{ string longLang = GetGlobalValue("Global:Area.LongLang"); string loginPageID = GetString("Item.Area.Login_Page_ID"); string signupPageID = GetString("Item.Area.NewUserPage_ID"); } </div> @functions{ Dictionary<string, string> elementIdValues = new Dictionary<string, string>(); string RandomId(string key) { if (!elementIdValues.ContainsKey(key)) { elementIdValues[key] = key + "_" + Guid.NewGuid().ToString(); } return elementIdValues[key].Trim(); } } <div class="modal fade login-modal" tabindex="-1" role="dialog" aria-labelledby="modal-title" aria-hidden="true" data-login-page="loginajax-@longLang" data-reset-page="@loginPageID"> <div class="container"> <div class="row"> <div class="col-xs-12 col-sm-10 col-sm-offset-1"> <div class="modal-dialog modal-dialog--login"> <!-- Shared header --> <div class="modal-content"> <div class="login-dialogue"> <span class="close" data-dismiss="modal" aria-hidden="true"> <svg class="hc-icon-close"><use xlink:href="/files/templates/designs/hccargo_2015/images/icons.svg?v=20191202#hc-icon-close"></use></svg> </span> @********************************** //TODO: the below message will be shown if the url has the parameter signupconfirmed (with any value), the js for it has been made, just need to add the parameter in the link in the email I e-mailen hvor man skal klikke på et link for at bekræfte at man vil oprette kontoen, skal man ved klik på linket komme til forsiden hvor parameteret signupconfirmed er tilføjet (værdien er underordnet, sæt den evt bare til true) *******************************@ <div class="login-dialogue__message"> @Translate("SignupMessage_YourEmailHasBeenValidatedLogin", "You email has been validated and you can now log in", true) </div> <div class="login-dialogue__col login-dialogue__col--form"> <h4 class="login-dialogue__header">@Translate("SignIn", "Sign in*", true)</h4> <div class="alert alert-warning message-password-expired hidden" role="alert">@Translate("PasswordExpiredResetPassword", "Your password is expired, you need to reset your password.*", true)</div> <div class="alert alert-danger message-unknown-user hidden" role="alert">@Translate("IfYouHaveProblemesSigningIn", "Login failed! If you have problems signing in, please try to reset your password by using the link below.*", true)</div> <div class="alert alert-danger message-error hidden" role="alert">@Translate("AnErrorOccured", "An error occured during the request. Try again or contact HC-Cargo.*", true)</div> <form> @System.Web.Helpers.AntiForgery.GetHtml() <div class="form-group"> <label for="username" class="login-dialogue__label">@Translate("Email", "E-mail*", true)</label> <input type="text" class="form-control default-focus login-dialogue__input-standard" name="username" required="required"> </div> <div class="form-group"> <label for="password" class="login-dialogue__label">@Translate("Password", "Password*", true)</label> <input type="password" class="form-control login-dialogue__input-standard" name="password" required="required" maxlength="50"> </div> <div class="login-dialogue__checkbox"> <input type="checkbox" name="autologin" id="remember-me-autologin" class="login-dialogue__checkbox-input"> <label for="remember-me-autologin" class="login-dialogue__checkbox-label"> @Translate("RememberMe", "Remember me", true) </label> </div> <div class="form-group submit-group"> <button type="submit" class="btn btn-orange login-modal-submit btn-fw">@Translate("Login", "Login*", true)</button> </div> <div class="login-dialogue__reset-password"> <a class="login-dialogue__reset-password-link" href="?id=@loginPageID&loginaction=recovery">@Translate("ResetPassword", "Reset password", true)</a> </div> <div class="loading-container hidden"> @Translate("LoggingIn", "Logging in*", true)&nbsp;<span class="loading-icon"></span> </div> </form> </div> <div class="login-dialogue__col"> <h4 class="login-dialogue__header">@Translate("CtaCreateAccount", "Create an account", true)</h4> <ul class="usp-list"> <li class="usp-list__item"> <span class="usp-list__icon-holder"> <svg class="usp-list__icon"><use xlink:href="/files/templates/designs/hccargo_2015/images/icons.svg?v=20191202#hc-icon-clock"></use></svg> </span> <div class="usp-list__header">@Translate("USP_LineItem1_Title", "USP 1 Title [clock]", true)</div> <div class="usp-list__content">@Translate("USP_LineItem1_Description", "USP 1 Description [clock]", true)</div> </li> <li class="usp-list__item"> <span class="usp-list__icon-holder"> <svg class="usp-list__icon"><use xlink:href="/files/templates/designs/hccargo_2015/images/icons.svg?v=20191202#hc-icon-gear"></use></svg> </span> <div class="usp-list__header">@Translate("USP_LineItem2_Title", "USP 2 Title [gear]", true)</div> <div class="usp-list__content">@Translate("USP_LineItem2_Description", "USP 2 Description [gear]", true)</div> </li> <li class="usp-list__item"> <span class="usp-list__icon-holder"> <svg class="usp-list__icon"><use xlink:href="/files/templates/designs/hccargo_2015/images/icons.svg?v=20191202#hc-icon-ribbon"></use></svg> </span> <div id="usp3_com_header" class="usp-list__header">@Translate("USP_LineItem3_Title_ForCOMDomain", "USP 3 Title [ribbon] For COM Domain", true)</div> <div id="usp3_com_content" class="usp-list__content">@Translate("USP_LineItem3_Description_ForCOMDomain", "USP 3 Description [ribbon] For COM Domain", true)</div> <!--All other domains--> <div id="usp3_otherDomains_header" class="usp-list__header">@Translate("USP_LineItem3_Title", "USP 3 Title [ribbon]", true)</div> <div id="usp3_otherDomains_content" class="usp-list__content">@Translate("USP_LineItem3_Description", "USP 3 Description [ribbon]", true)</div> </li> <li class="usp-list__item"> <a href="/?id=@signupPageID" class="btn btn-green btn-block">@Translate("CtaCreateAccount", "Create an account", true)</a> </li> </ul> </div> </div> </div> <!-- // .modal.content --> </div> <!-- // .modal-dialog --> </div> </div> </div> </div> <div class="modal fade domain-view-modal" tabindex="-1" role="dialog" aria-labelledby="modal-title" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <span class="close" data-dismiss="modal" aria-hidden="true" style="cursor: pointer;"> <svg class="hc-icon-close"><use xlink:href="/files/templates/designs/hccargo_2015/images/icons.svg?v=20191202#hc-icon-close"></use></svg> </span> <h5 class="modal-titel">@Translate("DomainPopover_Title", "Redirecting to your home domain*", true)</h5> </div> <div class="modal-body"> <div class="alert alert-warning homedomain-link-container" id="homedomain-content"> <p>@Translate("ToGiveYouTheBestExperiencePossibleWeHaveThisWebsiteInYourLanguage", "To give you the best experience possible we have this website in your language", true): <a href="#"><span id="homedomain-domain"></span>.</a></p> <p>@Translate("WeWillRedirectYouIn", "We will redirect you in", true): <span id="homedomain-counter" data-start="20"></span>&nbsp;@Translate("seconds", "seconds", true)</p> <p><b>@Translate("OrYouCanClickTheButtonBelowToGoNow", "- or you can click the button below to go now", true):</b></p> <p><a href="#" class="btn btn-orange">@Translate("GoTo", "Go to", true) <span id="homedomain-domain-2"></span></a></p> </div> </div> <div class="modal-footer modal-footer-dialog hidden"> </div> </div> <!-- // .modal.content --> </div> <!-- // .modal-dialog --> </div> <div class="modal fade change-password-modal" tabindex="-1" role="dialog" aria-labelledby="modal-title" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <span class="close hidden" data-dismiss="modal" aria-hidden="true" style="cursor: pointer;"> <svg class="hc-icon-close"><use xlink:href="/files/templates/designs/hccargo_2015/images/icons.svg?v=20191202#hc-icon-close"></use></svg> </span> <h5 class="modal-titel change-password-view-title">@Translate("LoginPopover_ChangePassword_Title", "Please change your password*", true)</h5> </div> <div class="modal-body change-password-view"> <div class="alert alert-info" role="alert">@Translate("LoginPopover_ChangePassword_Description", "You are logged in using a system generated password. Please change your password.*", true)</div> <div class="alert alert-danger message-error hidden" role="alert">@Translate("AnErrorOccured", "An error occured during the request. Try again or contact HC-Cargo.*", true)</div> <div class="alert alert-danger message-from-server hidden" role="alert"></div> <form class="parsley-form"> @System.Web.Helpers.AntiForgery.GetHtml() <div class="form-group"> <label for="@RandomId(" newpassword")"="">@Translate("NewPassword", "New password", true)</label> <input id="@RandomId(" newpassword")"="" type="password" class="form-control default-focus" name="NewPassword" required="required" data-parsley-password="true" data-parsley-password-message='@Translate("MustContainCharactersAndNumbers", "The password must contain minimum 8 characters and 1 number", true)'> </div> <div class="form-group"> <label for="@RandomId(" newpasswordrepeated")"="">@Translate("ReEnterNewPassword", "Re-enter new password", true)</label> <input id="@RandomId(" newpasswordrepeated")"="" type="password" class="form-control" name="NewPasswordRepeated" required="required" data-parsley-equalto="#@RandomId(" newpassword")"=""> </div> <div class="form-group submit-group"> <button type="submit" class="btn btn-orange">@Translate("Submit", "Submit*", true)</button> </div> <div class="loading-container hidden"> Changing password&nbsp;<span class="loading-icon"></span> </div> </form> </div> <div class="modal-footer modal-footer-dialog hidden"> </div> </div> <!-- // .modal.content --> </div> <!-- // .modal-dialog --> </div> <script> $(function () { // SWITCH TRANSLATIONS ON DOMAINS var domainCode = /\.([a-z]{0,3})\/([a-z]{0,2})/.exec(location.href)[1]; if (domainCode === "com") { $("#usp3_otherDomains_header").remove(); $("#usp3_otherDomains_content").remove(); //document.getElementById("usp3_otherDomains_header").remove(); // fails in IE 10 //document.getElementById("usp3_otherDomains_content").remove(); // fails in IE 10 } else { $("#usp3_com_header").remove(); $("#usp3_com_content").remove(); //document.getElementById("usp3_com_header").remove(); // fails in IE 10 //document.getElementById("usp3_com_content").remove(); // fails in IE 10 } // SWITCH TRANSLATIONS ON DOMAINS function debug(obj, message) { console.log(obj, message); } function reloadCurrentPage() { window.location = window.location.pathname + window.location.search; } function LoginStateManager() { var self = this, viewNames = [], views = {}, defaultViewName = null, currentViewName = null; $('.login-modal').on('hidden.bs.modal', function (e) { $("#mobile-nav-reveal").removeClass('hidebtn'); }); // PUBLIC return { addView: addView, changeTo: changeTo, reset: reset }; function addView(viewName, view, isDefault) { viewNames.push(viewName); views[viewName] = view; if (view.setStateManager) view.setStateManager(this); if (isDefault) { defaultViewName = viewName; currentViewName = viewName; } } function changeTo(viewName, data) { hideView(currentViewName); showView(viewName, data); } function reset() { for (i = 0; i < viewNames.length; i++) { views[viewNames[i]].reset(); } self.changeTo(defaultViewName); } // PRIVATE function switchbtn(arg) { var btnclass = "hidebtn"; if (arg.hasClass('hidebtn')) { arg.removeClass(btnclass); } else { arg.addClass(btnclass); } } function showView(viewName, data) { switchbtn($("#mobile-nav-reveal")); views[viewName].show(data); currentViewName = viewName; } function hideView(viewName) { views[viewName].hide(); } }; function DomainValidation() { var self = this, loginResponse = null, protocol = window.location.protocol, host = window.location.host; this.isValid = function (_loginResponse) { loginResponse = _loginResponse; return host === loginResponse.homeDomain; } this.getHomeDomainLink = function () { return homeDomainLink = protocol + '//' + loginResponse.homeDomain; } this.logoffAsync = function () { $.get(protocol + '//' + host + '/admin/public/extranetlogoff.aspx'); } } function LoginViewModel(modalName, modalSettings, domainValidation) { var _stateManager = null; var _container = null; var _form = null; //var _parsley = null; init(); function init() { _container = $(modalName); _form = _container.find("FORM"); _form.on("submit", onSubmit); _container.modal(modalSettings); //_parsley = _form.parsley(); } function modalCommand(value) { _container.modal(value); } function onSubmit(event) { event.preventDefault(); resetMessages(); showSpinner(); HC.ajax.cleanCartBeforeLogin(_container.find('input[name=username]').val().trim()); var request = { __RequestVerificationToken: _container.find('INPUT[name=__RequestVerificationToken]').val(), username: _container.find('INPUT[name=username]').val().trim(), password: _container.find('INPUT[name=password]').val(), DWExtranetUsernameRemember: true, DWExtranetPasswordRemember: true, }; if (_container.find('INPUT[name=autologin]').prop('checked')) { request.autologin = 'True'; } $.ajax({ method: 'POST', url: 'loginajax-en-gb', data: request }) .done(onSubmitDone) .fail(onSubmitFailed); } function onSubmitDone(data) { if (data.isUnknown === true) { domainValidation.logoffAsync(); _container.find('.message-unknown-user').removeClass('hidden'); hideSpinner(); } else if (data.isExpired === true) { domainValidation.logoffAsync(); _container.find('.message-password-expired').removeClass('hidden'); hideSpinner(); } else if (domainValidation.isValid(data) === false) { // Show and link to correct home domain! domainValidation.logoffAsync(); showHomeDomainLink(domainValidation.getHomeDomainLink()); } else { // GTM event tracking. window.dataLayer = window.dataLayer || []; dataLayer.push({ 'event': 'loggedIn' }); if (data.reset) { hideSpinner(); showChangePasswordView(); } else { reloadCurrentPage(); } } } function onSubmitFailed(xhr) { domainValidation.logoffAsync(); hideSpinner(); _container.find('.message-error').removeClass('hidden'); } function showSpinner() { _container.find('.submit-group').addClass('hidden'); _container.find('.loading-container').removeClass('hidden'); } function hideSpinner() { _container.find('.loading-container').addClass('hidden'); _container.find('.submit-group').removeClass('hidden'); } function resetMessages() { _container.find('.alert-danger').addClass('hidden'); } function showChangePasswordView() { _stateManager.changeTo("change-password-view"); } function showHomeDomainLink(link) { _stateManager.changeTo("homedomain-view", { link: link }); } function initHomeDomainCountDown(currentCount) { if (isNaN(currentCount)) { currentCount = parseInt($('#homedomain-counter').attr('data-start')); } else { currentCount--; } if (currentCount === 0) { $('#homedomain-domain').trigger('click'); } else { $('#homedomain-counter').text(currentCount); setTimeout(function () { initHomeDomainCountDown(currentCount); }, 1000); } } // State Manager Interface functions function hide() { modalCommand("hide"); } function reset() { resetMessages(); hideSpinner(); show(); } function setStateManager(manager) { _stateManager = manager; } function show() { modalCommand("show"); _container.find('.default-focus').focus(); } return { hide: hide, reset: reset, setStateManager: setStateManager, show: show } } function DomainViewController(modalName, modalSettings) { var _stateManager = null; var _container = null; init(); function init() { _container = $(modalName); _container.modal(modalSettings); } function modalCommand(value) { _container.modal(value); } function run(link) { var anchors = _container.find('#homedomain-content a'); anchors.attr('href', link); var domainTexts = _container.find('#homedomain-domain, #homedomain-domain-2'); domainTexts.text(link.split('/')[2]); var countDownStart = parseInt(_container.find('#homedomain-counter').attr('data-start')); initHomeDomainCountDown(countDownStart + 1); } function initHomeDomainCountDown(currentCount) { if (isNaN(currentCount)) { currentCount = parseInt(_container.find('#homedomain-counter').attr('data-start')); } else { currentCount--; } if (currentCount === 0) { _container.find('#homedomain-domain').trigger('click'); } else { _container.find('#homedomain-counter').text(currentCount); setTimeout(function () { initHomeDomainCountDown(currentCount); }, 1000); } } // State Manager Interface functions function hide() { modalCommand("hide"); } function reset() { _container.find('.alert-danger').addClass('hidden'); hide(); } function setStateManager(manager) { _stateManager = manager; } function show(data) { modalCommand("show"); _container.find('.default-focus').focus(); run(data.link); } return { hide: hide, reset: reset, setStateManager: setStateManager, show: show } } function ChangePasswordModel(modalName, modalSettings, config) { var _stateManager = null; var _container = null; var _form = null; var _parsley = null; init(); function init() { _container = $(modalName); _form = _container.find("FORM"); _form.on("submit", onSubmit); _container.modal(modalSettings); _parsley = _form.parsley(); } function modalCommand(value) { _container.modal(value); } function onSubmit(event) { event.preventDefault(); if (!_parsley.validate()) return; resetMessages(); showSpinner(); var request = { NewPassword: _form[0]["NewPassword"].value.trim(), NewPasswordRepeated: _form[0]["NewPasswordRepeated"].value.trim() }; $.when( $.ajax({ url: HC.path.ajax + 'customercenter.aspx/changepasswordatlogin', type: 'POST', async: true, contentType: 'application/json; charset=utf-8', dataType: 'json', headers: { "__RequestVerificationToken": _form[0]["__RequestVerificationToken"].value }, data: JSON.stringify({ "request": request }) }) ) .done(onSubmitDone) .fail(onSubmitFailed); } function onSubmitDone(response) { // Reloading page config.onComplete(); } function onSubmitFailed(xhr, p2, p3) { if (xhr && xhr.responseJSON && xhr.responseJSON.d) { // show message from server _container.find('.message-from-server').text(xhr.responseJSON.d).removeClass("hidden"); } else { // just show status code that was returned _container.find('.message-error').removeClass('hidden'); _container.find('.message-from-server').text(xhr.status + " - " + xhr.statusText).removeClass("hidden"); } hideSpinner(); } function showSpinner() { _container.find('.submit-group').addClass('hidden'); _container.find('.loading-container').removeClass('hidden'); } function hideSpinner() { _container.find('.loading-container').addClass('hidden'); _container.find('.submit-group').removeClass('hidden'); } function resetMessages() { _container.find('.alert-danger').addClass('hidden'); } // State Manager Interface functions function hide() { modalCommand("hide"); } function reset() { _container.find('.alert-danger').addClass('hidden'); hide(); } function setStateManager(manager) { _stateManager = manager; } function show() { modalCommand("show"); _container.find('.default-focus').focus(); } return { hide: hide, reset: reset, setStateManager: setStateManager, show: show } }; var loginViewModel = new LoginViewModel( '.login-modal', { show: false }, new DomainValidation() ); var domainViewController = new DomainViewController( '.domain-view-modal', { show: false }, new DomainValidation() ); var changePasswordModel = new ChangePasswordModel( '.change-password-modal', { backdrop: "static", keyboard: false, show: false }, { onComplete: reloadCurrentPage } ); var loginStateManager = new LoginStateManager(); loginStateManager.addView('login-view', loginViewModel, true); loginStateManager.addView('homedomain-view', domainViewController, false); loginStateManager.addView("change-password-view", changePasswordModel, false); }); </script> } <div id="site"> @using Microsoft.Crm.SdkTypeProxy @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> @{ string pageName = GetString("DwPageName"); string siteSearchClass = pageName == "Checkout" ? "checkout-search" : string.Empty; string firstPageID = GetString("DwAreaFirstPageID"); string hiddenSearchPageID = GetString("Item.Area.Hidden_Search_Page_ID"); bool hasRoleZeroPricesOnline = bool.Parse(GetGlobalValue("NOV:User.RoleZeroPricesOnline")); string rawUrl = HttpContext.Current.Request.RawUrl; bool isCheckoutPage = HttpContext.Current.Request.RawUrl.Contains("cart"); string headerExtraClass = isCheckoutPage ? "navbar--checkout" : ""; } <div ng-controller="HeaderController as ctrl"> <header id="header" class="navbar" ng-class="{'navbar--checkout':ctrl.currentStep && ctrl.currentStep > 1}" role="navigation"> <div id="nav-container-id" class="container"> <div id="header-brand"> <a href="/Default.aspx?Id=@firstPageID"><img src="/Files/Templates/Designs/HCCargo_2015/images/logo.svg?v=20191208" alt="HC Cargo logo"></a> </div> <ol class="checkout-steps-list" ng-class="{'checkout-steps-list--show':ctrl.currentStep && ctrl.currentStep > 1}" ng-if="ctrl.currentStep && ctrl.currentStep > 1"> <li class="checkout-steps-list__item" ng-class="{ 'checkout-steps-list__item--active': ctrl.currentStep == 2, 'checkout-steps-list__item--done': ctrl.currentStep > 2 }"> <span class="checkout-steps-list__step-name">@Translate("Checkout_Step_Delivery", "Delivery", true)</span> </li> <li class="checkout-steps-list__item" ng-class="{ 'checkout-steps-list__item--active': ctrl.currentStep == 3, 'checkout-steps-list__item--done': ctrl.currentStep > 3 }" zzzzng-show="ctrl.currentStep == 0 || ctrl.currentStep == 1"> <span class="checkout-steps-list__step-name">@Translate("Checkout_Step_ConfirmationAndPayment", "Order confirmation and payment", true)</span> </li> </ol> <a href="/" class="navbar__shop-more-link" ng-class="{'navbar__shop-more-link--show':ctrl.currentStep && ctrl.currentStep > 1}" ng-if="ctrl.currentStep && ctrl.currentStep > 1">@Translate("Checkout_Button_ShopMore", "Shop more", true)</a> <div ng-if="!ctrl.currentStep || ctrl.currentStep <= 1"> @if (hasRoleZeroPricesOnline) { // DO NOT SHOW SHOPPING CART } else if (int.Parse(GetGlobalValue("Global:Extranet.UserID")) > 0) { <minicart></minicart> } else { <div id="header-basket" class="header-basket--not-logged-in" data-text-header='@Translate("EmptyCartToolTipHeader", "Create user for shop" , true)' data-text-text='@Translate("EmptyCartToolTipText", "Please create a user in order to shop at HC Cargo and to see the basket. (If you already have a user, please log in)", true)' data-text-button='@Translate("EmptyCartToolTipButtonText", "Create user", true)' data-text-or='@Translate("Or", "or", true)' data-text-login='@Translate("Login", "Login", true)'> <div> <a class="header-basket-link"> <span id="header-basket-total"></span> <div class="cart-icon-container"> <span class="header-basket-count"></span> <svg class="hc-icon-basket"><use xlink:href="/Files/Templates/Designs/HCCargo_2015/images/icons.svg#hc-icon-basket"></use></svg> </div> </a> </div> </div> } <button type="button" class="mobile-nav-reveal" id="mobile-nav-reveal"> <!-- yyy: i stedet for MENU skal der stå "Menu og login" i den første span og "Luk" i den anden --> <span class="mobile-nav-reveal__text mobile-nav-reveal__text--when-closed">@Translate("MenuMobile", "Menu", true)<br>@Translate("AndLogin", "&amp; login", true)</span> <span class="mobile-nav-reveal__text mobile-nav-reveal__text--when-open">@Translate("CloseMobile", "Close", true)</span> </button> <div id="header-mobile-nav-dropdown" class="header-mobile-nav-dropdown"> <div class="mobile-lang-picker"> @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> @if (System.Web.HttpContext.Current.Request.Url.Host.Contains("nl") || System.Web.HttpContext.Current.Request.Url.Host.Contains("com")) { <form> <select class="select-language form-control"> <option>@Translate("ChooseLanguage", "Choose language", true)</option> @if (System.Web.HttpContext.Current.Request.Url.Host.Contains("com")) { @RenderParagraphContent(GetInteger("Item.Area.ExportLanguageListParagraphID")) } else if (System.Web.HttpContext.Current.Request.Url.Host.Contains("nl")) { @RenderParagraphContent(GetInteger("Item.Area.BelgiumLanguageListParagraphID")) } </select> </form> } </div> @if (GetBoolean("Item.Area.IsSublanguage")) { @GetValue("DwNavigation(mainnavigationbe)") } else { @GetValue("DwNavigation(mainnavigation)") } </div> @if (pageName == "Checkout") { <div id="checkout-support"> <h3>@Translate("SupportPhoneNumber", "Support: +00 12 23 45 56", true)</h3> </div> } </div> </div> </header> </div> <div ng-controller="SearchBannerController as ctrl"> <section id="site-search" class="@siteSearchClass" ng-if="!ctrl.currentStep || ctrl.currentStep < 1"> <div class="container"> <div class="row"> <div id="site-search-tabs-container" class="col-xs-12"> <input type="hidden" name="searchResultPagePath" id="hiddenSearchResultPagePath" value="/@hiddenSearchPageID"> <!-- Nav tabs --> <ul id="site-search-tabs" class="nav nav-tabs" role="tablist"> <li ng-class="{active: (ctrl.activeTabState.regularSearchIsActive && !ctrl.activeTabState.isMobile)}"> <a href="" ng-click="ctrl.activateRegularSearch(false)" id="regularSearchTab">@Translate("Regular", "Regular", true)</a> </li> <li ng-class="{active: (ctrl.activeTabState.vehicleSearchIsActive && !ctrl.activeTabState.isMobile)}"> <a href="" ng-click="ctrl.activateVehicleSearch(false)" id="vehicleSearchTab">@Translate("Vehicle", "Vehicle", true)</a> </li> <li ng-if="!ctrl.isGermanSite" ng-class="{active: (ctrl.activeTabState.licensePlateSearchIsActive && ctrl.activeTabState.isMobile)}" class="hidden-sm hidden-md hidden-lg"> <a href="" ng-click="ctrl.activateLicensePlateSearch(true)">@Translate("LicensePlate", "License plate", true)</a> </li> <li ng-class="{active: (ctrl.activeTabState.kbaSearchIsActive && ctrl.activeTabState.isMobile)}" class="hidden-sm hidden-md hidden-lg"> <a href="" ng-click="ctrl.activeKbaNumberSearch(true)">@Translate("KBA", "KBA", true)</a> </li> <li ng-if="ctrl.isGermanSite" ng-class="{active: (ctrl.activeTabState.licensePlateSearchIsActive && ctrl.activeTabState.isMobile)}" class="hidden-sm hidden-md hidden-lg"> <a href="" ng-click="ctrl.activateLicensePlateSearch(true)">@Translate("LicensePlate", "License plate", true)</a> </li> <li ng-class="{active: (ctrl.activeTabState.vinSearchIsActive && ctrl.activeTabState.isMobile)}" class="hidden-sm hidden-md hidden-lg"> <a href="" ng-click="ctrl.activeVinSearch(true)">@Translate("VIN", "VIN", true)</a> </li> </ul> <!-- Tab panes --> <div class="tab-content"> <!-- Regular search --> <div class="fake-input" ng-show="ctrl.activeTabState.regularSearchIsActive && !ctrl.activeTabState.isMobile"> <regular-search-banner search-term="ctrl.regularSearchState.searchTerm"></regular-search-banner> </div> <!-- Vehicule search --> <div ng-show="ctrl.activeTabState.vehicleSearchIsActive && !ctrl.activeTabState.isMobile"> <vehicle-search-banner state="ctrl.vehicleSearchState"></vehicle-search-banner> </div> <div class="hidden-sm hidden-md hidden-lg" ng-show="ctrl.activeTabState.isMobile"> <!-- Licence search --> <div ng-show="ctrl.activeTabState.licensePlateSearchIsActive"> <license-plate-banner></license-plate-banner> </div> <!-- KBA search --> <div ng-show="ctrl.activeTabState.kbaSearchIsActive"> <kba-number-banner></kba-number-banner> </div> <!-- VIN search --> <div ng-show="ctrl.activeTabState.vinSearchIsActive"> <vin-banner></vin-banner> </div> </div> </div> <!-- End tabs --> <!-- Alternate search form for >= tablet --> </div> <div class="alternate-tabs hidden-xs"> <!-- Nav tabs --> <ul id="site-alternate-search-tabs" class="nav nav-tabs" role="tablist"> <li ng-if="!ctrl.isGermanSite" ng-class="{active: ctrl.activeTabState.licensePlateSearchIsActive}"> <a href="" ng-click="ctrl.activateLicensePlateSearch()">@Translate("LicensePlate", "License plate", true)</a> </li> <li ng-class="{active: ctrl.activeTabState.kbaSearchIsActive}" ng-init="ctrl.isGermanSite ? ctrl.activeKbaNumberSearch(false): return;"> <a href="" ng-click="ctrl.activeKbaNumberSearch()">@Translate("KBA", "KBA", true)</a> </li> <li ng-if="ctrl.isGermanSite"> <a href="" ng-click="ctrl.activateLicensePlateSearch()">@Translate("LicensePlate", "License plate", true)</a> </li> <li ng-class="{active: ctrl.activeTabState.vinSearchIsActive}"> <a href="" ng-click="ctrl.activeVinSearch()">@Translate("VIN", "VIN", true)</a> </li> </ul> <div class="tab-content"> <!-- Licence search --> <div class="fake-input" ng-show="ctrl.activeTabState.licensePlateSearchIsActive"> <license-plate-banner></license-plate-banner> </div> <!-- KBA search --> <div ng-show="ctrl.activeTabState.kbaSearchIsActive"> <kba-number-banner></kba-number-banner> </div> <!-- VIN search --> <div ng-show="ctrl.activeTabState.vinSearchIsActive"> <vin-banner></vin-banner> </div> </div> <!-- End alternate search --> </div> </div> </div> </section> </div> <search-banner></search-banner> <div class="mobile-site-message-wrapper visible-xs"> <site-message></site-message> </div> <hc-alert-message context="FRONTPAGE"></hc-alert-message> @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> @{ int areaId = int.Parse(GetGlobalValue("Global:Area.ID")); bool isActive = false; string policyChangeId = ""; Dictionary<int, string> values = new Dictionary<int, string> { { 14, "20200320DE" }, { 10, "20171114DK" }, { 1, "20181126UK" }, { 5, "20200320NL" }, { 6, "20200320NL" }, { 13, "20200608SE" } }; if (values.ContainsKey(areaId)) { isActive = true; policyChangeId = values[areaId]; } } @if (isActive) { <div id="cookiePrivacyPolicyChangeNotification" class="row cookie-notification-block hidden" policy-change-id="@policyChangeId"> <p>@Translate("PrivacyPolicyChanged", "Privacy policy has changed", true)&nbsp;<span class="dismiss">@Translate("Close", "Close", true)</span></p> </div> } @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> @{ var siteUspVm = new { Environment = GetGlobalValue("NOV:Environment"), IsDev = GetGlobalValue("NOV:Environment") == "DEV", IsFrontPage = GetGlobalValue("Global:Pageview.LayoutTemplate").ToLower() == "frontpage.cshtml", IsLocalCustomer = GetGlobalValue("HC:DisplayFreeDelivery.IsLocalDomainOrLocalCustomer") == "True", IsAuthenticatedUser = GetGlobalValue("HC:DisplayFreeDelivery.IsAuthenticatedUser") == "True", HasFreeDeliveryLimitAmount = GetGlobalValue("HC:DisplayFreeDelivery.HasFreeDeliveryLimitAmount") == "True", IsAnonymousUser = GetGlobalValue("HC:DisplayFreeDelivery.IsAnonymousUser") == "True", FreeDeliveryAmount = GetString("Item.Area.FreeDeliveryLimit_BeforeAmount"), FreeDeliveryAmountAfter = GetString("Item.Area.FreeDeliveryLimit_AfterAmount"), FreeDeliveryAmountFormatted = GetGlobalValue("HC:DisplayFreeDelivery.FreeDeliveryLimitAmountFormatted"), FreeDeliveryAmountAnonymous = GetString("Item.Area.FreeDeliveryLimit_Anonymous") }; //var debugVm = HCBase.Util.ConvertObjectToJson(siteUspVm); string contactPageID = GetString("Item.Area.ContactPage_ID"); string newUserPageID = GetString("Item.Area.NewUserPage_ID"); string siteUspExtraClass=isCheckoutPage?"site-usp--checkout":""; } <section id="site-usp" class="site-usp @siteUspExtraClass"> <div class="container"> <div class="row"> @* isCheckoutPage is defined in \Application\Files\Templates\Designs\HCCargo_2015\templates\includes\header.cshtml - you can move it to somewhere more appropriate if needed *@ @if(isCheckoutPage){ <div class="col-xs-12"> @*the usp-list below has the same HTML as the others EXCEPT: a slightly different class on the UL tag and the div class="usp-list__content" that are on the other usp-lists are not here *@ <ul class="usp-list usp-list--horizontal-one-line"> @if (siteUspVm.IsLocalCustomer) { if (siteUspVm.IsAuthenticatedUser && siteUspVm.HasFreeDeliveryLimitAmount) { <li class="usp-list__item usp-list__item--wider"> <span class="usp-list__icon-holder"> <svg class="usp-list__icon"><use xlink:href="/files/templates/designs/hccargo_2015/images/icons.svg?v=20191202#hc-icon-truck"></use></svg> </span> <div class="usp-list__header">@siteUspVm.FreeDeliveryAmount&nbsp;@siteUspVm.FreeDeliveryAmountFormatted</div> </li> } if (siteUspVm.IsAnonymousUser) { <li class="usp-list__item usp-list__item--wider"> <span class="usp-list__icon-holder"> <svg class="usp-list__icon"><use xlink:href="/files/templates/designs/hccargo_2015/images/icons.svg?v=20191202#hc-icon-truck"></use></svg> </span> <div class="usp-list__header">@siteUspVm.FreeDeliveryAmountAnonymous</div> </li> } } <li class="usp-list__item"> <span class="usp-list__icon-holder"> <svg class="usp-list__icon"><use xlink:href="/files/templates/designs/hccargo_2015/images/icons.svg?v=20191202#hc-icon-clock"></use></svg> </span> <div class="usp-list__header">@Translate("USP_LineItem1_Title", "USP 1 Title [clock]", true)</div> </li> <li class="usp-list__item"> <span class="usp-list__icon-holder"> <svg class="usp-list__icon"><use xlink:href="/files/templates/designs/hccargo_2015/images/icons.svg?v=20191202#hc-icon-gear"></use></svg> </span> <div class="usp-list__header">@Translate("USP_LineItem2_Title", "USP 2 Title [gear]", true)</div> </li> <li class="usp-list__item"> <span class="usp-list__icon-holder"> <svg class="usp-list__icon"><use xlink:href="/files/templates/designs/hccargo_2015/images/icons.svg?v=20191202#hc-icon-ribbon"></use></svg> </span> <div class="usp-list__header">@Translate("USP_LineItem3_Title", "USP 3 Title [ribbon]", true)</div> </li> </ul> </div> }else{ <div class="col-xs-12 site-usp__holder"> <ul class="site-usp__list" id="site-usp-spots"> @if (siteUspVm.IsDev) { <li class="site-usp__list-item"> <hc-order-deadline-countdown></hc-order-deadline-countdown> </li> } @if (siteUspVm.IsLocalCustomer) { if (siteUspVm.IsAuthenticatedUser && siteUspVm.HasFreeDeliveryLimitAmount) { <li class="site-usp__list-item"> <svg class="site-usp__list-icon hc-icon-gear"><use xlink:href="/files/templates/designs/hccargo_2015/images/icons.svg?v=20191202#hc-icon-truck"></use></svg> <span class="site-usp__list-text">@siteUspVm.FreeDeliveryAmount @siteUspVm.FreeDeliveryAmountFormatted @siteUspVm.FreeDeliveryAmountAfter</span> </li> } if (siteUspVm.IsAnonymousUser) { <li class="site-usp__list-item"> <svg class="site-usp__list-icon hc-icon-gear"><use xlink:href="/files/templates/designs/hccargo_2015/images/icons.svg?v=20191202#hc-icon-truck"></use></svg> <span class="site-usp__list-text">@siteUspVm.FreeDeliveryAmountAnonymous</span> </li> } } </ul> @if (!siteUspVm.IsFrontPage) { <div class="site-usp__contact"> <a href="?ID=@contactPageID" class="btn btn-blue btn-flat hidden-sm">@Translate("Contact", "Contact", true)</a> @if (string.IsNullOrWhiteSpace(GetString("DW_extranet_AccessUserID"))) { <a href="?ID=@newUserPageID" id="create-account-btn" class="btn btn-orange btn-flat">@Translate("NewCustomer", "New customer?", true)</a> } </div> } </div> } </div> </div> </section> @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> <section id="breadcrumbs" class="breadcrumbs"> <div class="container"> <div class="row"> <!-- Only show list-options on product-list --> @if (!string.IsNullOrWhiteSpace(System.Web.HttpContext.Current.Request["groupid"]) || !string.IsNullOrWhiteSpace(System.Web.HttpContext.Current.Request["productid"]) || GetGlobalValue("Global:Page.NavigationTag") == "search") { <div class="col-sm-3 list-options"> @if (vm.User.IsLoggedOn) { <label> <input type="checkbox" id="show-price" checked=""> @Translate("ShowPrice", "Show price", true) </label> <label> <input type="checkbox" id="show-discount" checked=""> @Translate("ShowDiscount", "Show discount", true) </label> } </div> } </div> </div> </section> <section class="page-404"> <div class="container"> <div class="row"> <div class="col-xs-12"> <div id="404-content">@GetValue("DwContent(404content)")</div> </div> </div> </div> </section> @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> @{ string contactImage = GetString("Item.Area.ContactImage"); string contactMail = GetString("Item.Area.ContactMail"); string contactPhone = GetString("Item.Area.ContactPhone"); bool tokenInUrl = HttpContext.Current.Request.Url.Query.ToLowerInvariant().Contains("token"); } <footer id="footer"> <div class="container"> <div class="row"> @if (tokenInUrl == false) { <div class="col-xs-12 col-sm-6 col-md-3"> <h3>@GetString("Item.Area.DownloadsName")</h3> @GetValue("DwNavigation(FooterNavDownloads)") </div> } @if (tokenInUrl == false) { <div class="col-xs-12 col-sm-6 col-md-3"> <h3>@GetString("Item.Area.QuestionsName")</h3> @GetValue("DwNavigation(FooterNavQuestions)") </div> } <div class="col-xs-12 col-md-6"> <h3>@GetString("Item.Area.ContactHeader")</h3> <div class="footer-address"> <span><b>@GetString("Item.Area.ContactName")</b></span> <span>@GetString("Item.Area.ContactStreet")</span> <span>@GetString("Item.Area.ContactZipAndCity")</span> <span>@GetString("Item.Area.ContactCountry")</span> </div> <div class="footer-info-lines"> <span>@Translate("Phone", "Phone", true): <a href="tel:@contactPhone">@contactPhone</a> @Translate("PhoneTimeToday", "Phone time today", true) @Translate("PhoneFrom", "from", true) @GetString("Item.Area.ContactOpeningHour") @Translate("PhoneTo", "to", true) @GetString("Item.Area.ContactClosingHour")</span> <span class="footer-info-line">@Translate("Mail", "Mail", true): <a href="mailto:@contactMail">@contactMail</a></span> </div> @*<div class="footer-contact"> <div class="footer-contact-img"> @if (!string.IsNullOrWhiteSpace(contactImage)) { <div class="contact-img" style="background-image:url('@contactImage');"></div> } </div> <div class="footer-contact-info"> <h4>@GetString("Item.Area.ContactName")</h4> <p class="footer-contact-role">@GetString("Item.Area.ContactInfo")</p> <p>"@GetString("Item.Area.ContactQuote")"</p> </div> </div>*@ </div> <div class="col-xs-12 seals"> <div class="seal-container"> @if (GetInteger("Item.Area.MemberHeader") > 0) { <h5>@GetString("Item.Area.MemberHeader")</h5> <div class="member-of"> <img src="@GetString(" item.area.memberlogo")"="" alt="HC CARGO - Member of apra"> </div>} @if (GetInteger("Item.Area.SecureOnlinePayment") > 0) { <h5>@GetString("Item.Area.SecureOnlinePayment")</h5> <img src="@GetString(" item.area.cardsicon")"="" class="payment-cards" alt="Secure online payment at HC CARGO">} </div> </div> </div> </div> <div class="legal"> <div class="container"> <div class="row"> <div class="col-xs-12"> <p> © @DateTime.Now.Year Holger Christiansen A/S - Your Expert in Parts </p> @GetValue("DwNavigation(FooterNavTools)") <p style="float:right;"> @foreach (var i in GetLoop("Item.Area.CreditCardList")) { var iconUrl = i.GetValue("Item.Area.CreditCardList.Icon"); var cardName = i.GetValue("Item.Area.CreditCardList.Name"); <span><img src="@iconUrl" title="@cardName" style="height:25px;">&nbsp;</span> } </p> </div> </div> </div> </div> </footer> <div class="navigateTop"> <span class="navigateTopLink">@Translate("BackToTop", "Back to top", true)</span> <img src="/Files/Templates/Designs/HCCargo_2015/images/up-arrow.png"> </div> <div class="site-message-wrapper hidden-xs"> <site-message></site-message> </div> </div> @* @if (HCCargo.Commerce.CustomerCenter.GdprPopoverHandler.Show()) { @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> <section style="display:none;"> @{ var gdprVm = HCCargo.Commerce.CustomerCenter.GdprPopoverHandler.GetViewModel(); } </section> <div class="modal fade after-login-modal" id="after-login-modal" tabindex="-1" role="dialog" aria-labelledby="after-login-modal-title" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <span class="close" data-dismiss="modal" aria-hidden="true" style="cursor: pointer;"> <svg class="hc-icon-close"><use xlink:href="/files/templates/designs/hccargo_2015/images/icons.svg?v=20191202#hc-icon-close"></use></svg> </span> <h4 class="modal-title" id="after-login-modal-title">@Translate("GDPRPopover_Title", "GDPRPopover Title*", true)</h4> <p>@Translate("GDPRPopover_Subtitle", "GDPRPopover Subtitle*", true)</p> </div> <div class="modal-body"> @if (gdprVm.NewsletterGetConsent == true) { <div class="gdpr__wrapper"> <span class="checkbox__heading">@Translate("GDPRPopover_AllowNewsletters_Header", "GDPRPopover AllowNewsletters Header*", true)</span> <span>@Translate("GDPRPopover_AllowNewsletters_Description", "GDPRPopover AllowNewsletters Description*", true)</span> <div class="radio"> <label> <input type="radio" name="NewsletterChoice" value="true">&nbsp;@Translate("AllowNewsletters_OptionYes", "Yes*", true) </label> </div> <div class="radio"> <label> <input type="radio" name="NewsletterChoice" value="false">&nbsp;@Translate("AllowNewsletters_OptionNo", "No*", true) </label> </div> </div> } @if (gdprVm.PhoneCallGetConsent == true) { <div class="gdpr__wrapper"> <span class="checkbox__heading">@Translate("GDPRPopover_AllowCommercialPhoneCalls_Header", "GDPRPopover AllowCommercialPhoneCalls Header*", true)</span> <span>@Translate("GDPRPopover_AllowCommercialPhoneCalls_Description", "GDPRPopover AllowCommercialPhoneCalls Description*", true)</span> <div class="radio"> <label><input type="radio" name="PhonecallChoice" value="true">&nbsp;@Translate("AllowCommercialPhoneCalls_OptionYes", "Yes*", true)</label> </div> <div class="radio"> <label><input type="radio" name="PhonecallChoice" value="false">&nbsp;@Translate("AllowCommercialPhoneCalls_OptionNo", "No*", true)</label> </div> </div> } </div> <div class="modal-footer"> <button type="button" class="btn btn-orange js-submit">@Translate("GDPRPopover_SubmitButton", "GDPRPopover SubmitButton*", true)</button> </div> <div> @Translate("GDPRPopover_FooterText", "GDPRPopover FooterText*", true) <div style="display: none;"> <p>Newsletter: @gdprVm.NewsletterGetConsent</p> <p>Phonecalls: @gdprVm.PhoneCallGetConsent</p> </div> </div> </div> </div> </div> <script> (function () { var modal = $('#after-login-modal'); var newsletterAllowed = null; var phonecallAllowed = null; function run() { modal.modal('show'); } function init() { modal.on('change', 'input[type=radio][name=NewsletterChoice]', onChangeNewsletter); modal.on('change', 'input[type=radio][name=PhonecallChoice]', onChangePhonecall); modal.on('click', '.js-submit', onSubmit); window.setTimeout(run, 1500); } function onChangeNewsletter() { newsletterAllowed = $(this).val() === 'true'; } function onChangePhonecall() { phonecallAllowed = $(this).val() === 'true'; } function onSubmit() { modal.modal('hide'); var request = { 'Newsletter': newsletterAllowed, 'Phonecall': phonecallAllowed }; $.when( $.ajax({ url: HC.path.ajax + 'customercenter.aspx/GdprPopover', type: 'POST', async: false, contentType: 'application/json; charset=utf-8', dataType: 'json', data: JSON.stringify({ request: request }) }) ) .then( // success function () { }, // failure function () { } ); } init(); })(); </script> } *@ @if (HCCargo.Commerce.CustomerCenter.FirstLoginPopoverComponent.Show()) { @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> <section style="display:none;"> @{ var firstLoginVm = HCCargo.Commerce.CustomerCenter.FirstLoginPopoverComponent.GetViewModel(); var pidDataPrivacyPolicy = int.Parse(Pageview.Area.Item["DataPrivacyParagraphId"] as string); } @functions{ string ConvertToJsBool(bool value) { return value ? "true" : "false"; } } </section> <div class="modal fade first-login-popover" id="first-login-popover" data-backdrop="static" data-keyboard="false" tabindex="-1" role="dialog" aria-labelledby="first-login-popover-title" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <h4 class="modal-title" id="first-login-popover-title">@Translate("FirstLoginPopover_Title", "FirstLoginPopover_Title*", true)</h4> <p>@Translate("FirstLoginPopover_Subtitle", "FirstLoginPopover_Subtitle*", true)</p> </div> <div class="modal-body"> @if (firstLoginVm.DataPrivacyGetConsent) { <div class="checkbox"> <label> <input type="checkbox" name="DataPrivacyChoice" class="js-acceptDataPrivacy"> <span class="checkbox__heading">@Translate("Profile_AcceptDataPrivacyPolicy_Header", "Profile_AcceptDataPrivacyPolicy_Header", true)</span> <span>@Translate("Profile_AcceptDataPrivacyPolicy_Description", "Profile_AcceptDataPrivacyPolicy_Description*", true)</span> </label> <br> <label> <button type="button" class="btn btn-info js-viewDataPrivacy">@Translate("ReadDataPrivacyPolicy", "Read data privacy policy", true)</button> </label> </div> } @if (firstLoginVm.NewsletterGetConsent) { <div class="gdpr__wrapper"> <span class="checkbox__heading">@Translate("Profile_AllowNewsletters_Header", "Profile AllowNewsletters Header*", true)</span> <span>@Translate("Profile_AllowNewsletters_Description", "Profile AllowNewsletters Description*", true)</span> <div class="radio"> <label> <input type="radio" name="NewsletterChoice" value="true">&nbsp;@Translate("NewsletterDialogOptionYes", "Yes*", true) </label> </div> <div class="radio"> <label> <input type="radio" name="NewsletterChoice" value="false">&nbsp;@Translate("NewsletterDialogOptionNo", "No*", true) </label> </div> </div> } @if (firstLoginVm.PhoneCallGetConsent) { <div class="gdpr__wrapper"> <span class="checkbox__heading">@Translate("Profile_AllowCommercialPhoneCalls_Header", "Profile AllowCommercialPhoneCalls Header*", true)</span> <span>@Translate("Profile_AllowCommercialPhoneCalls_Description", "Profile AllowCommercialPhoneCalls Description*", true)</span> <div class="radio"> <label><input type="radio" name="PhonecallChoice" value="true">&nbsp;@Translate("AllowCommercialPhoneCalls_OptionYes", "Yes*", true)</label> </div> <div class="radio"> <label><input type="radio" name="PhonecallChoice" value="false">&nbsp;@Translate("AllowCommercialPhoneCalls_OptionNo", "No*", true)</label> </div> </div> } </div> <div class="modal-footer"> <button type="button" class="btn btn-orange js-submit disabled">@Translate("NewsletterDialogSubmit", "Submit and continue", true)</button> </div> </div> </div> </div> <div class="modal fade" id="data-privacy-popover" tabindex="-1" role="dialog" aria-labelledby="data-privacy-popover-title" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <span class="close" data-dismiss="modal" aria-hidden="true" style="cursor: pointer;"> <svg class="hc-icon-close"><use xlink:href="/files/templates/designs/hccargo_2015/images/icons.svg?v=20191202#hc-icon-close"></use></svg> </span> <h5 class="modal-title login-view-title">@Translate("DataPrivacyPopover_Title", "Data privacy policy", true)</h5> </div> <div class="modal-body"> @RenderParagraphContent(pidDataPrivacyPolicy) </div> </div> </div> </div> <script> $(function () { var component = $("#first-login-popover"), modal = $("#first-login-popover"), btnSubmit = component.find(".js-submit"), isValid = false, validationRules = { requireDataPrivacyAccept: @ConvertToJsBool(firstLoginVm.DataPrivacyGetConsent), requireNewslettersChoice: @ConvertToJsBool(firstLoginVm.NewsletterGetConsent), requirePhonecallsChoice: @ConvertToJsBool(firstLoginVm.PhoneCallGetConsent) }, request = { acceptDataPrivacy: false, acceptNewsletters: null, acceptPhonecalls: null }; init(); function init() { modal.on("change", "input[type=checkbox][name=DataPrivacyChoice]", onChangeDataPrivacy); modal.on('change', 'input[type=radio][name=NewsletterChoice]', onChangeNewsletter); modal.on('change', 'input[type=radio][name=PhonecallChoice]', onChangePhonecall); btnSubmit.on("click", onSubmit); component.find(".js-viewDataPrivacy").on('click', onViewDataPrivacy); window.setTimeout(run, 1500); } function run() { modal.modal('show'); } function onViewDataPrivacy() { $("#data-privacy-popover").modal("show"); } function onChangeDataPrivacy() { request.acceptDataPrivacy = $(this).prop("checked"); validateRequest(); } function onChangeNewsletter() { request.acceptNewsletters = $(this).val() === "true"; validateRequest(); } function onChangePhonecall() { request.acceptPhonecalls = $(this).val() === "true"; validateRequest(); } function validateRequest() { var validDataPrivacyChoice = validationRules.requireDataPrivacyAccept === true ? request.acceptDataPrivacy === true : true; var validNewslettersChoice = validationRules.requireNewslettersChoice === true ? request.acceptNewsletters !== null : true; var validPhonecallsChoice = validationRules.requirePhonecallsChoice === true ? request.acceptPhonecalls !== null : true; isValid = validDataPrivacyChoice && validNewslettersChoice && validPhonecallsChoice; if (isValid) { btnSubmit.removeClass("disabled"); } else { btnSubmit.addClass("disabled"); } } function onSubmit() { if (validateRequest() === false) return; modal.modal('hide'); $.ajax({ url: HC.path.ajax + 'customercenter.aspx/firstlogin', type: 'POST', async: true, contentType: 'application/json; charset=utf-8', dataType: 'json', data: JSON.stringify({ request: request }) }); } }); </script> } @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> <div class="modal fade upselling-vehicle-modal" id="upselling-vehicle-modal" tabindex="-1" role="dialog" aria-labelledby="modal-title" aria-hidden="true" data-content-page-id="@vm.AreaItem.upsellingVehicleListPageID"> <div class="modal-dialog"> <div class=""> <div class="modal-header"> <span class="close" data-dismiss="modal" aria-hidden="true"> <svg class="hc-icon-close"><use xlink:href="/files/templates/designs/hccargo_2015/images/icons.svg?v=20191202#hc-icon-close"></use></svg> </span> <h5 class="modal-title" id="modal-title">@Translate("SelectVehicle", "Select vehicle", true)</h5> </div> <div class="modal-content"> <!-- Content is loaded here --> </div> </div> </div> </div> <div class="modal fade upselling-product-modal" id="upselling-product-modal" tabindex="-1" role="dialog" aria-labelledby="modal-title" aria-hidden="true" data-content-page-id="@vm.AreaItem.upsellingProductListPageID"> <div class="modal-dialog"> <div class=""> <div class="modal-header"> <span class="close" data-dismiss="modal" aria-hidden="true"> <svg class="hc-icon-close"><use xlink:href="/files/templates/designs/hccargo_2015/images/icons.svg?v=20191202#hc-icon-close"></use></svg> </span> <h5 class="modal-title" id="modal-title">@Translate("SelectProduct", "Select Select product", true)</h5> <button type="button" class="btn btn-info btn-sm back-to-vehicle-modal">@Translate("Back", "Back", true)</button> </div> <div class="modal-content"> <!-- Content is loaded here --> </div> </div> </div> </div> <div class="modal fade upselling-reminder-modal" id="upselling-reminder-modal" tabindex="-1" role="dialog" aria-labelledby="modal-title" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="upselling-dryer hidden"> <div class="modal-header"> <h5 class="modal-title" id="modal-title">@Translate("CompressorWasAddedToYourCartRememberADryer", "Compressor was added to your cart - Remember a dryer", true)!</h5> </div> <div class="modal-body"> <p>@Translate("RememberToChangeDryerWhenYouServiceOrChangeTheCompressor", "Remember to change dryer when you service or change the compressor...", true)</p> </div> </div> <div class="upselling-belt hidden"> <div class="modal-header"> <h5 class="modal-title" id="modal-title">@Translate("AlternatorWasAddedToYourCartRememberABelt", "Alternator was added to your cart - Remember a belt", true)!</h5> </div> <div class="modal-body"> <p>@Translate("RememberToChangeBeltWhenYouServiceOrChangeTheAlternator", "Remember to change belt when you service or change the alternator...", true)</p> </div> </div> <div class="modal-footer"> <button type="button" class="btn btn-primary _cancel" data-dismiss="modal">@Translate("Close", "Close", true)</button> <button type="button" class="btn btn-orange trigger-upselling dryer hidden" data-upselling-group="Tørfilter">@Translate("SelectDryer", "Select a dryer", true)</button> <button type="button" class="btn btn-orange trigger-upselling belt hidden" data-upselling-group="Remskiver">@Translate("SelectBelt", "Select a belt", true)</button> </div> </div><!-- /.modal-content --> </div> </div> <div class="modal fade ajax-error-modal" id="ajax-error-modal" tabindex="-1" role="dialog" aria-labelledby="modal-title" aria-hidden="true" data-backdrop="static"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="modal-title">@Translate("AjaxErrorModal_Header", "Cart action did not succeed", true)</h5> </div> <div class="modal-body"> @Translate("AjaxErrorModal_Body", "<p>Your last cart action failed due to a communication error</p><p>Please reload the page and try again.</p>", true) </div> <div class="modal-footer"> <button type="button" class="btn btn-orange js-reloadbutton">@Translate("AjaxErrorModal_Button_ReloadPage", "Reload page", true)</button> <div class="alert alert-success js-reloadmessage hidden" role="alert">@Translate("ReloadingPage", "Reloading page...", true)&nbsp;<span class="loading-icon hidden"></span></div> </div> </div><!-- /.modal-content --> </div> </div> <vehicle-filter-overlay></vehicle-filter-overlay> <div class="modal site-is-down" id="site-is-down" data-backdrop="static" data-keyboard="false" tabindex="-1" role="dialog" aria-labelledby="modal-title" aria-hidden="true"> <div class="modal-dialog"> <div class=""> <div class="modal-header"> <h5 class="modal-title" id="modal-title">@Translate("SiteIsDownHeader", "Website is down for maintenance", true)</h5> </div> <div class="modal-content"> <p style="padding-top: 5px;">@Translate("SiteIsDownText", "Sorry for the inconvenience", true)</p> </div> </div> </div> </div> <div id="catalog-product-buy-adjusted-minimum-quantity" class="hidden" title='@Translate("CartQuantityAdjusted", "Cart quantity adjusted", true)'> @Translate("MinimumOrderQuantity", "Minimum order quantity is", true)&nbsp;{0}.<br><b>@Translate("QuantityInCart", "Quantity in cart is now", true)&nbsp;{1}.</b> </div> <div id="catalog-product-buy-adjusted-multiple-quantity" class="hidden" title='@Translate("CartQuantityAdjusted", "Cart quantity adjusted", true)'> @Translate("MultipleOrderQuantity", "Order multiple is", true)&nbsp;{0}.<br><b>@Translate("QuantityInCart", "Quantity in cart is now", true)&nbsp;{1}.</b> </div> @if (vm.User.IsLoggedOn) { <upselling-overlay></upselling-overlay> if (useNewCart) { <quick-order element-id="'frontpage-quickorder'" element-class="'btn btn-primary quick-order-btn'"></quick-order> } else { if (string.IsNullOrWhiteSpace(GetGlobalValue("NOV:Page:IsCheckout"))) { <div id="frontpage-quickorder" class="quick-order-btn"> <a href="#" class="btn multiple-entries" data-redirect="?id=@vm.AreaItem.checkoutPageID">@Translate("QuickOrdering", "Quick ordering", true)</a> </div> } @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> <div class="modal fade quickordering-dialog" id="quickordering-dialog" tabindex="-1" role="dialog" aria-labelledby="modal-title" aria-hidden="true"> <div class="modal-dialog"> <div class=""> <div class="modal-header"> <span class="close" data-dismiss="modal" aria-hidden="true"> <svg class="hc-icon-close"><use xlink:href="/files/templates/designs/hccargo_2015/images/icons.svg?v=20191202#hc-icon-close"></use></svg> </span> <h5 class="modal-title" id="modal-title">@Translate("QuickOrdering", "Quick ordering", true)</h5> </div> <div class="modal-content"> <table class="table" id="quickordertable" cellpadding="0" cellspacing="0" border="0" style="margin-top:5px;width:100%;"> <!--<colgroup> <col style="width:50px;" /> <col style="width:70px;" /> <col style="width:310px;" /> <col style="width:50px;" /> <col style="width:50px;" /> </colgroup>--> <thead> <tr> <td colspan="99"> <button type="button" class="_addLinesToCart btn btn-orange pull-right" disabled="disabled"><span>@Translate("AddToCart", "Add to cart", true)</span></button> </td> </tr> <tr> <td colspan="5" style=""> <textarea id="txtPaste" rows="5" cols="20" class="form-control" placeholder='@Translate("PasteProductNumberAmountHere", "Paste product numbers and quantities here.", true)'></textarea> </td> </tr> <tr> <td colspan="5" style="border:0px;"> <div id="isPasting" style="display: none;border:1px solid #aaa; margin:0px 0px 5px 0px; padding: 3px;"><img src="/files/system/gfx/ajax-loader.gif" align="absmiddle" style="margin-right:3px;">@Translate("PastingLines", "Pasting lines", true)</div> <div id="isValidating" style="display: none;border:1px solid #aaa; margin:0px 0px 5px 0px; padding: 3px;"><img src="/files/system/gfx/ajax-loader.gif" align="absmiddle" style="margin-right:3px;">@Translate("ValidatingLines", "Validating lines", true)</div> <div id="isAddingLines" style="display: none;border:1px solid #aaa; margin:0px 0px 5px 0px; padding: 3px;"><img src="/files/system/gfx/ajax-loader.gif" align="absmiddle" style="margin-right:3px;">@Translate("AddingLines", "Adding lines", true)</div> <div id="hasAdjustedQuantities" style="display: none;border:1px solid #aaa; margin:0px 0px 5px 0px; padding: 3px;"><img src="/files/system/gfx/icon-info.png" align="absmiddle" style="margin-right:3px;">@Translate("QuantitiesAdjusted", "Quantities adjusted", true)</div> </td> </tr> <tr class="headlines"> <th class="roundtopleft">@Translate("Status", "Status", true)</th> <th>@Translate("Number", "Number", true)</th> <th>@Translate("Name", "Name", true)</th> <th>@Translate("Qty", "Qty", true)</th> <th class="roundtopright">&nbsp;</th> </tr> </thead> <tfoot> <tr> <td colspan="99"> <button type="button" class="_addLinesToCart btn btn-orange" disabled="disabled"><span>@Translate("AddToCart", "Add to cart", true)</span></button> </td> </tr> </tfoot> <tbody id="pasteLines"></tbody> </table> <span class="label-purchqtyminimumroundup hidden">@Translate("MinimumPurchableQuantityIs", "Minimum purchable quantity is", true) {0}, @Translate("SoTheRequested", "so the requested", true) {1} @Translate("HaveBeenRoundedUpTo", "have been rounded up to", true) {2}.</span> <span class="label-purchqtycolliroundup hidden">@Translate("PurchaseQuantityMultipleIs", "Purchase quantity multiple is", true) {0}, @Translate("SoTheRequested", "so the requested", true) {1} @Translate("HaveBeenRoundedUpTo", "have been rounded up to", true) {2}.</span> </div> </div> </div> </div> <script type="text/html" id="template-quickorderingresultline"> <div class="alert alert-warning"> <% if (State === 0) { %> <% } else if (State === 1) { %> @Translate("ProductNoPrice", "Product has no price", true) <% } else if (State === 2) { %> @Translate("ProductNotAvailable", "Product not available", true) <% } else if (State === 3) { %> @Translate("ProductDoesNotExist", "Product does not exist", true) <% } else { %> @Translate("GeneralError", "General error", true) <% } %> </div> </script> <script type="text/html" id="template-quickorderingproductline"> <% _.each( collection, function (line) { %> <tr id="line_<%= line.LineIdx %>" class="_productLine row<%= [" 1","0"][line.lineidx % 2] %> " lineIdx="<%= line.LineIdx %>" citLineStatus="" > <td style="text-align: center;"> <img id="linestatus_<%= line.LineIdx %>" src="/files/templates/designs/hccargo_2015/images/checked_10x10.png" /> </td> <td> <input class="__pasteinp _productId form-control" type="text" style="width:80px;" value="<%= line.ProductId %>" /> </td> <td> <input class="__pasteinp_dis _productName form-control" type="text" style="width:250px;" disabled="disabled" id="productname_<%= line.LineIdx %>" value="<%= line.ProductName %>" /> </td> <td> <input class="__pasteinp _productQty _quantityToAdd form-control" type="number" style="text-align: right; width: 70px;" value="<%= line.Quantity %>" /> </td> <td style="text-align:center;" title="@Translate("Delete", "Delete", true)"> <img class="_deleteLine" style="cursor:pointer;" src="/files/templates/designs/hccargo_2015/images/del_16x16.png" /> </td> </tr> <% }) %> </script> <script src="/files/system/js/custom/page/hccargo.quickordering.js?v=20170518"></script> } } <div id="transparent-overlay"></div> <div id="cookieInfo" data-cookie-info-path="/Default.aspx?ID=@vm.AreaItem.cookiePageID" data-btn-text-show="Acceptér cookies" data-btn-text-hide="Cookies?"></div> <script src='@Application.RazorHelpers.GetFileWithCacheBuster("~/files/templates/designs/hccargo_2015/dist/scripts/angular-main.min.js")'></script> <script src='@Application.RazorHelpers.GetFileWithCacheBuster("~/files/templates/designs/hccargo_2015/dist/scripts/master.min.js")'></script> @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> @using System.Web @using System.Globalization @functions { private static Dictionary<string, string> _sanitizeJsonTokens = new Dictionary<string, string> { { "\\", "" }, { "\\\\", "" }, { "\b", "" }, { "\f", "" }, { "\n", " " }, { "\r", " " }, { "\t", " " }, { "\v", "" }, { "\"", "" }, }; public string SanitizeTranslationValue(string s) { foreach (KeyValuePair<string, string> c in _sanitizeJsonTokens) { string toReplace = c.Key.ToString(CultureInfo.InvariantCulture); string replacement = c.Value.ToString(CultureInfo.InvariantCulture); s = s.Replace(toReplace, replacement); } return s; } } <script> var dynamicweb = dynamicweb || {}; dynamicweb.translations = dynamicweb.translations || {}; dynamicweb.translate = function (translationJsonPath, returnNullIfNotFound) { var arr = translationJsonPath.split("."); var validTranslation = false; var translation = null; var translation = dynamicweb.translations; for(var i=0; i < arr.length; i++) { if(typeof(arr[i]) === "undefined" || !arr[i].length ) { continue; } if(typeof translation === "string") { break; } if(translation[arr[i]]) { translation = translation[arr[i]]; } else { break; } } return (typeof translation === "string") ? translation : (typeof(returnNullIfNotFound) !== "undefined" && returnNullIfNotFound === true) ? null : arr[arr.length -1]; } dynamicweb.translations = { 'products': "@SanitizeTranslationValue( Translate("Products", "Products", true) )", 'asc': "@SanitizeTranslationValue( Translate("Asc", "asc", true) )", 'desc': "@SanitizeTranslationValue( Translate("Desc", "desc", true) )", 'vehicle': { 'make': "@SanitizeTranslationValue( Translate("Manufacturer", "Manufacturer", true) )", 'modelSeries': "@SanitizeTranslationValue( Translate("ModelSeries", "Model series", true) )", 'engineSize': "@SanitizeTranslationValue( Translate("EngineSize", "Engine size", true) )", 'fuel': "@SanitizeTranslationValue( Translate("Fuel", "Fuel", true) )", 'fromDate': "@SanitizeTranslationValue( Translate("FromDate", "From date", true) )", 'toDate': "@SanitizeTranslationValue( Translate("ToDate", "To date", true) )", 'engineBrand': "@SanitizeTranslationValue( Translate("EngineBrand", "Engine brand", true) )", 'engineType': "@SanitizeTranslationValue( Translate("EngineType", "Engine type", true) )", 'kw': "@SanitizeTranslationValue( Translate("KW", "KW", true) )", 'horsePower': "@SanitizeTranslationValue( Translate("VehicleHorsePower", "Vehicle horse power", true) )", 'bodyType': "@SanitizeTranslationValue( Translate("ChassisType", "Chassis type", true) )", 'modelType': "@SanitizeTranslationValue( Translate("ModelType", "Model type", true) )", 'engineVolume': "@SanitizeTranslationValue( Translate("EngineVolume", "Engine volume", true) )", 'cylinders': "@SanitizeTranslationValue( Translate("Cylinders", "Cylinders", true) )", 'typeDescription': "@SanitizeTranslationValue( Translate("TypeDescription", "Type Description", true) )", 'carListType': "@SanitizeTranslationValue( Translate("CarListType", "Car List Type", true) )" }, 'CANCELLED': "@SanitizeTranslationValue( Translate("Cancelled", "Cancelled", true) )", 'REFUSED': "@SanitizeTranslationValue( Translate("Refused", "Refused", true) )", }; dynamicweb.translations['cart'] = { }; dynamicweb.translations['contactMap'] = { 'world': "@SanitizeTranslationValue( Translate("World", "World", true) )", 'europe': "@SanitizeTranslationValue( Translate("Europe", "Europe", true) )" }; dynamicweb.translations['cart'] = { 'AVAILABILITY': "@SanitizeTranslationValue( Translate("CartLineChangedReason_AVAILABILITY", "Product availability has changed", true) )", 'QUANTITY': "@SanitizeTranslationValue( Translate("CartLineChangedReason_QUANTITY", "Line quantity has been reduced", true) )", 'UNKNOWNPRODUCT': "@SanitizeTranslationValue( Translate("CartLineChangedReason_UNKNOWNPRODUCT", "Line with unknown product has been deleted", true) )", 'PACKAGING': "@SanitizeTranslationValue( Translate("CartLineChangedReason_PACKAGING", "Line modified due to change in packaging", true) )", 'CANCELLED': "@SanitizeTranslationValue( Translate("PaymentWasCancelled", "You have cancelled the payment process.", true) )", 'REFUSED': "@SanitizeTranslationValue( Translate("PaymentWasRefused", "Payment was refused. Please verify payment information and try again.", true) )", 'PAYMENTUNAVAILABLE': "@SanitizeTranslationValue( Translate("PaymentUnavailable", "Payment Method information is not available on the cart. Aborting.", true) )" }; dynamicweb.translations['paymentStep'] = { 'ONLINE': "@SanitizeTranslationValue( Translate("OnlinePayment", "Pay online", true) )", 'INVOICE': "@SanitizeTranslationValue( Translate("InvoicePayment", "Pay with invoice", true) )" }; dynamicweb.translations['upselling'] = { 'groupTitles': { 'Tørfilter': "@SanitizeTranslationValue( Translate("SelectDryer", "Select a dryer", true) )", 'Remskiver': "@SanitizeTranslationValue( Translate("SelectBelt", "Select a belt", true) )" } }; dynamicweb.translations['returns'] = { 'confirm': "@SanitizeTranslationValue( Translate("ReturnsConfirm", "Are you sure information is corect?", true) )", 'pendingItemWarning': "@SanitizeTranslationValue( Translate("PendingItemWarning", "You have a pending return item - do you want to continue? (return item will be lost)", true) )", 'fieldTitles': { "LicensePlate": "@SanitizeTranslationValue( Translate("LicensePlate", "License plate", true) )", "VIN": "@SanitizeTranslationValue( Translate("VIN", "VIN", true) )", "VehicleMakeAndModel": "@SanitizeTranslationValue( Translate("VehicleMakeAndModel", "Vehicle make & model", true) )", "YearOfCar": "@SanitizeTranslationValue( Translate("YearOfCar", "Year of car", true) )", "FuelType": "@SanitizeTranslationValue( Translate("FuelType", "Fuel Type", true) )", "EngineSize": "@SanitizeTranslationValue( Translate("EngineSize", "Engine size", true) )", "EngineType": "@SanitizeTranslationValue( Translate("EngineType", "Engine type", true) )", "EngineBrand": "@SanitizeTranslationValue( Translate("EngineBrand", "Engine brand", true) )", "Comment": "@SanitizeTranslationValue( Translate("Comment", "Comment", true) )", "WarrantyComment": "@SanitizeTranslationValue( Translate("WarrantyComment", "WarrantyComment", true) )", "CustomerCommentsOnWarrantyDescription": "@SanitizeTranslationValue( Translate("CustomerCommentsOnWarrantyDescription", "Customer comments on warranty description", true) )", "QuantityOrdered": "@SanitizeTranslationValue( Translate("QuantityOrdered", "Quantity ordered", true) )", "QuantityDelivered": "@SanitizeTranslationValue( Translate("QuantityDelivered", "Quantity delivered", true) )", "OrderedByMistakeComment": "@SanitizeTranslationValue( Translate("OrderedByMistakeComment", "Ordered my mistake", true) )", 'OeReference': "@SanitizeTranslationValue(Translate("OeReference", "OE Reference", true))", 'DifferenceOeAndCargo': "@SanitizeTranslationValue(Translate("DifferenceOeAndCargo", "Difference between OE and CARGO", true))", 'DoesNotFitExplanation': "@SanitizeTranslationValue(Translate("DoesNotFitExplanation", "Why doesn't it fit?", true))", 'ProductDelivered': "@SanitizeTranslationValue(Translate("ProductDelivered", "Delivered products number", true))", 'ProductOrdered': "@SanitizeTranslationValue(Translate("ProductOrdered", "Ordered products number", true))", 'OrderedByMistakeComment': "@SanitizeTranslationValue(Translate("OrderedByMistakeComment", "Ordered by mistake comment", true))", 'ReturnQuantity': "@SanitizeTranslationValue(Translate("ReturnQuantity", "Quantity to return", true))", }, "reasonUnderLineText": { "Wrong art": "@SanitizeTranslationValue( Translate("WrongArticleReturnRejectedParts", "Please place a new order for the product you did not receive. We will send correction credit note when we receive your return", true) )" }, 'listOptionLabels': { 'CustomerCommentsOnWarrantyDescription': { 'InstallmentIssues' : "@SanitizeTranslationValue(Translate("InstallmentIssues" , "Installment issues / Do not fit", true))", 'RegulatorError' : "@SanitizeTranslationValue(Translate("RegulatorError" , "Regulator error", true))", 'Noise' : "@SanitizeTranslationValue(Translate("Noise", "Noise", true))", 'Leak' : "@SanitizeTranslationValue(Translate("Leak", "Leak", true))", 'PeriodicError': "@SanitizeTranslationValue(Translate("PeriodicError" , "Periodic error", true))", 'Other' : "@SanitizeTranslationValue(Translate("Other" , "Other", true))" } } }; </script> <script> var msg1 = "@Translate("YourBrowserIsOutdatedTitle", "Your browser is outdated", true)"; var msg2 = "@Translate("YourBrowserIsOutdatedText", "Update now", true)"; </script> <!--[if lt IE 10]> <script src="https://hc-cargo.co.uk/files/Templates/Designs/HCCargo_2015/scripts/warning.js"></script> <![endif]--> @if (!string.IsNullOrWhiteSpace(GetGlobalValue("NOV:CookieLevel2Active"))) { <text> @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> <script type="text/javascript"> window.emosTrackVersion = 2; </script> @if (GetGlobalValue("NOV:Environment") == "LIVE") { <script type="text/javascript" src="/files/system/js/econda/emos2.20170714.js"></script> } <script type="text/javascript"> @* // TODO: CFI // Kan den ikke komme ind i master.js og blive kørt på doc-ready sammen med resten? *@ $(function () { HC.econda.trackPageView(); @* //if (!HC.econdaSettings.suppressDefault) { // HC.econda.trackPageView(); //} *@ }); </script> </text> } <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.22.1/moment.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.22.1/locale/@(LanguageCodeToLocale(vm.Global.LanguageCode)).js" charset="utf-8"></script> <script> moment.locale("@LanguageCodeToLocale(vm.Global.LanguageCode)"); </script> @if (!string.IsNullOrWhiteSpace(GetGlobalValue("NOV:Access.MetadataEditor"))) { <script> @* 20160415 cfi/novicell - Metadata editor trigger... *@ (function () { $('BODY').on('catalog-group-click', function (event, data) { console.log('Catalog group clicked!! ' + data.groupId); sendToConsole('GROUP', data.groupId); }); $('BODY').on('catalog-product-click', function (event, data) { console.log('Catalog product clicked!! ' + data.productId); sendToConsole('PRODUCT', data.productId); }); function sendToConsole(type, id) { var consoleWindow = null; @*//var urlBase = 'http://localhost:3000/';*@ @*//var urlBase = 'http://hc-cargo.local.novicell.dk/metadata/r/';*@ var urlBase = '/metadata/r/'; var urlParms = ''; if (type === 'GROUP') { urlParms = 'group/en?id=' + encodeURIComponent(id); } else { urlParms = 'product/en/' + id; } consolewindow = window.open(urlBase + urlParms, 'MetadataEditor' + HC.siteName); } })(); </script> } @if (!string.IsNullOrWhiteSpace(GetGlobalValue("NOV:Raygun.IsActive"))) { <script> Raygun.init('@GetGlobalValue("NOV:Raygun.ApiKey")', { allowInsecureSubmissions: true, debugMode: false, ignore3rdPartyErrors: true, wrapAsynchronousCallbacks: true, disableErrorTracking: true, disablePulse: false, }).attach(); Raygun.setUser(HC.user.id, false); </script> } @if (vm.User.IsLoggedOn && vm.User.Id == 15347) { <script> //if ('serviceWorker' in navigator) { // window.addEventListener('load', function () { // navigator.serviceWorker.register('./service-worker.js').then(function (registration) { // //console.log('ServiceWorker registration successful with scope: ', registration.scope); // }, function (err) { // //// registration failed :( // console.log('ServiceWorker registration failed: ', err); // }); // }); //} if (window.navigator && navigator.serviceWorker) { navigator.serviceWorker.getRegistrations() .then(function (registrations) { console.log('ServiceWorkerRegistrations found.', registrations); for (let registration of registrations) { registration.unregister(); console.log('unregister SW: ', registration) } }); } </script> } </body> </html>