Error executing template "Designs/Swift/eCom/ProductCatalog/ProductViewDetail.cshtml"
System.Data.SqlClient.SqlException (0x80131904): Execution Timeout Expired.  The timeout period elapsed prior to completion of the operation or the server is not responding. ---> System.ComponentModel.Win32Exception (0x80004005): The wait operation timed out
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
   at System.Data.SqlClient.SqlDataReader.get_MetaData()
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
   at Dynamicweb.Data.Database.CreateDataReader(IDbCommand command, CommandBehavior behavior)
   at Dynamicweb.Data.Database.CreateDataReader(CommandBuilder commandBuilder, IDbConnection connection, IDbTransaction transaction, CommandBehavior behavior, Int32 commandTimeout)
   at Dynamicweb.Data.Database.CreateDataReader(CommandBuilder commandBuilder, IDbConnection connection, IDbTransaction transaction, Int32 commandTimeout)
   at Dynamicweb.Ecommerce.Products.ProductRepository.Dynamicweb.Ecommerce.Products.IProductRepository.GetProductKeysByGroupId(String groupId, Boolean useOrderBy, Boolean includeVariants, String productLanguageId, Boolean doRefactoring, Boolean useAssortments)
   at Dynamicweb.Ecommerce.Orders.Discounts.Discount.ProcessProductSelections(HashSet`1& productKeys, HashSet`1& includedQueries, HashSet`1& excludedQueries)
   at Dynamicweb.Ecommerce.Orders.Discounts.Discount.GetRelevantProductKeys()
   at Dynamicweb.Ecommerce.Orders.Discounts.DiscountService.StatelessSetLookup(Discount discount, ConcurrentDictionary`2 lookup)
   at Dynamicweb.Ecommerce.Orders.Discounts.DiscountService.InitializeLookup()
   at System.Lazy`1.CreateValue()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Lazy`1.get_Value()
   at Dynamicweb.Ecommerce.Orders.Discounts.DiscountService.GetDiscounts(DiscountApplyType[] discountTypes, String[] productKeys, User user)
   at Dynamicweb.Ecommerce.Orders.Discounts.DiscountInfoCollection.LoadDiscounts()
   at Dynamicweb.Ecommerce.ProductCatalog.ViewEngine.GetDiscountInfo(PriceViewModelSettings settings, Product product)
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at Dynamicweb.Ecommerce.ProductCatalog.ViewEngine.<>c__DisplayClass3_2.<BulkCreateView>b__46()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at Dynamicweb.Ecommerce.ProductCatalog.ViewEngine.<>c__DisplayClass3_2.<BulkCreateView>b__48()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at Dynamicweb.Ecommerce.ProductCatalog.ViewEngine.GetPrice(PriceViewModelSettings settings, IList`1 products, Boolean& pricesHasBeenPrepared, Object lock, Lazy`1 priceInfo)
   at Dynamicweb.Ecommerce.ProductCatalog.ViewEngine.<>c__DisplayClass3_2.<BulkCreateView>b__49()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_21fed7ee1db54d93bea5e184f7af1f05.Execute() in D:\dynamicweb.net\Solutions\twodayco3\evasolo.cloud.dynamicweb-cms.com\Files\Templates\Designs\Swift\eCom\ProductCatalog\ProductViewDetail.cshtml:line 67
   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:602ca716-b033-4a0c-bca4-46c75e1f8df0
Error Number:-2,State:0,Class:11

1 @inherits ViewModelTemplate<ProductViewModel> 2 @using Dynamicweb.Rendering 3 @using Dynamicweb.Ecommerce.ProductCatalog 4 @using Dynamicweb.Core 5 @using Dynamicweb.Environment 6 7 @{ 8 string metaDescription = string.IsNullOrEmpty(Model.MetaDescription) ? Model.Name : Model.MetaDescription; 9 10 Pageview.Meta.AddTag($"<meta property=\"og:image\" content=\"{Dynamicweb.Context.Current.Request.Url.Scheme}://{Dynamicweb.Context.Current.Request.Url.Host}{Model.DefaultImage.Value}\">"); 11 Pageview.Meta.AddTag($"<meta property=\"og:image:alt\" content=\"{Model.Name}\">"); 12 Pageview.Meta.AddTag($"<meta property=\"og:description\" content=\"{metaDescription}\">"); 13 14 Pageview.Meta.AddTag("twitter:image", Model.DefaultImage.Value); 15 Pageview.Meta.AddTag("twitter:image:alt", Model.Name); 16 Pageview.Meta.AddTag("twitter:description", metaDescription); 17 } 18 19 @{ 20 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 21 { 22 Dynamicweb.Context.Current.Items["ProductDetails"] = Model; 23 } 24 else 25 { 26 Dynamicweb.Context.Current.Items.Add("ProductDetails", Model); 27 } 28 29 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 30 if (isLazyLoadingForProductInfoEnabled) 31 { 32 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 33 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 34 bool hasVariantId = !string.IsNullOrEmpty(Model.VariantId); 35 string variantIdParam = hasVariantId ? $"/{Model.VariantId}" : ""; 36 string priceFilledProperties = $"Price,PriceFormatted{(showPricesWithVat == "false" && !neverShowVat ? ",PriceWithVat,PriceWithVatFormatted" : "")}"; 37 string productInfoFeed = $@"/dwapi/ecommerce/products/{Model.Id}{variantIdParam} 38 ?UserId={Converter.ToString(Pageview.User?.ID)} 39 &LanguageId={Pageview.Area.EcomLanguageId}&CurrencyCode={Pageview.Area.EcomCurrencyId}&CountryCode={Pageview.Area.EcomCountryCode}&ShopId={Pageview.Area.EcomShopId} 40 &FilledProperties=Id,Price,PriceBeforeDiscount,StockLevel,VariantInfo,NeverOutOfstock,Prices 41 &PriceSettings.ShowPricesWithVat={Pageview.Area.EcomPricesWithVat} 42 &PriceSettings.FilledProperties={priceFilledProperties} 43 &getproductinfo=true"; 44 Dynamicweb.Context.Current.Items["ProductInfoFeed"] = productInfoFeed; 45 46 <script type="module"> 47 swift.LiveProductInfo.init(); 48 </script> 49 } 50 51 string googleTagManagerID = Pageview.AreaSettings.GetString("GoogleTagManagerID"); 52 string googleAnalyticsMeasurementID = Pageview.AreaSettings.GetString("GoogleAnalyticsMeasurementID"); 53 54 bool allowTracking = true; 55 if (CookieManager.IsCookieManagementActive) 56 { 57 var cookieOptInLevel = CookieManager.GetCookieOptInLevel(); 58 allowTracking = cookieOptInLevel == CookieOptInLevel.All || (cookieOptInLevel == CookieOptInLevel.Functional && CookieManager.GetCookieOptInCategories().Contains("Statistical")); 59 } 60 61 if ((!string.IsNullOrWhiteSpace(googleAnalyticsMeasurementID) || !string.IsNullOrWhiteSpace(googleTagManagerID)) && allowTracking) 62 { 63 <script> 64 window.addEventListener('CookieInformationConsentGiven', function (event) { 65 if (CookieInformation.getConsentGivenFor('cookie_cat_necessary')) { 66 gtag("event", "view_item", { 67 currency: "@Model.Price.CurrencyCode", 68 value: @PriceViewModelExtensions.ToStringInvariant(Model.Price), 69 items: [ 70 { 71 item_id: "@Model.Number", 72 item_name: "@Dynamicweb.Core.Encoders.HtmlEncoder.JavaScriptStringEncode(Model.Name)", 73 currency: "@Model.Price.CurrencyCode", 74 price: @PriceViewModelExtensions.ToStringInvariant(Model.Price) 75 } 76 ] 77 }); 78 } 79 }, false); 80 </script> 81 } 82 } 83 84 <script> 85 window.addEventListener('load', function (event) { 86 swift.Video.init(); 87 }); 88 </script> 89
DETAIL571145LANG5default
DETAIL571145LANG5Lifestyle_Photo_1
DETAIL571145LANG5Lifestyle_Photo_2
DETAIL571145LANG5Lifestyle_Photo_3
DETAIL571145LANG5Product_Photo_1
DETAIL571145LANG5Product_Photo_2
DETAIL571145LANG5Product_Photo_3
DETAIL571145LANG5Product_Photo_4
DETAIL571145LANG5Product_Photo_5
DETAIL571145LANG5Product_Photo_6
DETAIL571145LANG5Product_Photo_7
DETAIL571145LANG5Product_Photo_8
DETAIL571145LANG5Product_Photo_9
DETAIL571145LANG5Product_Photo_10
DETAIL571145LANG5Product_Photo_11

FireSpot grill

Custom_USP1
Hög och skulptural grill av cortenstål med integrerad avskärmning av de hårdaste vindarna
Custom_USP2
Används både som grill med medföljande grillgaller och som eldstad i trädgården eller på terrassen under kyliga sommarkvällar
Custom_USP3
Vind och väder gör att eldstaden bara blir vackrare och mer patinerad med tiden
Custom_USP4
Tål att stå ute året runt – ytterst beständig och rosten smittar inte av sig på samma sätt som annan rost
Error executing template "Designs/Swift/Paragraph/Swift_ProductBadges_Custom.cshtml"
System.Data.SqlClient.SqlException (0x80131904): Execution Timeout Expired.  The timeout period elapsed prior to completion of the operation or the server is not responding. ---> System.ComponentModel.Win32Exception (0x80004005): The wait operation timed out
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
   at System.Data.SqlClient.SqlDataReader.get_MetaData()
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
   at Dynamicweb.Data.Database.CreateDataReader(IDbCommand command, CommandBehavior behavior)
   at Dynamicweb.Data.Database.CreateDataReader(CommandBuilder commandBuilder, IDbConnection connection, IDbTransaction transaction, CommandBehavior behavior, Int32 commandTimeout)
   at Dynamicweb.Data.Database.CreateDataReader(CommandBuilder commandBuilder, IDbConnection connection, IDbTransaction transaction, Int32 commandTimeout)
   at Dynamicweb.Ecommerce.Products.ProductRepository.Dynamicweb.Ecommerce.Products.IProductRepository.GetProductKeysByGroupId(String groupId, Boolean useOrderBy, Boolean includeVariants, String productLanguageId, Boolean doRefactoring, Boolean useAssortments)
   at Dynamicweb.Ecommerce.Orders.Discounts.Discount.ProcessProductSelections(HashSet`1& productKeys, HashSet`1& includedQueries, HashSet`1& excludedQueries)
   at Dynamicweb.Ecommerce.Orders.Discounts.Discount.GetRelevantProductKeys()
   at Dynamicweb.Ecommerce.Orders.Discounts.DiscountService.StatelessSetLookup(Discount discount, ConcurrentDictionary`2 lookup)
   at Dynamicweb.Ecommerce.Orders.Discounts.DiscountService.InitializeLookup()
   at System.Lazy`1.CreateValue()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Lazy`1.get_Value()
   at Dynamicweb.Ecommerce.Orders.Discounts.DiscountService.GetDiscounts(DiscountApplyType[] discountTypes, String[] productKeys, User user)
   at Dynamicweb.Ecommerce.Orders.Discounts.DiscountInfoCollection.LoadDiscounts()
   at Dynamicweb.Ecommerce.ProductCatalog.ViewEngine.GetDiscountInfo(PriceViewModelSettings settings, Product product)
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at Dynamicweb.Ecommerce.ProductCatalog.ViewEngine.<>c__DisplayClass3_2.<BulkCreateView>b__46()
   at System.Lazy`1.CreateValue()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Lazy`1.get_Value()
   at Dynamicweb.Ecommerce.ProductCatalog.ViewEngine.GetPrice(PriceViewModelSettings settings, IList`1 products, Boolean& pricesHasBeenPrepared, Object lock, Lazy`1 priceInfo)
   at Dynamicweb.Ecommerce.ProductCatalog.ViewEngine.<>c__DisplayClass3_2.<BulkCreateView>b__51()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_7b4bf5e1fb35404bb467719d28339ed6.Execute() in D:\dynamicweb.net\Solutions\twodayco3\evasolo.cloud.dynamicweb-cms.com\Files\Templates\Designs\Swift\Paragraph\Swift_ProductBadges_Custom.cshtml:line 118
   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:602ca716-b033-4a0c-bca4-46c75e1f8df0
Error Number:-2,State:0,Class:11

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using System 3 @using System.Collections.Generic 4 @using System.Linq 5 @using Dynamicweb.Frontend 6 @using Dynamicweb.Content 7 @using Dynamicweb.Core 8 @using Dynamicweb.Ecommerce.ProductCatalog 9 10 @{ 11 ProductViewModel product = null; 12 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 13 { 14 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 15 } 16 else if (Pageview.Page.Item["DummyProduct"] != null && Pageview.IsVisualEditorMode) 17 { 18 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 19 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 20 21 if (productList?.Products is object) 22 { 23 product = productList.Products[0]; 24 } 25 } 26 27 DateTime launchDate = product.ProductFields.ContainsKey("Custom_LaunchDate") ? Converter.ToDateTime(product.ProductFields["Custom_LaunchDate"].Value) : DateTime.MinValue; 28 DateTime currentDate = DateTime.Today; 29 bool showComingSoonBadge = currentDate < launchDate && string.Equals( Model.Item.GetRawValueString("NewBadgeDesign"), "comingsoon", StringComparison.InvariantCultureIgnoreCase ); 30 } 31 32 @if (product is object) 33 { 34 var badgeParms = new Dictionary<string, object>(); 35 badgeParms.Add("size", "h7"); 36 badgeParms.Add("saleBadgeType", Model.Item.GetRawValue("SaleBadgeType")); 37 badgeParms.Add("saleBadgeCssClassName", Model.Item.GetRawValue("SaleBadgeDesign")); 38 badgeParms.Add("newBadgeCssClassName", Model.Item.GetRawValue("NewBadgeDesign")); 39 badgeParms.Add("newPublicationDays", Model.Item.GetInt32("NewPublicationDays")); 40 badgeParms.Add("campaignBadgesValues", Model.Item.GetRawValueString("CampaignBadges")); 41 42 string badgeSize = Model.Item.GetRawValueString("BadgeSize", "fs-2"); 43 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 44 horizontalAlign = horizontalAlign == "center" ? "text-center" : horizontalAlign; 45 horizontalAlign = horizontalAlign == "end" ? "text-end" : horizontalAlign; 46 47 Dictionary<string, ParagraphInfoViewModel> badgeConfigurations; 48 List<string> campaignBadgesValues = Model.Item.GetRawValueString("CampaignBadges") != null ? Model.Item.GetRawValueString("CampaignBadges").Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries).ToList() : new List<string>(); 49 50 if (Dynamicweb.Context.Current.Items.Contains("badgeConfigurations")) 51 { 52 badgeConfigurations = (Dictionary<string, ParagraphInfoViewModel>)Dynamicweb.Context.Current.Items["badgeConfigurations"]; 53 } 54 else 55 { 56 var badgesPage = Pageview.AreaSettings.GetLink("EcommerceBadgesPage") != null ? Pageview.AreaSettings.GetLink("EcommerceBadgesPage").PageId : 0; 57 var allBadges = badgesPage != 0 ? Dynamicweb.Content.Services.Paragraphs.GetParagraphsByPageId(badgesPage) : null; 58 59 badgeConfigurations = new Dictionary<string, ParagraphInfoViewModel>(); 60 61 if ( allBadges != null ) 62 { 63 foreach ( Paragraph badge in allBadges ) 64 { 65 var paragraphviewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreateParagraphInfoViewModel( badge ); 66 string cssClassName = paragraphviewModel.Item.GetString( "CssClassName" )?.Trim().ToLower() ?? string.Empty;; 67 if ( !badgeConfigurations.ContainsKey( cssClassName ) ) 68 { 69 badgeConfigurations.Add( cssClassName, paragraphviewModel ); 70 } 71 } 72 } 73 74 Dynamicweb.Context.Current.Items.Add("badgeConfigurations", badgeConfigurations); 75 } 76 77 int badgesCount = 0; 78 if (badgeConfigurations.Any()) 79 { 80 foreach (string campaign in campaignBadgesValues) 81 { 82 if (!string.IsNullOrEmpty(campaign)) 83 { 84 FieldValueViewModel availableCampaignsObject; 85 product.ProductFields.TryGetValue("Campaign", out availableCampaignsObject); 86 87 if (availableCampaignsObject != null) 88 { 89 string campaignType = string.Empty; 90 91 if (badgeConfigurations.ContainsKey(campaign)) 92 { 93 ParagraphInfoViewModel paragraphviewModel; 94 if (badgeConfigurations.TryGetValue(campaign, out paragraphviewModel)) 95 { 96 campaignType = paragraphviewModel.Item.GetRawValueString("CampaignType"); 97 } 98 } 99 100 List<FieldOptionValueViewModel> availableCampaigns = (List<FieldOptionValueViewModel>)availableCampaignsObject.Value; 101 102 foreach (FieldOptionValueViewModel availableOption in availableCampaigns) 103 { 104 if (campaignType == availableOption.Value) 105 { 106 badgesCount++; 107 break; 108 } 109 } 110 } 111 } 112 } 113 } 114 115 bool saleBadgeEnabled = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("SaleBadgeDesign")) && Model.Item.GetRawValueString("SaleBadgeDesign") != "none" ? true : false; 116 bool newBadgeEnabled = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("NewBadgeDesign")) && Model.Item.GetRawValueString("NewBadgeDesign") != "none" ? true : false; 117 DateTime createdDate = product.Created.Value; 118 bool showBadges = saleBadgeEnabled && product.Discount.Price != 0 ? true : false; 119 showBadges = (newBadgeEnabled && Model.Item.GetInt32("NewPublicationDays") == 0) || (newBadgeEnabled && (createdDate.AddDays(Model.Item.GetInt32("NewPublicationDays")) > DateTime.Now)) ? true : showBadges; 120 showBadges = (!string.IsNullOrEmpty(Model.Item.GetRawValueString("CampaignBadges")) && badgesCount != 0) || showComingSoonBadge || showBadges; 121 122 if (showBadges) 123 { 124 <div class="@badgeSize @horizontalAlign item_@Model.Item.SystemName.ToLower()"> 125 @RenderPartial("Components/EcommerceBadge_Custom.cshtml", product, badgeParms) 126 </div> 127 } 128 else if (Pageview.IsVisualEditorMode) 129 { 130 <span class="badge bg-success text-light rounded-0">@Translate("Badge example")</span> 131 } 132 } 133 else if (Pageview.IsVisualEditorMode) 134 { 135 <span class="badge bg-success text-light rounded-0">@Translate("Badge example")</span> 136 } 137 138
Error executing template "/Designs/Swift/Paragraph/Swift_ProductPrice_Custom.cshtml"
System.Data.SqlClient.SqlException (0x80131904): Execution Timeout Expired.  The timeout period elapsed prior to completion of the operation or the server is not responding. ---> System.ComponentModel.Win32Exception (0x80004005): The wait operation timed out
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
   at System.Data.SqlClient.SqlDataReader.get_MetaData()
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
   at Dynamicweb.Data.Database.CreateDataReader(IDbCommand command, CommandBehavior behavior)
   at Dynamicweb.Data.Database.CreateDataReader(CommandBuilder commandBuilder, IDbConnection connection, IDbTransaction transaction, CommandBehavior behavior, Int32 commandTimeout)
   at Dynamicweb.Data.Database.CreateDataReader(CommandBuilder commandBuilder, IDbConnection connection, IDbTransaction transaction, Int32 commandTimeout)
   at Dynamicweb.Ecommerce.Products.ProductRepository.Dynamicweb.Ecommerce.Products.IProductRepository.GetProductKeysByGroupId(String groupId, Boolean useOrderBy, Boolean includeVariants, String productLanguageId, Boolean doRefactoring, Boolean useAssortments)
   at Dynamicweb.Ecommerce.Orders.Discounts.Discount.ProcessProductSelections(HashSet`1& productKeys, HashSet`1& includedQueries, HashSet`1& excludedQueries)
   at Dynamicweb.Ecommerce.Orders.Discounts.Discount.GetRelevantProductKeys()
   at Dynamicweb.Ecommerce.Orders.Discounts.DiscountService.StatelessSetLookup(Discount discount, ConcurrentDictionary`2 lookup)
   at Dynamicweb.Ecommerce.Orders.Discounts.DiscountService.InitializeLookup()
   at System.Lazy`1.CreateValue()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Lazy`1.get_Value()
   at Dynamicweb.Ecommerce.Orders.Discounts.DiscountService.GetDiscounts(DiscountApplyType[] discountTypes, String[] productKeys, User user)
   at Dynamicweb.Ecommerce.Orders.Discounts.DiscountInfoCollection.LoadDiscounts()
   at Dynamicweb.Ecommerce.ProductCatalog.ViewEngine.GetDiscountInfo(PriceViewModelSettings settings, Product product)
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at Dynamicweb.Ecommerce.ProductCatalog.ViewEngine.<>c__DisplayClass3_2.<BulkCreateView>b__46()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at Dynamicweb.Ecommerce.ProductCatalog.ViewEngine.<>c__DisplayClass3_2.<BulkCreateView>b__48()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at Dynamicweb.Ecommerce.ProductCatalog.ViewEngine.GetPrice(PriceViewModelSettings settings, IList`1 products, Boolean& pricesHasBeenPrepared, Object lock, Lazy`1 priceInfo)
   at Dynamicweb.Ecommerce.ProductCatalog.ViewEngine.<>c__DisplayClass3_2.<BulkCreateView>b__49()
   at System.Lazy`1.CreateValue()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Lazy`1.get_Value()
   at CompiledRazorTemplates.Dynamic.RazorEngine_bf0cabae533c4ecd95cb97aceff0665a.Execute() in D:\dynamicweb.net\Solutions\twodayco3\evasolo.cloud.dynamicweb-cms.com\Files\Templates\Designs\Swift\Paragraph\Swift_ProductPrice_Custom.cshtml:line 102
   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:602ca716-b033-4a0c-bca4-46c75e1f8df0
Error Number:-2,State:0,Class:11

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Core.Encoders @*//CUSTOM*@ 3 @using Dynamicweb.Ecommerce.ProductCatalog 4 @using System.Globalization 5 @using System.IO @*//CUSTOM*@ 6 7 @* CUSTOMIZED STANDARD SWIFT (v1.25.0) TEMPLATE *@ 8 9 @{ 10 ProductViewModel product = null; 11 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 12 { 13 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 14 } 15 else if (Pageview.Page.Item["DummyProduct"] != null && Pageview.IsVisualEditorMode) 16 { 17 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 18 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 19 20 if (productList?.Products is object) 21 { 22 product = productList.Products[0]; 23 } 24 } 25 26 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 27 bool anonymousUser = Pageview.User == null; 28 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 29 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 30 31 bool productIsDiscontinued = product is object && product.Discontinued; 32 bool doNotShowPriceIfProductIsDiscontinued = Model.Item.GetBoolean("DoNotShowPriceIfProductIsDiscontinued"); 33 var isDiscontinued = productIsDiscontinued && doNotShowPriceIfProductIsDiscontinued; 34 } 35 36 @if (product is object && !hidePrice && !isDiscontinued) { 37 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 38 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 39 40 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "h6 justify-content-lg-start"); //CUSTOM 41 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 42 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 43 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 44 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 45 46 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 47 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 48 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 49 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 50 51 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 52 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 53 string order = layout == "horizontal" ? string.Empty : "order-2"; 54 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 55 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 56 57 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 58 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 59 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 60 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 61 62 //CUSTOM 63 string discountType = Model.Item.GetRawValueString("Custom_DiscountType", "none"); 64 string discountTheme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Custom_DiscountTheme")) ? "theme " + Model.Item.GetRawValueString("Custom_DiscountTheme").Replace(" ", "").Trim().ToLower() : string.Empty; 65 string discountIconColor = Model.Item.GetString("Custom_DiscountIconColor", "text-inherit"); 66 string discountIconSize = Model.Item.GetRawValueString("Custom_DiscountIconSize", "2"); 67 string discountImageSrc = !string.IsNullOrEmpty(Model.Item.GetString("Custom_DiscountImage")) ? Model.Item.GetFile("Custom_DiscountImage").Path : string.Empty; 68 string discountImagePath = discountImageSrc != string.Empty ? discountImageSrc : Model.Item.GetRawValueString("Custom_DiscountIcon", string.Empty); 69 discountImagePath = Path.GetExtension(discountImagePath).ToLower() != ".svg" ? "/Admin/Public/GetImage.ashx?image=" + discountImagePath + "&height=" + discountIconSize + "&width=" + discountIconSize + "&Crop=0&format=webp" : discountImagePath; 70 string discountImgAltText = Model.Item.GetRawValueString("FeatureAltText", string.Empty); 71 //--CUSTOM 72 73 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 74 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 75 76 string priceMin = ""; 77 string priceMax = ""; 78 79 string liveInfoClass = ""; 80 string productInfoFeed = ""; 81 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 82 if (isLazyLoadingForProductInfoEnabled) 83 { 84 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 85 { 86 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 87 if (!string.IsNullOrEmpty(productInfoFeed)) 88 { 89 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 90 } 91 } 92 liveInfoClass = "js-live-info"; 93 } 94 95 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 96 @if (showInformativePrice && product.PriceInformative.Price != 0) 97 { 98 <div class="opacity-50"> 99 <span>@Translate("RRP") </span> 100 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 101 </div> 102 } 103 <div class="@priceFontSize m-0 d-flex flex-wrap @flexDirection @flexGap @horizontalAlign" style="row-gap: 0 !important" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 104 <span itemprop="priceCurrency" content="@product.Price.CurrencyCode" class="d-none"></span> 105 106 @if (showPricesWithVat == "false" && !neverShowVat) 107 { 108 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 109 { 110 <span itemprop="price" content="" class="d-none"></span> 111 <span class="text-decoration-line-through js-text-decoration-line-through opacity-75 me-3 text-price js-text-price d-none" data-show-if="LiveProductInfo.product.Price.Price != LiveProductInfo.product.PriceBeforeDiscount.Price"></span> 112 } 113 else 114 { 115 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 116 117 <span itemprop="price" content="@product.Price.PriceWithoutVat.ToString(CultureInfo.InvariantCulture)" class="d-none"></span>@*//CUSTOM*@ 118 if (product.Price.Price != product.PriceBeforeDiscount.Price) 119 { 120 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 121 } 122 } 123 } 124 else 125 { 126 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 127 { 128 <span itemprop="price" content="" class="d-none"></span> 129 <span class="text-decoration-line-through js-text-decoration-line-through opacity-75 me-3 text-price js-text-price d-none" data-show-if="LiveProductInfo.product.Price.Price < LiveProductInfo.product.PriceBeforeDiscount.Price"></span>@*//CUSTOM*@ 130 } 131 else 132 { 133 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 134 135 <span itemprop="price" content="@product.Price.Price.ToString(CultureInfo.InvariantCulture)" class="d-none"></span>@*//CUSTOM*@ 136 137 if (product.Price.Price < product.PriceBeforeDiscount.Price) 138 { 139 <span class="text-decoration-line-through opacity-75 @order"> 140 <span class="text-price">@beforePrice</span> 141 </span> 142 } 143 } 144 } 145 146 @if (showPricesWithVat == "false" && !neverShowVat) 147 { 148 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 149 { 150 <span class="text-price js-text-price"> 151 <span class="spinner-border" role="status"></span> 152 </span> 153 } 154 else 155 { 156 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 157 158 if (product?.VariantInfo?.VariantInfo != null) 159 { 160 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 161 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 162 } 163 if (priceMin != priceMax) 164 { 165 price = priceMin + " - " + priceMax; 166 } 167 <span class="@theme">@*//CUSTOM*@ 168 <span class="text-price">@price</span> 169 </span> 170 } 171 } 172 else 173 { 174 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 175 { 176 <span class="text-price js-text-price"> 177 <span class="spinner-border" role="status"></span> 178 </span> 179 } 180 else 181 { 182 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 183 184 if (product?.VariantInfo?.VariantInfo != null) 185 { 186 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 187 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 188 } 189 if (priceMin != priceMax) 190 { 191 price = priceMin + " - " + priceMax; 192 } 193 <span class="@theme">@*//CUSTOM*@ 194 <span class="text-price">@price</span> 195 </span> 196 } 197 } 198 199 @*//CUSTOM*@ 200 @if (discountType == "icon-tooltip" && product.Price.Price != product.PriceBeforeDiscount.Price) 201 { 202 var discountInfo = Smartpage.EvaSolo.CampaignPrices.Helpers.DiscountHelper.GetDiscountInfo(product.Id, product.VariantId, product.LanguageId); 203 if (discountInfo != null) 204 { 205 if ((!string.IsNullOrEmpty(Model.Item.GetString("Custom_DiscountImage")) || !discountImagePath.ToLower().Contains("none")) && discountImagePath != string.Empty) 206 { 207 <span data-bs-toggle="tooltip" data-bs-custom-class="@(discountTheme)" data-bs-html="true" data-bs-title="@HtmlEncoder.HtmlAttributeEncode(string.Format(Translate("Tilbuddet gælder {0} - {1}"), $"&zwnj;{discountInfo.ValidFromFormatted}&zwnj;", $"&zwnj;{discountInfo.ValidToFormatted}&zwnj;"))" data-bs-custom-prevent-event="click" data-bs-custom-click-close-delay="2000"> 208 @if (Path.GetExtension(discountImagePath).ToLower() == ".svg") 209 { 210 <span class="icon-auto @(discountIconColor)" style="vertical-align:text-top;height:@(discountIconSize)px;width:@(discountIconSize)px;">@ReadFile(discountImagePath)</span> 211 } 212 else 213 { 214 <img loading="lazy" src="@(discountImagePath)" alt="@HtmlEncoder.HtmlAttributeEncode(discountImgAltText)" title="@HtmlEncoder.HtmlAttributeEncode(discountImgAltText)" style="height:@(discountIconSize)px;width:@(discountIconSize)px;"> 215 } 216 </span> 217 } 218 } 219 } 220 @*//--CUSTOM*@ 221 222 @* Stock state for Schema.org, start *@ 223 @{ 224 Uri url = Dynamicweb.Context.Current.Request.Url; 225 } 226 227 <link itemprop="url" href="@url"> 228 229 @{ 230 bool IsNeverOutOfStock = product.NeverOutOfstock; 231 } 232 233 @if (IsNeverOutOfStock) 234 { 235 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 236 } 237 else 238 { 239 if (product.StockLevel > 0) 240 { 241 <span itemprop="availability" class="d-none">InStock</span> 242 } 243 else 244 { 245 <span itemprop="availability" class="d-none">OutOfStock</span> 246 } 247 } 248 @* Stock state for Schema.org, stop *@ 249 250 </div> 251 252 @if (showPricesWithVat == "false" && !neverShowVat) 253 { 254 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 255 { 256 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 257 } 258 else 259 { 260 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 261 262 if (product?.VariantInfo?.VariantInfo != null) 263 { 264 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 265 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 266 } 267 if (priceMin != priceMax) 268 { 269 price = priceMin + " - " + priceMax; 270 } 271 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 272 } 273 } 274 275 @*//CUSTOM*@ 276 @if (discountType == "inline" && product.Price.Price != product.PriceBeforeDiscount.Price) 277 { 278 var discountInfo = Smartpage.EvaSolo.CampaignPrices.Helpers.DiscountHelper.GetDiscountInfo(product.Id, product.VariantId, product.LanguageId); 279 if (discountInfo != null) 280 { 281 var discountFontSize = priceFontSize.Contains("h6") ? priceFontSize.Replace("h6", "small") : "small"; 282 283 <div class="@(discountFontSize) mt-1 d-flex flex-wrap @(flexDirection) @(horizontalAlign)"> 284 @string.Format(Translate("Tilbuddet gælder {0} - {1}"), $"&zwnj;{discountInfo.ValidFromFormatted}&zwnj;", $"&zwnj;{discountInfo.ValidToFormatted}&zwnj;") 285 </div> 286 } 287 } 288 @*//--CUSTOM*@ 289 290 </div> 291 } 292 else if (Pageview.IsVisualEditorMode) 293 { 294 <div class="alert alert-dark m-0" role="alert"> 295 <span>@Translate("No products available")</span> 296 </div> 297 } 298
Error executing template "Designs/Swift/Paragraph/Swift_ProductBadges_Custom.cshtml"
System.Data.SqlClient.SqlException (0x80131904): Execution Timeout Expired.  The timeout period elapsed prior to completion of the operation or the server is not responding. ---> System.ComponentModel.Win32Exception (0x80004005): The wait operation timed out
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
   at System.Data.SqlClient.SqlDataReader.get_MetaData()
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
   at Dynamicweb.Data.Database.CreateDataReader(IDbCommand command, CommandBehavior behavior)
   at Dynamicweb.Data.Database.CreateDataReader(CommandBuilder commandBuilder, IDbConnection connection, IDbTransaction transaction, CommandBehavior behavior, Int32 commandTimeout)
   at Dynamicweb.Data.Database.CreateDataReader(CommandBuilder commandBuilder, IDbConnection connection, IDbTransaction transaction, Int32 commandTimeout)
   at Dynamicweb.Ecommerce.Products.ProductRepository.Dynamicweb.Ecommerce.Products.IProductRepository.GetProductKeysByGroupId(String groupId, Boolean useOrderBy, Boolean includeVariants, String productLanguageId, Boolean doRefactoring, Boolean useAssortments)
   at Dynamicweb.Ecommerce.Orders.Discounts.Discount.ProcessProductSelections(HashSet`1& productKeys, HashSet`1& includedQueries, HashSet`1& excludedQueries)
   at Dynamicweb.Ecommerce.Orders.Discounts.Discount.GetRelevantProductKeys()
   at Dynamicweb.Ecommerce.Orders.Discounts.DiscountService.StatelessSetLookup(Discount discount, ConcurrentDictionary`2 lookup)
   at Dynamicweb.Ecommerce.Orders.Discounts.DiscountService.InitializeLookup()
   at System.Lazy`1.CreateValue()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Lazy`1.get_Value()
   at Dynamicweb.Ecommerce.Orders.Discounts.DiscountService.GetDiscounts(DiscountApplyType[] discountTypes, String[] productKeys, User user)
   at Dynamicweb.Ecommerce.Orders.Discounts.DiscountInfoCollection.LoadDiscounts()
   at Dynamicweb.Ecommerce.ProductCatalog.ViewEngine.GetDiscountInfo(PriceViewModelSettings settings, Product product)
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at Dynamicweb.Ecommerce.ProductCatalog.ViewEngine.<>c__DisplayClass3_2.<BulkCreateView>b__46()
   at System.Lazy`1.CreateValue()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Lazy`1.get_Value()
   at Dynamicweb.Ecommerce.ProductCatalog.ViewEngine.GetPrice(PriceViewModelSettings settings, IList`1 products, Boolean& pricesHasBeenPrepared, Object lock, Lazy`1 priceInfo)
   at Dynamicweb.Ecommerce.ProductCatalog.ViewEngine.<>c__DisplayClass3_2.<BulkCreateView>b__51()
   at System.Lazy`1.CreateValue()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Lazy`1.get_Value()
   at CompiledRazorTemplates.Dynamic.RazorEngine_7b4bf5e1fb35404bb467719d28339ed6.Execute() in D:\dynamicweb.net\Solutions\twodayco3\evasolo.cloud.dynamicweb-cms.com\Files\Templates\Designs\Swift\Paragraph\Swift_ProductBadges_Custom.cshtml:line 118
   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:602ca716-b033-4a0c-bca4-46c75e1f8df0
Error Number:-2,State:0,Class:11

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using System 3 @using System.Collections.Generic 4 @using System.Linq 5 @using Dynamicweb.Frontend 6 @using Dynamicweb.Content 7 @using Dynamicweb.Core 8 @using Dynamicweb.Ecommerce.ProductCatalog 9 10 @{ 11 ProductViewModel product = null; 12 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 13 { 14 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 15 } 16 else if (Pageview.Page.Item["DummyProduct"] != null && Pageview.IsVisualEditorMode) 17 { 18 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 19 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 20 21 if (productList?.Products is object) 22 { 23 product = productList.Products[0]; 24 } 25 } 26 27 DateTime launchDate = product.ProductFields.ContainsKey("Custom_LaunchDate") ? Converter.ToDateTime(product.ProductFields["Custom_LaunchDate"].Value) : DateTime.MinValue; 28 DateTime currentDate = DateTime.Today; 29 bool showComingSoonBadge = currentDate < launchDate && string.Equals( Model.Item.GetRawValueString("NewBadgeDesign"), "comingsoon", StringComparison.InvariantCultureIgnoreCase ); 30 } 31 32 @if (product is object) 33 { 34 var badgeParms = new Dictionary<string, object>(); 35 badgeParms.Add("size", "h7"); 36 badgeParms.Add("saleBadgeType", Model.Item.GetRawValue("SaleBadgeType")); 37 badgeParms.Add("saleBadgeCssClassName", Model.Item.GetRawValue("SaleBadgeDesign")); 38 badgeParms.Add("newBadgeCssClassName", Model.Item.GetRawValue("NewBadgeDesign")); 39 badgeParms.Add("newPublicationDays", Model.Item.GetInt32("NewPublicationDays")); 40 badgeParms.Add("campaignBadgesValues", Model.Item.GetRawValueString("CampaignBadges")); 41 42 string badgeSize = Model.Item.GetRawValueString("BadgeSize", "fs-2"); 43 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 44 horizontalAlign = horizontalAlign == "center" ? "text-center" : horizontalAlign; 45 horizontalAlign = horizontalAlign == "end" ? "text-end" : horizontalAlign; 46 47 Dictionary<string, ParagraphInfoViewModel> badgeConfigurations; 48 List<string> campaignBadgesValues = Model.Item.GetRawValueString("CampaignBadges") != null ? Model.Item.GetRawValueString("CampaignBadges").Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries).ToList() : new List<string>(); 49 50 if (Dynamicweb.Context.Current.Items.Contains("badgeConfigurations")) 51 { 52 badgeConfigurations = (Dictionary<string, ParagraphInfoViewModel>)Dynamicweb.Context.Current.Items["badgeConfigurations"]; 53 } 54 else 55 { 56 var badgesPage = Pageview.AreaSettings.GetLink("EcommerceBadgesPage") != null ? Pageview.AreaSettings.GetLink("EcommerceBadgesPage").PageId : 0; 57 var allBadges = badgesPage != 0 ? Dynamicweb.Content.Services.Paragraphs.GetParagraphsByPageId(badgesPage) : null; 58 59 badgeConfigurations = new Dictionary<string, ParagraphInfoViewModel>(); 60 61 if ( allBadges != null ) 62 { 63 foreach ( Paragraph badge in allBadges ) 64 { 65 var paragraphviewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreateParagraphInfoViewModel( badge ); 66 string cssClassName = paragraphviewModel.Item.GetString( "CssClassName" )?.Trim().ToLower() ?? string.Empty;; 67 if ( !badgeConfigurations.ContainsKey( cssClassName ) ) 68 { 69 badgeConfigurations.Add( cssClassName, paragraphviewModel ); 70 } 71 } 72 } 73 74 Dynamicweb.Context.Current.Items.Add("badgeConfigurations", badgeConfigurations); 75 } 76 77 int badgesCount = 0; 78 if (badgeConfigurations.Any()) 79 { 80 foreach (string campaign in campaignBadgesValues) 81 { 82 if (!string.IsNullOrEmpty(campaign)) 83 { 84 FieldValueViewModel availableCampaignsObject; 85 product.ProductFields.TryGetValue("Campaign", out availableCampaignsObject); 86 87 if (availableCampaignsObject != null) 88 { 89 string campaignType = string.Empty; 90 91 if (badgeConfigurations.ContainsKey(campaign)) 92 { 93 ParagraphInfoViewModel paragraphviewModel; 94 if (badgeConfigurations.TryGetValue(campaign, out paragraphviewModel)) 95 { 96 campaignType = paragraphviewModel.Item.GetRawValueString("CampaignType"); 97 } 98 } 99 100 List<FieldOptionValueViewModel> availableCampaigns = (List<FieldOptionValueViewModel>)availableCampaignsObject.Value; 101 102 foreach (FieldOptionValueViewModel availableOption in availableCampaigns) 103 { 104 if (campaignType == availableOption.Value) 105 { 106 badgesCount++; 107 break; 108 } 109 } 110 } 111 } 112 } 113 } 114 115 bool saleBadgeEnabled = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("SaleBadgeDesign")) && Model.Item.GetRawValueString("SaleBadgeDesign") != "none" ? true : false; 116 bool newBadgeEnabled = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("NewBadgeDesign")) && Model.Item.GetRawValueString("NewBadgeDesign") != "none" ? true : false; 117 DateTime createdDate = product.Created.Value; 118 bool showBadges = saleBadgeEnabled && product.Discount.Price != 0 ? true : false; 119 showBadges = (newBadgeEnabled && Model.Item.GetInt32("NewPublicationDays") == 0) || (newBadgeEnabled && (createdDate.AddDays(Model.Item.GetInt32("NewPublicationDays")) > DateTime.Now)) ? true : showBadges; 120 showBadges = (!string.IsNullOrEmpty(Model.Item.GetRawValueString("CampaignBadges")) && badgesCount != 0) || showComingSoonBadge || showBadges; 121 122 if (showBadges) 123 { 124 <div class="@badgeSize @horizontalAlign item_@Model.Item.SystemName.ToLower()"> 125 @RenderPartial("Components/EcommerceBadge_Custom.cshtml", product, badgeParms) 126 </div> 127 } 128 else if (Pageview.IsVisualEditorMode) 129 { 130 <span class="badge bg-success text-light rounded-0">@Translate("Badge example")</span> 131 } 132 } 133 else if (Pageview.IsVisualEditorMode) 134 { 135 <span class="badge bg-success text-light rounded-0">@Translate("Badge example")</span> 136 } 137 138

Frakt från 59,-
Fri frakt vid köp för 599,-
Full returrätt till och med 31/1

Den dekorativa FireSpot-grillen i cortenstål har många användningsområden och blir snabbt familjens nya samlingspunkt på terrassen. Tänd grillen och tillaga sommarens läckra grillmat på det medföljande grillgallret. Grillgallret i rostfritt stål är försett med handtag som gör det enkelt att hantera, och det kan justeras i höjdled efter behov. Rostfritt stål uppnår hög värme och ger de perfekta grillränderna. Den integrerade avskärmningen skyddar elden mot de hårdaste vindarna. Det skulpturala och rustika uttrycket gör FireSpot-grillen till ett vackert inslag på terrassen, även när den inte används. FireSpot-grillen tål att stå ute året runt. Väder och vind kommer med tiden att ge grillen en karaktärsfull patina som bara gör den vackrare. Rosten smittar inte av sig som annan rost, men små fläckar eller stänk kan förekomma.

Grillen är tillverkad av cortenstål. Den är enkel att underhålla. Rengörs ev. med vatten och en mjuk borste. Grillgaller och bottengaller är tillverkade av rostfritt stål. Båda tål maskindisk och kan rengöras med grillborste.

Läs mer
Rengöring Grillen är tillverkad av cortenstål. Den är enkel att underhålla. Rengörs ev. med vatten och en mjuk borste. Grillgaller och bottengaller är tillverkade av rostfritt stål. Båda tål maskindisk och kan rengöras med grillborste.
Material Cortenstål,Rostfritt stål
Höjd (cm) 89
Bredd (cm) 43
Djup (cm) 38
Vikt (kg) 17,15
Designer: Tools Design
Brand Eva Solo
Artikelnummer 571145
EAN 5706631224284
Bruks- och säkerhetsmanual 571145_FireSpot Grill_folder1.pdf, 571145_FireSpot Grill_folder2.pdf

UPS Paketshop
59 SEK | GRATIS vid köp for 599 SEK

Privatadress
75 SEK | GRATIS ved køb for 599 SEK

Företagsadress
59 SEK | GRATIS ved køb for 599 SEK

För alla typer av e-post du får track-and-trace information per post eller SMS.

LEVERINGSTID: 1-3 arbetsdagar

Eva Solo community

Tagga oss i ditt instagram-inlägg för att synas i vår Eva Solo Community.
Använd en av följande taggar: @evasolo_official, #evasolo, #evatrio eller #evasolofurniture.

Relaterat innehåll