Šalovi, rupci i ostalo

Luksuzni CROATA rupci i šalovi sinonim su vrhunske izrade i visoke kvalitete. Odlikuju se vrhunskim dizajnom, pomnim odabirom različitih vrsta svile te različitih vrsta tehnika izrade.
 
Kolekcije rubaca i šalova nude široki odabir dezena, od tematskih, među kojima su najčešći iz hrvatske baštine (pleter, glagoljica), do klasičnih motiva. U ponudi su veliki rupci dimenzija 90x90, mali rupci 70x70 te šalovi različitih dimenzija.
Rubac CROATA CROATA
Rubac CROATA CROATA Tematski  Pleter i glagoljica Siva  Svila 100%

Rubac CROATA CROATA

020100-000355
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:deabf6d2-4064-4bfe-8bbc-60b95fe18af7
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA
Rubac CROATA Tematski  Zadar Plava  Svila 100%

Rubac CROATA

020100-000363
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:2fb8e55d-d8c9-4ab3-853a-16e4faa9963f
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA
Rubac CROATA Tematski  Osijek Plava  Svila 100%

Rubac CROATA

020100-000366
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:d6f784c5-e7ec-46c9-872c-c8c5fcf3f0d5
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA
Rubac CROATA Tematski  Osijek Tamno plava  Svila 100%

Rubac CROATA

020100-000367
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:e46b0fb9-26da-4828-b249-45679179c635
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA
Rubac CROATA Tematski   Svijetlo plava  Svila 100%

Rubac CROATA

020100-000381
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:20566b7c-cc65-45d2-9cd5-a675f78f147c
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA
Rubac CROATA Tematski   Bijela  Svila 100%

Rubac CROATA

020100-000382
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:70fa3631-3af9-4c75-900c-c26df3e56a26
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA
Rubac CROATA Tematski   Tamno plava  Svila 100%

Rubac CROATA

020100-000383
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:9d692ff4-bea0-4cce-9e10-93520d022112
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA
Rubac CROATA Tematski  Dalmatiner Bordo  Svila 100%

Rubac CROATA

020101-000035
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:371ce0c9-4c28-43da-a872-c505ed3bdd9c
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA
Rubac CROATA Tematski  Dalmatiner Zelena  Svila 100%

Rubac CROATA

020101-000036
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:5dadde33-ced6-46d2-b613-0ff46a289eb1
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Mali rubac CROATA
Mali rubac CROATA Tematski  Pleter i glagoljica Crna  Svila 100%

Mali rubac CROATA

020104-000049
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:b85146ba-a82d-4ab9-b721-de7881ca5ca0
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Mali rubac CROATA
Mali rubac CROATA Tematski  Glagoljica Crna  Svila 100%

Mali rubac CROATA

020104-000052
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:e2c6e448-353a-48ea-ae49-84ec59572cb1
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Mali rubac CROATA
Mali rubac CROATA Tematski  Dalmatiner Plava  Svila 100%

Mali rubac CROATA

020105-000001
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:bfec02ea-b6fc-48e0-937c-3db84034af3e
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Mali rubac CROATA
Mali rubac CROATA Tematski  Dalmatiner Siva  Svila 100%

Mali rubac CROATA

020105-000003
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:b06e51e9-7f86-4745-a49e-095c7f56f622
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA
Rubac CROATA Klasični  Karirani Tamno plava  Svila 100%

Rubac CROATA

020200-000130
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:56c73a39-8745-4668-968d-8d6ea8de983f
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA
Rubac CROATA Klasični  Karirani Crna  Svila 100%

Rubac CROATA

020200-000131
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:3bd4b5ed-0498-477f-a577-18fd7ce6e183
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Mali rubac CROATA
Mali rubac CROATA Klasični  Krugovi Siva  Svila 100%

Mali rubac CROATA

020201-000028
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:e8930c3c-a859-4735-8bfb-7ebb6ea71191
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Mali rubac CROATA
Mali rubac CROATA Klasični  Razno Siva  Svila 100%

Mali rubac CROATA

020201-000033
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:993a0cb4-efba-4486-8ebf-0a855ca67aa7
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Mali rubac CROATA
Mali rubac CROATA Klasični  Flora i Fauna Zelena  Svila 100%

Mali rubac CROATA

020201-000038
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:5ab1eec2-d42a-47d2-a0ae-6cf9ed53fac2
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA Brijuni
Rubac CROATA Brijuni Tematski  Secesija Lila  Svila 100%

Rubac CROATA Brijuni

020302-000001
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:da939655-d16e-455b-94ff-472590c75840
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA Brijuni
Rubac CROATA Brijuni Tematski  Pleter Siva  Svila 100%

Rubac CROATA Brijuni

020302-000020
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:d1a68c74-8c8f-4eab-b88e-00c4491f4cb9
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA Brijuni
Rubac CROATA Brijuni Tematski Limitirana serija Secesija Svijetlo plava  Svila 100%

Rubac CROATA Brijuni

020302-000065
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:b8b97cd2-5942-4480-ac57-10bd7b62f08a
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA Brijuni
Rubac CROATA Brijuni Tematski Limitirana serija Secesija Marelica  Svila 100%

Rubac CROATA Brijuni

020302-000067
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:7af77fda-17e7-4e7c-ae27-8efe85dcfc1f
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA Brijuni
Rubac CROATA Brijuni Tematski Limitirana serija Secesija Siva  Svila 100%

Rubac CROATA Brijuni

020302-000080
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:32663553-5577-4991-9fef-924d195ac439
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA Brijuni
Rubac CROATA Brijuni Tematski  Pleter Tamno plava  Svila 100%

Rubac CROATA Brijuni

020302-000129
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:a4e76025-e481-40f8-a078-2b792641a953
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA Brijuni
Rubac CROATA Brijuni Tematski  Narodni vez Siva  Svila 100%

Rubac CROATA Brijuni

020302-000135
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:2d124264-7286-4900-bf66-934754f55797
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA Brijuni
Rubac CROATA Brijuni Tematski  Narodni vez Svijetlo plava  Svila 100%

Rubac CROATA Brijuni

020302-000136
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:6299b593-6629-4219-bdf2-db61a07f4f43
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA Brijuni
Rubac CROATA Brijuni Tematski  Narodni vez Ciklama  Svila 100%

Rubac CROATA Brijuni

020302-000137
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:8f719894-bf1a-4b67-a27b-96bcfdcfb849
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA Brijuni
Rubac CROATA Brijuni Tematski  Narodni vez Plava  Svila 100%

Rubac CROATA Brijuni

020302-000140
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:14692d47-2281-4ddb-ba44-b916c11cf2eb
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA Brijuni
Rubac CROATA Brijuni Tematski  Pleter Bijela  Svila 100%

Rubac CROATA Brijuni

020302-000144
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:65448598-6b55-49c5-8dfb-3f6351539040
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA Brijuni
Rubac CROATA Brijuni Tematski  Narodni vez Tamno plava  Svila 100%

Rubac CROATA Brijuni

020302-000155
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:deabf6d2-4064-4bfe-8bbc-60b95fe18af7
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA Brijuni
Rubac CROATA Brijuni Tematski  Narodni vez Svijetlo plava  Svila 100%

Rubac CROATA Brijuni

020302-000156
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:2fb8e55d-d8c9-4ab3-853a-16e4faa9963f
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA Brijuni
Rubac CROATA Brijuni Tematski  Pleter Bordo  Svila 100%

Rubac CROATA Brijuni

020302-000161
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:d6f784c5-e7ec-46c9-872c-c8c5fcf3f0d5
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA Brijuni
Rubac CROATA Brijuni Klasični  Razno Plava  Svila 100%

Rubac CROATA Brijuni

020302-000164
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:e46b0fb9-26da-4828-b249-45679179c635
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA Brijuni
Rubac CROATA Brijuni Klasični  Razno Roza  Svila 100%

Rubac CROATA Brijuni

020302-000167
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:20566b7c-cc65-45d2-9cd5-a675f78f147c
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA Brijuni
Rubac CROATA Brijuni Tematski  Dalmatiner Crna  Svila 100%

Rubac CROATA Brijuni

020303-000010
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:70fa3631-3af9-4c75-900c-c26df3e56a26
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA Brijuni
Rubac CROATA Brijuni Tematski Limitirana serija Dalmatiner Tamno plava  Svila 100%

Rubac CROATA Brijuni

020303-000011
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:8edb86bb-c446-44f9-bdab-94f1ae3c88c4
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA Brijuni
Rubac CROATA Brijuni Tematski  Dalmatiner Crvena  Svila 100%

Rubac CROATA Brijuni

020303-000012
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:20b9e1fe-9b5c-47f2-b63c-b7c98eb0bd9c
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA Brijuni
Rubac CROATA Brijuni Tematski  Dalmatiner Bijela  Svila 100%

Rubac CROATA Brijuni

020303-000013
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:2bd4fb66-1fd8-45a2-9015-5ca89cc3baf5
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA Brijuni
Rubac CROATA Brijuni Tematski  Dalmatiner Zelena  Svila 100%

Rubac CROATA Brijuni

020303-000016
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:00d9ed80-ecb8-4523-b1ad-a0823d368f53
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA Brijuni
Rubac CROATA Brijuni Tematski  Dalmatiner Lila  Svila 100%

Rubac CROATA Brijuni

020303-000017
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:54a10e0d-111d-40f0-9fd7-5ebfc8808299
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA Brijuni
Rubac CROATA Brijuni Tematski Limitirana serija Dalmatiner Bordo  Svila 100%

Rubac CROATA Brijuni

020303-000018
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:0ea44ec8-ecc6-4116-9226-8f6a1e73752d
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA Brijuni
Rubac CROATA Brijuni Tematski  Dalmatiner Crna  Svila 100%

Rubac CROATA Brijuni

020303-000029
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:8c1829e3-631d-41e4-a9d2-94a03e52ff5f
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA Brijuni
Rubac CROATA Brijuni Tematski  Dalmatiner Crvena  Svila 100%

Rubac CROATA Brijuni

020303-000037
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:018f0862-5ed5-493f-8ca1-b765324d3373
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA Brijuni
Rubac CROATA Brijuni Tematski  Dalmatiner Zelena  Svila 100%

Rubac CROATA Brijuni

020303-000038
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:f1bf4c1c-707e-49b1-9ae1-48b83d7db8d3
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA Brijuni
Rubac CROATA Brijuni Tematski  Dalmatiner Crna  Svila 100%

Rubac CROATA Brijuni

020303-000040
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:8f719894-bf1a-4b67-a27b-96bcfdcfb849
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA Brijuni
Rubac CROATA Brijuni Tematski  Dalmatiner Svijetlo zelena  Svila 100%

Rubac CROATA Brijuni

020303-000042
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:14692d47-2281-4ddb-ba44-b916c11cf2eb
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA Brijuni
Rubac CROATA Brijuni Tematski  Dalmatiner Ljubičasta  Svila 100%

Rubac CROATA Brijuni

020303-000044
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:9d692ff4-bea0-4cce-9e10-93520d022112
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA Brijuni
Rubac CROATA Brijuni Tematski  Dalmatiner Plava  Svila 100%

Rubac CROATA Brijuni

020303-000045
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:371ce0c9-4c28-43da-a872-c505ed3bdd9c
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA Brijuni
Rubac CROATA Brijuni Tematski  Dalmatiner Roza  Svila 100%

Rubac CROATA Brijuni

020303-000047
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:5dadde33-ced6-46d2-b613-0ff46a289eb1
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA Brijuni
Rubac CROATA Brijuni Tematski  Dalmatiner Crna  Svila 100%

Rubac CROATA Brijuni

020303-000048
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:b85146ba-a82d-4ab9-b721-de7881ca5ca0
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA Brijuni
Rubac CROATA Brijuni Tematski  Dalmatiner Plava  Svila 100%

Rubac CROATA Brijuni

020303-000050
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:e2c6e448-353a-48ea-ae49-84ec59572cb1
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA Brijuni
Rubac CROATA Brijuni Tematski  Glagoljica Crna  Svila 100%

Rubac CROATA Brijuni

020320-000001
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:bfec02ea-b6fc-48e0-937c-3db84034af3e
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA Brijuni
Rubac CROATA Brijuni Tematski  Glagoljica Bijela  Svila 100%

Rubac CROATA Brijuni

020320-000002
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:b06e51e9-7f86-4745-a49e-095c7f56f622
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA Brijuni
Rubac CROATA Brijuni Tematski  Glagoljica Konjak  Svila 100%

Rubac CROATA Brijuni

020320-000003
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:56c73a39-8745-4668-968d-8d6ea8de983f
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA Brijuni
Rubac CROATA Brijuni Tematski  Glagoljica Plava  Svila 100%

Rubac CROATA Brijuni

020320-000004
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:3bd4b5ed-0498-477f-a577-18fd7ce6e183
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA Dubrovnik
Rubac CROATA Dubrovnik Tematski  Planina Velebit Smeđa  Vuna 48%, Svila 35%, Kašmir 17%

Rubac CROATA Dubrovnik

021300-000001
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:e8930c3c-a859-4735-8bfb-7ebb6ea71191
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA Dubrovnik
Rubac CROATA Dubrovnik Tematski  Planina Velebit Crvena  Vuna 48%, Svila 35%, Kašmir 17%

Rubac CROATA Dubrovnik

021300-000003
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:993a0cb4-efba-4486-8ebf-0a855ca67aa7
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA Dubrovnik
Rubac CROATA Dubrovnik Tematski  Planina Velebit Crvena  Vuna 48%, Svila 35%, Kašmir 17%

Rubac CROATA Dubrovnik

021300-000016
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:5ab1eec2-d42a-47d2-a0ae-6cf9ed53fac2
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA Dubrovnik
Rubac CROATA Dubrovnik Tematski  Planina Velebit Zelena  Vuna 48%, Svila 35%, Kašmir 17%

Rubac CROATA Dubrovnik

021300-000019
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:da939655-d16e-455b-94ff-472590c75840
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA Dubrovnik
Rubac CROATA Dubrovnik Tematski  Glagoljica Ciklama  Vuna 48%, Svila 35%, Kašmir 17%

Rubac CROATA Dubrovnik

021300-000023
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:d1a68c74-8c8f-4eab-b88e-00c4491f4cb9
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA Dubrovnik
Rubac CROATA Dubrovnik Tematski  Glagoljica Bordo  Vuna 48%, Svila 35%, Kašmir 17%

Rubac CROATA Dubrovnik

021300-000024
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:b8b97cd2-5942-4480-ac57-10bd7b62f08a
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA Dubrovnik
Rubac CROATA Dubrovnik Tematski  Glagoljica Plava  Vuna 48%, Svila 35%, Kašmir 17%

Rubac CROATA Dubrovnik

021300-000026
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:7af77fda-17e7-4e7c-ae27-8efe85dcfc1f
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA Dubrovnik
Rubac CROATA Dubrovnik Tematski  Glagoljica Svijetlo plava  Vuna 48%, Svila 35%, Kašmir 17%

Rubac CROATA Dubrovnik

021300-000027
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:32663553-5577-4991-9fef-924d195ac439
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA Dubrovnik
Rubac CROATA Dubrovnik Tematski  Glagoljica Bež  Vuna 48%, Svila 35%, Kašmir 17%

Rubac CROATA Dubrovnik

021300-000028
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:a4e76025-e481-40f8-a078-2b792641a953
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA Dubrovnik
Rubac CROATA Dubrovnik Tematski  Glagoljica Siva  Vuna 48%, Svila 35%, Kašmir 17%

Rubac CROATA Dubrovnik

021300-000029
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:2d124264-7286-4900-bf66-934754f55797
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA Dubrovnik
Rubac CROATA Dubrovnik Tematski  Glagoljica Crvena  svila 67%, vuna 33%

Rubac CROATA Dubrovnik

021300-000032
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:6299b593-6629-4219-bdf2-db61a07f4f43
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA Dubrovnik
Rubac CROATA Dubrovnik Tematski  Glagoljica Ljubičasta  svila 67%, vuna 33%

Rubac CROATA Dubrovnik

021300-000034
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:8f719894-bf1a-4b67-a27b-96bcfdcfb849
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA Dubrovnik
Rubac CROATA Dubrovnik Tematski  Planina Velebit Crna  Vuna 48%, Svila 35%, Kašmir 17%

Rubac CROATA Dubrovnik

021300-000035
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:14692d47-2281-4ddb-ba44-b916c11cf2eb
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA Art
Rubac CROATA Art Tematski  Prica Svijetlo zelena  Svila 100%

Rubac CROATA Art

021400-000001
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:65448598-6b55-49c5-8dfb-3f6351539040
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA Art
Rubac CROATA Art Tematski   Žuta  Svila 100%

Rubac CROATA Art

021400-000005
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:deabf6d2-4064-4bfe-8bbc-60b95fe18af7
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA Art
Rubac CROATA Art Tematski   Zelena  Svila 100%

Rubac CROATA Art

021400-000006
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:2fb8e55d-d8c9-4ab3-853a-16e4faa9963f
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA Art Brijuni
Rubac CROATA Art Brijuni Tematski   Žuta  Svila 100%

Rubac CROATA Art Brijuni

021400-000007
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:d6f784c5-e7ec-46c9-872c-c8c5fcf3f0d5
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA Art Brijuni
Rubac CROATA Art Brijuni Tematski   Zelena  Svila 100%

Rubac CROATA Art Brijuni

021400-000008
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:e46b0fb9-26da-4828-b249-45679179c635
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA "8"
Rubac CROATA

Rubac CROATA "8"

022000-000050
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:20566b7c-cc65-45d2-9cd5-a675f78f147c
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA "8"
Rubac CROATA

Rubac CROATA "8"

022000-000051
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:70fa3631-3af9-4c75-900c-c26df3e56a26
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA "8"
Rubac CROATA

Rubac CROATA "8"

022000-000059
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:9d692ff4-bea0-4cce-9e10-93520d022112
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA "8"
Rubac CROATA

Rubac CROATA "8"

022000-000060
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:371ce0c9-4c28-43da-a872-c505ed3bdd9c
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA "8"
Rubac CROATA

Rubac CROATA "8"

022000-000074
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:5dadde33-ced6-46d2-b613-0ff46a289eb1
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA "8"
Rubac CROATA

Rubac CROATA "8"

022000-000080
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:b85146ba-a82d-4ab9-b721-de7881ca5ca0
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA "8"
Rubac CROATA

Rubac CROATA "8"

022000-000082
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:e2c6e448-353a-48ea-ae49-84ec59572cb1
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA "8"
Rubac CROATA

Rubac CROATA "8"

022000-000085
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:bfec02ea-b6fc-48e0-937c-3db84034af3e
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA "8"
Rubac CROATA

Rubac CROATA "8"

022000-000086
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:b06e51e9-7f86-4745-a49e-095c7f56f622
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA "8"
Rubac CROATA

Rubac CROATA "8"

022000-000087
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:56c73a39-8745-4668-968d-8d6ea8de983f
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA "8"
Rubac CROATA

Rubac CROATA "8"

022000-000089
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:3bd4b5ed-0498-477f-a577-18fd7ce6e183
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA "8"
Rubac CROATA

Rubac CROATA "8"

022000-000090
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:e8930c3c-a859-4735-8bfb-7ebb6ea71191
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA "8"
Rubac CROATA

Rubac CROATA "8"

022000-000091
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:993a0cb4-efba-4486-8ebf-0a855ca67aa7
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA "8"
Rubac CROATA

Rubac CROATA "8"

022000-000092
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:5ab1eec2-d42a-47d2-a0ae-6cf9ed53fac2
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA "8"
Rubac CROATA

Rubac CROATA "8"

022000-000093
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:da939655-d16e-455b-94ff-472590c75840
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA "8"
Rubac CROATA

Rubac CROATA "8"

022000-000094
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:d1a68c74-8c8f-4eab-b88e-00c4491f4cb9
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Rubac CROATA "8"
Rubac CROATA

Rubac CROATA "8"

022000-000095
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:b8b97cd2-5942-4480-ac57-10bd7b62f08a
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Šal CROATA
Šal CROATA Tematski  Kvadrati Plava  Svila 100%

Šal CROATA

030110-000165
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:7af77fda-17e7-4e7c-ae27-8efe85dcfc1f
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Šal CROATA
Šal CROATA Tematski  Kvadrati Crvena  Svila 100%

Šal CROATA

030110-000168
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:32663553-5577-4991-9fef-924d195ac439
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Šal CROATA
Šal CROATA Tematski  Kvadrati Žuta  Svila 100%

Šal CROATA

030110-000210
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:2d124264-7286-4900-bf66-934754f55797
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Šal CROATA
Šal CROATA Tematski  Kvadrati Plava  Svila 100%

Šal CROATA

030110-000217
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:a4e76025-e481-40f8-a078-2b792641a953
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Šal CROATA
Šal CROATA Tematski  Dalmatiner Bijela  Svila 100%

Šal CROATA

030113-000021
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:8edb86bb-c446-44f9-bdab-94f1ae3c88c4
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Šal CROATA
Šal CROATA Tematski  Dalmatiner Svijetlo siva  Svila 100%

Šal CROATA

030113-000024
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:20b9e1fe-9b5c-47f2-b63c-b7c98eb0bd9c
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Šal CROATA Rubec
Šal CROATA Rubec Tematski  Narodni vez Crvena  Svila 100%

Šal CROATA Rubec

030200-000001
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:2bd4fb66-1fd8-45a2-9015-5ca89cc3baf5
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Šal CROATA
Šal CROATA Klasični  Razno Plava  Svila 100%

Šal CROATA

030600-000212
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:00d9ed80-ecb8-4523-b1ad-a0823d368f53
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Šal CROATA
Šal CROATA Klasični  Razno Petrolej  Svila 100%

Šal CROATA

030600-000216
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:54a10e0d-111d-40f0-9fd7-5ebfc8808299
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Šal CROATA
Šal CROATA Klasični  Razno Roza  Svila 100%

Šal CROATA

030600-000228
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:0ea44ec8-ecc6-4116-9226-8f6a1e73752d
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Šal CROATA
Šal CROATA Klasični  Razno Tamno siva  Svila 100%

Šal CROATA

030601-000019
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:8c1829e3-631d-41e4-a9d2-94a03e52ff5f
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Šal CROATA
Šal CROATA Klasični  Razno Plava  Svila 100%

Šal CROATA

030601-000020
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:018f0862-5ed5-493f-8ca1-b765324d3373
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Šal CROATA
Šal CROATA Klasični  Razno Crvena  Svila 100%

Šal CROATA

030601-000022
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:8f719894-bf1a-4b67-a27b-96bcfdcfb849
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Šal CROATA
Šal CROATA Klasični  Razno Plava  Svila 100%

Šal CROATA

030601-000024
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:f1bf4c1c-707e-49b1-9ae1-48b83d7db8d3
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Šal CROATA
Šal CROATA Klasični  Jednobojni Crvena  Svila 100%

Šal CROATA

030602-000010
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:14692d47-2281-4ddb-ba44-b916c11cf2eb
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Šal CROATA
Šal CROATA Klasični  Jednobojni Crna  Svila 100%

Šal CROATA

030602-000021
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:65448598-6b55-49c5-8dfb-3f6351539040
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Šal CROATA
Šal CROATA Klasični  Jednobojni Crvena  Svila 100%

Šal CROATA

030602-000022
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:deabf6d2-4064-4bfe-8bbc-60b95fe18af7
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Stola CROATA CROATA
Stola CROATA CROATA Tematski  Pleter Bordo  Svila 100%

Stola CROATA CROATA

033000-000006
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:2fb8e55d-d8c9-4ab3-853a-16e4faa9963f
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Stola CROATA Brijuni
Stola CROATA Brijuni Tematski  Pleter Crna  Svila 100%

Stola CROATA Brijuni

033000-000007
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:d6f784c5-e7ec-46c9-872c-c8c5fcf3f0d5
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Stola CROATA CROATA
Stola CROATA CROATA Tematski  Pleter Ljubičasta  Svila 100%

Stola CROATA CROATA

033000-000008
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:e46b0fb9-26da-4828-b249-45679179c635
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Šal CROATA
Šal CROATA Tematski  Pleter i glagoljica Svijetlo plava  Svila 100%

Šal CROATA

033010-000024
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:20566b7c-cc65-45d2-9cd5-a675f78f147c
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Šal CROATA
Šal CROATA Klasični  Flora i Fauna Crna  Svila 100%

Šal CROATA

033010-000041
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:70fa3631-3af9-4c75-900c-c26df3e56a26
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Šal CROATA
Šal CROATA Tematski Šal, tematski Pleter Petrolej  Svila 100%

Šal CROATA

033011-000026
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:9d692ff4-bea0-4cce-9e10-93520d022112
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Šal CROATA
Šal CROATA Tematski  Planina Velebit Crvena  Svila 100%

Šal CROATA

033011-000030
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:371ce0c9-4c28-43da-a872-c505ed3bdd9c
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Šal CROATA
Šal CROATA Tematski  Planina Velebit Siva  Svila 100%

Šal CROATA

033011-000031
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:5dadde33-ced6-46d2-b613-0ff46a289eb1
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Šal CROATA
Šal CROATA Klasični  Karirani Ciklama  Svila 100%

Šal CROATA

033011-000033
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:b85146ba-a82d-4ab9-b721-de7881ca5ca0
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Šal CROATA
Šal CROATA Klasični  Razno Siva  Svila 100%

Šal CROATA

033011-000034
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:e2c6e448-353a-48ea-ae49-84ec59572cb1
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Šal CROATA
Šal CROATA Tematski  Planina Velebit Smeđa  Svila 100%

Šal CROATA

033011-000036
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:bfec02ea-b6fc-48e0-937c-3db84034af3e
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Šal CROATA
Šal CROATA Tematski  Narodni vez Ljubičasta  Svila 100%

Šal CROATA

033011-000041
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:b06e51e9-7f86-4745-a49e-095c7f56f622
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Šal CROATA
Šal CROATA Tematski  Razno Siva  Svila 100%

Šal CROATA

033011-000042
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:e8930c3c-a859-4735-8bfb-7ebb6ea71191
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Šal CROATA Art
Šal CROATA Art Tematski  Prica Svijetlo zelena  Svila 100%

Šal CROATA Art

033030-000001
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:56c73a39-8745-4668-968d-8d6ea8de983f
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Šal CROATA Art
Šal CROATA Art Tematski   Žuta  Svila 100%

Šal CROATA Art

033030-000003
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:3bd4b5ed-0498-477f-a577-18fd7ce6e183
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Šal CROATA AuHRum
Šal CROATA AuHRum Tematski  Glagoljica Crna  Svila 98%, metalizirano vl. (zlato) 2%

Šal CROATA AuHRum

033040-000001
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:993a0cb4-efba-4486-8ebf-0a855ca67aa7
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Šal CROATA AuHRum
Šal CROATA AuHRum Klasični   Tamno plava  Svila 98%, metalizirano vl. (zlato) 2%

Šal CROATA AuHRum

033040-000002
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:5ab1eec2-d42a-47d2-a0ae-6cf9ed53fac2
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Uresnica CROATA
Uresnica CROATA Klasični  Jednobojni Žuta  Svila 100%

Uresnica CROATA

034000-000008
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:da939655-d16e-455b-94ff-472590c75840
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Uresnica CROATA
Uresnica CROATA Klasični  Jednobojni Lila  Svila 100%

Uresnica CROATA

034000-000009
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:d1a68c74-8c8f-4eab-b88e-00c4491f4cb9
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Uresnica CROATA
Uresnica CROATA Klasični  Razno Crvena  Svila 100%

Uresnica CROATA

034001-000004
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:b8b97cd2-5942-4480-ac57-10bd7b62f08a
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Uresnica CROATA
Uresnica CROATA Klasični  Jednobojni Žuta  Svila 100%

Uresnica CROATA

034001-000006
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:7af77fda-17e7-4e7c-ae27-8efe85dcfc1f
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Uresnica CROATA
Uresnica CROATA Tematski   Plava  Svila 100%

Uresnica CROATA

034001-000016
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:32663553-5577-4991-9fef-924d195ac439
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Uresnica CROATA
Uresnica CROATA Klasični     Svila 100%

Uresnica CROATA

034001-000020
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:2d124264-7286-4900-bf66-934754f55797
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Uresnica CROATA
Uresnica CROATA Klasični   Tamno plava  Svila 100%

Uresnica CROATA

034001-000021
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:6299b593-6629-4219-bdf2-db61a07f4f43
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Uresnica CROATA
Uresnica CROATA Klasični   Fuksija  Svila 100%

Uresnica CROATA

034001-000022
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:8f719894-bf1a-4b67-a27b-96bcfdcfb849
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Uresnica CROATA
Uresnica CROATA Klasični   Crvena  Svila 100%

Uresnica CROATA

034002-000027
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:14692d47-2281-4ddb-ba44-b916c11cf2eb
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Mali rubac CROATA
Mali rubac CROATA Tematski  Pleter Plava  Svila 100%

Mali rubac CROATA

270100-000240
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:65448598-6b55-49c5-8dfb-3f6351539040
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Mali rubac CROATA
Mali rubac CROATA Tematski  Oktogon Petrolej  Svila 100%

Mali rubac CROATA

270100-000266
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:deabf6d2-4064-4bfe-8bbc-60b95fe18af7
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Mali rubac CROATA
Mali rubac CROATA Tematski  Vučetićevi otisci Crvena  Svila 100%

Mali rubac CROATA

270100-000275
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:2fb8e55d-d8c9-4ab3-853a-16e4faa9963f
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Mali rubac CROATA
Mali rubac CROATA Tematski  Vučetićevi otisci Plava  Svila 100%

Mali rubac CROATA

270100-000276
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:d6f784c5-e7ec-46c9-872c-c8c5fcf3f0d5
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Mali rubac CROATA
Mali rubac CROATA Tematski  Glagoljica Siva  Svila 100%

Mali rubac CROATA

270100-000285
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:e46b0fb9-26da-4828-b249-45679179c635
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Mali rubac CROATA
Mali rubac CROATA Tematski   Plava  Svila 100%

Mali rubac CROATA

270100-000291
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:20566b7c-cc65-45d2-9cd5-a675f78f147c
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Mali rubac CROATA
Mali rubac CROATA Tematski  Dalmatiner Crvena  Svila 100%

Mali rubac CROATA

270101-000044
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:70fa3631-3af9-4c75-900c-c26df3e56a26
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Mali rubac CROATA
Mali rubac CROATA Klasični  Flora i Fauna Svijetlo siva  Svila 100%

Mali rubac CROATA

270300-000073
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:9d692ff4-bea0-4cce-9e10-93520d022112
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Mali rubac CROATA
Mali rubac CROATA Klasični  Flora i Fauna Siva  Svila 100%

Mali rubac CROATA

270300-000074
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:371ce0c9-4c28-43da-a872-c505ed3bdd9c
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Mali rubac CROATA
Mali rubac CROATA Klasični  Razno Roza  Svila 100%

Mali rubac CROATA

270300-000081
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:5dadde33-ced6-46d2-b613-0ff46a289eb1
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Mali rubac CROATA
Mali rubac CROATA Klasični  Flora i Fauna Žuta  Svila 100%

Mali rubac CROATA

270300-000083
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:b85146ba-a82d-4ab9-b721-de7881ca5ca0
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Mali rubac CROATA
Mali rubac CROATA Klasični  Razno Crvena  Svila 100%

Mali rubac CROATA

270300-000085
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:e2c6e448-353a-48ea-ae49-84ec59572cb1
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
Mali rubac CROATA
Mali rubac CROATA Klasični  Razno Tamno plava  Svila 100%

Mali rubac CROATA

270300-000086
Error executing template "/Designs/Swift/Paragraph/DS_ProductPrice.cshtml"
System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'Integration_v2023_LIVE' is full due to 'LOG_BACKUP'.
   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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Potomac.LiveIntegration.Connectors.DatabaseConnector.FetchPrice(String productNo, String currencyCode, String customerNumber, String vatRegistrationNumber, String region, String ProductLinked, Double& price)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.InternalFindPrice(Product product, Double quantity, String variantId, Country country, Currency currency, String unitId, User user, Boolean informative)
   at Potomac.LiveIntegration.Providers.CustomPriceProvider.Dynamicweb.Ecommerce.Prices.IPriceInfoProvider.FindPriceInfo(PriceContext context, PriceProductSelection selection)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPriceInternal(PriceProvider provider, PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.FindPrice(PriceContext context, PriceProductSelection selection, Boolean isInformative)
   at Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(PriceContext context, Product product, String unitId, Int64 stockLocationId)
   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__52()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_12650393650644e7befe479087209982.Execute() in C:\inetpub\wwwroot\DWProd_2025\Solutions\Swift_v1.21.0\Files\Templates\Designs\Swift\Paragraph\DS_ProductPrice.cshtml:line 115
   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:bfec02ea-b6fc-48e0-937c-3db84034af3e
Error Number:9002,State:2,Class:17

1 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel> 2 @using Dynamicweb.Ecommerce.ProductCatalog 3 4 @{ 5 ProductViewModel product = null; 6 if (Dynamicweb.Context.Current.Items.Contains("ProductDetails")) 7 { 8 product = (ProductViewModel)Dynamicweb.Context.Current.Items["ProductDetails"]; 9 } 10 else if (Pageview.Item["DummyProduct"] != null) 11 { 12 var pageViewModel = Dynamicweb.Frontend.ContentViewModelFactory.CreatePageInfoViewModel(Pageview.Page); 13 ProductListViewModel productList = pageViewModel.Item.GetValue("DummyProduct") != null ? pageViewModel.Item.GetValue("DummyProduct") as ProductListViewModel : new ProductListViewModel(); 14 15 if (productList?.Products is object) 16 { 17 product = productList.Products[0]; 18 } 19 } 20 21 string anonymousUsersLimitations = Pageview.AreaSettings.GetRawValueString("AnonymousUsers", ""); 22 bool anonymousUser = Pageview.User == null; 23 bool isErpConnectionDown = !Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsWebServiceConnectionAvailable"]); 24 bool hidePrice = anonymousUsersLimitations.Contains("price") && anonymousUser || Pageview.AreaSettings.GetBoolean("ErpDownHidePrices") && isErpConnectionDown; 25 } 26 27 @if (product is object && !hidePrice) { 28 bool showInformativePrice = Model.Item.GetBoolean("ShowInformativePrice"); 29 string unitId = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.Form.Get("UnitId")) ? Dynamicweb.Context.Current.Request.Form.Get("UnitId") : string.Empty; 30 31 string priceFontSize = Model.Item.GetRawValueString("PriceSize", "fs-2"); 32 string horizontalAlign = Model.Item.GetRawValueString("HorizontalAlignment", ""); 33 string layout = Model.Item.GetRawValueString("Layout", "horizontal"); 34 string textAlign = horizontalAlign == "center" ? "text-center" : string.Empty; 35 textAlign = horizontalAlign == "end" ? "text-end" : textAlign; 36 37 horizontalAlign = horizontalAlign == "center" && layout == "horizontal" ? "justify-content-center" : horizontalAlign; 38 horizontalAlign = horizontalAlign == "end" && layout == "horizontal" ? "justify-content-end" : horizontalAlign; 39 horizontalAlign = horizontalAlign == "center" && layout == "vertical" ? "align-items-center" : horizontalAlign; 40 horizontalAlign = horizontalAlign == "end" && layout == "vertical" ? "align-items-end" : horizontalAlign; 41 42 string flexDirection = layout == "horizontal" ? string.Empty : "flex-column"; 43 string flexGap = layout == "horizontal" ? "gap-3" : string.Empty; 44 string order = layout == "horizontal" ? string.Empty : "order-2"; 45 string theme = !string.IsNullOrWhiteSpace(Model.Item.GetRawValueString("Theme")) ? "theme " + Model.Item.GetRawValueString("Theme").Replace(" ", "").Trim().ToLower() : ""; 46 theme = GetViewParameter("theme") != null ? GetViewParameterString("theme") : theme; 47 48 string contentPadding = Model.Item.GetRawValueString("ContentPadding", ""); 49 contentPadding = contentPadding == "none" ? "p-0" : contentPadding; 50 contentPadding = contentPadding == "small" ? "p-1 px-md-2 py-md-1" : contentPadding; 51 contentPadding = contentPadding == "large" ? "p-2 px-md-3 py-md-2" : contentPadding; 52 53 string showPricesWithVat = Pageview.Area.EcomPricesWithVat.ToLower(); 54 bool neverShowVat = string.IsNullOrEmpty(showPricesWithVat); 55 56 string priceMin = ""; 57 string priceMax = ""; 58 59 string liveInfoClass = ""; 60 string productInfoFeed = ""; 61 bool isLazyLoadingForProductInfoEnabled = Dynamicweb.Core.Converter.ToBoolean(Dynamicweb.Context.Current.Items["IsLazyLoadingForProductInfoEnabled"]); 62 if (isLazyLoadingForProductInfoEnabled) 63 { 64 if (Dynamicweb.Context.Current.Items.Contains("ProductInfoFeed")) 65 { 66 productInfoFeed = Dynamicweb.Context.Current.Items["ProductInfoFeed"]?.ToString(); 67 if (!string.IsNullOrEmpty(productInfoFeed)) 68 { 69 productInfoFeed = $"data-product-info-feed=\"{productInfoFeed}\""; 70 } 71 } 72 liveInfoClass = "js-live-info"; 73 } 74 75 <div class="@textAlign @liveInfoClass item_@Model.Item.SystemName.ToLower()" data-product-id="@product.Id" data-variant-id="@product.VariantId" @productInfoFeed> 76 @if (showInformativePrice && product.PriceInformative.Price != 0) 77 { 78 <div class="opacity-50"> 79 <span>@Translate("RRP") </span> 80 <span class="text-decoration-line-through text-price">@product.PriceInformative.PriceFormatted</span> 81 </div> 82 } 83 <div class="@priceFontSize m-0 d-flex @flexDirection @flexGap @horizontalAlign" itemprop="offers" itemscope itemtype="https://schema.org/Offer"> 84 <span itemprop="priceCurrency" content="<!--$$Global:eCommerce.Currency.Code-->" class="d-none"></span> 85 <span itemprop="category" content="@product.PrimaryOrDefaultGroup.Name" class="d-none"></span> 86 87 88 @if (showPricesWithVat == "false" && !neverShowVat) 89 { 90 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 91 { 92 <span itemprop="price" content="" class="d-none"></span> 93 <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> 94 } 95 else 96 { 97 string beforePrice = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).PriceBeforeDiscount.PriceWithoutVatFormatted : product.PriceBeforeDiscount.PriceWithoutVatFormatted; 98 99 <span itemprop="price" content="@product.Price.PriceWithoutVat" class="d-none"></span> 100 if (product.Price.Price != product.PriceBeforeDiscount.Price) 101 { 102 <span class="text-decoration-line-through opacity-75 @order">@beforePrice</span> 103 } 104 } 105 } 106 else 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.PriceFormatted : product.PriceBeforeDiscount.PriceFormatted; 116 117 <span itemprop="price" content="@product.Price.Price" class="d-none"></span> 118 119 if (product.Price.Price != product.PriceBeforeDiscount.Price) 120 { 121 <span class="text-decoration-line-through opacity-75 @order"> 122 <span class="text-price">@beforePrice</span> 123 </span> 124 } 125 } 126 } 127 128 @if (showPricesWithVat == "false" && !neverShowVat) 129 { 130 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 131 { 132 <span class="text-price js-text-price"> 133 <span class="spinner-border" role="status"></span> 134 </span> 135 } 136 else 137 { 138 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithoutVatFormatted : product.Price.PriceWithoutVatFormatted; 139 140 if (product?.VariantInfo?.VariantInfo != null) 141 { 142 priceMin = product?.VariantInfo?.PriceMin?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithoutVatFormatted : ""; 143 priceMax = product?.VariantInfo?.PriceMax?.PriceWithoutVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithoutVatFormatted : ""; 144 } 145 if (priceMin != priceMax) 146 { 147 price = priceMin + " - " + priceMax; 148 } 149 <span class="@theme @contentPadding"> 150 <span class="text-price">@price</span> 151 </span> 152 } 153 } 154 else 155 { 156 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 157 { 158 <span class="text-price js-text-price"> 159 <span class="spinner-border" role="status"></span> 160 </span> 161 } 162 else 163 { 164 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceFormatted : product.Price.PriceFormatted; 165 var priceinKN = product.Price.Price * 7.53450; 166 167 if (product?.VariantInfo?.VariantInfo != null) 168 { 169 priceMin = product?.VariantInfo?.PriceMin?.PriceFormatted != null ? product.VariantInfo.PriceMin.PriceFormatted : ""; 170 priceMax = product?.VariantInfo?.PriceMax?.PriceFormatted != null ? product.VariantInfo.PriceMax.PriceFormatted : ""; 171 } 172 if (priceMin != priceMax) 173 { 174 price = priceMin + " - " + priceMax; 175 } 176 <span class="@theme @contentPadding"> 177 <span class="text-price">@price</span> 178 @* @if(Pageview.Area.Culture.ToString() == "hr-HR") {<span class="priceinKN">(@priceinKN.ToString("N2") kn)</span> }*@ 179 </span> 180 } 181 } 182 183 @* Stock state for Schema.org, start *@ 184 @{ 185 Uri url = Dynamicweb.Context.Current.Request.Url; 186 } 187 188 <link itemprop="url" href="@url"> 189 190 @{ 191 bool IsNeverOutOfStock = product.NeverOutOfstock; 192 } 193 194 @if (IsNeverOutOfStock) 195 { 196 <span itemprop="availability" class="d-none">@Translate("Available in stock")</span> 197 } 198 else 199 { 200 if (product.StockLevel > 0) 201 { 202 <span itemprop="availability" class="d-none">InStock</span> 203 } 204 else 205 { 206 <span itemprop="availability" class="d-none">OutOfStock</span> 207 } 208 } 209 @* Stock state for Schema.org, stop *@ 210 211 </div> 212 213 @if (showPricesWithVat == "false" && !neverShowVat) 214 { 215 if (isLazyLoadingForProductInfoEnabled && !Pageview.IsVisualEditorMode) 216 { 217 <small class="opacity-85 fst-normal js-text-price-with-vat d-none" data-suffix="@Translate("Incl. VAT")"></small> 218 } 219 else 220 { 221 string price = !string.IsNullOrEmpty(unitId) ? product.GetPrice(unitId).Price.PriceWithVatFormatted : product.Price.PriceWithVatFormatted; 222 223 if (product?.VariantInfo?.VariantInfo != null) 224 { 225 priceMin = product?.VariantInfo?.PriceMin?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMin.PriceWithVatFormatted : ""; 226 priceMax = product?.VariantInfo?.PriceMax?.PriceWithVatFormatted != null ? product.VariantInfo.PriceMax.PriceWithVatFormatted : ""; 227 } 228 if (priceMin != priceMax) 229 { 230 price = priceMin + " - " + priceMax; 231 } 232 <small class="opacity-85 fst-normal">@price @Translate("Incl. VAT")</small> 233 } 234 } 235 </div> 236 } 237 else if (Pageview.IsVisualEditorMode) 238 { 239 <div class="alert alert-dark m-0" role="alert"> 240 <span>@Translate("No products available")</span> 241 </div> 242 } 243
146 od 146 proizvoda