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_9789aaf15bd741f7ae3896dc653279a6.Execute() in F:\DWWEBSITE\TAFWEB\Solutions\Files\Templates\Designs\Rapido\_parsed\Page.parsed.cshtml:line 439
   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 @using Dynamicweb.Frontend.Devices 4 @using Dynamicweb.Extensibility 5 @using Dynamicweb.Content 6 @using Dynamicweb.Security; 7 @using System 8 @using System.Web 9 10 @{ 11 //General settings 12 string favicon = Model.Area.Item.GetFile("LogoFavicon") != null ? Model.Area.Item.GetFile("LogoFavicon").Path : "/Files/Images/favicon.png"; 13 string logo = Model.Area.Item.GetFile("LogoImage") != null ? Model.Area.Item.GetFile("LogoImage").Path : "/Files/Images/logo-dynamicweb.png"; 14 string logoWhite = Model.Area.Item.GetFile("LogoImageWhite") != null ? Model.Area.Item.GetFile("LogoImageWhite").Path : "/Files/Images/DWLogo.png"; 15 bool megaMenu = Model.Area.Item.GetList("NavigationMegaMenu").SelectedValue.ToLower() == "true" ? true : false; 16 bool stickyMenu = Pageview.Device.ToString() == "Mobile" ? false : Model.Area.Item.GetBoolean("NavigationStickyMenu"); 17 string mobileNavigationLevels = Model.Area.Item.GetBoolean("MobileNavigationLevels") ? Model.Area.Item.GetString("MobileNavigationLevels") : "3"; 18 string footerColumnOneContent = !string.IsNullOrEmpty(Model.Area.Item.GetString("FooterColumnOne")) ? Model.Area.Item.GetString("FooterColumnOne") : ""; 19 string footerColumnTwoContent = !string.IsNullOrEmpty(Model.Area.Item.GetString("FooterColumnTwo")) ? Model.Area.Item.GetString("FooterColumnTwo") : ""; 20 string searchPlaceholder = Translate("Search products", "Search products"); 21 string userSignedInError = !Model.LogOnFailed ? "" : "checked"; 22 string userSignedInErrorText = ""; 23 if (Model.LogOnFailed) { 24 switch (Model.LogOnFailedReason) 25 { 26 case Dynamicweb.Security.UserManagement.LogOnFailedReason.PasswordLengthInvalid: 27 userSignedInErrorText = Translate("Password length is invalid","Password length is invalid"); 28 break; 29 case Dynamicweb.Security.UserManagement.LogOnFailedReason.IncorrectLogin: 30 userSignedInErrorText = Translate("Invalid email or password","Invalid email or password"); 31 break; 32 case Dynamicweb.Security.UserManagement.LogOnFailedReason.ExceededFailedLogOnLimit: 33 userSignedInErrorText = Translate("You have exceeded the limit of allowed login attempts. The user account is temporarily locked","You have exceeded the limit of allowed login attempts. The user account is temporarily locked"); 34 break; 35 case Dynamicweb.Security.UserManagement.LogOnFailedReason.LoginLocked: 36 userSignedInErrorText = Translate("The user account is temporarily locked","The user account is temporarily locked"); 37 break; 38 case Dynamicweb.Security.UserManagement.LogOnFailedReason.PasswordExpired: 39 userSignedInErrorText = Translate("The password has expired and needs to be renewed","The password has expired and needs to be renewed"); 40 break; 41 default: 42 userSignedInErrorText = Translate("An unknown error occured","An unknown error occured"); 43 break; 44 } 45 } 46 string loggedIn = Model.CurrentUser.ID > 0 ? "true" : "false"; 47 double cartProductsCount = Model.Cart.TotalProductsCount; 48 string wireframeMode = Model.Area.Item.GetBoolean("WireframeMode").ToString(); 49 50 //Font settings 51 string navigationFont = Model.Area.Item.GetItem("NavigationFont").GetString("FontFamily").Replace(" ", "+"); 52 string mobileNavigationFont = Model.Area.Item.GetItem("MobileNavigationFont").GetString("FontFamily").Replace(" ", "+"); 53 string headerFont = Model.Area.Item.GetItem("ContentLayoutHeaderFont").GetString("FontFamily").Replace(" ", "+"); 54 string subHeaderFont = Model.Area.Item.GetItem("ContentLayoutSubheaderFont").GetString("FontFamily").Replace(" ", "+"); 55 string contentFont = Model.Area.Item.GetItem("ContentLayoutBodyText").GetString("FontFamily").Replace(" ", "+"); 56 57 //Page IDs for use in the template 58 string firstPageId = Model.Area.FirstActivePage.ID.ToString(); 59 string areaId = Model.Area.ID.ToString(); 60 string autoCssLink = "/Files/Templates/Designs/Rapido/css/rapido/rapido_" + areaId + ".min.css"; 61 int pageId = Model.TopPage.ID; 62 string currentUserId = Model.CurrentUser.ID > 0 ? Model.CurrentUser.ID.ToString() : ""; 63 int cartPageId = GetPageIdByNavigationTag("CartPage"); 64 int miniCartFeedPageId = GetPageIdByNavigationTag("MiniCartFeed"); 65 int cartFeedPageId = GetPageIdByNavigationTag("CartOrderlinesFeed"); 66 int productsPageId = GetPageIdByNavigationTag("ProductsPage"); 67 int productSearchPageId = GetPageIdByNavigationTag("ProductSearchFeed"); 68 int productGroupsPageId = GetPageIdByNavigationTag("ProductGroupsFeed"); 69 string myProfilePageId = (Model.CurrentUser.ID <= 0) ? GetPageIdByNavigationTag("SignInProfile").ToString() : GetPageIdByNavigationTag("CustomerProfile").ToString(); 70 string myOrdersPageId = (Model.CurrentUser.ID <= 0) ? GetPageIdByNavigationTag("SignInOrders").ToString() : GetPageIdByNavigationTag("CustomerOrders").ToString(); 71 string myFavoritesPageId = (Model.CurrentUser.ID <= 0) ? GetPageIdByNavigationTag("SignInFavorites").ToString() : GetPageIdByNavigationTag("CustomerFavorites").ToString(); 72 int createAccountPageId =723;// GetPageIdByNavigationTag("CreateAccount"); 73 int signInProfilePageId = GetPageIdByNavigationTag("SignInProfile"); 74 string forgotPasswordPageId = signInProfilePageId.ToString() + "&LoginAction=Recovery"; 75 int myDashboardPageId = GetPageIdByNavigationTag("CustomerDashboard"); 76 int newsletterSignUpPageId = GetPageIdByNavigationTag("NewsletterSignUp"); 77 int createCommentPageId = GetPageIdByNavigationTag("CreateComment"); 78 int commentPageId = GetPageIdByNavigationTag("Comments"); 79 int ImpersonationPageId = GetPageIdByNavigationTag("Impersonation"); 80 81 82 string stickyTop = stickyMenu ? "top-container--sticky" : ""; 83 string pagePos = stickyMenu ? "js-page-pos" : ""; 84 string topLayout = Model.Area.Item.GetList("LayoutTop").SelectedValue; 85 string announcementBarText = Model.Area.Item.GetString("AnnouncementBarText"); 86 87 string megamenuPromotionImage = Model.Area.Item.GetFile("NavigationMegamenuPromotionImage") != null ? Model.Area.Item.GetFile("NavigationMegamenuPromotionImage").Path : ""; 88 } 89 <!DOCTYPE html> 90 91 <html> 92 <head> 93 <meta charset="utf-8" /> 94 <title>@Model.TopPage.Name</title> 95 <meta name="viewport" content="width=device-width, initial-scale=1"> 96 97 <!-- Slick Carousel --> 98 <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.min.css" /> 99 <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick-theme.min.css" /> 100 101 <!-- Favicon --> 102 <link href="@favicon" rel="icon" type="image/png"> 103 104 <script type="text/javascript" src="//script.crazyegg.com/pages/scripts/0089/8333.js" async="async"></script> 105 106 <!-- Font awesome --> 107 <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" type="text/css"> 108 109 <!-- Bootstrap --> 110 <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M" crossorigin="anonymous"> 111 <!-- Base (Default, wireframe) styles --> 112 <link rel="stylesheet" href="/Files/Templates/Designs/Rapido/css/base/base.css" type="text/css"> 113 114 <!-- Rapido Css from Website Settings --> 115 <link id="rapidoCss" rel="stylesheet" href="@autoCssLink" type="text/css"> 116 117 <!-- Ignite Css (Custom site specific styles) --> 118 <link id="igniteCss" type="text/css" href="/Files/Templates/Designs/Rapido/css/ignite/ignite.min.css" rel="stylesheet"> 119 <link id="igniteCss" type="text/css" href="/Files/Templates/Designs/Rapido/css/ignite/ignite.css" rel="stylesheet"> 120 <!-- Custom CSS (Css provided by the client) --> 121 <link type="text/css" href="/Files/Templates/Designs/Rapido/css/ignite/main.css?ver=1.22" rel="stylesheet"> 122 123 <!-- Google fonts --> 124 <link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=@navigationFont:100,200,300,400,500,600,700,800,900"> 125 <link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=@mobileNavigationFont:100,200,300,400,500,600,700,800,900"> 126 <link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=@headerFont:100,200,300,400,500,600,700,800,900"> 127 <link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=@subHeaderFont:100,200,300,400,500,600,700,800,900"> 128 <link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=@contentFont:100,200,300,400,500,600,700,800,900"> 129 <link type="text/css" href="https://fonts.googleapis.com/css?family=Muli:400,800" rel="stylesheet"> 130 131 <!-- Select2 --> 132 <link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.4/css/select2.min.css" rel="stylesheet" /> 133 <!-- Analytics code --> 134 @{ 135 String googleTrackingId = Model.Area.Item.GetString("GoogleTracking_ID").ToString(); 136 int userID = Model.CurrentUser.ID; 137 } 138 139 @if (!string.IsNullOrWhiteSpace(googleTrackingId)) 140 { 141 <script type="text/javascript"> 142 (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ 143 (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), 144 m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) 145 })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); 146 147 ga('create', '@googleTrackingId', 'auto'); 148 ga('set', 'userId', '@userID'); // Set the user ID using signed-in user_id. 149 ga('require','ecommerce','ecommerce.js'); 150 ga('send', 'pageview'); 151 </script> 152 } 153 154 <!-- Analytics code --> 155 156 <!-- Facebook Pixel Code --> 157 <script> 158 !function(f,b,e,v,n,t,s) 159 {if(f.fbq)return;n=f.fbq=function(){n.callMethod? 160 n.callMethod.apply(n,arguments):n.queue.push(arguments)}; 161 if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0'; 162 n.queue=[];t=b.createElement(e);t.async=!0; 163 t.src=v;s=b.getElementsByTagName(e)[0]; 164 s.parentNode.insertBefore(t,s)}(window, document,'script', 165 'https://connect.facebook.net/en_US/fbevents.js'); 166 fbq('init', '2362410727340021'); 167 fbq('track', 'PageView'); 168 </script> 169 <noscript> 170 <img height="1" width="1" style="display:none" 171 src="https://www.facebook.com/tr?id={your-pixel-id-goes-here}&ev=PageView&noscript=1"/> 172 </noscript> 173 <!-- End Facebook Pixel Code --> 174 175 176 <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery-confirm/3.3.2/jquery-confirm.min.css"> 177 178 <!-- Global site tag (gtag.js) - Google Ads: 657499590 --> 179 180 <script async src="https://www.googletagmanager.com/gtag/js?id=AW-657499590"></script> 181 182 <script> 183 184 window.dataLayer = window.dataLayer || []; 185 186 function gtag(){dataLayer.push(arguments);} 187 188 gtag('js', new Date()); 189 190 191 192 gtag('config', 'AW-657499590'); 193 194 </script> 195 196 </head> 197 198 <body> 199 <!-- Pop Up--> 200 <div id="burn" onclick="closeBurn()"> 201 <div id="burnPopup"> 202 <div id="burnClose" class="pull-right"> 203 <a onclick="closeBurn()"><i class="fa fa-times" aria-hidden="true"></i></a> 204 </div> 205 <div id="burnBody" class="text-center"> 206 <div id="burnTitle" class=""> 207 208 </div> 209 <div id="burnText" class=""> 210 211 </div> 212 <div id="burnButton" class=""> 213 <a class=""></a> 214 </div> 215 </div> 216 </div> 217 </div> 218 <!-- Pop Up--> 219 220 <main class="site dw-mod"> 221 @*Custom Header*@ 222 223 <div class="bg-khaki free-delivery"> 224 <div class="container py-6"> 225 <p class="m-0 text-center">@announcementBarText</p> 226 </div> 227 <span class="free-delivery-close">x</span> 228 </div> 229 230 @{ 231 bool isMobile = Pageview.Device.ToString() == "Mobile" ? true : false; 232 } 233 <header class="custom-header"> 234 235 <div class="bg-light-khaki"> 236 237 <div class="container navigation pt-0 pb-0"> 238 239 <div class="row"> 240 <div class="col-12 col-sm-12 col-md-12 col-lg-3" style="max-height:112px!important"> 241 <a class="logo" href="Default.aspx?ID=@firstPageId"> 242 <img src="/Admin/Public/GetImage.ashx?width=300&height=92&crop=1&Compression=100&image=@logoWhite" class="img-fluid" alt="logo"> 243 </a> 244 </div> 245 <div class="col-12 col-sm-12 col-md-12 col-lg-9 text-right navigation-right"> 246 <div> 247 <ul class="header-buttons clearfix pt-4 mb-4"> 248 <li class="d-inline-block px-5"> 249 <div class="menu__link is-dropdown is-dropdown--no-icon search-button"> 250 <i class="fa fa-search"></i> 251 <div class="menu menu--dropdown u-w340px top-micro-search"> 252 <div class="typeahead js-typeahead" data-page-size="10" id="ProductSearchBar" data-search-page-id="@productSearchPageId" data-result-page-id="@productsPageId" data-groups-page-id="@productGroupsPageId"> 253 <div class="typeahead-search-field"> 254 <input type="text" class="u-no-margin u-full-width js-typeahead-search-field" placeholder="@searchPlaceholder"> 255 <ul class="dropdown dropdown--absolute-position u-full-width js-ajax-container js-typeahead-search-content" id="ProductSearchBarContent" data-template="SearchContentTemplate" data-no-result-template="SearchEmpty" data-json-feed="/Default.aspx?ID=@productSearchPageId&LayoutTemplate=Json.cshtml&DisableStatistics=True&feedType=productsOnly" data-init-onload="false"></ul> 256 </div> 257 </div> 258 </div> 259 </div> 260 </li> 261 @if (loggedIn == "true" && isMobile==false) 262 { 263 <li class="d-inline-block px-5 "> 264 <a href="/Default.aspx?ID=@myFavoritesPageId" class="menu__link "> 265 <i class="fa fa-heart-o"></i> 266 </a> 267 </li> 268 } 269 270 <li class=" d-inline-block px-5"> 271 <div class="mini-cart "> 272 @if(isMobile){ 273 <a href="javascript:void(0)" class="menu__link dw-mod js-mini-cart-button" onmouseover="Cart.UpdateMiniCart(event, 'miniCart', '/Default.aspx?ID=@miniCartFeedPageId&feedType=MiniCart')" style="cursor:pointer;color:white;"> 274 <i class="fa fa-shopping-bag"></i> 275 <div class="mini-cart__counter mini-cart__counter--inline "> 276 <div class="js-ajax-container 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"> 277 <div class="js-mini-cart-counter-content"> 278 @cartProductsCount 279 </div> 280 </div> 281 </div> 282 </a> 283 }else{ 284 if(loggedIn == "true") 285 { 286 <a href="/Default.aspx?ID=@cartPageId&Purge=True" class="menu__link dw-mod js-mini-cart-button" onmouseover="Cart.UpdateMiniCart(event, 'miniCart', '/Default.aspx?ID=@miniCartFeedPageId&feedType=MiniCart')" style="cursor:pointer"> 287 <i class="fa fa-shopping-bag"></i> 288 <div class="mini-cart__counter mini-cart__counter--inline "> 289 <div class="js-ajax-container 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"> 290 <div class="js-mini-cart-counter-content"> 291 @cartProductsCount 292 </div> 293 </div> 294 </div> 295 </a> 296 } 297 else 298 { 299 <a href="/Default.aspx?ID=@signInProfilePageId&Purge=True" class="menu__link dw-mod js-mini-cart-button" onmouseover="Cart.UpdateMiniCart(event, 'miniCart', '/Default.aspx?ID=@miniCartFeedPageId&feedType=MiniCart')" style="cursor:pointer;"> 300 <i class="fa fa-shopping-bag"></i> 301 <div class="mini-cart__counter mini-cart__counter--inline "> 302 <div class="js-ajax-container 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"> 303 <div class="js-mini-cart-counter-content"> 304 @cartProductsCount 305 </div> 306 </div> 307 </div> 308 </a> 309 } 310 } 311 <div class="mini-cart-dropdown js-ajax-container 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> 312 </div> 313 </li> 314 315 <li class="d-inline-block px-5" style="padding-right: 0px !important;"> 316 <div class="header-menu__link is-dropdown is-dropdown--no-icon"> 317 318 @if (loggedIn == "false") 319 320 { 321 <a href="/default.aspx?ID=@signInProfilePageId" class="u-color-inherit"><i class="fa fa-user u-color-inherit"></i> <small>LOGIN</small></a> 322 323 324 } 325 else 326 { 327 <a href="/default.aspx?ID=@myProfilePageId" class="u-color-inherit"><i class="fa fa-user u-color-inherit"></i> @Model.CurrentUser.Name </a> 328 329 } 330 331 <div class="menu menu--dropdown sign-in-dropdown u-w160px"> 332 <div class="menu-dropdown__item"> 333 <ul class="list list--clean"> 334 @if (loggedIn == "true") 335 { 336 <li class="list__seperator"></li> 337 <li> 338 <a href="/Admin/Public/ExtranetLogoff.aspx?ID=12" class="list__link">@Translate("Sign out")</a> 339 </li> 340 }else{ 341 <li class="list__seperator"></li> 342 <li> 343 <a href="/Default.aspx?id=@createAccountPageId" class="list__link">@Translate("Register")</a> 344 </li> 345 } 346 </ul> 347 </div> 348 </div> 349 </div> 350 </li> 351 </ul> 352 <nav class="navbar navbar-expand-lg navbar-light p-0"> 353 354 <button aria-controls="menu" aria-expanded="false" aria-label="Toggle navigation" class="navbar-toggler ml-auto" data-target="#menu" data-toggle="collapse" type="button"><span class="navbar-toggler-icon"><i class="fa fa-bars" aria-hidden="true"></i></span></button> 355 <div class="collapse navbar-collapse custom-nav" id="menu"> 356 357 358 @if (!megaMenu) 359 { 360 @RenderNavigation(new 361 { 362 id = "topnavigation", 363 cssclass = "menu dw-mod dwnavigation", 364 startLevel = 1, 365 endlevel = 3, 366 expandmode = "All", 367 template = "BaseMenuWithDropdown.xslt" 368 }); 369 } 370 else 371 { 372 @RenderNavigation(new 373 { 374 id = "topnavigation", 375 cssclass = "menu dw-mod dwnavigation", 376 startLevel = 1, 377 endlevel = 1, 378 promotionImage = megamenuPromotionImage, 379 promotionLink = Model.Area.Item.GetString("NavigationMegamenuPromotionLink"), 380 template = "BaseMegaMenu.xslt" 381 }); 382 } 383 384 385 </div> 386 </nav> 387 </div> 388 </div> 389 </div> 390 <div class="clearfix"></div> 391 392 </div> 393 </header> 394 395 @* End Custom Header*@ 396 397 <!-- Floating mini cart --> 398 @if (!stickyMenu && pageId == productsPageId) 399 { 400 <div class="floating-mini-cart u-hidden" id="FloatingMiniCart"> 401 <div class="mini-cart"> 402 if(loggedIn =="true") 403 { 404 <a href="/Default.aspx?ID=@cartPageId" class="menu-tools__link menu__link--condensed dw-mod js-mini-cart-button" onclick="Cart.UpdateMiniCart(event, 'SecondaryMiniCart', '/Default.aspx?ID=@miniCartFeedPageId&feedType=MiniCart')"> 405 <i class="fa fa-shopping-cart fa-4x"></i> 406 <div class="mini-cart__counter mini-cart__counter--lg dw-mod"> 407 <div class="js-ajax-container 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"> 408 <div class="js-mini-cart-counter-content"> 409 @cartProductsCount 410 </div> 411 </div> 412 </div> 413 </a> 414 } 415 else 416 { 417 <a href="/Default.aspx?ID=@signInProfilePageId" class="menu-tools__link menu__link--condensed dw-mod js-mini-cart-button" onclick="Cart.UpdateMiniCart(event, 'SecondaryMiniCart', '/Default.aspx?ID=@miniCartFeedPageId&feedType=MiniCart')"> 418 <i class="fa fa-shopping-cart fa-4x"></i> 419 <div class="mini-cart__counter mini-cart__counter--lg dw-mod"> 420 <div class="js-ajax-container 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"> 421 <div class="js-mini-cart-counter-content"> 422 @cartProductsCount 423 </div> 424 </div> 425 </div> 426 </a> 427 } 428 <div class="mini-cart-dropdown js-ajax-container js-mini-cart" id="SecondaryMiniCart" data-template="MiniCartContent" data-cart-id="@cartFeedPageId" data-json-feed="/Default.aspx?ID=@miniCartFeedPageId&feedType=MiniCart" data-init-onload="false"></div> 429 </div> 430 </div> 431 } 432 433 <!-- Render the content --> 434 <div id="Page" class="page @pagePos"> 435 <section class="center-container content-container dw-mod" id="content"> 436 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 437 438 439 @if (Model.PropertyItem.GetBoolean("ShowBreadcrumb")) { 440 <div class="grid__col-12"> 441 @RenderNavigation(new 442 { 443 id = "breadcrumb", 444 template = "breadcrumb.xslt" 445 }) 446 </div> 447 } 448 449 450 <div class="grid"> 451 @if (Model.PropertyItem.GetBoolean("LeftMenu")) 452 { 453 <nav class="grid__col-md-3 grid__col-sm-12 grid__col-xs-12"> 454 @RenderNavigation(new 455 { 456 id = "leftnav", 457 cssclass = "menu menu--left dwnavigation", 458 expandmode = "All", 459 template = "LeftNavigation.xslt" 460 }) 461 </nav> 462 } 463 <div class="grid__col-auto grid__col--bleed"> 464 <div class="grid"> 465 466 @Model.Placeholder("dwcontent", "content", "default:true;sort:1") 467 468 469 </div> 470 </div> 471 </div> 472 </section> 473 </div> 474 </main> 475 476 <!-- Footer section --> 477 @* 478 <footer class="footer dw-mod"> 479 <div class="center-container dw-mod"> 480 <div class="grid"> 481 @if (!String.IsNullOrEmpty(footerColumnOneContent)) 482 { 483 <div class="grid__col-md-auto"> 484 <h4 class="footer__heading">@Translate("Contact", "Contact")</h4> 485 @footerColumnOneContent 486 </div> 487 } 488 @if (!String.IsNullOrEmpty(footerColumnTwoContent)) 489 { 490 <div class="grid__col-md-auto"> 491 @footerColumnTwoContent 492 </div> 493 } 494 @if (Model.Area.Item.GetBoolean("FooterNewsletterSignUp")) 495 { 496 <div class="grid__col-md-auto"> 497 <h4 class="footer__heading">@Translate("Mailing list", "Mailing list")</h4> 498 <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> 499 <form class="form" name="NewsletterRedirect" action='/Default.aspx' method="get" enctype="multipart/form-data"> 500 <input name="ID" id="ID" value="@newsletterSignUpPageId" type="hidden"/> 501 <div class="form__field-combi"> 502 <input name="NewsletterEmail" id="NewsletterEmail" type="text" placeholder='@Translate("Your email address", "Your email address")' /> 503 <input class="btn btn--primary dw-mod" type="submit" id="Submitter" value='@Translate("Go", "Go")' /> 504 </div> 505 </form> 506 </div> 507 } 508 @if (Model.Area.Item.GetItems("FooterSocialLinks").Count > 0) 509 { 510 <div class="grid__col-md-auto"> 511 <h4 class="footer__heading">@Translate("Social links", "Social links")</h4> 512 513 <div class="collection"> 514 @foreach (var socialitem in Model.Area.Item.GetItems("FooterSocialLinks")) 515 { 516 //Fields.FirstOrDefault(x => x.SystemName == "Icon").GetString() 517 var socialIcon = socialitem.GetValue("Icon") as Dynamicweb.Frontend.ListViewModel; 518 string socialIconClass = socialIcon.SelectedValue; 519 string socialIconTitle = socialIcon.SelectedName; 520 string socialLink = socialitem.GetString("Link"); 521 522 <a href="@socialLink" title="@socialIconTitle"><i class="fa @socialIconClass fa-2x u-color-light"></i></a> 523 } 524 </div> 525 </div> 526 } 527 <div class="grid__col-12 grid--align-center"> 528 <p>@Model.Area.Item.GetString("FooterCopyrightText")</p> 529 </div> 530 </div> 531 </div> 532 </footer> 533 *@ 534 535 536 537 <footer class="bg-khaki pt-4 mt-5"> 538 <div class="container"> 539 <div class="row"> 540 <div class="col-12 col-sm-12 col-md-12 col-lg-4 border border-light border-top-0 border-left-0 border-bottom-0"> 541 542 <h5 class="mb-3" style="color:white;">About TAF</h5> 543 544 <ul class="list-unstyled"> 545 546 @foreach (var aboutitem in Model.Area.Item.GetItems("About_Us_Links")) 547 { 548 549 string footerLink = aboutitem.GetString("Link"); 550 string footerLinkText = aboutitem.GetString("Link_Text"); 551 <li class="mb-2"><a href="@footerLink" class="text-white" style="color: white !important;">@footerLinkText</a></li> 552 } 553 554 555 </ul> 556 557 <h5 class="mt-4 mb-3" style="color:white;">Connect with Us</h5> 558 <ul class="list-unstyled"> 559 @foreach (var socialitem in Model.Area.Item.GetItems("FooterSocialLinks")) 560 { 561 //Fields.FirstOrDefault(x => x.SystemName == "Icon").GetString() 562 var socialIcon = socialitem.GetValue("Icon") as Dynamicweb.Frontend.ListViewModel; 563 string socialIconClass = socialIcon.SelectedValue; 564 string socialIconTitle = socialIcon.SelectedName; 565 string socialLink = socialitem.GetString("Link"); 566 string socialText = socialitem.GetString("Text"); 567 568 569 <li class="d-lg-table-cell pr-5"><a href="@socialLink" class="text-white"><i class="fa @socialIconClass"></i> <small>@socialText</small></a></li> 570 571 } 572 573 574 </ul> 575 </div> 576 <div class="col-12 col-sm-12 col-md-12 col-lg-4 pl-5 border border-light border-top-0 border-left-0 border-bottom-0"> 577 <h5 class="mb-3" style="color:white;">Information</h5> 578 579 <ul class="list-unstyled"> 580 @foreach (var informationitem in Model.Area.Item.GetItems("InformationLinks")) 581 { 582 583 string footerLink = informationitem.GetString("Link"); 584 string footerLinkText = informationitem.GetString("Link_Text"); 585 <li class="mb-2"><a href="@footerLink" class="text-white">@footerLinkText</a></li> 586 } 587 588 </ul> 589 590 591 </div> 592 <div class="col-12 col-sm-12 col-md-12 col-lg-4 pl-5"> 593 <h5 class="mb-3" style="color:white;">Our Brands</h5> 594 <ul class="list-unstyled"> 595 @foreach (var informationitem in Model.Area.Item.GetItems("Our_BrandsLinks")) 596 { 597 598 string footerLink = informationitem.GetString("Link"); 599 string footerLinkText = informationitem.GetString("Link_Text"); 600 <li class="mb-2"><a href="@footerLink" class="text-white">@footerLinkText</a></li> 601 } 602 603 604 </ul> 605 <h5 class="mt-4 mb-3" style="color:white;">Keep in touch with us</h5> 606 <form class="form" name="NewsletterRedirect" action='/Default.aspx' method="get" enctype="multipart/form-data"> 607 <input name="ID" id="ID" value="@newsletterSignUpPageId" type="hidden"/> 608 <div class="form__field-combi"> 609 <input name="NewsletterEmail" id="NewsletterEmail" type="text" placeholder='@Translate("Your email address", "Your email address")' /> 610 <input class="btn btn--primary dw-mod" type="submit" id="Submitter" value="JOIN" /> 611 </div> 612 </form> 613 </div> 614 </div> 615 </div> 616 <div class="bg-black mt-4"> 617 <div class="container py-3"> 618 <p class="text-center mb-0">@Model.Area.Item.GetString("FooterCopyrightText")</p> 619 </div> 620 </div> 621 </footer> 622 <!--Footer section end --> 623 @* Wireframe mode *@ 624 @if (wireframeMode == "True" && Model.CurrentUser.ID > 0) 625 { 626 <input type="checkbox" class="panel-trigger" id="WireframeToolsTrigger" /> 627 <aside id="WireframeTools" class="panel panel--right wireframe-tools"> 628 <label for="WireframeToolsTrigger" id="wireframeToolsToggle" class="panel-trigger-btn wireframe-tools-toggle"></label> 629 <div id="WireframeToolsContent" class="panel__content"> 630 <div id="WireframeToolsHelpText" class="wireframe-tools__info"> 631 @Translate("Click on a selectable element to add a comment","Click on a selectable element to add a comment") 632 </div> 633 <div class="js-ajax-container u-visually-hidden" id="CreateCommentForm" data-template="CreateCommentFormTemplate" data-json-feed="/Default.aspx?ID=@createCommentPageId&LayoutTemplate=Json.cshtml&DisableStatistics=True&feedType=Comments"></div> 634 <div class="js-ajax-container" id="Comments" data-template="CommentListTemplate" data-json-feed="/Default.aspx?ID=@commentPageId&LayoutTemplate=Json.cshtml&DisableStatistics=True&Comment_PageId=@pageId" data-init-onload="false"></div> 635 </div> 636 </aside> 637 638 <script id="CreateCommentFormTemplate" type="text/x-template"> 639 <div> 640 {{formBegin}} 641 <label>@Translate("Comment","Comment")</label> 642 <textarea name="Comment" class="comment-textarea u-full-width"></textarea> 643 <input type="hidden" id="TargetElement" name="TargetElement" value="" /> 644 <input type="hidden" name="Comment_PageId" value="@pageId" /> 645 <input type="hidden" name="Comment_UserId" value="@currentUserId" /> 646 <input type="submit" class="btn btn--primary btn--full dw-mod" value="Save changes"> 647 {{formEnd}} 648 </div> 649 </script> 650 651 <script id="CommentListTemplate" type="text/x-template"> 652 <div id="Comment" class="comment" data-template="CommentTemplate"></div> 653 </script> 654 655 <script id="CommentTemplate" type="text/x-template"> 656 <div> 657 <div id="Comment_{{count}}" class="js-comment"><span class="comment__number">{{count}}</span> {{comment}}</div> 658 </div> 659 </script> 660 } 661 662 663 @* Templates for Typeahead *@ 664 <script id="SearchGroupsTemplate" type="text/x-template"> 665 <li class="dropdown__item" onclick="Search.UpdateGroupSelection(this)" data-group-id="{{id}}">{{name}}</li> 666 </script> 667 668 <script id="SearchContentTemplate" type="text/x-template"> 669 <li class="dropdown__item dropdown__item--seperator"> 670 <a href="{{link}}" class="js-typeahead-link u-color-inherit u-pull--left"> 671 <div class="u-margin-right u-pull--left {{noimage}} u-hidden-xs u-hidden-xxs"><img src="/Admin/Public/GetImage.ashx?width=45&height=38&crop=1&Compression=75&image={{image}}" alt="{{name}}"></div> 672 <div class="u-pull--left"> 673 <div class="u-bold u-max-w220px u-truncate-text js-typeahead-name">{{name}}</div> 674 <div>{{price}}</div> 675 </div> 676 </a> 677 <div class="u-margin-left u-pull--right"> 678 <button class="btn btn--primary btn--condensed u-no-margin dw-mod {{hideBuyOptions}} js-ignore-click-outside" onclick="Cart.AddToCart(event, '{{id}}', '1')"><i class="fa fa-shopping-cart js-ignore-click-outside"></i></button> 679 <a href="{{link}}" class="btn btn--secondary btn--condensed u-no-margin dw-mod {{hideViewMore}} js-ignore-click-outside">@Translate("View","View")</a> 680 </div> 681 </li> 682 </script> 683 684 <script id="SearchMore" type="text/x-template"> 685 <li class="dropdown__item dropdown__item--not-selectable"> 686 <a href="/Default.aspx?ID=@productsPageId&Search={{searchParameter}}&GroupID={{groupId}}" class="btn btn--primary btn--full u-no-margin dw-mod js-typeahead-link"> 687 @Translate("View all","View all") 688 </a> 689 </li> 690 </script> 691 692 <script id="SearchEmpty" type="text/x-template"> 693 <li class="u-margin u-padding-left"> 694 @Translate("Your search gave 0 results","Your search gave 0 results") 695 </li> 696 </script> 697 698 @* Templates for the mini cart *@ 699 <script id="MiniCartCounterContent" type="text/x-template"> 700 <div class="js-mini-cart-counter-content"> 701 {{numberofproducts}} 702 </div> 703 </script> 704 705 <script id="MiniCartContent" type="text/x-template"> 706 <div class="mini-cart-dropdown__inner {{isempty}}"> 707 <h4 class="u-ta-center">@Translate("Shopping cart","Shopping cart")</h4> 708 <div class="mini-cart-dropdown__body"> 709 <table class="table mini-cart-table"> 710 <thead> 711 <tr> 712 <td>&nbsp;</td> 713 <td>@Translate("Product")</td> 714 <td class="u-ta-right">@Translate("Qty","Qty")</td> 715 <td class="u-ta-right">@Translate("Price","Price")</td> 716 </tr> 717 </thead> 718 719 <tbody id="MiniCartOrderLines"></tbody> 720 721 <tr> 722 <td><i class="fa fa-credit-card"></i></td> 723 <td>{{paymentmethod}}</td> 724 <td colspan="2" class="u-ta-right">$0.00</td> 725 </tr> 726 <tr> 727 <td><i class="fa fa-truck"></i></td> 728 <td>{{shippingmethod}}</td> 729 <td colspan="2" class="u-ta-right">${{shippingfee}}</td> 730 </tr> 731 <tr class="mini-cart-totals"> 732 <td colspan="2">@Translate("Total","Total")</td> 733 <td class="u-ta-right">{{numberofproducts}}</td> 734 <td class="u-ta-right">{{totalprice}}</td> 735 </tr> 736 </table> 737 </div> 738 @if(loggedIn =="true") 739 { 740 <table class="table mini-cart-table"> 741 <tr class="mini-cart-orderlines__footer"> 742 <td colspan="2"><button type="button" class="btn btn--secondary u-pull--left u-no-margin dw-mod btn--sm" onclick="EmptyCart();">@Translate("Empty cart","Empty cart")</button></td> 743 <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","Proceed to checkout")</a></td> 744 </tr> 745 </table> 746 } 747 else 748 { 749 <table class="table mini-cart-table"> 750 <tr class="mini-cart-orderlines__footer"> 751 <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","Empty cart")</button></td> 752 <td colspan="2" class="u-ta-right"><a onclick="showPopup()" class="btn btn--primary u-pull--right u-no-margin dw-mod btn--sm">@Translate("Login","Login")</a></td> 753 </tr> 754 </table> 755 } 756 757 </div> 758 </script> 759 760 <script id="MiniCartOrderline" type="text/x-template"> 761 <tr class="{{isempty}}"> 762 <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> 763 <td> 764 <a href="{{link}}" class="mini-cart-orderlines__name">{{name}}</a> 765 <a href="{{link}}" class="mini-cart-orderlines__name">{{variantname}}</a> 766 </td> 767 <td class="u-ta-right">{{quantity}}</td> 768 <td class="u-ta-right">{{totalprice}}</td> 769 </tr> 770 </script> 771 772 <script id="MiniCartOrderlineDiscount" type="text/x-template"> 773 <tr class="table__row--no-border {{isempty}}"> 774 <td>&nbsp;</td> 775 <td><div class="mini-cart-orderlines__name">{{name}}</div></td> 776 <td class="u-ta-right">{{quantity}}</td> 777 <td class="u-ta-right">{{totalprice}}</td> 778 </tr> 779 </script> 780 781 <!-- Javascript --> 782 <script src="/Files/Templates/Designs/Rapido/js/Buttons.js"></script> 783 <script src="/Files/Templates/Designs/Rapido/js/Facets.js"></script> 784 <script src="/Files/Templates/Designs/Rapido/js/Cart.js"></script> 785 <script src="/Files/Templates/Designs/Rapido/js/Search.js"></script> 786 <script src="/Files/Templates/Designs/Rapido/js/DynamoConfig.js"></script> 787 <script src="/Files/Templates/Designs/Rapido/js/Dynamo.js"></script> 788 <script src="/Files/Templates/Designs/Rapido/js/Variants.js"></script> 789 <script src="/Files/Templates/Designs/Rapido/js/ImageList.js"></script> 790 <script src="/Files/Templates/Designs/Rapido/js/LoadMore.js"></script> 791 <script src="/Files/Templates/Designs/Rapido/js/_RememberState.js"></script> 792 <script src="/Files/Templates/Designs/Rapido/js/Scroll.js"></script> 793 <script src="/Files/Templates/Designs/Rapido/js/Wireframe.js"></script> 794 <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> 795 796 <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js" integrity="sha384-b/U6ypiBEHpOf/4+1nzFpr53nxSS+GLCkfwBdFNTxtclqqenISfwAzpKaMNFNmj4" crossorigin="anonymous"></script> 797 798 <script> 799 Wireframe.Init(@wireframeMode.ToLower(), "productList", @loggedIn); 800 function showPopup() 801 { 802 var answer = confirm("Please login or register to place an order"); 803 804 if( answer == true ){ 805 window.location.replace("/default.aspx?id=@signInProfilePageId"); 806 } 807 } 808 function EmptyCart() 809 { 810 var currentlink=window.location.href; 811 console.log("Current Link "+currentlink); 812 if(currentlink.includes("Purge=true")) 813 { 814 currentlink.split('?')[0]+"?cartcmd=emptycart"; 815 } 816 else 817 { 818 window.location.href=currentlink+"?cartcmd=emptycart"; 819 } 820 } 821 // Pop Up 822 function closeBurn(){ 823 jQuery("#burn").hide(); 824 } 825 826 $(document).ready(function(){ 827 var screenHeight = 0; 828 screenHeight = screen.height; 829 var burnPopup = $('#burnPopup'); 830 if( screenHeight < 321 ){ 831 $(burnPopup).css('height','70%'); 832 } 833 }); 834 </script> 835 <!-- Slick Carousel --> 836 <script src="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.min.js"></script> 837 838 <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js" integrity="sha384-h0AbiXch4ZDo7tp9hKZ4TsHbi047NrKGLO3SEJAg45jXxnGIfYzk4Si90RDIqNm1" crossorigin="anonymous"></script> 839 840 <script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.4/js/select2.min.js"></script> 841 <script src="/Files/Templates/Designs/Rapido/js/Custom.js"></script> 842 <script src="https://github.com/janl/mustache.js/raw/master/mustache.js"></script> 843 <script src="/Files/Templates/Designs/Rapido/js/masonry.pkgd.min.js"></script> 844 <script src="/Files/Templates/Designs/Rapido/js/main.js"></script> 845 846 <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-confirm/3.3.2/jquery-confirm.min.js"></script> 847 848 </body> 849 </html> 850 851