ERROR:'BusinessObjects.TemplateUtil' does not contain a definition for 'HasSiteTracking' ERROR:Errors while compiling a Template. Please try the following to solve the situation: * If the problem is about missing/invalid references or multiple defines either try to load the missing references manually (in the compiling appdomain!) or Specify your references manually by providing your own IReferenceResolver implementation. See https://antaris.github.io/RazorEngine/ReferenceResolver.html for details. Currently all references have to be available as files! * If you get 'class' does not contain a definition for 'member': try another modelType (for example 'null' to make the model dynamic). NOTE: You CANNOT use typeof(dynamic) to make the model dynamic! Or try to use static instead of anonymous/dynamic types. More details about the error: - error: (275, 44) 'BusinessObjects.SiteTracking.SiteTracker' does not contain a definition for 'TrackUser' and no extension method 'TrackUser' accepting a first argument of type 'BusinessObjects.SiteTracking.SiteTracker' could be found (are you missing a using directive or an assembly reference?) - error: (277, 44) 'BusinessObjects.SiteTracking.SiteTracker' does not contain a definition for 'TrackCheckoutViewCart' and no extension method 'TrackCheckoutViewCart' accepting a first argument of type 'BusinessObjects.SiteTracking.SiteTracker' could be found (are you missing a using directive or an assembly reference?) - error: (278, 44) 'BusinessObjects.SiteTracking.SiteTracker' does not contain a definition for 'TrackCheckoutBeginCheckout' and no extension method 'TrackCheckoutBeginCheckout' accepting a first argument of type 'BusinessObjects.SiteTracking.SiteTracker' could be found (are you missing a using directive or an assembly reference?) The template-file we tried to compile is: THEME_BPDTHEME01_Opening Body_$$_02122024134428503 The generated source code is: ------------- START ----------- //------------------------------------------------------------------------------ // // This code was generated by a tool. // Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ namespace CompiledRazorTemplates.Dynamic { #line 1 "THEME_BPDTHEME01_Opening Body_$$_02122024134428503" using System; #line default #line hidden using System.Collections.Generic; using System.Linq; #line 4 "THEME_BPDTHEME01_Opening Body_$$_02122024134428503" using BusinessObjects; #line default #line hidden #line 2 "THEME_BPDTHEME01_Opening Body_$$_02122024134428503" using System.Web; #line default #line hidden #line 3 "THEME_BPDTHEME01_Opening Body_$$_02122024134428503" using System.Web.UI; #line default #line hidden #line 5 "THEME_BPDTHEME01_Opening Body_$$_02122024134428503" using BusinessObjects.Google.GoogleTrustedStores; #line default #line hidden #line 6 "THEME_BPDTHEME01_Opening Body_$$_02122024134428503" using BusinessObjects.SiteTracking; #line default #line hidden #line 7 "THEME_BPDTHEME01_Opening Body_$$_02122024134428503" using BusinessWebControls; #line default #line hidden #line 8 "THEME_BPDTHEME01_Opening Body_$$_02122024134428503" using Framework.ExtensionMethods; #line default #line hidden #line 9 "THEME_BPDTHEME01_Opening Body_$$_02122024134428503" using Newtonsoft.Json; #line default #line hidden [RazorEngine.Compilation.HasDynamicModelAttribute()] public class C_THEMEBPDTHEME01OpeningBody02122024134428503 : BusinessObjects.Template.HtmlSupportTemplateBase { #line hidden #line 211 "THEME_BPDTHEME01_Opening Body_$$_02122024134428503" public bool IsQuestionnaireThankYouPage() { if (string.IsNullOrWhiteSpace(GetQuestionnaireName())) { return false; } bool isThankyouPage = false; var url = string.Empty; if (HttpContext.Current != null) { Page page = HttpContext.Current.Handler as Page; PageForm page1 = (PageForm)page.FindControl("page1"); if (page.IsPostBack && page1.Visible == false) { isThankyouPage = true; } } return isThankyouPage; } public string GetQuestionnaireName() { string pageName = Util.PageName; var isQuestionnaire = pageName.Equals("Questionnaire.aspx", StringComparison.OrdinalIgnoreCase); var questionnaireName = Util.PageParameter("Questionnaire"); if (!isQuestionnaire || string.IsNullOrWhiteSpace(questionnaireName)) { return string.Empty; } return questionnaireName; } public string QuestionnaireJson(string questionnaireName) { var isThankYouPage = IsQuestionnaireThankYouPage(); var qObject = new { Name = questionnaireName, IsThankYouPage = isThankYouPage }; return JsonConvert.SerializeObject(qObject); } #line default #line hidden #line 254 "THEME_BPDTHEME01_Opening Body_$$_02122024134428503" public RazorEngine.Templating.TemplateWriter InitialiseSiteTrackerBody(SiteTracker siteTracker, int recordsPerPage) { #line default #line hidden return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { #line 255 "THEME_BPDTHEME01_Opening Body_$$_02122024134428503" var trackingDetails = siteTracker.TrackingDetails; if (!trackingDetails.IsPrintOrderPage) { #line default #line hidden #line 259 "THEME_BPDTHEME01_Opening Body_$$_02122024134428503" WriteTo(__razor_helper_writer, Raw(Model.TemplateUtil.GoogleTagManagerInitialiser)); #line default #line hidden #line 259 "THEME_BPDTHEME01_Opening Body_$$_02122024134428503" if (trackingDetails.UsingEnhancedECommerce || trackingDetails.UsingDigitalRemarketing || (trackingDetails.IsOrderCompletePage && !trackingDetails.UsingEnhancedECommerce) || (trackingDetails.IsCartContentsAllPagesLoadEnabled && !trackingDetails.IsOrderCompletePage)) { #line default #line hidden WriteLiteralTo(__razor_helper_writer, " \r\n"); #line 272 "THEME_BPDTHEME01_Opening Body_$$_02122024134428503" } // Render the user tracking. This should be run first so that any subsequent events will have the user_id set. #line default #line hidden #line 275 "THEME_BPDTHEME01_Opening Body_$$_02122024134428503" WriteTo(__razor_helper_writer, siteTracker.TrackUser()); #line default #line hidden #line 275 "THEME_BPDTHEME01_Opening Body_$$_02122024134428503" #line default #line hidden #line 277 "THEME_BPDTHEME01_Opening Body_$$_02122024134428503" WriteTo(__razor_helper_writer, siteTracker.TrackCheckoutViewCart()); #line default #line hidden #line 277 "THEME_BPDTHEME01_Opening Body_$$_02122024134428503" #line default #line hidden #line 278 "THEME_BPDTHEME01_Opening Body_$$_02122024134428503" WriteTo(__razor_helper_writer, siteTracker.TrackCheckoutBeginCheckout()); #line default #line hidden #line 278 "THEME_BPDTHEME01_Opening Body_$$_02122024134428503" // Rendering the product list contents for categories and search pages or product details for product page if (trackingDetails.PageFlags.IsProductDisplayPage && (trackingDetails.UsingEnhancedECommerce || trackingDetails.RenderDigitalRemarketingProducts)) { var currentPage = Util.CurrentPageNumberForType("Product"); var pagingStartIndex = (currentPage >= 1 ? (currentPage - 1) : 0) * recordsPerPage; #line default #line hidden #line 287 "THEME_BPDTHEME01_Opening Body_$$_02122024134428503" WriteTo(__razor_helper_writer, BPDUtil.CallOrDeferScript( item => new RazorEngine.Templating.TemplateWriter(__razor_template_writer => { #line default #line hidden WriteLiteralTo(__razor_template_writer, ""); #line 291 "THEME_BPDTHEME01_Opening Body_$$_02122024134428503" }))); #line default #line hidden #line 291 "THEME_BPDTHEME01_Opening Body_$$_02122024134428503" if (trackingDetails.UsingEnhancedECommerce) { #line default #line hidden #line 295 "THEME_BPDTHEME01_Opening Body_$$_02122024134428503" WriteTo(__razor_helper_writer, BPDUtil.CallOrDeferScript( item => new RazorEngine.Templating.TemplateWriter(__razor_template_writer => { #line default #line hidden WriteLiteralTo(__razor_template_writer, ""); #line 298 "THEME_BPDTHEME01_Opening Body_$$_02122024134428503" }))); #line default #line hidden #line 298 "THEME_BPDTHEME01_Opening Body_$$_02122024134428503" } } // Rendering the submission of questionnaires (using the old questionnaire page) var questionnaireName = GetQuestionnaireName(); if (!string.IsNullOrWhiteSpace(questionnaireName)) { #line default #line hidden #line 306 "THEME_BPDTHEME01_Opening Body_$$_02122024134428503" WriteTo(__razor_helper_writer, BPDUtil.CallOrDeferScript( item => new RazorEngine.Templating.TemplateWriter(__razor_template_writer => { #line default #line hidden WriteLiteralTo(__razor_template_writer, ""); #line 309 "THEME_BPDTHEME01_Opening Body_$$_02122024134428503" }))); #line default #line hidden #line 309 "THEME_BPDTHEME01_Opening Body_$$_02122024134428503" } if (trackingDetails.RenderOrderDetails(siteTracker.Order)) { #line default #line hidden #line 314 "THEME_BPDTHEME01_Opening Body_$$_02122024134428503" WriteTo(__razor_helper_writer, BPDUtil.CallOrDeferScript( item => new RazorEngine.Templating.TemplateWriter(__razor_template_writer => { #line default #line hidden WriteLiteralTo(__razor_template_writer, ""); #line 317 "THEME_BPDTHEME01_Opening Body_$$_02122024134428503" }))); #line default #line hidden #line 317 "THEME_BPDTHEME01_Opening Body_$$_02122024134428503" } // Render the order tracking for completed purchase if (trackingDetails.IsOrderCompletePage && trackingDetails.UsingEnhancedECommerce && siteTracker.Order.IsCurrent() && siteTracker.Order.SoOrderPackages > 0 && siteTracker.Order.OrderTypeEnum != ProntoSalesOrder.OrderTypesEnum.Quote) { #line default #line hidden #line 327 "THEME_BPDTHEME01_Opening Body_$$_02122024134428503" WriteTo(__razor_helper_writer, BPDUtil.CallOrDeferScript( item => new RazorEngine.Templating.TemplateWriter(__razor_template_writer => { #line default #line hidden WriteLiteralTo(__razor_template_writer, ""); #line 330 "THEME_BPDTHEME01_Opening Body_$$_02122024134428503" }))); #line default #line hidden #line 330 "THEME_BPDTHEME01_Opening Body_$$_02122024134428503" } // Render the order tracking for cart contents on initial load of all pages (except checkout completed i.e. not for purchase just for what's currently in cart) if (!trackingDetails.IsOrderCompletePage && trackingDetails.IsCartContentsAllPagesLoadEnabled && siteTracker.Order.IsCurrent() && siteTracker.Order.SoOrderPackages > 0) { #line default #line hidden #line 337 "THEME_BPDTHEME01_Opening Body_$$_02122024134428503" WriteTo(__razor_helper_writer, BPDUtil.CallOrDeferScript( item => new RazorEngine.Templating.TemplateWriter(__razor_template_writer => { #line default #line hidden WriteLiteralTo(__razor_template_writer, ""); #line 340 "THEME_BPDTHEME01_Opening Body_$$_02122024134428503" }))); #line default #line hidden #line 340 "THEME_BPDTHEME01_Opening Body_$$_02122024134428503" } // Render the Digital remarketing script if (trackingDetails.UsingDigitalRemarketing) { // If is not the product display page the products will come from the order if (!trackingDetails.PageFlags.IsProductDisplayPage) { #line default #line hidden #line 349 "THEME_BPDTHEME01_Opening Body_$$_02122024134428503" WriteTo(__razor_helper_writer, BPDUtil.CallOrDeferScript( item => new RazorEngine.Templating.TemplateWriter(__razor_template_writer => { #line default #line hidden WriteLiteralTo(__razor_template_writer, ""); #line 360 "THEME_BPDTHEME01_Opening Body_$$_02122024134428503" }))); #line default #line hidden #line 360 "THEME_BPDTHEME01_Opening Body_$$_02122024134428503" } #line default #line hidden #line 363 "THEME_BPDTHEME01_Opening Body_$$_02122024134428503" WriteTo(__razor_helper_writer, BPDUtil.CallOrDeferScript( item => new RazorEngine.Templating.TemplateWriter(__razor_template_writer => { #line default #line hidden WriteLiteralTo(__razor_template_writer, ""); #line 381 "THEME_BPDTHEME01_Opening Body_$$_02122024134428503" }))); #line default #line hidden #line 381 "THEME_BPDTHEME01_Opening Body_$$_02122024134428503" } #line default #line hidden #line 384 "THEME_BPDTHEME01_Opening Body_$$_02122024134428503" WriteTo(__razor_helper_writer, Raw(GoogleTrustedStoreHandler.GenerateGoogleTrustedStoreOutput(siteTracker.Order))); #line default #line hidden #line 384 "THEME_BPDTHEME01_Opening Body_$$_02122024134428503" } } #line default #line hidden }); #line 387 "THEME_BPDTHEME01_Opening Body_$$_02122024134428503" } #line default #line hidden public C_THEMEBPDTHEME01OpeningBody02122024134428503() { } public override void Execute() { WriteLiteral("\r\n"); #line 11 "THEME_BPDTHEME01_Opening Body_$$_02122024134428503" Util.AddJsDependency("/Scripts/cv.css.tracker.js"); #line default #line hidden WriteLiteral("\r\n"); #line 12 "THEME_BPDTHEME01_Opening Body_$$_02122024134428503" Util.AddJsDependency("/Scripts/cv.css.product.js"); #line default #line hidden WriteLiteral("\r\n\r\n"); #line 14 "THEME_BPDTHEME01_Opening Body_$$_02122024134428503" var siteTracker = new SiteTracker(true, true); var recordsPerPage = siteTracker.IsCluster ? 9999 : Util.RecordsPerPage(User.CurrentUser, "Product"); var sys = SystemControl.Live; // If Third Party Installments in use and using zipMoney or zipPay then need to add scripts on all pages for targetting a // special info page. if (sys.IsThirdPartyInstallmentsProviderIsZipMoneyAndIsEnabled || sys.IsThirdPartyInstallmentsProviderIsZipPayAndIsEnabled) { var zipProductMarketingPageScriptUrl = Util.TranslateResourceOrDefault("rcThirdPartyInstallmentPaymentZipProductMarketingScriptUrl", "https://d3k1w8lx8mqizo.cloudfront.net/lib/js/zm-widget-js/dist/zipmoney-widgets-v1.min.js"); var isProductionPaymentMode = sys.ThirdPartyInstallmentsPaymentMode == ThirdPartyInstallmentsPaymentModeEnum.Production; if (zipProductMarketingPageScriptUrl.HasContent()) { #line default #line hidden WriteLiteral("