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_4e12cf144a194d46bd0d1a66e693b3b7.Execute() in C:\inetpub\wwwroot\DWShop\Solutions\CroataR211\Files\Templates\Designs\Rapido\_parsed\Page.parsed.cshtml:line 975
   at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader)
   at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.b__0(TextWriter writer)
   at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()

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