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