Error executing template "Designs/Rapido/_parsed/Page.parsed.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
   at CompiledRazorTemplates.Dynamic.RazorEngine_f4e82bd4c2b44025b977ff0697328e7a.Execute() in C:\inetpub\wwwroot\DWShop\Solutions\CroataR211\Files\Templates\Designs\Rapido\_parsed\Page.parsed.cshtml:line 977
   at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader)
   at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.b__0(TextWriter writer)
   at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 2 3 @* Rapido version 2.1.1 *@ 4 5 @using Dynamicweb.Frontend 6 @using Dynamicweb.Frontend.Devices 7 @using Dynamicweb.Extensibility 8 @using Dynamicweb.Content 9 @using Dynamicweb.Security 10 @using Dynamicweb.Core 11 @using System 12 @using System.Linq 13 @using System.Web 14 @using System.IO 15 @using Dynamicweb.Security.UserManagement.Common.CustomFields 16 17 @functions { 18 string productsPageId; 19 string contentSearchPageId; 20 string resultPageId; 21 string searchFeedId; 22 string searchSecondFeedId; 23 string groupsFeedId; 24 string searchPlaceholder; 25 string searchType = "product-search"; 26 string searchTemplate; 27 string searchContentTemplate; 28 string searchValue = HttpContext.Current.Request.QueryString.Get("Search") != null ? HttpContext.Current.Request.QueryString.Get("Search") : ""; 29 string searchIcon; 30 bool showGroups = true; 31 } 32 @{ 33 string GoogleTagManagerID = Model.Area.Item.GetString("GoogleTagManagerID"); 34 //General settings 35 string favicon = Model.Area.Item.GetFile("LogoFavicon") != null ? Model.Area.Item.GetFile("LogoFavicon").Path : "/Files/Images/favicon.png"; 36 string logo = Model.Area.Item.GetFile("LogoImage") != null ? Model.Area.Item.GetFile("LogoImage").PathUrlEncoded : "/Files/Images/logo-dynamicweb.png"; 37 logo = "/Files/DigitalAssets/Logo/croata_logo_web.svg"; 38 string logoHeight = !String.IsNullOrEmpty(Model.Area.Item.GetString("LogoHeight")) ? Model.Area.Item.GetString("LogoHeight") : "40"; 39 logoHeight = logoHeight != "0" ? logoHeight : "40"; 40 if (Path.GetExtension(logo).ToLower() != ".svg") 41 { 42 logo = "/Admin/Public/GetImage.ashx?height=" + logoHeight + "&amp;crop=5&amp;Compression=75&amp;image=" + logo; 43 44 if (Pageview.Device.ToString() == "Mobile") 45 { 46 logoHeight = "40"; 47 } 48 } 49 string mobileLogo = Model.Area.Item.GetItem("MobileTopLayout").GetFile("MobileLayoutLogo") != null ? Model.Area.Item.GetItem("MobileTopLayout").GetFile("MobileLayoutLogo").PathUrlEncoded : "/Files/Images/logo-dynamicweb.png"; 50 mobileLogo = "%2fFiles%2fDigitalAssets%2fLogo%2fcroata_logo_web.svg"; 51 if (Path.GetExtension(mobileLogo).ToLower() != ".svg") 52 { 53 mobileLogo = "/Admin/Public/GetImage.ashx?height=40&amp;crop=5&amp;Compression=75&amp;image=" + mobileLogo; 54 } 55 else 56 { 57 mobileLogo = HttpUtility.UrlDecode(mobileLogo); 58 } 59 60 string wireframeMode = Model.Area.Item.GetBoolean("WireframeMode").ToString(); 61 62 //Font settings 63 string navigationFont = Model.Area.Item.GetItem("NavigationFont").GetGoogleFont("FontFamily").Family.Replace(" ", "+"); 64 string mobileNavigationFont = Model.Area.Item.GetItem("MobileNavigationFont").GetGoogleFont("FontFamily").Family.Replace(" ", "+"); 65 string headerFont = Model.Area.Item.GetItem("ContentLayoutHeaderFont").GetGoogleFont("FontFamily").Family.Replace(" ", "+"); 66 string subHeaderFont = Model.Area.Item.GetItem("ContentLayoutSubheaderFont").GetGoogleFont("FontFamily").Family.Replace(" ", "+"); 67 string contentFont = Model.Area.Item.GetItem("ContentLayoutBodyText").GetGoogleFont("FontFamily").Family.Replace(" ", "+"); 68 string newStickersFont = Model.Area.Item.GetItem("NewStickersFont").GetGoogleFont("FontFamily").Family.Replace(" ", "+"); 69 string customStickersFont = Model.Area.Item.GetItem("CustomStickersFont").GetGoogleFont("FontFamily").Family.Replace(" ", "+"); 70 string toolsMenuFont = Model.Area.Item.GetItem("ToolsMenuFont").GetGoogleFont("FontFamily").Family.Replace(" ", "+"); 71 string productListPriceFont = Model.Area.Item.GetItem("ProductListGeneral").GetItem("PriceFontDesign").GetGoogleFont("FontFamily").Family.Replace(" ", "+"); 72 string productPagePriceFont = Model.Area.Item.GetItem("ProductDetails").GetItem("ProductDetailsPriceFontDesign").GetGoogleFont("FontFamily").Family.Replace(" ", "+"); 73 string facetsHeaderFont = Model.Area.Item.GetItem("ProductCatalogFacets").GetItem("FacetsHeaderFont").GetGoogleFont("FontFamily").Family.Replace(" ", "+"); 74 75 //Icons 76 string cartIcon = !String.IsNullOrEmpty(Model.Area.Item.GetItem("Icons").GetList("CartIcon").SelectedValue) ? Model.Area.Item.GetItem("Icons").GetList("CartIcon").SelectedValue.ToLower() : "fas fa-shopping-cart"; 77 searchIcon = !String.IsNullOrEmpty(Model.Area.Item.GetItem("Icons").GetList("SearchIcon").SelectedValue) ? Model.Area.Item.GetItem("Icons").GetList("SearchIcon").SelectedValue.ToLower() : "fas fa-search"; 78 79 80 //Page IDs for use in the template 81 82 int logoutPageId = 10359; 83 int pageId = Model.TopPage.ID; 84 string firstPageId = Model.Area.FirstActivePage.ID.ToString(); 85 int cartPageId = GetPageIdByNavigationTag("CartPage"); 86 int miniCartFeedPageId = GetPageIdByNavigationTag("MiniCartFeed"); 87 int cartFeedPageId = GetPageIdByNavigationTag("CartOrderlinesFeed"); 88 89 int impersonationPageId = GetPageIdByNavigationTag("Impersonation"); 90 91 bool stickyMenu = Pageview.Device.ToString() == "Mobile" || Pageview.Device.ToString() == "Tablet" ? false : Model.Area.Item.GetBoolean("NavigationStickyMenu"); 92 string stickyTop = stickyMenu ? "top-container--sticky" : ""; 93 string pagePos = stickyMenu ? "js-page-pos" : ""; 94 string topLayout = Model.Area.Item.GetList("LayoutTop").SelectedValue; 95 string mobileTopLayout = !String.IsNullOrEmpty(Model.Area.Item.GetItem("MobileTopLayout").GetList("MobileLayoutTop").SelectedValue) ? Model.Area.Item.GetItem("MobileTopLayout").GetList("MobileLayoutTop").SelectedValue : "nav-left"; 96 string mobileNavigationPosition = mobileTopLayout == "nav-left" || mobileTopLayout == "nav-search-left" ? "left" : "right"; 97 bool renderPagesInToolBar = Model.Area.Item.GetBoolean("RenderPagesInToolBar"); 98 string toolbarText = Model.Area.Item.GetString("ToolbarText"); 99 bool onlyPreview = Model.Area.Item.GetBoolean("OnlyPreviewForAnonymous") && Model.CurrentUser.ID == 0; 100 101 string headerButtonText = Model.Area.Item.GetString("HeaderButtonText"); 102 string headerButtonLink = Model.Area.Item.GetString("HeaderButtonLink"); 103 string headerButtonType = "btn--" + Model.Area.Item.GetList("HeaderButtonType").SelectedName.ToLower(); 104 105 string autoCssLink = "/Files/Templates/Designs/Rapido/css/rapido/rapido_" + Model.Area.ID.ToString() + ".min.css?ticks=" + Model.Area.UpdatedDate.Ticks; 106 bool useFontAwesomePro = Model.Area.Item.GetItem("Icons").GetString("UseFontAwesomePro") != null ? Model.Area.Item.GetItem("Icons").GetBoolean("UseFontAwesomePro") : false; 107 108 string siteURL = Dynamicweb.Context.Current.Request.Url.Scheme + "://" + Dynamicweb.Context.Current.Request.Url.Host; 109 siteURL = siteURL.Replace("http://", "https://"); 110 string baseURL = "https://" + Dynamicweb.Context.Current.Request.Url.Host; 111 string pageURL = Dynamicweb.Context.Current.Request.RawUrl; 112 if (pageURL.Length >= 6) 113 { 114 pageURL = pageURL.Substring(6, pageURL.Length - 6).Split('?')[0]; 115 } 116 117 if (pageURL == "/frontpage") 118 { 119 pageURL = "/"; 120 } 121 122 pageURL = (baseURL.Substring(baseURL.Length - 3, 3) == "com" ? "/in-en" : "/hr-hr") + pageURL; 123 124 string pageDomain = Pageview.Area.UrlName; 125 string userInitials = ""; 126 string userDomain = ""; 127 if (Model.CurrentUser.ID != 0) 128 { 129 if (!String.IsNullOrEmpty(Model.CurrentUser.Name)) 130 { 131 string[] names = Model.CurrentUser.Name.Split(' '); 132 userInitials += Model.CurrentUser.Name.Substring(0, 1); 133 134 if (names.Length > 1) 135 { 136 userInitials += names[names.Length - 1].Substring(0, 1); 137 } 138 } 139 else 140 { 141 userInitials += Model.CurrentUser.FirstName != null && Model.CurrentUser.FirstName != "" ? Model.CurrentUser.FirstName.Substring(0, 1) : ""; 142 userInitials += Model.CurrentUser.LastName != null && Model.CurrentUser.LastName != "" ? Model.CurrentUser.LastName.Substring(0, 1) : ""; 143 userInitials += userInitials.Length == 1 && Model.CurrentUser.FirstName != null && Model.CurrentUser.FirstName.Length > 1 ? Model.CurrentUser.FirstName.Substring(1, 2) : ""; 144 userInitials += userInitials == "" && Model.CurrentUser.Email != null && Model.CurrentUser.Email.Length > 1 ? Model.CurrentUser.Email.Substring(0, 2) : ""; 145 userInitials += userInitials == "" ? Model.CurrentUser.UserName.Substring(0, 2) : ""; 146 } 147 foreach (CustomFieldValue val in (Pageview.User.CustomFieldValues)) 148 { 149 if (val.CustomField.Name == "PageDomain") 150 { 151 userDomain = val.Value.ToString(); 152 } 153 } 154 } 155 156 if (Model.CurrentUser.ID <= 0) 157 { 158 if (pageDomain == "b2i-hr" || pageDomain == "b2b-hr" || pageDomain == "b2ball-hr") 159 { 160 int loginPage = GetPageIdByNavigationTag("SignInPage"); 161 HttpContext.Current.Response.Redirect(siteURL + "/" + pageDomain + "/Default.aspx?ID=" + loginPage); 162 //HttpContext.Current.Response.Redirect(siteURL + "/" ); 163 } 164 } 165 166 167 if (userDomain != "" && userDomain != pageDomain) 168 { 169 string userC = Pageview.User.Currency; 170 string redirectUrl = siteURL + "/" + userDomain + "?CurrencyCode=" + userC + "&cartcmd=emptycart"; 171 172 var logFilePath = HttpContext.Current.Server.MapPath("/Files/System/Log/CroataRedirection.log"); 173 File.AppendAllText(logFilePath, $"{DateTime.Now}, pageId = '{pageId}', raw request url = '{Dynamicweb.Context.Current.Request.RawUrl}' request page URL = '{pageURL}', user domain = '{userDomain}', page domain = '{pageDomain}', redirecting to = '{redirectUrl}'{Environment.NewLine}"); 174 175 HttpContext.Current.Response.Redirect(redirectUrl); 176 } 177 178 179 string businessPhotoPath = Model.Area.Item.GetFile("BusinessPhoto") != null ? Model.Area.Item.GetFile("BusinessPhoto").PathUrlEncoded : ""; 180 string businessName = Model.Area.Item.GetString("BusinessName"); 181 string businessLogo = Model.Area.Item.GetFile("BusinessLogo") != null ? Model.Area.Item.GetFile("BusinessPhoto").Path : ""; 182 string openingHours = Model.Area.Item.GetString("OpeningHours"); 183 var address = Model.Area.Item.GetItem("Address"); 184 string streetAddress = ""; 185 string addressLocality = ""; 186 string addressRegion = ""; 187 string postalCode = ""; 188 string addressCountry = ""; 189 if (address != null) 190 { 191 streetAddress = address.GetString("StreetAddress"); 192 addressLocality = address.GetString("City"); 193 addressRegion = address.GetString("Region"); 194 postalCode = address.GetString("PostalCode"); 195 addressCountry = address.GetString("Country"); 196 } 197 string contactEmail = Model.Area.Item.GetString("ContactEmail"); 198 string contactNumber = Model.Area.Item.GetString("ContactNumber"); 199 200 productsPageId = Converter.ToString(GetPageIdByNavigationTag("ProductsPage")); 201 contentSearchPageId = Converter.ToString(GetPageIdByNavigationTag("ContentSearchResults")) + "&Areaid=" + Model.Area.ID; 202 203 if (Model.Area.Item.GetList("TopSearch").SelectedValue == "contentSearch") 204 { 205 searchFeedId = Converter.ToString(GetPageIdByNavigationTag("ContentSearchFeed")) + "&Areaid=" + Model.Area.ID + "&pagesOnly=true"; 206 resultPageId = contentSearchPageId; 207 searchPlaceholder = Translate("Have something special in mind?"); 208 groupsFeedId = "0"; 209 searchType = "content-search"; 210 searchTemplate = "SearchPagesTemplate"; 211 showGroups = false; 212 } 213 else if (Model.Area.Item.GetList("TopSearch").SelectedValue == "combinedSearch") 214 { 215 //data-search-second-feed-id 216 searchFeedId = productsPageId + "&feed=true"; 217 searchSecondFeedId = Converter.ToString(GetPageIdByNavigationTag("ContentSearchFeed")) + "&Areaid=" + Model.Area.ID + "&pagesOnly=true"; 218 resultPageId = productsPageId; 219 searchPlaceholder = Translate("Have something special in mind?"); 220 groupsFeedId = Converter.ToString(GetPageIdByNavigationTag("ProductGroupsFeed")); 221 searchType = "combined-search"; 222 searchTemplate = "SearchProductsTemplateWrap"; 223 searchContentTemplate = "SearchPagesTemplateWrap"; 224 showGroups = Model.Area.Item.GetBoolean("ShowGroupsSelector"); 225 } 226 else 227 { 228 resultPageId = productsPageId; 229 searchFeedId = productsPageId + "&feed=true"; 230 groupsFeedId = Converter.ToString(GetPageIdByNavigationTag("ProductGroupsFeed")); 231 searchPlaceholder = Translate("Have something special in mind?"); 232 searchTemplate = "SearchProductsTemplate"; 233 searchType = "product-search"; 234 showGroups = Model.Area.Item.GetBoolean("ShowGroupsSelector"); 235 } 236 } 237 <!DOCTYPE html> 238 239 <html lang="@Pageview.Area.CultureInfo.TwoLetterISOLanguageName"> 240 <head> 241 <meta charset="utf-8" /> 242 <meta groupId="@HttpContext.Current.Request.QueryString.Get("groupid");" /> 243 <title>@Model.Title</title> 244 245 <link rel="canonical" href="@baseURL@pageURL" /> 246 247 @{ 248 var basePageUrl = baseURL.Replace(".com", ".hr"); 249 var alternatePageAddress = Dynamicweb.Context.Current.Request.RawUrl.Split('?')[0].Replace("/products/","/proizvodi/").Replace("/"+pageDomain+"/","").Replace("/"+pageDomain,""); 250 alternatePageAddress = alternatePageAddress.Length > 1 ? alternatePageAddress : ""; 251 } 252 <link rel="alternate" href="@basePageUrl/hr-hr/@alternatePageAddress" hreflang="hr-hr" /> 253 254 @{ 255 basePageUrl = baseURL.Replace(".hr", ".com"); 256 alternatePageAddress = Dynamicweb.Context.Current.Request.RawUrl.Split('?')[0].Replace("/proizvodi/","/products/").Replace("/"+pageDomain+"/","").Replace("/"+pageDomain,""); 257 alternatePageAddress = alternatePageAddress.Length > 1 ? alternatePageAddress : ""; 258 } 259 <link rel="alternate" href="@basePageUrl/eu-en/@alternatePageAddress" hreflang="en-eu" /> 260 <link rel="alternate" href="@basePageUrl/na-en/@alternatePageAddress" hreflang="en-ca" /> 261 <link rel="alternate" href="@basePageUrl/na-en/@alternatePageAddress" hreflang="en-us" /> 262 <link rel="alternate" href="@basePageUrl/ch-en/@alternatePageAddress" hreflang="en-cn" /> 263 <link rel="alternate" href="@basePageUrl/jp-en/@alternatePageAddress" hreflang="en-jp" /> 264 <link rel="alternate" href="@basePageUrl/sa-en/@alternatePageAddress" hreflang="es-xl" /> 265 <link rel="alternate" href="@basePageUrl/uk-en/@alternatePageAddress" hreflang="en-gb" /> 266 <link rel="alternate" href="@basePageUrl/au-en/@alternatePageAddress" hreflang="en-au" /> 267 <link rel="alternate" href="@basePageUrl/in-en/@alternatePageAddress" hreflang="en" /> 268 <link rel="alternate" href="@basePageUrl/in-en/@alternatePageAddress" hreflang="x-default" /> 269 270 @Model.MetaTags 271 <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=10 minimum-scale=.25, user-scalable=yes"> 272 <meta name="robots" content="index, follow"> 273 274 275 <!-- Google Tag Manager --> 276 <script> 277 (function (w, d, s, l, i) { 278 w[l] = w[l] || []; w[l].push({ 'gtm.start': new Date().getTime(), event: 'gtm.js' }); var f = d.getElementsByTagName(s)[0], 279 j = d.createElement(s), dl = l != 'dataLayer' ? '&l=' + l : ''; j.async = true; j.src = 280 'https://www.googletagmanager.com/gtm.js?id=' + i + dl; f.parentNode.insertBefore(j, f); 281 })(window, document, 'script', 'dataLayer', 'GTM-MM2P57B');</script> 282 <!-- End Google Tag Manager --> 283 @*@Model.MetaTags*@ 284 285 @if (!string.IsNullOrWhiteSpace(GoogleTagManagerID)) 286 { 287 <!-- Google Tag Manager --> 288 @*<script> 289 (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': 290 new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], 291 j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 292 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); 293 })(window,document,'script','dataLayer','@GoogleTagManagerID'); 294 </script>*@ 295 <!-- End Google Tag Manager --> 296 } 297 298 299 <!-- Google Tag Manager --> 300 <script async src="https://www.googletagmanager.com/gtag/js?id=UA-20818351-1"></script> 301 <script> 302 window.dataLayer = window.dataLayer || []; 303 function gtag() { dataLayer.push(arguments); } 304 gtag('js', new Date()); 305 306 gtag('config', 'UA-20818351-1'); 307 </script> 308 <!-- End Google Tag Manager --> 309 <!-- Facebook Pixel Code --> 310 <script> 311 !function (f, b, e, v, n, t, s) { 312 if (f.fbq) return; n = f.fbq = function () { 313 n.callMethod ? 314 n.callMethod.apply(n, arguments) : n.queue.push(arguments) 315 }; 316 if (!f._fbq) f._fbq = n; n.push = n; n.loaded = !0; n.version = '2.0'; 317 n.queue = []; t = b.createElement(e); t.async = !0; 318 t.src = v; s = b.getElementsByTagName(e)[0]; 319 s.parentNode.insertBefore(t, s) 320 }(window, document, 'script', 321 'https://connect.facebook.net/en_US/fbevents.js'); 322 fbq('init', '343128439663295'); 323 fbq('track', 'PageView'); 324 325 /**/</script> 326 <noscript> 327 <img height="1" width="1" 328 src="https://www.facebook.com/tr?id=343128439663295&ev=PageView&noscript=1" alt="Facebook noscript image" /> 329 </noscript> 330 <!-- End Facebook Pixel Code --> 331 332 <script> 333 function displayLanguageSelector() { 334 var inputs = document.getElementsByTagName('input'); 335 for (var i = 0; i < inputs.length; i++) { 336 if (inputs[i].type == 'checkbox') { 337 inputs[i].checked = false; 338 } 339 } 340 document.getElementById("MobileNavTrigger").checked = true; 341 document.getElementById("MobileMenuCheck_Language").checked = true; 342 } 343 344 /**/</script> 345 <!-- Favicon --> 346 <link href="@favicon" rel="icon" type="image/png"> 347 348 <!-- Font awesome --> 349 @if (useFontAwesomePro) 350 { 351 <link rel="stylesheet" href="/Files/Templates/Designs/Rapido/css/fonts/FontAwesomePro/css/fontawesome-all.min.css" type="text/css"> 352 } 353 else 354 { 355 <link rel="stylesheet" href="/Files/Templates/Designs/Rapido/css/fonts/FontAwesomeFree/css/fontawesome-all.min.css" type="text/css"> 356 } 357 358 <!-- Flag icon --> 359 <!--<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/3.1.0/css/flag-icon.min.css" type="text/css">--> 360 <!-- Base (Default, wireframe) styles --> 361 <link rel="stylesheet" href="/Files/Templates/Designs/Rapido/css/base/base.min.css" type="text/css"> 362 363 <!-- Rapido Css from Website Settings --> 364 <link id="rapidoCss" rel="stylesheet" href="@autoCssLink" type="text/css"> 365 366 <!-- Ignite Css (Custom site specific styles) --> 367 <link id="igniteCss" type="text/css" href="/Files/Templates/Designs/Rapido/css/ignite/ignite.min.css" rel="stylesheet" /> 368 <link href="/Files/Templates/Designs/Rapido/css/ignite/ignite-blogs.min.css" rel="stylesheet" /> 369 <link href="/Files/Templates/Designs/Rapido/css/ignite/easyzoom.css" rel="stylesheet" /> 370 <!-- Google fonts --> 371 @{ 372 var fonts = new string[11] { navigationFont, mobileNavigationFont, headerFont, subHeaderFont, contentFont, newStickersFont, customStickersFont, toolsMenuFont, productListPriceFont, productPagePriceFont, facetsHeaderFont }; 373 var family = string.Join("%7C", fonts.Distinct().Select(x => string.Format("{0}:100,200,300,400,500,600,700,800,900", x))); 374 } 375 <link href="https://fonts.googleapis.com/css?family=@family" rel="stylesheet"> 376 377 @if (!string.IsNullOrEmpty(businessPhotoPath) && 378 !string.IsNullOrEmpty(businessName) && 379 !string.IsNullOrEmpty(streetAddress) && 380 !string.IsNullOrEmpty(addressLocality) && 381 !string.IsNullOrEmpty(addressRegion) && 382 !string.IsNullOrEmpty(postalCode) && 383 !string.IsNullOrEmpty(addressCountry)) 384 { 385 <script type="application/ld+json"> 386 { 387 "@@context": "http://schema.org", 388 "@@type": "Organization", 389 "name" : "@businessName", 390 "url": "@siteURL" 391 @if (Model.Area.Item.GetItems("FooterSocialLinks").Count > 0) 392 { 393 <text>,"sameAs" : [</text> 394 @(string.Join(",", Model.Area.Item.GetItems("FooterSocialLinks").Select(x => '"' + x.GetString("Link") + '"'))) 395 <text>]</text> 396 } 397 }, 398 { 399 "@@context": "http://schema.org", 400 "@@type": "LocalBusiness", 401 "image": [ 402 "@siteURL/Admin/Public/GetImage.ashx?width=400&height=400&crop=0&Compression=75&DoNotUpscale=true&image=@businessPhotoPath", 403 "@siteURL/Admin/Public/GetImage.ashx?width=400&height=300&crop=0&Compression=75&DoNotUpscale=true&image=@businessPhotoPath", 404 "@siteURL/Admin/Public/GetImage.ashx?width=448&height=225&crop=0&Compression=75&DoNotUpscale=true&image=@businessPhotoPath" 405 ], 406 "@@id": "@siteURL", 407 "url": "@siteURL" 408 @if (!string.IsNullOrEmpty(openingHours)) 409 { 410 <text>,"openingHours": "@openingHours"</text> 411 } 412 @if (!string.IsNullOrEmpty(businessLogo)) 413 { 414 <text>,"logo": "@siteURL@businessLogo"</text> 415 } 416 ,"name": "@businessName", 417 "address": { 418 "@@type": "PostalAddress", 419 "streetAddress": "@streetAddress", 420 "addressLocality": "@addressLocality", 421 "addressRegion": "@addressRegion", 422 "postalCode": "@postalCode", 423 "addressCountry": "@addressCountry" 424 } 425 @if (!string.IsNullOrEmpty(contactEmail)) 426 { 427 <text>,"email": "@Model.Area.Item.GetString("ContactEmail")"</text> 428 } 429 @if (!string.IsNullOrEmpty(contactNumber)) 430 { 431 <text>,"telephone": "@Model.Area.Item.GetString("ContactNumber")"</text> 432 } 433 } 434 </script> 435 } 436 </head> 437 438 <body> 439 <!-- Google Tag Manager (noscript) --> 440 <noscript> 441 <iframe src="https://www.googletagmanager.com/ns.html?id=GTM-MM2P57B" 442 height="0" width="0" style="display:none;visibility:hidden"></iframe> 443 </noscript> 444 <!-- End Google Tag Manager (noscript) --> 445 446 @MobileNavigation(userInitials, mobileNavigationPosition) 447 448 @LoginModal() 449 450 <main class="site dw-mod"> 451 <header class="top-container @stickyTop dw-mod" id="Top"> 452 @if (renderPagesInToolBar && Pageview.Device.ToString() != "Mobile" && Pageview.Device.ToString() != "Tablet") 453 { 454 string pageSubDomain = Dynamicweb.Frontend.PageView.Current().Area.UrlName; 455 <div id="toolsNavigation" class="tools-navigation dw-mod"> 456 <div class="center-container grid top-container__center-container dw-mod"> 457 <div class="grid__cell"> 458 <div class="u-pull--left u-margin-top"> 459 <a href="/@pageSubDomain/terms-and-conditions?paragraph=tabs-2&button=button-2">@toolbarText</a> 460 <a href="#" id="btnCloseToolsNavigation" class="u-pull--right"> 461 <img class="grid--external-bleed-y" src="/Files/DigitalAssets/icons8-multiply-50.png" width="24" height="24" alt="Multiply icon" /> 462 </a> 463 </div> 464 </div> 465 </div> 466 </div> 467 } 468 469 @if (Pageview.Device.ToString() != "Mobile" && Pageview.Device.ToString() != "Tablet") 470 { 471 switch (topLayout) 472 { 473 case "condensed": //2 474 <!-- Main navigation --> 475 <nav class="main-navigation dw-mod"> 476 <div class="center-container top-container__center-container grid grid--align-center dw-mod"> 477 @RenderLogo(firstPageId, logo, businessName) 478 479 @* Navigation *@ 480 <div style="margin:0 auto"> 481 @RenderHeaderNavigation() 482 </div> 483 484 <ul class="menu dw-mod" style="position:absolute;bottom:0px; right:35px;"> 485 @RenderSignIn("inNavigation", userInitials) 486 @RenderLanguageSelector() 487 @RenderFavorites() 488 @RenderMiniCart() 489 </ul> 490 @if (!string.IsNullOrWhiteSpace(headerButtonLink)) 491 { 492 <div class="u-margin-left u-inline-block"> 493 <a class="btn @headerButtonType dw-mod u-no-margin" href="@headerButtonLink">@headerButtonText</a> 494 </div> 495 } 496 </div> 497 </nav> 498 499 <!-- Searchbar --> 500 if (!Model.Area.Item.GetBoolean("NavigationItemsHideSearch")) 501 { 502 <div class="u-box-shadow u-color-light-gray--bg u-inline-block u-full-width"> 503 <div class="center-container top-container__center-container dw-mod"> 504 @RenderSearch() 505 </div> 506 </div> 507 } 508 509 break; 510 case "minimal": //4 511 case "minimal-right": //5 512 string alignClass = topLayout == "minimal-right" ? "grid--align-end" : ""; 513 514 <!-- Main navigation --> 515 <nav class="main-navigation dw-mod"> 516 <div class="center-container top-container__center-container grid grid--align-center dw-mod"> 517 @RenderLogo(firstPageId, logo, businessName) 518 519 @* Navigation *@ 520 <div class="@alignClass" style="margin:0 auto"> 521 @RenderHeaderNavigation() 522 </div> 523 <div class="DropDownRightContent"> 524 <div id="rightMenuButton" class="menu_dropdown menu__link u-w50px dw-mod" style="position:absolute;bottom:0px; right:35px;"><i class="fa fa-bars fa-2x"></i></div> 525 <ul class="right-menu menu dw-mod" style="position:absolute;bottom:0px; right:35px;"> 526 @if (!Model.Area.Item.GetBoolean("NavigationItemsHideSearch")) 527 { 528 @RenderMiniSearch() 529 } 530 531 @RenderSignIn("inNavigation", userInitials) 532 533 @if (Model.CurrentUser.ID == 0) 534 { 535 @RenderLanguageSelector() 536 } 537 @RenderFavorites() 538 @RenderMiniCart() 539 </ul> 540 </div> 541 @if (!string.IsNullOrWhiteSpace(headerButtonLink)) 542 { 543 <div class="u-margin-left u-inline-block"> 544 <a class="btn @headerButtonType dw-mod u-no-margin" href="@headerButtonLink">@headerButtonText</a> 545 </div> 546 } 547 </div> 548 </nav> 549 break; 550 case "two-lines": //6 551 case "two-lines-centered": //7 552 string justifyClass = topLayout == "two-lines-centered" ? "grid--justify-center" : "grid--justify-space-between"; 553 554 <!-- Main navigation --> 555 <nav class="main-navigation dw-mod"> 556 <div class="center-container top-container__center-container grid @justifyClass dw-mod"> 557 <div class="grid__col--bleed grid--align-center"> 558 @RenderLogo(firstPageId, logo, businessName) 559 </div> 560 @* Navigation *@ 561 <div> 562 <div class="grid__cell u-reset-position"> 563 @RenderHeaderNavigation() 564 </div> 565 </div> 566 <div> 567 <div class="grid grid--align-center"> 568 <div class="grid__cell"> 569 <ul class="menu dw-mod"> 570 @if (!Model.Area.Item.GetBoolean("NavigationItemsHideSearch")) 571 { 572 @RenderMiniSearch() 573 } 574 @RenderSignIn("inNavigation", userInitials) 575 @RenderLanguageSelector() 576 @RenderFavorites() 577 @RenderMiniCart() 578 </ul> 579 </div> 580 @if (!string.IsNullOrWhiteSpace(headerButtonLink)) 581 { 582 <div class="u-margin-left u-inline-block grid__cell"> 583 <a class="btn @headerButtonType dw-mod u-no-margin" href="@headerButtonLink">@headerButtonText</a> 584 </div> 585 } 586 </div> 587 </div> 588 </div> 589 </nav> 590 break; 591 case "splitted": //3 592 <!-- Header --> 593 <div class="header header-top dw-mod"> 594 <div class="center-container top-container__center-container grid grid--align-center dw-mod"> 595 596 @* Logo *@ 597 @RenderLogo(firstPageId, logo, businessName) 598 599 @if (!Model.Area.Item.GetBoolean("NavigationItemsHideSearch")) 600 { 601 @* Search *@ 602 <div class="grid--align-end grid__col-auto grid__col--bleed"> 603 <div class="typeahead u-no-margin u-margin-top u-margin-bottom u-color-inherit js-typeahead" data-page-size="7" id="TopProductSearch" data-search-feed-id="@searchFeedId" data-search-second-feed-id="@searchSecondFeedId" data-result-page-id="@resultPageId" data-groups-page-id="@groupsFeedId" data-search-type="@searchType"> 604 @RenderSearch("right") 605 </div> 606 </div> 607 608 609 } 610 </div> 611 </div> 612 <!-- Main navigation --> 613 <nav class="main-navigation dw-mod"> 614 <div class="center-container top-container__center-container grid grid--align-center dw-mod"> 615 <div style="margin:0 auto"> 616 @RenderHeaderNavigation() 617 </div> 618 <ul class="menu dw-mod" style="position:absolute;bottom:0px; right:35px;"> 619 @RenderSignIn("inNavigation", userInitials) 620 @RenderLanguageSelector() 621 @RenderFavorites() 622 @if (!onlyPreview) 623 { 624 @RenderMiniCart() 625 } 626 </ul> 627 @if (!string.IsNullOrWhiteSpace(headerButtonLink)) 628 { 629 <div class="u-margin-left u-inline-block"> 630 <a class="btn @headerButtonType dw-mod u-no-margin" href="@headerButtonLink">@headerButtonText</a> 631 </div> 632 } 633 </div> 634 </nav> 635 636 break; 637 case "normal": //1 638 default: 639 <!-- Header --> 640 <div class="header header-top dw-mod"> 641 <div class="center-container top-container__center-container grid grid--align-center dw-mod"> 642 @* Logo *@ 643 @RenderLogo(firstPageId, logo, businessName) 644 645 @if (!Model.Area.Item.GetBoolean("NavigationItemsHideSearch")) 646 { 647 @* Search *@ 648 <div class="grid__col-auto grid__col--bleed"> 649 @RenderSearch() 650 </div> 651 } 652 653 <ul class="menu dw-mod"> 654 @RenderSignIn("outsideNavigation", userInitials) 655 @RenderLanguageSelector("outsideNavigation") 656 @RenderFavorites("outsideNavigation") 657 @if (!onlyPreview) 658 { 659 @RenderMiniCart("outsideNavigation") 660 } 661 </ul> 662 663 @if (!string.IsNullOrWhiteSpace(headerButtonLink)) 664 { 665 <div class="u-margin-left u-inline-block"> 666 <a class="btn @headerButtonType dw-mod u-no-margin" href="@headerButtonLink">@headerButtonText</a> 667 </div> 668 } 669 </div> 670 </div> 671 672 <!-- Main navigation --> 673 <nav class="main-navigation dw-mod"> 674 <div class="center-container top-container__center-container grid dw-mod"> 675 <div> 676 @RenderHeaderNavigation() 677 </div> 678 </div> 679 </nav> 680 681 break; 682 } 683 } 684 else 685 { 686 string style = (topLayout == "normal" || topLayout == "splitted" ? "main-navigation--top-style" : "main-navigation--nav-style"); 687 688 689 switch (mobileTopLayout) 690 { 691 692 case "nav-left": 693 <nav class="main-navigation-mobile dw-mod"> 694 <div class="center-container top-container__center-container dw-mod"> 695 <div class="grid"> 696 @MobileNavigationTrigger() 697 698 <div class="logo u-middle dw-mod logo-mobile"> 699 <a href="/Default.aspx?ID=@firstPageId"> 700 <img class="grid__cell-img logo__img dw-mod" src="@mobileLogo" alt="@businessName" /> 701 </a> 702 </div> 703 704 <ul class="menu dw-mod u-pull--right"> 705 @if (!Model.Area.Item.GetBoolean("NavigationItemsHideSearch")) 706 { 707 <li class="menu__item menu__item--horizontal menu__item--top-level dw-mod"> 708 <label for="MobileSearchTrigger" class="menu__link dw-mod"> 709 <i class="@searchIcon fa-1x"></i> 710 </label> 711 </li> 712 } 713 714 @if (!onlyPreview) 715 { 716 @RenderMiniCart() 717 } 718 </ul> 719 </div> 720 </div> 721 </nav> 722 break; 723 case "nav-right": 724 <nav class="main-navigation-mobile dw-mod"> 725 <div class="center-container top-container__center-container dw-mod"> 726 <div class="grid"> 727 <div class="logo u-middle dw-mod logo-mobile"> 728 <a href="/Default.aspx?ID=@firstPageId"> 729 <img class="grid__cell-img logo__img dw-mod" src="@mobileLogo" alt="@businessName" /> 730 </a> 731 </div> 732 733 <ul class="menu dw-mod u-pull--right"> 734 @if (!Model.Area.Item.GetBoolean("NavigationItemsHideSearch")) 735 { 736 <li class="menu__item menu__item--horizontal menu__item--top-level dw-mod"> 737 <label for="MobileSearchTrigger" class="menu__link dw-mod"> 738 <i class="@searchIcon fa-1_5x"></i> 739 </label> 740 </li> 741 } 742 743 @if (!onlyPreview) 744 { 745 @RenderMiniCart() 746 } 747 </ul> 748 749 @MobileNavigationTrigger() 750 </div> 751 </div> 752 </nav> 753 break; 754 case "nav-search-left": 755 <nav class="main-navigation-mobile dw-mod"> 756 <div class="center-container top-container__center-container dw-mod"> 757 <div class="grid"> 758 @MobileNavigationTrigger() 759 760 @if (!Model.Area.Item.GetBoolean("NavigationItemsHideSearch")) 761 { 762 <ul class="menu dw-mod u-pull--right grid--align-self-center"> 763 <li class="menu__item menu__item--horizontal menu__item--top-level dw-mod" 764 onclick="displayLanguageSelector()"> 765 <label class="menu__link dw-mod"> 766 <i class="fal fa-globe fa-1x"></i> 767 </label> 768 </li> 769 </ul> 770 } 771 772 <div class="logo u-middle dw-mod logo-mobile"> 773 <a href="/Default.aspx?ID=@firstPageId"> 774 <img class="grid__cell-img logo__img dw-mod" src="@mobileLogo" alt="@businessName" /> 775 </a> 776 </div> 777 778 @if (!onlyPreview) 779 { 780 <ul class="menu dw-mod u-pull--right grid--align-self-center"> 781 @RenderMiniCart() 782 </ul> 783 } 784 </div> 785 </div> 786 </nav> 787 break; 788 case "search-left": 789 <nav class="main-navigation-mobile dw-mod"> 790 <div class="center-container top-container__center-container dw-mod"> 791 <div class="grid"> 792 793 @if (!Model.Area.Item.GetBoolean("NavigationItemsHideSearch")) 794 { 795 <ul class="menu dw-mod u-pull--right"> 796 <li class="menu__item menu__item--horizontal menu__item--top-level dw-mod"> 797 <label for="MobileSearchTrigger" class="menu__link dw-mod"> 798 <i class="@searchIcon fa-1_5x"></i> 799 </label> 800 </li> 801 </ul> 802 } 803 804 <div class="logo u-middle dw-mod logo-mobile"> 805 <a href="/Default.aspx?ID=@firstPageId"> 806 <img class="grid__cell-img logo__img dw-mod" src="@mobileLogo" alt="@businessName" /> 807 </a> 808 </div> 809 810 @if (!onlyPreview) 811 { 812 <ul class="menu dw-mod u-pull--right"> 813 @RenderMiniCart() 814 </ul> 815 } 816 817 @MobileNavigationTrigger() 818 </div> 819 </div> 820 </nav> 821 break; 822 } 823 824 @* Mobile search *@ 825 if (!Model.Area.Item.GetBoolean("NavigationItemsHideSearch")) 826 { 827 <input type="checkbox" id="MobileSearchTrigger" class="mobile-search-trigger" /> 828 829 <div class="main-navigation-mobile typeahead-mobile dw-mod"> 830 @if (mobileNavigationPosition == "left") 831 { 832 <div class="menu dw-mod u-pull--left"> 833 <div class="menu__item menu__item--horizontal menu__item--top-level dw-mod"> 834 <label for="MobileNavTrigger" class="mobile-nav-trigger-button menu__link dw-mod"></label> 835 </div> 836 </div> 837 } 838 else 839 { 840 <ul class="menu dw-mod u-pull--left"> 841 <li class="menu__item menu__item--horizontal menu__item--top-level dw-mod"> 842 <label for="MobileSearchTrigger" class="menu__link dw-mod"> 843 <i class="fas fa-times fa-1_5x"></i> 844 </label> 845 </li> 846 </ul> 847 } 848 849 @if (mobileNavigationPosition == "right") 850 { 851 <div class="menu dw-mod u-pull--right"> 852 <div class="menu__item menu__item--horizontal menu__item--top-level dw-mod"> 853 <label for="MobileNavTrigger" class="mobile-nav-trigger-button menu__link dw-mod"></label> 854 </div> 855 </div> 856 } 857 else 858 { 859 <ul class="menu dw-mod u-pull--right"> 860 <li class="menu__item menu__item--horizontal menu__item--top-level dw-mod"> 861 <label for="MobileSearchTrigger" class="menu__link dw-mod"> 862 <i class="fas fa-times fa-1_5x"></i> 863 </label> 864 </li> 865 </ul> 866 } 867 868 <div> 869 <div class="typeahead-mobile__search-field dw-mod js-typeahead" data-page-size="@(searchType == "combined-search" ? 4 : 8)" id="MobileProductSearch" data-search-feed-id="@searchFeedId" data-search-second-feed-id="@searchSecondFeedId" data-result-page-id="@resultPageId" data-search-type="@searchType"> 870 <input type="text" class="js-typeahead-search-field u-no-margin" placeholder="@searchPlaceholder" value="@searchValue"> 871 @if (string.IsNullOrEmpty(searchSecondFeedId)) 872 { 873 <ul class="dropdown dropdown--absolute-position u-min-w220px u-full-width js-handlebars-root js-typeahead-search-content dw-mod" id="MobileProductSearchBarContent" data-template="@searchTemplate" data-json-feed="/Default.aspx?ID=@searchFeedId&feedType=productsOnly" data-init-onload="false"></ul> 874 } 875 else 876 { 877 <div class="dropdown dropdown--absolute-position dropdown--combined grid dropdown--combined-mobile grid"> 878 <div class="js-handlebars-root js-typeahead-search-content grid__col-sm-7 grid__col--bleed-y" id="MobileProductSearchBarContent" data-template="@searchTemplate" data-json-feed="/Default.aspx?ID=@searchFeedId&feedType=productsOnly" data-init-onload="false"></div> 879 <div class="js-handlebars-root js-typeahead-additional-search-content grid__col-sm-5 grid__col--bleed-y" id="MobileContentSearchBarContent" data-template="@searchContentTemplate" data-json-feed="/Default.aspx?ID=@searchSecondFeedId" data-init-onload="false"></div> 880 </div> 881 } 882 <button type="button" class="btn btn--condensed btn--primary u-no-margin dw-mod js-typeahead-enter-btn"><i class="@searchIcon" style="color:white;"></i></button> 883 </div> 884 </div> 885 886 887 </div> 888 } 889 } 890 891 @* Impersonation bar *@ 892 @if (Model.CurrentUser.ID > 0 && Model.SecondaryUsers.Count > 0) 893 { 894 <div class="u-color-warning--bg"> 895 <div class="center-container top-container__center-container dw-mod"> 896 @*Impersonation*@ 897 <div class="grid"> 898 <div class="grid--align-self-center grid__col-x"> 899 @if (Model.CurrentSecondaryUser != null && Model.CurrentSecondaryUser.ID > 0) 900 { 901 string stopImpersonateTranslation = Translate("Stop impersonation"); 902 string username = ""; 903 if (!string.IsNullOrEmpty(Model.CurrentSecondaryUser.FirstName) && !string.IsNullOrEmpty(Model.CurrentSecondaryUser.LastName)) 904 { 905 username = Model.CurrentSecondaryUser.FirstName + " " + Model.CurrentSecondaryUser.LastName; 906 } 907 else if (!string.IsNullOrEmpty(Model.CurrentSecondaryUser.Name)) 908 { 909 username = Model.CurrentSecondaryUser.Name; 910 } 911 else if (!string.IsNullOrEmpty(Model.CurrentSecondaryUser.Email)) 912 { 913 username = Model.CurrentSecondaryUser.Email; 914 } 915 else 916 { 917 username = Model.CurrentSecondaryUser.UserName; 918 } 919 <div class="grid-cell"> 920 <div class="u-pull--left u-bold u-margin-top"> 921 <i class="fas fa-user-secret"></i> 922 @Pageview.User.UserName<text>&nbsp;</text>@Translate("is impersonating")<text>&nbsp;</text>@username 923 </div> 924 <form method="post" class="u-pull--right u-no-margin"> 925 <input type="submit" class="btn btn--secondary dw-mod u-no-margin" name="DwExtranetRemoveSecondaryUser" value="@stopImpersonateTranslation"> 926 </form> 927 </div> 928 } 929 else 930 { 931 string viewListTranslation = Translate("View the list of users you can impersonate"); 932 <div class="grid-cell u-bold"> 933 <i class="fas fa-user-secret"></i> 934 <a href="/Default.aspx?ID=@impersonationPageId" title="@viewListTranslation" class="u-color-font-black">@viewListTranslation</a> 935 </div> 936 } 937 </div> 938 </div> 939 </div> 940 </div> 941 } 942 </header> 943 944 <!-- Floating mini cart --> 945 @if (!Model.Area.Item.GetBoolean("NavigationItemsHideCart")) 946 { 947 if (!onlyPreview && !stickyMenu && Converter.ToString(pageId) == productsPageId && Pageview.Device.ToString() != "Mobile" && Pageview.Device.ToString() != "Tablet") 948 { 949 <div class="floating-mini-cart u-hidden dw-mod" id="FloatingMiniCart"> 950 <div class="mini-cart dw-mod"> 951 <a href="/Default.aspx?ID=@cartPageId&Purge=True" class="menu-tools__link menu__link--condensed dw-mod js-mini-cart-button" onmouseover="Cart.UpdateMiniCart(event, 'SecondaryMiniCart', '/Default.aspx?ID=@miniCartFeedPageId&feedType=MiniCart')"> 952 <i class="@cartIcon fa-4x"></i> 953 <div class="mini-cart__counter mini-cart__counter--lg dw-mod"> 954 <div class="js-handlebars-root js-mini-cart-counter" id="FloatingCartCounter" data-template="MiniCartCounterContent" data-json-feed="/Default.aspx?ID=@miniCartFeedPageId&feedType=Counter" data-preloader="false" data-init-onload="false"> 955 <div class="js-mini-cart-counter-content"> 956 @Model.Cart.TotalProductsCount 957 </div> 958 </div> 959 </div> 960 </a> 961 962 <div class="mini-cart-dropdown js-handlebars-root js-mini-cart dw-mod" id="SecondaryMiniCart" data-template="MiniCartContent" data-cart-id="@miniCartFeedPageId" data-json-feed="/Default.aspx?ID=@miniCartFeedPageId&feedType=MiniCart" data-init-onload="false"></div> 963 </div> 964 </div> 965 } 966 } 967 968 <!-- Render the content --> 969 <div id="Page" class="page @pagePos"> 970 <section class="center-container content-container dw-mod" id="content"> 971 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 972 973 974 @{ 975 string columnClass = "12"; 976 bool isProductPage = HttpContext.Current.Request.QueryString.Get("ProductID") != null ? true : false; 977 string backgroundColorClass = Model.PropertyItem.GetString("BackgroundColor") != null && !isProductPage ? "u-" + Model.PropertyItem.GetList("BackgroundColor").SelectedValue + "--bg" : ""; 978 } 979 980 @if (Model.PropertyItem.GetList("ShowBreadcrumb").SelectedValue == "True") 981 { 982 <div class="grid__col-12 grid__col--bleed-y"> 983 @RenderNavigation(new 984 { 985 id = "breadcrumb", 986 template = "Breadcrumb.xslt" 987 }) 988 </div> 989 } 990 991 <div class="grid"> 992 @if (Model.PropertyItem.GetList("LeftMenu") != null && Model.PropertyItem.GetList("LeftMenu").SelectedValue == "True" && (Pageview.Page.NavigationSettings == null || !Pageview.Page.NavigationSettings.UseEcomGroups)) 993 { 994 var navigationMarkup = RenderNavigation(new 995 { 996 id = "leftnav", 997 cssclass = "dwnavigation", 998 startLevel = 2, 999 expandmode = "all", 1000 endlevel = 5, 1001 template = "LeftNavigation.xslt" 1002 }); 1003 1004 if (!string.IsNullOrEmpty(navigationMarkup)) 1005 { 1006 <nav class="grid__col-md-3"> 1007 <div class="grid__cell"> 1008 @navigationMarkup 1009 </div> 1010 </nav> 1011 columnClass = "9"; 1012 } 1013 } 1014 <div class="grid__col-md-@columnClass grid__col--bleed"> 1015 <div class="grid"> 1016 @Model.Placeholder("dwcontent", "content", "default:true;sort:1") 1017 </div> 1018 </div> 1019 </div> 1020 1021 1022 @* Very small hack to make it cleanly, and easily possible to change the background color on a single page *@ 1023 @if (backgroundColorClass != "") 1024 { 1025 <script> 1026 document.getElementById("Page").classList.add("@backgroundColorClass"); 1027 </script> 1028 } 1029 </section> 1030 </div> 1031 </main> 1032 1033 @RenderFooter() 1034 1035 1036 1037 @helper RenderLogo(string pageId, string src, string alt) 1038 { 1039 <div class="logo dw-mod"> 1040 <a href="/Default.aspx?ID=@pageId" class="logo__img dw-mod u-block"> 1041 <img class="grid__cell-img logo__img dw-mod" src="@src" alt="@alt" /> 1042 </a> 1043 </div> 1044 } 1045 1046 @helper RenderSearch(string alignment = "left") 1047 { 1048 <div class="typeahead typeahead--centered u-color-inherit js-typeahead dw-mod" data-page-size="7" id="ProductSearchBar" data-search-feed-id="@searchFeedId" data-search-second-feed-id="@searchSecondFeedId" data-result-page-id="@resultPageId" data-groups-page-id="@groupsFeedId" data-search-type="@searchType"> 1049 @if (showGroups) 1050 { 1051 <button type="button" class="btn btn--condensed u-color-light-gray--bg typeahead-group-btn dw-mod js-typeahead-groups-btn" data-group-id="all">@Translate("All")</button> 1052 <ul class="dropdown dropdown--absolute-position u-min-w220px js-handlebars-root js-typeahead-groups-content dw-mod" id="ProductSearchBarGroupsContent" data-template="SearchGroupsTemplate" data-json-feed="/Default.aspx?ID=@groupsFeedId&feedType=productGroups" data-init-onload="false" data-preloader="minimal"></ul> 1053 } 1054 <div class="typeahead-search-field"> 1055 <input type="text" class="u-no-margin u-full-width u-full-height js-typeahead-search-field" placeholder="@searchPlaceholder" value="@searchValue"> 1056 @if (string.IsNullOrEmpty(searchSecondFeedId)) 1057 { 1058 int productGroupsPageId = GetPageIdByNavigationTag("ProductGroupsFeed"); 1059 <li class="menu__item--top-level u-hidden-xxs dw-mod search-element" onmouseover="document.getElementById('headerSearch').focus()"> 1060 <div class="menu__link is-dropdown is-dropdown--no-icon dw-mod u-w120px" style="margin:auto 0; padding: 0 0.5em; color:black;"> 1061 @Translate("SEARCH")<i class="fa fa-1x u-pull--right"><img id="searchIcon" class="u-margin-top" style="width:20.8125px; height:20.8125px;" src="/Admin/Public/GetImage.ashx?width=54&height=54&image=/Files/DigitalAssets/povecalo2.png" alt="Search icon" /></i> 1062 <div class="menu menu--dropdown u-w400px top-micro-search dw-mod" id="searchBox"> 1063 <div class="typeahead js-typeahead" data-page-size="10" id="ProductSearchBar" data-search-page-id="@searchFeedId&feed=true" data-result-page-id="@productsPageId" data-groups-page-id="@productGroupsPageId"> 1064 <div class="typeahead-search-field"> 1065 <div class="search-input-field"> 1066 <input type="text" class="u-no-margin js-typeahead-search-field" id="headerSearch" placeholder="@searchPlaceholder" value="@searchValue" style="display:inline;"> 1067 <i class="u-pull--right" style="padding-top:6px;"><img src="/Admin/Public/GetImage.ashx?width=20.8&height=20.8&image=/Files/DigitalAssets/povecalo2.png" alt="Magnifier icon" /></i> 1068 </div> 1069 <div style="display:none;"><ul class="dropdown dropdown--absolute-position u-min-w220px u-full-width js-handlebars-root js-typeahead-search-content" id="ProductSearchBarContent" data-template="SearchContentTemplate" data-json-feed="/Default.aspx?ID=@searchFeedId&feedType=productsOnly&feed=true" data-init-onload="false" data-preloader="minimal"></ul></div> 1070 </div> 1071 </div> 1072 </div> 1073 </div> 1074 </li> 1075 1076 <ul class="dropdown dropdown--absolute-position u-min-w220px u-full-width js-handlebars-root js-typeahead-search-content dw-mod" id="ProductSearchBarContent" data-template="@searchTemplate" data-json-feed="/Default.aspx?ID=@searchFeedId&feedType=productsOnly" data-init-onload="false"></ul> 1077 } 1078 else 1079 { 1080 <div class="dropdown dropdown--absolute-position dropdown--combined grid @(alignment == "right" ? "dropdown--right-aligned" : "")"> 1081 <div class="js-handlebars-root js-typeahead-search-content grid__col-sm-7 grid__col--bleed-y" id="ProductSearchBarContent" data-template="@searchTemplate" data-json-feed="/Default.aspx?ID=@searchFeedId&feedType=productsOnly" data-init-onload="false"></div> 1082 <div class="js-handlebars-root js-typeahead-additional-search-content grid__col-sm-5 grid__col--bleed-y" id="ContentSearchBarContent" data-template="@searchContentTemplate" data-json-feed="/Default.aspx?ID=@searchSecondFeedId" data-init-onload="false"></div> 1083 </div> 1084 } 1085 </div> 1086 <button type="button" class="btn btn--condensed btn--primary u-no-margin dw-mod js-typeahead-enter-btn"><i class="@searchIcon"></i></button> 1087 </div> 1088 } 1089 1090 @helper RenderMiniSearch() 1091 { 1092 1093 int productGroupsPageId = GetPageIdByNavigationTag("ProductGroupsFeed"); 1094 <li class="menu__item--top-level u-hidden-xxs dw-mod search-element" style="margin-bottom:0;" onmouseover="document.getElementById('headerSearch').focus()"> 1095 <div class="menu__link is-dropdown is-dropdown--no-icon dw-mod grid--align-self-center" style="margin:auto 0; padding: 0 0.5em; color:black;"> 1096 @Translate("SEARCH")<i class="fa fa-1x u-pull--right"><img id="searchIcon" class="u-margin-top" style="width:20.8125px; height:20.8125px;" src="/Admin/Public/GetImage.ashx?width=54&height=54&image=/Files/DigitalAssets/povecalo2.png" alt="Magnifier icon" /></i> 1097 <div class="menu menu--dropdown u-w400px top-micro-search dw-mod" id="searchBox"> 1098 <div class="typeahead js-typeahead" data-page-size="10" id="ProductSearchBar" data-search-page-id="@searchFeedId&feed=true" data-result-page-id="@productsPageId" data-groups-page-id="@productGroupsPageId"> 1099 <div class="typeahead-search-field"> 1100 <div class="search-input-field"> 1101 <input type="text" class="u-no-margin js-typeahead-search-field" id="headerSearch" placeholder="@searchPlaceholder" value="@searchValue" style="display:inline;"> 1102 <i class="u-pull--right" style="padding-top:6px;"><img src="/Admin/Public/GetImage.ashx?width=20.8&height=20.8&image=/Files/DigitalAssets/povecalo2.png" alt="Magnifier icon" /></i> 1103 </div> 1104 <div style="display:none;"><ul class="dropdown dropdown--absolute-position u-min-w220px u-full-width js-handlebars-root js-typeahead-search-content" id="ProductSearchBarContent" data-template="SearchProductsTemplate" data-json-feed="/Default.aspx?ID=@searchFeedId&feedType=productsOnly&feed=true" data-init-onload="false" data-preloader="minimal"></ul></div> 1105 </div> 1106 </div> 1107 </div> 1108 </div> 1109 </li> 1110 1111 1112 @* 1113 <li class="menu__item menu__item--horizontal menu__item--top-level u-hidden-xxs is-dropdown is-dropdown--no-icon dw-mod" onmouseover="document.getElementById('headerSearch').focus()"> 1114 1115 <div class="menu__link u-w50px dw-mod"> 1116 <i class="@searchIcon fa-1_5x"></i> 1117 </div> 1118 <div class="menu menu--dropdown u-w380px top-micro-search dw-mod"> 1119 <div class="typeahead js-typeahead" data-page-size="7" id="ProductSearchBar" data-search-feed-id="@searchFeedId" data-search-second-feed-id="@searchSecondFeedId" data-result-page-id="@resultPageId" data-search-type="@searchType"> 1120 <div class="typeahead-search-field"> 1121 <input type="text" class="u-no-margin u-full-width js-typeahead-search-field" id="headerSearch" placeholder="@searchPlaceholder" value="@searchValue"> 1122 @if (string.IsNullOrEmpty(searchSecondFeedId)) 1123 { 1124 <ul class="dropdown dropdown--absolute-position u-min-w220px u-full-width js-handlebars-root js-typeahead-search-content dw-mod" id="ProductSearchBarContent" data-template="@searchTemplate" data-json-feed="/Default.aspx?ID=@searchFeedId&feedType=productsOnly" data-init-onload="false"></ul> 1125 } 1126 else 1127 { 1128 <div class="dropdown dropdown--absolute-position dropdown--combined grid dropdown--right-aligned"> 1129 <div class="js-handlebars-root js-typeahead-search-content grid__col-sm-7 grid__col--bleed-y" id="ProductSearchBarContent" data-template="@searchTemplate" data-json-feed="/Default.aspx?ID=@searchFeedId&feedType=productsOnly" data-init-onload="false"></div> 1130 <div class="js-handlebars-root js-typeahead-additional-search-content grid__col-sm-5 grid__col--bleed-y" id="ContentSearchBarContent" data-template="@searchContentTemplate" data-json-feed="/Default.aspx?ID=@searchSecondFeedId" data-init-onload="false"></div> 1131 </div> 1132 } 1133 </div> 1134 </div> 1135 </div> 1136 </li> 1137 *@ 1138 1139 } 1140 1141 1142 <!-- Content rendering helpers --> 1143 1144 @helper MobileNavigation(string userInitials, string position) 1145 { 1146 int pageId = Model.TopPage.ID; 1147 int logoutPageId = 10359; 1148 string mobileNavigationLevels = Model.Area.Item.GetBoolean("MobileNavigationLevels") ? Model.Area.Item.GetString("MobileNavigationLevels") : "3"; 1149 1150 bool showCreateAccountLink = Model.Area.Item.GetBoolean("ShowCreateAccountLink"); 1151 1152 string userIcon = !String.IsNullOrEmpty(Model.Area.Item.GetItem("Icons").GetList("SignInProfileIcon").SelectedValue) ? Model.Area.Item.GetItem("Icons").GetList("SignInProfileIcon").SelectedValue.ToLower() : "fas fa-user"; 1153 string favoriteIcon = !String.IsNullOrEmpty(Model.Area.Item.GetItem("Icons").GetList("FavoriteIcon").SelectedValue) ? "fas fa-" + Model.Area.Item.GetItem("Icons").GetList("FavoriteIcon").SelectedValue.ToLower() : "fas fa-star"; 1154 string languageIcon = !String.IsNullOrEmpty(Model.Area.Item.GetItem("Icons").GetList("LanguageIcon").SelectedValue) ? Model.Area.Item.GetItem("Icons").GetList("LanguageIcon").SelectedValue.ToLower() : "fas fa-globe"; 1155 1156 int miniCartFeedPageId = GetPageIdByNavigationTag("MiniCartFeed"); 1157 int cartFeedPageId = GetPageIdByNavigationTag("CartOrderlinesFeed"); 1158 int createAccountPageId = GetPageIdByNavigationTag("CreateAccount"); 1159 int loginPageId = GetPageIdByNavigationTag("SignInPage"); 1160 1161 string myProfilePageId = (Model.CurrentUser.ID <= 0) ? GetPageIdByNavigationTag("SignInPage").ToString() + "&RedirectPageId=" + GetPageIdByNavigationTag("CustomerProfile").ToString() : GetPageIdByNavigationTag("CustomerProfile").ToString(); 1162 string myOrdersPageId = (Model.CurrentUser.ID <= 0) ? GetPageIdByNavigationTag("SignInPage").ToString() + "&RedirectPageId=" + GetPageIdByNavigationTag("CustomerOrders").ToString() : GetPageIdByNavigationTag("CustomerOrders").ToString(); 1163 string myFavoritesPageId = (Model.CurrentUser.ID <= 0) ? GetPageIdByNavigationTag("SignInPage").ToString() + "&RedirectPageId=" + GetPageIdByNavigationTag("CustomerFavorites").ToString() : GetPageIdByNavigationTag("CustomerFavorites").ToString(); 1164 bool showMyProfileLink = Model.Area.Item.GetBoolean("ShowMyProfileLink"); 1165 bool showMyOrdersLink = Model.Area.Item.GetBoolean("ShowMyOrdersLink"); 1166 bool showMyFavoritesLink = Model.Area.Item.GetBoolean("ShowMyFavoritesLink"); 1167 1168 bool renderPagesInToolBar = Model.Area.Item.GetBoolean("RenderPagesInToolBar"); 1169 bool isSlidesDesign = Model.Area.Item.GetList("MobileNavigationDesign").SelectedValue == "Slides"; 1170 string menuTemplate = isSlidesDesign ? "BaseMenuForMobileSlides.xslt" : "BaseMenuForMobileExpandable.xslt"; 1171 int startLevel = renderPagesInToolBar ? 1 : 0; 1172 1173 bool onlyPreview = Model.Area.Item.GetBoolean("OnlyPreviewForAnonymous") && Model.CurrentUser.ID == 0; 1174 1175 string pageDomain = Pageview.Area.UrlName; 1176 string languageDesc = ""; 1177 switch (pageDomain) 1178 { 1179 case "hr-hr": 1180 languageDesc = "Hrvatska (HRK)"; 1181 break; 1182 case "eu-en": 1183 languageDesc = "European Union (EUR)"; 1184 break; 1185 case "na-en": 1186 languageDesc = "US & Canada (USD)"; 1187 break; 1188 case "ch-en": 1189 languageDesc = "China (CNY)"; 1190 break; 1191 case "sa-en": 1192 languageDesc = "Latin America (USD)"; 1193 break; 1194 case "uk-en": 1195 languageDesc = "United Kingdom (GBP)"; 1196 break; 1197 case "au-en": 1198 languageDesc = "Australia (AUD)"; 1199 break; 1200 case "in-en": 1201 languageDesc = "International (USD)"; 1202 break; 1203 case "jp-en": 1204 languageDesc = "Japan (JPY)"; 1205 break; 1206 1207 default: 1208 languageDesc = pageDomain; 1209 break; 1210 } 1211 1212 if (Pageview.Device.ToString() == "Mobile" || Pageview.Device.ToString() == "Tablet") 1213 { 1214 <!-- Trigger for mobile navigation --> 1215 <input type="checkbox" id="MobileNavTrigger" class="mobile-nav-trigger mobile-nav-trigger--@position" autocomplete="off" /> 1216 1217 <!-- Mobile navigation --> 1218 <nav class="mobile-navigation mobile-navigation--@position dw-mod"> 1219 @if (Model.CurrentUser.ID > 0) 1220 { 1221 string userName = Model.CurrentUser.FirstName != null ? Model.CurrentUser.FirstName : ""; 1222 userName += " " + Model.CurrentUser.LastName != null ? Model.CurrentUser.LastName : ""; 1223 userName += userName == "" && Model.CurrentUser.UserName != null ? Model.CurrentUser.UserName : ""; 1224 1225 <ul class="menu menu-mobile"> 1226 <li class="menu-mobile__item"> 1227 <a href="/default.aspx?ID=@myProfilePageId" class="menu-mobile__link dw-mod"><i class="@userIcon menu-mobile__link-icon"></i> @userName</a> 1228 </li> 1229 </ul> 1230 } 1231 1232 @RenderNavigation( 1233 new 1234 { 1235 id = "mobilenavigation", 1236 cssclass = "menu menu-mobile dwnavigation", 1237 startLevel = @startLevel - 1, 1238 ecomStartLevel = @startLevel, 1239 endlevel = 4, 1240 expandmode = "all", 1241 template = "BaseMenuForMobileExpandable.xslt" 1242 } 1243 ) 1244 1245 @RenderNavigation( 1246 new 1247 { 1248 id = "mobilenavigation", 1249 cssclass = "menu menu-mobile dwnavigation", 1250 startLevel = @startLevel, 1251 ecomStartLevel = @startLevel, 1252 endlevel = 4, 1253 expandmode = "all", 1254 template = "BaseMenuForMobileExpandableProducts.xslt" 1255 } 1256 ) 1257 1258 1259 @if (renderPagesInToolBar) 1260 { 1261 @RenderNavigation( 1262 new 1263 { 1264 id = "topToolsMobileNavigation", 1265 cssclass = "menu menu-mobile dwnavigation", 1266 template = "ToolsMenuForMobile.xslt" 1267 } 1268 ) 1269 } 1270 1271 <ul class="menu menu-mobile"> 1272 @if (!Model.Area.Item.GetBoolean("NavigationItemsHideSignIn")) 1273 { 1274 if (Model.CurrentUser.ID <= 0) 1275 { 1276 <li class="menu-mobile__item"> 1277 <a class="menu-mobile__link dw-mod" href="/Default.aspx?ID=@loginPageId"><i class="@userIcon menu-mobile__link-icon"></i> @Translate("Sign in")</a> 1278 </li> 1279 if (showCreateAccountLink) 1280 { 1281 <li class="menu-mobile__item"> 1282 <a class="menu-mobile__link dw-mod" href="/Default.aspx?ID=@createAccountPageId"><i class="@userIcon menu-mobile__link-icon"></i> @Translate("Create account")</a> 1283 </li> 1284 } 1285 } 1286 else 1287 { 1288 if (showMyProfileLink) 1289 { 1290 <li class="menu-mobile__item"> 1291 <a href="/default.aspx?ID=@myProfilePageId" class="menu-mobile__link dw-mod"><i class="@userIcon menu-mobile__link-icon"></i> @Translate("My Profile")</a> 1292 </li> 1293 } 1294 if (showMyOrdersLink) 1295 { 1296 <li class="menu-mobile__item"> 1297 <a href="/default.aspx?ID=@myOrdersPageId" class="menu-mobile__link dw-mod"><i class="fas fa-list menu-mobile__link-icon"></i> @Translate("My Orders")</a> 1298 </li> 1299 } 1300 if (showMyFavoritesLink) 1301 { 1302 <li class="menu-mobile__item"> 1303 <a href="/default.aspx?ID=@myFavoritesPageId" class="menu-mobile__link dw-mod"><i class="@favoriteIcon menu-mobile__link-icon"></i> @Translate("My Favorites")</a> 1304 </li> 1305 } 1306 <li class="menu-mobile__item"> 1307 <a class="menu-mobile__link dw-mod" href="/Admin/Public/ExtranetLogoff.aspx?ID=@logoutPageId?CurrencyCode=USD&cartcmd=emptycart"><i class="@userIcon menu-mobile__link-icon"></i> @Translate("Sign out")</a> 1308 </li> 1309 } 1310 } 1311 1312 <li class="menu-mobile__item" onclick="getElementById('MobileNavTrigger').click();"> 1313 <label for="MobileSearchTrigger" class="menu-mobile__link dw-mod"> 1314 <i class="fas fa-search fa-1x menu-mobile__link-icon"></i>@Translate("Search") 1315 </label> 1316 </li> 1317 1318 @*Render language selectors*@ 1319 1320 <li class="menu-mobile__item dw-mod is-submenu"> 1321 <input id="MobileMenuCheck_Language" type="checkbox" class="expand-trigger"> 1322 <div class="menu-mobile__link__wrap"> 1323 <span class="menu-mobile__link dw-mod">@Translate("Location"): @languageDesc</span> 1324 <label for="MobileMenuCheck_Language" class="menu-mobile__trigger"> 1325 <text> 1326 </text> 1327 </label> 1328 </div> 1329 <ul class="menu-mobile menu-mobile__submenu"> 1330 <a class="menu-mobile__link dw-mod menu-mobile__link--level-2" href="https://www.croata.com/eu-en/frontpage?CurrencyCode=EUR&cartcmd=emptycart">European Union</a> 1331 </ul> 1332 <ul class="menu-mobile menu-mobile__submenu"> 1333 <a class="menu-mobile__link dw-mod menu-mobile__link--level-2" href="https://www.croata.com/na-en/frontpage?CurrencyCode=USD&cartcmd=emptycart">US & Canada</a> 1334 </ul> 1335 <ul class="menu-mobile menu-mobile__submenu"> 1336 <a class="menu-mobile__link dw-mod menu-mobile__link--level-2" href="https://www.croata.com/ch-en/frontpage?CurrencyCode=CNY&cartcmd=emptycart">China</a> 1337 </ul> 1338 <ul class="menu-mobile menu-mobile__submenu"> 1339 <a class="menu-mobile__link dw-mod menu-mobile__link--level-2" href="https://www.croata.hr/hr-hr/frontpage?CurrencyCode=HRK&cartcmd=emptycart">Croatia (Hrvatska)</a> 1340 </ul> 1341 <ul class="menu-mobile menu-mobile__submenu"> 1342 <a class="menu-mobile__link dw-mod menu-mobile__link--level-2" href="https://www.croata.com/jp-en/frontpage?CurrencyCode=JPY&cartcmd=emptycart">Japan</a> 1343 </ul> 1344 <ul class="menu-mobile menu-mobile__submenu"> 1345 <a class="menu-mobile__link dw-mod menu-mobile__link--level-2" href="https://www.croata.com/sa-en/frontpage?CurrencyCode=USD&cartcmd=emptycart">Latin America</a> 1346 </ul> 1347 <ul class="menu-mobile menu-mobile__submenu"> 1348 <a class="menu-mobile__link dw-mod menu-mobile__link--level-2" href="https://www.croata.com/uk-en/frontpage?CurrencyCode=GBP&cartcmd=emptycart">United Kingdom</a> 1349 </ul> 1350 <ul class="menu-mobile menu-mobile__submenu"> 1351 <a class="menu-mobile__link dw-mod menu-mobile__link--level-2" href="https://www.croata.com/au-en/frontpage?CurrencyCode=AUD&cartcmd=emptycart">Australia</a> 1352 </ul> 1353 <ul class="menu-mobile menu-mobile__submenu"> 1354 <a class="menu-mobile__link dw-mod menu-mobile__link--level-2" href="https://www.croata.com/in-en/frontpage?CurrencyCode=USD&cartcmd=emptycart">International (Other)</a> 1355 </ul> 1356 </li> 1357 </ul> 1358 </nav> 1359 <label class="mobile-nav-trigger-off" for="MobileNavTrigger"></label> 1360 1361 if (!onlyPreview) 1362 { 1363 <div class="u-visually-hidden js-handlebars-root js-mini-cart" id="miniCart" data-template="MiniCartContent" data-cart-id="@cartFeedPageId" data-json-feed="/Default.aspx?ID=@miniCartFeedPageId&feedType=MiniCart" data-init-onload="false"></div> 1364 } 1365 } 1366 } 1367 1368 @helper LoginModal() 1369 { 1370 int pageId = Model.TopPage.ID; 1371 string topLayout = Model.Area.Item.GetList("LayoutTop").SelectedValue; 1372 int createAccountPageId = GetPageIdByNavigationTag("CreateAccount"); 1373 int signInProfilePageId = GetPageIdByNavigationTag("SignInPage"); 1374 string forgotPasswordPageId = signInProfilePageId.ToString() + "&LoginAction=Recovery"; 1375 string userSignedInError = !Model.LogOnFailed ? "" : "checked"; 1376 string userSignedInErrorText = ""; 1377 1378 if (Model.LogOnFailed) 1379 { 1380 switch (Model.LogOnFailedReason) 1381 { 1382 case Dynamicweb.Security.UserManagement.LogOnFailedReason.PasswordLengthInvalid: 1383 userSignedInErrorText = Translate("Password length is invalid"); 1384 break; 1385 case Dynamicweb.Security.UserManagement.LogOnFailedReason.IncorrectLogin: 1386 userSignedInErrorText = Translate("Invalid email or password"); 1387 break; 1388 case Dynamicweb.Security.UserManagement.LogOnFailedReason.ExceededFailedLogOnLimit: 1389 userSignedInErrorText = Translate("You have exceeded the limit of allowed login attempts. The user account is temporarily locked"); 1390 break; 1391 case Dynamicweb.Security.UserManagement.LogOnFailedReason.LoginLocked: 1392 userSignedInErrorText = Translate("The user account is temporarily locked"); 1393 break; 1394 case Dynamicweb.Security.UserManagement.LogOnFailedReason.PasswordExpired: 1395 userSignedInErrorText = Translate("The password has expired and needs to be renewed"); 1396 break; 1397 default: 1398 userSignedInErrorText = Translate("An unknown error occured"); 1399 break; 1400 } 1401 } 1402 1403 <!-- Trigger for the login modal --> 1404 <input type="checkbox" id="SignInModalTrigger" class="modal-trigger @topLayout" @userSignedInError /> 1405 1406 <!-- Login modal --> 1407 <div class="modal-container"> 1408 <label for="SignInModalTrigger" id="SignInModalOverlay" class="modal-overlay"></label> 1409 <div class="modal modal--xs u-border" id="SignInModal"> 1410 <div class="modal__header"> 1411 <h2>@Translate("Sign in")</h2> 1412 <span style="position:absolute;top:5px;right:5px;cursor:pointer;" onclick="getElementById('SignInModalTrigger').checked = false">X</span> 1413 </div> 1414 <div class="modal__body"> 1415 <form method="post" id="LoginForm" class="u-no-margin"> 1416 1417 <input type="hidden" name="ID" value="@pageId" /> 1418 <input type="hidden" name="DWExtranetUsernameRemember" value="True" /> 1419 <input type="hidden" name="DWExtranetPasswordRemember" value="True" /> 1420 <input type="text" class="u-full-width" id="LoginUsername" name="username" placeholder="@Translate("Email")" /> 1421 <input type="password" class="u-full-width" id="LoginPassword" name="password" placeholder="@Translate("Password")" /> 1422 <div class="field-error dw-mod">@userSignedInErrorText</div> 1423 1424 <button type="submit" class="btn btn--primary btn--full dw-mod" name="LoginAction" value="Login" onclick="Buttons.LockButton(event)">@Translate("Sign in")</button> 1425 1426 <a class="btn btn--link-clean dw-mod" href="/Default.aspx?id=@forgotPasswordPageId">@Translate("Forgot your password?", "Forgot your password?")</a> 1427 1428 <a class="btn btn--link-clean dw-mod" href="/default.aspx?ID=@createAccountPageId">@Translate("Create account")?</a> 1429 </form> 1430 </div> 1431 </div> 1432 </div> 1433 } 1434 1435 @helper RenderHeaderNavigation() 1436 { 1437 bool megaMenu = Model.Area.Item.GetList("NavigationMegaMenu").SelectedValue.ToLower() == "true" ? true : false; 1438 string megamenuPromotionImage = Model.Area.Item.GetFile("NavigationMegamenuPromotionImage") != null ? Model.Area.Item.GetFile("NavigationMegamenuPromotionImage").PathUrlEncoded : ""; 1439 bool renderPagesInToolBar = Model.Area.Item.GetBoolean("RenderPagesInToolBar"); 1440 int startLevel = renderPagesInToolBar ? 1 : 0; 1441 1442 if (Pageview.Device.ToString() != "Mobile" && Pageview.Device.ToString() != "Tablet") 1443 { 1444 if (!megaMenu) 1445 { 1446 @RenderNavigation(new 1447 { 1448 id = "topnavigation", 1449 cssclass = "menu dw-mod dwnavigation u-full-max-width", 1450 startLevel = @startLevel, 1451 ecomStartLevel = @startLevel + 1, 1452 endlevel = 5, 1453 expandmode = "all", 1454 template = "BaseMenuWithDropdown.xslt" 1455 }); 1456 } 1457 else 1458 { 1459 1460 <ul class="menu dw-mod dwnavigation u-full-max-width" id="topnavigation"> 1461 1462 @RenderNavigation(new 1463 { 1464 id = "topnavigation", 1465 cssclass = "menu dw-mod dwnavigation u-full-max-width", 1466 startLevel = 0, 1467 ecomStartLevel = 1, 1468 endlevel = 4, 1469 promotionImage = megamenuPromotionImage, 1470 promotionLink = Model.Area.Item.GetString("NavigationMegamenuPromotionLink"), 1471 expandmode = "all", 1472 template = "BaseMegaMenuPages.xslt" 1473 }) 1474 1475 @RenderNavigation(new 1476 { 1477 id = "topnavigation2", 1478 cssclass = "menu dw-mod dwnavigation u-full-max-width", 1479 startLevel = @startLevel, 1480 ecomStartLevel = @startLevel + 1, 1481 endlevel = 5, 1482 promotionImage = megamenuPromotionImage, 1483 promotionLink = Model.Area.Item.GetString("NavigationMegamenuPromotionLink"), 1484 expandmode = "all", 1485 template = "BaseMegaMenuProducts.xslt" 1486 }) 1487 </ul> 1488 1489 } 1490 } 1491 } 1492 1493 @helper MobileNavigationTrigger() 1494 { 1495 @* Mobile navigation trigger *@ 1496 1497 if (Pageview.Device.ToString() == "Mobile" || Pageview.Device.ToString() == "Tablet") 1498 { 1499 <div class="menu dw-mod u-pull--left grid--align-self-center"> 1500 <div class="menu__item menu__item--horizontal menu__item--top-level dw-mod"> 1501 <label for="MobileNavTrigger" class="mobile-nav-trigger-button menu__link dw-mod"></label> 1502 </div> 1503 </div> 1504 } 1505 } 1506 1507 @helper RenderLanguageSelector(string type = "inNavigation") 1508 { 1509 string liClasses = type == "inNavigation" ? "menu__item menu__item--horizontal menu__item--top-level dw-mod u-hidden-xxs" : "menu__item menu__item--horizontal menu--clean dw-mod"; 1510 string menuLinkClass = type == "inNavigation" ? "menu__link" : "header-menu__link"; 1511 string languageIcon = !String.IsNullOrEmpty(Model.Area.Item.GetItem("Icons").GetList("LanguageIcon").SelectedValue) ? Model.Area.Item.GetItem("Icons").GetList("LanguageIcon").SelectedValue.ToLower() : "fas fa-globe"; 1512 string languageViewType = !String.IsNullOrEmpty(Model.Area.Item.GetList("LanguageSelectorViewType").SelectedValue) ? Model.Area.Item.GetList("LanguageSelectorViewType").SelectedValue.ToLower() : ""; 1513 string pageDomain = Pageview.Area.UrlName; 1514 string languageDesc = ""; 1515 string langDescMiddlePart = " style='text-decoration:none; color:white;' onclick=\"setCookie('StateCookie_SelectLocationModalTrigger','true')\""; 1516 switch (pageDomain) 1517 { 1518 case "hr-hr": 1519 languageDesc = "<a href='https://www.croata.hr/hr-hr/frontpage?CurrencyCode=HRK&cartcmd=emptycart&showLocationSelector' " + langDescMiddlePart + ">HR</a>"; 1520 break; 1521 case "eu-en": 1522 languageDesc = "<a href='https://www.croata.com/eu-en/frontpage?CurrencyCode=EUR&cartcmd=emptycart' " + langDescMiddlePart + ">EU</a>"; 1523 break; 1524 case "na-en": 1525 languageDesc = "<a href='https://www.croata.com/na-en/frontpage?CurrencyCode=USD&cartcmd=emptycart' " + langDescMiddlePart + ">US&CA</a>"; 1526 break; 1527 case "ch-en": 1528 languageDesc = "<a href='https://www.croata.com/ch-en/frontpage?CurrencyCode=CNY&cartcmd=emptycart' " + langDescMiddlePart + ">CH</a>"; 1529 break; 1530 case "sa-en": 1531 languageDesc = "<a href='https://www.croata.com/sa-en/frontpage?CurrencyCode=USD&cartcmd=emptycart' " + langDescMiddlePart + ">LATAM</a>"; 1532 break; 1533 case "uk-en": 1534 languageDesc = "<a href='https://www.croata.com/uk-en/frontpage?CurrencyCode=GBP&cartcmd=emptycart' " + langDescMiddlePart + ">UK</a>"; 1535 break; 1536 case "au-en": 1537 languageDesc = "<a href='https://www.croata.com/au-en/frontpage?CurrencyCode=AUD&cartcmd=emptycart' " + langDescMiddlePart + ">AU</a>"; 1538 break; 1539 case "in-en": 1540 languageDesc = "<a href='https://www.croata.com/in-en/frontpage?CurrencyCode=USD&cartcmd=emptycart' " + langDescMiddlePart + ">INT</a>"; 1541 break; 1542 case "jp-en": 1543 languageDesc = "<a href='https://www.croata.com/jp-en/frontpage?CurrencyCode=JPY&cartcmd=emptycart' " + langDescMiddlePart + ">JP</a>"; 1544 break; 1545 case "b2b-us": 1546 languageDesc = "<a href='https://www.croata.com/b2b-us/frontpage?CurrencyCode=USD&cartcmd=emptycart' " + langDescMiddlePart + ">B2B-US</a>"; 1547 break; 1548 1549 default: 1550 languageDesc = pageDomain; 1551 break; 1552 } 1553 1554 @* Language selector *@ 1555 if (Model.Languages.Count >= 1) 1556 { 1557 <li class="@liClasses" id="langLink"> 1558 <div class="@menuLinkClass dw-mod" style="font-family:'Montserrat', sans-serif;font-size:1em !important;font-weight:500;color:rgb(242,242,242);"> 1559 @languageDesc 1560 </div> 1561 </li> 1562 } 1563 } 1564 1565 @helper RenderMiniCart(string type = "inNavigation") 1566 { 1567 bool onlyPreview = Model.Area.Item.GetBoolean("OnlyPreviewForAnonymous") && Model.CurrentUser.ID == 0; 1568 string cartIcon = !String.IsNullOrEmpty(Model.Area.Item.GetItem("Icons").GetList("CartIcon").SelectedValue) ? Model.Area.Item.GetItem("Icons").GetList("CartIcon").SelectedValue.ToLower() : "fas fa-shopping-cart"; 1569 1570 if (!onlyPreview && !Model.Area.Item.GetBoolean("NavigationItemsHideCart")) 1571 { 1572 string liClasses = type == "inNavigation" ? "menu__item menu__item--horizontal menu__item--top-level dw-mod" : "menu__item menu__item--horizontal menu--clean dw-mod"; 1573 string menuLinkClass = type == "inNavigation" ? "menu__link" : "header-menu__link"; 1574 1575 int miniCartFeedPageId = GetPageIdByNavigationTag("MiniCartFeed"); 1576 int cartFeedPageId = GetPageIdByNavigationTag("CartOrderlinesFeed"); 1577 int cartPageId = GetPageIdByNavigationTag("CartPage"); 1578 double cartProductsCount = Model.Cart.TotalProductsCount; 1579 1580 @* Mini cart *@ 1581 <li class="@liClasses" onmouseenter="Cart.UpdateMiniCart(event, 'miniCart', '/Default.aspx?ID=@miniCartFeedPageId&feedType=MiniCart')"> 1582 <div class="mini-cart dw-mod"> 1583 <a href="/Default.aspx?ID=@cartPageId&Purge=True" id="miniCartCounterWrap" class="@menuLinkClass dw-mod js-mini-cart-button u-w50px"> 1584 <i class="fa fa-shopping-cart fa-1x"></i> 1585 <div class="mini-cart__counter mini-cart__counter--inline dw-mod"> 1586 <div class="js-handlebars-root js-mini-cart-counter" id="cartCounter" data-template="MiniCartCounterContent" data-json-feed="/Default.aspx?ID=@miniCartFeedPageId&feedType=Counter" data-init-onload="false" data-preloader="false"> 1587 <div class="js-mini-cart-counter-content"> 1588 @cartProductsCount 1589 </div> 1590 </div> 1591 </div> 1592 </a> 1593 @if (Pageview.Device.ToString() != "Mobile" && Pageview.Device.ToString() != "Tablet") 1594 { 1595 <div class="mini-cart-dropdown js-handlebars-root js-mini-cart dw-mod" id="miniCart" data-template="MiniCartContent" data-cart-id="@miniCartFeedPageId" data-json-feed="/Default.aspx?ID=@miniCartFeedPageId&feedType=MiniCart" data-init-onload="false"></div> 1596 } 1597 </div> 1598 </li> 1599 } 1600 } 1601 1602 @helper RenderSignIn(string type = "inNavigation", string userInitials = "") 1603 { 1604 if (!Model.Area.Item.GetBoolean("NavigationItemsHideSignIn")) 1605 { 1606 string liClasses = type == "inNavigation" ? "menu__item menu__item--horizontal menu__item--top-level dw-mod u-hidden-xxs" : "menu__item menu__item--horizontal menu__item--clean dw-mod"; 1607 string menuLinkClass = type == "inNavigation" ? "menu__link" : "header-menu__link"; 1608 1609 string userIcon = !String.IsNullOrEmpty(Model.Area.Item.GetItem("Icons").GetList("SignInProfileIcon").SelectedValue) ? Model.Area.Item.GetItem("Icons").GetList("SignInProfileIcon").SelectedValue.ToLower() : "fas fa-user"; 1610 string favoriteIcon = !String.IsNullOrEmpty(Model.Area.Item.GetItem("Icons").GetList("FavoriteIcon").SelectedValue) ? "fas fa-" + Model.Area.Item.GetItem("Icons").GetList("FavoriteIcon").SelectedValue.ToLower() : "fas fa-star"; 1611 1612 int pageId = Model.TopPage.ID; 1613 int logoutPageId = 10359; 1614 string myProfilePageId = (Model.CurrentUser.ID <= 0) ? GetPageIdByNavigationTag("SignInPage").ToString() + "&RedirectPageId=" + GetPageIdByNavigationTag("CustomerProfile").ToString() : GetPageIdByNavigationTag("CustomerProfile").ToString(); 1615 string myOrdersPageId = (Model.CurrentUser.ID <= 0) ? GetPageIdByNavigationTag("SignInPage").ToString() + "&RedirectPageId=" + GetPageIdByNavigationTag("CustomerOrders").ToString() : GetPageIdByNavigationTag("CustomerOrders").ToString(); 1616 int myDashboardPageId = GetPageIdByNavigationTag("CustomerDashboard"); 1617 string myFavoritesPageId = (Model.CurrentUser.ID <= 0) ? GetPageIdByNavigationTag("SignInPage").ToString() + "&RedirectPageId=" + GetPageIdByNavigationTag("CustomerFavorites").ToString() : GetPageIdByNavigationTag("CustomerFavorites").ToString(); 1618 string mySavedCardsPageId = (Model.CurrentUser.ID <= 0) ? GetPageIdByNavigationTag("SignInPage").ToString() + "&RedirectPageId=" + GetPageIdByNavigationTag("SavedCards").ToString() : GetPageIdByNavigationTag("SavedCards").ToString(); 1619 int createAccountPageId = GetPageIdByNavigationTag("CreateAccount"); 1620 int signInProfilePageId = GetPageIdByNavigationTag("SignInPage"); 1621 string forgotPasswordPageId = signInProfilePageId.ToString() + "&LoginAction=Recovery"; 1622 1623 bool showCreateAccountLink = Model.Area.Item.GetBoolean("ShowCreateAccountLink"); 1624 bool showMyProfileLink = Model.Area.Item.GetBoolean("ShowMyProfileLink"); 1625 bool showMyOrdersLink = Model.Area.Item.GetBoolean("ShowMyOrdersLink"); 1626 bool showMyFavoritesLink = Model.Area.Item.GetBoolean("ShowMyFavoritesLink"); 1627 bool showMySavedCardsLink = Model.Area.Item.GetBoolean("ShowMySavedCardsLink"); 1628 string pageSubDomain = Dynamicweb.Frontend.PageView.Current().Area.UrlName; 1629 1630 @* Sign in + Customer center links *@ 1631 <li class="@liClasses is-dropdown is-dropdown--no-icon"> 1632 <div class="@menuLinkClass u-w50px dw-mod"> 1633 @if (Model.CurrentUser.ID <= 0) 1634 { 1635 var loginPageId = GetPageIdByNavigationTag("SignInPage"); 1636 <a href="/Default.aspx?ID=@loginPageId"><i class="fa fa-1x"><img class="u-margin-top" src="/Admin/Public/GetImage.ashx?width=19&height=19&image=/Files/DigitalAssets/LoginIcon.png" alt="Login icon" /></i></a> 1637 } 1638 else 1639 { 1640 <a href="/default.aspx?ID=@myDashboardPageId" class="u-color-inherit"><div class="circle-icon-btn">@userInitials.ToUpper()</div></a> 1641 } 1642 </div> 1643 <div class="menu menu--dropdown sign-in-dropdown dw-mod"> 1644 <ul class="list list--clean dw-mod"> 1645 @if (Model.CurrentUser.ID <= 0) 1646 { 1647 <li> 1648 <label for="SignInModalTrigger" class="btn btn--primary btn--full u-no-margin sign-in-modal-trigger-button dw-mod" onclick="setTimeout(function () { document.getElementById('LoginUsername').focus() }, 10)">@Translate("Sign in")</label> 1649 </li> 1650 if (showCreateAccountLink) 1651 { 1652 <li> 1653 <a href="/default.aspx?ID=@createAccountPageId" class="list__link dw-mod">@Translate("Create account")</a> 1654 </li> 1655 } 1656 <li> 1657 <a href="/default.aspx?ID=@forgotPasswordPageId" class="list__link dw-mod">@Translate("Forgot your password?")</a> 1658 </li> 1659 if (showMyProfileLink || showMyOrdersLink || showMyFavoritesLink || showMySavedCardsLink) 1660 { 1661 <li class="list__seperator dw-mod"></li> 1662 } 1663 } 1664 @if (showMyProfileLink) 1665 { 1666 <li> 1667 <a href="/default.aspx?ID=@myProfilePageId" class="list__link dw-mod"><i class="@userIcon u-margin-right"></i>@Translate("My Profile")</a> 1668 </li> 1669 } 1670 @if (showMyOrdersLink) 1671 { 1672 <li> 1673 <a href="/default.aspx?ID=@myOrdersPageId" class="list__link dw-mod"><i class="fas fa-list u-margin-right"></i>@Translate("My Orders")</a> 1674 </li> 1675 } 1676 @if (showMyFavoritesLink) 1677 { 1678 <li> 1679 <a href="/default.aspx?ID=@myFavoritesPageId" class="list__link dw-mod"><i class="@favoriteIcon u-margin-right"></i>@Translate("My Favorites")</a> 1680 </li> 1681 } 1682 @if (showMySavedCardsLink) 1683 { 1684 <li> 1685 <a href="/default.aspx?ID=@mySavedCardsPageId" class="list__link dw-mod"><i class="fas fa-credit-card u-margin-right"></i>@Translate("My Saved cards")</a> 1686 </li> 1687 } 1688 @if (Model.CurrentUser.ID > 0) 1689 { 1690 if (showMyProfileLink || showMyOrdersLink || showMyFavoritesLink || showMySavedCardsLink) 1691 { 1692 <li class="list__seperator dw-mod"></li> 1693 } 1694 <li> 1695 <a href="/Admin/Public/ExtranetLogoff.aspx?ID=@logoutPageId?CurrencyCode=USD&cartcmd=emptycart" class="list__link dw-mod">@Translate("Sign out")</a> 1696 </li> 1697 } 1698 </ul> 1699 </div> 1700 </li> 1701 } 1702 } 1703 1704 @helper RenderFavorites(string type = "inNavigation") 1705 { 1706 if (!Model.Area.Item.GetBoolean("NavigationItemsHideFavorites")) 1707 { 1708 string liClasses = type == "inNavigation" ? "menu__item menu__item--horizontal menu__item--top-level dw-mod u-hidden-xxs" : "menu__item menu__item--horizontal menu--clean dw-mod"; 1709 string menuLinkClass = type == "inNavigation" ? "menu__link" : "header-menu__link"; 1710 string favoriteIcon = !String.IsNullOrEmpty(Model.Area.Item.GetItem("Icons").GetList("FavoriteIcon").SelectedValue) ? "fas fa-" + Model.Area.Item.GetItem("Icons").GetList("FavoriteIcon").SelectedValue.ToLower() : "fas fa-star"; 1711 string myFavoritesPageId = GetPageIdByNavigationTag("CustomerFavorites").ToString(); 1712 1713 @* Favorites *@ 1714 if (Model.CurrentUser.ID > 0) 1715 { 1716 <li class="@liClasses"> 1717 <a href="/Default.aspx?ID=@myFavoritesPageId" class="@menuLinkClass u-w50px dw-mod"> 1718 <i class="@favoriteIcon fa-1x"></i> 1719 </a> 1720 </li> 1721 } 1722 } 1723 } 1724 1725 1726 @helper RenderFooter() 1727 { 1728 string pageSubDomain = Dynamicweb.Frontend.PageView.Current().Area.UrlName; 1729 1730 <!-- Footer section --> 1731 <footer class="footer dw-mod"> 1732 <div class="center-container top-container__center-container dw-mod"> 1733 <div class="grid grid--justify-center" style="padding:10px 30px;"> 1734 <div class="grid__col-md-3 grid__col-xs-6"> 1735 <span class="footerCellTitle">@Translate("CUSTOMER SERVICE")</span> 1736 <a href="/@pageSubDomain/terms-and-conditions?paragraph=tabs-1&button=button-1">@Translate("Delivery informations")</a> 1737 <a href="/@pageSubDomain/terms-and-conditions?paragraph=tabs-3&button=button-3">@Translate("Purchase informations")</a> 1738 <a href="/@pageSubDomain/terms-and-conditions?paragraph=tabs-6&button=button-6" ">@Translate("CROATA shops")</a> 1739 1740 </div> 1741 <div class="grid__col-md-3 grid__col-xs-6"> 1742 <span class="footerCellTitle">@Translate("ABOUT US")</span> 1743 <a href="/@pageSubDomain/contact-us">@Translate("Contact us")</a> 1744 <a href="/@pageSubDomain/press-informations">@Translate("Press inquiries")</a> 1745 <a href="/@pageSubDomain/careers">@Translate("Careers")</a> 1746 </div> 1747 <div class="grid__col-md-3 grid__col-xs-6"> 1748 <span class="footerCellTitle">@Translate("LEGAL NOTICE")</span> 1749 <a href="/@pageSubDomain/terms-and-conditions?paragraph=tabs-2&button=button-2">@Translate("Terms and Conditions")</a> 1750 <a href="/@pageSubDomain/terms-and-conditions?paragraph=tabs-4&button=button-4">@Translate("Privacy Policy")</a> 1751 <a href="/@pageSubDomain/terms-and-conditions?paragraph=tabs-4&button=button-4">@Translate("Cookie Policy")</a> 1752 </div> 1753 1754 <div class="grid__col-md-3 grid__col-xs-6"> 1755 <span class="footerCellTitle">@Translate("NEWSLETTER")</span> 1756 <span>@Translate("Let’s stay in touch*")</span> 1757 <div style="position:relative;"> 1758 <form id="submitNewsletter" action="/@pageSubDomain/" style="margin-bottom:0;"> 1759 <div class="form__field-group" style="position:relative; top:0;margin-bottom:0;width:100%"> 1760 <input type="email" id="emailFooter" name="UserManagement_Form_Email" placeholder="E-mail:" style="padding-right:35px;" /> 1761 <input type="submit" 1762 class="emailFooterSubmitBtn" name="Email_Submited" style="width:35px;height:100%;position:absolute; top:0;right:0;border: 0; background-color: white;" 1763 tabindex="-1" value=" " /> 1764 1765 </div> 1766 </form> 1767 </div> 1768 @*<span>@Translate("*we reward you with 10% off on your first purchase")</span>*@ 1769 </div> 1770 </div> 1771 </div> 1772 </footer> 1773 <div class="followUsFooter grid--justify-center grid__cell--padding-lg" style="cursor:pointer;"> 1774 <a href="http://www.facebook.com/croatalife"><i class="fab fa-facebook-square fa-1_5x"></i></a> 1775 <a href="http://instagram.com/croatalife"><i class="fab fa-instagram fa-1_5x"></i></a> 1776 <a href="http://www.pinterest.com/croatalife/"><i class="fab fa-pinterest-square fa-1_5x"></i></a> 1777 <a href="http://www.linkedin.com/showcase/croata"><i class="fab fa-linkedin fa-1_5x"></i></a> 1778 <a href="https://www.youtube.com/channel/UC6UKVh1GFpwBX74ve2obh4Q"><i class="fab fa-youtube fa-1_5x"></i></a> 1779 </div> 1780 <div class="grid--justify-center grid__cell--padding-lg" style="font-size:12px; margin-bottom:70px;"> 1781 * @Translate("Subscribe to receive croata newsletter (communication regarding our products, offers and events). By subscribing you agree to our ")<a href="/@pageSubDomain/terms-and-conditions" style="text-decoration:underline;">@Translate("privacy policy")</a>. 1782 </div> 1783 } 1784 1785 1786 @* Templates for Typeahead *@ 1787 @if (!Model.Area.Item.GetBoolean("NavigationItemsHideSearch")) 1788 { 1789 <script id="SearchGroupsTemplate" type="text/x-template"> 1790 {{#.}} 1791 <li class="dropdown__item dw-mod" onclick="Search.UpdateGroupSelection(this)" data-group-id="{{id}}">{{name}}</li> 1792 {{/.}} 1793 </script> 1794 1795 <script id="SearchProductsTemplate" type="text/x-template"> 1796 {{#each .}} 1797 {{#Product}} 1798 {{#ifCond template "!==" "SearchMore"}} 1799 <li class="dropdown__item dropdown__item--seperator dw-mod"> 1800 <div> 1801 <a href="{{link}}" class="js-typeahead-link u-color-inherit u-pull--left"> 1802 <div class="u-margin-right u-pull--left {{noimage}} u-hidden-xs u-hidden-xxs"><img src="/Admin/Public/GetImage.ashx?width=45&height=36&crop=5&FillCanvas=True&Compression=75&image={{image}}" alt="{{name}}"></div> 1803 <div class="u-pull--left"> 1804 <div class="u-bold u-max-w220px u-truncate-text js-typeahead-name">{{name}}</div> 1805 @if (!onlyPreview) 1806 { 1807 <div class="{{onlyPreview}}">{{price}}</div> 1808 } 1809 </div> 1810 </a> 1811 <div class="u-margin-left u-pull--right u-w80px"> 1812 <button class="btn btn--primary btn--condensed btn--full u-no-margin dw-mod {{hideBuyOptions}} js-ignore-click-outside" onclick="Cart.AddToCart(event, '{{productId}}', '1')"><i class="@cartIcon js-ignore-click-outside"></i></button> 1813 <a href="{{link}}" class="btn btn--secondary btn--condensed btn--full u-no-margin dw-mod {{hideViewMore}} js-ignore-click-outside">@Translate("View")</a> 1814 </div> 1815 </div> 1816 </li> 1817 {{/ifCond}} 1818 {{#ifCond template "===" "SearchMore"}} 1819 {{>SearchMoreProducts}} 1820 {{/ifCond}} 1821 {{/Product}} 1822 {{else}} 1823 <li class="dropdown__item dropdown__item--seperator dw-mod"> 1824 @Translate("Your search gave 0 results") 1825 </li> 1826 {{/each}} 1827 </script> 1828 1829 <script id="SearchMoreProducts" type="text/x-template"> 1830 <li class="dropdown__item dropdown__item--not-selectable {{stickToBottom}} dw-mod"> 1831 <a href="/Default.aspx?ID=@productsPageId&Search={{searchParameter}}" class="btn btn--primary btn--full u-no-margin dw-mod js-typeahead-link"> 1832 @Translate("View all") 1833 </a> 1834 </li> 1835 </script> 1836 1837 <script id="SearchMorePages" type="text/x-template"> 1838 <li class="dropdown__item dropdown__item--not-selectable {{stickToBottom}} dw-mod"> 1839 <a href="/Default.aspx?ID=@contentSearchPageId&Search={{searchParameter}}" class="btn btn--primary btn--full u-no-margin dw-mod js-typeahead-link"> 1840 @Translate("View all") 1841 </a> 1842 </li> 1843 </script> 1844 1845 <script id="SearchPagesTemplate" type="text/x-template"> 1846 {{#each .}} 1847 {{#ifCond template "!==" "SearchMore"}} 1848 <li class="dropdown__item dropdown__item--seperator dw-mod"> 1849 <div> 1850 <a href="/Default.aspx?ID={{id}}" class="js-typeahead-link u-pull--left u-color-inherit"> 1851 <div class="u-margin-right u-pull--left"><i class="fa {{icon}} u-w20px u-ta-center"></i></div> 1852 <div class="u-pull--left"> 1853 <div class="u-bold u-truncate-text u-max-w220px js-typeahead-name">{{name}}</div> 1854 </div> 1855 </a> 1856 </div> 1857 </li> 1858 {{/ifCond}} 1859 {{#ifCond template "===" "SearchMore"}} 1860 {{>SearchMorePages}} 1861 {{/ifCond}} 1862 {{else}} 1863 <li class="dropdown__item dropdown__item--seperator dw-mod"> 1864 @Translate("Your search gave 0 results") 1865 </li> 1866 {{/each}} 1867 </script> 1868 1869 <script id="SearchPagesTemplateWrap" type="text/x-template"> 1870 <div class="dropdown__column-header">@Translate("Pages")</div> 1871 <ul class="dropdown__list u-min-w220px u-full-width u-margin-bottom dw-mod"> 1872 {{>SearchPagesTemplate}} 1873 </ul> 1874 </script> 1875 1876 <script id="SearchProductsTemplateWrap" type="text/x-template"> 1877 <div class="dropdown__column-header">@Translate("Products")</div> 1878 <ul class="dropdown__list u-min-w220px u-full-width u-margin-bottom dw-mod"> 1879 {{>SearchProductsTemplate}} 1880 </ul> 1881 </script> 1882 } 1883 1884 @* Templates for the mini cart *@ 1885 @if (!Model.Area.Item.GetBoolean("NavigationItemsHideCart")) 1886 { 1887 <script id="MiniCartCounterContent" type="text/x-template"> 1888 {{#.}} 1889 <div class="js-mini-cart-counter-content dw-mod"> 1890 {{numberofproducts}} 1891 </div> 1892 {{/.}} 1893 </script> 1894 1895 <script id="MiniCartContent" type="text/x-template"> 1896 {{#.}} 1897 <div class="mini-cart-dropdown__inner {{isempty}} dw-mod"> 1898 <h4 class="u-ta-center u-no-margin u-margin-bottom u-margin-top">@Translate("Shopping cart")</h4> 1899 <div class="mini-cart-dropdown__body dw-mod" style="font-size: 1.47rem;"> 1900 <table class="table mini-cart-table dw-mod"> 1901 <thead> 1902 <tr> 1903 <td>&nbsp;</td> 1904 <td>@Translate("Product")</td> 1905 <td class="u-ta-right">@Translate("Qty")</td> 1906 <td class="u-ta-right" width="120">@Translate("Price")</td> 1907 </tr> 1908 </thead> 1909 1910 {{#OrderLines}} 1911 {{#ifCond template "===" "CartOrderline"}} 1912 {{>MiniCartOrderline}} 1913 {{/ifCond}} 1914 {{#ifCond template "===" "CartOrderlineMobile"}} 1915 {{>MiniCartOrderlineMobile}} 1916 {{/ifCond}} 1917 {{#ifCond template "===" "CartOrderlineDiscount"}} 1918 {{>MiniCartOrderlineDiscount}} 1919 {{/ifCond}} 1920 {{/OrderLines}} 1921 1922 @*{{#if paymentmethod}} 1923 <tr> 1924 <td><i class="fas fa-credit-card"></i></td> 1925 <td>{{paymentmethod}}</td> 1926 <td colspan="2" class="u-ta-right" width="130">{{paymentfee}}</td> 1927 </tr> 1928 {{/if}}*@ 1929 {{#if shippingmethod}} 1930 <tr> 1931 <td><i class="fas fa-truck"></i></td> 1932 <td>{{shippingmethod}}</td> 1933 <td colspan="2" class="u-ta-right" width="130">{{shippingfee}}</td> 1934 </tr> 1935 {{/if}} 1936 <tr class="mini-cart-totals dw-mod"> 1937 <td colspan="2">@Translate("Total")</td> 1938 <td class="u-ta-right">{{numberofproducts}}</td> 1939 <td class="u-ta-right" width="130">{{totalprice}}</td> 1940 </tr> 1941 </table> 1942 </div> 1943 1944 <table class="table mini-cart-table dw-mod"> 1945 <tr class="mini-cart-orderlines__footer dw-mod"> 1946 <td colspan="2"><button type="button" class="btn btn--primary u-pull--left u-no-margin dw-mod btn--sm" onclick="Cart.EmptyCart(event)">@Translate("Empty cart")</button></td> 1947 <td colspan="2" class="u-ta-right"><a href="/Default.aspx?ID=@cartPageId" class="btn btn--secondary u-pull--right u-no-margin dw-mod btn--sm">@Translate("Proceed to checkout")</a></td> 1948 </tr> 1949 </table> 1950 </div> 1951 {{/.}} 1952 </script> 1953 1954 <script id="MiniCartOrderline" type="text/x-template"> 1955 <tr class="{{isempty}}"> 1956 <td><a href="{{link}}" class="{{hideimage}}"><img src="/Admin/Public/GetImage.ashx?width=50&height=50&crop=5&Compression=75&image={{image}}" alt="{{name}}" style="min-height:50px;min-width:50px;"></a></td> 1957 <td> 1958 <a href="{{link}}" class="mini-cart-orderlines__name" title="{{name}}">{{name}}</a> 1959 {{#if variantname}} 1960 <a href="{{link}}" class="mini-cart-orderlines__name mini-cart-orderlines__name--small">{{variantname}}</a> 1961 {{/if}} 1962 {{#if unitname}} 1963 <div class="mini-cart-orderlines__name mini-cart-orderlines__name--small">{{unitname}}</div> 1964 {{/if}} 1965 </td> 1966 <td class="u-ta-right">{{quantity}}</td> 1967 <td class="u-ta-right">{{totalprice}}</td> 1968 </tr> 1969 </script> 1970 1971 <script id="MiniCartOrderlineMobile" type="text/x-template"> 1972 <tr class="{{isempty}}"> 1973 <td><a href="{{link}}" class="{{hideimage}}"><img src="/Admin/Public/GetImage.ashx?width=50&height=50&crop=5&Compression=75&image={{image}}" alt="{{name}}"></a></td> 1974 <td> 1975 <a href="{{link}}" class="mini-cart-orderlines__name">{{name}}</a> 1976 {{#if variantname}} 1977 <a href="{{link}}" class="mini-cart-orderlines__name mini-cart-orderlines__name--small">{{variantname}}</a> 1978 {{/if}} 1979 {{#if unitname}} 1980 <div class="mini-cart-orderlines__name mini-cart-orderlines__name--small">{{unitname}}</div> 1981 {{/if}} 1982 </td> 1983 <td class="u-ta-right">{{quantity}}</td> 1984 <td class="u-ta-right">{{totalprice}}</td> 1985 </tr> 1986 </script> 1987 1988 <script id="MiniCartOrderlineDiscount" type="text/x-template"> 1989 <tr class="table__row--no-border {{isempty}}"> 1990 <td>&nbsp;</td> 1991 <td><div class="mini-cart-orderlines__name dw-mod">{{name}}</div></td> 1992 <td class="u-ta-right">&nbsp;</td> 1993 <td class="u-ta-right">{{totalprice}}</td> 1994 </tr> 1995 </script> 1996 } 1997 1998 <!-- Javascript --> 1999 <script src="/Files/Templates/Designs/Rapido/js/handlebars-v4.0.11.js"></script> 2000 <script src="/Files/Templates/Designs/Rapido/js/master.min.js"></script> 2001 2002 @if (Model.Area.Item.GetBoolean("UseCustomJavascript")) 2003 { 2004 <script src="/Files/Templates/Designs/Rapido/js/custom.js"></script> 2005 } 2006 <script> 2007 /**/ 2008 Wireframe.Init(@wireframeMode.ToLower()); 2009 /**/ 2010 </script> 2011 <!--@Javascripts--> 2012 </body> 2013 </html> 2014 2015