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_6f51a1ef5c844c75974a788f94e26b10.Execute() in F:\DWWEBSITE\TAFWEB\Solutions\Files\Templates\Designs\Rapido\_parsed\Page.parsed.cshtml:line 422
   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 179 </head> 180 181 <body> 182 <!-- Pop Up--> 183 <div id="burn" onclick="closeBurn()"> 184 <div id="burnPopup"> 185 <div id="burnClose" class="pull-right"> 186 <a onclick="closeBurn()"><i class="fa fa-times" aria-hidden="true"></i></a> 187 </div> 188 <div id="burnBody" class="text-center"> 189 <div id="burnTitle" class=""> 190 191 </div> 192 <div id="burnText" class=""> 193 194 </div> 195 <div id="burnButton" class=""> 196 <a class=""></a> 197 </div> 198 </div> 199 </div> 200 </div> 201 <!-- Pop Up--> 202 203 <main class="site dw-mod"> 204 @*Custom Header*@ 205 206 <div class="bg-khaki free-delivery"> 207 <div class="container py-6"> 208 <p class="m-0 text-center">@announcementBarText</p> 209 </div> 210 <span class="free-delivery-close">x</span> 211 </div> 212 213 @{ 214 bool isMobile = Pageview.Device.ToString() == "Mobile" ? true : false; 215 } 216 <header class="custom-header"> 217 218 <div class="bg-light-khaki"> 219 220 <div class="container navigation pt-0 pb-0"> 221 222 <div class="row"> 223 <div class="col-12 col-sm-12 col-md-12 col-lg-3" style="max-height:112px!important"> 224 <a class="logo" href="Default.aspx?ID=@firstPageId"> 225 <img src="/Admin/Public/GetImage.ashx?width=300&height=92&crop=1&Compression=100&image=@logoWhite" class="img-fluid" alt="logo"> 226 </a> 227 </div> 228 <div class="col-12 col-sm-12 col-md-12 col-lg-9 text-right navigation-right"> 229 <div> 230 <ul class="header-buttons clearfix pt-4 mb-4"> 231 <li class="d-inline-block px-5"> 232 <div class="menu__link is-dropdown is-dropdown--no-icon search-button"> 233 <i class="fa fa-search"></i> 234 <div class="menu menu--dropdown u-w340px top-micro-search"> 235 <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"> 236 <div class="typeahead-search-field"> 237 <input type="text" class="u-no-margin u-full-width js-typeahead-search-field" placeholder="@searchPlaceholder"> 238 <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> 239 </div> 240 </div> 241 </div> 242 </div> 243 </li> 244 @if (loggedIn == "true" && isMobile==false) 245 { 246 <li class="d-inline-block px-5 "> 247 <a href="/Default.aspx?ID=@myFavoritesPageId" class="menu__link "> 248 <i class="fa fa-heart-o"></i> 249 </a> 250 </li> 251 } 252 253 <li class=" d-inline-block px-5"> 254 <div class="mini-cart "> 255 @if(isMobile){ 256 <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;"> 257 <i class="fa fa-shopping-bag"></i> 258 <div class="mini-cart__counter mini-cart__counter--inline "> 259 <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"> 260 <div class="js-mini-cart-counter-content"> 261 @cartProductsCount 262 </div> 263 </div> 264 </div> 265 </a> 266 }else{ 267 if(loggedIn == "true") 268 { 269 <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"> 270 <i class="fa fa-shopping-bag"></i> 271 <div class="mini-cart__counter mini-cart__counter--inline "> 272 <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"> 273 <div class="js-mini-cart-counter-content"> 274 @cartProductsCount 275 </div> 276 </div> 277 </div> 278 </a> 279 } 280 else 281 { 282 <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;"> 283 <i class="fa fa-shopping-bag"></i> 284 <div class="mini-cart__counter mini-cart__counter--inline "> 285 <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"> 286 <div class="js-mini-cart-counter-content"> 287 @cartProductsCount 288 </div> 289 </div> 290 </div> 291 </a> 292 } 293 } 294 <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> 295 </div> 296 </li> 297 298 <li class="d-inline-block px-5" style="padding-right: 0px !important;"> 299 <div class="header-menu__link is-dropdown is-dropdown--no-icon"> 300 301 @if (loggedIn == "false") 302 303 { 304 <a href="/default.aspx?ID=@signInProfilePageId" class="u-color-inherit"><i class="fa fa-user u-color-inherit"></i> <small>LOGIN</small></a> 305 306 307 } 308 else 309 { 310 <a href="/default.aspx?ID=@myProfilePageId" class="u-color-inherit"><i class="fa fa-user u-color-inherit"></i> @Model.CurrentUser.Name </a> 311 312 } 313 314 <div class="menu menu--dropdown sign-in-dropdown u-w160px"> 315 <div class="menu-dropdown__item"> 316 <ul class="list list--clean"> 317 @if (loggedIn == "true") 318 { 319 <li class="list__seperator"></li> 320 <li> 321 <a href="/Admin/Public/ExtranetLogoff.aspx?ID=12" class="list__link">@Translate("Sign out")</a> 322 </li> 323 }else{ 324 <li class="list__seperator"></li> 325 <li> 326 <a href="/Default.aspx?id=@createAccountPageId" class="list__link">@Translate("Register")</a> 327 </li> 328 } 329 </ul> 330 </div> 331 </div> 332 </div> 333 </li> 334 </ul> 335 <nav class="navbar navbar-expand-lg navbar-light p-0"> 336 337 <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> 338 <div class="collapse navbar-collapse custom-nav" id="menu"> 339 340 341 @if (!megaMenu) 342 { 343 @RenderNavigation(new 344 { 345 id = "topnavigation", 346 cssclass = "menu dw-mod dwnavigation", 347 startLevel = 1, 348 endlevel = 3, 349 expandmode = "All", 350 template = "BaseMenuWithDropdown.xslt" 351 }); 352 } 353 else 354 { 355 @RenderNavigation(new 356 { 357 id = "topnavigation", 358 cssclass = "menu dw-mod dwnavigation", 359 startLevel = 1, 360 endlevel = 1, 361 promotionImage = megamenuPromotionImage, 362 promotionLink = Model.Area.Item.GetString("NavigationMegamenuPromotionLink"), 363 template = "BaseMegaMenu.xslt" 364 }); 365 } 366 367 368 </div> 369 </nav> 370 </div> 371 </div> 372 </div> 373 <div class="clearfix"></div> 374 375 </div> 376 </header> 377 378 @* End Custom Header*@ 379 380 <!-- Floating mini cart --> 381 @if (!stickyMenu && pageId == productsPageId) 382 { 383 <div class="floating-mini-cart u-hidden" id="FloatingMiniCart"> 384 <div class="mini-cart"> 385 if(loggedIn =="true") 386 { 387 <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')"> 388 <i class="fa fa-shopping-cart fa-4x"></i> 389 <div class="mini-cart__counter mini-cart__counter--lg dw-mod"> 390 <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"> 391 <div class="js-mini-cart-counter-content"> 392 @cartProductsCount 393 </div> 394 </div> 395 </div> 396 </a> 397 } 398 else 399 { 400 <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')"> 401 <i class="fa fa-shopping-cart fa-4x"></i> 402 <div class="mini-cart__counter mini-cart__counter--lg dw-mod"> 403 <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"> 404 <div class="js-mini-cart-counter-content"> 405 @cartProductsCount 406 </div> 407 </div> 408 </div> 409 </a> 410 } 411 <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> 412 </div> 413 </div> 414 } 415 416 <!-- Render the content --> 417 <div id="Page" class="page @pagePos"> 418 <section class="center-container content-container dw-mod" id="content"> 419 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 420 421 422 @if (Model.PropertyItem.GetBoolean("ShowBreadcrumb")) { 423 <div class="grid__col-12"> 424 @RenderNavigation(new 425 { 426 id = "breadcrumb", 427 template = "breadcrumb.xslt" 428 }) 429 </div> 430 } 431 432 433 <div class="grid"> 434 @if (Model.PropertyItem.GetBoolean("LeftMenu")) 435 { 436 <nav class="grid__col-md-3 grid__col-sm-12 grid__col-xs-12"> 437 @RenderNavigation(new 438 { 439 id = "leftnav", 440 cssclass = "menu menu--left dwnavigation", 441 expandmode = "All", 442 template = "LeftNavigation.xslt" 443 }) 444 </nav> 445 } 446 <div class="grid__col-auto grid__col--bleed"> 447 <div class="grid"> 448 449 @Model.Placeholder("dwcontent", "content", "default:true;sort:1") 450 451 452 </div> 453 </div> 454 </div> 455 </section> 456 </div> 457 </main> 458 459 <!-- Footer section --> 460 @* 461 <footer class="footer dw-mod"> 462 <div class="center-container dw-mod"> 463 <div class="grid"> 464 @if (!String.IsNullOrEmpty(footerColumnOneContent)) 465 { 466 <div class="grid__col-md-auto"> 467 <h4 class="footer__heading">@Translate("Contact", "Contact")</h4> 468 @footerColumnOneContent 469 </div> 470 } 471 @if (!String.IsNullOrEmpty(footerColumnTwoContent)) 472 { 473 <div class="grid__col-md-auto"> 474 @footerColumnTwoContent 475 </div> 476 } 477 @if (Model.Area.Item.GetBoolean("FooterNewsletterSignUp")) 478 { 479 <div class="grid__col-md-auto"> 480 <h4 class="footer__heading">@Translate("Mailing list", "Mailing list")</h4> 481 <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> 482 <form class="form" name="NewsletterRedirect" action='/Default.aspx' method="get" enctype="multipart/form-data"> 483 <input name="ID" id="ID" value="@newsletterSignUpPageId" type="hidden"/> 484 <div class="form__field-combi"> 485 <input name="NewsletterEmail" id="NewsletterEmail" type="text" placeholder='@Translate("Your email address", "Your email address")' /> 486 <input class="btn btn--primary dw-mod" type="submit" id="Submitter" value='@Translate("Go", "Go")' /> 487 </div> 488 </form> 489 </div> 490 } 491 @if (Model.Area.Item.GetItems("FooterSocialLinks").Count > 0) 492 { 493 <div class="grid__col-md-auto"> 494 <h4 class="footer__heading">@Translate("Social links", "Social links")</h4> 495 496 <div class="collection"> 497 @foreach (var socialitem in Model.Area.Item.GetItems("FooterSocialLinks")) 498 { 499 //Fields.FirstOrDefault(x => x.SystemName == "Icon").GetString() 500 var socialIcon = socialitem.GetValue("Icon") as Dynamicweb.Frontend.ListViewModel; 501 string socialIconClass = socialIcon.SelectedValue; 502 string socialIconTitle = socialIcon.SelectedName; 503 string socialLink = socialitem.GetString("Link"); 504 505 <a href="@socialLink" title="@socialIconTitle"><i class="fa @socialIconClass fa-2x u-color-light"></i></a> 506 } 507 </div> 508 </div> 509 } 510 <div class="grid__col-12 grid--align-center"> 511 <p>@Model.Area.Item.GetString("FooterCopyrightText")</p> 512 </div> 513 </div> 514 </div> 515 </footer> 516 *@ 517 518 519 520 <footer class="bg-khaki pt-4 mt-5"> 521 <div class="container"> 522 <div class="row"> 523 <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"> 524 525 <h5 class="mb-3" style="color:white;">About TAF</h5> 526 527 <ul class="list-unstyled"> 528 529 @foreach (var aboutitem in Model.Area.Item.GetItems("About_Us_Links")) 530 { 531 532 string footerLink = aboutitem.GetString("Link"); 533 string footerLinkText = aboutitem.GetString("Link_Text"); 534 <li class="mb-2"><a href="@footerLink" class="text-white" style="color: white !important;">@footerLinkText</a></li> 535 } 536 537 538 </ul> 539 540 <h5 class="mt-4 mb-3" style="color:white;">Connect with Us</h5> 541 <ul class="list-unstyled"> 542 @foreach (var socialitem in Model.Area.Item.GetItems("FooterSocialLinks")) 543 { 544 //Fields.FirstOrDefault(x => x.SystemName == "Icon").GetString() 545 var socialIcon = socialitem.GetValue("Icon") as Dynamicweb.Frontend.ListViewModel; 546 string socialIconClass = socialIcon.SelectedValue; 547 string socialIconTitle = socialIcon.SelectedName; 548 string socialLink = socialitem.GetString("Link"); 549 string socialText = socialitem.GetString("Text"); 550 551 552 <li class="d-lg-table-cell pr-5"><a href="@socialLink" class="text-white"><i class="fa @socialIconClass"></i> <small>@socialText</small></a></li> 553 554 } 555 556 557 </ul> 558 </div> 559 <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"> 560 <h5 class="mb-3" style="color:white;">Information</h5> 561 562 <ul class="list-unstyled"> 563 @foreach (var informationitem in Model.Area.Item.GetItems("InformationLinks")) 564 { 565 566 string footerLink = informationitem.GetString("Link"); 567 string footerLinkText = informationitem.GetString("Link_Text"); 568 <li class="mb-2"><a href="@footerLink" class="text-white">@footerLinkText</a></li> 569 } 570 571 </ul> 572 573 574 </div> 575 <div class="col-12 col-sm-12 col-md-12 col-lg-4 pl-5"> 576 <h5 class="mb-3" style="color:white;">Our Brands</h5> 577 <ul class="list-unstyled"> 578 @foreach (var informationitem in Model.Area.Item.GetItems("Our_BrandsLinks")) 579 { 580 581 string footerLink = informationitem.GetString("Link"); 582 string footerLinkText = informationitem.GetString("Link_Text"); 583 <li class="mb-2"><a href="@footerLink" class="text-white">@footerLinkText</a></li> 584 } 585 586 587 </ul> 588 <h5 class="mt-4 mb-3" style="color:white;">Keep in touch with us</h5> 589 <form class="form" name="NewsletterRedirect" action='/Default.aspx' method="get" enctype="multipart/form-data"> 590 <input name="ID" id="ID" value="@newsletterSignUpPageId" type="hidden"/> 591 <div class="form__field-combi"> 592 <input name="NewsletterEmail" id="NewsletterEmail" type="text" placeholder='@Translate("Your email address", "Your email address")' /> 593 <input class="btn btn--primary dw-mod" type="submit" id="Submitter" value="JOIN" /> 594 </div> 595 </form> 596 </div> 597 </div> 598 </div> 599 <div class="bg-black mt-4"> 600 <div class="container py-3"> 601 <p class="text-center mb-0">@Model.Area.Item.GetString("FooterCopyrightText")</p> 602 </div> 603 </div> 604 </footer> 605 <!--Footer section end --> 606 @* Wireframe mode *@ 607 @if (wireframeMode == "True" && Model.CurrentUser.ID > 0) 608 { 609 <input type="checkbox" class="panel-trigger" id="WireframeToolsTrigger" /> 610 <aside id="WireframeTools" class="panel panel--right wireframe-tools"> 611 <label for="WireframeToolsTrigger" id="wireframeToolsToggle" class="panel-trigger-btn wireframe-tools-toggle"></label> 612 <div id="WireframeToolsContent" class="panel__content"> 613 <div id="WireframeToolsHelpText" class="wireframe-tools__info"> 614 @Translate("Click on a selectable element to add a comment","Click on a selectable element to add a comment") 615 </div> 616 <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> 617 <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> 618 </div> 619 </aside> 620 621 <script id="CreateCommentFormTemplate" type="text/x-template"> 622 <div> 623 {{formBegin}} 624 <label>@Translate("Comment","Comment")</label> 625 <textarea name="Comment" class="comment-textarea u-full-width"></textarea> 626 <input type="hidden" id="TargetElement" name="TargetElement" value="" /> 627 <input type="hidden" name="Comment_PageId" value="@pageId" /> 628 <input type="hidden" name="Comment_UserId" value="@currentUserId" /> 629 <input type="submit" class="btn btn--primary btn--full dw-mod" value="Save changes"> 630 {{formEnd}} 631 </div> 632 </script> 633 634 <script id="CommentListTemplate" type="text/x-template"> 635 <div id="Comment" class="comment" data-template="CommentTemplate"></div> 636 </script> 637 638 <script id="CommentTemplate" type="text/x-template"> 639 <div> 640 <div id="Comment_{{count}}" class="js-comment"><span class="comment__number">{{count}}</span> {{comment}}</div> 641 </div> 642 </script> 643 } 644 645 646 @* Templates for Typeahead *@ 647 <script id="SearchGroupsTemplate" type="text/x-template"> 648 <li class="dropdown__item" onclick="Search.UpdateGroupSelection(this)" data-group-id="{{id}}">{{name}}</li> 649 </script> 650 651 <script id="SearchContentTemplate" type="text/x-template"> 652 <li class="dropdown__item dropdown__item--seperator"> 653 <a href="{{link}}" class="js-typeahead-link u-color-inherit u-pull--left"> 654 <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> 655 <div class="u-pull--left"> 656 <div class="u-bold u-max-w220px u-truncate-text js-typeahead-name">{{name}}</div> 657 <div>{{price}}</div> 658 </div> 659 </a> 660 <div class="u-margin-left u-pull--right"> 661 <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> 662 <a href="{{link}}" class="btn btn--secondary btn--condensed u-no-margin dw-mod {{hideViewMore}} js-ignore-click-outside">@Translate("View","View")</a> 663 </div> 664 </li> 665 </script> 666 667 <script id="SearchMore" type="text/x-template"> 668 <li class="dropdown__item dropdown__item--not-selectable"> 669 <a href="/Default.aspx?ID=@productsPageId&Search={{searchParameter}}&GroupID={{groupId}}" class="btn btn--primary btn--full u-no-margin dw-mod js-typeahead-link"> 670 @Translate("View all","View all") 671 </a> 672 </li> 673 </script> 674 675 <script id="SearchEmpty" type="text/x-template"> 676 <li class="u-margin u-padding-left"> 677 @Translate("Your search gave 0 results","Your search gave 0 results") 678 </li> 679 </script> 680 681 @* Templates for the mini cart *@ 682 <script id="MiniCartCounterContent" type="text/x-template"> 683 <div class="js-mini-cart-counter-content"> 684 {{numberofproducts}} 685 </div> 686 </script> 687 688 <script id="MiniCartContent" type="text/x-template"> 689 <div class="mini-cart-dropdown__inner {{isempty}}"> 690 <h4 class="u-ta-center">@Translate("Shopping cart","Shopping cart")</h4> 691 <div class="mini-cart-dropdown__body"> 692 <table class="table mini-cart-table"> 693 <thead> 694 <tr> 695 <td>&nbsp;</td> 696 <td>@Translate("Product")</td> 697 <td class="u-ta-right">@Translate("Qty","Qty")</td> 698 <td class="u-ta-right">@Translate("Price","Price")</td> 699 </tr> 700 </thead> 701 702 <tbody id="MiniCartOrderLines"></tbody> 703 704 <tr> 705 <td><i class="fa fa-credit-card"></i></td> 706 <td>{{paymentmethod}}</td> 707 <td colspan="2" class="u-ta-right">$0.00</td> 708 </tr> 709 <tr> 710 <td><i class="fa fa-truck"></i></td> 711 <td>{{shippingmethod}}</td> 712 <td colspan="2" class="u-ta-right">${{shippingfee}}</td> 713 </tr> 714 <tr class="mini-cart-totals"> 715 <td colspan="2">@Translate("Total","Total")</td> 716 <td class="u-ta-right">{{numberofproducts}}</td> 717 <td class="u-ta-right">{{totalprice}}</td> 718 </tr> 719 </table> 720 </div> 721 @if(loggedIn =="true") 722 { 723 <table class="table mini-cart-table"> 724 <tr class="mini-cart-orderlines__footer"> 725 <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> 726 <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> 727 </tr> 728 </table> 729 } 730 else 731 { 732 <table class="table mini-cart-table"> 733 <tr class="mini-cart-orderlines__footer"> 734 <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> 735 <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> 736 </tr> 737 </table> 738 } 739 740 </div> 741 </script> 742 743 <script id="MiniCartOrderline" type="text/x-template"> 744 <tr class="{{isempty}}"> 745 <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> 746 <td> 747 <a href="{{link}}" class="mini-cart-orderlines__name">{{name}}</a> 748 <a href="{{link}}" class="mini-cart-orderlines__name">{{variantname}}</a> 749 </td> 750 <td class="u-ta-right">{{quantity}}</td> 751 <td class="u-ta-right">{{totalprice}}</td> 752 </tr> 753 </script> 754 755 <script id="MiniCartOrderlineDiscount" type="text/x-template"> 756 <tr class="table__row--no-border {{isempty}}"> 757 <td>&nbsp;</td> 758 <td><div class="mini-cart-orderlines__name">{{name}}</div></td> 759 <td class="u-ta-right">{{quantity}}</td> 760 <td class="u-ta-right">{{totalprice}}</td> 761 </tr> 762 </script> 763 764 <!-- Javascript --> 765 <script src="/Files/Templates/Designs/Rapido/js/Buttons.js"></script> 766 <script src="/Files/Templates/Designs/Rapido/js/Facets.js"></script> 767 <script src="/Files/Templates/Designs/Rapido/js/Cart.js"></script> 768 <script src="/Files/Templates/Designs/Rapido/js/Search.js"></script> 769 <script src="/Files/Templates/Designs/Rapido/js/DynamoConfig.js"></script> 770 <script src="/Files/Templates/Designs/Rapido/js/Dynamo.js"></script> 771 <script src="/Files/Templates/Designs/Rapido/js/Variants.js"></script> 772 <script src="/Files/Templates/Designs/Rapido/js/ImageList.js"></script> 773 <script src="/Files/Templates/Designs/Rapido/js/LoadMore.js"></script> 774 <script src="/Files/Templates/Designs/Rapido/js/_RememberState.js"></script> 775 <script src="/Files/Templates/Designs/Rapido/js/Scroll.js"></script> 776 <script src="/Files/Templates/Designs/Rapido/js/Wireframe.js"></script> 777 <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> 778 779 <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> 780 781 <script> 782 Wireframe.Init(@wireframeMode.ToLower(), "productList", @loggedIn); 783 function showPopup() 784 { 785 var answer = confirm("Please login or register to place an order"); 786 787 if( answer == true ){ 788 window.location.replace("/default.aspx?id=@signInProfilePageId"); 789 } 790 } 791 function EmptyCart() 792 { 793 var currentlink=window.location.href; 794 console.log("Current Link "+currentlink); 795 if(currentlink.includes("Purge=true")) 796 { 797 currentlink.split('?')[0]+"?cartcmd=emptycart"; 798 } 799 else 800 { 801 window.location.href=currentlink+"?cartcmd=emptycart"; 802 } 803 } 804 // Pop Up 805 function closeBurn(){ 806 jQuery("#burn").hide(); 807 } 808 809 $(document).ready(function(){ 810 var screenHeight = 0; 811 screenHeight = screen.height; 812 var burnPopup = $('#burnPopup'); 813 if( screenHeight < 321 ){ 814 $(burnPopup).css('height','70%'); 815 } 816 }); 817 </script> 818 <!-- Slick Carousel --> 819 <script src="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.min.js"></script> 820 821 <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js" integrity="sha384-h0AbiXch4ZDo7tp9hKZ4TsHbi047NrKGLO3SEJAg45jXxnGIfYzk4Si90RDIqNm1" crossorigin="anonymous"></script> 822 823 <script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.4/js/select2.min.js"></script> 824 <script src="/Files/Templates/Designs/Rapido/js/Custom.js"></script> 825 <script src="https://github.com/janl/mustache.js/raw/master/mustache.js"></script> 826 <script src="/Files/Templates/Designs/Rapido/js/masonry.pkgd.min.js"></script> 827 <script src="/Files/Templates/Designs/Rapido/js/main.js"></script> 828 829 <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-confirm/3.3.2/jquery-confirm.min.js"></script> 830 831 </body> 832 </html> 833 834