Error executing template "Designs/bloomingville/eCom/Product/espresso.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 outat 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 Dynamicweb.Data.Database.CreateDataReader(IDbCommand command, CommandBehavior behavior)at Dynamicweb.Data.Database.CreateDataReader(CommandBuilder commandBuilder, IDbConnection connection, IDbTransaction transaction, CommandBehavior behavior, Int32 commandTimeout)at Dynamicweb.Data.Database.CreateDataReader(CommandBuilder commandBuilder, IDbConnection connection, IDbTransaction transaction, Int32 commandTimeout)at Dynamicweb.Ecommerce.Products.DetailRepository.GetInheritedDetailsBulk(List`1 productIds, String detailType)at Dynamicweb.Ecommerce.Products.DetailService.GetDetailsBulk(IEnumerable`1 products, String detailType, Boolean excludeDefaultImage)at Dynamicweb.Ecommerce.Products.DetailService.GetDetails(Product product, String detailType, Boolean excludeDefaultImage)at Co3.Espresso.Website.Services.ProductService.GetImageDetails(Product product) in C:\Projects\espresso\Co3.Espresso.Website\Services\ProductService.cs:line 143at Co3.Espresso.Website.Models.FrontEnd.Ecommerce.EspressoProduct.get_ImageDetails() in C:\Projects\espresso\Co3.Espresso.Website\Models\FrontEnd\Ecommerce\EspressoProduct.cs:line 155at CompiledRazorTemplates.Dynamic.RazorEngine_311226ce283c4bb3ae0ce5132a0e52d9.Execute() in E:\Dynamicweb.NET\Solutions\bloomingville.espresso4.dk\Files\Templates\Designs\bloomingville\eCom\Product\espresso.cshtml:line 127at 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.b__0(TextWriter writer)at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)at Dynamicweb.Rendering.Template.RenderRazorTemplate()ClientConnectionId:dc56a7d7-0b58-479c-90e7-2a497a74e264Error Number:-2,State:0,Class:11
1 @*DB: cherry pick Clerk IO to Live*@ 2 @inherits Co3.Espresso.Website.TemplateBases.Paragraphs.Module 3 4 @using System.Dynamic 5 @using System.Web 6 @using Co3.Bloomingville.Integration.ClerkIOIntegration 7 @using Co3.Bloomingville.Website.Models.Frontend.Ecommerce 8 @using Co3.Espresso.Addons.ClerkIOIntegration 9 @using Co3.Espresso.Website.Services 10 @using Co3.Espresso.Website.Models.FrontEnd 11 @using Co3.Espresso.Website.Models.FrontEnd.Settings 12 @using Co3.Espresso.Website.Models.FrontEnd.Ecommerce 13 @using Co3.Espresso.Website.Models.FrontEnd.Handlebars 14 @using Dynamicweb.Content 15 @using Dynamicweb.Content.Items 16 @using Dynamicweb.Ecommerce.CustomerCenter 17 @using Dynamicweb.Ecommerce.Products 18 @using Dynamicweb.Frontend 19 @using Dynamicweb.Security.UserManagement 20 @using ProductService = Co3.Espresso.Website.Services.ProductService 21 @using Co3.Espresso4.Addons.ClerkIOIntegration.ClerkIOAPI 22 @using Dynamicweb.Ecommerce.Common 23 @using Dynamicweb.Ecommerce.Orders 24 @inherits Co3.Espresso.Website.TemplateBases.Pages.PageBase 25 26 @{ 27 bool isUserAuthenticated = User.IsExtranetUserLoggedIn(); 28 BloomingvilleProduct espressoProduct = (BloomingvilleProduct) ProductService.Instance.GetEspressoProduct( 29 new ProductSettings() 30 { 31 Id = GetString("Ecom:Product.ID"), 32 VariantId = GetString("Ecom:Product.VariantID"), 33 PrimaryVariantId = GetString("Ecom:Product.DefaultVariantComboID") 34 } 35 ); 36 37 // Add auto generated relation groups fra Dynamicweb to RelatedGroups dictionary, in order to access them the same way, as the custom related product groups. 38 39 // Related product groups are rendered in this order. 40 string[] relatedGroupIds = 41 { 42 "SimilarProducts", 43 "HotRightNow", 44 "DesignersFavorite" 45 }; 46 47 string imageLifeStyle = espressoProduct.ImageLifeStyle.Large; 48 string brandLogo = string.Empty; 49 string brandText = Translate(string.Format("eCom Product - Brand {0} - Text", espressoProduct.Brand), "Modo lorem pythagoras quid quae abducas habent potius quem singulos pullum quicquid memini.An expetendum si memini est quem modo quo ut."); 50 string brandPersonName = string.Empty; 51 string brandPersonTitle = string.Empty; 52 string brandPersonImage = string.Empty; 53 string brandPersonText = string.Empty; 54 string brandPersonHeading = string.Empty; 55 56 57 if (espressoProduct.Brand == "CREATIVE COLLECTION") 58 { 59 brandLogo = "/Files/Templates/Designs/bloomingville/_assets/img/Creative-Collection-logo_black.svg"; 60 brandPersonName = Espresso.Area.Item.CreativeCollection_Name; 61 brandPersonTitle = Espresso.Area.Item.CreativeCollection_Title; 62 brandPersonImage = Espresso.Area.Item.CreativeCollection_Image; 63 brandPersonText = Espresso.Area.Item.CreativeCollection_Text; 64 brandPersonHeading = Espresso.Area.Item.CreativeCollection_Heading; 65 66 if (string.IsNullOrEmpty(espressoProduct.ImageLifeStyle.Large) == true) 67 { 68 imageLifeStyle = Espresso.Area.Item.CreativeCollection_Image_LifeStyle_Alternative; 69 } 70 } 71 else if (espressoProduct.Brand == "ILLUME X BLOOMINGVILLE") 72 { 73 brandLogo = "/Files/Templates/Designs/bloomingville/_assets/img/illumexbloomingville-logo-ECH-long.svg"; 74 brandPersonName = Espresso.Area.Item.Illume_Name; 75 brandPersonTitle = Espresso.Area.Item.Illume_Title; 76 brandPersonImage = Espresso.Area.Item.Illume_Image; 77 brandPersonText = Espresso.Area.Item.Illume_Text; 78 brandPersonHeading = Espresso.Area.Item.Illume_Heading; 79 80 if (string.IsNullOrEmpty(espressoProduct.ImageLifeStyle.Large) == true) 81 { 82 imageLifeStyle = Espresso.Area.Item.Illume_Image_LifeStyle_Alternative; 83 } 84 } 85 else if (espressoProduct.Brand == "BLOOMINGVILLE MINI") 86 { 87 brandLogo = "/Files/Templates/Designs/bloomingville/_assets/img/Bloomingville-mini.svg"; 88 brandPersonName = Espresso.Area.Item.BloomingvilleKids_Name; 89 brandPersonTitle = Espresso.Area.Item.BloomingvilleKids_Title; 90 brandPersonImage = Espresso.Area.Item.BloomingvilleKids_Image; 91 brandPersonText = Espresso.Area.Item.BloomingvilleKids_Text; 92 brandPersonHeading = Espresso.Area.Item.BloomingvilleKids_Heading; 93 94 if (string.IsNullOrEmpty(espressoProduct.ImageLifeStyle.Large) == true) 95 { 96 imageLifeStyle = Espresso.Area.Item.BloomingvilleKids_Image_LifeStyle_Alternative; 97 } 98 } 99 else100 {101 brandLogo = "/Files/Templates/Designs/bloomingville/_assets/img/logo.svg";102 brandPersonName = Espresso.Area.Item.Bloomingville_Name;103 brandPersonTitle = Espresso.Area.Item.Bloomingville_Title;104 brandPersonImage = Espresso.Area.Item.Bloomingville_Image;105 brandPersonText = Espresso.Area.Item.Bloomingville_Text;106 brandPersonHeading = Espresso.Area.Item.Bloomingville_Heading;107108 if (string.IsNullOrEmpty(espressoProduct.ImageLifeStyle.Large) == true)109 {110 imageLifeStyle = Espresso.Area.Item.Bloomingville_Image_LifeStyle_Alternative;111 }112 }113114 foreach (LoopItem FieldDisplayGroups in GetLoop("FieldDisplayGroups"))115 {116 if (FieldDisplayGroups.GetString("Ecom:FieldDisplayGroup.Name") == "LifeStyleImages")117 {118 int loopcounter = 1;119 foreach (LoopItem field in FieldDisplayGroups.GetLoop("Fields"))120 {121 if (!string.IsNullOrEmpty(field.GetString("Ecom:FieldDisplayGroup.Field.Value")))122 {123 string imagePath = field.GetString("Ecom:FieldDisplayGroup.Field.Value");124125 if (loopcounter != 1)126 {127 espressoProduct.ImageDetails.Add(128 ImageService.Instance129 .GetEspressoProductImageUrl(130 new EspressoProductImageUrlSettings()131 {132 ImagePath = imagePath ?? string.Empty133 }134 )135 );136 }137 }138 loopcounter++;139 }140 }141 }142143 // Canonical144145 string eComProductCanonical = string.Empty;146147 string globalValueUrl = GetGlobalValue("Global:Pageview.Url");148149 if (GetGlobalValue("Global:Pageview.Url").IndexOf("?") > -1)150 {151 globalValueUrl = GetGlobalValue("Global:Pageview.Url").Substring(0, GetGlobalValue("Global:Pageview.Url").IndexOf("?"));152 }153154 if (string.IsNullOrEmpty(GetString("Ecom:Product.Canonical")) == false)155 {156 eComProductCanonical = String.Format("{0}://{1}{2}", GetGlobalValue("Global:Request.Scheme"), GetGlobalValue("Global:Request.Host"), GetString("Ecom:Product.Canonical"));157 }158 else159 {160 eComProductCanonical = String.Format("{0}://{1}{2}", GetGlobalValue("Global:Request.Scheme"), GetGlobalValue("Global:Request.Host"), globalValueUrl);161 }162 }163164 @RenderingService.Instance.SectionEnd()165166167168 @if (espressoProduct.B2CActive == "No" && isUserAuthenticated == false)169 {170 }171 else172 {173 @SnippetStart("eComCanonical")@eComProductCanonical@SnippetEnd("eComCanonical")174175 <div class="e-product js-e-product" data-product-id="@espressoProduct.Id" data-has-variants="@espressoProduct.HasVariants.ToString().ToLower()" data-variant-id="@espressoProduct.VariantId">176177 @RenderingService.Instance.SectionStart( new SectionSettings178 {179 Classes = new ClassList( "e-section pb-2" )180 } )181 <div class="col-12">182 <div class="row">183 <div class="col-12 col-md-4 col-lg-3 offset-md-1 pb-4">184 <div class="e-product-text-container">185186 <img class="my-4 text-muted brand-logo" style="height: 28px;" src="@brandLogo"/>187188 <p class="h4 mb-1">189 @espressoProduct.Number190 </p>191192 <h1 class="e-product-name mb-1 mt-0 h2">193 @espressoProduct.Name194 </h1>195196 <p class="e-product-price h3 mb-2 mt-0">197 @if ( isUserAuthenticated )198 {199 <span class="mr-1">200 @espressoProduct.Price.Format()201 </span>202 if ( espressoProduct.SuggestedRetailPrice.Value > espressoProduct.Price.Value )203 {204 <span class="text-muted" style="text-decoration: line-through;">205 @espressoProduct.SuggestedRetailPrice.Format()206 </span>207 }208 }209 </p>210211 <h4>@Translate( "eCom Product - Vejl. udsalgspris - Text", "Vejl. udsalgspris" )</h4>212 <p class="e-product-price mb-2 mt-0">213 @espressoProduct.WholesalePrice.Format()214 </p>215216 @if ( isUserAuthenticated )217 {218 <div class="small">219 @RenderingService.Instance.PartialView( "ecom/product/partials/delivery-info.cshtml", espressoProduct )220 </div>221 @RenderingService.Instance.PartialView( "ecom/product/partials/add-to-cart.cshtml", espressoProduct )222 <br/>223 }224 else225 {226 @Espresso.Area.Item.EcommerceAlternativeCallToAction227 <p class="small pr-4">228 <span class="small">@Translate( "eCom Product - We cannot garantee - Text", "*Vi kan ikke garantere, at hele sortimentet forefindes hos alle forhandlere." )</span>229 </p>230 }231232 </div>233 </div>234 <div class="col-12 col-md-7 col-lg-8 order-first">235236 @RenderingService.Instance.PartialView( "ecom/product/partials/images.cshtml", espressoProduct )237 @if ( isUserAuthenticated )238 {239 IEnumerable< CustomerProductList > userFavoriteLists = CustomerProductList.GetAllProductLists( PageView.Current().User.ID );240 string isInAnyList = userFavoriteLists.Any( fl => espressoProduct.IsInFavoriteList( fl.ID ) ) == true ? "isInAnyList" : "";241 <div class="bloomingville-addtolist-wrapper js-bloomingville-addtolist-wrapper @isInAnyList">242 <div class="dropdown js-e-productlist-favorite-list-container" data-product-id="@espressoProduct.Id" data-variant-id="@espressoProduct.VariantId">243 <span class="dropdown-toggle" data-toggle="dropdown">244 <span class="bloomingville-productlist-addtolist label-favorite"></span>245 </span>246 <div class="dropdown-menu dropdown-menu-left pt-0">247 @RenderingService.Instance.PartialView( "ecom/productlist/partials/add-to-favorites.cshtml", espressoProduct )248 </div>249 </div>250 </div>251 }252253 </div>254 </div>255 </div>256 @RenderingService.Instance.SectionEnd()257258259 @RenderingService.Instance.SectionStart( new SectionSettings260 {261 Classes = new ClassList( "col-12 col-md-7 pb-6 col-lg-6 col-lg-8 col-xl-8 mr-auto is-lg e-section" ),262 ContentClasses = new ClassList( "col-12 is-lg" ),263 Collapsible = false264 } )265 <div class="col-12">266 <div class="p-accordion-container border-dark">267 @if ( !string.IsNullOrEmpty( espressoProduct.DescriptionShort ) )268 {269 <div class="p-accordion-item border border-right-0 border-left-0 border-dark e-theme-light mb-0 border-bottom-0">270 <div class="p-accordion-toggle">271 <p data-toggle="collapse" data-target="#e-accordion-12574-185" class="py-1 d-flex align-items-center m-0 justify-content-between collapsed" aria-expanded="false">272 <span class="p-accordion-toggle-text line-height-sm h4 my-0">@Translate( "eCom Product - Produktbeskrivelse - Heading", "Produktbeskrivelse" )</span><i class="material-icons p-accordion-toggle-icon text-dark ml-1 order-last">keyboard_arrow_down</i>273 </p>274 </div>275 <div id="e-accordion-12574-185" class="fade collapse" style="">276 <div class="pb-4 pt-1 pr-2 p-accordion-content">277 <div class="p-txt-container small">278 @espressoProduct.DescriptionShort279 </div>280 </div>281 </div>282 </div>283 }284 <div class="p-accordion-item border border-right-0 border-left-0 border-dark e-theme-light mb-0 ">285 <div class="p-accordion-toggle">286 <p data-toggle="collapse" data-target="#e-accordion-specifications" class="py-1 d-flex align-items-center m-0 collapsed justify-content-between">287 <span class="p-accordion-toggle-text line-height-sm h4 my-0">@Translate( "eCom Product - Produktspecifikationer - Heading", "Produktspecifikationer" )</span><i class="material-icons p-accordion-toggle-icon text-dark ml-1 order-last">keyboard_arrow_down</i>288 </p>289 </div>290 <div id="e-accordion-specifications" class="collapse fade">291 <div class="pb-4 pt-1 p-accordion-content">292 <div class="p-txt-container">293 <table class="table table-sm table-striped">294 @foreach ( LoopItem FieldDisplayGroups in GetLoop( "FieldDisplayGroups" ) )295 {296 if ( FieldDisplayGroups.GetString( "Ecom:FieldDisplayGroup.Name" ) == "Produktspecifikationer" )297 {298 foreach ( LoopItem field in FieldDisplayGroups.GetLoop( "Fields" ) )299 {300 if ( !string.IsNullOrEmpty( field.GetString( "Ecom:FieldDisplayGroup.Field.Value" ) ) )301 {302 <tr>303 <th class="pl-2" style="width: 50%">304 @Translate( string.Format( "eCom Product - Specifications - {0} - Label", field.GetString( "Ecom:FieldDisplayGroup.Field.Id" ) ), field.GetString( "Ecom:FieldDisplayGroup.Field.Name" ) )305 </th>306 <td>@field.GetString( "Ecom:FieldDisplayGroup.Field.Value" )</td>307 </tr>308 }309 }310 }311 }312 </table>313 </div>314 </div>315 </div>316 </div>317 <div class="p-accordion-item border border-right-0 border-left-0 border-top-0 border-dark e-theme-light mb-0 ">318 <div class="p-accordion-toggle">319 <p data-toggle="collapse" data-target="#e-accordion-images" class="py-1 d-flex align-items-center m-0 collapsed justify-content-between">320 <span class="p-accordion-toggle-text line-height-sm h4 my-0">@Translate( "eCom Product - Billeder - Heading", "Billeder" )</span><i class="material-icons p-accordion-toggle-icon text-dark ml-1 order-last">keyboard_arrow_down</i>321 </p>322 </div>323 <div id="e-accordion-images" class="collapse fade">324 <div class="pb-4 pt-1 p-accordion-content">325 <div class="p-txt-container">326 @RenderingService.Instance.PartialView( "ecom/product/partials/images-download.cshtml", espressoProduct )327 </div>328 </div>329 </div>330 </div>331 </div>332 </div>333 @RenderingService.Instance.SectionEnd()334335 @RenderingService.Instance.SectionStart( new SectionSettings336 {337 Classes = new ClassList( "col-12 e-section e-theme-primary" ),338 ContentClasses = new ClassList( "col-12 col-md-10 col-lg-8 py-6 mx-auto" )339 } )340 <div class="col-12">341 <img class="mb-4 col-4 mx-auto d-flex mx-auto" src="@brandLogo"/>342 <p class="lead text-center mb-4">@brandText</p>343 <img src="@imageLifeStyle" class="p-img">344 </div>345 @RenderingService.Instance.SectionEnd()346347 @RenderingService.Instance.SectionStart( new SectionSettings348 {349 Classes = new ClassList( "col-12 e-section e-theme-auto" ),350 ContentClasses = new ClassList( "col-12 pt-6" )351 } )352353 @if ( espressoProduct.RelatedGroups.ContainsKey( relatedGroupIds[ 2 ] ) && espressoProduct.RelatedGroups[ relatedGroupIds[ 2 ] ].Products.Any() )354 {355 string handlebarsTemplateName = string.Format( "{0}-{1}-{2}", espressoProduct.Id, "related-group", espressoProduct.RelatedGroups[ relatedGroupIds[ 2 ] ].Id ).ToLower();356 string jsonSrc = string.Format( "{0}.{1}.{2}", espressoProduct.Id, "relatedGroups", espressoProduct.RelatedGroups[ relatedGroupIds[ 2 ] ].Id );357358 <div class="p mx-auto p-icontext col-12 col-sm-12 col-md-10 col-lg-6">359 <div class="row align-items-start">360 <div class="p-txt-container col col-12">361 <h2 class="h1" style="text-align: center;">@brandPersonHeading</h2>362 <p class="lead" style="text-align: center;">363 @brandPersonText364 </p>365 </div>366 </div>367 </div>368 <div class="p p-divider col-12" id="12409">369 <hr class="p-divider-rule border-transparent">370 </div>371 <div class="p mb-5 mx-auto p-imagetext p-imagetext-tb col-12 col-sm-12 col-md-6 col-lg-4 ">372 <div class="row">373 <div class="p-txt-container col-12 text-center">374 <h4>@brandPersonTitle</h4>375 </div>376 <div class="p-img-container col-8 col-lg-12 mx-auto order-first">377 <div class="row">378 <div class="col-12 mb-2">379 <img src="/admin/public/getimage.ashx?Image=@brandPersonImage&amp;Width=640&amp;Height=852&amp;Format=png&amp;Quality=75&amp;Crop=0" class="p-img" alt="">380 </div>381 </div>382 </div>383 </div>384 </div>385 <div class="p p-imagetext p-imagetext-tb col-12 col-lg-6">386387 <div class="e-productlist js-e-jsonpublisher" data-json-src="@jsonSrc" data-json-src-prop="" data-json-template-prop="" data-json-item-count="4" data-json-item-count-prop="products" data-template=".js-e-handlebars-tmpl-@handlebarsTemplateName">388389 <script class="js-e-handlebars-tmpl-@handlebarsTemplateName" type="text/x-handlebars-template">390 <div class="e-productlist-main">391 <div class="row">392 <div class="col-12">393 <div class="e-productlist">394 {{#if products}}395 <div class="row">396 {{#each products}}397 <div class="col-6">398 {{{listItemHtml}}}399 </div>400 {{/each}}401 </div>402 {{/if}}403 </div>404 </div>405 </div>406 </div>407 </script>408409 </div>410 </div>411 }412 @RenderingService.Instance.SectionEnd()413414415 @{416 List<string> productIds = new List< string >();417 if ( Context.Cart != null && Context.Cart.OrderLines.Any() )418 {419 OrderLineCollection orderLines = Context.Cart.OrderLines;420 productIds = orderLines.Select( ol => ol.ProductId ).ToList();421 }422 productIds.Add(espressoProduct.Id);423424 HandlebarsProductListTemplate handlebarsProductListTemplate = HandlebarsService.Instance.GetProductListTemplate( new HandlebarsProductListTemplateSettings()425 {426 Classes = new ClassList( "e-productlist js-e-productlist js-e-require" ),427 HeaderClasses = new ClassList( "col-12 border-bottom" ),428 MainClasses = new ClassList( "col-12 js-clerk-content" ),429 AsideClasses = new ClassList( "col-12" ),430 FooterClasses = new ClassList( "col-12 col-lg-3 col-xl-3" ),431 PageSize = string.IsNullOrEmpty( HttpContext.Current.Request[ "PageSize" ] ) ? GetInteger( "Ecom:ProductList.PageSize" ).ToString() : HttpContext.Current.Request[ "PageSize" ],432 PageNumber = string.IsNullOrEmpty( HttpContext.Current.Request[ "PageNum" ] ) ? GetInteger( "Ecom:ProductList.CurrentPage" ).ToString() : HttpContext.Current.Request[ "PageNum" ],433 SortBy = ProductListService.Instance.GetSortingParameterName( string.IsNullOrEmpty( HttpContext.Current.Request[ "SortBy" ] ) ? "" : HttpContext.Current.Request[ "SortBy" ] ),434 SortOrder = string.IsNullOrEmpty( HttpContext.Current.Request[ "SortOrder" ] ) ? GetString( "Ecom:ProductList.SortOrder" ) : HttpContext.Current.Request[ "SortOrder" ],435 ShowFilters = false,436 Heading = Espresso.Item.HeadingShow == "True" ? Espresso.Item.Name : string.Empty437 } );438439 List< EspressoPagingPage > productListPaging = new List< EspressoPagingPage >();440 if ( GetLoop( "Ecom:ProductList.Pages" ).Count > 0 )441 {442 foreach ( LoopItem page in GetLoop( "Ecom:ProductList.Pages" ) )443 {444 productListPaging.Add( new EspressoPagingPage()445 {446 Url = page.GetString( "Ecom:ProductList.Pages.Page.Url" ),447 Number = page.GetString( "Ecom:ProductList.Pages.Page.Number" )448 } );449 }450 }451452 EspressoProductList currentlyWatched = APIWrapper.GetCurrentlyWatchedProducts("CurrentlyWatchedProducts");453 if ( currentlyWatched.Products.Any() )454 {455 List< EspressoProduct > currentlyWatchedProducts = currentlyWatched.Products.Where(cwp => !productIds.Contains(cwp.Id) ).ToList();456 @RenderingService.Instance.SectionStart( new SectionSettings457 {458 Classes = new ClassList( "e-section py-6 bg-light" )459 } )460 <div class="e-productlist-header"><p class="h1">@Translate("eCom Product - Related group - CustomersWhoSawThisAlsoSaw - Heading", "Andre ser også på" )</p></div>461 <div class="@handlebarsProductListTemplate.MainClasses">462 @RenderingService.Instance.PartialView( "ecom/productlist/partials/products.cshtml", ProductListService.Instance.GetProductList(463 new ProductListSettings()464 {465 Products = currentlyWatchedProducts.Take( 4 ).ToList(),466 Paging = productListPaging,467 PageSize = Convert.ToInt32( handlebarsProductListTemplate.PageSize ),468 CurrentPage = Convert.ToInt32( handlebarsProductListTemplate.PageNumber )469 }470 ) )471 </div>472 @RenderingService.Instance.SectionEnd()473 }474475476 EspressoProductList recentlyBought = APIWrapper.GetRecentlyBoughtProducts("RecentlyBoughtProducts");477 if (recentlyBought.Products.Any() )478 {479 List< EspressoProduct > recentlyBoughtProducts = recentlyBought.Products.Where(cwp => !productIds.Contains(cwp.Id) ).ToList();480 @RenderingService.Instance.SectionStart( new SectionSettings481 {482 Classes = new ClassList( "e-section py-6 bg-light" )483 } )484 <div class="e-productlist-header"><p class="h1">@Translate("eCom Product - Related group - CustomersWhoBoughtThisItemAlsoBought - Heading", "Andre købte også" )</p></div>485 <div class="@handlebarsProductListTemplate.MainClasses">486 @RenderingService.Instance.PartialView( "ecom/productlist/partials/products.cshtml", ProductListService.Instance.GetProductList(487 new ProductListSettings()488 {489 Products = recentlyBoughtProducts.Take( 4 ).ToList(),490 Paging = productListPaging,491 PageSize = Convert.ToInt32( handlebarsProductListTemplate.PageSize ),492 CurrentPage = Convert.ToInt32( handlebarsProductListTemplate.PageNumber )493 }494 ) )495 </div>496 @RenderingService.Instance.SectionEnd()497 }498499 }500501 @RenderingService.Instance.PartialView( "ecom/product/partials/metadata.cshtml", espressoProduct )502 @RenderingService.Instance.PartialView( "ecom/product/partials/gtm-tracking.cshtml", espressoProduct )503504 <code class="js-e-breadcrumb-item-append" data-text="@HttpUtility.HtmlAttributeEncode( espressoProduct.Name )" data-link="@HttpUtility.HtmlAttributeEncode( espressoProduct.Link )"></code>505506507 <script>508 e4.data.set('@espressoProduct.Id',509 JSON.parse('@HttpUtility.JavaScriptStringEncode( JsonService.Instance.ToJson( espressoProduct ) )'))510 </script>511512 </div>513 @RenderingService.Instance.SectionStart(new SectionSettings())514515 <script id="js-e-handlebars-tmpl-favorite-list" type="text/x-handlebars-template">516 {{#each lists as | list |}}517 <div class="dropdown-item">518 <label class="custom-checkbox custom-control m-0">519 <input type="checkbox" class="custom-control-input js-e-favorite-list" id="js-e-favorite-list-{{list.id}}" name="favorite-list-{{list.id}}" {{#if list.isInFavoriteList}}checked{{/if}} data-url-add="{{{list.addUrl}}}" data-url-remove="{{{list.removeUrl}}}">520 <span class="custom-control-indicator"></span>521 <span class="custom-control-description">{{list.name}}</span>522 </label>523 </div>524 {{/each}}525 </script>526 }527
keyboard_arrow_up