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_8166ccdec50a4bafb7ff40ceec50473e.Execute() in E:\HJJ.Web\Files\Templates\Designs\Rapido\_parsed\Page.parsed.cshtml:line 615
   at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader)
   at RazorEngine.Templating.RazorEngineCore.RunTemplate(ICompiledTemplate template, TextWriter writer, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.DynamicWrapperService.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 RazorEngine.Templating.RazorEngineServiceExtensions.RunCompile(IRazorEngineService service, String name, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineServiceExtensions.RunCompile(IRazorEngineService service, ITemplateSource templateSource, String name, Type modelType, Object model, DynamicViewBag viewBag)
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 2 3 @* Rapido version 2.0.2 *@ 4 5 @using Dynamicweb.Frontend.Devices 6 @using Dynamicweb.Extensibility 7 @using Dynamicweb.Content 8 @using Dynamicweb.Security 9 @using System 10 @using System.Linq 11 @using System.Web 12 @using System.IO 13 @using Dynamicweb.Admin 14 @using Dynamicweb.Admin.dk.dynamicweb.templates 15 @using Dynamicweb.Data 16 @using Page = Dynamicweb.Content.Page 17 18 @{ 19 //General settings 20 string favicon = Model.Area.Item.GetFile("LogoFavicon") != null ? Model.Area.Item.GetFile("LogoFavicon").Path : "/Files/Images/favicon.png"; 21 string logo = Model.Area.Item.GetFile("LogoImage") != null ? Model.Area.Item.GetFile("LogoImage").Path : "/Files/Images/logo-dynamicweb.png"; 22 if (Path.GetExtension(logo).ToLower() != ".svg") 23 { 24 logo = "/Admin/Public/GetImage.ashx?height=40&amp;crop=5&amp;Compression=75&amp;image=" + @logo; 25 } 26 27 string searchPlaceholder = Translate("Search products", "Search products"); 28 string searchValue = HttpContext.Current.Request.QueryString.Get("Search") != null ? HttpContext.Current.Request.QueryString.Get("Search") : ""; 29 string wireframeMode = Model.Area.Item.GetBoolean("WireframeMode").ToString(); 30 31 //Font settings 32 string navigationFont = Model.Area.Item.GetItem("NavigationFont").GetGoogleFont("FontFamily").Family.Replace(" ", "+"); 33 string mobileNavigationFont = Model.Area.Item.GetItem("MobileNavigationFont").GetGoogleFont("FontFamily").Family.Replace(" ", "+"); 34 string headerFont = Model.Area.Item.GetItem("ContentLayoutHeaderFont").GetGoogleFont("FontFamily").Family.Replace(" ", "+"); 35 string subHeaderFont = Model.Area.Item.GetItem("ContentLayoutSubheaderFont").GetGoogleFont("FontFamily").Family.Replace(" ", "+"); 36 string contentFont = Model.Area.Item.GetItem("ContentLayoutBodyText").GetGoogleFont("FontFamily").Family.Replace(" ", "+"); 37 string newStickersFont = Model.Area.Item.GetItem("NewStickersFont").GetGoogleFont("FontFamily").Family.Replace(" ", "+"); 38 string customStickersFont = Model.Area.Item.GetItem("CustomStickersFont").GetGoogleFont("FontFamily").Family.Replace(" ", "+"); 39 string toolsMenuFont = Model.Area.Item.GetItem("ToolsMenuFont").GetGoogleFont("FontFamily").Family.Replace(" ", "+"); 40 41 //Page IDs for use in the template 42 int pageId = Model.TopPage.ID; 43 string firstPageId = Model.Area.FirstActivePage.ID.ToString(); 44 int cartPageId = GetPageIdByNavigationTag("CartPage"); 45 int miniCartFeedPageId = GetPageIdByNavigationTag("MiniCartFeed"); 46 int cartFeedPageId = GetPageIdByNavigationTag("CartOrderlinesFeed"); 47 //int productsPageId = GetPageIdByNavigationTag("ProductsPage"); 48 int productsPageId = GetPageIdByNavigationTag("SearchPage"); 49 int productsSearchFeedId = productsPageId; 50 int productGroupsPageId = GetPageIdByNavigationTag("ProductGroupsFeed"); 51 int impersonationPageId = GetPageIdByNavigationTag("Impersonation"); 52 53 bool stickyMenu = Pageview.Device.ToString() == "Mobile" || Pageview.Device.ToString() == "Tablet" ? false : Model.Area.Item.GetBoolean("NavigationStickyMenu"); 54 string stickyTop = stickyMenu ? "top-container--sticky" : ""; 55 string pagePos = stickyMenu ? "js-page-pos" : ""; 56 string topLayout = Model.Area.Item.GetList("LayoutTop").SelectedValue; 57 bool renderPagesInToolBar = Model.Area.Item.GetBoolean("RenderPagesInToolBar"); 58 string toolbarText = Model.Area.Item.GetString("ToolbarText"); 59 bool onlyPreview = Model.Area.Item.GetBoolean("OnlyPreviewForAnonymous") && Model.CurrentUser.ID == 0; 60 61 string autoCssLink = "/Files/Templates/Designs/Rapido/css/rapido/rapido_" + Model.Area.ID.ToString() + ".min.css?ticks=" + Model.Area.UpdatedDate.Ticks; 62 63 string userInitials = ""; 64 if (Model.CurrentUser.ID != 0) 65 { 66 if (!String.IsNullOrEmpty(Model.CurrentUser.Name)) 67 { 68 string[] names = Model.CurrentUser.Name.Split(' '); 69 userInitials += Model.CurrentUser.Name.Substring(0, 1); 70 71 if (names.Length > 1) 72 { 73 userInitials += names[names.Length - 1].Substring(0, 1); 74 } 75 } 76 else 77 { 78 userInitials += Model.CurrentUser.FirstName != null && Model.CurrentUser.FirstName != "" ? Model.CurrentUser.FirstName.Substring(0, 1) : ""; 79 userInitials += Model.CurrentUser.LastName != null && Model.CurrentUser.LastName != "" ? Model.CurrentUser.LastName.Substring(0, 1) : ""; 80 userInitials += userInitials.Length == 1 && Model.CurrentUser.FirstName != null && Model.CurrentUser.FirstName.Length > 1 ? Model.CurrentUser.FirstName.Substring(1, 2) : ""; 81 userInitials += userInitials == "" && Model.CurrentUser.Email != null && Model.CurrentUser.Email.Length > 1 ? Model.CurrentUser.Email.Substring(0, 2) : ""; 82 userInitials += userInitials == "" ? Model.CurrentUser.UserName.Substring(0, 2) : ""; 83 } 84 } 85 86 string siteURL = Dynamicweb.Context.Current.Request.Url.Scheme + "://" + Dynamicweb.Context.Current.Request.Url.Host; 87 string businessPhotoPath = Model.Area.Item.GetFile("BusinessPhoto") != null ? Model.Area.Item.GetFile("BusinessPhoto").Path : ""; 88 string businessName = Model.Area.Item.GetString("BusinessName"); 89 var address = Model.Area.Item.GetItem("Address"); 90 string streetAddress = ""; 91 string addressLocality = ""; 92 string addressRegion = ""; 93 string postalCode = ""; 94 string addressCountry = ""; 95 if (address != null) 96 { 97 streetAddress = address.GetString("StreetAddress"); 98 addressLocality = address.GetString("City"); 99 addressRegion = address.GetString("Region"); 100 postalCode = address.GetString("PostalCode"); 101 addressCountry = address.GetString("Country"); 102 } 103 string contactEmail = Model.Area.Item.GetString("ContactEmail"); 104 string contactNumber = Model.Area.Item.GetString("ContactNumber"); 105 106 string siteName = "<!--@Global:Area.Name-->"; 107 108 var customMenuItems = Model.Area.Item.GetList("Links"); 109 110 string metaDescription = ""; 111 string pgMetaTitle = ""; 112 var cb = CommandBuilder.Create("SELECT [PageMetaTitle], [PageTemplateDescription] FROM [Page] WHERE [PageId] = '" + pageId + "' "); 113 114 //using (var dr = Database.CreateDataReader(cb)) 115 //{ 116 // while (dr.Read()) 117 // { 118 // pgMetaTitle = dr.GetString(0); 119 // metaDescription = dr.GetString(1); 120 // } 121 // dr.Close(); 122 //} 123 124 string metaTitle = !string.IsNullOrEmpty(pgMetaTitle) ? pgMetaTitle : siteName; 125 126 Dynamicweb.Content.Items.Item customSettings = Dynamicweb.Content.Items.Item.GetItemById("CustomWebsiteSettings", Pageview.Area.Item["CustomSettings"].ToString()); 127 string gtmId = customSettings["GTMID"].ToString(); 128 } 129 130 <!DOCTYPE html> 131 132 <html lang="@Pageview.Area.CultureInfo.TwoLetterISOLanguageName"> 133 <head> 134 <meta charset="utf-8" /> 135 <title>@Model.Title</title> 136 <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1"> 137 <meta name="robots" content="index, follow"> 138 <!-- Google Tag Manager --> 139 <script> 140 (function (w, d, s, l, i) { 141 w[l] = w[l] || []; w[l].push({ 142 'gtm.start': 143 new Date().getTime(), event: 'gtm.js' 144 }); var f = d.getElementsByTagName(s)[0], 145 j = d.createElement(s), dl = l != 'dataLayer' ? '&l=' + l : ''; j.async = true; j.src = 146 'https://www.googletagmanager.com/gtm.js?id=' + i + dl; f.parentNode.insertBefore(j, f); 147 })(window, document, 'script', 'dataLayer', '@gtmId');</script> 148 <!-- End Google Tag Manager --> 149 150 151 @Model.MetaTags 152 <!-- Favicon --> 153 <link href="@favicon" rel="icon" type="image/png"> 154 155 <!-- Font awesome --> 156 <link rel="stylesheet" href="/Files/Templates/Designs/Rapido/css/rapido/font-awesome.min.css?v=@DateTime.Now" type="text/css"> 157 158 <!-- Base (Default, wireframe) styles --> 159 <link rel="stylesheet" href="/Files/Templates/Designs/Rapido/css/base/base.min.css?v=@DateTime.Now" type="text/css"> 160 161 <!-- Rapido Css from Website Settings --> 162 <link id="rapidoCss" rel="stylesheet" href="@autoCssLink" type="text/css"> 163 164 <!-- Ignite Css (Custom site specific styles) --> 165 <link id="igniteCss" type="text/css" href="/Files/Templates/Designs/Rapido/css/ignite/ignite.min.css?v=@DateTime.Now" rel="stylesheet"> 166 167 <!-- Google fonts --> 168 @{ 169 var fonts = new string[8] { navigationFont, mobileNavigationFont, headerFont, subHeaderFont, contentFont, newStickersFont, customStickersFont, toolsMenuFont }; 170 var family = string.Join("%7C", fonts.Distinct().Select(x => string.Format("{0}:100,200,300,400,500,600,700,800,900", x))); 171 } 172 <link href="https://fonts.googleapis.com/css?family=@family" rel="stylesheet"> 173 174 @if (!string.IsNullOrEmpty(businessPhotoPath) && 175 !string.IsNullOrEmpty(businessName) && 176 !string.IsNullOrEmpty(streetAddress) && 177 !string.IsNullOrEmpty(addressLocality) && 178 !string.IsNullOrEmpty(addressRegion) && 179 !string.IsNullOrEmpty(postalCode) && 180 !string.IsNullOrEmpty(addressCountry)) 181 { 182 <script type="application/ld+json"> 183 { 184 "@@context": "http://schema.org", 185 "@@type": "Store", 186 "image": [ 187 "@siteURL/Admin/Public/GetImage.ashx?width=400&height=400&crop=0&Compression=75&DoNotUpscale=true&image=@businessPhotoPath", 188 "@siteURL/Admin/Public/GetImage.ashx?width=400&height=300&crop=0&Compression=75&DoNotUpscale=true&image=@businessPhotoPath", 189 "@siteURL/Admin/Public/GetImage.ashx?width=448&height=225&crop=0&Compression=75&DoNotUpscale=true&image=@businessPhotoPath" 190 ], 191 "@@id": "@siteURL", 192 "name": "@businessName", 193 "address": { 194 "@@type": "PostalAddress", 195 "streetAddress": "@streetAddress", 196 "addressLocality": "@addressLocality", 197 "addressRegion": "@addressRegion", 198 "postalCode": "@postalCode", 199 "addressCountry": "@addressCountry" 200 } 201 @if (!string.IsNullOrEmpty(contactEmail)) 202 { 203 <text>,"email": "@Model.Area.Item.GetString("ContactEmail")"</text> 204 } 205 @if (!string.IsNullOrEmpty(contactNumber)) 206 { 207 <text>,"telephone": "@Model.Area.Item.GetString("ContactNumber")"</text> 208 } 209 } 210 </script> 211 } 212 </head> 213 214 <body> 215 <!-- Google Tag Manager (noscript) --> 216 <noscript> 217 218 <iframe src="https://www.googletagmanager.com/ns.html?id=@gtmId" 219 height="0" width="0" style="display: none; visibility: hidden"></iframe> 220 </noscript> 221 <!-- End Google Tag Manager (noscript) --> 222 223 @MobileNavigation(userInitials) 224 225 @LoginModal() 226 227 <main class="site dw-mod"> 228 <header class="top-container @stickyTop dw-mod" id="Top"> 229 @if (renderPagesInToolBar && Pageview.Device.ToString() != "Mobile" && Pageview.Device.ToString() != "Tablet") 230 { 231 <div class="tools-navigation dw-mod"> 232 <div class="center-container grid top-container__center-container dw-mod"> 233 <div class="grid__cell"> 234 <div class="u-pull--left u-margin-top">@toolbarText</div> 235 <div class="u-pull--right"> 236 @RenderNavigation(new 237 { 238 id = "topToolsNavigation", 239 cssclass = "menu menu-tools dw-mod dwnavigation", 240 template = "TopMenu.xslt" 241 }) 242 </div> 243 </div> 244 </div> 245 </div> 246 } 247 248 @if (Pageview.Device.ToString() != "Mobile" && Pageview.Device.ToString() != "Tablet") 249 { 250 switch (topLayout) 251 { 252 case "condensed": //2 253 <!-- Main navigation --> 254 <nav class="main-navigation dw-mod"> 255 <div class="center-container top-container__center-container dw-mod"> 256 <div class="grid"> 257 258 <div class="grid__col-md-3 grid--align-self-center grid__col--bleed-y"> 259 <div class="logo u-padding--xs dw-mod"> 260 <a href="/Default.aspx?ID=@firstPageId"> 261 @if (Path.GetExtension(logo).ToLower() != ".svg") 262 { 263 <img class="grid__cell-img" src="@logo" alt="Logo" /> 264 } 265 else 266 { 267 <img class="grid__cell-img" src="@logo" style="max-height: 90px;" alt="Logo" /> 268 } 269 </a> 270 </div> 271 </div> 272 273 @* Navigation *@ 274 <div class="u-pull--left"> 275 @RenderHeaderNavigation() 276 </div> 277 278 <div class="grid__cell grid__cell--align-middle-right"> 279 <ul class="menu dw-mod u-pull--right"> 280 @RenderSignIn("inNavigation", userInitials) 281 @RenderLanguageSelector() 282 @RenderFavorites() 283 @RenderMiniCart() 284 </ul> 285 </div> 286 </div> 287 </div> 288 </nav> 289 290 <!-- Searchbar --> 291 <div class="u-box-shadow u-color-light-gray--bg u-inline-block u-full-width"> 292 <div class="center-container top-container__center-container dw-mod"> 293 <div class="typeahead typeahead--centered u-color-inherit js-typeahead dw-mod" data-page-size="10" id="ProductSearchBar" data-search-page-id="@productsSearchFeedId&feed=true" data-result-page-id="@productsPageId" data-groups-page-id="@productGroupsPageId"> 294 <button type="button" style="display: none;" 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> 295 <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=@productGroupsPageId&feedType=productGroups" data-init-onload="false" data-preloader="minimal"></ul> 296 <div class="typeahead-search-field"> 297 <input type="text" class="u-no-margin u-full-width js-typeahead-search-field" placeholder="@searchPlaceholder" value="@searchValue"> 298 <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="SearchContentTemplate" data-json-feed="/Default.aspx?ID=@productsSearchFeedId&feedType=productsOnly&feed=true" data-init-onload="false"></ul> 299 </div> 300 <button type="button" class="btn btn--condensed btn--primary u-no-margin dw-mod js-typeahead-enter-btn"><i class="fa fa-search"></i></button> 301 </div> 302 </div> 303 </div> 304 305 break; 306 case "minimal": //3 307 <!-- Main navigation --> 308 <nav class="main-navigation dw-mod"> 309 <div class="center-container top-container__center-container dw-mod"> 310 <div class="grid"> 311 312 <div class="grid__col-md-3 grid--align-self-center grid__col--bleed-y"> 313 <div class="logo u-padding--xs dw-mod"> 314 <a href="/Default.aspx?ID=@firstPageId"> 315 @if (Path.GetExtension(logo).ToLower() != ".svg") 316 { 317 <img class="grid__cell-img" src="@logo" alt="Logo" /> 318 } 319 else 320 { 321 <img class="grid__cell-img" src="@logo" style="max-height: 90px;" alt="Logo" /> 322 } 323 </a> 324 </div> 325 </div> 326 327 @* Navigation *@ 328 <div class="u-pull--left"> 329 @RenderHeaderNavigation() 330 </div> 331 332 <div class="grid__cell grid__cell--align-middle-right"> 333 <ul class="menu dw-mod u-pull--right"> 334 335 @* Search *@ 336 <li class="menu__item menu__item--horizontal menu__item--top-level u-hidden-xxs dw-mod" onmouseover="document.getElementById('headerSearch').focus()"> 337 <div class="menu__link u-w50px is-dropdown is-dropdown--no-icon dw-mod"> 338 <i class="fa fa-search fa-1_5x"></i> 339 <div class="menu menu--dropdown u-w340px top-micro-search dw-mod"> 340 <div class="typeahead js-typeahead" data-page-size="10" id="ProductSearchBar" data-search-page-id="@productsSearchFeedId&feed=true" data-result-page-id="@productsPageId" data-groups-page-id="@productGroupsPageId"> 341 <div class="typeahead-search-field"> 342 <input type="text" class="u-no-margin u-full-width js-typeahead-search-field" id="headerSearch" placeholder="@searchPlaceholder" value="@searchValue"> 343 <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=@productsSearchFeedId&feedType=productsOnly&feed=true" data-init-onload="false" data-preloader="minimal"></ul> 344 </div> 345 </div> 346 </div> 347 </div> 348 </li> 349 350 @RenderSignIn("inNavigation", userInitials) 351 @RenderLanguageSelector() 352 @RenderFavorites() 353 @RenderMiniCart() 354 </ul> 355 </div> 356 </div> 357 </div> 358 </nav> 359 break; 360 case "splitted": //4 361 <!-- Header --> 362 <div class="header header-top dw-mod"> 363 <div class="center-container top-container__center-container dw-mod"> 364 <div class="grid"> 365 366 @* Logo *@ 367 <div class="grid__col-md-6 grid__col-sm-6 grid--align-self-center grid__col--bleed-y"> 368 <div class="grid__cell"> 369 <div class="logo u-max-w220px u-margin-top u-margin-bottom dw-mod"> 370 <a href="/Default.aspx?ID=@firstPageId"> 371 @if (Path.GetExtension(logo).ToLower() != ".svg") 372 { 373 <img class="grid__cell-img" src="@logo" alt="Logo" /> 374 } 375 else 376 { 377 <img class="grid__cell-img" src="@logo" style="max-height: 90px;" alt="Logo" /> 378 } 379 </a> 380 </div> 381 </div> 382 </div> 383 384 @* Search *@ 385 <div class="grid__col-md-6 grid__col-sm-6 grid__col-xs-12 grid--align-self-center grid__col--bleed"> 386 <div class="grid__cell"> 387 <div class="typeahead u-no-margin u-margin-top u-margin-bottom u-color-inherit js-typeahead" data-page-size="10" id="TopProductSearch" data-search-page-id="@productsSearchFeedId&feed=true" data-result-page-id="@productsPageId" data-groups-page-id="@productGroupsPageId"> 388 <button type="button" style="display: none;" 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> 389 <ul class="dropdown dropdown--absolute-position u-min-w220px js-handlebars-root js-typeahead-groups-content dw-mod" id="TopProductSearchGroupsContent" data-template="SearchGroupsTemplate" data-json-feed="/Default.aspx?ID=@productGroupsPageId&feedType=productGroups" data-init-onload="false" data-preloader="minimal"></ul> 390 <input type="text" class="typeahead-search-field u-no-margin js-typeahead-search-field" placeholder="@searchPlaceholder" value="@searchValue"> 391 <ul class="dropdown dropdown--absolute-position u-min-w220px u-full-width js-handlebars-root js-typeahead-search-content u-full-width dw-mod" id="TopProductSearchContent" data-template="SearchContentTemplate" data-json-feed="/Default.aspx?ID=@productsSearchFeedId&feedType=productsOnly&feed=true" data-init-onload="false" data-preloader="minimal"></ul> 392 <button type="button" class="btn btn--condensed btn--primary u-no-margin dw-mod js-typeahead-enter-btn"><i class="fa fa-search"></i></button> 393 </div> 394 </div> 395 </div> 396 </div> 397 </div> 398 </div> 399 <!-- Main navigation --> 400 <nav class="main-navigation dw-mod"> 401 <div class="center-container top-container__center-container dw-mod"> 402 <div class="grid"> 403 <div class="u-pull--left"> 404 @RenderHeaderNavigation() 405 </div> 406 <div class="grid__cell grid__cell--align-middle-right"> 407 <ul class="menu dw-mod u-pull--right"> 408 @RenderSignIn("inNavigation", userInitials) 409 @RenderLanguageSelector() 410 @RenderFavorites() 411 @if (!onlyPreview) 412 { 413 @RenderMiniCart() 414 } 415 </ul> 416 </div> 417 </div> 418 </div> 419 </nav> 420 421 break; 422 case "normal": //1 423 default: 424 <!-- Header --> 425 <div class="header header-top dw-mod"> 426 <div class="center-container top-container__center-container dw-mod"> 427 <div class="grid"> 428 429 @* Logo *@ 430 <div class="grid__col-md-3 grid__col-sm-3 grid__col-xs-12 grid--align-self-center grid__col--bleed-y"> 431 <div class="logo dw-mod"> 432 <a href="/Default.aspx?ID=@firstPageId"> 433 @if (Path.GetExtension(logo).ToLower() != ".svg") 434 { 435 <img class="grid__cell-img" src="@logo" alt="Logo" /> 436 } 437 else 438 { 439 <img class="grid__cell-img" src="@logo" style="max-height: 90px;" alt="Logo" /> 440 } 441 442 </a> 443 </div> 444 </div> 445 446 @* Search *@ 447 <div class="grid__col-md-6 grid__col-sm-4 grid__col-xs-12 grid__col--bleed-y grid--align-self-center"> 448 <div class="typeahead u-margin u-color-inherit js-typeahead" data-page-size="10" id="TopProductSearch" data-search-page-id="@productsSearchFeedId&feed=true" data-result-page-id="@productsPageId" data-groups-page-id="@productGroupsPageId"> 449 <button type="button" style="display: none;" 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> 450 <ul class="dropdown dropdown--absolute-position js-handlebars-root js-typeahead-groups-content u-min-w220px dw-mod" id="TopProductSearchGroupsContent" data-template="SearchGroupsTemplate" data-json-feed="/Default.aspx?ID=@productGroupsPageId&feedType=productGroups" data-init-onload="false" data-preloader="minimal"></ul> 451 <div class="typeahead-search-field"> 452 <input type="text" class="u-no-margin js-typeahead-search-field u-full-height u-full-width" placeholder="@searchPlaceholder" value="@searchValue"> 453 <ul class="dropdown dropdown--absolute-position u-min-w220px u-full-width js-handlebars-root js-typeahead-search-content u-full-width dw-mod" id="TopProductSearchContent" data-template="SearchContentTemplate" data-json-feed="/Default.aspx?ID=@productsSearchFeedId&feedType=productsOnly&feed=true" data-init-onload="false" data-preloader="minimal"></ul> 454 </div> 455 <button type="button" class="btn btn--condensed btn--primary u-no-margin dw-mod js-typeahead-enter-btn"><i class="fa fa-search"></i></button> 456 </div> 457 </div> 458 459 <div class="grid__col-md-3 grid__col-sm-4 grid__col-xs-12 grid__col--bleed-y grid--align-self-center"> 460 <div class="grid__cell grid__cell--align-middle-right"> 461 <ul class="menu dw-mod u-pull--right"> 462 @RenderSignIn("outsideNavigation", userInitials) 463 @RenderLanguageSelector("outsideNavigation") 464 @RenderFavorites("outsideNavigation") 465 @if (!onlyPreview) 466 { 467 @RenderMiniCart("outsideNavigation") 468 } 469 </ul> 470 </div> 471 </div> 472 </div> 473 </div> 474 </div> 475 476 <!-- Main navigation --> 477 <nav class="main-navigation dw-mod"> 478 <div class="center-container top-container__center-container dw-mod"> 479 <div class="grid"> 480 @RenderHeaderNavigation() 481 </div> 482 </div> 483 </nav> 484 485 break; 486 } 487 } 488 else 489 { 490 string style = (topLayout == "normal" || topLayout == "splitted" ? "main-navigation--top-style" : "main-navigation--nav-style"); 491 <!-- Main navigation --> 492 <nav class="main-navigation dw-mod @style"> 493 <div class="center-container top-container__center-container dw-mod"> 494 <div class="grid"> 495 @MobileNavigationTrigger() 496 497 <div class="logo u-max-w220px u-middle dw-mod"> 498 <a href="/Default.aspx?ID=@firstPageId"> 499 @if (Path.GetExtension(logo).ToLower() != ".svg") 500 { 501 <img class="grid__cell-img" src="@logo" alt="Logo" /> 502 } 503 else 504 { 505 <img class="grid__cell-img" src="@logo" style="height: 90px;" alt="Logo" /> 506 } 507 508 509 </a> 510 </div> 511 512 @if (!onlyPreview) 513 { 514 <ul class="menu dw-mod u-pull--right"> 515 @RenderMiniCart() 516 </ul> 517 } 518 </div> 519 </div> 520 </nav> 521 522 @* Mobile search *@ 523 <div class="u-padding"> 524 <div class="js-typeahead" data-page-size="10" id="MobileProductSearch" data-search-page-id="@productsSearchFeedId&feed=true" data-result-page-id="@productsPageId"> 525 <input type="text" class="u-full-width js-typeahead-search-field u-no-margin" placeholder="@searchPlaceholder" value="@searchValue"> 526 <ul class="dropdown dropdown--relative-position u-full-width js-handlebars-root js-typeahead-search-content dw-mod" id="MobileProductSearchContent" data-template="SearchContentTemplate" data-json-feed="/Default.aspx?ID=@productsSearchFeedId&feedType=productsOnly&feed=true" data-init-onload="false"></ul> 527 </div> 528 </div> 529 } 530 531 @* Impersonation bar *@ 532 @if (Model.CurrentUser.ID > 0 && Model.SecondaryUsers.Count > 0) 533 { 534 <div class="u-color-warning--bg"> 535 <div class="center-container top-container__center-container dw-mod"> 536 @*Impersonation*@ 537 <div class="grid"> 538 <div class="grid--align-self-center grid__col-x"> 539 @if (Model.CurrentSecondaryUser != null && Model.CurrentSecondaryUser.ID > 0) 540 { 541 string stopImpersonateTranslation = Translate("Stop impersonation"); 542 string username = ""; 543 if (!string.IsNullOrEmpty(Model.CurrentSecondaryUser.FirstName) && !string.IsNullOrEmpty(Model.CurrentSecondaryUser.LastName)) 544 { 545 username = Model.CurrentSecondaryUser.FirstName + " " + Model.CurrentSecondaryUser.LastName; 546 } 547 else if (!string.IsNullOrEmpty(Model.CurrentSecondaryUser.Name)) 548 { 549 username = Model.CurrentSecondaryUser.Name; 550 } 551 else if (!string.IsNullOrEmpty(Model.CurrentSecondaryUser.Email)) 552 { 553 username = Model.CurrentSecondaryUser.Email; 554 } 555 else 556 { 557 username = Model.CurrentSecondaryUser.UserName; 558 } 559 <div class="grid-cell"> 560 <div class="u-pull--left u-bold u-margin-top"> 561 <i class="fa fa-user-secret"></i> 562 @username<text>&nbsp;</text>@Translate("is impersonated by")<text>&nbsp;</text>@Pageview.User.UserName 563 </div> 564 <form method="post" class="u-pull--right u-no-margin"> 565 <input type="submit" class="btn btn--secondary dw-mod u-no-margin" name="DwExtranetRemoveSecondaryUser" value="@stopImpersonateTranslation"> 566 </form> 567 </div> 568 } 569 else 570 { 571 string viewListTranslation = Translate("View the list of users you can impersonate"); 572 <div class="grid-cell u-bold"> 573 <i class="fa fa-user-secret"></i> 574 <a href="/Default.aspx?ID=@impersonationPageId" title="@viewListTranslation" class="u-color-font-black">@viewListTranslation</a> 575 </div> 576 } 577 </div> 578 </div> 579 </div> 580 </div> 581 } 582 </header> 583 584 <!-- Floating mini cart --> 585 @if (!onlyPreview && !stickyMenu && pageId == productsPageId && Pageview.Device.ToString() != "Mobile" && Pageview.Device.ToString() != "Tablet") 586 { 587 <div class="floating-mini-cart u-hidden dw-mod" id="FloatingMiniCart"> 588 <div class="mini-cart dw-mod"> 589 <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')"> 590 <i class="fa fa-shopping-cart fa-4x"></i> 591 <div class="mini-cart__counter mini-cart__counter--lg dw-mod"> 592 <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"> 593 <div class="js-mini-cart-counter-content"> 594 @Model.Cart.TotalProductsCount 595 </div> 596 </div> 597 </div> 598 </a> 599 600 <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> 601 </div> 602 </div> 603 } 604 605 <!-- Render the content --> 606 <div id="Page" class="page @pagePos"> 607 <section class="center-container content-container dw-mod" id="content"> 608 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 609 610 611 @{ 612 string columnClass = "12"; 613 } 614 615 @if (Model.PropertyItem.GetList("ShowBreadcrumb").SelectedValue == "True") 616 { 617 <div class="grid__col-12 grid__col--bleed-y"> 618 @RenderNavigation(new 619 { 620 id = "breadcrumb", 621 template = "Breadcrumb.xslt" 622 }) 623 </div> 624 } 625 626 <div class="grid"> 627 @if (Model.PropertyItem.GetList("LeftMenu").SelectedValue == "True" && (Pageview.Page.NavigationSettings != null && !Pageview.Page.NavigationSettings.UseEcomGroups)) 628 { 629 var navigationMarkup = RenderNavigation(new 630 { 631 id = "leftnav", 632 cssclass = "dwnavigation", 633 startLevel = 2, 634 expandmode = "all", 635 endlevel = 5, 636 template = "LeftNavigation.xslt" 637 }); 638 639 if (!string.IsNullOrEmpty(navigationMarkup)) 640 { 641 <nav class="grid__col-md-3"> 642 <div class="grid__cell"> 643 @navigationMarkup 644 </div> 645 </nav> 646 columnClass = "9"; 647 } 648 } 649 <div class="grid__col-md-@columnClass grid__col--bleed"> 650 <div class="grid"> 651 @Model.Placeholder("dwcontent", "content", "default:true;sort:1") 652 </div> 653 </div> 654 </div> 655 </section> 656 </div> 657 </main> 658 659 @RenderFooter() 660 661 662 <!-- Content rendering helpers --> 663 664 @helper MobileNavigation(string userInitials) 665 { 666 int pageId = Model.TopPage.ID; 667 string mobileNavigationLevels = Model.Area.Item.GetBoolean("MobileNavigationLevels") ? Model.Area.Item.GetString("MobileNavigationLevels") : "3"; 668 669 bool showCreateAccountLink = Model.Area.Item.GetBoolean("ShowCreateAccountLink"); 670 671 int miniCartFeedPageId = GetPageIdByNavigationTag("MiniCartFeed"); 672 int cartFeedPageId = GetPageIdByNavigationTag("CartOrderlinesFeed"); 673 int createAccountPageId = GetPageIdByNavigationTag("CreateAccount"); 674 int createCustomerPageId = GetPageIdByNavigationTag("NewCustomer"); 675 int newPasswordPageId = GetPageIdByNavigationTag("NewPassword"); 676 677 int createWebCustomerPageId = GetPageIdByNavigationTag("WebCustomer"); 678 679 string myProfilePageId = (Model.CurrentUser.ID <= 0) ? GetPageIdByNavigationTag("SignInPage").ToString() + "&RedirectPageId=" + GetPageIdByNavigationTag("CustomerProfile").ToString() : GetPageIdByNavigationTag("CustomerProfile").ToString(); 680 string myOrdersPageId = (Model.CurrentUser.ID <= 0) ? GetPageIdByNavigationTag("SignInPage").ToString() + "&RedirectPageId=" + GetPageIdByNavigationTag("CustomerOrders").ToString() : GetPageIdByNavigationTag("CustomerOrders").ToString(); 681 string myFavoritesPageId = (Model.CurrentUser.ID <= 0) ? GetPageIdByNavigationTag("SignInPage").ToString() + "&RedirectPageId=" + GetPageIdByNavigationTag("CustomerFavorites").ToString() : GetPageIdByNavigationTag("CustomerFavorites").ToString(); 682 bool showMyProfileLink = Model.Area.Item.GetBoolean("ShowMyProfileLink"); 683 bool showMyOrdersLink = Model.Area.Item.GetBoolean("ShowMyOrdersLink"); 684 bool showMyFavoritesLink = Model.Area.Item.GetBoolean("ShowMyFavoritesLink"); 685 686 bool renderPagesInToolBar = Model.Area.Item.GetBoolean("RenderPagesInToolBar"); 687 int startLevel = renderPagesInToolBar ? 1 : 0; 688 689 bool onlyPreview = Model.Area.Item.GetBoolean("OnlyPreviewForAnonymous") && Model.CurrentUser.ID == 0; 690 691 if (Pageview.Device.ToString() == "Mobile" || Pageview.Device.ToString() == "Tablet") 692 { 693 <!-- Trigger for mobile navigation --> 694 <input type="checkbox" id="MobileNavTrigger" class="mobile-nav-trigger" /> 695 696 <!-- Mobile navigation --> 697 <nav class="mobile-navigation dw-mod"> 698 @if (Model.CurrentUser.ID > 0) 699 { 700 string userName = Model.CurrentUser.FirstName != null ? Model.CurrentUser.FirstName : ""; 701 userName += " " + Model.CurrentUser.LastName != null ? Model.CurrentUser.LastName : ""; 702 userName += userName == "" && Model.CurrentUser.UserName != null ? Model.CurrentUser.UserName : ""; 703 704 <ul class="menu menu-mobile"> 705 <li class="menu-mobile__item"> 706 <a href="/default.aspx?ID=@myProfilePageId" class="menu-mobile__link dw-mod"><i class="fa fa-user menu-mobile__link-icon"></i> @userName</a> 707 </li> 708 </ul> 709 } 710 711 @RenderNavigation(new 712 { 713 id = "mobilenavigation", 714 cssclass = "menu menu-mobile dwnavigation", 715 startLevel = @startLevel, 716 ecomStartLevel = @startLevel+1, 717 endlevel = @mobileNavigationLevels, 718 expandmode = "all", 719 template = "BaseMenuForMobile.xslt" 720 }) 721 722 @if (Model.Area.Item.GetBoolean("RenderPagesInToolBar")) 723 { 724 @RenderNavigation(new 725 { 726 id = "topToolsMobileNavigation", 727 cssclass = "menu menu-mobile dwnavigation", 728 template = "ToolsMenuForMobile.xslt" 729 }) 730 } 731 732 @if (Model.Area.Item.GetItems("Links").Count > 0) 733 { 734 <ul class="menu menu-mobile dwnavigation"> 735 @foreach (var customLink in Model.Area.Item.GetItems("Links")) 736 { 737 var currentPageUrl = Dynamicweb.Context.Current.Request.RawUrl; 738 739 string label = customLink.GetString("Text"); 740 string url = customLink.GetString("Link"); 741 bool newWindow = customLink.GetBoolean("OpenInNewWindow"); 742 if (string.IsNullOrEmpty(url)) 743 { 744 continue; 745 } 746 747 if (newWindow) 748 { 749 if (url.EndsWith(currentPageUrl)) 750 { 751 <li class="menu-mobile__item dw-mod menu__item--active "> 752 <a class="menu-mobile__link menu-mobile__link--active dw-mod" href="@url" target="_blank" title="@label">@label</a> 753 </li> 754 755 } 756 else 757 { 758 <li class="menu-mobile__item dw-mod menu__item--disabled"> 759 <a class="menu-mobile__link menu-mobile__link--disabled dw-mod" href="@url" target="_blank" title="@label">@label</a> 760 </li> 761 } 762 763 } 764 else 765 { 766 if (url.EndsWith(currentPageUrl)) 767 { 768 <li class="menu-mobile__item dw-mod menu-mobile__link--active"> 769 <a class="menu-mobile__link menu-mobile__link--active dw-mod" href="@url" title="@label">@label</a> 770 </li> 771 } 772 else 773 { 774 <li class="menu-mobile__item dw-mod menu__item--disabled"> 775 <a class="menu-mobile__link menu-mobile__link--disabled dw-mod" href="@url" title="@label">@label</a> 776 </li> 777 } 778 } 779 780 } 781 </ul> 782 } 783 <ul class="menu menu-mobile"> 784 @if (Model.CurrentUser.ID <= 0) 785 { 786 <li class="menu-mobile__item"> 787 <label for="SignInModalTrigger" onclick="document.getElementById('MobileNavTrigger').checked = false;" class="menu-mobile__link dw-mod menu-mobile__link--highlighted"><i class="fa fa-user menu-mobile__link-icon"></i> @Translate("Sign in")</label> 788 </li> 789 if (showCreateAccountLink) 790 { 791 <li class="menu-mobile__item"> 792 <a href="/default.aspx?ID=@createCustomerPageId" class="menu-mobile__link menu-mobile__link--highlighted dw-mod"><i class="fa fa-user menu-mobile__link-icon"></i> @Translate("Create new account")</a> 793 <a href="/default.aspx?ID=@createWebCustomerPageId" class="menu-mobile__link menu-mobile__link--highlighted dw-mod"><i class="fa fa-user menu-mobile__link-icon"></i> @Translate("Create new webaccount")</a> 794 795 @*<a class="menu-mobile__link menu-mobile__link--highlighted dw-mod" href="/Default.aspx?ID=@createAccountPageId"><i class="fa fa-user menu-mobile__link-icon"></i> @Translate("Create account")</a>*@ 796 </li> 797 } 798 } 799 else 800 { 801 if (showMyProfileLink) 802 { 803 <li class="menu-mobile__item"> 804 <a href="/default.aspx?ID=@myProfilePageId" class="menu-mobile__link menu-mobile__link--highlighted dw-mod"><i class="fa fa-user menu-mobile__link-icon"></i> @Translate("My Profile")</a> 805 </li> 806 } 807 if (showMyOrdersLink) 808 { 809 <li class="menu-mobile__item"> 810 <a href="/default.aspx?ID=@myOrdersPageId" class="menu-mobile__link menu-mobile__link--highlighted dw-mod"><i class="fa fa-list menu-mobile__link-icon"></i> @Translate("My Orders")</a> 811 </li> 812 } 813 if (showMyFavoritesLink) 814 { 815 <li class="menu-mobile__item"> 816 <a href="/default.aspx?ID=@myFavoritesPageId" class="menu-mobile__link menu-mobile__link--highlighted dw-mod"><i class="fa fa-star menu-mobile__link-icon"></i> @Translate("My Favorites")</a> 817 </li> 818 } 819 <li class="menu-mobile__item"> 820 <a class="menu-mobile__link menu-mobile__link--highlighted dw-mod" href="/Admin/Public/ExtranetLogoff.aspx?ID=@pageId"><i class="fa fa-user menu-mobile__link-icon"></i> @Translate("Sign out")</a> 821 </li> 822 } 823 @if (Model.Languages.Count > 0) 824 { 825 string selectedLanguage = ""; 826 foreach (var lang in Model.Languages) 827 { 828 if (lang.IsCurrent) 829 { 830 selectedLanguage = lang.Name; 831 } 832 } 833 834 <li class="menu-mobile__item dw-mod"> 835 <label for="MobileMenuCheck_Language" class="menu-mobile__link menu-mobile__link--highlighted dw-mod"><i class="fa fa-globe menu-mobile__link-icon"></i> @selectedLanguage</label> 836 <input id="MobileMenuCheck_Language" type="checkbox" class="expand-trigger"> 837 <label for="MobileMenuCheck_Language" class="menu-mobile__trigger"></label> 838 <ul class="menu-mobile menu-mobile__submenu expand-menu"> 839 @foreach (var lang in Model.Languages) 840 { 841 <li class="menu-mobile__item dw-mod"> 842 <a class="menu-mobile__link menu-mobile__link--highlighted dw-mod menu-mobile__link--level-1" href="/Default.aspx?ID=@lang.Page.ID&CurrencyCode=@Dynamicweb.Services.Areas.GetArea(lang.ID).EcomCurrencyId">@lang.Name</a> 843 </li> 844 } 845 </ul> 846 </li> 847 } 848 </ul> 849 </nav> 850 <label class="mobile-nav-trigger-off" for="MobileNavTrigger"></label> 851 852 if (!onlyPreview) 853 { 854 <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> 855 } 856 } 857 } 858 859 @helper LoginModal() 860 { 861 int pageId = Model.TopPage.ID; 862 string topLayout = Model.Area.Item.GetList("LayoutTop").SelectedValue; 863 int createAccountPageId = GetPageIdByNavigationTag("CreateAccount"); 864 int signInProfilePageId = GetPageIdByNavigationTag("SignInPage"); 865 int forgotPasswordPageId = GetPageIdByNavigationTag("NewPassword"); 866 string userSignedInError = !Model.LogOnFailed ? "" : "checked"; 867 string userSignedInErrorText = ""; 868 869 if (Model.LogOnFailed) 870 { 871 switch (Model.LogOnFailedReason) 872 { 873 case Dynamicweb.Security.UserManagement.LogOnFailedReason.PasswordLengthInvalid: 874 userSignedInErrorText = Translate("Password length is invalid"); 875 break; 876 case Dynamicweb.Security.UserManagement.LogOnFailedReason.IncorrectLogin: 877 userSignedInErrorText = Translate("Invalid email or password"); 878 break; 879 case Dynamicweb.Security.UserManagement.LogOnFailedReason.ExceededFailedLogOnLimit: 880 userSignedInErrorText = Translate("You have exceeded the limit of allowed login attempts. The user account is temporarily locked"); 881 break; 882 case Dynamicweb.Security.UserManagement.LogOnFailedReason.LoginLocked: 883 userSignedInErrorText = Translate("The user account is temporarily locked"); 884 break; 885 case Dynamicweb.Security.UserManagement.LogOnFailedReason.PasswordExpired: 886 userSignedInErrorText = Translate("The password has expired and needs to be renewed"); 887 break; 888 default: 889 userSignedInErrorText = Translate("An unknown error occured"); 890 break; 891 } 892 } 893 894 <!-- Trigger for the login modal --> 895 <input type="checkbox" id="SignInModalTrigger" class="modal-trigger @topLayout" @userSignedInError /> 896 897 <!-- Login modal --> 898 <div class="modal-container"> 899 <label for="SignInModalTrigger" id="SignInModalOverlay" class="modal-overlay"></label> 900 <div class="modal modal--xs" id="SignInModal"> 901 <div class="modal__header"> 902 <h2>@Translate("Sign in")</h2> 903 </div> 904 <div class="modal__body"> 905 <form method="post" id="LoginForm" class="u-no-margin"> 906 <input type="hidden" name="ID" value="@pageId" /> 907 <input type="hidden" name="DWExtranetUsernameRemember" value="True" /> 908 <input type="hidden" name="DWExtranetPasswordRemember" value="True" /> 909 <input type="text" class="u-full-width" id="LoginUsername" name="username" placeholder="@Translate("Email")" /> 910 <input type="password" class="u-full-width" id="LoginPassword" name="password" placeholder="@Translate("Password")" /> 911 <div class="field-error dw-mod">@userSignedInErrorText</div> 912 913 <label> 914 <input type="checkbox" id="RememberMe" name="Autologin" checked="checked" value="True"> 915 <span>@Translate("Remember me", "Remember me")</span> 916 </label> 917 918 <button type="submit" class="btn btn--primary btn--full dw-mod" name="LoginAction" value="Login" onclick="Buttons.LockButton(event)">@Translate("Sign in")</button> 919 920 <a class="btn btn--link-clean dw-mod" href="/Default.aspx?id=@forgotPasswordPageId">@Translate("Forgot your password?", "Forgot your password?")</a> 921 922 @*<a class="btn btn--link-clean dw-mod" href="/default.aspx?ID=@createAccountPageId">@Translate("Create account")?</a>*@ 923 </form> 924 </div> 925 </div> 926 </div> 927 } 928 929 @helper RenderHeaderNavigation() 930 { 931 bool megaMenu = Model.Area.Item.GetList("NavigationMegaMenu").SelectedValue.ToLower() == "true" ? true : false; 932 string megamenuPromotionImage = Model.Area.Item.GetFile("NavigationMegamenuPromotionImage") != null ? Model.Area.Item.GetFile("NavigationMegamenuPromotionImage").Path : ""; 933 bool renderPagesInToolBar = Model.Area.Item.GetBoolean("RenderPagesInToolBar"); 934 int startLevel = renderPagesInToolBar ? 1 : 0; 935 936 if (Pageview.Device.ToString() != "Mobile" && Pageview.Device.ToString() != "Tablet") 937 { 938 if (!megaMenu) 939 { 940 @RenderNavigation(new 941 { 942 id = "topnavigation", 943 cssclass = "menu dw-mod dwnavigation", 944 startLevel = @startLevel, 945 ecomStartLevel = @startLevel+1, 946 endlevel = 5, 947 expandmode="all", 948 template = "BaseMenuWithDropdown.xslt" 949 }); 950 } 951 else 952 { 953 @RenderNavigation(new 954 { 955 id = "topnavigation", 956 cssclass = "menu dw-mod dwnavigation", 957 startLevel = @startLevel, 958 ecomStartLevel = @startLevel+1, 959 endlevel = 5, 960 promotionImage = megamenuPromotionImage, 961 promotionLink = Model.Area.Item.GetString("NavigationMegamenuPromotionLink"), 962 expandmode = "all", 963 template = "BaseMegaMenu.xslt" 964 }); 965 } 966 } 967 } 968 969 @helper MobileNavigationTrigger() 970 { 971 @* Mobile navigation trigger *@ 972 973 if (Pageview.Device.ToString() == "Mobile" || Pageview.Device.ToString() == "Tablet") 974 { 975 <div class="menu dw-mod u-pull--left"> 976 <div class="menu__item menu__item--horizontal menu__item--top-level dw-mod"> 977 <label for="MobileNavTrigger" class="mobile-nav-trigger-button menu__link dw-mod"></label> 978 </div> 979 </div> 980 } 981 } 982 983 @helper RenderLanguageSelector(string type = "inNavigation") 984 { 985 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 u-w40px dw-mod"; 986 string menuLinkClass = type == "inNavigation" ? "menu__link" : "header-menu__link"; 987 988 @* Language selector *@ 989 if (Model.Languages.Count > 1) 990 { 991 <li class="@liClasses"> 992 <div class="@menuLinkClass u-w40px is-dropdown is-dropdown--no-icon dw-mod"> 993 <i class="fa fa-globe fa-1_5x"></i> 994 <div class="menu menu--dropdown u-w100px dw-mod"> 995 @foreach (var lang in Model.Languages) 996 { 997 <a href="/Default.aspx?ID=@lang.Page.ID&CurrencyCode=@Dynamicweb.Services.Areas.GetArea(lang.ID).EcomCurrencyId" class="menu-dropdown__item menu-dropdown__item--link dw-mod">@lang.Name</a> 998 } 999 </div> 1000 </div> 1001 </li> 1002 } 1003 } 1004 1005 @helper RenderMiniCart(string type = "inNavigation") 1006 { 1007 string liClasses = type == "inNavigation" ? "menu__item menu__item--horizontal menu__item--top-level dw-mod" : "menu__item menu__item--horizontal menu--clean dw-mod"; 1008 string menuLinkClass = type == "inNavigation" ? "menu__link" : "header-menu__link"; 1009 1010 int miniCartFeedPageId = GetPageIdByNavigationTag("MiniCartFeed"); 1011 int cartFeedPageId = GetPageIdByNavigationTag("CartOrderlinesFeed"); 1012 int cartPageId = GetPageIdByNavigationTag("CartPage"); 1013 double cartProductsCount = Model.Cart.TotalProductsCount; 1014 1015 @* Mini cart *@ 1016 <li class="@liClasses"> 1017 <div class="mini-cart dw-mod"> 1018 <a href="/Default.aspx?ID=@cartPageId&Purge=True" id="miniCartCounterWrap" class="@menuLinkClass dw-mod js-mini-cart-button" onmouseenter="Cart.UpdateMiniCart(event, 'miniCart', '/Default.aspx?ID=@miniCartFeedPageId&feedType=MiniCart')"> 1019 <i class="fa fa-shopping-cart fa-1_5x"></i> 1020 <div class="mini-cart__counter mini-cart__counter--inline dw-mod"> 1021 <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"> 1022 <div class="js-mini-cart-counter-content"> 1023 @cartProductsCount 1024 </div> 1025 </div> 1026 </div> 1027 </a> 1028 @if (Pageview.Device.ToString() != "Mobile" && Pageview.Device.ToString() != "Tablet") 1029 { 1030 <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> 1031 } 1032 </div> 1033 </li> 1034 } 1035 1036 @helper RenderSignIn(string type = "inNavigation", string userInitials = "") 1037 { 1038 //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 u-w40px dw-mod"; 1039 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"; 1040 string menuLinkClass = type == "inNavigation" ? "menu__link" : "header-menu__link"; 1041 1042 int pageId = Model.TopPage.ID; 1043 string myProfilePageId = (Model.CurrentUser.ID <= 0) ? GetPageIdByNavigationTag("SignInPage").ToString() + "&RedirectPageId=" + GetPageIdByNavigationTag("CustomerProfile").ToString() : GetPageIdByNavigationTag("CustomerProfile").ToString(); 1044 string myOrdersPageId = (Model.CurrentUser.ID <= 0) ? GetPageIdByNavigationTag("SignInPage").ToString() + "&RedirectPageId=" + GetPageIdByNavigationTag("CustomerOrders").ToString() : GetPageIdByNavigationTag("CustomerOrders").ToString(); 1045 int myDashboardPageId = GetPageIdByNavigationTag("CustomerDashboard"); 1046 string myFavoritesPageId = (Model.CurrentUser.ID <= 0) ? GetPageIdByNavigationTag("SignInPage").ToString() + "&RedirectPageId=" + GetPageIdByNavigationTag("CustomerFavorites").ToString() : GetPageIdByNavigationTag("CustomerFavorites").ToString(); 1047 string mySavedCardsPageId = (Model.CurrentUser.ID <= 0) ? GetPageIdByNavigationTag("SignInPage").ToString() + "&RedirectPageId=" + GetPageIdByNavigationTag("SavedCards").ToString() : GetPageIdByNavigationTag("SavedCards").ToString(); 1048 int createAccountPageId = GetPageIdByNavigationTag("CreateAccount"); 1049 int createCustomerPageId = GetPageIdByNavigationTag("NewCustomer"); 1050 int createWebCustomerPageId = GetPageIdByNavigationTag("WebCustomer"); 1051 1052 int signInProfilePageId = GetPageIdByNavigationTag("SignInPage"); 1053 int forgotPasswordPageId = GetPageIdByNavigationTag("NewPassword"); 1054 1055 bool showCreateAccountLink = Model.Area.Item.GetBoolean("ShowCreateAccountLink"); 1056 bool showMyProfileLink = Model.Area.Item.GetBoolean("ShowMyProfileLink"); 1057 bool showMyOrdersLink = Model.Area.Item.GetBoolean("ShowMyOrdersLink"); 1058 bool showMyFavoritesLink = Model.Area.Item.GetBoolean("ShowMyFavoritesLink"); 1059 bool showMySavedCardsLink = Model.Area.Item.GetBoolean("ShowMySavedCardsLink"); 1060 1061 @* Sign in + Customer center links *@ 1062 <li class="@liClasses"> 1063 <div class="@menuLinkClass is-dropdown is-dropdown--no-icon dw-mod"> 1064 @if (Model.CurrentUser.ID <= 0) 1065 { 1066 <span><i class="fa fa-user fa-1_5x"></i> @Translate("Sign in")</span> 1067 } 1068 else 1069 { 1070 <a href="/default.aspx?ID=@myDashboardPageId" class="u-color-inherit"><div class="circle-icon-btn">@userInitials.ToUpper()</div></a> 1071 } 1072 1073 <div class="menu menu--dropdown sign-in-dropdown dw-mod"> 1074 <ul class="list list--clean dw-mod"> 1075 @if (Model.CurrentUser.ID <= 0) 1076 { 1077 <li> 1078 <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> 1079 </li> 1080 if (showCreateAccountLink) 1081 { 1082 <li> 1083 <a href="/default.aspx?ID=@createCustomerPageId" class="list__link dw-mod">@Translate("Create new account")</a> 1084 </li> 1085 <li> 1086 <a href="/default.aspx?ID=@createWebCustomerPageId" class="list__link dw-mod">@Translate("Create new webaccount")</a> 1087 </li> 1088 } 1089 1090 <li> 1091 <a href="/default.aspx?ID=@forgotPasswordPageId" class="list__link dw-mod">@Translate("Forgot your password?")</a> 1092 </li> 1093 if (showMyProfileLink || showMyOrdersLink || showMyFavoritesLink || showMySavedCardsLink) 1094 { 1095 <li class="list__seperator dw-mod"></li> 1096 } 1097 } 1098 1099 @if (showMyProfileLink) 1100 { 1101 <li> 1102 <a href="/default.aspx?ID=@myProfilePageId" class="list__link dw-mod"><i class="fa fa-user"></i> @Translate("My Profile")</a> 1103 </li> 1104 } 1105 @if (showMyOrdersLink) 1106 { 1107 <li> 1108 <a href="/default.aspx?ID=@myOrdersPageId" class="list__link dw-mod"><i class="fa fa-list"></i> @Translate("My Orders")</a> 1109 </li> 1110 } 1111 @if (showMyFavoritesLink) 1112 { 1113 <li> 1114 <a href="/default.aspx?ID=@myFavoritesPageId" class="list__link dw-mod"><i class="fa fa-star"></i> @Translate("My Favorites")</a> 1115 </li> 1116 } 1117 @if (showMySavedCardsLink) 1118 { 1119 <li> 1120 <a href="/default.aspx?ID=@mySavedCardsPageId" class="list__link dw-mod"><i class="fa fa-credit-card"></i> @Translate("My Saved cards")</a> 1121 </li> 1122 } 1123 @if (Model.CurrentUser.ID > 0) 1124 { 1125 if (showMyProfileLink || showMyOrdersLink || showMyFavoritesLink || showMySavedCardsLink) 1126 { 1127 <li class="list__seperator dw-mod"></li> 1128 } 1129 <li> 1130 <a href="/Admin/Public/ExtranetLogoff.aspx?ID=@pageId" class="list__link dw-mod">@Translate("Sign out")</a> 1131 </li> 1132 } 1133 </ul> 1134 </div> 1135 </div> 1136 </li> 1137 } 1138 1139 @helper RenderFavorites(string type = "inNavigation") 1140 { 1141 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 u-w40px dw-mod"; 1142 string menuLinkClass = type == "inNavigation" ? "menu__link" : "header-menu__link"; 1143 1144 string myFavoritesPageId = GetPageIdByNavigationTag("CustomerFavorites").ToString(); 1145 1146 @* Favorites *@ 1147 if (Model.CurrentUser.ID > 0) 1148 { 1149 <li class="@liClasses"> 1150 <a href="/Default.aspx?ID=@myFavoritesPageId" class="@menuLinkClass dw-mod"> 1151 <i class="fa fa-star fa-1_5x"></i> 1152 </a> 1153 </li> 1154 } 1155 } 1156 1157 1158 @helper RenderFooter() 1159 { 1160 string footerColumnOneContent = !string.IsNullOrEmpty(Model.Area.Item.GetString("FooterColumnOne")) ? Model.Area.Item.GetString("FooterColumnOne") : ""; 1161 string footerColumnTwoContent = !string.IsNullOrEmpty(Model.Area.Item.GetString("FooterColumnTwo")) ? Model.Area.Item.GetString("FooterColumnTwo") : ""; 1162 string footerColumnThreeContent = !string.IsNullOrEmpty(Model.Area.Item.GetString("FooterColumnThree")) ? Model.Area.Item.GetString("FooterColumnThree") : ""; 1163 string footerColumnOneHeader = Model.Area.Item.GetString("FooterColumnOneHeader"); 1164 string footerColumnTwoHeader = Model.Area.Item.GetString("FooterColumnTwoHeader"); 1165 string footerColumnThreeHeader = Model.Area.Item.GetString("FooterColumnThreeHeader"); 1166 int newsletterSignUpPageId = GetPageIdByNavigationTag("NewsletterSignUp"); 1167 1168 <!-- Footer section --> 1169 <footer class="footer dw-mod"> 1170 <div class="center-container top-container__center-container dw-mod"> 1171 <div class="grid"> 1172 @if (!string.IsNullOrEmpty(footerColumnOneContent) || !string.IsNullOrEmpty(footerColumnOneHeader)) 1173 { 1174 <div class="grid__col-md-auto"> 1175 <h4 class="footer__heading dw-mod">@footerColumnOneHeader</h4> 1176 <div class="footer__content dw-mod"> 1177 @footerColumnOneContent 1178 </div> 1179 </div> 1180 } 1181 @if (!string.IsNullOrEmpty(footerColumnTwoContent) || !string.IsNullOrEmpty(footerColumnTwoHeader)) 1182 { 1183 <div class="grid__col-md-auto"> 1184 <h4 class="footer__heading dw-mod">@footerColumnTwoHeader</h4> 1185 <div class="footer__content dw-mod"> 1186 @footerColumnTwoContent 1187 </div> 1188 </div> 1189 } 1190 @if (!string.IsNullOrEmpty(footerColumnThreeContent) || !string.IsNullOrEmpty(footerColumnThreeHeader)) 1191 { 1192 <div class="grid__col-md-auto"> 1193 <h4 class="footer__heading dw-mod">@footerColumnThreeHeader</h4> 1194 <div class="footer__content dw-mod"> 1195 @footerColumnThreeContent 1196 </div> 1197 </div> 1198 } 1199 @if (Model.Area.Item.GetBoolean("FooterNewsletterSignUp")) 1200 { 1201 <div class="grid__col-md-auto"> 1202 <h4 class="footer__heading dw-mod">@Translate("Mailing list", "Mailing list")</h4> 1203 <div class="footer__content dw-mod"> 1204 <p>@Translate("Sign up if you would like to receive occasional treats from us", "Sign up if you would like to receive occasional treats from us").</p> 1205 <form class="form dw-mod" name="NewsletterRedirect" action='/Default.aspx' method="get" enctype="multipart/form-data"> 1206 <input name="ID" id="ID" value="@newsletterSignUpPageId" type="hidden" /> 1207 <div class="form__field-combi"> 1208 <input name="NewsletterEmail" id="NewsletterEmail" type="text" placeholder='@Translate("Your email address", "Your email address")' /> 1209 <input class="btn btn--primary btn--condensed dw-mod" style="z-index: 1000;" type="submit" id="Submitter" value='@Translate("Go", "Go")' /> 1210 </div> 1211 </form> 1212 </div> 1213 </div> 1214 } 1215 @if (Model.Area.Item.GetItems("FooterSocialLinks").Count > 0) 1216 { 1217 <div class="grid__col-md-auto"> 1218 <h4 class="footer__heading dw-mod">@Translate("Social links", "Social links")</h4> 1219 <div class="footer__content dw-mod"> 1220 <div class="collection dw-mod"> 1221 @foreach (var socialitem in Model.Area.Item.GetItems("FooterSocialLinks")) 1222 { 1223 //Fields.FirstOrDefault(x => x.SystemName == "Icon").GetString() 1224 var socialIcon = socialitem.GetValue("Icon") as Dynamicweb.Frontend.ListViewModel; 1225 string socialIconClass = socialIcon.SelectedValue; 1226 string socialIconTitle = socialIcon.SelectedName; 1227 string socialLink = socialitem.GetString("Link"); 1228 1229 <a href="@socialLink" target="_blank" title="@socialIconTitle"><i class="fa @socialIconClass fa-2x"></i></a> 1230 } 1231 </div> 1232 </div> 1233 </div> 1234 } 1235 <div class="grid__col-12 footer__copyright dw-mod"> 1236 <p>@Model.Area.Item.GetString("FooterCopyrightText")</p> 1237 </div> 1238 </div> 1239 </div> 1240 </footer> 1241 1242 1243 if (Model.Area.Item.GetItems("Links").Count > 0) 1244 { 1245 <ul class="custom-links" id="customLinks" style="display: none;"> 1246 1247 @foreach (var customLink in Model.Area.Item.GetItems("Links")) 1248 { 1249 var currentPageUrl = Dynamicweb.Context.Current.Request.RawUrl; 1250 1251 string label = customLink.GetString("Text"); 1252 string url = customLink.GetString("Link"); 1253 bool newWindow = customLink.GetBoolean("OpenInNewWindow"); 1254 1255 if (newWindow) 1256 { 1257 1258 if (url.EndsWith(currentPageUrl)) 1259 { 1260 <li class="menu__item dw-mod menu__item--horizontal menu__item--top-level dw-navbar-button menu__item--active custom-link"> 1261 <a class="menu__link dw-mod" href="@url" target="_blank" title="@label">@label</a> 1262 </li> 1263 1264 } 1265 else 1266 { 1267 <li class="menu__item dw-mod menu__item--horizontal menu__item--top-level dw-navbar-button menu__item--disabled custom-link"> 1268 <a class="menu__link dw-mod" href="@url" target="_blank" title="@label">@label</a> 1269 </li> 1270 } 1271 1272 } 1273 else 1274 { 1275 if (url.EndsWith(currentPageUrl)) 1276 { 1277 <li class="menu__item dw-mod menu__item--horizontal menu__item--top-level dw-navbar-button menu__item--active custom-link"> 1278 <a class="menu__link dw-mod" href="@url" title="@label">@label</a> 1279 </li> 1280 } 1281 else 1282 { 1283 <li class="menu__item dw-mod menu__item--horizontal menu__item--top-level dw-navbar-button menu__item--disabled custom-link"> 1284 <a class="menu__link dw-mod" href="@url" title="@label">@label</a> 1285 </li> 1286 } 1287 1288 } 1289 } 1290 1291 </ul> 1292 } 1293 } 1294 1295 1296 @* Templates for Typeahead *@ 1297 <script id="SearchGroupsTemplate" type="text/x-template"> 1298 {{#.}} 1299 <li class="dropdown__item dw-mod" onclick="Search.UpdateGroupSelection(this)" data-group-id="{{id}}">{{name}}</li> 1300 {{/.}} 1301 </script> 1302 1303 <script id="SearchContentTemplate" type="text/x-template"> 1304 {{#each .}} 1305 {{#Product}} 1306 {{#ifCond template "==" "SearchContentTemplate"}} 1307 <li class="dropdown__item dropdown__item--seperator dw-mod"> 1308 <div> 1309 <a href="{{link}}" class="js-typeahead-link u-color-inherit u-pull--left"> 1310 <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> 1311 <div class="u-pull--left"> 1312 <div class="u-bold u-max-w220px u-truncate-text js-typeahead-name">{{name}}</div> 1313 @if (!onlyPreview) 1314 { 1315 <div class="{{onlyPreview}}">{{price}}</div> 1316 } 1317 </div> 1318 </a> 1319 <div class="u-margin-left u-pull--right u-w80px u-hidden-xs u-hidden-xxs"> 1320 @if (!onlyPreview) 1321 { 1322 <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="fa fa-shopping-cart js-ignore-click-outside"></i></button> 1323 <a href="{{link}}" class="btn btn--secondary btn--condensed btn--full u-no-margin dw-mod {{hideViewMore}} js-ignore-click-outside">@Translate("View")</a> 1324 } 1325 else 1326 { 1327 <label for="SignInModalTrigger" class="btn btn--primary btn--condensed sign-in-modal-trigger-button dw-mod u-pull--right" onclick="setTimeout(function () { document.getElementById('LoginUsername').focus() }, 10)"><i class="fa fa-user fa-1_5x"></i></label> 1328 } 1329 </div> 1330 </div> 1331 </li> 1332 {{/ifCond}} 1333 {{#ifCond template "===" "SearchMore"}} 1334 {{>SearchMore}} 1335 {{/ifCond}} 1336 {{#ifCond template "===" "NoProducts"}} 1337 <li class="dropdown__item dropdown__item--seperator dw-mod"> 1338 @Translate("No products found") 1339 </li> 1340 {{/ifCond}} 1341 {{/Product}} 1342 {{else}} 1343 <li class="dropdown__item dropdown__item--seperator dw-mod"> 1344 @Translate("No products found") 1345 </li> 1346 {{/each}} 1347 </script> 1348 1349 <script id="SearchMore" type="text/x-template"> 1350 <li class="dropdown__item dropdown__item--not-selectable dw-mod"> 1351 <a href="/Default.aspx?ID=@productsPageId&Search={{searchParameter}}&GroupID={{groupId}}" class="btn btn--primary btn--full u-no-margin dw-mod js-typeahead-link"> 1352 @Translate("View all") 1353 </a> 1354 </li> 1355 </script> 1356 1357 @* Templates for the mini cart *@ 1358 <script id="MiniCartCounterContent" type="text/x-template"> 1359 {{#.}} 1360 <div class="js-mini-cart-counter-content dw-mod"> 1361 {{numberofproducts}} 1362 </div> 1363 {{/.}} 1364 </script> 1365 1366 <script id="MiniCartContent" type="text/x-template"> 1367 {{#.}} 1368 <div class="mini-cart-dropdown__inner {{isempty}} dw-mod"> 1369 <h4 class="u-ta-center u-no-margin u-margin-bottom u-margin-top">@Translate("Shopping cart")</h4> 1370 <div class="mini-cart-dropdown__body dw-mod"> 1371 <table class="table mini-cart-table dw-mod"> 1372 <thead> 1373 <tr> 1374 <td>&nbsp;</td> 1375 <td>@Translate("Product")</td> 1376 <td class="u-ta-right">@Translate("Qty")</td> 1377 <td class="u-ta-right" width="120">@Translate("Price")</td> 1378 </tr> 1379 </thead> 1380 1381 {{#OrderLines}} 1382 {{#ifCond template "===" "CartOrderline"}} 1383 {{>MiniCartOrderline}} 1384 {{/ifCond}} 1385 {{#ifCond template "===" "CartOrderlineMobile"}} 1386 {{>MiniCartOrderlineMobile}} 1387 {{/ifCond}} 1388 {{#ifCond template "===" "CartOrderlineDiscount"}} 1389 {{>MiniCartOrderlineDiscount}} 1390 {{/ifCond}} 1391 {{/OrderLines}} 1392 1393 @*<tr> 1394 <td><i class="fa fa-credit-card"></i></td> 1395 <td>{{paymentmethod}}</td> 1396 <td colspan="2" class="u-ta-right" width="130">{{paymentfee}}</td> 1397 </tr> 1398 <tr> 1399 <td><i class="fa fa-truck"></i></td> 1400 <td>{{shippingmethod}}</td> 1401 <td colspan="2" class="u-ta-right" width="130">{{shippingfee}}</td> 1402 </tr>*@ 1403 <tr class="mini-cart-totals dw-mod"> 1404 <td colspan="2">@Translate("Total")</td> 1405 <td class="u-ta-right">{{numberofproducts}}</td> 1406 <td class="u-ta-right" width="130">{{totalprice}}</td> 1407 </tr> 1408 </table> 1409 </div> 1410 1411 <table class="table mini-cart-table dw-mod"> 1412 <tr class="mini-cart-orderlines__footer dw-mod"> 1413 <td colspan="2"><button type="button" class="btn btn--secondary u-pull--left u-no-margin dw-mod btn--sm" onclick="Cart.EmptyCart(event)">@Translate("Empty cart")</button></td> 1414 <td colspan="2" class="u-ta-right"><a href="/Default.aspx?ID=@cartPageId" class="btn btn--primary u-pull--right u-no-margin dw-mod btn--sm">@Translate("Proceed to checkout")</a></td> 1415 </tr> 1416 </table> 1417 </div> 1418 {{/.}} 1419 </script> 1420 1421 <script id="MiniCartOrderline" type="text/x-template"> 1422 <tr class="{{isempty}}"> 1423 <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> 1424 <td> 1425 <a href="{{link}}" class="mini-cart-orderlines__name" title="{{name}}">{{name}}</a> 1426 <a href="{{link}}" class="mini-cart-orderlines__name item-number">{{variantname}}</a> 1427 <div class="item-number">{{unitname}}</div> 1428 </td> 1429 <td class="u-ta-right">{{quantity}}</td> 1430 <td class="u-ta-right">{{totalprice}}</td> 1431 </tr> 1432 </script> 1433 1434 <script id="MiniCartOrderlineMobile" type="text/x-template"> 1435 <tr class="{{isempty}}"> 1436 <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> 1437 <td> 1438 <a href="{{link}}" class="mini-cart-orderlines__name">{{name}}</a> 1439 <a href="{{link}}" class="mini-cart-orderlines__name item-number">{{variantname}}</a> 1440 <div class="item-number">{{unitname}}</div> 1441 </td> 1442 <td class="u-ta-right">{{quantity}}</td> 1443 <td class="u-ta-right">{{totalprice}}</td> 1444 </tr> 1445 </script> 1446 1447 <script id="MiniCartOrderlineDiscount" type="text/x-template"> 1448 <tr class="table__row--no-border {{isempty}}"> 1449 <td>&nbsp;</td> 1450 <td><div class="mini-cart-orderlines__name dw-mod">{{name}}</div></td> 1451 <td class="u-ta-right">&nbsp;</td> 1452 <td class="u-ta-right">{{totalprice}}</td> 1453 </tr> 1454 </script> 1455 1456 <!-- Javascript --> 1457 <script src="/Files/Templates/Designs/Rapido/js/handlebars-v4.0.11.js"></script> 1458 <script src="/Files/Templates/Designs/Rapido/js/master.min.js?v=@DateTime.Now"></script> 1459 1460 @if (Model.Area.Item.GetBoolean("UseCustomJavascript")) 1461 { 1462 <script src="/Files/Templates/Designs/Rapido/js/custom.min.js?v=@DateTime.Now"></script> 1463 } 1464 1465 <script> 1466 Wireframe.Init(@wireframeMode.ToLower()); 1467 </script> 1468 </body> 1469 </html> 1470 1471