Error executing template "Designs/ClientBase_generated/_parsed/CheckoutPage.parsed.cshtml"
System.InvalidCastException: Unable to cast object of type 'Dynamicweb.Frontend.PageViewModel' to type 'Dynamicweb.Rendering.RazorTemplateModel`1[Dynamicweb.Rendering.Template]'.
   at RazorEngine.Templating.TemplateBase`1.SetModel(Object model)
   at RazorEngine.Templating.TemplateBase.SetData(Object model, DynamicViewBag viewbag)
   at RazorEngine.Templating.RazorEngineCore.CreateTemplate(ICompiledTemplate template, Object model, DynamicViewBag viewbag)
   at RazorEngine.Templating.RazorEngineCore.RunTemplate(ICompiledTemplate template, TextWriter writer, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<RunCompile>b__0(TextWriter writer)
   at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
   at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template)
   at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template)
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()

1 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 2 @using Dynamicweb; 3 @using Bluedesk.Tools.Generic; 4 @using System.Globalization; 5 6 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 7 8 @using System; 9 @using System.Web; 10 @using System.Linq; 11 @using System.Globalization; 12 13 @using Dynamicweb; 14 @using Dynamicweb.Content.Items; 15 @using Dynamicweb.Environment; 16 @using Dynamicweb.Frontend; 17 @using Dynamicweb.Frontend.Navigation; 18 19 @using Bluedesk.Tools.Generic; 20 21 @using Bluedesk.DynamicWeb.ItemTypes; 22 @using Bluedesk.DynamicWeb.ItemTypes.Settings; 23 @using Bluedesk.DynamicWeb.ItemTypes.Settings.Configuration; 24 25 @using Bluedesk.DynamicWeb.ItemTypes.Configuration; 26 27 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution; 28 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution.Frontend; 29 30 @{ 31 32 var master_configuration = Dynamicweb.Services.Pages.GetPageByNavigationTag(Pageview.AreaID, "MasterConfiguration"); 33 MasterConfig mc = master_configuration.Item.ToCodeFirstItem<MasterConfig>(); 34 35 bool HideStandardFooter = mc.FooterConfiguration.HideStandardFooter.ToString() == "True" ? true : false; 36 37 string MasterConfigCssClass = !string.IsNullOrWhiteSpace(mc.CssClass) ? mc.CssClass : ""; 38 39 // GeneralConfig GeneralConfiguration = mc.GeneralConfiguration; 40 EcomConfig EcommerceConfiguration = mc.EcomConfiguration; 41 42 string ecomShowPricesWithVat = (Pageview.Area.EcomPricesWithVat == "True").ToString().ToLower(); 43 string ecomPricesFormatted = (EcommerceConfiguration.FormattedPrices).ToString().ToLower(); 44 45 bool IsNotContentManager = false; 46 bool isVisualEditor = Pageview.IsVisualEditorMode; 47 48 if (isVisualEditor) 49 { 50 System.Web.HttpContext.Current.Session["PreviousPage"] = Pageview.Page.ID; 51 IsNotContentManager = (Dynamicweb.Security.UserManagement.User.GetCurrentBackendUser()?.Groups?.All(g => g.Name != "Content managers") ?? true); 52 } 53 54 BaseSettingsObj BaseSettings = new BaseSettingsObj(); 55 56 BaseSettings = BaseSettingServices.RenderBaseSettings(Pageview); 57 HttpContext.Current.Session["BaseSettings"] = BaseSettings; 58 59 //if (HttpContext.Current.Session["BaseSettings"] == null) 60 //{ 61 62 //} 63 //else 64 //{ 65 // BaseSettings = (BaseSettingsObj)HttpContext.Current.Session["BaseSettings"]; 66 // if (BaseSettings.AreaID != Pageview.AreaID) 67 // { 68 // BaseSettings = BaseSettingServices.RenderBaseSettings(Pageview); 69 // HttpContext.Current.Session["BaseSettings"] = BaseSettings; 70 // } 71 //} 72 73 BaseSettingsBrandConfiguration BaseSettingsBrandConfiguration = BaseSettings.BrandConfiguration; 74 BaseSettingsButtons BaseSettingsButtons = BaseSettingsBrandConfiguration.Buttons; 75 76 var font_configuration = Dynamicweb.Services.Pages.GetPageByNavigationTag(Pageview.AreaID, "FontConfiguration"); 77 78 var httpdomain = Dynamicweb.Environment.Helpers.LinkHelper.GetHttpDomain(); 79 var lang = Pageview.Area.CultureInfo.TwoLetterISOLanguageName; 80 var langName = Pageview.Area.Culture; 81 82 var csrftoken = application._webapi.Helper.CSRFHelper.TokenHeaderValue(); 83 var designRoot = BaseSettings.DesignRoot; 84 85 var phonenumber = BaseSettings.CorporateSettings.Phonenumber; 86 var formattedPhonenumber = phonenumber.Replace(" ", String.Empty); 87 var emailadress = BaseSettings.CorporateSettings.Emailadress; 88 var buttonIconClass = Pageview.Area.Item["Global_button_icon"] != null ? Pageview.Area.Item["Global_button_icon"].ToString().Replace("+", " ") : "fal fa-arrow-right"; 89 var callmebackformlink = BaseSettings.BrandConfiguration.CallMeBackForm; 90 var mobileThemeColor = BaseSettings.BrandConfiguration.MobileThemeColor; 91 92 bool isOffline = false; 93 94 DateTime workingHoursStart = BaseSettings.CorporateSettings.OpeningTime; 95 DateTime workingHoursEnd = BaseSettings.CorporateSettings.ClosingTime; 96 DateTime today = DateTime.Now; 97 var cHour = DateTime.Now.TimeOfDay; 98 int cDay = (int)DateTime.Now.DayOfWeek; 99 string availableToHour24hFormat = workingHoursEnd.TimeOfDay.ToString().Substring(0, 5); 100 var timeFromInput = DateTime.ParseExact(availableToHour24hFormat, "H:m", null, DateTimeStyles.None); 101 string availableToHour12hFormat = timeFromInput.ToString("hh:mm tt", CultureInfo.InvariantCulture); 102 var availableToHour = lang == "en" ? availableToHour12hFormat : availableToHour24hFormat; 103 bool isOvertime = cHour >= workingHoursEnd.TimeOfDay || cHour <= workingHoursStart.TimeOfDay; 104 bool isNoValidDate = today < workingHoursStart || today > workingHoursEnd; 105 if (isNoValidDate || isOvertime) 106 { 107 isOffline = true; 108 } 109 110 Boolean showBreadcrumbs = Pageview.Page.PropertyItem != null && Pageview.Page.PropertyItem["ShowBreadcrumbs"] != null ? Convert.ToBoolean(Pageview.Page.PropertyItem["ShowBreadcrumbs"]) : false; 111 112 var appcss = Cache.VersionedFile(designRoot + "/dist/app.css"); 113 114 var favicon32 = Cache.VersionedFile(designRoot + "/assets/img/favicon-32.png", true); 115 var favicon16 = Cache.VersionedFile(designRoot + "/assets/img/favicon-16.png", true); 116 var favicon = Cache.VersionedFile(designRoot + "/assets/img/favicon.ico", true); 117 118 favicon = !string.IsNullOrWhiteSpace(BaseSettings.BrandConfiguration.Favicons.Favicon) ? BaseSettings.BrandConfiguration.Favicons.Favicon : favicon; 119 favicon16 = !string.IsNullOrWhiteSpace(BaseSettings.BrandConfiguration.Favicons.Favicon16) ? BaseSettings.BrandConfiguration.Favicons.Favicon16 : favicon16; 120 favicon32 = !string.IsNullOrWhiteSpace(BaseSettings.BrandConfiguration.Favicons.Favicon32) ? BaseSettings.BrandConfiguration.Favicons.Favicon32 : favicon32; 121 122 var polyfillsjs = Cache.VersionedFile(designRoot + "/dist/polyfills.bundle.js"); 123 var appbundlejs = Cache.VersionedFile(designRoot + "/dist/app.bundle.js"); 124 var appAsyncbundlejs = Cache.VersionedFile(designRoot + "/dist/appAsync.bundle.js"); 125 var vuebundlejs = Cache.VersionedFile(designRoot + "/dist/vue.bundle.js"); 126 127 } 128 129 130 <!DOCTYPE html> 131 <html lang="@lang" prefix="og: http://ogp.me/ns#"> 132 <head> 133 <meta charset="utf-8"> 134 <meta http-equiv="X-UA-Compatible" content="IE=edge"> 135 <meta name="viewport" content="width=device-width, initial-scale=1"> 136 <meta name="theme-color" content="@mobileThemeColor"> 137 <meta name="description" content="@GetString("Meta.Description")"> 138 <meta name="keywords" content="@GetString("Meta.Keywords")"> 139 140 @RenderSnippet("ogTags") 141 142 <title>Dynamicweb</title> 143 144 <link rel="preconnect" href="https://fonts.googleapis.com"> 145 <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> 146 <link href="@appcss" rel="stylesheet" /> 147 148 @{ 149 if (!string.IsNullOrWhiteSpace(favicon32)) { <link rel="icon" type="image/png" sizes="32x32" href="@favicon32"> } 150 if (!string.IsNullOrWhiteSpace(favicon16)) { <link rel="icon" type="image/png" sizes="16x16" href="@favicon16"> } 151 if (!string.IsNullOrWhiteSpace(favicon)){ <link rel="shortcut icon" href="@favicon"> } 152 } 153 154 <script> 155 window.globals = { 156 pageId: '@Pageview.ID', 157 Token: '@csrftoken', 158 DW_AREA_CULTURE: '@GetString("LongLang")', 159 DW_AREA_CULTURE_SHORT: '@lang', 160 globalIconClass: '@buttonIconClass', 161 DW_USERID: '@Dynamicweb.Security.UserManagement.User.GetCurrentExtranetUserId()' 162 }; 163 </script> 164 165 @GetString("Item.Area.HeadScript") 166 @{ 167 var _cookieOptinLevel = Dynamicweb.Environment.CookieManager.GetCookieOptInLevel(); 168 var _enabledCookieCategories = Dynamicweb.Environment.CookieManager.GetCookieOptInCategories(); 169 if (_cookieOptinLevel.ToString() == "All" || _enabledCookieCategories.Contains("Marketing_Cookies")) 170 { 171 @GetString("Item.Area.HeadScriptAfterConsent") 172 } 173 } 174 175 @{ 176 var reviewName = GetString("Item.Area.Review_Name") != null ? GetString("Item.Area.Review_Name") : ""; 177 var reviewBestRating = GetString("Item.Area.Review_Best_Rating") != null ? GetString("Item.Area.Review_Best_Rating") : ""; 178 var reviewWorstRating = GetString("Item.Area.Review_Worst_Rating") != null ? GetString("Item.Area.Review_Worst_Rating") : ""; 179 var reviewRatingValue = GetString("Item.Area.Review_Rating_Value") != null ? GetString("Item.Area.Review_Rating_Value") : ""; 180 var reviewCount = GetString("Item.Area.Review_Count") != null ? GetString("Item.Area.Review_Count") : ""; 181 var reviewUrl = GetString("Item.Area.Review_URL") != null ? GetString("Item.Area.Review_URL") : ""; 182 183 var searchPageID = Bluedesk.Tools.DynamicWeb.Generic.PageHelper.GetPageIDByNavigationTag("searchresults", Pageview.AreaID); 184 var domain = Dynamicweb.Environment.Helpers.LinkHelper.GetHttpDomain(); 185 } 186 187 <script type="application/ld+json"> 188 [{ 189 "@@context": "https://schema.org", 190 "@@type": "Organization", 191 "name" : "@GetString("Item.Area.CompanyName")", 192 "url": "@domain", 193 "sameAs" : "@GetString("Item.Area.Facebook")", 194 "logo": "@domain@GetString("Item.Area.Logo")", 195 "contactPoint" : [{ 196 "@@type" : "ContactPoint", 197 "telephone" : "@GetString("Item.Area.Phonenumber")", 198 "contactType" : "customer service" , 199 "@@context": "https://schema.org", 200 "@@id": "@domain", 201 "name": "@GetString("Item.Area.CompanyName")" 202 }], 203 "address": { 204 "@@type": "PostalAddress", 205 "streetAddress": "@GetString("Item.Area.Address")", 206 "addressLocality": "@GetString("Item.Area.City")", 207 "postalCode": "@GetString("Item.Area.Zipcode")", 208 "addressRegion": "@GetString("Item.Area.Region")", 209 "addressCountry": "@GetString("Item.Area.Country")" 210 } 211 }, 212 { 213 "@@context": "https://schema.org", 214 "@@type": "WebSite", 215 "name" : "@GetString("Item.Area.CompanyName")", 216 "alternateName" : "@GetString("Item.Area.AltCompanyName")", 217 "url": "@domain", 218 "potentialAction": { 219 "@@type": "SearchAction", 220 "target": "@domain/Default.aspx?ID=@searchPageID&q={search_term_string}", 221 "query-input": "required name=search_term_string" 222 } 223 }] 224 </script> 225 226 <script type="application/ld+json"> 227 { 228 "@@context": "https://schema.org", 229 "@@type": "Product", 230 "name": "@reviewName", 231 "url":"@reviewUrl", 232 "aggregateRating": { 233 "@@type": "AggregateRating", 234 "bestRating": "@reviewBestRating", 235 "worstRating": "@reviewWorstRating", 236 "ratingValue": "@reviewRatingValue", 237 "reviewCount": "@reviewCount" 238 } 239 } 240 </script> 241 @RenderSnippet("DataLayer") 242 243 @RenderSnippet("GoogleMapsScript") 244 245 @{ 246 // TODO: Add there options to master config for product overview 247 bool hidePricesForGuests = false; 248 bool hideShoppingCartForGuests = false; 249 250 bool enableShoppingCart = hideShoppingCartForGuests && Pageview.User == null ? false : (bool) GetBoolean("Item.Area.ConfigModuleShoppingCart"); 251 bool enableLogin = (bool) GetBoolean("Item.Area.ConfigModuleLogin"); 252 bool enableQuickOrder = (bool) GetBoolean("Item.Area.ConfigModuleQuickOrder"); 253 bool enableAdvancedSearch = (bool) GetBoolean("Item.Area.ConfigModuleAdvancedSearch"); 254 bool enableCallMeBack = (bool) GetBoolean("Item.Area.ConfigModuleCallMeBack"); 255 bool enableDyslexicFont = (bool) GetBoolean("Item.Area.ConfigModuleDyslexicFont"); 256 bool enableProductCompare = (bool) GetBoolean("Item.Area.ConfigModuleProductCompare"); 257 } 258 259 260 <style> 261 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 262 @using Dynamicweb; 263 264 @using System.Data; 265 @using System.Data.SqlClient; 266 @using Bluedesk.Tools.DynamicWeb.DataAccess; 267 268 @using Bluedesk.DynamicWeb.ItemTypes; 269 @using Bluedesk.DynamicWeb.ItemTypes.Settings; 270 @using Bluedesk.DynamicWeb.ItemTypes.Configuration; 271 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution; 272 273 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution.Frontend; 274 275 @Title("Configuration page template") 276 277 @{ 278 279 string RoundedCornersValue = "0px"; 280 string ButtonHeight = BaseSettings.BrandConfiguration.ButtonHeight; 281 282 switch (BaseSettings.BrandConfiguration.RoundedCorners) 283 { 284 285 case "rounded": 286 RoundedCornersValue = BaseSettings.BrandConfiguration.RoundedCornerValue; 287 break; 288 289 case "round": 290 RoundedCornersValue = ButtonHeight; 291 break; 292 293 default: 294 RoundedCornersValue = "0px"; 295 break; 296 } 297 298 string fontawesomeFontFamily = "Font Awesome 5 Pro"; 299 int fontawesomeFontWeight = 300; 300 301 switch (BaseSettings.BrandConfiguration.FontawesomeStyle) 302 { 303 304 case "fal": 305 fontawesomeFontWeight = 300; 306 break; 307 case "far": 308 fontawesomeFontWeight = 400; 309 break; 310 case "fas": 311 fontawesomeFontWeight = 900; 312 break; 313 case "fad": 314 fontawesomeFontWeight = 900; 315 fontawesomeFontFamily = "Font Awesome 5 Duotone"; 316 break; 317 } 318 319 } 320 321 @BaseSettingServices.RenderButtonCSS("btn__primary", BaseSettingsButtons.PrimaryButtonConfiguration) 322 @BaseSettingServices.RenderButtonCSS("btn__secondary", BaseSettingsButtons.SecondaryButtonConfiguration) 323 @BaseSettingServices.RenderButtonCSS("btn__contrast", BaseSettingsButtons.ContrastButtonConfiguration) 324 325 :root, 326 body { 327 328 --BaseColorPrimary : @BaseSettingsBrandConfiguration.BaseColorPrimary; 329 --BaseColorSecondary : @BaseSettingsBrandConfiguration.BaseColorSecondary; 330 --BaseColorContrast : @BaseSettingsBrandConfiguration.BaseColorContrast; 331 332 --BaseFontPrimary : @BaseSettingsBrandConfiguration.PrimaryFontFamily; 333 --BaseFontSecondary : @BaseSettingsBrandConfiguration.PrimaryFontFamily; 334 335 @BaseSettings.BrandConfiguration.BodyInlineStyles 336 --StandardUnitSize : 3.2rem; 337 } 338 339 .footer { 340 --FooterContainerDisplay: none !important; 341 display: var(--FooterContainerDisplay) 342 } 343 344 h1, h2, h3, h4, h5, h6 { @BaseSettings.BrandConfiguration.HeaderInlineStyles } 345 346 h1.cta-paragraph__header { @BaseSettings.BrandConfiguration.H1InlineStyles } 347 h2.cta-paragraph__header { @BaseSettings.BrandConfiguration.H2InlineStyles } 348 h3.cta-paragraph__header { @BaseSettings.BrandConfiguration.H3InlineStyles } 349 h4.cta-paragraph__header { @BaseSettings.BrandConfiguration.H4InlineStyles } 350 351 .po-block__addtocart .btn, 352 .productdetails__add-to-cart, 353 .searchbox__input { 354 border-radius: @RoundedCornersValue; 355 } 356 357 main.blur { 358 filter: grayscale(50%) blur(15px); 359 -webkit-filter: grayscale(50%) blur(15px); 360 } 361 362 .AdvancedGridButton { 363 --BorderRadius: @RoundedCornersValue; 364 } 365 366 .btn { 367 height: var(--StandardUnitSize); 368 } 369 370 .btn__icon { 371 372 --fontawesomeFontFamily : "@fontawesomeFontFamily"; 373 --fontawesomeFontWeight : @fontawesomeFontWeight; 374 375 font-family: var(--fontawesomeFontFamily); 376 font-weight: var(--fontawesomeFontWeight); 377 378 -moz-osx-font-smoothing: grayscale; 379 -webkit-font-smoothing: antialiased; 380 display: inline-block; 381 font-style: normal; 382 font-variant: normal; 383 text-rendering: auto; 384 line-height: 1; 385 386 } 387 388 .cta-paragraph { 389 background-color: var(--mainBackgroundColor); 390 } 391 392 .cta-paragraph__container { 393 background-color: var(--contentBackgroundColor); 394 border: var(--contentBorder); 395 } 396 397 .cta-paragraph__subheader, 398 .cta-paragraph__header, 399 .cta-paragraph__text p, 400 .cta-paragraph__text li { 401 color: var(--Color); 402 background-color: var(--BackgroundColor); 403 border-color: var(--BorderColor); 404 position: var(--Position); 405 top: var(--Top); 406 left: var(--Left); 407 right: var(--Right); 408 bottom: var(--Bottom); 409 padding: var(--Padding); 410 border: var(--BorderSize); 411 font-size: var(--FontSize); 412 text-transform: var(--FontStyle); 413 line-height: var(--LineHeight); 414 font-weight: var(--FontWeight); 415 font-family: var(--FontFamily); 416 border-radius: var(--BorderRadius); 417 } 418 419 .cta-paragraph__content-container { 420 align-items: var(--ContentElementAlignmentAlignItems); 421 text-align: var(--ContentElementAlignmentTextAlign); 422 } 423 424 .cta-paragraph__btn-navigation, 425 .cta-paragraph__content-container { 426 align-items : var(--ContainerFitContentAlignmentAlignItems); 427 justify-content: var(--ContainerFitContentAlignmentJustifyContent); 428 } 429 430 .jumbotron__subheader, 431 .jumbotron__header, 432 .jumbotron__shoutbox-intro p, 433 .jumbotron__shoutbox-intro li, 434 .header--desktop.headerNew { 435 position: relative; 436 } 437 438 .header--desktop.headerNew.stickyheader { 439 position: fixed; 440 } 441 442 @@media screen and (min-width: 992px){ 443 .image-left { 444 justify-content: flex-end; 445 flex-direction: row; 446 } 447 448 .image-right { 449 justify-content: flex-start; 450 flex-direction: row-reverse; 451 } 452 } 453 454 .AdvancedGrid__row { 455 background-color: var(--BackgroundColor); 456 } 457 458 .cta-paragraph__btn-navigation { 459 padding: 1.2rem 0rem !important; 460 } 461 462 .AdvancedGrid, 463 .AdvancedGrid__container { 464 width: 100%; 465 background-image: var(--BackgroundImage); 466 min-height: var(--Height); 467 } 468 469 @{ 470 471 int PageViewId = Pageview.Page.ID; 472 int AreaId = Pageview.AreaID; 473 474 // HttpContext.Current.Session["PageIdForStyles"] = Pageview.Page.ID; 475 // HttpContext.Current.Session["AreaIdForStyles"] = Pageview.AreaID; 476 477 DataTable AdvancedGridStylesDataTable = null; 478 479 AdvancedGridStylesDataTable = DynamicwebData.Query($@" 480 481 SELECT 482 InlineStyles AS Styles 483 484 FROM 485 [dbo].[ItemType_AdvancedGridConfiguration] AS AGC 486 LEFT JOIN [dbo].[GridRow] AS GR ON GR.GridRowItemId = AGC.Id 487 488 WHERE 489 GR.GridRowPageId = @PageId; 490 491 ", new SqlParameter("PageId", PageViewId)); 492 493 DataTable BackgroundConfigDataTable = null; 494 495 BackgroundConfigDataTable = DynamicwebData.Query($@" 496 497 SELECT 498 distinct(BG.Stylesheet) AS Styles 499 500 FROM [dbo].GridRow AS GR 501 INNER JOIN dbo.Paragraph AS PG ON PG.ParagraphGridRowId = GR.GridRowId 502 LEFT JOIN dbo.ItemType_CTAParagraph AS CTA ON CTA.Id = PG.ParagraphItemId 503 LEFT JOIN dbo.ItemType_MultiColumnParagraph AS MCP ON MCP.Id = PG.ParagraphItemId 504 LEFT JOIN dbo.ItemType_Carousel AS CS ON CS.Id = PG.ParagraphItemId 505 LEFT JOIN dbo.ItemType_BackgroundConfiguration AS BG ON CTA.BackgroundConfigurationID = BG.Id 506 OR MCP.BackgroundConfigurationID = BG.Id 507 OR CS.BackgroundConfigurationID = BG.Id 508 509 WHERE GR.GridRowPageID=@PageId 510 AND bg.Stylesheet Is NOT NULL", new SqlParameter("PageId", PageViewId)); 511 512 DataTable ButtonConfigDataTable = null; 513 514 ButtonConfigDataTable = DynamicwebData.Query($@" 515 516 SELECT 517 distinct(BCONF.Stylesheet) AS Styles 518 519 FROM [dbo].GridRow AS GR 520 LEFT JOIN [dbo].Paragraph AS P ON P.ParagraphGridRowId = GR.GridRowId 521 LEFT JOIN [dbo].ItemType_CTAParagraph AS CTAP ON CTAP.Id = P.ParagraphItemId 522 523 LEFT JOIN [dbo].ItemType_MultiColumnParagraph AS MCP ON MCP.Id = P.ParagraphItemId 524 LEFT JOIN [dbo].[ItemList] AS ColumnIL ON ColumnIL.ItemListId = MCP.ParagraphListID 525 LEFT JOIN [dbo].[ItemListRelation] AS ColumnILR ON ColumnIL.ItemListId = ColumnILR.ItemListRelationItemListId 526 LEFT JOIN [dbo].[ItemType_ParagraphColumn] AS PC ON PC.Id = ColumnILR.ItemListRelationItemId 527 528 LEFT JOIN [dbo].ItemType_Carousel AS CS ON CS.Id = P.ParagraphItemId 529 LEFT JOIN [dbo].[ItemList] AS CIIL ON CIIL.ItemListId = CS.CarouselListID 530 LEFT JOIN [dbo].[ItemListRelation] AS CIILR ON CIIL.ItemListId = CIILR.ItemListRelationItemListId 531 LEFT JOIN [dbo].ItemType_CarouselItem AS CI ON CI.Id = CIILR.ItemListRelationItemId 532 533 LEFT JOIN [dbo].[ItemType_JumbotronContainer] AS JC ON JC.Id = P.ParagraphItemId 534 LEFT JOIN [dbo].[ItemList] AS JCIL ON JCIL.ItemListId = JC.JumbotronListID 535 LEFT JOIN [dbo].[ItemListRelation] AS JCILR ON JCIL.ItemListId = JCILR.ItemListRelationItemListId 536 LEFT JOIN [dbo].ItemType_JumbotronListItem AS JCLI ON JCLI.Id = JCILR.ItemListRelationItemId 537 538 LEFT JOIN [dbo].[ItemType_CTAButton] AS CTAB ON 539 CTAP.ButtonID = CTAB.Id 540 OR CTAP.ExtraButtonID = CTAB.Id 541 OR MCP.ButtonID = CTAB.Id 542 OR PC.ButtonID = CTAB.Id 543 OR PC.ExtraButtonID = CTAB.Id 544 OR CS.ButtonID = CTAB.Id 545 OR CI.ButtonID = CTAB.Id 546 OR CI.ExtraButtonID = CTAB.Id 547 OR JCLI.ButtonID = CTAB.Id 548 LEFT JOIN [dbo].[ItemType_ButtonConfiguration] AS BCONF ON CTAB.ButtonConfigurationID = BCONF.Id 549 550 WHERE 551 GR.GridRowPageID = @PageId 552 AND GR.GridRowActive = 1 553 AND CTAB.ButtonConfigurationID Is NOT NULL", new SqlParameter("PageId", PageViewId)); 554 555 DataTable MasterConfigDataTable = null; 556 557 MasterConfigDataTable = DynamicwebData.Query($@" 558 559 SELECT 560 MC.CustomCSS 561 562 FROM 563 [dbo].[Page] AS P 564 INNER JOIN [dbo].[ItemType_MasterConfig] AS MC ON P.PageItemId = MC.Id 565 566 WHERE 567 p.PageItemType = 'MasterConfig' 568 AND PageAreaId = @AreaId;", new SqlParameter("AreaId", AreaId)); 569 570 if (AdvancedGridStylesDataTable != null && AdvancedGridStylesDataTable.Rows.Count > 0) 571 { 572 for (int i = 0; i < AdvancedGridStylesDataTable.Rows.Count; i++) 573 { 574 @AdvancedGridStylesDataTable.Rows[i]["Styles"].ToString(); 575 } 576 } 577 578 if (BackgroundConfigDataTable != null && BackgroundConfigDataTable.Rows.Count > 0) 579 { 580 for (int i = 0; i < BackgroundConfigDataTable.Rows.Count; i++) 581 { 582 @BackgroundConfigDataTable.Rows[i]["Styles"].ToString(); 583 } 584 } 585 586 if (ButtonConfigDataTable != null && ButtonConfigDataTable.Rows.Count > 0) 587 { 588 for (int i = 0; i < ButtonConfigDataTable.Rows.Count; i++) 589 { 590 @ButtonConfigDataTable.Rows[i]["Styles"].ToString(); 591 } 592 } 593 594 @MasterConfigDataTable.Rows[0]["CustomCSS"].ToString(); 595 } 596 597 </style> 598 599 </head> 600 601 <body> 602 @GetString("Item.Area.BodyScript") 603 @{ 604 if (_cookieOptinLevel.ToString() == "All" || _enabledCookieCategories.Contains("Marketing_Cookies")) 605 { 606 @GetString("Item.Area.BodyScriptAfterConsent") 607 } 608 } 609 @GetString("Item.Area.TailScript") 610 611 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 612 @using Dynamicweb; 613 614 @{ 615 string logo = GetString("Item.Area.Logo"); 616 string logoAlt = GetString("Item.Area.Logo_Alt"); 617 } 618 619 <header class="header header--checkout header--mobile"> 620 621 <div class="flex items-center"> 622 <a href="/" class="w-full mr-4 header__logo__wrapper"> 623 <img class="header__logo" src="@logo" alt="Logo" style="object-fit:contain; padding: 12px; box-sizing: border-box; text-align:left;"> 624 </a> 625 </div> 626 627 </header> 628 629 <header class="header header--checkout header--desktop px-4"> 630 631 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 632 @using Dynamicweb; 633 634 <section class="topmenu topmenu--checkout"> 635 636 <div class="topmenu__container"> 637 638 <ul class="usp__list"> 639 @RenderHeaderUSP(@GetString("Item.Area.USP_1.Value"), @GetString("Item.Area.USP_1_icon.Value")) 640 @RenderHeaderUSP(@GetString("Item.Area.USP_2.Value"), @GetString("Item.Area.USP_2_icon.Value")) 641 @RenderHeaderUSP(@GetString("Item.Area.USP_3.Value"), @GetString("Item.Area.USP_3_icon.Value")) 642 </ul> 643 644 </div> 645 646 </section> 647 648 @helper RenderHeaderUSP(string USP_content, string USP_icon) 649 { 650 if (!string.IsNullOrWhiteSpace(USP_content)) 651 { 652 var usp_icon_class = (!string.IsNullOrWhiteSpace(USP_icon)) ? USP_icon : "fal fa-check"; 653 654 <li class="usp__item"> 655 <i class="@usp_icon_class usp__icon"></i> 656 <span>@USP_content</span> 657 </li> 658 } 659 } 660 661 662 <section class="header__container container"> 663 664 <a href="/" class="flex items-center"> 665 <img class="header__logo" src="@logo" alt="Logo"> 666 </a> 667 668 <div class="header__cta"> 669 @if(!isOffline) { 670 <a href="tel:@formattedPhonenumber" class="header__cta--phone phone-cta"> 671 <p class="phone-cta__number"><i class="fas fa-phone-alt"></i>@Translate("Header.CallUsOn", "Bel ons op")<span>@phonenumber</span></p> 672 <div class="phone-cta__availability__wrapper"> 673 <i class="fas fa-circle phone-cta__availability__icon"></i> 674 <p class="phone-cta__availability__description">@Translate("Header.AvailableUntill", "We zijn beschikbaar tot") @availableToHour</p> 675 </div> 676 </a> 677 } else { 678 <div class="header__cta--callmeback callmeback-cta"> 679 <a href="@callmebackformlink" class="btn btn__outline btn--callmeback"> 680 <span class="btn__text">@Translate("Header.CallMeBack", "Call me back")</span> 681 <i class="btn__icon fas fa-phone"></i> 682 </a> 683 </div> 684 } 685 </div> 686 687 </section> 688 689 </header> 690 691 <!-- DO NOT REMOVE --> 692 <div id="backdrop-megamenu"></div> 693 <!-- DO NOT REMOVE --> 694 695 696 697 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 698 @using Dynamicweb; 699 @using Bluedesk.DynamicWeb.ItemTypes.Pages; 700 @using Bluedesk.Tools.DynamicWeb.ExtensionMethods; 701 @using System.Linq; 702 @using Dynamicweb.Content; 703 704 @Title("Checkout content") 705 @Description("Checkout content template") 706 707 708 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 709 @using Dynamicweb; 710 @using System.Linq; 711 712 @{ 713 var ogLocale = GetString("LongLang").Replace("-", "_"); 714 var ogSiteName = GetString("Item.Area.CompanyName"); 715 var ogurl = string.Format("{0}{1}", httpdomain, GetGlobalValue("Global:Pageview.Url")); 716 var ogtitle = GetString("Title"); 717 var ogdesc = GetString("Meta.Description"); 718 var ogDefaultImg = GetString("Item.Area.DefaultOGImage"); 719 var ogImg = !string.IsNullOrWhiteSpace(ogDefaultImg) ? string.Format("{0}{1}", httpdomain, ogDefaultImg) : ""; 720 } 721 722 @SnippetStart("ogTags") 723 <meta property="og:locale" content="@ogLocale" /> 724 <meta property="og:site_name" content="@ogSiteName" /> 725 <meta property="og:url" content="@ogurl" /> 726 <meta property="og:type" content="website" /> 727 <meta property="og:title" content="@ogtitle" /> 728 <meta property="og:description" content="@ogdesc" /> 729 <meta property="og:image" content="@ogImg" /> 730 @SnippetEnd("ogTags") 731 732 <section class="checkout__content"> 733 <div class="dwcontent" id="wide-content" title="Wide content" settings="unwrap:true;"></div> 734 </section> 735 736 <section class="checkout__content"> 737 <div class="container"> 738 <article class="defaultpage__main"> 739 <div class="dwcontent" id="main-content" title="Main content" settings="unwrap:true;"></div> 740 </article> 741 742 <aside class="defaultpage__aside"> 743 <div class="row defaultpage__aside-content"> 744 <div class="dwcontent" id="side-content" title="Side/Bottom content" settings="unwrap:true;"></div> 745 </div> 746 </aside> 747 </div> 748 </section> 749 750 751 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 752 @using Dynamicweb; 753 @using Bluedesk.DynamicWeb.ItemTypes; 754 755 @{ 756 string footerLogo = GetString("Item.Area.FooterLogo"); 757 string footerDescription = GetString("Item.Area.FooterDescription"); 758 759 var fb = GetString("Item.Area.Facebook"); 760 var twitter = GetString("Item.Area.Twitter"); 761 var linkedin = GetString("Item.Area.LinkedIn"); 762 var googlePlus = GetString("Item.Area.GooglePlus"); 763 var instagram = GetString("Item.Area.Instagram"); 764 var youtube = GetString("Item.Area.Youtube"); 765 } 766 767 <footer class="footer footer--checkout "> 768 769 <div class="footer-usp__wrapper"> 770 <div class="container"> 771 <ul class="footer-usp__list flex-wrap"> 772 @RenderFooterUSP(@GetString("Item.Area.USP_1.Value"), @GetString("Item.Area.USP_1_icon.Value")) 773 @RenderFooterUSP(@GetString("Item.Area.USP_2.Value"), @GetString("Item.Area.USP_2_icon.Value")) 774 @RenderFooterUSP(@GetString("Item.Area.USP_3.Value"), @GetString("Item.Area.USP_3_icon.Value")) 775 </ul> 776 </div> 777 </div> 778 779 <!-- 780 <section class="container footer__content"> 781 782 </section> 783 --> 784 785 <section class="footer__copyright"> 786 787 <div class="container bottombar__container"> 788 <placeholder class="dwnavigation" id="bottombar__navigation" 789 settings="startlevel:1;endlevel:4;template:CleanNavigation.xslt;expandmode:all;parenttag:bottombar;blockclass:bottombar"> 790 </placeholder> 791 <section class="footer__social-container"> 792 <div class="footer__social-icon-container"> 793 @if (!string.IsNullOrWhiteSpace(twitter)) 794 { 795 <a href="@twitter" target="_blank" title="twitter" class="footer__social" rel="noreferrer"><i class="fab fa-twitter"></i></a> 796 } 797 @if (!string.IsNullOrWhiteSpace(fb)) 798 { 799 <a href="@fb" target="_blank" title="facebook" class="footer__social" rel="noreferrer"><i class="fab fa-facebook"></i></a> 800 } 801 @if (!string.IsNullOrWhiteSpace(linkedin)) 802 { 803 <a href="@linkedin" target="_blank" title="LinkedIn" class="footer__social" rel="noreferrer"><i class="fab fa-linkedin"></i></a> 804 } 805 @if (!string.IsNullOrWhiteSpace(youtube)) 806 { 807 <a href="@youtube" target="_blank" title="YouTube" class="footer__social" rel="noreferrer"><i class="fab fa-youtube"></i></a> 808 } 809 </div> 810 </section> 811 </div> 812 </section> 813 </footer> 814 815 @helper RenderFooterUSP(string USP_content, string USP_icon) 816 { 817 if (!string.IsNullOrWhiteSpace(USP_content)) 818 { 819 var usp_icon_class = (!string.IsNullOrWhiteSpace(USP_icon)) ? USP_icon : "fal fa-check"; 820 821 <li class="footer-usp__item"> 822 <i class="@usp_icon_class footer-usp__icon"></i> 823 <span>@USP_content</span> 824 </li> 825 } 826 } 827 <section id="vue-modal"></section> 828 829 <div id="backdrop"></div> 830 831 <script src="@polyfillsjs"></script> 832 <script src="@appbundlejs"></script> 833 <script defer src="@vuebundlejs"></script> 834 <script defer src="@appAsyncbundlejs"></script> 835 <link rel="stylesheet" href="https://pro.fontawesome.com/releases/v5.15.4/css/all.css" integrity="sha384-rqn26AG5Pj86AF4SO72RK5fyefcQ/x32DNQfChxWvbXIyXFePlEktwD18fEz+kQU" crossorigin="anonymous"> 836 837 </body> 838 </html> 839