Error executing template "Designs/Ege/Ecom/Partials/Details_Data.cshtml" System.Data.SqlClient.SqlException (0x80131904): Transaction (Process ID 106) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) at System.Data.SqlClient.SqlDataReader.TryHasMoreRows(Boolean& moreRows) at System.Data.SqlClient.SqlDataReader.TryReadInternal(Boolean setTimeout, Boolean& more) at System.Data.SqlClient.SqlDataReader.Read() at Dynamicweb.Ecommerce.Products.ProductRepository.GetProductsBySql(CommandBuilder query, Boolean doRefactoring, Boolean bulkFill, Boolean useAssortments) at Dynamicweb.Ecommerce.Products.ProductRepository.GetProductsByNumber(String productNumber, String productLanguageId, Int32 limit) at Dynamicweb.Ecommerce.Products.ProductRepository.GetProductByNumber(String productNumber, String productLanguageId) at Dynamicweb.Ecommerce.Products.ProductService.GetProductByNumber(String productNumber, String productLanguageId) at CompiledRazorTemplates.Dynamic.RazorEngine_1f525873f40a440d9fb15cc52e4328db.Execute() in E:\Solutions\egecarpets.dk\Files\Templates\Designs\Ege\Ecom\Partials\Details_Data.cshtml:line 207 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:09b37f70-fe6a-451a-b815-a941f297490d Error Number:1205,State:52,Class:13
1 @inherits ViewModelTemplate<ProductViewModel> 2 @using Dynamicweb.Rendering 3 @using Dynamicweb.Ecommerce.ProductCatalog 4 @using Dynamicweb.Frontend 5 @using EGE.Website.CustomModules.Extensions 6 @using EGE.Website.CustomModules 7 @using EGE.Website.CustomModules.Helpers 8 @using Dynamicweb.Ecommerce.Variants; 9 10 @{ 11 var product = Dynamicweb.Ecommerce.Services.Products.GetProductById(Model.Id, Model.VariantId, Model.LanguageId); 12 var variantCombinations = product.VariantCombinations; 13 var variantGroups = product.VariantGroups; 14 var qualityVariants = variantGroups.SingleOrDefault(x => x.Id == "VARGRP3"); 15 var backingVariants = variantGroups.SingleOrDefault(x => x.Id == "VARGRP2"); 16 var sampleVariants = variantGroups.SingleOrDefault(x => x.Id == "VARGRP4"); 17 var relatedSamples = Model.GetRelatedGroupById("RELGRP1"); 18 var keyDictionary = new Dictionary<string, int>(); 19 var keyValue = 0; 20 var architectFolders = Model.GetRelatedGroupByIdOfDefaultGroupInMasterLang("RELGRP3"); 21 } 22 23 <script> 24 var languageId = "@Model.LanguageId"; 25 var languageCode = "@Pageview.Area.EcomCountryCode"; 26 var architectFolderItems = [ 27 @foreach (var folder in architectFolders) 28 { 29 @:{ 30 @:"preTitle": "@folder.Name", 31 @:"title": "@folder.Name", 32 @:"id": "@folder.Id", 33 @:"imagePath": "@(ProductExtensions.GetProductImagePath(folder.Id, out bool isExternal))" 34 @:}, 35 } 36 ]; 37 38 var listJsonSampleSizeItems = [ 39 @if (sampleVariants != null) 40 { 41 foreach (var sample in sampleVariants.GetVariantOptions(Model.Id)) 42 { 43 keyDictionary.Add(sample.Id, keyValue); 44 if (sample != null) 45 { 46 @:{ 47 @:"preTitle": "@sample.Name", 48 @:"title": "@sample.Name", 49 @:"id": @keyValue, 50 @:"variantId": "@sample.Id" 51 @:} 52 if (sample != sampleVariants.GetVariantOptions(Model.Id).Last()) 53 { 54 @:, 55 } 56 keyValue++; 57 } 58 } 59 } 60 ]; 61 62 var listJsonQualityItems = [ 63 @{ 64 var qualityVariantOptions = new List<Dynamicweb.Ecommerce.Variants.VariantOption>(); 65 var isCollectionQuality = false; 66 } 67 @if (qualityVariants != null) 68 { 69 qualityVariantOptions = qualityVariants.GetVariantOptions(Model.Id).ToList(); 70 } 71 else 72 { 73 var collectionCode = product.GetFieldValue<string>("ProductCollectionCode").TrimStart(new char[] { '0' }); 74 75 if (!string.IsNullOrEmpty(collectionCode)) 76 { 77 isCollectionQuality = true; 78 79 var qualOption = new Dynamicweb.Ecommerce.Variants.VariantOption 80 { 81 Id = product.Number, 82 MediumImage = collectionCode, 83 LanguageId = product.LanguageId 84 }; 85 qualityVariantOptions.Add(qualOption); 86 } 87 } 88 @foreach (var quality in qualityVariantOptions) 89 { 90 keyDictionary.Add(quality.Id, keyValue); 91 if (quality != null) 92 { 93 var prod = Dynamicweb.Ecommerce.Services.Products.GetProductByNumber(quality.Id, quality.LanguageId); 94 // Fallback to main product if it is not a configurable product 95 if (qualityVariants == null) 96 { 97 prod = product; 98 } 99 // If the quality is not active in back office it should not be rendered 100 if (!prod.Active) 101 { 102 continue; 103 } 104 var productDefinedTitle = ProductExtensions.GetValueForVariantSpecField(prod, "QualityVariantTitle"); 105 var variantTitle = ""; 106 var variantImageUrl = (Constants.VariantImagePath + quality.MediumImage + ".jpg"); 107 if (!string.IsNullOrWhiteSpace(productDefinedTitle)) 108 { 109 variantTitle = productDefinedTitle; 110 var productDefinedImage = ProductExtensions.GetValueForVariantSpecField(prod, "QualityVariantImage"); 111 if (!string.IsNullOrWhiteSpace(productDefinedImage)) 112 { 113 variantImageUrl = productDefinedImage.Replace("..", "/Files"); 114 } 115 } 116 else if (isCollectionQuality && !string.IsNullOrEmpty(prod.PrimaryGroupId)) 117 { 118 var primaryGroup = Dynamicweb.Ecommerce.Services.ProductGroups.GetGroup(prod.PrimaryGroupId, prod.LanguageId); 119 variantTitle = primaryGroup.GetFieldValue<string>("M3GroupName"); 120 } 121 else 122 { 123 variantTitle = quality.Name; 124 125 } 126 @:{ 127 @:"preTitle": "@variantTitle", 128 @:"title": "@variantTitle", 129 @:"id": @keyValue, 130 @:"variantId": "@quality.Id", 131 @:"forceSelect": @isCollectionQuality.ToString().ToLower(), 132 @:"toolTip": { 133 @:"title": "@variantTitle", 134 @:"text": [{ 135 @:"subtitle": "@ProductExtensions.GetValueForVariantSpecField(prod, "F1Title")", 136 @:"text": "@ProductExtensions.GetValueForVariantSpecField(prod, "F1Text")", 137 @:"link": "@SearchEngineFriendlyURLs.GetFriendlyUrl(ProductExtensions.GetValueForVariantSpecField(prod, "F1Link"))" 138 @:}, 139 @:{ 140 @:"subtitle": "@ProductExtensions.GetValueForVariantSpecField(prod, "F2Title")", 141 @:"text": "@ProductExtensions.GetValueForVariantSpecField(prod, "F2Text")" 142 @:}, 143 @:{ 144 @:"subtitle": "@ProductExtensions.GetValueForVariantSpecField(prod, "F3Title")", 145 @:"text": "@ProductExtensions.GetValueForVariantSpecField(prod, "F3Text")" 146 @:}, 147 @:{ 148 @:"subtitle": "@ProductExtensions.GetValueForVariantSpecField(prod, "F4Title")", 149 @:"text": "@ProductExtensions.GetValueForVariantSpecField(prod, "F4Text")" 150 @:}, 151 @:{ 152 @:"subtitle": "@ProductExtensions.GetValueForVariantSpecField(prod, "F5Title")", 153 @:"text": "@ProductExtensions.GetValueForVariantSpecField(prod, "F5Text")" 154 @:}, 155 @:{ 156 @:"subtitle": "@ProductExtensions.GetValueForVariantSpecField(prod, "F6Title")", 157 @:"text": "@ProductExtensions.GetValueForVariantSpecField(prod, "F6Text")" 158 @:} 159 @:], 160 @:"paragraph": { 161 @:"title": "@ProductExtensions.GetValueForVariantSpecField(prod, "DescriptionTitle")", 162 @:"text": "@ProductExtensions.GetValueForVariantSpecField(prod, "SpecDescriptionText")" 163 @:}, 164 @:"link": "@SearchEngineFriendlyURLs.GetFriendlyUrl(ProductExtensions.GetValueForVariantSpecField(prod, "F8Link"))", 165 @:"linkText": "@ProductExtensions.GetValueForVariantSpecField(prod, "F8Title")", 166 @:"imageUrl": "@ImageUiFormatHelper.Format(variantImageUrl, 72, 100)" 167 @:} 168 @:} 169 if (qualityVariants != null && quality != qualityVariantOptions.Last()) 170 { 171 @:, 172 } 173 keyValue++; 174 } 175 } 176 ]; 177 178 var listJsonBackingItems = [ 179 @{ 180 var forceSelectBacking = false; 181 IList<VariantOption> backingVariantOptions = new List<VariantOption>(); 182 if (backingVariants == null) 183 { 184 var backingCode = product.GetFieldValue<string>("ProductBacking"); 185 if (!string.IsNullOrEmpty(backingCode)) 186 { 187 var backingOption = new Dynamicweb.Ecommerce.Variants.VariantOption 188 { 189 Id = backingCode, 190 MediumImage = backingCode, 191 LanguageId = product.LanguageId 192 }; 193 backingVariantOptions.Add(backingOption); 194 forceSelectBacking = true; 195 } 196 } 197 else 198 { 199 backingVariantOptions = backingVariants.GetVariantOptions(Model.Id); 200 } 201 } 202 @if (backingVariantOptions.Any()) 203 { 204 foreach (var backing in backingVariantOptions) 205 { 206 keyDictionary.Add(backing.Id, keyValue); 207 var prod = Dynamicweb.Ecommerce.Services.Products.GetProductByNumber(backing.Id, backing.LanguageId); 208 209 if (backing != null && prod != null && prod.Active) 210 { 211 var variantTitle = ProductExtensions.GetProductName(prod); 212 @:{ 213 @:"preTitle": "@ProductExtensions.GetCustomFieldValue(prod, "M3ProductName")", 214 @:"title": "@variantTitle", 215 @:"id": @keyValue, 216 @:"variantId": "@backing.Id", 217 @:"forceSelect": @forceSelectBacking.ToString().ToLower(), 218 @:"toolTip": { 219 @:"title": "@variantTitle", 220 @:"text": [{ 221 @:"subtitle": "@ProductExtensions.GetValueForVariantSpecField(prod, "F1Title")", 222 @:"text": "@ProductExtensions.GetValueForVariantSpecField(prod, "F1Text")", 223 @:"link": "@SearchEngineFriendlyURLs.GetFriendlyUrl(ProductExtensions.GetValueForVariantSpecField(prod, "F1Link"))" 224 @:}, 225 @:{ 226 @:"subtitle": "@ProductExtensions.GetValueForVariantSpecField(prod, "F2Title")", 227 @:"text": "@ProductExtensions.GetValueForVariantSpecField(prod, "F2Text")" 228 @:}, 229 @:{ 230 @:"subtitle": "@ProductExtensions.GetValueForVariantSpecField(prod, "F3Title")", 231 @:"text": "@ProductExtensions.GetValueForVariantSpecField(prod, "F3Text")" 232 @:}, 233 @:{ 234 @:"subtitle": "@ProductExtensions.GetValueForVariantSpecField(prod, "F4Title")", 235 @:"text": "@ProductExtensions.GetValueForVariantSpecField(prod, "F4Text")" 236 @:}, 237 @:{ 238 @:"subtitle": "@ProductExtensions.GetValueForVariantSpecField(prod, "F5Title")", 239 @:"text": "@ProductExtensions.GetValueForVariantSpecField(prod, "F5Text")" 240 @:}, 241 @:{ 242 @:"subtitle": "@ProductExtensions.GetValueForVariantSpecField(prod, "F6Title")", 243 @:"text": "@ProductExtensions.GetValueForVariantSpecField(prod, "F6Text")" 244 @:} 245 @:], 246 @:"paragraph": { 247 @:"title": "@ProductExtensions.GetValueForVariantSpecField(prod, "DescriptionTitle")", 248 @:"text": "@ProductExtensions.GetValueForVariantSpecField(prod, "SpecDescriptionText")" 249 @:}, 250 @:"link": "@SearchEngineFriendlyURLs.GetFriendlyUrl(ProductExtensions.GetValueForVariantSpecField(prod, "F8Link"))", 251 @:"linkText": "@ProductExtensions.GetValueForVariantSpecField(prod, "F8Title")", 252 @:"imageUrl": "@ImageUiFormatHelper.Format((Constants.VariantImagePath + backing.MediumImage + ".jpg"), 72, 100)" 253 @:} 254 @:} 255 if (backing != backingVariantOptions.Last()) 256 { 257 @:, 258 } 259 keyValue++; 260 } 261 } 262 } 263 ]; 264 265 @if (!variantGroups.Any()) 266 { 267 int countRelated = 0; 268 @:var relatedSamples = [ 269 foreach (var sample in relatedSamples) 270 { 271 @:{ 272 @:"preTitle": "@sample.Id", 273 @:"title": "@sample.Name", 274 @:"variantId": "@sample.Id", 275 @:"id": @countRelated, 276 @:"imageUrl": "@ProductExtensions.GetProductImagePath(sample.Id, out bool isExternal, "XS")" 277 @:} 278 if (sample != relatedSamples.Last()) 279 { 280 @:, 281 } 282 countRelated++; 283 } 284 @:]; 285 } 286 287 var variantCombinations = [ 288 @if (variantCombinations.Any()) 289 { 290 foreach (var variantCombination in variantCombinations) 291 { 292 var variants = variantCombination.GetVariantOptionIds(); 293 if (variants.Any()) 294 { 295 @:{ 296 @:"qualityId": @keyDictionary[variants[0]], 297 @:"sampleSizeId": @(variants.Length >= 2 ? keyDictionary[variants[1]] : 0), 298 @:"backingId": @(variants.Length >= 3 ? keyDictionary[variants[2]] : 0) 299 @:} 300 } 301 if (variantCombination != variantCombinations.Last()) 302 { 303 @:, 304 } 305 } 306 } 307 ]; 308 var combinations = [ 309 @foreach (var variantCombination in variantCombinations) 310 { 311 var variants = variantCombination.GetVariantOptionIds(); 312 if (variants.Any(x => x == "NA")) 313 { 314 continue; 315 } 316 if (variants.Any() && variants.Length > 2) 317 { 318 int qualityId; 319 int sampleSizeId; 320 int backingId; 321 @:{ 322 if (keyDictionary.TryGetValue(variants[0], out qualityId)) 323 { 324 @:"qualityId": @qualityId, 325 } 326 if (keyDictionary.TryGetValue(variants[1], out sampleSizeId)) 327 { 328 @:"sampleSizeId": @sampleSizeId, 329 } 330 if (keyDictionary.TryGetValue(variants[2], out backingId)) 331 { 332 @:"backingId": @backingId 333 } 334 @:} 335 } 336 if (variantCombination != variantCombinations.Last()) 337 { 338 @:, 339 } 340 } 341 ]; 342 343 </script>
Ege CircleBack is a unique carpet recycling program where we offer to take back your used carpets in Europe for recycling. We divide the used carpets into 3 fractions. The yarn and glue/coating are used again in our own products and the last fraction is used to produce recycled plastic. Read more details about Ege CircleBack here.
The Lush collection, with its remarkable pile weight of 2,800 grams, takes luxury to new heights. Its even denser construction not only amplifies durability but also imparts an opulent, plush feel perfect for creating a sumptuous atmosphere in any setting.
Are you planning a project, let's help you through the entire process, from idea to unique carpet solution.
Fill in your details and we'll revert to you or find your closest contact