Kategori
Industries
0 Products
Error executing template "Designs/identity_v2/ecom/productlist/partials/products.cshtml" System.Data.SqlClient.SqlException (0x80131904): Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding. ---> System.ComponentModel.Win32Exception (0x80004005): The wait operation timed out 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.TryConsumeMetaData() at System.Data.SqlClient.SqlDataReader.get_MetaData() 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.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) at Co3.ID.Dw.DAL.Repositories.PriceRepository.GetPrices(String priceGroup, String currency, Dictionary`2 prices, Product[] products, DateTime startDate) at Co3.ID.Dw.DAL.Repositories.PriceRepository.GetB2CPrices(Product[] products, String currency, String priceGroup, String command, DateTime startDate) at Co3.ID.Dw.Services.PriceService.GetB2CPrices(Product[] products, String currency, String priceGroup, String command, DateTime startDate) at Co3.ID.Dw.Providers.PriceProvider.FindPrice(Product product, Double quantity, String variantID, Currency currency, String unitID, User user) at Co3.Espresso.Dw.PriceProviders.EspressoDefaultPriceProvider.FindPrice(Product product, Double quantity, String variantId, Currency currency, String unitId, User user) at Dynamicweb.Ecommerce.Prices.PriceProvider.FindPrice(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 Dynamicweb.Ecommerce.Prices.PriceManager.GetPrice(Product product, String currencyCode, String countryCode, String unitId, Int32 userId, String shopId, StockLocation stockLocation) at Dynamicweb.Ecommerce.Products.Product.GetPrice(String currencyCode, String vatCountryCode) at Co3.Espresso.Website.Services.ProductService.GetPrice(Product product) at Co3.Espresso.Website.Models.FrontEnd.Ecommerce.EspressoProduct.get_Price() at CompiledRazorTemplates.Dynamic.RazorEngine_b82e280b35e54368b29667572ec15250.Execute() in D:\dynamicweb.net\Solutions\id.espresso4.dk-e5\Files\Templates\Designs\identity_v2\ecom\productlist\partials\products.cshtml:line 100 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:6ad13e0c-ae17-46f5-a0ec-d9f8d8f88056 Error Number:-2,State:0,Class:11
1 @inherits ViewModelTemplate< EspressoProductList > 2 @using Co3.Espresso.Base.Extensions 3 @using Co3.Espresso.Website.Models.FrontEnd 4 @using Co3.Espresso.Website.Models.FrontEnd.Ecommerce 5 @using Co3.Espresso.Website.Models.FrontEnd.Elements 6 @using Co3.Espresso.Website.Models.FrontEnd.Handlebars 7 @using Co3.Espresso.Website.Models.FrontEnd.Settings 8 @using Co3.Espresso.Website.Services 9 @using Co3.ID.Dw.Models.Frontend.Ecommerce 10 @using Dynamicweb.Frontend 11 @using Dynamicweb.Rendering 12 @using Dynamicweb.Rendering.Translation 13 @{ 14 HandlebarsProductListTemplate handlebarsProductListTemplate = HandlebarsService.Instance.GetProductListTemplate( new HandlebarsProductListTemplateSettings() ); 15 handlebarsProductListTemplate.ItemClasses.AddClasses("js-identity-product-item-index"); 16 bool isCustomerShop = (PageView.Current().Area.Item["IsCustomerShop"] != null && (bool)PageView.Current().Area.Item["IsCustomerShop"] == true); 17 } 18 19 20 <div class="col-12"> 21 22 <!-- Product paging for search engines that do not support dynamic rendering with js --> 23 @if ( Model.Paging != null && Model.Paging.Any() ) 24 { 25 <ul class="pagination js-e-productlist-pagination mt-1 justify-content-end" hidden> 26 @foreach ( EspressoPagingPage espressoProductListPagingPage in Model.Paging ) 27 { 28 <li class="page-item @( Model.CurrentPage.ToString() == espressoProductListPagingPage.Number ? "active" : string.Empty)"> 29 <a class="page-link" href="@espressoProductListPagingPage.Url">@espressoProductListPagingPage.Number</a> 30 </li> 31 } 32 </ul> 33 } 34 35 <!--/ Product paging for search engines that do not support dynamic rendering with js --> 36 <!-- Product template for dynamic rendering with js --> 37 38 <script> 39 var arrProducts = []; 40 </script> 41 42 <div class="e-productlist"> 43 @if ( Model.Products.Any() ) 44 { 45 int productSkeletonCount = ( Model.PageSize * Model.CurrentPage ) - Model.PageSize; 46 int previousPageNum = 1; 47 int productCounter = 1; 48 49 50 51 <div class="row" id="js-e-productlist-products"> 52 <!-- Previous products skeleton logics, if pagenum on load is more than 1 --> 53 <!-- Page 1 of @Model.Paging?.Count --> 54 @if ( productSkeletonCount > 0 && Model.CurrentPage > 1 ) 55 { 56 int productsPerPageCounter = 0; 57 string isObservable = string.Empty; 58 59 for ( int i = 0; i < productSkeletonCount; i++ ) 60 { 61 62 <div class="@handlebarsProductListTemplate.ItemClasses e-productlist-skeleton"> 63 <div class="e-productlist-skeleton-item js-e-productlist-skeleton-item @isObservable" data-page="@previousPageNum" data-index="@productsPerPageCounter"></div> 64 </div> 65 66 if ( productCounter == 10 && isCustomerShop == false ) 67 { 68 @RenderingService.Instance.PartialView( "ecom/productlist/partials/identity-productlist-cta.cshtml" ) 69 } 70 71 if ( productCounter % Model.PageSize == 0 ) 72 { 73 previousPageNum++; 74 <!-- Page @previousPageNum of @Model.Paging?.Count --> 75 } 76 productCounter++; 77 productsPerPageCounter++; 78 if ( productsPerPageCounter % Model.PageSize == ( Model.PageSize - 1 ) ) 79 { 80 isObservable = "is-observable"; 81 } 82 else if ( ( productsPerPageCounter + 1 ) > Model.PageSize ) 83 { 84 productsPerPageCounter = 0; 85 isObservable = string.Empty; 86 } 87 } 88 } 89 <!-- Server rendered products from current page --> 90 @{ 91 int serverRenderedProductCounter = 1; 92 } 93 @foreach ( IdentityProduct espressoProduct in Model.Products ) 94 { 95 @:<script> 96 <text> 97 arrProducts.push( { 98 "name": "@espressoProduct.Name", 99 "id": "@espressoProduct.Id", 100 "price": "@espressoProduct.Price.Value.ToJavaScript()", 101 "brand": "@espressoProduct.BrandName", 102 "category": "@espressoProduct.Category", 103 "variant": "@espressoProduct.ColorVariantText", 104 "list": "@PageView.Current().Page.GetDisplayName()", 105 "position": @productCounter 106 107 }); 108 </text> 109 @:</script> 110 <div class="@handlebarsProductListTemplate.ItemClasses"> 111 @RenderingService.Instance.PartialView( ProductListService.Instance.ItemTemplatePath, espressoProduct ) 112 </div> 113 114 if ( serverRenderedProductCounter == 10 && isCustomerShop == false ) 115 { 116 @RenderingService.Instance.PartialView( "ecom/productlist/partials/identity-productlist-cta.cshtml" ) 117 } 118 119 serverRenderedProductCounter++; 120 } 121 <!-- Handlebars template for rendering of whole product list - on filtering/sort --> 122 <script id="js-e-handlebars-tmpl-productlist-products" type="text/x-handlebars-template"> 123 {{#each products}} 124 {{> productlistProductPartial listItemHtml}} 125 {{#compare @isCustomerShop '===' false}} 126 {{#compare @@index '===' 9}} 127 @RenderingService.Instance.PartialView( "ecom/productlist/partials/identity-productlist-cta.cshtml" ) 128 {{/compare}} 129 {{/compare}} 130 {{/each}} 131 </script> 132 <!-- Handlebars partial for product list items --> 133 <script id="js-e-handlebars-tmpl-productlist-product-partial" type="text/x-handlebars-template"> 134 <div class="@handlebarsProductListTemplate.ItemClasses"> 135 {{{this}}} 136 </div> 137 </script> 138 </div> 139 140 141 <!-- Load more products button --> 142 <div class="row"> 143 <div class="col-12 py-2 col-lg-4 col-xl-4 offset-lg-4"> 144 <a class="btn btn-block btn-primary d-none js-e-productlist-load-more-products-btn e-productlist-load-more-products-btn" href="#"> 145 @Translate( "eCom Productlist - Load More Products - Button", "Hent flere produkter" ) <span class="material-icons">keyboard_arrow_down</span> 146 </a> 147 </div> 148 </div> 149 } 150 else 151 { 152 <div class="alert alert-info mt-2"> 153 @Translation.GetTranslation( "eCom Productlist - No Products - Text" ) 154 </div> 155 } 156 <div class="e-loading-overlay e-productlist-loading-overlay js-e-productlist-loading-overlay"> 157 @RenderingService.Instance.PartialView( "_partials/loading-spinner.cshtml" ) 158 </div> 159 160 <div class="js-e-productlist-lazy-loading-block mt-4 position-relative text-center d-none"> 161 @RenderingService.Instance.PartialView( "_partials/loading-spinner.cshtml" ) 162 </div> 163 </div> 164 </div> 165 <script> 166 167 dataLayer.push({ 168 'ecommerce': { 169 'currencyCode': '@PageView.Current().Area.EcomCurrencyId', 170 'impressions': arrProducts 171 } 172 }); 173 174 /* NEW GA4 */ 175 dataLayer.push({ ecommerce: null } ); 176 dataLayer.push({ 177 event: 'view_item_list', 178 ecommerce: { 179 items: [ 180 @foreach ( Co3.Espresso.Base.Models.ElementWithIndex<EspressoProduct> espressoProduct in Model.Products.WithIndex()) 181 { 182 IdentityProduct product = (IdentityProduct)espressoProduct.Element; 183 if ( espressoProduct.Index > 0 ) 184 { 185 @Raw( "," ) 186 } 187 <text> 188 { 189 item_name: "@product.Name", 190 item_id: "@product.Id", 191 item_variant: "@product.ColorVariantText", 192 price: @product.Price.Value.ToJavaScript().Replace(",", ""), 193 item_brand: "@product.BrandName", 194 item_category: "@product.Category", 195 item_list_name: "@PageView.Current().Page.GetDisplayName()" 196 } 197 </text> 198 } 199 ] 200 } 201 }); 202 </script>
Report on CSR, cf. Section 99 a" of the Danish Financial Statements Act. ID® Responsibility report 2023/2024. View here