Error compiling template "Designs/gtech/eCom/Productlist/espresso.cshtml"
Line 1118: The name 'product' does not exist in the current context
Line 1123: The name 'product' 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 = NewsService.Instance.GetNewsDisplayPage( categoryName, newsID ); 39 string displayPage = NewsService.Instance.GetNewsDisplayPage( categoryName, newsID ); 40 if( string.IsNullOrEmpty( displayPage ) == false ) { 41 result = "/" + displayPage.Replace( "Id", "ID" ).Replace( "#", "&PID=" ) + "&M=NewsV2&Action=1&NewsID=" + newsID; 42 //result = SearchEngineFriendlyURLs.GetFriendlyUrl( result ); 43 } 44 return result; 45 } 46 47 public string getImageURL( string url, int width = 2560, int height = 0, int crop = 0, int quality = 75, string format = "jpg" ) { 48 string result = string.Empty; 49 if( string.IsNullOrEmpty( url ) == false ) { 50 result = "/admin/public/getimage.ashx?Image={0}&Width={1}&Height={2}&Format={3}&Quality={4}&Crop={5}"; 51 result = string.Format( result, url, width, height, format, quality, crop ); 52 } 53 return result; 54 } 55 56 public string getPriceFormatted( double price ) { 57 string result = string.Empty; 58 if ( Context.Currency.SymbolPlace == 0 ) { 59 result += "<span class=\"e-product-price-currency e-product-price-currency-symbol\">" + 60 Context.Currency.Symbol + "</span>&nbsp;"; 61 } 62 63 result += "<span class=\"e-product-price-price\">" + Context.Currency.Format( price, false ) + "</span>"; 64 if ( Context.Currency.SymbolPlace != 0 ) { 65 result += "&nbsp;<span class=\"e-product-price-currency e-product-price-currency-code\">" + Context.Currency.Code + 66 "</span>"; 67 } 68 return result; 69 } 70 71 public string getShortDate( DateTime date ) { 72 string result = string.Empty; 73 result = date.Date.ToString( AreaCultureInfo.DateTimeFormat.ShortDatePattern ).Replace( "-" , "." ); 74 return result; 75 } 76 77 public string getLongDate( DateTime date ) { 78 string result = string.Empty; 79 result = date.Date.ToString( AreaCultureInfo.DateTimeFormat.LongDatePattern ); 80 return result; 81 } 82 } 83 84 @{ 85 string pageUrl = GetGlobalValue("Global:Pageview.Url"); 86 string sortBy = string.IsNullOrEmpty(System.Web.HttpContext.Current.Request["SortBy"]) ? GetString("Ecom:ProductList.SortBy") : System.Web.HttpContext.Current.Request["SortBy"]; 87 string sortOrder = string.IsNullOrEmpty(System.Web.HttpContext.Current.Request["SortOrder"]) ? GetString("Ecom:ProductList.SortOrder") : System.Web.HttpContext.Current.Request["SortOrder"]; 88 string pageSize = string.IsNullOrEmpty(System.Web.HttpContext.Current.Request["PageSize"]) ? GetString("Ecom:ProductList.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); 99100 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">138139 <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 <select name="Sort" class="js-e-productlist-sort-select custom-select custom-select-sm" style="padding-bottom:0.25em;">145 <option value="Name DESC" {{#compare sort.sort '===' 'Name DESC'}}selected{{/compare}}>@Translate( "eCom Productlist - Sorting - Name - DESC - Label", "Name")</option>146 <option value="Created ASC" {{#compare sort.sort '===' 'Created ASC'}}selected{{/compare}}>@Translate( "eCom Productlist - Sorting - Created - ASC - Label", "Created")</option>147 <option value="Price ASC" {{#compare sort.sort '===' 'Price ASC'}}selected{{/compare}}>@Translate( "eCom Productlist - Sorting - Price - ASC - Label", "Price - low to high")</option>148 <option value="Price DESC" {{#compare sort.sort '===' 'Price DESC'}}selected{{/compare}}>@Translate( "eCom Productlist - Sorting - Price - DESC - Label", "Price - high to low")</option>149 </select>150 </div>151 </fieldset>152153 </script>154 </div>155 </div>156157 } 158 @if( Espresso.Item.PagingShow == "True" ){ 159 <div class="col-6">160 <div class="align-items-center d-flex e-products-paging h-100 js-e-products-paging justify-content-end">161 <script id="js-e-handlebars-tmpl-productlist-paging" type="text/x-handlebars-template">162 <small class="text-nowrap mr-1">163 {{#if page.productCount}} 164 <strong>{{page.viewing.from}} - {{page.viewing.to}}</strong> @Translate( "eCom Productlist Paging - Product Count Of - Text", "of") 165 {{/if}} 166 <strong> {{page.productCount}}</strong>167 </small>168 {{#compare page.prevPage '!==' 0 }} 169 <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}}">170 <i class="material-icons">keyboard_arrow_left</i><span class="d-none d-lg-inline">@Translate( "eCom Productlist Paging - Previous - Text", "Previous")</span>171 </a>172 {{/compare}} 173 {{#compare page.nextPage '!==' 0 }} 174 <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}}">175 <span class="d-none d-lg-inline">@Translate( "eCom Productlist Paging - Next - Text", "Next")</span><i class="material-icons">keyboard_arrow_right</i></a>176 {{/compare}} 177 {{#compare page.pageSize '!==' 999}} 178 {{#compare page.totalPages '>' 1 }} 179 <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">180 @Translate( "eCom Productlist Paging - Show All - Text", "Show all") 181 </a>182 {{/compare}} 183 {{/compare}} 184 {{#compare page.pageSize '===' 999}} 185 <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>186 {{/compare}} 187 </script>188 </div>189 </div>190 } 191 else{ 192 <div class="col-6 order-first"><span class="js-e-productlist-product-count"></span> @Translate( "eCom Productlist - Product count - Text", "products")</div>193 } 194 </div>195 } 196 </div>197 </div>198 } 199 @if( Espresso.Item.FiltersShow == "True" ){ 200 <div class="col-12 d-lg-none">201 <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>202 </div>203 } 204 </div>205 </div>206 } 207208 <div class="row">209210 <div class="d-none d-lg-block col-lg-4 col-xl-3">211 <form class="js-e-productlist-form">212 <input type="hidden" name="ID" value="@Espresso.Page.ID">213 <input type="hidden" name="PageNum" value="@pageNum">214 <input type="hidden" name="PageUrl" value="@pageUrl">215 <input type="hidden" name="Sort" value="@sortBy @sortOrder">216 <input type="hidden" name="SortBy" value="@sortBy">217 <input type="hidden" name="SortOrder" value="@sortOrder">218 <input type="hidden" name="PageSize" value="@pageSize">219220 @if( Espresso.Item.FiltersShow == "True" ) { 221 foreach (LoopItem facetGroup in GetLoop("FacetGroups") ) { 222 <input type="hidden" name="fg" value="@facetGroup.GetString("FacetGroup.Name")">223 } 224 <input type="hidden" class="js-e-visible-options-count" value="@Espresso.Item.FiltersVisibleOptionCount">225 <div id="js-e-productlist-filters">226 <script id="js-e-handlebars-tmpl-productlist-filters" type="text/x-handlebars-template">227 {{#if page.filtersAppliedCount}} 228 <div class="e-productlist-filters-group">229 <p class="e-productlist-filters-group-header font-weight-bold small mb-0">230 <span class="e-productlist-filters-group-name small py-1">@Translate("eCom Productlist Filters - Selected - Text", "Selected filters")</span>231 <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>232 </p>233 <div class="small">234 <ul class="e-productlist-filters-group-options-selected list-unstyled small mb-1">235 {{#each facets}} 236 {{#if selectedOptions.length}} 237 {{#each selectedOptions}} 238 <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>239 {{/each}} 240 {{/if}} 241 {{/each}} 242 {{#if page.q}} 243 <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>244 {{/if}} 245 {{#compare page.minPrice.clean '&&' page.maxPrice.clean}} 246 <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>247 {{/compare}} 248 </ul>249 </div>250 </div>251 {{/if}} 252 @if( Espresso.Item.FiltersNavigationShow == "True" ){ 253 <div class="e-productlist-filters-group js-e-productlist-filters-group">254 <p class="e-productlist-filters-group-header font-weight-bold small mb-0">255 <a class="e-productlist-filters-group-collapse-toggle text-black" data-toggle="collapse" data-target="#e-productlist-filters-group-navigation">256 <i class="material-icons">arrow_drop_down</i>257 <span class="e-productlist-filters-group-name small py-1">258 @Espresso.Item.NavigationHeading259 </span>260 </a>261 </p>262 <fieldset id="e-productlist-filters-group-navigation" class="e-productlist-filters-group-options mb-2 small collapse show">263 <div class="e-nav-local e-nav-local-vertical">264 <nav class="e-nav-local-container">265 <ul class="nav flex-column">266 @RenderNavigation( new { 267 id = "dwnav-local-" + Espresso.Id, 268 parentid = string.IsNullOrEmpty( Espresso.Item.NavigationParentPage ) == false ? Espresso.Item.NavigationParentPage : Espresso.Page.ID, 269 template = "local-vertical.xslt", 270 startlevel = Espresso.Item.NavigationLevelStart, 271 endlevel = Espresso.Item.NavigationLevelEnd, 272 expandmode = "path", 273 } ) 274 </ul>275 </nav>276 </div>277 </fieldset>278 </div>279 } 280 @if( Espresso.Item.FiltersSearchShow == "True" ){ 281 <div class="e-productlist-filters-group js-e-productlist-filters-group">282 <p class="e-productlist-filters-group-header font-weight-bold small mb-0">283 <a class="e-productlist-filters-group-collapse-toggle {{#unless page.q}}collapsed{{/unless}}" data-toggle="collapse" data-target="#e-productlist-filters-group-search">284 <i class="material-icons">arrow_drop_down</i>285 <span class="e-productlist-filters-group-name small py-1">@Translate("eCom Productlist Filters - Search - Heading", "Search")</span>286 </a>287 {{#if page.q}} 288 <button type="button" class="btn btn-link pr-0 js-e-productlist-filters-search-clear">289 @Translate("eCom Productlist Filter - Group Reset - Button", "Reset") 290 </button>291 {{/if}} 292 </p>293 <fieldset id="e-productlist-filters-group-search" class="e-productlist-filters-group-options mb-2 small collapse {{#if page.q}}show{{/if}}">294 <div class="js-e-search-input-group e-search-input-group {{#unless page.q}}is-empty{{/unless}}">295 <label class="e-search-label" for="filter_search"><i class="material-icons">search</i></label>296 <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}}">297 <span class="js-e-search-clear e-search-clear"><i class="material-icons">close</i></span>298 <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>299 </div>300 </fieldset>301 </div>302 } 303304305306 {{#each facets}} 307 {{#compare count '>' 0}} 308 <div class="e-productlist-filters-group js-e-productlist-filters-group">309 <p class="e-productlist-filters-group-header font-weight-bold small mb-0">310 <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}}">311 <i class="material-icons">arrow_drop_down</i>312 <span class="e-productlist-filters-group-name small py-1">{{label}}</span>313 </a>314 {{#if selectedOptions.length}} 315 <label for="reset-filter-{{param}}" class="small m-0 btn btn-link pr-0">316 @Translate("eCom Productlist Filter - Group Reset - Label", "Reset") 317 </label>318 {{/if}} 319 </p>320 <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}}">321 <div class="{{#compare count '>' @Espresso.Item.FiltersVisibleOptionCount }}js-e-productlist-filters-options-collapse-peek e-productlist-filters-options-collapse-peek is-peeking{{/compare}}">322 <div class="e-productlist-filters-option js-e-productlist-filters-option">323 <label for="reset-filter-{{param}}" class="custom-control custom-checkbox">324 <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}}>325 <span class="custom-control-indicator"></span>326 <span class="custom-control-description small">@Translate("eCom Productlist Filter - Options View All - Label", "All")</span>327 </label>328 </div>329 {{#each options}} 330 <div class="e-productlist-filters-option js-e-productlist-filters-option {{#if isSelected}}is-selected{{/if}} {{#if isDisabled}}is-disabled text-muted{{/if}}">331 <label for="{{id}}" class="custom-control custom-checkbox">332 <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}}>333 <span class="custom-control-indicator"></span>334 <span class="custom-control-description small">{{label}} <span class="e-productlist-filters-option-count small text-muted">({{count}})</span></span>335 </label>336 </div>337 {{/each}} 338 {{#compare count '>' @Espresso.Item.FiltersVisibleOptionCount }} 339 <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>340 {{/compare}} 341 </div>342 </fieldset>343 </div>344 {{/compare}} 345 {{/each}} 346 @if( Espresso.Item.PriceRangeShow == "True" ){ 347 <div class="e-productlist-filters-group js-e-productlist-filters-group">348 <p class="e-productlist-filters-group-header font-weight-bold small mb-0">349 <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">350 <i class="material-icons">arrow_drop_down</i>351 <span class="e-productlist-filters-group-name small py-1">@Translate("eCom Productlist Filters - Price Range - Heading", "Price")</span>352 </a>353 {{#compare page.minPrice.clean '||' page.maxPrice.clean}} 354 <button type="button" class="btn btn-link pr-0 js-e-productlist-filters-range-clear">355 @Translate("eCom Productlist Filter - Group Reset - Button", "Reset") 356 </button>357 {{/compare}} 358 </p>359 <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}}">360 <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">361 <div class="col-12 col-lg-4 mb-1 mb-lg-0">362 <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">363 </div>364 <div class="col-12 col-lg-4 mb-1 mb-lg-0">365 <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")">366 </div>367 <div class="col-12 col-lg-3">368 <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>369 </div>370 </div>371 </fieldset>372 </div>373 } 374 </div>375 </script>376377 </div>378 } 379 @foreach( LoopItem query in GetLoop("Query.Parameters") ) { 380 if( string.IsNullOrEmpty( query.GetString("Parameter.Value") ) == false ) { 381 <input type="hidden" name="@query.GetString("Parameter.Name")" value="@query.GetString("Parameter.Value")">382 } 383 } 384 </form>385 </div>386387 <div class="@productListClassList">388 <div id="js-e-productlist-products">389 <ul hidden itemscope itemtype="http://schema.org/ItemList">390 @foreach ( LoopItem product in GetLoop("Products") ) { 391 <li itemprop="itemListElement" itemscope itemtype="http://schema.org/Product">392 <a href="@getProductLink( product.GetString("Ecom:Product.PrimaryOrFirstGroupID"), product.GetString("Ecom:Product.ID") )" title="@product.GetString("Ecom:Product.Name")" itemprop="url">393 <h3 itemprop="name">@product.GetString("Ecom:Product.Name")</h3>394 <p itemprop="description">@product.GetString("Ecom:Product.ShortDescription")</p>395 </a>396 </li>397 } 398 </ul>399 <script id="js-e-handlebars-tmpl-productlist-products" type="text/x-handlebars-template">400 <div class="e-products">401 <div class="e-loading-overlay e-products-loading-overlay js-e-products-loading-overlay is-loading">402 <div class="e-loading-spinner"></div>403 </div>404 {{#if page.productCount}} 405 <div class="row">406 {{#each products}} 407 <div class="col-@width.xs col-sm-@width.sm col-md-@width.md col-lg-@width.lg col-xl-@width.xl">408 <div class="e-products-item js-e-products-item">409 <div class="e-products-item-container">410 <div class="e-products-item-image-container">411 <img src="{{imageLarge}}" alt="" class="e-products-item-image">412 </div>413 <div class="e-products-item-text-container text-center">414 <h3 class="e-products-item-name mb-0">{{name}}</h3>415 {{#if descriptionShortExtra01}} 416 <p class="e-products-item-text mb-0">417 {{descriptionShortExtra01}} 418 </p>419 {{/if}} 420 <p class="e-products-item-text mb-0">421 <span class="e-products-item-price text-muted">422 {{{price}}} 423 </span>424 </p>425 <hr/>426 <ul class="material-icons-ul mb-0 text-left small d-md-flex justify-content-around">427 {{#if stock}} 428 <li class="mb-0 ml-2 ml-md-0"><i class="material-icons text-success text-xs-right">check</i>{{stockLabel}}</li>429 {{else}} 430 <li class="mb-0 ml-2 ml-md-0"><i class="material-icons text-danger text-xs-right">close</i>{{stockLabel}}</li>431 {{/if}} 432 <li class="mb-0 ml-2 ml-md-0"><i class="material-icons">local_shipping</i>{{stockState}}</li>433 </ul>434 <hr/>435 </div>436 <div class="col-10 col-md-8 mx-auto">437 <form class="js-e-product-form e-product-form" action="/system/data/cart" method="post">438 <input type="hidden" name="CartCmd" value="Add">439 <input type="hidden" name="ProductID" value="@product.GetString("Ecom:Product.ID")">440 <input type="hidden" name="VariantID" value="">441 <input type="hidden" name="productIndividuallyShipped" value="@product.GetString("Ecom:Product:Field.productIndividuallyShipped")">442 <input type="hidden" name="UnitID" value="">443 <input type="hidden" name="Redirect" value="">444 <input type="hidden" name="Quantity" value="1" class="js-e-product-quantity">445 <button type="submit" class="btn btn-primary btn-block">@Translate("eCom Product AddToCartButtonText", "Læg i kurv")</button>446 <div class="e-loading-overlay"><div class="e-loading-spinner"></div></div>447 </form>448449 </div>450 </div>451 </div>452 </div>453454 {{/each}} 455 </div>456 {{else}} 457 <div class="alert alert-warning mt-2" role="alert">458 <strong><i class="material-icons material-icons-2x">sentiment_dissatisfied</i> @Translate( "eCom Productlist - Sorry - Text", "Sorry..")</strong>459 <br> @Translate( "eCom Productlist - No Products - Text", "No products match your choices.") 460 </div>461 {{/if}} 462 </div>463 </script>464 </div>465 @if( Espresso.Item.FooterShow == "True" ){ 466 <div class="row">467 <div class="col-12">468 <div class="e-products-footer row pt-1">469 <div class="col-6">470 <small>@Translate( "eCom Productlist - Price Info - Text Public", "All prices are incl. VAT" )</small>471 </div>472473 @if( Espresso.Item.PagingShow == "True" ){ 474 <div class="col-6">475 <div class="align-items-center d-flex e-products-paging h-100 js-e-products-paging justify-content-end">476 <script id="js-e-handlebars-tmpl-productlist-paging" type="text/x-handlebars-template">477 <small class="text-nowrap mr-1">478 {{#if page.productCount}} 479 <strong>{{page.viewing.from}} - {{page.viewing.to}}</strong> @Translate( "eCom Productlist Paging - Product Count Of - Text", "of") 480 {{/if}} 481 <strong> {{page.productCount}}</strong>482 </small>483 {{#compare page.prevPage '!==' 0 }} 484 <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}}">485 <i class="material-icons">keyboard_arrow_left</i><span class="d-none d-lg-inline">@Translate( "eCom Productlist Paging - Previous - Text", "Previous")</span>486 </a>487 {{/compare}} 488 {{#compare page.nextPage '!==' 0 }} 489 <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}}">490 <span class="d-none d-lg-inline">@Translate( "eCom Productlist Paging - Next - Text", "Next")</span><i class="material-icons">keyboard_arrow_right</i></a>491 {{/compare}} 492 {{#compare page.pageSize '!==' 999}} 493 {{#compare page.totalPages '>' 1 }} 494 <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">495 @Translate( "eCom Productlist Paging - Show All - Text", "Show all") 496 </a>497 {{/compare}} 498 {{/compare}} 499 {{#compare page.pageSize '===' 999}} 500 <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>501 {{/compare}} 502 </script>503 </div>504 </div>505 } 506 @if ( Espresso.Item.FiltersShow == "True" ) { 507 <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>508 } 509 </div>510 </div>511 </div>512 } 513514 </div>515 </div>516 </div>517518 @if( Espresso.Item.FiltersShow == "True" ) { 519 <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">520 <script id="js-e-handlebars-tmpl-productlist-filters-modal" type="text/x-handlebars-template">521 <div class="modal-dialog">522 <div class="modal-content">523 <button type="button" class="close" data-dismiss="modal">524 <i class="material-icons">close</i>525 </button>526 <legend class="modal-header">527 @Translate("eCom Productlist Filters - Customize Selection - Heading", "Customize Selection") 528 </legend>529 <div class="modal-body">530 <ul class="list-group">531 <strong>@Translate("eCom Productlist Filters - Customize Selection - Heading", "Customize Selection")</strong>532 {{#each facets}} 533 <li class="list-group-item e-productlist-filters-group">534 <h4 class="mb-1">535 <a id="filter-header-{{param}}" class="e-productlist-filters-group-header" data-toggle="collapse" data-target="#filter-modal-panel-{{param}}">536 {{label}} 537 {{#if selectedOptions.length}} 538 <span>({{selectedOptions.length}})</span>539 {{/if}} 540 <i class="material-icons e-productlist-filters-collapse-icon">arrow_drop_down</i>541 </a>542 </h4>543 <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">544 <div class="row mt-2">545 <div class="col-6 col-sm-4 col-md-3">546 <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}}>547 <label for="reset-filter-{{param}}">548 @Translate("eCom Productlist Filters - All - Label", "All ") 549 </label>550 </div>551 {{#each options}} 552 <div class="col-6 col-sm-4 col-md-3">553 <input type="checkbox" value="{{value}}" {{#if isSelected}}checked{{/if}} {{#if isDisabled}}disabled{{/if}}>554 <label class="js-e-productlist-filters-label-mobile" for="{{id}}">555 {{label}} <span class="small">({{count}})</span>556 </label>557 </div>558 {{/each}} 559 </div>560 </div>561 </li>562 {{/each}} 563 <li class="list-group-item e-productlist-filters-group">564 <h4 class="mb-1">565 <a id="filter-header-price" class="e-productlist-filters-group-header" data-toggle="collapse" data-target="#filter-modal-panel-price">566 @Translate("eCom Productlist Filters - Price Range - Heading", "Price") 567 {{#compare page.minPrice.clean '&&' page.maxPrice.clean}} 568 <span>(1)</span>569 {{/compare}} 570 <i class="material-icons e-productlist-filters-collapse-icon">arrow_drop_down</i>571 </a>572 </h4>573 <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">574 <div class="row mt-1 e-productlist-filters-range-group js-e-productlist-filters-range-group">575 <div class="col-4">576 <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">577 </div>578 <div class="col-4">579 <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 ")">580 </div>581 <div class="col-1">582 <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>583 </div>584 <div class="col-3">585 <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>586 </div>587 </div>588 </div>589 </li>590 </ul>591 <div class="modal-footer">592 <a href="#" class="btn btn-outline-primary js-e-productlist-filters-clear-all">@Translate("eCom Productlist Filters - Reset Filter - Link", "Reset all")</a>593 <button type="button" class="btn btn-primary" data-dismiss="modal">594 @Translate("eCom Productlist Filters - Apply - Button", "Apply") 595 </button>596 </div>597 </div>598 </div>599 </script>600 </div>601602 }
keyboard_arrow_up