Error executing template "Designs/Swift/eCom/ProductCatalog/ProductViewDetail.cshtml"
System.Data.SqlClient.SqlException (0x80131904): Login failed for user 'Acton_Prod'. Reason: Server is in single user mode. Only one administrator can connect at this time.
   at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
   at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)
   at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
   at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
   at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
   at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
   at System.Data.SqlClient.SqlConnection.Open()
   at Dynamicweb.Data.DatabaseConnectionProvider.CreateConnection(Boolean open)
   at Dynamicweb.Data.Database.CreateConnection()
   at Dynamicweb.Data.Database.CreateDataReader(CommandBuilder commandBuilder, IDbConnection connection, IDbTransaction transaction, Int32 commandTimeout)
   at Dynamicweb.Ecommerce.Products.DetailRepository.GetInheritedDetailsBulk(List`1 productIds, String detailType)
   at Dynamicweb.Ecommerce.Products.DetailService.GetDetailsBulk(IEnumerable`1 productKeys, String detailType, Boolean excludeDefaultImage)
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at Dynamicweb.Ecommerce.ProductCatalog.ViewEngine.GetDefaultImage(MediaViewModelSettings settings, String productId, String languageId, String variantId, Lazy`1 productImages, Lazy`1 details)
   at Dynamicweb.Ecommerce.ProductCatalog.ViewEngine.GetDefaultImage(MediaViewModelSettings settings, Product product, Lazy`1 productImages, Lazy`1 details)
   at Dynamicweb.Ecommerce.ProductCatalog.ViewEngine.<>c__DisplayClass3_2.<BulkCreateView>b__62()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_f984717ee23b4315b58129d10f5c7307.Execute() in D:\Dynamicweb.net\Solutions\Easyflow\Acton-Prod\Files\Templates\Designs\Swift\eCom\ProductCatalog\ProductViewDetail.cshtml:line 7
   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.<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()
ClientConnectionId:27a251f7-d06e-4d54-bfa2-e0381eedac6d
Error Number:18461,State:1,Class:14

1 @inherits ViewModelTemplate<ProductViewModel> 2 @using Dynamicweb.Rendering 3 @using Dynamicweb.Ecommerce.ProductCatalog 4 @using Dynamicweb.Core 5 6 @{ 7 Dynamicweb.Frontend.PageView.Current().Meta.AddTag("og:image", Model.DefaultImage.Value); 8 Dynamicweb.Frontend.PageView.Current().Meta.AddTag("og:image:alt", Model.Name); 9 Dynamicweb.Frontend.PageView.Current().Meta.AddTag("og:description", string.IsNullOrEmpty(Model.MetaDescription) ? Model.Name : Model.MetaDescription); 10 11 Dynamicweb.Frontend.PageView.Current().Meta.AddTag("twitter:image", Model.DefaultImage.Value); 12 Dynamicweb.Frontend.PageView.Current().Meta.AddTag("twitter:image:alt", Model.Name); 13 Dynamicweb.Frontend.PageView.Current().Meta.AddTag("twitter:description", string.IsNullOrEmpty(Model.MetaDescription) ? Model.Name : Model.MetaDescription); 14 } 15 16 @{ 17 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 18 { 19 Dynamicweb.Context.Current.Items["ProductDetails"] = Model; 20 } 21 else 22 { 23 Dynamicweb.Context.Current.Items.Add("ProductDetails", Model); 24 } 25 26 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 27 if (isLazyLoadingForProductInfoEnabled) 28 { 29 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 30 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 31 bool hasVariantId = !string.IsNullOrEmpty(Model.VariantId); 32 string variantIdParam = hasVariantId ? $"/{Model.VariantId}" : ""; 33 string priceFilledProperties = $"Price,PriceFormatted{(showPricesWithVat == "false" && !neverShowVat ? ",PriceWithVat,PriceWithVatFormatted" : "")}"; 34 string productInfoFeed = $@"/dwapi/ecommerce/products/{Model.Id}{variantIdParam} 35 ?UserId={Converter.ToString(Pageview.User?.ID)} 36 &LanguageId={Pageview.Area.EcomLanguageId}&CurrencyCode={Pageview.Area.EcomCurrencyId}&CountryCode={Pageview.Area.EcomCountryCode}&ShopId={Pageview.Area.EcomShopId} 37 &FilledProperties=Id,Price,PriceBeforeDiscount,StockLevel,VariantInfo,NeverOutOfstock,Prices 38 &PriceSettings.ShowPricesWithVat={Pageview.Area.EcomPricesWithVat} 39 &PriceSettings.FilledProperties={priceFilledProperties} 40 &getproductinfo=true"; 41 Dynamicweb.Context.Current.Items["ProductInfoFeed"] = productInfoFeed; 42 43 <script type="module"> 44 swift.LiveProductInfo.init(); 45 </script> 46 } 47 } 48 49 <script> 50 window.addEventListener('load', function (event) { 51 swift.Video.init(); 52 }); 53 </script> 54
Error executing template "Designs/Swift/Paragraph/Swift_ProductCustomerNumber_EA.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
   at CompiledRazorTemplates.Dynamic.RazorEngine_41f1739f522e48bfbe9a1c3cc21f66ed.Execute() in D:\Dynamicweb.net\Solutions\Easyflow\Acton-Prod\Files\Templates\Designs\Swift\Paragraph\Swift_ProductCustomerNumber_EA.cshtml:line 39
   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.<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.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = new ProductViewModel(); 6 7 ProductViewModelSettings productSetting = new ProductViewModelSettings 8 { 9 LanguageId = Dynamicweb.Ecommerce.Common.Context.LanguageID, 10 CurrencyCode = Dynamicweb.Ecommerce.Common.Context.Currency.Code, 11 CountryCode = Dynamicweb.Ecommerce.Common.Context.Country.Code2, 12 ShopId = Pageview.Area.EcomShopId 13 }; 14 15 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 16 { 17 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 18 } else if (Pageview.Item["DummyProduct"] != null) { 19 string dummyProductId = ""; 20 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 21 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 22 if (productList.Products != null) 23 { 24 foreach (var p in productList.Products) { dummyProductId = p.Id; } 25 ProductViewModel dummyProduct = dummyProductId != "" ? ViewModelFactory.CreateView(productSetting, dummyProductId) : new ProductViewModel(); 26 product = dummyProduct; 27 } else { 28 product = ViewModelFactory.CreateView(productSetting, Dynamicweb.Ecommerce.Services.Products.GetLastActiveProducts(1, Dynamicweb.Ecommerce.Common.Context.LanguageID, false).FirstOrDefault().Id); 29 } 30 } else if (Pageview.Item["DummyProduct"] == null) { 31 product = ViewModelFactory.CreateView(productSetting, Dynamicweb.Ecommerce.Services.Products.GetLastActiveProducts(1, Dynamicweb.Ecommerce.Common.Context.LanguageID, false).FirstOrDefault().Id); 32 } 33 34 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 35 horizontalAlign = horizontalAlign == "center" ? "text-center" : horizontalAlign; 36 horizontalAlign = horizontalAlign == "end" ? "text-end" : horizontalAlign; 37 38 FieldValueViewModel productCustomIdObject; 39 product.ProductFields.TryGetValue("ProductCustomId", out productCustomIdObject); 40 } 41 42 @if (!Model.Item.GetBoolean("HideProductNumber") && product.Id != null && productCustomIdObject != null && !string.IsNullOrEmpty(productCustomIdObject.Value.ToString()) && !productCustomIdObject.Value.ToString().Contains("|")) 43 { 44 <div class="fs-7 opacity-85 @horizontalAlign item_@Model.Item.SystemName.ToLower()">@Translate("EA Your product number") @productCustomIdObject.Value.ToString()</div> 45 } 46 else if (Pageview.IsVisualEditorMode) 47 { 48 <div class="alert alert-warning">@Translate("No products available")</div> 49 } 50
Error executing template "Designs/Swift/Paragraph/Swift_ProductGroupDescription_EA.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
   at CompiledRazorTemplates.Dynamic.RazorEngine_b5d46b1e3e2d41b78b87ccb7f683c34d.Execute() in D:\Dynamicweb.net\Solutions\Easyflow\Acton-Prod\Files\Templates\Designs\Swift\Paragraph\Swift_ProductGroupDescription_EA.cshtml:line 48
   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.<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.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = new ProductViewModel(); 6 7 ProductViewModelSettings productSetting = new ProductViewModelSettings 8 { 9 LanguageId = Dynamicweb.Ecommerce.Common.Context.LanguageID, 10 CurrencyCode = Dynamicweb.Ecommerce.Common.Context.Currency.Code, 11 CountryCode = Dynamicweb.Ecommerce.Common.Context.Country.Code2, 12 ShopId = Pageview.Area.EcomShopId 13 }; 14 15 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) { 16 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 17 } else if (Pageview.Item["DummyProduct"] != null) { 18 string dummyProductId = ""; 19 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 20 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 21 if (productList.Products != null) 22 { 23 foreach (var p in productList.Products) { dummyProductId = p.Id; } 24 ProductViewModel dummyProduct = dummyProductId != "" ? ViewModelFactory.CreateView(productSetting, dummyProductId) : new ProductViewModel(); 25 product = dummyProduct; 26 } 27 else 28 { 29 product = ViewModelFactory.CreateView(productSetting, Dynamicweb.Ecommerce.Services.Products.GetLastActiveProducts(1, Dynamicweb.Ecommerce.Common.Context.LanguageID, false).FirstOrDefault().Id); 30 } 31 } else if (Pageview.Item["DummyProduct"] == null) { 32 product = ViewModelFactory.CreateView(productSetting, Dynamicweb.Ecommerce.Services.Products.GetLastActiveProducts(1, Dynamicweb.Ecommerce.Common.Context.LanguageID, false).FirstOrDefault().Id); 33 } 34 35 bool hideTitle = Model.Item.GetBoolean("HideTitle"); 36 37 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? " theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 38 39 string titleFontSize = Model.Item.GetRawValueString("TitleFontSize", "display-4"); 40 41 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 42 contentPadding = contentPadding == "small" ? "p-2 p-md-3" : contentPadding; 43 contentPadding = contentPadding == "large" ? "p-4 p-md-5" : contentPadding; 44 45 string maxWidth = Model.Item.GetRawValueString("TextReadability", "max-width-on"); 46 maxWidth = maxWidth == "max-width-on" ? "mw-75ch d-inline-block" : maxWidth; 47 maxWidth = maxWidth == "max-width-off" ? "" : maxWidth; 48 var groupDescription = Dynamicweb.Ecommerce.Services.ProductGroups.GetGroup(product.PrimaryOrDefaultGroup.Id).Description; 49 } 50 51 @if (!string.IsNullOrEmpty(groupDescription)) { 52 <div class="@(theme) h-100 item_@Model.Item.SystemName.ToLower()"> 53 <div class="@(contentPadding)"> 54 @if (!hideTitle && !string.IsNullOrEmpty(Model.Item.GetString("Title"))) 55 { 56 <div class="text-start pb-2 pb-lg-4"> 57 <h2 class="@titleFontSize @(maxWidth)">@Model.Item.GetString("Title")</h2> 58 </div> 59 } 60 <div class="@(maxWidth)" itemprop="description"> 61 @groupDescription 62 </div> 63 </div> 64 </div> 65 } else if (Pageview.IsVisualEditorMode) { 66 <div class="alert alert-dark m-0">@Translate("Group description will be shown here, if any")</div> 67 } 68
Ved at klikke 'Acceptér Alle' så giver til tiladelse til at vi må indsamle information om dig til forskellige formål, hvilket inkluderer: Funktionalitet, Statestik og Marketing