Exception in template (Designs/HCCargo_2015/_parsed/frontpage.parsed.cshtml): System.FormatException: String was not recognized as a valid Boolean.
   at System.Boolean.Parse(String value)
   at CompiledRazorTemplates.Dynamic.ffefcbcbacdab.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")), 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"), CultureCode = GetGlobalValue("Global:Area.LongLang"), 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")), IsInvoicePaymentAvailable = StringToBool(GetGlobalValue("NOV:Customer.IsInvoicePaymentAvailable")), 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; 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; } } <!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"> @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", 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() }; HC.settings = HC.settings || {}; HC.settings.cart = HC.settings.cart || {}; HC.settings.area = HC.settings.area || {}; </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"> <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> <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 --> <!-- 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-4', 'auto'); ga('require', 'GTM-59P6MK'); 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.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)" + "..."; </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)" + "..."; </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)" + "..."; </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>> @{ 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-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> } <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"); } </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="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> </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> <div class="modal-footer modal-footer-dialog hidden"> </div> </div> <!-- // .modal.content --> </div> <!-- // .modal-dialog --> </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#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#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 () { 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' }); hideSpinner(); if (data.reset) { 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"> @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")); } <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 (hasRoleZeroPricesOnline) { // 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> <div class="mobile-site-message-wrapper visible-xs"> <site-message></site-message> </div> @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, "20170207DE" }, { 10, "20171114DK" }, { 1, "20181126UK" }, { 5, "20190225NL" }, { 6, "20190225NL" } }; 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="hero-holder">@GetValue("DwContent(heroholder)")</div> <section id="main-categories"> <div class="container"> <div class="row frontpage-category-list segments"> <catalog-groups exclude="'SEGMENT'" is-front-page="true"></catalog-groups> </div> </div> </section> <section id="categories"> <div class="container"> <div class="row frontpage-category-list categories"> <catalog-groups exclude="'CATEGORY'" is-front-page="true"></catalog-groups> </div> </div> </section> <div class="container"> <new-products-slider></new-products-slider> </div> <section id="campaign-products">@GetValue("DwContent(campaignproducts)")</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"); } <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-md-6"> <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 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#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> } else 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#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#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> <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("Comment", "Comment", 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 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> } <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>