Š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:de155199-ace0-477f-bd28-a955de40b84e
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:987b6015-a750-411c-8eda-18438bd40a75
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: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
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:25034580-c04a-4e6f-ae45-fa532ebb952e
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:c5347a89-c20b-4f25-9991-4ac61f7f0fcd
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: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
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: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
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:19783cde-a2a1-464b-8710-ecba2886c065
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: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
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: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
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: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
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: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
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: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
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:19783cde-a2a1-464b-8710-ecba2886c065
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: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
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:c5347a89-c20b-4f25-9991-4ac61f7f0fcd
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:de155199-ace0-477f-bd28-a955de40b84e
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:25034580-c04a-4e6f-ae45-fa532ebb952e
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:bf143593-c6e0-4160-b5ba-e53f4c3c1bce
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:987b6015-a750-411c-8eda-18438bd40a75
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:3d4deea0-72c6-4e95-8f51-cff8bdade6d4
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:bf4a2bf4-1118-4969-9694-c176a05e7cac
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:136f4279-10dd-42a0-8b68-f7c6d24b6068
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:454a858d-e1d4-49bb-90e3-411ea1dc648f
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:3945d6e4-de71-4da3-83d2-59dc7fb3fb68
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:e944246d-4c2d-4271-acfe-3ade75b101cd
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:3db5e96e-458f-4143-adcd-55ead9459ad5
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:d11185fc-b357-4a19-825e-ee9dfcbdd864
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:b6cec36d-aa76-4dc4-bd64-ecbe8183221f
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:19c7c5b4-c5c4-4428-ba82-15190e141291
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:a9b51ba1-1bf7-40f8-b280-573b8ba0262d
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:e235e003-021a-44a4-84e1-640565d37315
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
32 od 146 proizvoda
Učitavanje više