Din indkøbskurv er tom.

Men det behøver den ikke at være.

vores 2017 bestsellers

Error compiling template "Designs/dechra-dvp/eCom/Productlist/espresso.cshtml"
Line 61: The name 'SearchEngineFriendlyURLs' does not exist in the current context

1 @inherits Co3.Espresso.Website.TemplateBases.Paragraphs.Module 2 @using Dynamicweb.Content.Items.Metadata 3 @using Dynamicweb.Content.Items 4 @using System.Globalization; 5 @using System.Text.RegularExpressions; 6 @using Dynamicweb.Ecommerce.Common; 7 @using Co3.Espresso.Website.Services; 8 9 @functions { 10 CultureInfo AreaCultureInfo = Dynamicweb.Frontend.PageView.Current().Area.CultureInfo; 11 12 public string getProductLink( string groupID, string productID, string variantID = "" ) { 13 string result = string.Empty; 14 string displayPage = ProductService.Instance.GetGroupDisplayPage( groupID ); 15 if( string.IsNullOrEmpty( displayPage ) == false ) { 16 if( string.IsNullOrEmpty( variantID ) == false ) { 17 result = "{0}&ProductID={1}&variantID={2}"; 18 result = string.Format( result, displayPage, productID, variantID ); 19 } 20 else { 21 result = "{0}&ProductID={1}"; 22 result = string.Format( result, displayPage, productID ); 23 } 24 } 25 return result; 26 } 27 28 public bool isProductGroupPublishedOnWebsite( string groupID ) { 29 bool result = false; 30 string displayPage = ProductService.Instance.GetGroupDisplayPage( groupID ); 31 if( string.IsNullOrEmpty( displayPage ) == false ) { 32 result = true; 33 } 34 return result; 35 } 36 37 public string getNewsLink( string categoryName, string newsID ) { 38 string result = ""; 39 string displayPage = NewsService.Instance.GetNewsDisplayPage( categoryName, newsID ); 40 if( string.IsNullOrEmpty( displayPage ) == false ) { 41 string displayPageURL = displayPage.Substring(0, displayPage.LastIndexOf("#")); 42 string newsUrl = displayPage.Substring(displayPage.IndexOf('#') + 1); 43 44 result = SearchEngineFriendlyURLs.GetFriendlyUrl( displayPageURL ) + "?PID=" + newsUrl + "&M=NewsV2&Action=1&NewsID=" + newsID; 45 } 46 return result; 47 } 48 49 public string getImageURL( string url, int width = 2560, int height = 0, int crop = 0, int quality = 75, string format = "jpg" ) { 50 string result = "/files/Images/placeholder-image.png"; 51 if( string.IsNullOrEmpty( url ) == false ) { 52 result = "/admin/public/getimage.ashx?Image={0}&Width={1}&Height={2}&Format={3}&Quality={4}&Crop={5}&AlternativeImage=/files/Images/placeholder-image.png"; 53 result = string.Format( result, url, width, height, format, quality, crop ); 54 } 55 return result; 56 } 57 58 public string getPriceFormatted( string price ) { 59 string result = string.Empty; 60 if( string.IsNullOrEmpty( price ) == true ) { 61 price = Context.Currency.Format(0.00, false); 62 } 63 if ( Context.Currency.SymbolPlace == 0 ) { 64 result = string.Format( "<span class=\"e-product-price-symbol\">{1}</span>&nbsp;{0}", price, Context.Currency.Symbol ); 65 } 66 else{ 67 result = string.Format( "{0}&nbsp;<span class=\"e-product-price-symbol\">{1}</span>", price, Context.Currency.Code ); 68 } 69 return result; 70 } 71 72 public string getShortDate( DateTime date ) { 73 string result = string.Empty; 74 result = date.Date.ToString( AreaCultureInfo.DateTimeFormat.ShortDatePattern ).Replace( "-" , "." ); 75 return result; 76 } 77 78 public string getLongDate( DateTime date ) { 79 string result = string.Empty; 80 result = date.Date.ToString( AreaCultureInfo.DateTimeFormat.LongDatePattern ); 81 return result; 82 } 83 } 84 @{ 85 string pageUrl = GetGlobalValue("Global:Pageview.Url"); 86 string sortBy = string.IsNullOrEmpty(System.Web.HttpContext.Current.Request["SortBy"]) ? Espresso.Item.ModuleOverride_SortBy : System.Web.HttpContext.Current.Request["SortBy"]; 87 string sortOrder = string.IsNullOrEmpty(System.Web.HttpContext.Current.Request["SortOrder"]) ? Espresso.Item.ModuleOverride_SortOrder : System.Web.HttpContext.Current.Request["SortOrder"]; 88 string pageSize = string.IsNullOrEmpty(System.Web.HttpContext.Current.Request["PageSize"]) ? Espresso.Item.ModuleOverride_PageSize : System.Web.HttpContext.Current.Request["PageSize"]; 89 string pageNum = string.IsNullOrEmpty(System.Web.HttpContext.Current.Request["PageNum"]) ? GetString("Ecom:ProductList.CurrentPage") : System.Web.HttpContext.Current.Request["PageNum"]; 90 string productListClassList = "col-12"; 91 if( Espresso.Item.FiltersShow == "True" ) { 92 productListClassList = "col-12 col-lg-8 col-xl-9"; 93 } 94 95 var paragraph = Dynamicweb.Frontend.PageView.Current().CurrentParagraph; 96 Item item = Dynamicweb.Content.Items.ItemManager.Storage.GetById(paragraph.ItemType, paragraph.ItemId); 97 string includeResponsiveWidthId = item["ItemWidth"].ToString(); 98 Item includeResponsiveWidth = Dynamicweb.Content.Items.ItemManager.Storage.GetById("ParagraphInclude_WidthResponsive", includeResponsiveWidthId); 99 100 dynamic width = new { 101 xs = includeResponsiveWidth["xs"] ?? "6", 102 sm = includeResponsiveWidth["sm"] ?? "6", 103 md = includeResponsiveWidth["md"] ?? "4", 104 lg = includeResponsiveWidth["lg"] ?? "4", 105 xl = includeResponsiveWidth["xl"] ?? "3" 106 }; 107 } 108 <div class="js-e-productlist js-e-loading-overlay-override"> 109 @if( Espresso.Item.SortShow == "True" || Espresso.Item.PagingShow == "True" || Espresso.Item.HeadingShow == "True" ){ 110 <div class="js-e-productslist-header small"> 111 <div class="row align-items-end"> 112 @if( ( Espresso.Item.SortShow == "True" || Espresso.Item.PagingShow == "True" ) && Espresso.Item.HeadingShow == "True" ){ 113 <div class="col-md-12"> 114 <h1 class="">@Espresso.Item.Name</h1> 115 </div> 116 } 117 @if( Espresso.Item.FiltersShow == "True" ){ 118 <div class="d-none d-lg-block col-lg-4 col-xl-3"> 119 <div class="e-productslist-header"> 120 <p class="h2 small m-0"> 121 <i class="material-icons material-icons-large text-primary d-none">playlist_add_check</i> <small>@Translate( "eCom Productlist Filters - Customize Selection - Heading", "Customize selection" )</small> 122 </p> 123 </div> 124 </div> 125 } 126 @if( Espresso.Item.SortShow == "True" || Espresso.Item.PagingShow == "True" || Espresso.Item.HeadingShow == "True" ){ 127 <div class="@productListClassList"> 128 <div class="e-productslist-header small"> 129 @if( ( Espresso.Item.SortShow == "False" && Espresso.Item.PagingShow == "False" ) && Espresso.Item.HeadingShow == "True" ){ 130 <h1 class="h3 m-0">@Espresso.Item.Name (<span class="js-e-productlist-product-count"></span>)</h1> 131 } 132 else{ 133 <div class="row"> 134 @if( Espresso.Item.SortShow == "True" ){ 135 <div class="col-6 @( Espresso.Item.PagingShow != "True" ? "ml-auto" : "" )"> 136 <div class="js-e-productlist-sort"> 137 <script id="js-e-handlebars-tmpl-productlist-sort" type="text/x-handlebars-template"> 138 139 <fieldset class="form-inline"> 140 <div class="form-group @( Espresso.Item.PagingShow != "True" ? "justify-content-end" : "" )"> 141 <label for="Sort" class="mr-1"> 142 @Translate( "eCom Productlist - Sorting - Label", "Sort: ") 143 </label> 144 @{ string[] excludedOptions = {"Name DESC"}; } 145 <select name="Sort" class="js-e-productlist-sort-select custom-select custom-select-sm" style="padding-bottom:0.25em;"> 146 @foreach( FieldOptionMetadata sortByOption in ItemManager.Metadata.GetItemFields( "ParagraphModule_EcomProductList" ).FirstOrDefault( f => f.SystemName == "ModuleOverride_SortBy" ).Options.Values ){ 147 foreach( FieldOptionMetadata sortOrderOption in ItemManager.Metadata.GetItemFields( "ParagraphModule_EcomProductList" ).FirstOrDefault( f => f.SystemName == "ModuleOverride_SortOrder" ).Options.Values ){ 148 if( excludedOptions.Any( o => o.Contains( String.Format( "{0} {1}", sortByOption.Value, sortOrderOption.Value ) ) ) == false ){ 149 <option value="@String.Format("{0} {1}", sortByOption.Value, sortOrderOption.Value)" {{#compare sort.sort '===' '@String.Format( "{0} {1}", sortByOption.Value, sortOrderOption.Value )'}}selected{{/compare}}> 150 @Translate( String.Format( "eCom Productlist - Sorting Option - Label {0} {1}", sortByOption.Value, sortOrderOption.Value ), String.Format( "{0} {1}", sortByOption.Name, sortOrderOption.Name ) ) 151 </option> 152 } 153 } 154 } 155 </select> 156 </div> 157 </fieldset> 158 159 </script> 160 </div> 161 </div> 162 163 164 165 } 166 @if( Espresso.Item.PagingShow == "True" ){ 167 <div class="col-6"> 168 <div class="align-items-center d-flex e-products-paging h-100 js-e-products-paging justify-content-end"> 169 <script id="js-e-handlebars-tmpl-productlist-paging" type="text/x-handlebars-template"> 170 <small class="text-nowrap mr-1"> 171 {{#if page.productCount}} 172 <strong>{{page.viewing.from}} - {{page.viewing.to}}</strong> @Translate( "eCom Productlist Paging - Product Count Of - Text", "of") 173 {{/if}} 174 <strong> {{page.productCount}}</strong> 175 </small> 176 {{#compare page.prevPage '!==' 0 }} 177 <a href="{{page.pagingUrl}}={{page.prevPage}}" class="btn btn-link btn-lg p-0 pl-1 mr-1 js-e-productlist-set-pagenum" data-page-num="{{page.prevPage}}"> 178 <i class="material-icons">keyboard_arrow_left</i><span class="d-none d-lg-inline">@Translate( "eCom Productlist Paging - Previous - Text", "Previous")</span> 179 </a> 180 {{/compare}} 181 {{#compare page.nextPage '!==' 0 }} 182 <a href="{{page.pagingUrl}}={{page.nextPage}}" class="btn btn-link btn-lg p-0 pr-1 ml-1 js-e-productlist-set-pagenum" data-page-num="{{page.nextPage}}"> 183 <span class="d-none d-lg-inline">@Translate( "eCom Productlist Paging - Next - Text", "Next")</span><i class="material-icons">keyboard_arrow_right</i></a> 184 {{/compare}} 185 {{#compare page.pageSize '!==' 999}} 186 {{#compare page.totalPages '>' 1 }} 187 <a href="{{page.pagingUrl}}=9999" class="btn btn-link btn-lg p-0 pl-1 js-e-productlist-set-pagesize d-none d-md-inline" data-page-size="999"> 188 @Translate( "eCom Productlist Paging - Show All - Text", "Show all") 189 </a> 190 {{/compare}} 191 {{/compare}} 192 {{#compare page.pageSize '===' 999}} 193 <a href="#" class="btn btn-link btn-lg p-0 pl-1 js-e-productlist-set-pagesize d-none" data-page-size="@Espresso.Item.Pagesize">@Translate( "eCom Productlist Paging - Reset - Link", "Reset")</a> 194 {{/compare}} 195 </script> 196 </div> 197 </div> 198 } 199 else{ 200 <div class="col-6 order-first"><span class="js-e-productlist-product-count"></span> @Translate( "eCom Productlist - Product count - Text", "products")</div> 201 } 202 </div> 203 } 204 </div> 205 </div> 206 } 207 @if( Espresso.Item.FiltersShow == "True" ){ 208 <div class="col-12 d-lg-none"> 209 <button class="btn btn-block btn-primary mb-2" type="button" data-toggle="modal" data-target="#js-e-productlist-filters-modal">@Translate( "eCom Productlist Filters - Customize Selection - Button", "Customize selection" )</button> 210 </div> 211 } 212 </div> 213 </div> 214 } 215 216 <div class="row"> 217 218 <div class="d-none d-lg-block col-lg-4 col-xl-3"> 219 <form class="js-e-productlist-form"> 220 <input type="hidden" name="ID" value="@Espresso.Page.ID"> 221 <input type="hidden" name="PageNum" value="@pageNum"> 222 <input type="hidden" name="PageUrl" value="@pageUrl"> 223 <input type="hidden" name="Sort" value="@sortBy @sortOrder"> 224 <input type="hidden" name="SortBy" value="@sortBy"> 225 <input type="hidden" name="SortOrder" value="@sortOrder"> 226 <input type="hidden" name="PageSize" value="@pageSize"> 227 228 @if( Espresso.Item.FiltersShow == "True" ) { 229 foreach (LoopItem facetGroup in GetLoop("FacetGroups") ) { 230 <input type="hidden" name="fg" value="@facetGroup.GetString("FacetGroup.Name")"> 231 } 232 <input type="hidden" class="js-e-visible-options-count" value="@Espresso.Item.FiltersVisibleOptionCount"> 233 <div id="js-e-productlist-filters"> 234 @foreach( LoopItem query in GetLoop("Query.Parameters") ) { 235 if( string.IsNullOrEmpty( query.GetString("Parameter.Value") ) == false ) { 236 <input type="hidden" name="@query.GetString("Parameter.Name")" value="@query.GetString("Parameter.Value")"> 237 } 238 } 239 <script id="js-e-handlebars-tmpl-productlist-filters" type="text/x-handlebars-template"> 240 {{#if page.filtersAppliedCount}} 241 <div class="e-productlist-filters-group"> 242 <p class="e-productlist-filters-group-header font-weight-bold small mb-0"> 243 <span class="e-productlist-filters-group-name small py-1">@Translate("eCom Productlist Filters - Selected - Text", "Selected filters")</span> 244 <button type="button" class="small btn btn-link pr-0 js-e-productlist-filters-clear-all">@Translate("eCom Productlist Filters - Reset Filters - Button", "Reset all")</button> 245 </p> 246 <div class="small"> 247 <ul class="e-productlist-filters-group-options-selected list-unstyled small mb-1"> 248 {{#each facets}} 249 {{#if selectedOptions.length}} 250 {{#each selectedOptions}} 251 <li class="e-productlist-filters-option-selected"><a class="js-e-productlist-filters-remove" href="#" data-value="{{value}}"><i class="material-icons material-icons-fixed text-danger text-left mr-1">clear</i>{{../name}}: {{label}}</a></li> 252 {{/each}} 253 {{/if}} 254 {{/each}} 255 {{#if page.q}} 256 <li class="e-productlist-filters-option-selected"><a class="js-e-productlist-filters-search-clear" href="#"><i class="material-icons material-icons-fixed text-danger mr-1">clear</i>@Translate("eCom Productlist Filters - Search - Text", "Search"): {{page.q}}</a></li> 257 {{/if}} 258 {{#compare page.minPrice.clean '&&' page.maxPrice.clean}} 259 <li class="e-productlist-filters-option-selected"><a class="js-e-productlist-filters-range-clear" href="#" data-group-id="js-e-productlist-filters-range-group-price"><i class="material-icons material-icons-fixed text-danger mr-1">clear</i>@Translate("eCom Productlist Filters - Price - Heading", "Price"): {{{page.minPrice.formatted}}} - {{{page.maxPrice.formatted}}}</a></li> 260 {{/compare}} 261 </ul> 262 </div> 263 </div> 264 {{/if}} 265 @if( Espresso.Item.FiltersNavigationShow == "True" ){ 266 <div class="e-productlist-filters-group js-e-productlist-filters-group"> 267 <p class="e-productlist-filters-group-header font-weight-bold small mb-0"> 268 <a class="e-productlist-filters-group-collapse-toggle text-black" data-toggle="collapse" data-target="#e-productlist-filters-group-navigation"> 269 <i class="material-icons">arrow_drop_down</i> 270 <span class="e-productlist-filters-group-name small py-1"> 271 @Espresso.Item.NavigationHeading 272 </span> 273 </a> 274 </p> 275 <fieldset id="e-productlist-filters-group-navigation" class="e-productlist-filters-group-options mb-2 small collapse show"> 276 <div class="e-nav-local e-nav-local-vertical"> 277 <nav class="e-nav-local-container"> 278 <ul class="nav flex-column"> 279 @RenderNavigation( new { 280 id = "dwnav-local-" + Espresso.Id, 281 parentid = string.IsNullOrEmpty( Espresso.Item.NavigationParentPage ) == false ? Espresso.Item.NavigationParentPage : Espresso.Page.ID, 282 template = "local-vertical.xslt", 283 startlevel = Espresso.Item.NavigationLevelStart, 284 endlevel = Espresso.Item.NavigationLevelEnd, 285 expandmode = "path", 286 } ) 287 </ul> 288 </nav> 289 </div> 290 </fieldset> 291 </div> 292 } 293 @if( Espresso.Item.FiltersSearchShow == "True" ){ 294 <div class="e-productlist-filters-group js-e-productlist-filters-group"> 295 <p class="e-productlist-filters-group-header font-weight-bold small mb-0"> 296 <a class="e-productlist-filters-group-collapse-toggle {{#unless page.q}}collapsed{{/unless}}" data-toggle="collapse" data-target="#e-productlist-filters-group-search"> 297 <i class="material-icons">arrow_drop_down</i> 298 <span class="e-productlist-filters-group-name small py-1">@Translate("eCom Productlist Filters - Search - Heading", "Search")</span> 299 </a> 300 {{#if page.q}} 301 <button type="button" class="btn btn-link pr-0 js-e-productlist-filters-search-clear"> 302 @Translate("eCom Productlist Filter - Group Reset - Button", "Reset") 303 </button> 304 {{/if}} 305 </p> 306 <fieldset id="e-productlist-filters-group-search" class="e-productlist-filters-group-options mb-2 small collapse {{#if page.q}}show{{/if}}"> 307 <div class="js-e-search-input-group e-search-input-group {{#unless page.q}}is-empty{{/unless}}"> 308 <label class="e-search-label" for="filter_search"><i class="material-icons">search</i></label> 309 <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}}"> 310 <span class="js-e-search-clear e-search-clear"><i class="material-icons">close</i></span> 311 <button class="e-search-submit btn btn-primary js-e-productlist-filters-search-submit" type="button"><i class="material-icons pa-0">search</i></button> 312 </div> 313 </fieldset> 314 </div> 315 } 316 317 318 319 {{#each facets}} 320 {{#compare count '>' 0}} 321 <div class="e-productlist-filters-group js-e-productlist-filters-group"> 322 <p class="e-productlist-filters-group-header font-weight-bold small mb-0"> 323 <a class="e-productlist-filters-group-collapse-toggle {{#unless selectedOptions.length }}{{#compare @@first '&&' @@root.page.hasNoInteraction}}{{else}}collapsed{{/compare}}{{/unless}}" data-toggle="collapse" data-target="#e-productlist-filters-group-{{param}}"> 324 <i class="material-icons">arrow_drop_down</i> 325 <span class="e-productlist-filters-group-name small py-1">{{label}}</span> 326 </a> 327 {{#if selectedOptions.length}} 328 <label for="reset-filter-{{param}}" class="small m-0 btn btn-link pr-0"> 329 @Translate("eCom Productlist Filter - Group Reset - Label", "Reset") 330 </label> 331 {{/if}} 332 </p> 333 <fieldset id="e-productlist-filters-group-{{param}}" class="e-productlist-filters-group-options js-e-productlist-filters-group-options mb-2 small collapse {{#if selectedOptions.length }}is-expanded{{else}}{{#compare @@first '&&' @@root.page.hasNoInteraction}}is-expanded{{/compare}}{{/if}}"> 334 <div class="{{#compare count '>' @Espresso.Item.FiltersVisibleOptionCount }}js-e-productlist-filters-options-collapse-peek e-productlist-filters-options-collapse-peek is-peeking{{/compare}}"> 335 <div class="e-productlist-filters-option js-e-productlist-filters-option"> 336 <label for="reset-filter-{{param}}" class="custom-control custom-checkbox"> 337 <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}}> 338 <span class="custom-control-indicator"></span> 339 <span class="custom-control-description small">@Translate("eCom Productlist Filter - Options View All - Label", "All")</span> 340 </label> 341 </div> 342 {{#each options}} 343 <div class="e-productlist-filters-option js-e-productlist-filters-option {{#if isSelected}}is-selected{{/if}} {{#if isDisabled}}is-disabled text-muted{{/if}}"> 344 <label for="{{id}}" class="custom-control custom-checkbox"> 345 <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}}> 346 <span class="custom-control-indicator"></span> 347 <span class="custom-control-description small">{{label}} <span class="e-productlist-filters-option-count small text-muted">({{count}})</span></span> 348 </label> 349 </div> 350 {{/each}} 351 {{#compare count '>' @Espresso.Item.FiltersVisibleOptionCount }} 352 <a href="#" class="js-e-productlist-filters-options-collapse-peek-toggle e-productlist-filters-options-collapse-peek-toggle small" 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">keyboard_arrow_down</i></a> 353 {{/compare}} 354 </div> 355 </fieldset> 356 </div> 357 {{/compare}} 358 {{/each}} 359 @if( Espresso.Item.FiltersPriceRangeShow == "True" ){ 360 <div class="e-productlist-filters-group js-e-productlist-filters-group"> 361 <p class="e-productlist-filters-group-header font-weight-bold small mb-0"> 362 <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"> 363 <i class="material-icons">arrow_drop_down</i> 364 <span class="e-productlist-filters-group-name small py-1">@Translate("eCom Productlist Filters - Price Range - Heading", "Price")</span> 365 </a> 366 {{#compare page.minPrice.clean '||' page.maxPrice.clean}} 367 <button type="button" class="btn btn-link pr-0 js-e-productlist-filters-range-clear"> 368 @Translate("eCom Productlist Filter - Group Reset - Button", "Reset") 369 </button> 370 {{/compare}} 371 </p> 372 <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}}"> 373 <div id="js-e-productlist-filters-range-group-price" class="row mt-1 e-productlist-filters-range-group js-e-productlist-filters-range-group"> 374 <div class="col-12 col-lg-4 mb-1"> 375 <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"> 376 </div> 377 <div class="col-12 col-lg-4 mb-1"> 378 <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")"> 379 </div> 380 <div class="col-12 col-lg-3"> 381 <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> 382 </div> 383 </div> 384 </fieldset> 385 </div> 386 } 387 </div> 388 </script> 389 390 </div> 391 } 392 </form> 393 </div> 394 395 <div class="@productListClassList"> 396 <div id="js-e-productlist-products"> 397 <ul hidden itemscope itemtype="http://schema.org/ItemList"> 398 @foreach ( LoopItem product in GetLoop("Products") ) { 399 <li itemprop="itemListElement" itemscope itemtype="http://schema.org/Product"> 400 <a href="@getProductLink( product.GetString("Ecom:Product.PrimaryOrFirstGroupID"), product.GetString("Ecom:Product.ID") )" title="@product.GetString("Ecom:Product.Name")" itemprop="url"> 401 <h3 itemprop="name">@product.GetString("Ecom:Product.Name")</h3> 402 <p itemprop="description">@product.GetString("Ecom:Product.ShortDescription")</p> 403 </a> 404 </li> 405 } 406 </ul> 407 <script id="js-e-handlebars-tmpl-productlist-products" type="text/x-handlebars-template"> 408 <div class="e-products"> 409 <div class="e-loading-overlay e-products-loading-overlay js-e-products-loading-overlay is-loading"> 410 <div class="e-loading-spinner"></div> 411 </div> 412 {{#if page.productCount}} 413 <div class="row"> 414 {{#each products}} 415 416 <div class="col-@width.xs col-sm-@width.sm col-md-@width.md col-lg-@width.lg col-xl-@width.xl"> 417 <div class="e-products-item js-e-products-item"> 418 <div class="e-products-item-container"> 419 <div class="e-products-item-image-container"> 420 <a class="e-products-item-image-wrapper" href="{{url}}"> 421 <img src="{{imageLarge}}" alt="" class="e-products-item-image"> 422 </a> 423 </div> 424 <div class="e-products-item-text-container text-center"> 425 <h3 class="e-products-item-name mb-0"><a href="{{url}}">{{name}}</a></h3> 426 {{#if descriptionShortExtra01}} 427 <p class="e-products-item-text mb-0"> 428 <a href="{{url}}"> 429 {{descriptionShortExtra01}} 430 </a> 431 </p> 432 {{/if}} 433 <p class="e-products-item-text mb-0"> 434 <small class="e-products-item-price text-muted small"> 435 <a href="{{url}}"> 436 {{{price}}} 437 </a> 438 </small> 439 </p> 440 </div> 441 </div> 442 </div> 443 </div> 444 445 {{/each}} 446 </div> 447 {{else}} 448 <div class="alert alert-warning mt-2" role="alert"> 449 <strong><i class="material-icons material-icons-2x">sentiment_dissatisfied</i> @Translate( "eCom Productlist - Sorry - Text", "Sorry..")</strong> 450 <br> @Translate( "eCom Productlist - No Products - Text", "No products match your choices.") 451 </div> 452 {{/if}} 453 </div> 454 </script> 455 </div> 456 @if( Espresso.Item.FooterShow == "True" ){ 457 <div class="row"> 458 <div class="col-12"> 459 <div class="e-products-footer row pt-1"> 460 <div class="col-6"> 461 <small>@Translate( "eCom Productlist - Price Info - Text Public", "All prices are incl. VAT" )</small> 462 </div> 463 464 @if( Espresso.Item.PagingShow == "True" ){ 465 <div class="col-6"> 466 <div class="align-items-center d-flex e-products-paging h-100 js-e-products-paging justify-content-end"> 467 <script id="js-e-handlebars-tmpl-productlist-paging" type="text/x-handlebars-template"> 468 <small class="text-nowrap mr-1"> 469 {{#if page.productCount}} 470 <strong>{{page.viewing.from}} - {{page.viewing.to}}</strong> @Translate( "eCom Productlist Paging - Product Count Of - Text", "of") 471 {{/if}} 472 <strong> {{page.productCount}}</strong> 473 </small> 474 {{#compare page.prevPage '!==' 0 }} 475 <a href="{{page.pagingUrl}}={{page.prevPage}}" class="btn btn-link btn-lg p-0 pl-1 mr-1 js-e-productlist-set-pagenum" data-page-num="{{page.prevPage}}"> 476 <i class="material-icons">keyboard_arrow_left</i><span class="d-none d-lg-inline">@Translate( "eCom Productlist Paging - Previous - Text", "Previous")</span> 477 </a> 478 {{/compare}} 479 {{#compare page.nextPage '!==' 0 }} 480 <a href="{{page.pagingUrl}}={{page.nextPage}}" class="btn btn-link btn-lg p-0 pr-1 ml-1 js-e-productlist-set-pagenum" data-page-num="{{page.nextPage}}"> 481 <span class="d-none d-lg-inline">@Translate( "eCom Productlist Paging - Next - Text", "Next")</span><i class="material-icons">keyboard_arrow_right</i></a> 482 {{/compare}} 483 {{#compare page.pageSize '!==' 999}} 484 {{#compare page.totalPages '>' 1 }} 485 <a href="{{page.pagingUrl}}=9999" class="btn btn-link btn-lg p-0 pl-1 js-e-productlist-set-pagesize d-none d-md-inline" data-page-size="999"> 486 @Translate( "eCom Productlist Paging - Show All - Text", "Show all") 487 </a> 488 {{/compare}} 489 {{/compare}} 490 {{#compare page.pageSize '===' 999}} 491 <a href="#" class="btn btn-link btn-lg p-0 pl-1 js-e-productlist-set-pagesize d-none" data-page-size="@Espresso.Item.Pagesize">@Translate( "eCom Productlist Paging - Reset - Link", "Reset")</a> 492 {{/compare}} 493 </script> 494 </div> 495 </div> 496 } 497 @if ( Espresso.Item.FiltersShow == "True" ) { 498 <button class="btn btn-block btn-primary mt-2 d-lg-none" type="button" data-toggle="modal" data-target="#js-e-productlist-filters-modal">@Translate( "eCom Productlist Filters - Customize Selection - Button", "Customize selection")</button> 499 } 500 </div> 501 </div> 502 </div> 503 } 504 505 </div> 506 </div> 507 </div> 508 509 @if( Espresso.Item.FiltersShow == "True" ) { 510 <div id="js-e-productlist-filters-modal" class="modal fade e-productlist-filters-modal js-e-productlist-filters-modal modal-fullscreen d-lg-none" data-backdrop="false"> 511 <script id="js-e-handlebars-tmpl-productlist-filters-modal" type="text/x-handlebars-template"> 512 <div class="modal-dialog"> 513 <div class="modal-content"> 514 <button type="button" class="close" data-dismiss="modal"> 515 <i class="material-icons">close</i> 516 </button> 517 <legend class="modal-header"> 518 @Translate("eCom Productlist Filters - Customize Selection - Heading", "Customize Selection") 519 </legend> 520 <div class="modal-body"> 521 <ul class="list-group"> 522 <strong>@Translate("eCom Productlist Filters - Customize Selection - Heading", "Customize Selection")</strong> 523 {{#each facets}} 524 <li class="list-group-item e-productlist-filters-group"> 525 <h4 class="mb-1"> 526 <a id="filter-header-{{param}}" class="e-productlist-filters-group-header" data-toggle="collapse" data-target="#filter-modal-panel-{{param}}"> 527 {{label}} 528 {{#if selectedOptions.length}} 529 <span>({{selectedOptions.length}})</span> 530 {{/if}} 531 <i class="material-icons e-productlist-filters-collapse-icon">arrow_drop_down</i> 532 </a> 533 </h4> 534 <div id="filter-modal-panel-{{param}}" class="e-productlist-filters-collapse form-group collapse js-e-productlist-filters-collapse {{#if selectedOptions.length }}in{{/if}} mb-1"> 535 <div class="row mt-2"> 536 <div class="col-6 col-sm-4 col-md-3"> 537 <input class="js-e-productlist-filters-reset-all" name="reset-filter-{{param}}" id="reset-filter-{{param}}" type="checkbox" value="true" {{#compare isCleared '||' isEmpty}}checked{{/compare}}> 538 <label for="reset-filter-{{param}}"> 539 @Translate("eCom Productlist Filters - All - Label", "All ") 540 </label> 541 </div> 542 {{#each options}} 543 <div class="col-6 col-sm-4 col-md-3"> 544 <input type="checkbox" value="{{value}}" {{#if isSelected}}checked{{/if}} {{#if isDisabled}}disabled{{/if}}> 545 <label class="js-e-productlist-filters-label-mobile" for="{{id}}"> 546 {{label}} <span class="small">({{count}})</span> 547 </label> 548 </div> 549 {{/each}} 550 </div> 551 </div> 552 </li> 553 {{/each}} 554 <li class="list-group-item e-productlist-filters-group"> 555 <h4 class="mb-1"> 556 <a id="filter-header-price" class="e-productlist-filters-group-header" data-toggle="collapse" data-target="#filter-modal-panel-price"> 557 @Translate("eCom Productlist Filters - Price Range - Heading", "Price") 558 {{#compare page.minPrice.clean '&&' page.maxPrice.clean}} 559 <span>(1)</span> 560 {{/compare}} 561 <i class="material-icons e-productlist-filters-collapse-icon">arrow_drop_down</i> 562 </a> 563 </h4> 564 <div id="filter-modal-panel-price" class="e-productlist-filters-collapse form-group collapse js-e-productlist-filters-collapse {{#compare page.minPrice.clean '||' page.maxPrice.clean}}in{{/compare}} mb-1"> 565 <div class="row mt-1 e-productlist-filters-range-group js-e-productlist-filters-range-group"> 566 <div class="col-4"> 567 <input type="number" class="form-control js-e-productlist-filters-range js-e-productlist-filters-range-min" name="PriceRangeMin" id="PriceRangeMinModal" value="{{page.minPrice.clean}}" placeholder="@Translate("eCom Productlist - Filters Price Min - Text ", "From ")" min="0"> 568 </div> 569 <div class="col-4"> 570 <input type="number" class="form-control js-e-productlist-filters-range js-e-productlist-filters-range-max" name="PriceRangeMax" id="PriceRangeMaxModal" value="{{page.maxPrice.clean}}" placeholder="@Translate("eCom Productlist Filters - Price Max - Text ", "To ")" data-msg-pricerange="@Translate("eCom Productlist Filters - Price Error - Msg ", "Prices entered incorrectly ")"> 571 </div> 572 <div class="col-1"> 573 <button type="button" class="btn btn-link px-0 e-productlist-filters-clear-range js-e-productlist-filters-range-clear" data-group-id="js-e-productlist-filters-range-group-price"><i class="material-icons">clear</i></button> 574 </div> 575 <div class="col-3"> 576 <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> 577 </div> 578 </div> 579 </div> 580 </li> 581 </ul> 582 <div class="modal-footer"> 583 <a href="#" class="btn btn-outline-primary js-e-productlist-filters-clear-all">@Translate("eCom Productlist Filters - Reset Filter - Link", "Reset all")</a> 584 <button type="button" class="btn btn-primary" data-dismiss="modal"> 585 @Translate("eCom Productlist Filters - Apply - Button", "Apply") 586 </button> 587 </div> 588 </div> 589 </div> 590 </script> 591 </div> 592 593 }
keyboard_arrow_up