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