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