Error executing template "Designs/Ege/Ecom/Partials/Details_Data.cshtml" System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary. at System.ThrowHelper.ThrowKeyNotFoundException() at System.Collections.Generic.Dictionary`2.get_Item(TKey key) at CompiledRazorTemplates.Dynamic.RazorEngine_d307a0e2c3554ce4ba289a3eb3345465.Execute() in E:\Solutions\egecarpets.dk\Files\Templates\Designs\Ege\Ecom\Partials\Details_Data.cshtml:line 296 at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader) at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag) at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<RunCompile>b__0(TextWriter writer) at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter) at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template) at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template) at Dynamicweb.Rendering.Template.RenderRazorTemplate()
1 @inherits 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>
Error executing template "Designs/Ege/Ecom/Partials/Details_SpecificationsAndHighlights.cshtml" System.IndexOutOfRangeException: Index was outside the bounds of the array. at CompiledRazorTemplates.Dynamic.RazorEngine_011e40e835c64038ab14717e934cae11.Execute() in E:\Solutions\egecarpets.dk\Files\Templates\Designs\Ege\Ecom\Partials\Details_SpecificationsAndHighlights.cshtml:line 29 at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader) at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag) at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<RunCompile>b__0(TextWriter writer) at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter) at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template) at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template) at Dynamicweb.Rendering.Template.RenderRazorTemplate()
1 @inherits ViewModelTemplate<ProductViewModel> 2 @using Dynamicweb.Rendering 3 @using Dynamicweb.Ecommerce.ProductCatalog 4 @using EGE.Website.CustomModules 5 @using EGE.Website.CustomModules.Extensions 6 @using EGE.Website.CustomModules.Helpers 7 @using EGE.Website.CustomModules.ViewModels 8 9 @{ 10 var product = Dynamicweb.Ecommerce.Services.Products.GetProductById(Model.Id, Model.VariantId, Model.LanguageId); 11 var variantCombinations = product.VariantCombinations; 12 string specificationCode; 13 string backingCode; 14 string qualityId; 15 string conceptCode = product.GetFieldValue<string>("ProductConcept"); 16 var CurrentLang = Dynamicweb.Frontend.PageView.Current().Area.CultureInfo.Parent.NativeName.ToLower(); 17 byte[] tempBytes = System.Text.Encoding.GetEncoding("ISO-8859-8").GetBytes(CurrentLang); 18 CurrentLang = System.Text.Encoding.UTF8.GetString(tempBytes); 19 20 21 if (variantCombinations.Any()) 22 { 23 var defaultVariantCombination = variantCombinations.First(); 24 var defaultVariantCombinationIds = defaultVariantCombination.GetVariantOptionIds(); 25 qualityId = defaultVariantCombinationIds[0]; 26 27 var qualityVariantOption = Dynamicweb.Ecommerce.Services.VariantOptions.GetVariantOption(qualityId, Model.LanguageId); 28 specificationCode = EGE.Website.CustomModules.Services.VariantService.GetPropertyValue("SpecificationCode", qualityVariantOption.Id, Model.LanguageId); 29 backingCode = defaultVariantCombinationIds[2]; 30 } 31 else 32 { 33 qualityId = string.Empty; 34 specificationCode = Model.GetFieldValue<string>("ProductSpecificationCode"); 35 backingCode = Model.GetFieldValue<string>("ProductBacking"); 36 } 37 38 var specificationsFeed = Dynamicweb.Services.Pages.GetPageByNavigationTag(Pageview.AreaID, Constants.SpecificationsFeedNavigationTag); 39 var highlightsFeed = Dynamicweb.Services.Pages.GetPageByNavigationTag(Pageview.AreaID, Constants.HighlightsFeedNavigationTag); 40 41 SpecificationHighlightsViewModel highlightsViewModel = null; 42 SpecificationsViewModel specificationsViewModel = null; 43 44 var specFound = false; 45 if (!string.IsNullOrWhiteSpace(specificationCode) && !string.IsNullOrWhiteSpace(backingCode)) 46 { 47 var specificationsContainer = EGE.Specification.SpecificationContainer.Instance; 48 var specifications = specificationsContainer.GetSpecification(specificationCode, backingCode, Dynamicweb.Ecommerce.Common.Context.Language.Code2); 49 if (specifications != null) 50 { 51 specFound = true; 52 var highlights = specificationsContainer.GetSpecificationHighlight(specificationCode, backingCode, Dynamicweb.Ecommerce.Common.Context.Language.Code2); 53 specificationsViewModel = new EGE.Website.CustomModules.ViewModels.SpecificationsViewModel(specifications); 54 highlightsViewModel = new EGE.Website.CustomModules.ViewModels.SpecificationHighlightsViewModel(highlights); 55 } 56 } 57 58 var sustainabilityChoices = string.Empty; 59 bool hideSpecs = false; 60 bool hideSpecsManually = Pageview.AreaSettings.GetBoolean("HideProductCertificates"); 61 62 if (Model.ProductCategories.ContainsKey("CarpetCategory")) 63 { 64 var susChoiceList = (Model.ProductCategories["CarpetCategory"].Fields["PdfSustainBlocks"]?.Value as List<FieldOptionValueViewModel>); 65 66 foreach (var choice in susChoiceList) 67 { 68 sustainabilityChoices += choice.Value; 69 } 70 Boolean.TryParse((Model.ProductCategories["CarpetCategory"].Fields["HideSpecifications"]?.Value)?.ToString(), out hideSpecs); 71 } 72 73 } 74 75 @if (specFound) 76 { 77 if (specificationsFeed == null) 78 { 79 <h5>SpecificationsFeed not found. Check Nav-tag.</h5> 80 } 81 else if (highlightsFeed == null) 82 { 83 <h5>HighlightsFeed not found. Check Nav-tag.</h5> 84 } 85 else 86 { 87 if (highlightsViewModel != null) 88 { 89 <script> 90 var highlightsFeedUrl = '/api/specifications/gethighlights'; 91 var specificationHighlights = [ 92 @foreach (var highlightSection in highlightsViewModel.HighlightSections) 93 { 94 @:{ 95 @:'title': '@highlightSection.Title', 96 @:'specificationLines': [ 97 98 foreach (var highlight in highlightSection.SpecificationLines) 99 { 100 var defaulDocCount = highlight.Documents.Where(x => x.Name.ToLower().Contains(CurrentLang)).Count(); 101 @:{ 102 @:'name': '@highlight.Name', 103 @:'selectedDocument': { 104 if(defaulDocCount > 0) 105 { 106 @:'name': "@highlight.Documents.Where(x => x.Name.ToLower().Contains(CurrentLang)).FirstOrDefault().Name", 107 @:'link': '@highlight.Documents.Where(x => x.Name.ToLower().Contains(CurrentLang)).FirstOrDefault().Link', 108 } else 109 { 110 @:'name': "", 111 @:'link': '', 112 } 113 114 @:}, 115 @:'documents': [ 116 foreach (var document in highlight.Documents) 117 { 118 if (!string.IsNullOrEmpty(document.Link) && !string.IsNullOrEmpty(document.Name)) 119 { 120 @:{ 121 @:'name': "@document.Name", 122 @:'link': '@document.Link' 123 @:}, 124 } 125 } 126 @:] 127 @:}, 128 } 129 @:] 130 @:}, 131 } 132 ]; 133 </script> 134 } 135 136 <div class="product-specification-and-highlights" id="js-product-specification-and-highlights"> 137 <section class="product-specs" id="js-product-specs"> 138 139 <div class="container"> 140 <div class="product-specs__inner"> 141 <div class="row"> 142 <h1 class="product-specs__title js-alt-color">@Translate("Product details | Specifications | Title", "Product Specifications")</h1> 143 </div> 144 145 <transition name="tooltip-show"> 146 <div class="product-specs-tool-tip" v-if="toolTip !== null" id="js-product-specs-tool-tip"> 147 <div class="product-specs-tool-tip__close" @@click="closeToolTip"> 148 <svg class="icon icon--cross"> 149 <use xmlns:xlink="http://www.w3.org/1999/xlink" 150 xlink:href="@Constants.DistPath/icons/icons.svg#cross"> 151 </use> 152 </svg> 153 </div> 154 <figure class="product-specs-tool-tip__image" v-if="toolTip.imageUrl" :alt="toolTip.title"> 155 <img v-bind:src="toolTip.imageUrl" :alt="toolTip.title"> 156 </figure> 157 <div> 158 <div class="product-specs-tool-tip__title">{{toolTip.title}}</div> 159 <div class="product-specs-tool-tip__text"> 160 <div v-for="item in toolTip.text" class="product-specs-tool-tip__lines"> 161 <span v-if="item.subtitle" class="product-specs-tool-tip__subtitle">{{item.subtitle}}:</span> 162 <a v-bind:href="item.link" v-if="item.link"> 163 <span class="product-specs-tool-tip__speclink">{{item.text}}</span> 164 </a> 165 <span v-else class="product-specs-tool-tip__spec">{{item.text}}</span> 166 </div> 167 <div class="product-specs-tool-tip__paragraph"> 168 <div class="product-specs-tool-tip__subtitle">{{toolTip.paragraph.title}}</div> 169 <span>{{toolTip.paragraph.text}}</span> 170 </div> 171 </div> 172 <a class="product-specs-tool-tip__link" v-bind:href="toolTip.link">{{toolTip.linkText}}</a> 173 </div> 174 </div> 175 </transition> 176 177 <div class="row"> 178 <div class="col-xs-12"> 179 <h2 class="product-specs__subtitle"> 180 @Translate("Product details | Specifications | Subtitle", "Specifications<br>based on") 181 </h2> 182 </div> 183 </div> 184 <div class="row"> 185 <div class="col-xs-12 col-md-10 col-md-offset-1"> 186 <div class="product-specs-info"> 187 <div class="product-specs-info__name">@Model.Name</div> 188 <div class="product-specs-info__item" v-if="selectedQuality != null && selectedQuality != 0"> 189 <span class="product-specs-info__label">@Translate("Product details | Specifications | Quality", "Quality"):</span> 190 {{selectedQuality.preTitle}} 191 </div> 192 <div class="product-specs-info__item" v-if="selectedBacking != null && selectedBacking != 0"> 193 <span class="product-specs-info__label">@Translate("Product details | Specifications | Backing", "Backing"):</span> 194 {{selectedBacking.preTitle}} 195 </div> 196 </div> 197 </div> 198 </div> 199 <div class="row"> 200 <div class="col-xs-12 col-md-6 col-md-offset-1"> 201 <div class="product-specs-quality"> 202 <h3 class="product-specs-quality__title">@Translate("Product details | Specifications | Quality", "Quality")</h3> 203 <div class="product-specs-list"> 204 <div class="product-specs-list-item" v-if="availableOptions.quality" 205 :class="{'product-specs-list-item--selected': selectedQuality === item ,'product-specs-list-item--hide':availableOptions.quality[item.id]===false}" 206 v-for="item in qualityItems"> 207 <figure class="product-specs-list-item__image" 208 @@click="selectOption(item,'selectedQuality')"> 209 <img :src="item.toolTip.imageUrl" :alt="item.title" width="100" height="72"> 210 <svg class="icon icon--checkmark"> 211 <use xmlns:xlink="http://www.w3.org/1999/xlink" 212 xlink:href="@Constants.DistPath/icons/icons.svg#checkmark"> 213 </use> 214 </svg> 215 </figure> 216 <div class="product-specs-list-item__title">{{item.title}}</div> 217 <div class="product-specs-list-item__read-more" v-if="item.toolTip" 218 @@click="showToolTip(item.toolTip, $event)"> 219 @Translate("Read more", "Read more") 220 </div> 221 </div> 222 </div> 223 </div> 224 </div> 225 <div class="col-xs-12 col-md-3 col-md-offset-1"> 226 <div class="product-specs-backing"> 227 <h3 class="product-specs-backing__title" v-if="Object.keys(backingItems).length !== 0">@Translate("Product details | Specifications | Backing", "Backing")</h3> 228 <div class="product-specs-list"> 229 <div class="product-specs-list-item" v-if="availableOptions.backing" 230 :class="{'product-specs-list-item--selected': selectedBacking === item ,'product-specs-list-item--hide':availableOptions.backing[item.id]===false}" 231 v-for="item in backingItems"> 232 <figure class="product-specs-list-item__image" 233 @@click="selectOption(item,'selectedBacking')"> 234 <img :src="item.toolTip.imageUrl" alt="" width="100" height="72"> 235 <svg class="icon icon--checkmark"> 236 <use xmlns:xlink="http://www.w3.org/1999/xlink" 237 xlink:href="@Constants.DistPath/icons/icons.svg#checkmark"> 238 </use> 239 </svg> 240 </figure> 241 <div class="product-specs-list-item__title">{{item.title}}</div> 242 <div class="product-specs-list-item__read-more" v-if="item.toolTip" 243 @@click="showToolTip(item.toolTip, $event)"> 244 @Translate("Read more", "Read more") 245 </div> 246 </div> 247 </div> 248 </div> 249 </div> 250 </div> 251 @if (!hideSpecs) 252 { 253 <div class="product-specs-buttons"> 254 <div class="button-double product-specs-buttons"> 255 <form method="post" action="/api/specifications/getpdf"> 256 <input type="hidden" v-if="selectedBacking != null" name="backingCode" :value="selectedBacking.variantId" /> 257 <input type="hidden" v-if="selectedBacking != null" name="backingName" :value="selectedBacking.title" /> 258 <input type="hidden" v-if="selectedQuality != null" name="qualityName" :value="selectedQuality.title" /> 259 <input type="hidden" name="collectionCode" value="@Model.GetFieldValue("ProductCollectionCode")" /> 260 261 @if (variantCombinations.Any()) 262 { 263 <input type="hidden" v-if="selectedQuality != null" name="qualityId" :value="selectedQuality.variantId" /> 264 } 265 else 266 { 267 <input type="hidden" name="specificationCode" value="@specificationCode" /> 268 } 269 <input type="hidden" name="nationalityCode" value="@Dynamicweb.Ecommerce.Common.Context.Language.Code2" /> 270 <input type="hidden" name="areaId" value="@Pageview.AreaID" /> 271 <input type="hidden" name="productName" value="@Model.Name" /> 272 <input type="hidden" name="sustainabilityChoice" value="@sustainabilityChoices" /> 273 <button type="submit" title="" property="url" class="button button--ghost button--gold" data-text="Download specifications" :class="{ 'button--error':showDownloadFullSpecificationsError }" @@click="downloadFullSpecifications" ref="showFullSpecificationsSubmitButton"> 274 <span class="button__error-message">@Translate("Product details | Specifications | View full specifications error message", "Please choose both a quality and backing above to view full specifications")</span> 275 <span class="button__content"> 276 <span class="button__icon"> 277 <svg class="svg-icon button__svg"> 278 <use xlink:href="@Constants.DistPath/icons/icons.svg#arrow-down-in-circle"></use> 279 </svg> 280 </span> 281 <span class="button__text"> 282 @Translate("Product details | Specifications | Download full specifications", "Download full specifications") 283 </span> 284 </span> 285 </button> 286 </form> 287 <button type="button" class="button button--solid button--gold " data-text="@Translate("Product details | Specifications | View full specifications", "View full specifications")" @@click="viewFullSpecs" data-service="@Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(specificationsFeed.ID)" data-highlights-service="@Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(highlightsFeed.ID)" data-specification-code="@specificationCode" :class="{ 'button--error':showFullSpecificationsError }"> 288 <span class="button__error-message">@Translate("Product details | Specifications | View full specifications error message", "Please choose both a quality and backing above to view full specifications")</span> 289 <span class="button__content"> 290 <span class="button__icon"> 291 <svg class="svg-icon button__svg"> 292 <use xlink:href="@Constants.DistPath/icons/icons.svg#arrow"></use> 293 </svg> 294 </span> 295 <span class="button__text">@Translate("Product details | Specifications | View full specifications", "View full specifications")</span> 296 </span> 297 </button> 298 </div> 299 </div> 300 } 301 </div> 302 </div> 303 </section> 304 305 @if (!hideSpecs) 306 { 307 308 if (specificationsViewModel != null && highlightsViewModel != null) 309 { 310 <div id="js-spec-list" class="overlay-template"> 311 @TemplateHelper.RenderPartial("Feeds/SpecificationsFeed.cshtml", specificationsViewModel) 312 </div> 313 314 if (conceptCode != "10" && !hideSpecsManually) 315 { 316 <transition name="product-highlights-fade"> 317 318 <section class="product-highlights"> 319 <div class="container"> 320 <div class="product-highlights__inner"> 321 <div class="row"> 322 <div class="col-xs-12 col-md-2"> 323 <h2 class="product-highlights__subtitle">@Translate("Product details | Specifications | Specification highlights", "Specification<br/>highlights")</h2> 324 </div> 325 <div class="col-xs-12 col-md-10"> 326 <div class="product-highlights__options"> 327 <div v-for="category in specificationHighlights"> 328 <h3 class="product-highlights__options-title">{{category.title}}</h3> 329 <div class="product-highlights__options-list"> 330 <div class="product-highlights__options-list-item" 331 v-for="line in category.specificationLines"> 332 <span class="product-highlights__options-list-item-label">{{line.name}}</span> 333 <span class="product-highlights__options-list-item-dropdown"> 334 <div class="dropdown dropdown--not-standalone"> 335 <div class="dropdown__header" 336 v-bind:class="{ 'dropdown__header-active': line.showDropdown}" 337 @@click="toggleDropdown(line)"> 338 <span class="dropdown__type"> 339 <span v-if="!line.selectedValue && line.defaultValue"> 340 {{line.defaultValue.name}} 341 </span> 342 <span v-if="line.selectedValue"> 343 {{line.selectedValue.name}} 344 </span> 345 </span> 346 <span class="dropdown__direction"> 347 <figure class="dropdown__icon" 348 v-bind:class="{ 'dropdown__icon-active': line.showDropdown}"> 349 <svg class="svg-icon dropdown__icon-arrow"> 350 <use xlink:href="../../dist/icons/icons.svg#arrow-down-in-circle"></use> 351 </svg> 352 </figure> 353 </span> 354 </div> 355 356 <div class="dropdown__body" 357 v-bind:class="{ 'dropdown__body-active': line.showDropdown}" 358 v-if="line.showDropdown != undefined"> 359 <div class="dropdown__body-header" 360 v-bind:class="{ 'dropdown__body-header-active': line.showDropdown}" 361 @@click="toggleDropdown(line)"> 362 <span class="dropdown__type dropdown__type-body"> 363 <span v-if="!line.selectedValue.name"> 364 {{line.defaultValue.name}} 365 </span> 366 <span v-if="line.selectedValue.name"> 367 {{line.selectedValue.name}} 368 </span> 369 </span> 370 <span class="dropdown__direction"> 371 <figure class="dropdown__icon dropdown_icon" 372 v-bind:class="{ 'dropdown__icon-active': line.showDropdown}"> 373 <svg class="svg-icon dropdown__icon-arrow"> 374 <use xlink:href="../../dist/icons/icons.svg#arrow-down-in-circle"></use> 375 </svg> 376 </figure> 377 </span> 378 </div> 379 <hr class="dropdown__body-hr" /> 380 <div class="dropdown__select-container"> 381 <div class="dropdown__select-list"> 382 <div class="dropdown__select-list-item" 383 v-for="doc in line.documents" 384 @@click="itemListSelected(line,doc)"> 385 <label class="dropdown__select-label">{{doc.name}}</label> 386 </div> 387 </div> 388 </div> 389 </div> 390 </div> 391 <a v-if="line.selectedValue" :href="line.selectedValue.link" download 392 class="product-highlights__options-list-item-link">@Translate("Global | Download", "Download")</a> 393 </span> 394 </div> 395 </div> 396 </div> 397 </div> 398 </div> 399 </div> 400 </div> 401 </div> 402 </section> 403 </transition> 404 } 405 } 406 } 407 </div> 408 } 409 } 410 else 411 { 412 <p>No specifications found with Backing: <b>@backingCode</b> & <b>Specificationcode: @specificationCode</b></p> 413 }
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