Error executing template "Designs/kyner/eCom/Product/espresso.cshtml" System.IndexOutOfRangeException: ProductCreated at System.Data.ProviderBase.FieldNameLookup.GetOrdinal(String fieldName) at System.Data.SqlClient.SqlDataReader.GetOrdinal(String name) at System.Data.SqlClient.SqlDataReader.get_Item(String name) at Dynamicweb.Ecommerce.Products.ProductRepository.ExtractProductInternal(IDataReader dataReader, Nullable`1& groupProductRelationSortingExists) at Dynamicweb.Ecommerce.Products.ProductRepository.ExtractProduct(IDataReader dataReader, Nullable`1& groupProductRelationSortingExists) at Dynamicweb.Ecommerce.Products.ProductRepository.GetProductsBySql(String query, Boolean doRefactoring, Boolean bulkFill, Boolean useAssortments) at Dynamicweb.Ecommerce.Products.Product.GetProductBySql(String query, Boolean doRefactoring, Boolean useAssortments) at Dynamicweb.Ecommerce.Specialized.RelatedProductListProviders.CustomersWhoBoughtThisAlsoBought.GetCollection(RelatedProductListProviderEventArgs eventArgs) at Co3.Espresso.Website.Models.FrontEnd.Ecommerce.EspressoProduct.GetEspressoRelatedGroup[T](String magicGroupName) at Co3.Espresso.Website.Models.FrontEnd.Ecommerce.EspressoProduct.get_CustomersWhoBoughtThisItemAlsoBought() at CompiledRazorTemplates.Dynamic.RazorEngine_979cf40b4830476e9a57159cabe771f8.Execute() in E:\Dynamicweb.NET\Solutions\kyner-espresso-4\Files\Templates\Designs\kyner\eCom\Product\espresso.cshtml:line 225 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 Co3.Espresso.Website.TemplateBases.Paragraphs.Module 2 @using System.Linq 3 @using System.Web 4 @using Co3.Espresso.Website.Models 5 @using Co3.Espresso.Website.Services 6 @using Co3.Espresso.Website.Models.FrontEnd 7 @using Co3.Espresso.Website.Models.FrontEnd.Settings 8 @using Co3.Espresso.Website.Models.FrontEnd.Ecommerce 9 @using Co3.Espresso.Website.Models.FrontEnd.Handlebars 10 @using Co3.Kyner.Data.Models 11 @using Co3.Kyner.Website.Frontend.Models.Ecommerce 12 @using Co3.Kyner.Website.Frontend.Services 13 @using Dynamicweb.Forum 14 @using Dynamicweb.Frontend 15 @using Dynamicweb.Security.UserManagement 16 17 @{ 18 bool isUserAuthenticated = User.IsExtranetUserLoggedIn(); 19 string kynerDescription = GetString( "Ecom:Product:Field.KynerDescription.Value" ); 20 string kynerColli = GetString("Ecom:Product.CategoryField.Produkter.KynerUnitsPerColli.Value.Clean"); 21 22 KynerProduct espressoProduct = ( KynerProduct ) ProductService.Instance.GetEspressoProduct( 23 new ProductSettings() 24 { 25 Id = GetString( "Ecom:Product.ID" ), 26 VariantId = GetString( "Ecom:Product.VariantID" ), 27 PrimaryVariantId = GetString( "Ecom:Product.DefaultVariantComboID" ), 28 EmbeddedInModelList = false 29 } 30 ); 31 } 32 @RenderingService.Instance.SectionEnd() 33 34 <div class="e-product js-e-product" data-has-variants="@espressoProduct.HasVariants.ToString().ToLower()" data-product-id="@espressoProduct.Id" data-variant-id="@espressoProduct.VariantId"> 35 36 @RenderingService.Instance.SectionStart( new SectionSettings 37 { 38 Classes = new ClassList( "e-section pb-2" ) 39 } ) 40 41 <div class="col-12"> 42 <div class="row"> 43 <div class="col-8"> 44 @RenderingService.Instance.PartialView("/eCom/Product/partials/kyner-breadcrumb.cshtml", espressoProduct) 45 <h1 class="e-product-name mb-1 mt-0"> 46 @espressoProduct.Name 47 </h1> 48 </div> 49 </div> 50 <div class="row"> 51 52 <div class="col-12 col-sm-5"> 53 <div class="e-product-text-container"> 54 <div class="card p-card-border-none shadow-none bg-light p-1 mb-2"> 55 <table class="table table-sm no-border mb-0"> 56 <tr> 57 <td> 58 <span class="small d-block font-family-mono text-muted">@Translate( "eCom Product - Product Number - Text", "Number" ) </span> 59 <h3 class="mt-0">@espressoProduct.Number</h3> 60 </td> 61 62 @if (isUserAuthenticated && kynerColli != "") 63 { 64 <td> 65 <span class="small d-block font-family-mono text-muted">Kolli størrelse</span> 66 @kynerColli 67 </td> 68 } 69 </tr> 70 @*<tr> 71 <td><span class="small d-block font-family-mono text-muted">EAN</span> 72 @kynerEAN 73 </td> 74 <td><span class="small d-block font-family-mono text-muted">TUN</span> 75 @kynerTUN 76 </td> 77 </tr>*@ 78 </table> 79 </div> 80 81 @if (isUserAuthenticated) 82 { 83 @RenderingService.Instance.PartialView("ecom/product/partials/part-kyner-price.cshtml", espressoProduct) 84 } 85 86 @if ( kynerDescription != "" ) 87 { 88 <div class="e-product-text mb-2"> 89 @kynerDescription 90 </div> 91 } 92 93 @if ( isUserAuthenticated ) 94 { 95 if ( !KynerProductService.Instance.HidePrices() ) 96 { 97 <div class="row align-items-center"> 98 <div class="col-7"> 99 @RenderingService.Instance.PartialView( "ecom/product/partials/add-to-cart.cshtml", espressoProduct ) 100 </div> 101 <div class="col-5 text-right"> 102103 <div class="e-product-delivery font-weight-bold mb-2 text-heading"> 104 @RenderingService.Instance.PartialView( "ecom/product/partials/delivery-info.cshtml", espressoProduct ) 105 </div> 106 </div> 107 </div> 108 } 109 <br> 110 @RenderingService.Instance.PartialView( "ecom/product/partials/add-to-favorites.cshtml", espressoProduct ) 111 } 112113 </div> 114115116 @foreach ( EspressoDisplayGroup displayGroup in espressoProduct.FieldDisplayGroups.List ) 117 { 118 @displayGroup.Render() 119 } 120121122123124 @foreach ( LoopItem item in GetLoop( "ImageCategories" ) ) 125 { 126 if ( item.GetString( "Category.Name" ) == "Datasheets" ) 127 { 128 if ( item.GetLoop( "Category.Images" ).Any() ) 129 { 130 <div class="card p-card-border-none shadow-none bg-light mb-1"> 131 <div class="" id="headingTwo"> 132 <h4 class="mb-0"> 133 <button class="btn btn-link collapsed" type="button" data-toggle="collapse" data-target="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo"> 134 <span class="material-icons"> 135 add_circle_outline 136 </span> Dokumenter 137 </button> 138 </h4> 139 </div> 140 <div id="collapseTwo" class="collapse" aria-labelledby="headingTwo" data-parent="#accordionExample"> 141 <div class="card-body"> 142143 @foreach ( LoopItem document in item.GetLoop( "Category.Images" ) ) 144 { 145 string documentUrl = document.GetString( "Ecom:Product:Detail.Image.Clean" ); 146 string documentName = documentUrl.Split( '/' ).Last(); 147 <a href="@documentUrl" download="download">@documentName</a> 148 } 149150 </div> 151 </div> 152 </div> 153 } 154 } 155 } 156157 </div> 158159160 <div class="col-12 col-sm-7 order-first"> 161 @RenderingService.Instance.PartialView( "ecom/product/partials/images.cshtml", espressoProduct ) 162 </div> 163 </div> 164165166 </div> 167168 @*<div class="row"> 169 <div class="col-6"> 170 @foreach ( var loopItemFieldDisplayGroup in GetLoop( "FieldDisplayGroups" ) ) 171 { 172 <h2>@loopItemFieldDisplayGroup.GetValue( "Ecom:FieldDisplayGroup.Name" )</h2> 173 <table class="table table-striped"> 174175 @foreach ( var loopItemFields in loopItemFieldDisplayGroup.GetLoop( "Fields" ) ) 176 { 177 <tr> 178 <td> 179 <div class="row"> 180 <div class="col-6">@loopItemFields.GetValue( "Ecom:FieldDisplayGroup.Field.Name" ) @loopItemFields.GetValue( "Ecom:FieldDisplayGroup.Field.Section" ) 181 </div> 182 <div class="col-6">@loopItemFields.GetValue( "Ecom:FieldDisplayGroup.Field.Value" )</div> 183 </div> 184185 </td> 186 </tr> 187 } 188 </table> 189 } 190 </div> 191 <div class="col-6"> 192 @foreach ( EspressoDisplayGroup displayGroup in espressoProduct.FieldDisplayGroups.List ) 193 { 194 @displayGroup.Render() 195 } 196 </div> 197 </div>*@ 198199 @RenderingService.Instance.SectionEnd() 200201 @*@if ( !string.IsNullOrEmpty( espressoProduct.DescriptionLong ) ) 202 { 203 @RenderingService.Instance.SectionStart( new SectionSettings 204 { 205 Classes = new ClassList( "col-12 col-md-10 col-lg-8 mx-auto is-lg" ), 206 ContentClasses = new ClassList( "col-12 col-md-10 col-lg-8 mx-auto is-lg" ), 207 Collapsible = true 208 } ) 209 <div class="col-12"> 210 @espressoProduct.DescriptionLong 211 </div> 212 @RenderingService.Instance.SectionEnd() 213 }*@ 214215 @if ( espressoProduct.RelatedGroups.ContainsKey( "RELGRP2" ) && espressoProduct.RelatedGroups[ "RELGRP2" ].Products.Any() ) 216 { 217 @RenderingService.Instance.SectionStart( new SectionSettings 218 { 219 Classes = new ClassList( "e-section py-2 bg-light" ) 220 } ) 221 @RenderingService.Instance.PartialView( "ecom/product/partials/related-products.cshtml", espressoProduct.RelatedGroups[ "RELGRP2" ] ) 222 @RenderingService.Instance.SectionEnd() 223 } 224225 @if ( espressoProduct.CustomersWhoBoughtThisItemAlsoBought != null && espressoProduct.CustomersWhoBoughtThisItemAlsoBought.Products.Any() ) 226 { 227 @RenderingService.Instance.SectionStart( new SectionSettings 228 { 229 Classes = new ClassList( "e-section py-2 bg-light" ) 230 } ) 231 @RenderingService.Instance.PartialView( "ecom/product/partials/related-products.cshtml", espressoProduct.CustomersWhoBoughtThisItemAlsoBought ) 232 @RenderingService.Instance.SectionEnd() 233 } 234 @if ( espressoProduct.RelatedGroups.ContainsKey( "RELGRP4" ) && espressoProduct.RelatedGroups[ "RELGRP4" ].Products.Any() ) 235 { 236 @RenderingService.Instance.SectionStart( new SectionSettings 237 { 238 Classes = new ClassList( "e-section py-2 bg-light" ) 239 } ) 240 @RenderingService.Instance.PartialView( "ecom/product/partials/related-products.cshtml", espressoProduct.RelatedGroups[ "RELGRP4" ] ) 241 @RenderingService.Instance.SectionEnd() 242 } 243244 @if ( espressoProduct.YouHaveSeenTheseProducts != null && espressoProduct.YouHaveSeenTheseProducts.Products.Any() ) 245 { 246 @RenderingService.Instance.SectionStart( new SectionSettings 247 { 248 Classes = new ClassList( "e-section py-2 bg-light" ) 249 } ) 250 @RenderingService.Instance.PartialView( "ecom/product/partials/related-products.cshtml", espressoProduct.YouHaveSeenTheseProducts ) 251 @RenderingService.Instance.SectionEnd() 252 } 253254 @RenderingService.Instance.PartialView( "ecom/product/partials/metadata.cshtml", espressoProduct ) 255 @RenderingService.Instance.PartialView( "ecom/product/partials/gtm-tracking.cshtml", espressoProduct ) 256257 <code class="js-e-breadcrumb-item-append" data-link="@HttpUtility.HtmlAttributeEncode( espressoProduct.Link )" data-text="@HttpUtility.HtmlAttributeEncode( espressoProduct.Name )"></code> 258259 <script> 260 e4.data.set('@( espressoProduct.Id )_VariantCombinationTree', 261 JSON.parse( 262 '@HttpUtility.JavaScriptStringEncode( JsonService.Instance.ToJson( espressoProduct.VariantCombinationTree ) )')); 263 e4.data.set('@( espressoProduct.Id )_VariantCombinationIds', 264 JSON.parse( 265 '@HttpUtility.JavaScriptStringEncode( JsonService.Instance.ToJson( espressoProduct.VariantCombinations.Keys ) )')); 266 </script> 267268 </div> 269 @RenderingService.Instance.SectionStart( new SectionSettings() )