Teltplugg

Error executing template "Designs/isabella/eCom/Productlist/espresso-with-filters.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 Co3.Isabella.Dw.DAL.Repositories.ProductRepository.GetPrices(String[] productNumbers, String dataAreaId, String currencyCode, String countryCode, String command)
at Co3.Isabella.Dw.Services.PriceService.GetPrices(String[] productNumbers, String dataAreaId, String currencyCode, String countryCode, String command)
at Co3.Isabella.Dw.Services.PriceService.GetItemPrices(String productNumber, String dataAreaId, String currencyCode, String countryCode, String command)
at Co3.Isabella.Dw.Services.PriceService.GetProductPrice(String productNumber, Double quantity, String dataAreaId, String currencyCode, String countryCode, String command)
at Co3.Isabella.Dw.Services.PriceService.GetProductPrice(Product product, Double quantity, String dataAreaId, String currencyCode, String countryCode, String command)
at Co3.Isabella.Dw.Providers.PriceProvider.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) in C:\Data\Development\git\espresso-v4.0.0-rc.18\Co3.Espresso.Website\Services\ProductService.cs:line 72
at Co3.Espresso.Website.Services.ProductService.GetPrice(String productId, String variantId, String languageId) in C:\Data\Development\git\espresso-v4.0.0-rc.18\Co3.Espresso.Website\Services\ProductService.cs:line 91
at CompiledRazorTemplates.Dynamic.RazorEngine_f934e7452abf499a88370a3e0229a629.Execute() in F:\dynamicweb.net\Solutions\isabella.espresso4.dk\Files\Templates\Designs\isabella\eCom\Productlist\espresso-with-filters.cshtml:line 1023
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 Co3.Espresso.Base.Extensions 3 @using Co3.Espresso.Website.Models.FrontEnd 4 @using Co3.Espresso.Website.Services 5 @using Dynamicweb.Content 6 @using Dynamicweb.Content.Items.Metadata 7 @using Dynamicweb.Content.Items 8 @using Dynamicweb.Frontend 9 @using System.Web 10 @using System.Web.Util 11 @using Co3.Espresso.Website.Services 12 @using Dynamicweb.Ecommerce 13 14 @using Dynamicweb.Ecommerce.Products 15 @using ParagraphService = Co3.Espresso.Website.Services.ParagraphService 16 @using ProductService = Co3.Espresso.Website.Services.ProductService 17 @using System.Globalization 18 @using System.Security.Cryptography.X509Certificates 19 @using System.Web.Razor.Parser.SyntaxTree 20 @using Co3.Espresso.Base.Extensions 21 @using Co3.Espresso.Website.Models.FrontEnd 22 @using Co3.Espresso.Website.Services 23 @using Co3.Isabella.Dw.Models.FrontEnd.Ecommerce 24 @using Dynamicweb.Content 25 @using Dynamicweb.Ecommerce.Products 26 @using Dynamicweb.Frontend 27 @using Dynamicweb.Rendering 28 @using Dynamicweb.Rendering.Translation 29 @using Dynamicweb.SystemTools 30 @using EcomContext = Dynamicweb.Ecommerce.Common.Context 31 @using eProductService = Co3.Espresso.Website.Services.ProductService 32 @using Page = Dynamicweb.Content.Page 33 @using PageService = Dynamicweb.Content.PageService 34 35 @functions { 36 37 public string getCountryCodeFromArea(Area area) 38 { 39 RegionInfo regionInfo = new RegionInfo( area.CultureInfo.LCID ); 40 return regionInfo.TwoLetterISORegionName; 41 } 42 43 public string getCheckoutSetup(string shopType = "") 44 { 45 bool isB2bCheckout = PageView.Current().User != null; 46 if (isB2bCheckout) 47 { 48 return "shipping,customer,approve"; 49 } else if (shopType == "B2C") 50 { 51 return "shipping,payment,approve"; 52 } else if (shopType == "Outlet") 53 { 54 return "shipping,customer,payment,approve"; 55 } 56 57 return "customer,approve"; 58 } 59 60 public static string GetStandardCollapseToggleTextExpand() 61 { 62 return "Se mere"; 63 } 64 65 public static string GetStandardCollapseToggleTextCollapse() 66 { 67 return "Se mindre"; 68 } 69 70 public string getModelTypeLink() 71 { 72 bool isUserAuthenticated = PageView.Current().User != null; 73 string eComCountryCode = PageView.Current().Area.Item[ "EcommerceCountryCode" ] != null ? PageView.Current().Area.Item[ "EcommerceCountryCode" ].ToString() : ""; 74 string returnValue = string.Empty; 75 76 if ( isUserAuthenticated == false ) 77 { 78 if ( string.IsNullOrEmpty(eComCountryCode) == false) 79 { 80 { 81 returnValue = string.Format( "Ecom:Product.CategoryField.ModelType.ModelTypeLink_{0}.Value", eComCountryCode ); 82 } 83 } 84 else 85 { 86 returnValue = "Ecom:Product.CategoryField.ModelType.ModelTypeLink.Value"; 87 } 88 } 89 else 90 { 91 if ( string.IsNullOrEmpty(eComCountryCode) == false) 92 { 93 { 94 returnValue = string.Format( "Ecom:Product.CategoryField.ModelType.ModelTypeLinkB2B_{0}.Value", eComCountryCode ); 95 } 96 } 97 else 98 { 99 returnValue = "Ecom:Product.CategoryField.ModelType.ModelTypeLinkB2B.Value"; 100 } 101 } 102103 return returnValue; 104 } 105106 } 107108 @helper ProductDescription(string sectionClasses = "e-section", bool sectionCollapse = false, string contentClasses = null, string heading = null, string content = null, string collapseToggleTextExpand = null, string collapseToggleTextCollapse = null) 109 { 110 if ( string.IsNullOrEmpty( content ) == false ) 111 { 112 ClassList headingClassList = new ClassList(); 113 headingClassList.AddClasses( "col-12" ); 114 ClassList contentClassList = new ClassList(); 115 contentClassList.AddClasses( "col-12" ); 116117 @sectionStart( sectionClasses: sectionClasses, sectionCollapse: sectionCollapse, contentClasses: contentClasses, collapseToggleTextCollapse: collapseToggleTextCollapse, collapseToggleTextExpand: collapseToggleTextExpand ) 118119 if ( string.IsNullOrEmpty( heading ) == false ) 120 { 121 <div class="@headingClassList"> 122 <h2>@heading</h2> 123 </div> 124 } 125 <div class="@contentClassList"> 126 @content 127 </div> 128129 @sectionEnd() 130 } 131 } 132133134 @helper ProductVideo(string sectionClasses = "e-section", string contentClasses = null, string heading = null, string videoURL = null) 135 { 136 if ( string.IsNullOrEmpty( videoURL ) == false ) 137 { 138 ClassList headingClassList = new ClassList(); 139 headingClassList.AddClasses( "col-12" ); 140 ClassList contentClassList = new ClassList(); 141 contentClassList.AddClasses( "col-12" ); 142143144 @sectionStart( sectionClasses: sectionClasses, contentClasses: contentClasses ) 145146 if ( string.IsNullOrEmpty( heading ) == false ) 147 { 148 <div class="@headingClassList"> 149 <h2>@heading</h2> 150 </div> 151 } 152153 <div class="@contentClassList"> 154 <div class="embed-responsive embed-responsive-16by9 mb-2"> 155 <iframe class="embed-responsive-item cookieconsent-optin-marketing" data-cookieconsent="marketing" data-cookieblock-src="@videoURL" width="1080" height="608" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe> 156 <div class="cookieconsent-optout-marketing"> 157 <div> 158 <a class="btn btn-primary" href="javascript:Cookiebot.renew()"> 159 @Dynamicweb.Rendering.Translation.Translation.GetTranslation("CookieBot - Video - accept marketing-cookies", PageView.Current().Area.Layout.Design) 160 </a> 161162 </div> 163 </div> 164 </div> 165 </div> 166 @sectionEnd() 167 } 168 } 169170 @helper ProductRelatedProducts(string sectionClasses = "e-section", bool sectionCollapse = false, string contentClasses = null, string heading = null, string content = null, string collapseToggleTextExpand = null, string collapseToggleTextCollapse = null, 171 IEnumerable< Product > productLoop = null) 172 { 173 if ( productLoop != null && productLoop.Any() == true ) 174 { 175 ClassList headingClassList = new ClassList(); 176 headingClassList.AddClasses( "col-12" ); 177 ClassList contentClassList = new ClassList(); 178 contentClassList.AddClasses( "col-12" ); 179180 @sectionStart( sectionClasses: sectionClasses, sectionCollapse: sectionCollapse, contentClasses: contentClasses, collapseToggleTextCollapse: collapseToggleTextCollapse, collapseToggleTextExpand: collapseToggleTextExpand ) 181182 if ( string.IsNullOrEmpty( heading ) == false ) 183 { 184 <div class="@headingClassList"> 185 <h4 class="isabella-text-bullets-left mb-3">@heading</h4> 186 </div> 187 } 188 <div class="@contentClassList"> 189 <div class="e-products mb-2"> 190 <div class="row"> 191 @{ 192 string productlistItemClassList = "col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3"; 193 } 194 @foreach ( Product product in productLoop.Where(p => p.Groups.Any(g => g.ShopId.Equals("SHOP1")) && (bool) p.GetCategoryValue( "ProductsGeneral", "PIMActive" ) != false && (bool) p.ShowInProductList && p.Active) ) 195 { 196 @ProductlistItem(product, productlistItemClassList) 197 } 198 </div> 199 </div> 200 </div> 201202 @sectionEnd() 203 } 204 } 205206207 @helper ProductlistItem(Product product, string productlistItemClassList = null, string isModelProductList = null) 208 { 209 Dynamicweb.Ecommerce.Products.ProductService dwProductService = new Dynamicweb.Ecommerce.Products.ProductService(); 210 string shopType = PageView.Current().Area.Item["ShopType"]?.ToString(); 211 string productLink = eProductService.Instance.GetProductLink( product.GetDefaultGroupByShopId( product.DefaultShopId ).Id, product.Id, product.VariantId ); 212213214 productLink = SearchEngineFriendlyURLs.GetFriendlyUrl( productLink ); 215216 if (shopType == "Outlet") 217 { 218 Page page = new PageService().GetPageByNavigationTag(PageView.Current().AreaID, "outletdisplaypage"); 219 if (page != null) 220 { 221 productLink = SearchEngineFriendlyURLs.GetFriendlyUrl( $"Default.aspx?ID={page.ID}&productId={product.Id}" ); 222 } 223224 } 225226 IsabellaProductImageUrl primaryImage = Co3.Isabella.Dw.Services.ProductService.Instance.GetImagePrimary(product); 227 List<IsabellaProductImageUrl> detailsImages = Co3.Isabella.Dw.Services.ProductService.Instance.GetImageDetails(product); 228 string detailsImage = detailsImages?.FirstOrDefault( pd => pd.Type == 0 && pd.GroupId == 4 )?.Medium ?? string.Empty; 229230 //string productlistDetailImage = product.Details.FirstOrDefault( pd => pd.Type == 0 && pd.GroupId == 4 )?.Value; 231232233234 string image = "/Files/Templates/Designs/isabella/_assets/img/NoImage.gif"; 235236 if (primaryImage != null) 237 { 238 image = primaryImage.Medium; 239 } 240241 if ( product != null ) 242 { 243 dynamic productData = new 244 { 245 id = product.Id, 246 url = productLink, 247 number = product.Number, 248 name = product.Name, 249 imageDefault = image, 250 price = Co3.Isabella.Dw.Services.ProductService.Instance.GetPrice( product.Id ).Format(), 251 priceClean = Co3.Isabella.Dw.Services.ProductService.Instance.GetPrice( product.Id ).Price, 252 productIntroText = product.GetCategoryValue( "ProductsGeneral", "ProductIntroText" )?.ToString(), 253 news = product.GetCategoryValue( "ProductsGeneral", "News" )?.ToString(), 254 productType = product.GetCategoryValue( "ProductsGeneral", "ProductType" )?.ToString(), 255 isModelProductList = isModelProductList, 256 productlistDetailImage = detailsImage, 257 shopType 258 }; 259260 <div class="@productlistItemClassList"> 261 <div class="border-1 card mb-6"> 262 <a href="@productData.url"> 263 @if ( productData.isModelProductList == "True" ) 264 { 265 <img src="@productData.productlistDetailImage" alt="@productData.name @productData.productType" class="col-12 p-0"> 266 } 267 else 268 { 269 <img src="@productData.imageDefault" alt="@productData.name @productData.productType" class="col-12 p-0"> 270 } 271 @if ( productData.news == "True" ) 272 { 273 <div class="isabella-product-item-news"> 274 @Dynamicweb.Rendering.Translation.Translation.GetTranslation( "Ecom Product - News Badge - Text" ) 275 </div> 276 } 277 </a> 278 <div class="card-body p-1 p-lg-3"> 279 <h4 class="e-products-item-name mb-0"> 280 <a href="@productData.url"> 281 @productData.name 282 </a> 283 </h4> 284285 </div> 286 </div> 287 </div> 288 } 289 } 290291292 @helper sectionStart(string sectionClasses = "e-section", string contentClasses = null, bool sectionCollapse = false, string sectionId = null, string collapseToggleTextExpand = null, string collapseToggleTextCollapse = null) 293 { 294 sectionId = string.IsNullOrEmpty( sectionId ) ? Guid.NewGuid().ToString( "N" ) : sectionId; 295 ClassList sectionClassList = new ClassList(); 296 sectionClassList.AddClasses( sectionClasses ); 297 ClassList contentClassList; 298299 if ( contentClasses == null ) 300 { 301 contentClassList = Co3.Espresso.Website.Services.PageService.Instance.GetResponsiveClassesFromPageItem( PageView.Current().Page.Item ); 302 } 303 else 304 { 305 contentClassList = new ClassList(); 306 contentClassList.AddClasses( contentClasses ); 307 } 308309 // TODO: Split collapse logic into separate helper function. 310 string collapseId = Guid.NewGuid().ToString( "N" ); 311 ClassList collapseToggleClassList = new ClassList(); 312 if ( sectionCollapse ) 313 { 314 sectionClassList.AddClasses( "p-section-collapse js-p-section-collapse" ); 315 collapseToggleClassList.AddClasses( contentClasses ); 316 collapseToggleClassList.AddClasses( "p-section-collapse-toggle collapsed order-last text-center" ); 317 contentClassList.AddClasses( "p-section-collapse-content collapse is-md" ); 318 } 319320 @:<section class="@sectionClassList" id="@sectionId"> 321 @:<div class="container-fluid"> 322 @:<div class="row"> 323324 // TODO: Split collapse logic into separate helper function. 325 if ( sectionCollapse ) 326 { 327 <div class="@collapseToggleClassList" data-toggle="collapse" data-target="#@collapseId"> 328 <button class="btn btn-primary p-section-collapse-toggle-btn" type="button"> 329 <i class="material-icons p-section-collapse-toggle-icon">keyboard_arrow_down</i> 330 </button> 331 <small class="h4 p-section-collapse-toggle-text" data-expand-text="@( string.IsNullOrEmpty( collapseToggleTextExpand ) ? GetStandardCollapseToggleTextExpand() : collapseToggleTextExpand )" data-collapse-text="@( string.IsNullOrEmpty( collapseToggleTextCollapse ) ? GetStandardCollapseToggleTextCollapse() : collapseToggleTextCollapse )"></small> 332 </div> 333 } 334335 @:<div class="@contentClassList" id="@collapseId"> 336 @:<div class="row"> 337 } 338339 @helper sectionEnd() 340 { 341 @:</div> 342 @:</div> 343 @:</div> 344 @:</div> 345 @:</section> 346 } 347348349350351352 @{ 353 ClassList productlistMainClassList = new ClassList(); 354 productlistMainClassList.AddClasses( "col-12" ); 355 if ( Espresso.Item.FiltersShow == "True" ) 356 { 357 productlistMainClassList.AddClasses( "col-lg-9 col-xl-9" ); 358 } 359 ClassList productlistAsideClassList = new ClassList(); 360 productlistAsideClassList.AddClasses( "col-12 col-lg-3 col-xl-3 order-lg-first" ); 361362 ClassList productlistItemClassList = new ClassList(); 363 Dictionary< string, decimal > paragraphEcommerceGridItemWidth = ProductlistService.Instance.GetGridItemWidth( PageView.Current().CurrentParagraph.Item.GetValue< string >( "ItemWidth" ) ); 364 productlistItemClassList.AddClasses( paragraphEcommerceGridItemWidth.ToResponsiveClasses() ); 365366 object aMeasureLink = Espresso.Page.Area.Item["A_measureLink"]; 367 } 368369 <div class="js-e-loading-wait js-e-productlist"> 370371 <div class="row"> 372 <div class="col-12"> 373 <div class="js-e-productslist-header small"> 374 <div class="align-items-end row"> 375376 @if ( Espresso.Item.FiltersShow == "True" ) 377 { 378 <div class="@productlistAsideClassList d-lg-block d-none"> 379 <div class="border-bottom e-productslist-header"> 380 </div> 381 </div> 382 } 383384 @if ( Espresso.Item.SortShow == "True" || Espresso.Item.PagingShow == "True" || Espresso.Item.FiltersShow == "True" ) 385 { 386 <div class="@productlistMainClassList"> 387 <div class="align-items-end d-lg-flex d-none e-productslist-header align-content-between flex-wrap"> 388 @if ( Espresso.Item.SortShow == "True" ) 389 { 390 <div class="align-items-center d-flex js-e-productlist-sort"> 391 <script id="js-e-handlebars-tmpl-productlist-sort" type="text/x-handlebars-template"> 392 <fieldset class="form-inline"> 393 <label for="Sort" class="mr-1 d-none"> 394 @Translate( "eCom Productlist - Sorting - Label", "Sort: " ) 395 </label> 396 <select name="Sort" class="js-e-productlist-sort-select custom-select" style="padding-bottom:0.25em;"> 397 <option value="SortName ASC" {{#compare sort.sort '===' 'SortName ASC'}}selected{{/compare}}>@Translate( "eCom Productlist - Sorting - Name ASC - Label", "Name ASC" )</option> 398 <option value="Created ASC" {{#compare sort.sort '===' 'Created ASC'}}selected{{/compare}}>@Translate( "eCom Productlist - Sorting - Created ASC - Label", "Created ASC" )</option> 399 <option value="SortPrice ASC" {{#compare sort.sort '===' 'SortPrice ASC'}}selected{{/compare}}>@Translate( "eCom Productlist - Sorting - Price ASC - Label", "Price ASC" )</option> 400 <option value="SortPrice DESC" {{#compare sort.sort '===' 'SortPrice DESC'}}selected{{/compare}}>@Translate( "eCom Productlist - Sorting - Price DESC - Label", "Price DESC" )</option> 401 </select> 402 </fieldset> 403 </script> 404 </div> 405406407 } 408 @if ( Espresso.Item.PagingShow == "True" ) 409 { 410 <div class="align-items-center d-flex e-productlist-paging js-e-productlist-paging justify-content-between ml-auto"> 411 <script id="js-e-handlebars-tmpl-productlist-paging" type="text/x-handlebars-template"> 412 {{#if page.productCount}} 413 <span class="text-nowrap {{#compare page.totalPages '>' 1 }}mr-4{{/compare}}"> 414 <strong>{{page.viewing.from}} - {{page.viewing.to}}</strong> @Translate( "eCom Productlist Paging - Product Count Of - Text", "of" ) 415 <span> {{page.productCount}}</span> 416 </span> 417418419 <span class=""> 420 {{#compare page.prevPage '!==' 0 }} 421 <a href="{{page.pagingUrl}}={{page.prevPage}}" class="text-auto text-uppercase text-nowrap text-decoration-none p-0 pl-1 mr-1 js-e-productlist-set-pagenum" data-page-num="{{page.prevPage}}"> 422 <i class="material-icons">arrow_back</i> 423 <span class="">@Translate( "eCom Productlist Paging - Previous - Text", "Previous" )</span> 424 </a> 425 {{/compare}} 426427 {{#compare page.nextPage '!==' 0 }} 428 <a href="{{page.pagingUrl}}={{page.nextPage}}" class="text-auto text-uppercase text-nowrap text-decoration-none p-0 pr-1 ml-1 js-e-productlist-set-pagenum" data-page-num="{{page.nextPage}}"> 429 <span class="">@Translate( "eCom Productlist Paging - Next - Text", "Next" )</span> 430 <i class="material-icons">arrow_forward</i></a> 431 {{/compare}} 432433 {{#compare page.pageSize '!==' 999}} 434 {{#compare page.totalPages '>' 1 }} 435 <a href="{{page.pagingUrl}}=9999" class="text-auto text-uppercase text-nowrap text-decoration-none p-0 pl-1 js-e-productlist-set-pagesize" data-page-size="999"> 436 @Translate( "eCom Productlist Paging - Show All - Text", "Show all" ) 437 </a> 438 {{/compare}} 439 {{/compare}} 440441 {{#compare page.pageSize '===' 999}} 442 <a href="#" class="text-auto text-uppercase text-nowrap text-decoration-none p-0 pl-1 js-e-productlist-set-pagesize d-none" data-page-size="@Espresso.Item.Pagesize"> 443 @Translate( "eCom Productlist Paging - Reset - Link", "Reset" ) 444 </a> 445 {{/compare}} 446447 <span> 448 {{/if}} 449 </script> 450 </div> 451452453 } 454 </div> 455 <div class="align-items-stretch d-flex d-lg-none e-productslist-header flex-wrap justify-content-strech"> 456 <div class="align-items-center d-flex justify-content-between my-1 w-100"> 457 @if ( Espresso.Item.SortShow == "True" ) 458 { 459 <div class="align-items-center d-flex js-e-productlist-sort"> 460 <script id="js-e-handlebars-tmpl-productlist-sort" type="text/x-handlebars-template"> 461 <fieldset class="form-inline"> 462 <label for="Sort" class="mr-1 d-none"> 463 @Translate( "eCom Productlist - Sorting - Label", "Sort: " ) 464 </label> 465 <select name="Sort" class="js-e-productlist-sort-select custom-select" style="padding-bottom:0.25em;"> 466 <option value="SortName ASC" {{#compare sort.sort '===' 'SortName ASC'}}selected{{/compare}}>@Translate( "eCom Productlist - Sorting - Name ASC - Label", "Name ASC" )</option> 467 <option value="Created ASC" {{#compare sort.sort '===' 'Created ASC'}}selected{{/compare}}>@Translate( "eCom Productlist - Sorting - Created ASC - Label", "Created ASC" )</option> 468 <option value="SortPrice ASC" {{#compare sort.sort '===' 'SortPrice ASC'}}selected{{/compare}}>@Translate( "eCom Productlist - Sorting - Price ASC - Label", "Price ASC" )</option> 469 <option value="SortPrice DESC" {{#compare sort.sort '===' 'SortPrice DESC'}}selected{{/compare}}>@Translate( "eCom Productlist - Sorting - Price DESC - Label", "Price DESC" )</option> 470 </select> 471 </fieldset> 472 </script> 473 </div> 474475476 } 477 @if ( Espresso.Item.FiltersShow == "True" ) 478 { 479 <button class="btn btn-primary js-e-productlist-filters-modal-toggle" data-target="#js-e-productlist-filters-modal" data-toggle="modal" type="button"> 480 <i class="material-icons material-icons-large">tune</i> 481 @Translate( "eCom Productlist Filters - Customize Selection - Button", "Filters" ) 482 <span class="ml-2 badge badge-primary js-e-productlist-filters-applied-count"></span> 483 </button> 484 } 485 </div> 486 <div class="py-1 flex-grow-1"> 487 @if ( Espresso.Item.PagingShow == "True" ) 488 { 489 <div class="align-items-center d-flex e-productlist-paging js-e-productlist-paging justify-content-between ml-auto"> 490 <script id="js-e-handlebars-tmpl-productlist-paging" type="text/x-handlebars-template"> 491 {{#if page.productCount}} 492 <span class="text-nowrap {{#compare page.totalPages '>' 1 }}mr-4{{/compare}}"> 493 <strong>{{page.viewing.from}} - {{page.viewing.to}}</strong> @Translate( "eCom Productlist Paging - Product Count Of - Text", "of" ) 494 <span> {{page.productCount}}</span> 495 </span> 496497498 <span class=""> 499 {{#compare page.prevPage '!==' 0 }} 500 <a href="{{page.pagingUrl}}={{page.prevPage}}" class="text-auto text-uppercase text-nowrap text-decoration-none p-0 pl-1 mr-1 js-e-productlist-set-pagenum" data-page-num="{{page.prevPage}}"> 501 <i class="material-icons">arrow_back</i> 502 <span class="">@Translate( "eCom Productlist Paging - Previous - Text", "Previous" )</span> 503 </a> 504 {{/compare}} 505506 {{#compare page.nextPage '!==' 0 }} 507 <a href="{{page.pagingUrl}}={{page.nextPage}}" class="text-auto text-uppercase text-nowrap text-decoration-none p-0 pr-1 ml-1 js-e-productlist-set-pagenum" data-page-num="{{page.nextPage}}"> 508 <span class="">@Translate( "eCom Productlist Paging - Next - Text", "Next" )</span> 509 <i class="material-icons">arrow_forward</i></a> 510 {{/compare}} 511512 {{#compare page.pageSize '!==' 999}} 513 {{#compare page.totalPages '>' 1 }} 514 <a href="{{page.pagingUrl}}=9999" class="text-auto text-uppercase text-nowrap text-decoration-none p-0 pl-1 js-e-productlist-set-pagesize" data-page-size="999"> 515 @Translate( "eCom Productlist Paging - Show All - Text", "Show all" ) 516 </a> 517 {{/compare}} 518 {{/compare}} 519520 {{#compare page.pageSize '===' 999}} 521 <a href="#" class="text-auto text-uppercase text-nowrap text-decoration-none p-0 pl-1 js-e-productlist-set-pagesize d-none" data-page-size="@Espresso.Item.Pagesize"> 522 @Translate( "eCom Productlist Paging - Reset - Link", "Reset" ) 523 </a> 524 {{/compare}} 525526 <span> 527 {{/if}} 528 </script> 529 </div> 530531532 } 533 </div> 534 </div> 535 </div> 536 } 537538 </div> 539 </div> 540541 </div> 542 </div> 543 <div class="row"> 544 <div class="col-12"> 545 <div class="e-productlist-body"> 546 <div class="row"> 547 <div class="@productlistMainClassList"> 548 <div id="js-e-productlist-products"> 549 <ul itemscope itemtype="http://schema.org/ItemList"> 550 @foreach ( LoopItem product in GetLoop( "Products" ) ) 551 { 552 <li itemprop="itemListElement" itemscope itemtype="http://schema.org/Product"> 553 <a href="@ProductService.Instance.GetProductLink( product.GetString( "Ecom:Product.PrimaryOrFirstGroupID" ), product.GetString( "Ecom:Product.ID" ) )" title="@ProductService.Instance.GetName( product.GetString( "Ecom:Product.ID" ), product.GetString( "Ecom:Product.VariantID" ) )" itemprop="url"> 554 <h3 itemprop="name">@ProductService.Instance.GetName( product.GetString( "Ecom:Product.ID" ), product.GetString( "Ecom:Product.VariantID" ) )</h3> 555 <p itemprop="description">@product.GetString( "Ecom:Product.ShortDescription" )</p> 556 </a> 557 </li> 558 } 559 </ul> 560 @if ( GetLoop( "Ecom:ProductList.Pages" ).Count > 0 ) 561 { 562 <ol> 563 @foreach ( LoopItem page in GetLoop( "Ecom:ProductList.Pages" ) ) 564 { 565 <li> 566 <a href="@page.GetString( "Ecom:ProductList.Pages.Page.Url" )">@page.GetString( "Ecom:ProductList.Pages.Page.Number" )</a> 567 </li> 568 } 569 </ol> 570 } 571572 <script id="js-e-handlebars-tmpl-productlist-products" type="text/x-handlebars-template"> 573 <div class="e-products"> 574 <div class="e-loading-overlay e-products-loading-overlay js-e-products-loading-overlay is-loading"> 575 <div class="e-loading-spinner"></div> 576 </div> 577 {{#if page.productCount}} 578 <div class="row"> 579 {{#each products}} 580 {{#if pimActive}} 581 @using Dynamicweb.Frontend 582 <div class="@productlistItemClassList"> 583 <div class="card border-1 mb-6"> 584 <a href="{{#unless @@root.disableProductDetails}}{{url}}{{else}}javascript:void(0){{/unless}}" {{#if @@root.disableProductDetails}}style="cursor:default;"{{/if}}> 585 @if( Espresso.Item.ModelProductlist == "True" ){ 586 <img src="{{productlistDetailImage}}" alt="{{name}} {{productType}}" class="col-12 p-0"> 587 } 588 else 589 { 590 <img src="{{imageDefault}}" alt="{{name}} {{productType}}" class="col-12 p-0"> 591 } 592 {{#if news}} 593 <div class="isabella-product-item-news"> 594 @Translate("Ecom Product - News Badge - Text","Nyhed") 595 </div> 596 {{/if}} 597 </a> 598 <div class="card-body p-1 p-lg-3"> 599 <h4 class="e-products-item-name mb-0"> 600 <a href="{{#unless @@root.disableProductDetails}}{{url}}{{else}}javascript:void(0){{/unless}}" {{#if @@root.disableProductDetails}}style="cursor:default;"{{/if}}> 601 {{{name}}} 602 </a> 603 </h4> 604 {{#if shortDescription}} 605 {{{shortDescription}}} 606 {{/if}} 607 @* @if (PageView.Current().Area.Name.Contains("webshop") != false) 608 { 609 <p class="e-products-item-text mt-2 mb-0 @Co3.Isabella.Dw.Services.ProductService.Instance.GetNoBuyB2CandB2B()" style="display: flex"> 610 <small class="e-products-item-price small"> 611 <a href="{{url}}" class="text-dark" style="text-decoration: none"> 612 {{{price}}} 613 </a> 614 </small> 615 <a href="{{url}}" style="left: 0" class="isabella-arrow arrow-primary-small ml-auto"></a> 616 </p> 617 } 618 *@ 619 </div> 620 </div> 621 </div> 622623 {{/if}} 624 {{/each}} 625 </div> 626 {{else}} 627 <div class="alert alert-warning mt-2" role="alert"> 628 <strong><i class="material-icons material-icons-2x">sentiment_dissatisfied</i>&nbsp;@Translate( "eCom Productlist - Sorry - Text", "Sorry..")</strong> 629 <br> @Translate( "eCom Productlist - No Products - Text", "No products match your choices.") 630 </div> 631 {{/if}} 632 </div> 633 </script> 634635 </div> 636 @if ( Espresso.Item.FooterShow == "True" ) 637 { 638 <div class="align-items-end d-flex justify-content-between pt-1 small"> 639 <div class="align-items-center d-flex e-products-price-info"> 640 @if ( PriceService.Instance.ShowPriceWithVat ) 641 { 642 <span>@Translate( "eCom Productlist - Prices are incl. VAT - Text", "All prices are incl. VAT" )</span> 643 } 644 else 645 { 646 <span>@Translate( "eCom Productlist - Prices are excl. VAT - Text", "All prices are excl. VAT" )</span> 647 } 648 </div> 649 @if ( Espresso.Item.PagingShow == "True" ) 650 { 651 <div class="align-items-center d-flex e-productlist-paging js-e-productlist-paging justify-content-between ml-auto"> 652 <script id="js-e-handlebars-tmpl-productlist-paging" type="text/x-handlebars-template"> 653 {{#if page.productCount}} 654 <span class="text-nowrap {{#compare page.totalPages '>' 1 }}mr-4{{/compare}}"> 655 <strong>{{page.viewing.from}} - {{page.viewing.to}}</strong> @Translate( "eCom Productlist Paging - Product Count Of - Text", "of" ) 656 <span> {{page.productCount}}</span> 657 </span> 658659660 <span class=""> 661 {{#compare page.prevPage '!==' 0 }} 662 <a href="{{page.pagingUrl}}={{page.prevPage}}" class="text-auto text-uppercase text-nowrap text-decoration-none p-0 pl-1 mr-1 js-e-productlist-set-pagenum" data-page-num="{{page.prevPage}}"> 663 <i class="material-icons">arrow_back</i> 664 <span class="">@Translate( "eCom Productlist Paging - Previous - Text", "Previous" )</span> 665 </a> 666 {{/compare}} 667668 {{#compare page.nextPage '!==' 0 }} 669 <a href="{{page.pagingUrl}}={{page.nextPage}}" class="text-auto text-uppercase text-nowrap text-decoration-none p-0 pr-1 ml-1 js-e-productlist-set-pagenum" data-page-num="{{page.nextPage}}"> 670 <span class="">@Translate( "eCom Productlist Paging - Next - Text", "Next" )</span> 671 <i class="material-icons">arrow_forward</i></a> 672 {{/compare}} 673674 {{#compare page.pageSize '!==' 999}} 675 {{#compare page.totalPages '>' 1 }} 676 <a href="{{page.pagingUrl}}=9999" class="text-auto text-uppercase text-nowrap text-decoration-none p-0 pl-1 js-e-productlist-set-pagesize" data-page-size="999"> 677 @Translate( "eCom Productlist Paging - Show All - Text", "Show all" ) 678 </a> 679 {{/compare}} 680 {{/compare}} 681682 {{#compare page.pageSize '===' 999}} 683 <a href="#" class="text-auto text-uppercase text-nowrap text-decoration-none p-0 pl-1 js-e-productlist-set-pagesize d-none" data-page-size="@Espresso.Item.Pagesize"> 684 @Translate( "eCom Productlist Paging - Reset - Link", "Reset" ) 685 </a> 686 {{/compare}} 687688 <span> 689 {{/if}} 690 </script> 691 </div> 692693 } 694 </div> 695 } 696697698 </div> 699 <div class="@productlistAsideClassList"> 700 <form class="js-e-productlist-form" data-action="@Espresso.Item.Url"> 701 @using Co3.Espresso.Website.Services 702 @using Dynamicweb.Frontend 703 @using Dynamicweb.Indexing.Querying 704 @using Dynamicweb.Modules 705 @using Dynamicweb.Rendering 706 @using SortInfo = Dynamicweb.Indexing.Querying.Sorting.SortInfo 707 @{ 708 string pageUrl = GetGlobalValue( "Global:Pageview.Url" ); 709 string sortBy = string.IsNullOrEmpty( HttpContext.Current.Request["SortBy"] ) ? GetString( "Ecom:ProductList.SortBy" ) : HttpContext.Current.Request["SortBy"]; 710 if ( sortBy == "Name" || sortBy == "Price" ) 711 { 712 sortBy = "Sort" + sortBy; 713 } 714 else if ( sortBy == "UserDefined" ) 715 { 716 sortBy = "PrimaryGroupSort"; 717 } 718 else if ( sortBy == "UnitStock" ) 719 { 720 sortBy = "Stock"; 721 } 722 string sortOrder = string.IsNullOrEmpty( HttpContext.Current.Request["SortOrder"] ) ? GetString( "Ecom:ProductList.SortOrder" ) : HttpContext.Current.Request["SortOrder"]; 723 string pageSize = string.IsNullOrEmpty( HttpContext.Current.Request["PageSize"] ) ? GetString( "Ecom:ProductList.PageSize" ) : HttpContext.Current.Request["PageSize"]; 724 string pageNum = string.IsNullOrEmpty( HttpContext.Current.Request["PageNum"] ) ? GetString( "Ecom:ProductList.CurrentPage" ) : HttpContext.Current.Request["PageNum"]; 725726727 bool useModuleSortSettingsFromProductCatalog = false; 728729 Properties moduleProperties = PageView.Current()?.CurrentParagraph?.ModuleProperties; 730731 string moduleSortSettingsFromQuery = moduleProperties?.GetValue( "QuerySortByParams" ); 732733734 if ( moduleSortSettingsFromQuery == "[]" || moduleSortSettingsFromQuery == "null" ) 735 { 736 moduleSortSettingsFromQuery = string.Empty; 737 } 738739 string moduleSortSettingsFromProductCatalogSortBy = moduleProperties?.GetValue( "SortBy" ); 740 if ( string.IsNullOrEmpty( moduleSortSettingsFromProductCatalogSortBy ) == true ) 741 { 742 moduleSortSettingsFromProductCatalogSortBy = sortBy; 743 } 744745 string moduleSortSettingsFromProductCatalogSortOrder = moduleProperties?.GetValue( "SortOrder" ); 746 if ( string.IsNullOrEmpty( moduleSortSettingsFromProductCatalogSortOrder ) == true ) 747 { 748 moduleSortSettingsFromProductCatalogSortOrder = sortOrder; 749 } 750 if (string.IsNullOrEmpty(moduleSortSettingsFromQuery) == false) 751 { 752 List< SortInfo > moduleSortSettingsFromProductCatalog = new List< SortInfo >() 753 { 754 new SortInfo() 755 { 756 Field = moduleSortSettingsFromProductCatalogSortBy, 757 SortDirection = (Dynamicweb.Indexing.Querying.Sorting.SortDirection) (moduleSortSettingsFromProductCatalogSortOrder.ToLowerInvariant() == "asc" ? SortDirection.Ascending : SortDirection.Descending) 758 } 759 }; 760761 IEnumerable< SortInfo > sortInfo = QueryHelper.TransformIndexQuerySortParams( moduleSortSettingsFromQuery, 762 moduleSortSettingsFromProductCatalog, ref useModuleSortSettingsFromProductCatalog ); 763764765 sortBy = string.Join( ",", sortInfo.Select( s => s.Field ) ); 766 sortOrder = string.Join(",", sortInfo.Select(s => s.SortDirection)); 767768 sortOrder = sortOrder.Replace("Descending", "DESC").Replace("Ascending", "ASC"); 769 } 770771772 } 773774 <input type="hidden" name="ID" value="@Espresso.Page.ID"> 775 <input type="hidden" name="currentPageID" value="@Espresso.Page.ID"> 776 <input type="hidden" name="PageNum" value="@HttpUtility.HtmlAttributeEncode( pageNum )"> 777 <input type="hidden" name="PageUrl" value="@HttpUtility.HtmlAttributeEncode( pageUrl )"> 778 @if (string.IsNullOrEmpty(moduleSortSettingsFromQuery)) 779 { 780 <input type="hidden" name="SortBy" value="@HttpUtility.HtmlAttributeEncode( sortBy )"> 781 <input type="hidden" name="SortOrder" value="@HttpUtility.HtmlAttributeEncode( sortOrder )"> 782 } 783 else 784 { 785 <input type="hidden" name="SortBy" value="@HttpUtility.HtmlAttributeEncode( string.Join("|", sortBy) )"> 786 <input type="hidden" name="SortOrder" value="@HttpUtility.HtmlAttributeEncode( string.Join("|", sortOrder) )"> 787 <input type="hidden" name="Sort" value="@HttpUtility.HtmlAttributeEncode( sortBy +"|"+sortOrder )"> 788 } 789790 <input type="hidden" name="PageSize" value="@HttpUtility.HtmlAttributeEncode( pageSize )"> 791792 @if ( Espresso.Item.FiltersShow == "True" ) 793 { 794 foreach ( LoopItem facetGroup in GetLoop( "FacetGroups" ) ) 795 { 796 <input type="hidden" name="fg" value="@facetGroup.GetString( "FacetGroup.Name" )"> 797 } 798 <input type="hidden" class="js-e-visible-options-count" value="@Espresso.Item.FiltersVisibleOptionCount"> 799 } 800 @foreach ( LoopItem query in GetLoop( "Query.Parameters" ) ) 801 { 802 if ( string.IsNullOrEmpty( query.GetString( "Parameter.Value" ) ) == false ) 803 { 804 if ( query.GetBoolean( "Parameter.IsHandledAsFacet" ) == false && query.GetString( "Parameter.Name" ) != "q" ) 805 { 806 <input type="hidden" name="@query.GetString( "Parameter.Name" )" value="@HttpUtility.HtmlAttributeEncode( query.GetString( "Parameter.Value" ) )"> 807 } 808 } 809 } 810 <div id="js-e-productlist-filters" class="d-lg-block d-none"> 811 <script id="js-e-handlebars-tmpl-productlist-filters" type="text/x-handlebars-template"> 812 {{#if page.filtersAppliedCount}} 813 <div class="e-productlist-filters-group e-productlist-filters-group-summery"> 814 <p class="e-productlist-filters-group-header small mb-0"> 815 <span class="e-productlist-filters-group-name font-weight-bold text-dark m-0 pl-0">@Translate( "eCom Productlist Filters - Selected - Text", "Selected filters" )</span> 816 <button type="button" class="btn btn-sm btn-link py-1 px-0 js-e-productlist-filters-clear-all">@Translate( "eCom Productlist Filter - Group Reset - Button", "Reset" )</button> 817 </p> 818 <div class="e-productlist-filters-group-options-selected small mb-2"> 819 {{#each facets}} 820 {{#if selectedOptions.length}} 821 {{#each selectedOptions}} 822 <a class="e-productlist-filters-option-selected js-e-productlist-filters-remove d-flex align-items-center text-decoration-none mb-1" href="#" data-value="{{value}}"> 823 <i class="material-icons material-icons-fixed text-danger mr-1">add_circle</i> 824 <span>{{../label}}: {{label}}</span> 825 </a> 826 {{/each}} 827 {{/if}} 828 {{/each}} 829 {{#if page.q}} 830 <a class="e-productlist-filters-option-selected d-flex align-items-center text-decoration-none mb-1 js-e-productlist-filters-search-clear" href="#"> 831 <i class="material-icons material-icons-fixed text-danger mr-1">add_circle</i> 832 <span>@Translate( "eCom Productlist Filters - Search - Text", "Search" ): {{page.q}}</span> 833 </a> 834 {{/if}} 835 {{#compare page.minPrice.clean '&&' page.maxPrice.clean}} 836 <a class="e-productlist-filters-option-selected d-flex align-items-center text-decoration-none mb-1 js-e-productlist-filters-range-clear" href="#" data-group-id="js-e-productlist-filters-range-group-price"> 837 <i class="material-icons material-icons-fixed text-danger mr-1">add_circle</i> 838 <span>@Translate( "eCom Productlist Filters - Price - Heading", "Price" ): {{{page.minPrice.formatted}}} - {{{page.maxPrice.formatted}}}</span> 839 </a> 840 {{/compare}} 841 </div> 842 </div> 843 {{/if}} 844845 {{#compare "@Espresso.Item.FiltersShow" "===" "True"}} 846847 @if ( Espresso.Item.NavigationShow == "True" ) 848 { 849 <div class="e-productlist-filters-group js-e-productlist-filters-group"> 850 <p class="e-productlist-filters-group-header small mb-0"> 851 <a class="e-productlist-filters-group-collapse-toggle text-black" data-toggle="collapse" data-target="#e-productlist-filters-group-navigation"> 852 <span class="e-productlist-filters-group-name font-weight-bold text-dark m-0"> 853 @Espresso.Item.NavigationHeading 854 </span> 855 </a> 856 </p> 857 <fieldset id="e-productlist-filters-group-navigation" class="e-productlist-filters-group-options mb-2 small collapse show"> 858 <div class="e-nav-local e-nav-local-vertical"> 859 <nav class="e-nav-local-container"> 860 <ul class="nav flex-column"> 861 @RenderNavigation( new 862 { 863 id = "dwnav-local-" + Espresso.Id, 864 parentid = string.IsNullOrEmpty( Espresso.Item.NavigationParentPage ) == false ? Espresso.Item.NavigationParentPage : Espresso.Page.ID, 865 template = "local-vertical.xslt", 866 startlevel = Espresso.Item.NavigationLevelStart, 867 endlevel = Espresso.Item.NavigationLevelEnd, 868 expandmode = "path" 869 } ) 870 </ul> 871 </nav> 872 </div> 873 </fieldset> 874 </div> 875 } 876 @if ( Espresso.Item.SearchShow == "True" ) 877 { 878 <div class="e-productlist-filters-group js-e-productlist-filters-group"> 879 <p class="e-productlist-filters-group-header small mb-0"> 880 <a class="e-productlist-filters-group-collapse-toggle {{#unless page.q}}collapsed{{/unless}}" data-toggle="collapse" data-target="#e-productlist-filters-group-search"> 881 <span class="e-productlist-filters-group-name font-weight-bold text-dark m-0">@Translate( "eCom Productlist Filters - Search - Heading", "Search" )</span> 882 </a> 883 {{#if page.q}} 884 <button type="button" class="btn btn-sm btn-link py-1 px-0 js-e-productlist-filters-search-clear"> 885 @Translate( "eCom Productlist Filter - Group Reset - Button", "Reset" ) 886 </button> 887 {{/if}} 888 </p> 889 <fieldset id="e-productlist-filters-group-search" class="e-productlist-filters-group-options mb-2 small collapse {{#if page.q}}show{{/if}}"> 890 <div class="js-e-search-input-group e-search-input-group {{#unless page.q}}is-empty{{/unless}}"> 891 <label class="e-search-label" for="filter_search"><i class="material-icons">search</i></label> 892 <input type="text" class="js-e-search-input e-search-input e-productlist-filters-search-input form-control-plaintext" name="q" id="filter_search" value="{{page.q}}"> 893 <span class="js-e-search-clear e-search-clear"><i class="material-icons">close</i></span> 894 <button class="d-none e-search-submit btn btn-primary js-e-productlist-filters-search-submit" type="button"><i class="material-icons pa-0">search</i></button> 895 </div> 896 </fieldset> 897 </div> 898 } 899900 {{#each facets}} 901 {{#compare count '>' 0}} 902 <div class="e-productlist-filters-group js-e-productlist-filters-group"> 903 <p class="e-productlist-filters-group-header small mb-0"> 904 <a class="e-productlist-filters-group-collapse-toggle " data-toggle="collapse" data-target="#e-productlist-filters-group-{{param}}"> 905 <span class="e-productlist-filters-group-name font-weight-bold text-dark m-0">{{label}} 906 {{#compare param '===' 'A-measure'}} 907 <img data-container="body" data-toggle="popover" data-placement="right" data-html="true" data-content="@Translate( "eCom Productlist Filter - A-Measure - Help Text", "A-målet er længden fra jorden, gennem skinnen på campingvognen til jorden (ca. 30 cm ud til siden). Det måles let med en snor." )<br/><a href='@aMeasureLink' class='text-black text-underline'>@Translate( "eCom Productlist Filter - A-Measure - Link Text", "Se mere" )</a>" class="ml-1 mr-1 text-muted" style="width:20px" src="/Files/Images/icons/01-Interface Essential/14-Alerts/information-circle.svg"> </span> 908 {{/compare}} 909 </span> 910 </a> 911 {{#if selectedOptions.length}} 912 <label for="reset-filter-{{param}}" class="btn btn-sm btn-link py-1 px-0 m-0"> 913 @Translate( "eCom Productlist Filter - Group Reset - Label", "Reset" ) 914 </label> 915 {{/if}} 916 </p> 917 <fieldset id="e-productlist-filters-group-{{param}}" class="e-productlist-filters-group-options js-e-productlist-filters-group-options mb-2 small collapse is-expanded"> 918 <div class="{{#compare count '>' @Espresso.Item.FiltersVisibleOptionCount }}js-e-productlist-filters-options-collapse-peek e-productlist-filters-options-collapse-peek is-peeking{{/compare}}"> 919 <div class="e-productlist-filters-option js-e-productlist-filters-option"> 920 <label for="reset-filter-{{param}}" class="custom-control custom-checkbox"> 921 <input class="js-e-productlist-filters-option-reset-group custom-control-input" name="reset-filter-{{param}}" id="reset-filter-{{param}}" type="checkbox" value="true" {{#compare isCleared '||' isEmpty}}checked{{/compare}}> 922 <span class="custom-control-indicator"></span> 923 <span class="custom-control-description">@Translate( "eCom Productlist Filter - Options View All - Label", "All" )</span> 924 </label> 925 </div> 926 {{#each options}} 927 <div class="e-productlist-filters-option js-e-productlist-filters-option {{#if isSelected}}is-selected{{/if}} {{#if isDisabled}}is-disabled text-muted{{/if}}"> 928 <label for="{{id}}" class="custom-control custom-checkbox"> 929 <input id="{{id}}" name="{{param}}" class="js-e-productlist-filter custom-control-input" type="checkbox" value="{{value}}" {{#if isSelected}}checked{{/if}} {{#if isDisabled}}disabled{{/if}}> 930 <span class="custom-control-indicator"></span> 931 <span class="custom-control-description">{{#compare param '===' 'A-measure'}}A{{/compare}} {{label}} <span class="e-productlist-filters-option-count small text-muted">({{count}})</span></span> 932 </label> 933 </div> 934 {{/each}} 935 {{#compare count '>' @Espresso.Item.FiltersVisibleOptionCount }} 936 <a href="#" class="js-e-productlist-filters-options-collapse-peek-toggle e-productlist-filters-options-collapse-peek-toggle" data-closed-text="@Translate( "eCom Productlist Filter - Options Show More - Link", "Show more" )" data-open-text="@Translate( "eCom Productlist Filter - Options Show Less - Link", "Show less" )"><i class="material-icons material-icons-fixed">keyboard_arrow_down</i></a> 937 {{/compare}} 938 </div> 939 </fieldset> 940 </div> 941 {{/compare}} 942 {{/each}} 943 @if ( Espresso.Item.PriceRangeShow == "True" ) 944 { 945 <div class="e-productlist-filters-group js-e-productlist-filters-group"> 946 <p class="e-productlist-filters-group-header small mb-0"> 947 <a class="e-productlist-filters-group-collapse-toggle {{#compare page.minPrice.clean '!!' page.maxPrice.clean}}collapsed{{/compare}}" data-toggle="collapse" data-target="#e-productlist-filters-group-pricerange"> 948 <span class="e-productlist-filters-group-name font-weight-bold text-dark m-0">@Translate( "eCom Productlist Filters - Price Range - Heading", "Price" )</span> 949 </a> 950 {{#compare page.minPrice.clean '||' page.maxPrice.clean}} 951 <button type="button" class="btn btn-sm btn-link py-1 px-0 js-e-productlist-filters-range-clear"> 952 @Translate( "eCom Productlist Filter - Group Reset - Button", "Reset" ) 953 </button> 954 {{/compare}} 955 </p> 956 <fieldset id="e-productlist-filters-group-pricerange" class="e-productlist-filters-group-options mb-2 small collapse {{#compare page.minPrice.clean '||' page.maxPrice.clean}}show{{/compare}}"> 957 <div id="js-e-productlist-filters-range-group-price" class="row align-items-center mt-1 e-productlist-filters-range-group js-e-productlist-filters-range-group"> 958 <div class="col-12 col-lg-4 mb-1 mb-lg-0"> 959 <input type="text" class="form-control js-e-productlist-filters-range js-e-productlist-filters-range-min" name="PriceRangeMin" id="PriceRangeMin" value="{{page.minPrice.clean}}" placeholder="@Translate( "eCom Productlist Filters - Price Min - Text", "From" )" min="0"> 960 </div> 961 <div class="col-12 col-lg-4 mb-1 mb-lg-0"> 962 <input type="text" class="form-control js-e-productlist-filters-range js-e-productlist-filters-range-max" name="PriceRangeMax" id="PriceRangeMax" value="{{page.maxPrice.clean}}" placeholder="@Translate( "eCom Productlist Filters - Price Max - Text", "To" )" data-msg-rangeValid="@Translate( "eCom Productlist Filters - Price Error - Msg", "Prices entered incorrectly" )"> 963 </div> 964 <div class="col-12 col-lg-3"> 965 <button type="button" class="btn btn-primary px-0 btn-sm btn-block e-productlist-filters-apply-range js-e-productlist-filters-apply-range"><i class="material-icons">sync</i></button> 966 </div> 967 </div> 968 </fieldset> 969 </div> 970 } 971 {{/compare}} 972 </div> 973 </script> 974 </div> 975976 <div class="e-productlist-filters-modal fade modal modal-fullscreen" data-backdrop="false" id="js-e-productlist-filters-modal"> 977 <div class="modal-dialog"> 978 <div class="modal-content"> 979 <div class="modal-header"> 980 <h3 class="modal-title"> 981 <i class="material-icons material-icons-large">tune</i> 982 @Translate( "eCom Productlist Filters - Customize Selection - Heading", "Filter products" ) 983 </h3> 984 <button class="close" data-dismiss="modal" type="button"> 985 <i class="material-icons">close</i> 986 </button> 987 </div> 988 <div class="modal-body pt-0"> 989 <div id="js-e-productlist-filters-modal-body" class="d-flex flex-column"> 990991 </div> 992 </div> 993 <div class="modal-footer bg-light border-top-0"> 994 <button class="btn btn-primary btn-block" data-dismiss="modal" type="button">@Translate( "eCom Productlist Filters - Customize Selection Apply - Button", "Show results" )</button> 995 </div> 996 </div> 997 </div> 998 </div> 999 </form> 1000 </div> 1001 </div> 1002 </div> 1003 </div> 1004 </div> 1005 </div> 1006 <script> 1007 dataLayer.push({ ecommerce: null }); 1008 dataLayer.push({ 1009 event: 'view_item_list', 1010 ecommerce: { 1011 currency: "@Dynamicweb.Frontend.PageView.Current().Area.EcomCurrencyId", 1012 items: [ 1013 @foreach ( LoopItem product in GetLoop( "Products" ) ) 1014 { 1015 if ( product.GetInteger( "Products.LoopCounter" ) > 1 ) 1016 { 1017 @Raw( "," ) 1018 } 1019 <text> 1020 { 1021 item_name: "@product.GetString( "Ecom:Product.Name" )", 1022 item_id: "@product.GetString( "Ecom:Product.Number" )", 1023 price: @eProductService.Instance.GetPrice( product.GetString("Ecom:Product.ID"), product.GetString("Ecom:Product.VariantID") ).Price.ToJavaScript().Replace( ",", "" ) 1024 } 1025 </text> 1026 } 1027 ] 1028 } 1029 }); 1030 </script>
keyboard_arrow_up