Exception in template (Designs/HCCargo_2015/_parsed/angular-catalog.parsed.cshtml): System.FormatException: String was not recognized as a valid Boolean.
   at System.Boolean.Parse(String value)
   at CompiledRazorTemplates.Dynamic.acbeabbebdda.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", AreaItem = new { isSublanguage = StringToBool(GetString("Item.Area.IsSublanguage")), headerCartPageID = GetString("Item.Area.HeaderCartPage_ID"), maxiCartPageID = GetString("Item.Area.Maxi_Cart_Page_ID"), maxiCartLinesPageID = GetString("Item.Area.MaxiCartLinesPage_ID"), 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"), Title = GetString("Title"), SearchApiUrl = GetGlobalValue("NOV:SearchApiUrl") }, User = new { Id = int.Parse(GetGlobalValue("Global:Extranet.UserID")), DataAreaId = GetGlobalValue("CIT:User.DataAreaId"), IsLoggedOn = StringToBool(GetGlobalValue("CIT:User.IsLoggedOn")), IsExport = StringToBool(GetGlobalValue("NOV:User.IsExport")), FreeDeliveryLimitAmountFormatted = GetString("NOV:User.FreeDeliveryLimitAmountFormatted") }, 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; if (HCBase.Util.IsLoggedIn) { var user = HCBase.ServiceLocatorSession.GetUser(); useNewCart = user.Customer.IsNewCartActive; } } @functions{ bool StringToBool(string value) { bool result; return bool.TryParse(value, out result) ? result : false; } } <!doctype html> <html lang="@vm.Global.LanguageCode" ng-app="hccargoApp" is-sublang="@vm.AreaItem.isSublanguage.ToString().ToLower()"> <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"> @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", isLoggedOn: @vm.User.IsLoggedOn.ToString().ToLower(), isExport: @vm.User.IsExport.ToString().ToLower(), freeDeliveryLimitAmount: 0, //<!--@NOV:User.FreeDeliveryLimitAmount-->, freeDeliveryLimitAmountFormatted: "@vm.User.FreeDeliveryLimitAmountFormatted" }; HC.settings = HC.settings || {}; HC.settings.cart = HC.settings.cart ||{}; </script> @if (vm.IsDev || vm.IsTest || vm.IsStage) { <meta name="robots" content="noindex, nofollow"> } else { 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) { <meta name="google-site-verification" content="uXBqGqdgo_ATVsMdEThjnr670rhIfk0COW9WkxbO_2Y"> } if (vm.Global.AreaID == 3) { <meta name="google-site-verification" content="Aq5-pWf1aguNf7Slffx3vveeTTWYg5D_d42QWP-DPYk"> } if (vm.Global.AreaID == 10) { <meta name="google-site-verification" content="UMr55cKj3by_xECXrzFRLxt--rY6NXcsnDmUvm5n7A0"> } } <!-- Styles --> @if (vm.IsDev) { <link href="/Files/Templates/Designs/HCCargo_2015/dist/css/master.min.css" rel="stylesheet" type="text/css"> } else { <link href="/Files/Templates/Designs/HCCargo_2015/dist/css/master.20181211-1247.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"> <style type="text/css"> body, html { background: #fff; } </style> <script> window.ParsleyConfig = { excluded: "input[type=button], input[type=submit], input[type=reset], input[type=hidden], [disabled], .no-validate, :hidden, .hidden" }; </script> @if (vm.IsDev) { <script src="/Files/Templates/Designs/HCCargo_2015/dist/scripts/vendor.min.js"></script> } else { <script src="/Files/Templates/Designs/HCCargo_2015/dist/scripts/vendor.20181211-1247.min.js"></script> } <script src="https://www.google.com/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 --> <!-- Optimize Page Hiding Snippet --> } else if (GetGlobalValue("NOV:Environment") == "TEST" || GetGlobalValue("NOV:Environment") == "STAGE") { <!-- Google Tag Manager - Test & Stage --> <!-- Optimize Page Hiding Snippet --> <style> .async-hide { opacity: 0 !important; } </style> <script> (function(a,s,y,n,c,h,i,d,e){s.className+=' '+y;h.start=1*new Date; h.end=i=function(){s.className=s.className.replace(RegExp(' ?'+y),'')}; (a[n]=a[n]||[]).hide=h;setTimeout(function(){i();h.end=null},c);h.timeout=c; })(window,document.documentElement,'async-hide','dataLayer',4000, {'GTM-K8N5CHQ':true}); </script> <!-- end Optimize Page Hiding Snippet --> <!-- Analytics-Optimize Snippet --> <script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-73791248-5', 'auto'); ga('require', 'GTM-K8N5CHQ'); ga('send', 'pageview'); </script> <!-- <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= '//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.languageId = '@GetGlobalValue("Global:Area.Lang")'; HC.cookieLevel = @GetGlobalValue("NOV:CookieLevelValue"); </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)" + "..."; </script> } else if (vm.IsTest) { <script> HC.isSiteDown = "@RenderParagraphContent(3529)" === "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)" + "..."; </script> } else if (vm.IsStage) { <script> HC.isSiteDown = "@RenderParagraphContent(2909)" === "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)" + "..."; </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)" + "..."; </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>> @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: '@GetGlobalValue("CIT:User.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: '@GetGlobalValue("CIT:User.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', '@GetGlobalValue("CIT:User.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> @GetValue("Stylesheets") @GetValue("Javascripts") </head> <body data-minicart-page-id="@vm.AreaItem.headerCartPageID" data-maxicart-page-id="@vm.AreaItem.maxiCartPageID" data-maxicartlines-page-id="@vm.AreaItem.maxiCartLinesPageID" data-searchapi-url="@vm.Global.SearchApiUrl"> @if (!string.IsNullOrWhiteSpace(GetGlobalValue("HC:GTM.UserSignedUp.ShowEvent"))) { <script> dataLayer = dataLayer || []; dataLayer.push({ 'event': 'signup' }); </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"); } </div> <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="modal-dialog"> <!-- Shared header --> <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#hc-icon-close"></use></svg> </span> <h5 class="modal-title login-view-title">@Translate("SignIn", "Sign in*", true)</h5> <h5 class="modal-title reset-view-title hidden">@Translate("GetBackIntoYourAccount", "Get back into your account*", true)</h5> </div> <!-- LOGIN CONTENT --> <div class="modal-body login-view"> <div class="alert alert-info" role="alert">@Translate("PleaseEnterYourLoginInformation", "Please enter your login information", true)</div> <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">@Translate("Email", "E-mail*", true)</label> <input type="text" class="form-control default-focus" name="username" placeholder='@Translate("EnterEmailAddress", "Enter your email address*", true)' required="required"> </div> <div class="form-group"> <label for="password">@Translate("Password", "Password*", true)</label> <input type="password" class="form-control" name="password" placeholder='@Translate("EnterPassword", "Enter your password*", true)' required="required" maxlength="50"> </div> <div class="checkbox"> <label> <input type="checkbox" name="autologin"> @Translate("RememberMe", "Remember me", true) </label> <a class="login-reset-modal pull-right" href="?id=@loginPageID&loginaction=recovery">@Translate("ResetPassword", "Reset password", true)</a> </div> <div class="form-group submit-group"> <button type="submit" class="btn btn-orange login-modal-submit">@Translate("Login", "Login*", true)</button> </div> <div class="loading-container hidden"> @Translate("LoggingIn", "Logging in*", true)&nbsp;<span class="loading-icon"></span> </div> </form> </div> <!-- HOMEDOMAIN CONTENT --> <div class="modal-body homedomain-view hidden"> <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>@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> <!-- PASSWORD RESET CONTENT --> <div class="modal-body reset-view hidden"> <div class="alert alert-info" role="alert">@Translate("WeCanHelpYouResetYourPassword", "We can help you reset your password. First, type in your e-mail below*", true)</div> <div class="alert alert-success message-mail-sent hidden" role="alert">@Translate("WeSentYouAnEmailWithALink", "We sent you an email with a link. Please click it to continue to reset your password.*", true)</div> <div class="alert alert-danger message-unknown-user hidden" role="alert">@Translate("UserNotFound", "User not found!*", 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> <div class="form-group"> <label for="emailadress">@Translate("Email", "E-mail*", true)</label> <input type="text" class="form-control default-focus" name="emailadress" placeholder='@Translate("EnterEmailAddress", "Enter your email address*", true)' required="required"> </div> <div class="form-group submit-group"> <button type="button" class="btn btn-default reset-password-cancel">@Translate("Back", "Back*", true)</button> <button type="submit" class="btn btn-orange reset-password-submit">@Translate("Submit", "Submit*", true)</button> </div> <div class="form-group reset-view-message_mail-sent hidden"> <button type="button" class="btn btn-orange" data-dismiss="modal">@Translate("Close", "Close*", true)</button> </div> <div class="loading-container hidden"> @Translate("Working", "Working*", true)&nbsp;<span class="loading-icon"></span> </div> </form> </div> <!-- Shared footer --> <div class="modal-footer modal-footer-dialog hidden"> </div> </div> <!-- // .modal.content --> </div> <!-- // .modal-dialog --> </div> <script> $( function () { function LoginStateManager( modal ) { var self = this, _modal = modal, viewNames = [], views = {}, defaultViewName = null, currentViewName = null; this.reset = function () { for ( i = 0; i < viewNames.length; i++ ) { views[viewNames[i]].reset(); } self.changeTo( defaultViewName ); }; this.addView = function ( viewName, view, isDefault ) { viewNames.push( viewName ); views[viewName] = view; if ( isDefault ) { defaultViewName = viewName; currentViewName = viewName; } }; this.changeTo = function ( newViewName ) { var newView = views[newViewName]; hideView( currentViewName ); showView( newViewName ); currentViewName = newViewName; }; function switchbtn(arg) { var btnclass = "hidebtn"; if (arg.hasClass('hidebtn')) { arg.removeClass(btnclass); } else { arg.addClass(btnclass); } } $('.login-modal').on('hidden.bs.modal', function (e) { $("#mobile-nav-reveal").removeClass('hidebtn'); }); function showView(viewName) { switchbtn($("#mobile-nav-reveal")); var view = views[viewName]; var titleName = '.' + viewName + '-title'; _modal.find( '.' + viewName + '-title' ).removeClass( 'hidden' ); _modal.find( '.' + viewName ).removeClass( 'hidden' ); } function hideView(viewName) { var view = views[viewName]; _modal.find( '.' + viewName + '-title' ).addClass( 'hidden' ); _modal.find( '.' + viewName ).addClass( 'hidden' ); } function init() { modal.on( 'show.bs.modal', self.reset ); } init(); }; 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' ); } } var LoginViewModel = function ( stateManager, view, domainValidation ) { var btnSubmit = null, btnOpenResetModal = null; function init() { //btnSubmit = view.find( 'BUTTON.login-modal-submit' ); //btnSubmit.on( 'click', login ); //btnOpenResetModal = view.find( 'A.login-reset-modal' ); //btnOpenResetModal.on( 'click', function () { stateManager.changeTo( 'reset-view' ) } ); view.find( 'FORM' ).on( 'submit', login ); } function reset() { view.find( '.alert-danger' ).addClass( 'hidden' ); show(); } function resetMessages() { view.find( '.alert-danger' ).addClass( 'hidden' ); } function hide() { view.addClass( 'hidden' ); } function show() { view.removeClass( 'hidden' ); view.find( '.default-focus' ).focus(); } function login( event ) { event.preventDefault(); resetMessages(); showSpinner(); HC.ajax.cleanCartBeforeLogin( view.find( 'input[name=username]' ).val().trim() ); var request = { __RequestVerificationToken: view.find('INPUT[name=__RequestVerificationToken]').val(), username: view.find( 'INPUT[name=username]' ).val().trim(), password: view.find( 'INPUT[name=password]' ).val(), DWExtranetUsernameRemember: true, DWExtranetPasswordRemember: true }; if ( view.find( 'INPUT[name=autologin]' ).prop( 'checked' ) ) { request.autologin = 'True'; } $.ajax( { method: 'POST', url: 'loginajax-en-gb', data: request } ) .done( afterLogin ) .fail( function () { console.error( 'error', request ); hideSpinner(); view.find( '.message-error' ).removeClass( 'hidden' ); } ) } function afterLogin( data ) { if ( data.isUnknown === true ) { view.find( '.message-unknown-user' ).removeClass( 'hidden' ); hideSpinner(); } else if ( data.isExpired === true ) { view.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' } ); // Reload current page. window.location = window.location.pathname + window.location.search; } } function showSpinner() { view.find( '.submit-group' ).addClass( 'hidden' ); view.find( '.loading-container' ).removeClass( 'hidden' ); } function hideSpinner() { view.find( '.loading-container' ).addClass( 'hidden' ); view.find( '.submit-group' ).removeClass( 'hidden' ); } function showHomeDomainLink( link ) { view.find( '.loading-container' ).addClass( 'hidden' ); var anchors = $( '#homedomain-content a' ); anchors.attr('href',link) var domainTexts = $('#homedomain-domain, #homedomain-domain-2') domainTexts.text( link.split('/')[2] ); loginStateManager.changeTo( 'homedomain-view' ) $('.modal.fade.login-modal.in').off('click keyup').addClass('login-modal--homedomain'); $('.modal.fade.login-modal.in .close').addClass('hidden'); var countDownStart = parseInt($('#homedomain-counter').attr('data-start')); initHomeDomainCountDown(countDownStart+1); } 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); } } function getView() { return view; } init(); return { hide: hide, show: show, reset: reset, getView: getView } } // // Reset password functionality disabled due to issues integrating with DW. // var loginModal = $( '.login-modal' ); var loginStateManager = new LoginStateManager( loginModal ); var loginViewModel = new LoginViewModel( loginStateManager, loginModal.find( '.login-view' ), new DomainValidation() ); //var resetViewModel = new PasswordResetViewModel( loginStateManager, loginModal.find( '.reset-view' ) ); loginStateManager.addView( 'login-view', loginViewModel, true ); loginStateManager.addView( 'homedomain-view', loginViewModel, false ); //loginStateManager.addView( 'reset-view', resetViewModel ); } ); /* function PasswordResetViewModel( stateManager, view ) { var btnSubmit = null, btnCancel = null; function init() { btnSubmit = view.find( 'BUTTON.reset-password-submit' ); btnCancel = view.find( 'BUTTON.reset-password-cancel' ); btnSubmit.on( 'click', onSubmit ); btnCancel.on( 'click', function () { stateManager.changeTo( 'login-view' ) } ); } function reset() { hide(); resetMessages(); } function resetMessages() { view.find( '.alert-danger' ).addClass( 'hidden' ); } function onSubmit( event ) { event.preventDefault(); resetMessages(); showSpinner(); var request = { ForgotPasswordMailTemplate: 'password_recovery.cshtml', ForgotPasswordSenderEmail: 'info@hc-cargo.com', ForgotPasswordMailSubject: 'Create new password', AccessUserEmail: view.find( 'INPUT[name=emailadress]' ).val(), LoginAction: 'Recovery' }; $.ajax( { method: 'POST', url: 'resetajax-en-gb', data: request } ) .done( onResponse ) .fail( onResponse ) //function(){ console.error('error', request)}) .always( hideSpinner ); } function onResponse( data ) { try { var element = $( data ).find( '.login-action-result' ); var result = element.data( 'result' ); switch ( result ) { case 'RecoveryLinkSent': view.find( '.message-mail-sent' ).removeClass( 'hidden' ); view.find( '.reset-view-message_mail-sent' ).removeClass( 'hidden' ); hideSpinner(); break; case 'UserNotFound': view.find( '.message-unknown-user' ).removeClass( 'hidden' ); view.find( '.submit-group' ).removeClass( 'hidden' ); break; default: view.find( '.message-error' ).removeClass( 'hidden' ); view.find( '.submit-group' ).removeClass( 'hidden' ); } } catch ( err ) { view.find( '.message-error' ).removeClass( 'hidden' ); view.find( '.submit-group' ).removeClass( 'hidden' ); console.error( err, data ); } } function hide() { view.addClass( 'hidden' ); } function show() { view.removeClass( 'hidden' ); } function showSpinner() { view.find( '.submit-group' ).addClass( 'hidden' ); view.find( '.loading-container' ).removeClass( 'hidden' ); } function hideSpinner() { view.find( '.loading-container' ).addClass( 'hidden' ); } function getView() { return view; } init(); return { hide: hide, show: show, reset: reset, getView: getView } } */ </script> } <div id="site"> @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 isSingleSignOnPartnerUser = bool.Parse(GetGlobalValue("NOV:User.IsSingleSignOnPartnerUser")); } <header id="header" class="navbar" role="navigation"> <div class="container"> <div id="header-brand"> <a href="/Default.aspx?Id=@firstPageID"><img src="/Files/Templates/Designs/HCCargo_2015/images/logo.svg" alt="HC Cargo logo"></a> </div> @if (isSingleSignOnPartnerUser) { // DO NOT SHOW SHOPPING CART } else if (int.Parse(GetGlobalValue("Global:Extranet.UserID")) > 0) { <div id="header-basket" class="hidden"> <div class="loading-container"> <span>@Translate("LoadingCart", "Loading Cart", true)</span><span class="loading-icon"></span> </div> </div> <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 class="loading-container"> <span>@Translate("LoadingCart", "Loading Cart", true)</span><span class="loading-icon"></span> </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> </header> <section id="site-search" class="@siteSearchClass" ng-controller="SearchBannerController as ctrl"> <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> <search-banner></search-banner> @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> @{ string environment = GetGlobalValue("NOV:Environment"); int areaId = int.Parse(GetGlobalValue("Global:Area.ID")); Dictionary<int, string> values = null; bool isActive = false; string policyChangeId = ""; // is there a cookiename for this? if (environment == "LIVE") { values = new Dictionary<int, string> { { 14, "20170207DE" }, { 10, "20171114DK" }, { 1, "20181126UK" } }; if (values.ContainsKey(areaId)) { isActive = true; policyChangeId = values[areaId]; } } else if (environment == "STAGE") { values = new Dictionary<int, string> { { 14, "20170207DE" }, { 10, "20171114DK" } }; 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"), 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"); } <section id="site-usp" class="site-usp"> <div class="container"> <div class="row"> <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#hc-icon-trucks"></use></svg> <span class="site-usp__list-text">@siteUspVm.FreeDeliveryAmount&nbsp;@siteUspVm.FreeDeliveryAmountFormatted</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#hc-icon-trucks"></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> <div id="view-container"> <div ng-view=""></div> </div> <div class="modal fade" id="bom-login-modal" tabindex="-1" role="dialog" aria-labelledby="modal-title" aria-hidden="true"> <div class="modal-dialog modal-sm"> <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#hc-icon-close"></use></svg> </span> <h5 class="modal-title" id="modal-title">@Translate("PleaseLoginOrSignUp", "Please login or sign up", true)</h5> </div> <div class="modal-content"> @Translate("InOrderToSee", "In order to see the B.O.M list you need to ", true)<a href="#" data-toggle="modal" data-target=".login-modal" data-dismiss="modal">@Translate("Login", "login", true)</a>&nbsp;@Translate("Or", "or", true) <a href="Default.aspx?ID=@vm.AreaItem.newUserPageID">@Translate("SignUp", "sign up", true)</a> </div> </div> </div> @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"); } <footer id="footer"> <div class="container"> <div class="row"> <div class="col-xs-12 col-sm-6 col-md-3"> <h3>@GetString("Item.Area.DownloadsName")</h3> @GetValue("DwNavigation(FooterNavDownloads)") </div> <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-sm-6 col-md-3"> <h3>@GetString("Item.Area.ContactHeader")</h3> <div class="footer-address"> <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 col-sm-6 col-md-3"> <h3>@GetString("Item.Area.BankInformationHeader")</h3> <div class="footer-bank-info">@GetValue("Item.Area.BankInformation")</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> <site-message></site-message> </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#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> } @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#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#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#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> @if (vm.IsDev) { <script src="/Files/Templates/Designs/HCCargo_2015/dist/scripts/angular-main.min.js"></script> <script src="/Files/Templates/Designs/HCCargo_2015/dist/scripts/master.min.js"></script> } else { <script src="/Files/Templates/Designs/HCCargo_2015/dist/scripts/angular-main.20181211-1247.min.js"></script> <script src="/Files/Templates/Designs/HCCargo_2015/dist/scripts/master.20181211-1247.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) { var arr = translationJsonPath.split("."); var validTranslation = false; var translation = null; var translation = dynamicweb.translations; for(var i=0; i < arr.length; i++) { if(typeof translation === "string") { break; } if(translation[arr[i]]) { translation = translation[arr[i]]; } else { break; } } return (typeof translation === "string") ? translation : 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) )" }; var dynamicweb = dynamicweb || {}; dynamicweb.translations = dynamicweb.translations || {}; dynamicweb.translations['upselling'] = { 'groupTitles': { 'Tørfilter': "@SanitizeTranslationValue( Translate("SelectDryer", "Select a dryer", true) )", 'Remskiver': "@SanitizeTranslationValue( Translate("SelectBelt", "Select a belt", 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 type="text/javascript" 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> } @if (vm.IsDev) { @* Why this? Must be a setting somewhere that makes it work on test/stage/live? *@ <script type="text/javascript" src="//maps.googleapis.com/maps/api/js?v=3&amp;sensor=false"></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>