Share via :
Please log in
Please Login to place an order.
Home Page
Error executing template "Designs/Rapido/eCom/Productlist/FGX_MultiSearch_ProductsRender.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
   at CompiledRazorTemplates.Dynamic.RazorEngine_86e9a095eeff4e028cf126d99112ea76.Execute() in C:\Website\Solutions\Files\Templates\Designs\Rapido\eCom\Productlist\FGX_MultiSearch_ProductsRender.cshtml:line 17
   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.b__0(TextWriter writer)
   at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()

1 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 2 @using Dynamicweb.Frontend.Devices 3 @using Dynamicweb.Extensibility 4 @using Dynamicweb.Content 5 @using Dynamicweb.Core 6 @using System 7 @using System.Web 8 @using System.Collections.Generic; 9 @using System.Linq 10 @using System.Text.RegularExpressions 11 12 13 @{ 14 15 16 17 string searchItem = !string.IsNullOrEmpty(System.Web.HttpContext.Current.Request["MultiSearch"]) ? System.Web.HttpContext.Current.Request["MultiSearch"] : HttpContext.Current.Session["SearchItem"].ToString(); 18 //string searchList = !string.IsNullOrEmpty(System.Web.HttpContext.Current.Request["MultiSearchList"]) ? System.Web.HttpContext.Current.Request["MultiSearchList"] : System.Web.HttpContext.Current.Session["SearchList"].ToString(); 19 string multiSearchList = System.Web.HttpContext.Current.Request["MultiSearchList"] == null ? "" : System.Web.HttpContext.Current.Request["MultiSearchList"].ToString(); 20 string searchListFromSession = System.Web.HttpContext.Current.Session["SearchList"] == null ? "" : System.Web.HttpContext.Current.Session["SearchList"].ToString(); 21 22 string searchList = !string.IsNullOrEmpty(multiSearchList) ? multiSearchList : searchListFromSession; 23 24 HttpContext.Current.Session["SearchItem"] = searchItem; 25 HttpContext.Current.Session["SearchList"] = searchList; 26 27 string[] searches = searchList.Split(','); 28 29 int multiSearchPageId = GetPageIdByNavigationTag("MultiSearch"); 30 31 string pageUrl = GetGlobalValue("Global:Pageview.Url.Raw"); 32 33 //Favorites 34 string pageId = GetGlobalValue("Global:Page.ID"); 35 string feedFullUrl = pageUrl + "&feed=true"; 36 string requestQuery = GetGlobalValue("Global:Request.Query") + "&feed=true"; 37 string groupID = HttpContext.Current.Request.QueryString.Get("groupid"); 38 string productCatalogId = GetGlobalValue("Global:Page.ID"); 39 string listId = HttpContext.Current.Request.QueryString.Get("ListID"); 40 bool isFavoriteList = !String.IsNullOrEmpty(listId) ? true : false; 41 requestQuery += !isFavoriteList ? "&DoNotShowVariantsAsSingleProducts=True" : ""; 42 feedFullUrl += !isFavoriteList ? "&DoNotShowVariantsAsSingleProducts=True" : ""; 43 44 //Layout 45 int listViewsCount = 0; 46 listViewsCount += Converter.ToBoolean(Pageview.Area.Item["ProductItemContainer"]) ? 1 : 0; 47 listViewsCount += Converter.ToBoolean(Pageview.Area.Item["ProductGridItemContainer"]) ? 1 : 0; 48 listViewsCount += Converter.ToBoolean(Pageview.Area.Item["ProductDetailsItemContainer"]) ? 1 : 0; 49 50 bool hideSorting = Converter.ToBoolean(Pageview.Area.Item["HideSorting"]); 51 bool onlyPreview = Converter.ToBoolean(Pageview.Area.Item["OnlyPreviewForAnonymous"]) && Pageview.User == null; 52 53 Dynamicweb.Content.Items.Item icons = Dynamicweb.Content.Items.Item.GetItemById("Icons", Pageview.Area.Item["Icons"].ToString()); 54 string cartIcon = icons["CartIcon"] != null ? icons["CartIcon"].ToString() : "fas fa-shopping-cart"; 55 56 var listViewSettings = Dynamicweb.Content.Items.Item.GetItemById("ProductCatalogListView", Pageview.Area.Item["ProductCatalogListView"].ToString()); 57 bool listViewShowCartButton = listViewSettings["ListViewShowAddToCartButton"] != null ? Converter.ToBoolean(listViewSettings["ListViewShowAddToCartButton"]) : true; 58 bool listViewShowListButton = listViewSettings["ListViewShowAddToListButton"] != null ? Converter.ToBoolean(listViewSettings["ListViewShowAddToListButton"]) : true; 59 bool listViewShowViewButton = listViewSettings["ListViewShowViewButton"] != null ? Converter.ToBoolean(listViewSettings["ListViewShowViewButton"]) : true; 60 61 var gridViewSettings = Dynamicweb.Content.Items.Item.GetItemById("ProductCatalogGridView", Pageview.Area.Item["ProductCatalogGridView"].ToString()); 62 string gridViewColumns = gridViewSettings["GridViewColumns"] != null ? gridViewSettings["GridViewColumns"].ToString() : "4"; 63 bool gridViewShowCartButton = gridViewSettings["GridViewShowAddToCartButton"] != null ? Converter.ToBoolean(gridViewSettings["GridViewShowAddToCartButton"]) : true; 64 bool gridViewShowListButton = gridViewSettings["GridViewShowAddToListButton"] != null ? Converter.ToBoolean(gridViewSettings["GridViewShowAddToListButton"]) : true; 65 bool gridViewShowViewButton = gridViewSettings["GridViewShowViewButton"] != null ? Converter.ToBoolean(gridViewSettings["GridViewShowViewButton"]) : true; 66 bool gridViewShowStock = gridViewSettings["GridViewShowStockAndShipping"] != null ? Converter.ToBoolean(gridViewSettings["GridViewShowStockAndShipping"]) : true; 67 68 string cartButtonText = Converter.ToInt32(gridViewColumns) >= 4 ? Translate("Add to cart", "Add to cart") : ""; 69 70 var detailsViewSettings = Dynamicweb.Content.Items.Item.GetItemById("ProductCatalogDetailsView", Pageview.Area.Item["ProductCatalogDetailsView"].ToString()); 71 bool detailsViewShowCartButton = detailsViewSettings["DetailsViewShowAddToCartButton"] != null ? Converter.ToBoolean(detailsViewSettings["DetailsViewShowAddToCartButton"]) : true; 72 bool detailsViewShowListButton = detailsViewSettings["DetailsViewShowAddToListButton"] != null ? Converter.ToBoolean(detailsViewSettings["DetailsViewShowAddToListButton"]) : true; 73 bool detailsViewShowViewButton = detailsViewSettings["DetailsViewShowViewButton"] != null ? Converter.ToBoolean(detailsViewSettings["DetailsViewShowViewButton"]) : true; 74 bool detailsViewShowStock = detailsViewSettings["DetailsViewShowStockAndShipping"] != null ? Converter.ToBoolean(detailsViewSettings["DetailsViewShowStockAndShipping"]) : true; 75 bool detailsViewShowImage = detailsViewSettings["DetailsViewDetailsViewShowImage"] != null ? Converter.ToBoolean(detailsViewSettings["DetailsViewDetailsViewShowImage"]) : true; 76 77 string listCookie = ""; 78 if (HttpContext.Current.Request.Cookies["ProductsContainerTemplate"] != null) 79 { 80 listCookie = HttpContext.Current.Request.Cookies["ProductsContainerTemplate"].Value; 81 } 82 listCookie = !String.IsNullOrEmpty(listCookie) ? listCookie : Pageview.Area.Item["ProductDefaultListView"].ToString(); 83 84 string listViewSelected = listCookie == "ProductItemContainer" ? "checked" : ""; 85 string gridViewSelected = listCookie == "ProductGridItemContainer" ? "checked" : ""; 86 string detailsViewSelected = listCookie == "ProductDetailsItemContainer" ? "checked" : ""; 87 88 var navigationMarkup = RenderNavigation(new 89 { 90 id = "leftnav", 91 cssclass = "dwnavigation", 92 startLevel = 1, 93 endlevel = 5, 94 template = "LeftNavigation.xslt", 95 mode = "ecom" 96 }); 97 } 98 99 @GetValue("DoNotRenderProductListTemplate") 100 101 @if (!String.IsNullOrEmpty(System.Web.HttpContext.Current.Request["GroupID"])){ 102 @RenderSnippet("CategoryPageFeaturedProducts") 103 } 104 105 <div id="content" class="multi_product_search_result_content"> 106 <div id="sub_content" class="container"> 107 <div class="items_list_text"> 108 <p>@Translate("Items in your shopping list")</p> 109 </div> 110 111 <div class="multi_product_result"> 112 <div style="display: block;" class="single-tab-content"> 113 <ul> 114 @foreach( string s in searches ){ 115 if( searchItem == s ){ 116 <li class="active_tab"> 117 <a href="javascript:void(0)" onclick="multiSearchSelect(this, '@s')">@s</a> 118 </li> 119 }else{ 120 <li class=""> 121 <a href="javascript:void(0)" onclick="multiSearchSelect(this, '@s')">@s</a> 122 </li> 123 } 124 } 125 </ul> 126 </div> 127 </div> 128 <div class="Result_desc"> 129 <div class="edit_list_btn"> 130 <form name="editMultiSearch" method="POST" action="/Default.aspx?ID=@multiSearchPageId" > 131 <input type="hidden" value="@searchList" name="oldSearchList"> 132 <input type="submit" value="@Translate("Edit Your list")" name="edit_products"> 133 </form> 134 </div> 135 </div> 136 <form name="multiForm" id="multiForm" method="post" > 137 <input type="hidden" name="CartCmd" id="CartCmd" value="addMulti"/> 138 <div class="grid grid--external-bleed grid--align-content-start js-handlebars-root" id="productList" data-template="ProductContainer" data-pre-render-template="ProductPreRenderContainer" data-json-feed="@feedFullUrl" data-preloader="overlay"></div> 139 </form> 140 </div> 141 <div class="banner_image"> 142 @RenderParagraphContent(2342) 143 </div> 144 <div class="res_banner_image" style="display:none;"> 145 @RenderParagraphContent(2342) 146 </div> 147 </div> 148 149 150 151 152 153 154 155 <script id="ProductPreRenderContainer" type="text/x-template"> 156 @if (Pageview.Area.Item["EcommerceFacetsViewMode"] != null && Pageview.Area.Item["EcommerceFacetsViewMode"].ToString() == "left" && Pageview.Device.ToString() != "Mobile") 157 { 158 <div class="grid__col-3"> 159 <div class="pre-render-element pre-render-element--xs"></div> 160 <div class="pre-render-element pre-render-element--md"></div> 161 <div class="pre-render-element pre-render-element--md"></div> 162 <div class="pre-render-element pre-render-element--md"></div> 163 </div> 164 } 165 <div class="grid__col-auto"> 166 <div class="pre-render-element pre-render-element--xs"></div> 167 <div class="pre-render-element pre-render-element--lg"></div> 168 <div class="pre-render-element pre-render-element--lg"></div> 169 <div class="pre-render-element pre-render-element--lg"></div> 170 <div class="pre-render-element pre-render-element--lg"></div> 171 </div> 172 </script> 173 174 <script id="ProductContainer" type="text/x-template"> 175 {{#each .}} 176 177 <div class="result_desc"> 178 <p>@Translate("We found","We found") {{count}} @Translate("products for","products for") <b>'{{multiSearchIndex}}'</b></p> 179 </div> 180 @if (Pageview.Area.Item["EcommerceFacetsViewMode"] != null && Pageview.Area.Item["EcommerceFacetsViewMode"].ToString() == "top" || Pageview.Device.ToString() == "Mobile") 181 { 182 183 <div id="desktop_facet"> 184 {{#if FacetGroups}} 185 <div class="grid__col-12"> 186 187 <div class="productList__tab-container"> 188 <div class="productList__info tabs"> 189 {{#FacetGroups}} 190 <input type="radio" name="PorductList__Facets" id="OptionsGroup_{{counter}}" class="tabs__trigger" {{showfirst}}/> 191 {{/FacetGroups}} 192 <div class="tabs__list dw-mod"> 193 {{#FacetGroups}} 194 <label class="tabs__label dw-mod" for="OptionsGroup_{{counter}}">{{name}}</label> 195 {{/FacetGroups}} 196 </div> 197 <div class="tabs__blocks dw-mod"> 198 {{#FacetGroups}} 199 <div class="tabs__block dw-mod"> 200 <section class="product__section paragraph-container paragraph-container--full-width product__section--bordered dw-mod"> 201 <div class="center-container dw-mod"> 202 <div class="tab-content"> 203 <div class="grid grid--external-bleed-x u-margin-bottom--lg"> 204 <ul> 205 {{#FacetOptions}} 206 {{#ifCond template "===" "Checkboxes"}} 207 {{>Checkboxes}} 208 {{/ifCond}} 209 {{/FacetOptions}} 210 </ul> 211 </div> 212 </div> 213 </div> 214 </section> 215 </div> 216 {{/FacetGroups}} 217 </div> 218 </div> 219 </div> 220 </div> 221 </div> 222 223 <div id="mobile_facet"> 224 <div class="grid__col-12"> 225 <input type="checkbox" id="CheckFacetGroups" class="facets-container-trigger js-remember-state" /> 226 <div class="filterBy_label">@Translate("Filter by","Filter by")</div> 227 <div class="grid grid--external-bleed-x facets-container dw-mod"> 228 <div class="MobileFecetDiv"> 229 {{#FacetGroups}} 230 <div class="MobileFacetBlock"> 231 <input type="checkbox" id="Mobile_Options_{{counter}}" class="MobileOptionsTrigger" /> 232 <div class="MobileFacetDIV"> 233 <label class="MobileFacetLabel" for="Mobile_Options_{{counter}}">{{name}}</label> 234 <ul class="MobileFacetList"> 235 {{#FacetOptions}} 236 {{#ifCond template "===" "Checkboxes"}} 237 {{>CheckboxesMobile}} 238 {{/ifCond}} 239 {{/FacetOptions}} 240 </ul> 241 <label class="MobileFacetLabelClose" for="Mobile_Options_{{counter}}"></label> 242 </div> 243 </div><span class="separateLine">|</span> 244 {{/FacetGroups}} 245 </div> 246 </div> 247 </div> 248 {{/if}} 249 </div> 250 } 251 252 @if (Pageview.Area.Item["EcommerceFacetsViewMode"] != null && Pageview.Area.Item["EcommerceFacetsViewMode"].ToString() == "left" && Pageview.Device.ToString() != "Mobile") 253 { 254 <div class="grid__col-3"> 255 @if (Pageview.Page.PropertyItem["LeftMenu"] != null && Pageview.Page.PropertyItem["LeftMenu"].ToString() == "True" && Pageview.Page.NavigationSettings != null && Pageview.Page.NavigationSettings.UseEcomGroups) 256 { 257 <h2 class="u-margin-bottom">@Translate("Product categories","Product categories")</h2> 258 259 <div class="u-padding-bottom--lg"> 260 @navigationMarkup 261 </div> 262 } 263 264 <!-- <h2>@Translate("Filters")</h2>--> 265 <input type="checkbox" id="CheckFacetGroups" class="facets-container-trigger js-remember-state" /> 266 <div class="facets-container dw-mod"> 267 {{#FacetGroups}} 268 <input type="checkbox" id="OptionsGroup_{{counter}}" class="expand-trigger js-remember-state" {{defaultState}} /> 269 270 <div class="expand-container facets-container__box dw-mod js-filter"> 271 <label class="expand-container__btn facets-container__header dw-mod" for="OptionsGroup_{{counter}}">{{name}}</label> 272 <div class="expand-container__content dw-mod"> 273 <div class="u-margin {{showFilter}}"> 274 <input type="text" class="u-full-width u-no-margin" onkeyup="Filter.FilterItems(event)" placeholder="@Translate("Search","Search")"/> 275 </div> 276 <div class="facets-container__list dw-mod"> 277 {{#FacetOptions}} 278 {{#ifCond template "===" "Checkboxes"}} 279 {{>Checkboxes}} 280 {{/ifCond}} 281 {{#ifCond template "===" "Range"}} 282 {{>Checkboxes}} 283 {{/ifCond}} 284 {{#ifCond template "===" "Weight"}} 285 {{>Checkboxes}} 286 {{/ifCond}} 287 {{#ifCond template "===" "Tags"}} 288 {{>Tags}} 289 {{/ifCond}} 290 {{#ifCond template "===" "Colors"}} 291 {{>Colors}} 292 {{/ifCond}} 293 {{/FacetOptions}} 294 </div> 295 </div> 296 </div> 297 {{/FacetGroups}} 298 </div> 299 <label for="CheckFacetGroups" class="btn btn--primary btn--full dw-mod facet-selector more">@Translate("Select filters","Select filters")</label> 300 <label for="CheckFacetGroups" class="btn btn--primary btn--full dw-mod facet-selector less">@Translate("Close filters","Close filters")</label> 301 </div> 302 } 303 304 305 306 <div class="grid__col-auto"> 307 308 @if (isFavoriteList) 309 { 310 string searchPlaceholder = Translate("Search favorite products", "Search favorite products"); 311 string searchValue = HttpContext.Current.Request.QueryString.Get("Search") != null ? HttpContext.Current.Request.QueryString.Get("Search") : ""; 312 <div class="grid--align-self-center grid__col--bleed grid__col-12 u-margin-bottom"> 313 <div class="typeahead u-margin u-color-inherit js-typeahead" data-page-size="10" id="FavoritesSearch" data-list-id="@listId" data-search-feed-id="@pageId&feed=true" data-result-page-id="@pageId"> 314 <input type="text" class="typeahead-search-field u-no-margin u-full-width js-typeahead-search-field" placeholder="@searchPlaceholder" value="@searchValue"> 315 <ul class="dropdown dropdown--absolute-position u-full-width js-handlebars-root js-typeahead-search-content u-min-w220px u-full-width dw-mod" id="FavoritesSearchContent" data-template="SearchContentTemplate" data-json-feed="@feedFullUrl&ListID=@listId" data-init-onload="false" data-preloader="minimal"></ul> 316 <button type="button" class="btn btn--condensed btn--primary u-no-margin dw-mod js-typeahead-enter-btn"><i class="fas fa-search"></i></button> 317 </div> 318 </div> 319 } 320 321 <div class="grid__cell"> 322 323 <div class="grid productList__header"> 324 325 326 @if (String.IsNullOrEmpty(System.Web.HttpContext.Current.Request["Search"])) 327 { 328 <div class="grid__col--bleed-y grid__col-md-auto productList__title"> 329 <h2 class="ProductList__Group-Name"><!--<i class="{{headerIcon}}">-->@Translate("Result Product","Result Product")</h2> 330 </div> 331 } 332 333 else{ 334 <div class="grid__col--bleed-y grid__col-md-auto productList__title"> 335 <h2 class="ProductList__Group-Name"><i class="{{headerIcon}}"></i> </h2> 336 </div> 337 338 } 339 340 <div class="grid--align-end grid__col--bleed-y grid__col-md-5 sm--item-center"> 341 <div class="collection u-no-margin ProductList_Sortby"> 342 @if (!hideSorting) 343 { 344 <h5 class="u-inline-block u-margin-right">@Translate("Sort by")</h5> 345 <input type="checkbox" id="ProductSort" class="dropdown-trigger" /> 346 <div class="dropdown u-w150px u-w125px--xs u-margin-right u-inline-block dw-mod"> 347 <label class="dropdown__header dropdown__btn dropdown__btn--small dw-mod" for="ProductSort">{{selectedSort}}</label> 348 <div class="dropdown__content dw-mod"> 349 <!--<div class="dropdown__item" onclick="HandlebarsBolt.UpdateContent('productList', '@feedFullUrl')">@Translate("Default")</div>--> 350 351 <!--<div class="dropdown__item" onclick="HandlebarsBolt.UpdateContent('productList', '@feedFullUrl&SortBy=Created&SortOrder=DESC')">@Translate("Newest")</div>--> 352 @if (!onlyPreview) 353 { 354 <!--<div class="dropdown__item" onclick="HandlebarsBolt.UpdateContent('productList', '@feedFullUrl&SortBy=BestSeller&SortOrder=DESC')">@Translate("Best Seller")</div> 355 <div class="dropdown__item" onclick="HandlebarsBolt.UpdateContent('productList', '@feedFullUrl&SortBy=BestSeller&SortOrder=ASC')">@Translate("Popularity")</div> 356 <div class="dropdown__item" onclick="HandlebarsBolt.UpdateContent('productList', '@feedFullUrl&SortBy=Price&SortOrder=ASC')">@Translate("Savings")</div> 357 <div class="dropdown__item" onclick="HandlebarsBolt.UpdateContent('productList', '@feedFullUrl&SortBy=Created&SortOrder=DESC')">@Translate("RecentlyAdded")</div>--> 358 <div class="dropdown__item" onclick="FilterSortBy('&SortBy=Price&SortOrder=ASC'); ">@Translate("Price low - high")</div> 359 <div class="dropdown__item" onclick="FilterSortBy('&SortBy=Price&SortOrder=DESC'); ">@Translate("Price high - low")</div> 360 <div class="dropdown__item" onclick="FilterSortBy('&SortBy=Brand&SortOrder=ASC'); ">@Translate("Brand A - Z")</div> 361 <div class="dropdown__item" onclick="FilterSortBy('&SortBy=Brand&SortOrder=DESC'); ">@Translate("Brand Z - A")</div> 362 363 } 364 </div> 365 <label class="dropdown-trigger-off" for="ProductSort"></label> 366 </div> 367 } 368 @if (listViewsCount > 1) 369 { 370 if (Converter.ToBoolean(Pageview.Area.Item["ProductItemContainer"])) 371 { 372 <input type="radio" class="tag-btn-trigger" id="ListViewBtnOne" name="ViewBtnGroup" @listViewSelected> 373 <label for="ListViewBtnOne" class="btn btn--tag" onclick="HandlebarsBolt.UpdateTemplate('ProductsContainer', 'ProductItemContainer')"><i class="fas fa-th-list"></i></label> 374 } 375 if (Converter.ToBoolean(Pageview.Area.Item["ProductGridItemContainer"])) 376 { 377 <input type="radio" class="tag-btn-trigger" id="ListViewBtnTwo" name="ViewBtnGroup" @gridViewSelected> 378 <label for="ListViewBtnTwo" class="btn btn--tag" onclick="HandlebarsBolt.UpdateTemplate('ProductsContainer', 'ProductGridItemContainer')"><i class="fas fa-th"></i></label> 379 } 380 if (Converter.ToBoolean(Pageview.Area.Item["ProductDetailsItemContainer"])) 381 { 382 <input type="radio" class="tag-btn-trigger" id="ListViewBtnThree" name="ViewBtnGroup" @detailsViewSelected> 383 <label for="ListViewBtnThree" class="btn btn--tag" onclick="HandlebarsBolt.UpdateTemplate('ProductsContainer', 'ProductDetailsItemContainer')"><i class="fas fa-list"></i></label> 384 } 385 } 386 387 @if (isFavoriteList) 388 { 389 <button type="submit" class="btn btn--primary btn--sm dw-mod">@Translate("Buy all") <i class="@cartIcon"></i></button> 390 } 391 </div> 392 </div> 393 </div> 394 395 <div id="ProductsContainer" data-template="{{listTemplate}}" class="grid product-list dw-mod" data-save-cookie="true"> 396 {{#ProductsContainer}} 397 {{#ifCond template "===" "ProductItemContainer"}} 398 {{>ProductItemContainer}} 399 {{/ifCond}} 400 {{#ifCond template "===" "ProductGridItemContainer"}} 401 {{>ProductGridItemContainer}} 402 {{/ifCond}} 403 {{#ifCond template "===" "ProductDetailsItemContainer"}} 404 {{>ProductDetailsItemContainer}} 405 {{/ifCond}} 406 {{/ProductsContainer}} 407 </div> 408 {{#ifCond nextPage "!==" ""}} 409 <div class="grid__col-12 grid__col--bleed-y"> 410 <button type="button" id="LoadMoreButton" class="btn btn--full loadmorebtn {{nextdisabled}}" data-current="{{currentPage}}" data-page-size="{{pageSize}}" data-total="{{totalPages}}" data-container="ProductsContainer" data-feed-url="@feedFullUrl&groupid=@groupID{{loadMoreFeedParams}}" onclick="LoadMore.Next(this)" {{nextdisabled}}>@Translate("Load") @Translate("more")</button> 411 <button type="button" style="dislay:none;"class="btn btn--clean Returnbtn" onclick="window.scroll(0, 0)">@Translate("Return to top")</button> 412 </div> 413 {{/ifCond}} 414 </div> 415 </div> 416 </div> 417 {{else}} 418 <div class="grid__col-12"> 419 <h2 class="u-ta-center">@Translate("Your search gave 0 results")</h2> 420 </div> 421 {{/each}} 422 </script> 423 424 @*Partial templates*@ 425 426 @*Facets*@ 427 428 <script id="Checkboxes" type="text/x-template"> 429 <li> 430 <label class="{{disabled}} checkbox-facet dw-mod" data-filter-value="{{label}}"> 431 <input type="checkbox" class="{{selected}} checkbox-facet__checkbox dw-mod" onclick="Facets.UpdateFacets(this); showHideHighlight();" name="{{queryParameter}}" value="{{value}}" {{selected}} {{disabled}}> 432 <span class="checkbox-facet__label dw-mod">{{label}}</span> 433 </label> 434 </li> 435 </script> 436 437 <script id="CheckboxesMobile" type="text/x-template"> 438 <li> 439 <label class="{{disabled}} checkbox-facet dw-mod" data-filter-value="{{label}}"> 440 <input type="checkbox" class="{{selected}} checkbox-facet__checkbox dw-mod" onclick="Facets.UpdateFacets(this); showHideHighlight();" name="{{queryParameter}}" value="{{value}}" {{selected}} {{disabled}}> 441 <span class="checkbox-facet__label dw-mod">{{label}}</span> 442 </label> 443 </li> 444 </script> 445 446 <script id="Tags" type="text/x-template"> 447 <button type="button" class="btn btn--tag {{selected}} {{disabled}}" data-filter-value="{{label}}" data-check="{{selected}}" onclick="Facets.UpdateFacets(this);" name="{{queryParameter}}" value="{{value}}" {{disabled}}> 448 {{label}} <span class="facets-group__counter">({{count}})</span> 449 </button> 450 </script> 451 452 <script id="Colors" type="text/x-template"> 453 <button type="button" class="btn btn--colorbox u-margin-right {{selected}} {{disabled}}" data-filter-value="{{label}}" style="background-color: {{value}}" title="{{label}}" data-check="{{selected}}" onclick="Facets.UpdateFacets(this);" name="{{queryParameter}}" value="{{value}}" {{disabled}}></button> 454 </script> 455 456 @*Facet selections*@ 457 <script id="SelectedFilter" type="text/x-template"> 458 <button type="button" class="btn btn--tag" data-check="checked" onclick="Facets.UpdateFacets(this);" name="{{queryParameter}}" value="{{value}}" title="@Translate("Remove filter")"> 459 {{group}}: {{label}} <i class="fas fa-times"></i> 460 </button> 461 </script> 462 463 <script id="SelectedColorFilter" type="text/x-template"> 464 <button type="button" class="btn btn--tag" data-check="checked" onclick="Facets.UpdateFacets(this);" name="{{queryParameter}}" value="{{value}}" title="@Translate("Remove filter")"> 465 {{group}}: <div class="btn__colorbox" style="background-color: {{label}}"></div> <i class="fas fa-times"></i> 466 </button> 467 </script> 468 469 <script id="ResetFilters" type="text/x-template"> 470 <button type="button" class="btn btn--tag" onclick="Facets.ResetFacets(this);"> 471 @Translate("Reset all filters") <i class="fas fa-redo"></i> 472 </button> 473 </script> 474 475 @* Product list templates *@ 476 477 @* List view *@ 478 479 <script id="ProductItemContainer" type="text/x-template"> 480 {{#.}} 481 <div id="Product{{id}}" class="grid__col-12 js-product" data-template="ProductItem" data-preloader="overlay"> 482 {{#Product}} 483 {{>ProductItem}} 484 {{/Product}} 485 </div> 486 {{/.}} 487 </script> 488 489 <script id="ProductItem" type="text/x-template"> 490 {{#.}} 491 <input type="hidden" name="ProductLoopCounter{{id}}" value="{{id}}" /> 492 <input type="hidden" name="ProductID{{id}}" value="{{productId}}" /> 493 <input type="hidden" value="{{variantid}}" name="VariantID{{id}}" id="Variant_{{id}}" /> 494 495 <div class="grid product-list__list-item dw-mod"> 496 <div class="grid__col-md-4 {{noImage}} product-list__list-item__left u-color-light--bg dw-mod"> 497 <div class="stickers-container dw-mod"> 498 {{#Stickers}} 499 {{>Sticker}} 500 {{/Stickers}} 501 </div> 502 <div class="grid__cell"> 503 <a href="{{link}}" onclick="Scroll.SavePosition(event)"><img class="grid__cell-img grid__cell-img--centered b-lazy" src="/Admin/Public/GetImage.ashx?width=300&amp;height=300&amp;crop=5&amp;Compression=75&amp;DoNotUpscale=true&amp;FillCanvas=true&amp;image=/Files/Images/placeholder.gif" data-src="/Admin/Public/GetImage.ashx?width=300&amp;height=300&amp;crop=5&amp;Compression=75&amp;DoNotUpscale=true&amp;FillCanvas=true&amp;image={{image}}" alt="{{name}}" /></a> 504 </div> 505 </div> 506 <div class="grid__col-md-auto product-list__list-item__right dw-mod"> 507 <div> 508 <div class="u-pull--left"> 509 <a href="{{link}}" onclick="Scroll.SavePosition(event)" title="{{name}}"><h2 class="u-no-margin">{{name}}</h2></a> 510 <div class="item-number dw-mod">{{number}}</div> 511 </div> 512 @if(listViewShowListButton){ 513 <div class="favorites u-pull--right {{hasVariants}} dw-mod" {{hasVariants}}> 514 {{#Favorite}} 515 {{>FavoriteTemplate}} 516 {{/Favorite}} 517 </div> 518 } 519 </div> 520 521 <div class="grid__cell"> 522 {{{description}}} 523 </div> 524 525 @if (listViewShowCartButton) { 526 <div data-template="VariantsTemplate" class="js-variants grid__cell" data-combinations="{{combinationsStringArray}}" data-variants="{{variantsStringArray}}" data-variant-selections="{{variantSelections}}" data-total-variant-groups="{{variantGroupsCount}}" data-selection-complete="UpdateData" data-page-id="@pageId" data-product-id="{{productId}}"> 527 {{#Variants}} 528 {{>VariantsTemplate}} 529 {{/Variants}} 530 </div> 531 <small class="js-help-text help-text {{hideViewMore}} {{hideHelpText}}">@Translate("Please select variant!")</small> 532 } 533 534 @if (!onlyPreview) 535 { 536 <div class="grid__cell-footer"> 537 <div class="grid__cell"> 538 <div class="product-list__list-item__price-actions dw-mod"> 539 <div class="u-margin-bottom"> 540 <div class="before-price {{onSale}} dw-mod b-price">{{discount}}</div> 541 <div class="price price--product-list dw-mod">{{price}}</div> 542 </div> 543 544 @if (listViewShowCartButton) 545 { 546 <div class="buttons-collection buttons-collection--right"> 547 <button type="button" id="CartButton_{{id}}" class="js-cart-btn btn btn--primary btn--condensed u-pull--right dw-mod {{hasVariants}}" name="submit" onclick="Cart.AddToCart(event, '{{productId}}', document.getElementById('Quantity_{{id}}').value, 'Unit_{{id}}', 'Variant_{{id}}');" {{hasVariants}}><i class="@cartIcon"></i><span class="u-hidden-xs u-hidden-xxs"> @Translate("Add to cart")</span></button> 548 <input type="number" class="u-w80px u-pull--right" id="Quantity_{{id}}" name="Quantity{{id}}" value="1" min="1"> 549 550 <input type="checkbox" id="UnitOptions_{{id}}" class="dropdown-trigger" /> 551 <div class="dropdown u-w110px u-w100px--xs {{hasUnits}} dw-mod"> 552 <label class="dropdown__header dropdown__btn dw-mod" for="UnitOptions_{{id}}">{{unitName}}</label> 553 <div id="unitOptions" class="dropdown__content dw-mod"> 554 {{#unitOptions}} 555 {{>UnitOption}} 556 {{/unitOptions}} 557 </div> 558 <label class="dropdown-trigger-off" for="UnitOptions_{{id}}"></label> 559 </div> 560 <input type="hidden" value="{{unitId}}" name="Unit{{id}}" id="Unit_{{id}}" /> 561 </div> 562 } 563 else if (listViewShowViewButton) 564 { 565 <div class="buttons-collection buttons-collection--right"> 566 <a href="{{link}}" id="CartButton_{{id}}" class="btn btn--secondary btn--full u-no-margin dw-mod">{{viewMoreText}}</a> 567 </div> 568 } 569 </div> 570 </div> 571 </div> 572 } 573 else 574 { 575 <button type="button" id="CartButton_{{id}}" class="u-hidden"></button> 576 } 577 </div> 578 </div> 579 {{/.}} 580 </script> 581 582 @* Grid view *@ 583 584 <script id="ProductGridItemContainer" type="text/x-template"> 585 {{#.}} 586 <div id="Product{{id}}" data-template="ProductGridItem" class="grid__col-lg-@gridViewColumns grid__col-md-@gridViewColumns grid__col-sm-@gridViewColumns grid__col-xs-6 product-list__grid-item dw-mod"> 587 {{#Product}} 588 {{>ProductGridItem}} 589 {{/Product}} 590 </div> 591 {{/.}} 592 </script> 593 594 <script id="ProductGridItem" type="text/x-template"> 595 {{#.}} 596 <div class="ProductList__item"> 597 <input type="hidden" name="ProductLoopCounter{{id}}" value="{{id}}" /> 598 <input type="hidden" name="ProductID{{id}}" value="{{productId}}" /> 599 <div class="grid__cell product-list__grid-item__image dw-mod {{noImage}}"> 600 <div class="stickers-container u-padding dw-mod"> 601 {{#Stickers}} 602 {{>Sticker}} 603 {{/Stickers}} 604 </div> 605 <a href="{{link}}" onclick="Scroll.SavePosition(event)"> 606 <img class="grid__cell-img grid__cell-img--centered u-padding b-lazy" src="/Files/Images/placeholder.gif" data-src="/Admin/Public/GetImage.ashx?width=300&amp;height=300&amp;crop=5&amp;Compression=75&amp;DoNotUpscale=true&amp;image={{image}}" alt="{{name}}" /> 607 {{#ifCond preOrderdays ">" "0"}} 608 <div class="preorderList_rbn"><text>@Translate("Preorder"){{preOrderdays}}@Translate("Days")</text></div> 609 {{/ifCond}} 610 </a> 611 @if(gridViewShowListButton){ 612 <div class="favorites favorites--for-grid-view u-pull--right {{hasVariants}} dw-mod" {{hasVariants}}> 613 {{#Favorite}} 614 {{>FavoriteTemplate}} 615 {{/Favorite}} 616 </div> 617 } 618 </div> 619 620 <div class="grid__cell product-list__grid-item__price-info {{shortGridInfo}} dw-mod"> 621 <div class="product-list__price-info-block"> 622 <div class="product-list__company-name">{{itemGroup}}</div> 623 <a href="{{link}}" onclick="Scroll.SavePosition(event)" title="{{name}}"> 624 <h6 class="FGX_productName">{{name}}</h6> 625 <div class="product-list__pack-size">{{packSize}}</div> 626 </a> 627 </div> 628 <!-- <div class="item-number dw-mod">{{number}}</div> --> 629 630 @if (!onlyPreview) 631 { 632 <div class="showPrices"> 633 <div class="price price--product-list dw-mod"> 634 <span>{{price}}</span> 635 <div class="before-price {{onSale}} dw-mod b-price">{{discount}}</div> 636 </div> 637 638 639 <div class="prod_unit"> 640 <div class="unit_lbl unit">@Translate("SELECT UNIT")</div> 641 <select class="unit_select" onchange="HandlebarsBolt.UpdateContent('Product{{id}}', this.value )"> 642 {{#unitOptions}} 643 {{>UnitOption}} 644 {{/unitOptions}} 645 </select> 646 647 </div> 648 </div> 649 } 650 <input type="hidden" value="{{unitId}}" name="Unit{{id}}" id="Unit_{{id}}" /> 651 <input type="hidden" value="{{variantid}}" name="VariantID{{id}}" id="Variant_{{id}}" /> 652 </div> 653 654 <div class="product-list__grid-item__footer dw-mod"> 655 @if (!onlyPreview && gridViewShowCartButton) 656 { 657 <div class="u-ta-center u-inline-block u-full-width"> 658 <div class="buttons-collection {{hideBuyOptions}} {{productId}}_product"> 659 660 {{#ifCond orderLineId "!==" ""}} 661 <button type="button" id="CartButton_{{id}}" class="btn productdetail_cart btn--condensed u-full-width {{hasVariants}} u-hidden CartButton_{{id}}" name="submit" onclick="Cart2.AddToCart(event, '{{id}}', '{{productId}}', document.getElementById('Quantity_{{id}}').value, 'Unit_{{id}}', 'Variant_{{id}}');" {{hasVariants}}><i class="@cartIcon shop-cart" ></i>@Translate("Add to cart","Add to cart")<span class="u-visible-xs u-visible-xxs"> @cartButtonText</span></button> 662 <div id="" class="grid__cell quantity_box Qty_Box_{{id}} {{notOutOfStockText}}"> 663 <div class="grid"> 664 <input type="hidden" class="{{productId}}_orderline" value="{{orderLineId}}" /> 665 <button type="button" class="btn u-no-margin grid__col-3 ProductList__Adjust" onclick="productListChangeQty(this, {{id}})">-</button> 666 <input type="text" class="grid__col-6 ProductList__quantity" id="Quantity_{{id}}" name="Quantity{{id}}" onchange="QuantityChange(this, {{id}}, document.getElementsByClassName('{{productId}}_orderline')[0].value)" value="{{quantityInCart}}" min="0" onkeypress="return restrictAlphabets(event)"/> 667 <button type="button" class="btn u-no-margin grid__col-3 ProductList__Adjust" onclick="productListChangeQty(this, {{id}})">+</button> 668 </div> 669 </div> 670 {{else}} 671 <button type="button" id="CartButton_{{id}}" class="btn productdetail_cart btn--condensed u-full-width {{hasVariants}} CartButton_{{id}} {{notOutOfStockText}}" name="submit" onclick="Cart2.AddToCart(event, '{{id}}', '{{productId}}', document.getElementById('Quantity_{{id}}').value, 'Unit_{{id}}', 'Variant_{{id}}');" {{hasVariants}}><i class="@cartIcon shop-cart"></i>@Translate("Add to cart","Add to cart")<span class="u-visible-xs u-visible-xxs"> @cartButtonText</span></button> 672 <div id="" class="grid__cell quantity_box u-hidden Qty_Box"> 673 <div class="grid"> 674 <input type="hidden" class="{{productId}}_orderline" value="" /> 675 <button type="button" class="btn u-no-margin grid__col-3 ProductList__Adjust" onclick="productListChangeQty(this, {{id}})">-</button> 676 <input type="text" class="grid__col-6 ProductList__quantity" id="Quantity_{{id}}" name="Quantity{{id}}" onchange="QuantityChange(this, {{id}}, document.getElementsByClassName('{{productId}}_orderline')[0].value)" value="1" min="0" onkeypress="return restrictAlphabets(event)"/> 677 <button type="button" class="btn u-no-margin grid__col-3 ProductList__Adjust" onclick="productListChangeQty(this, {{id}})">+</button> 678 </div> 679 </div> 680 {{/ifCond}} 681 <button value="" type="button" class='btn productdetail_outOfStock btn--condensed u-full-width {{outOfStockText}} disable'><i class="fal fa-times-square"></i> @Translate("Out of Stock","Out of Stock")</button> 682 </div> 683 </div> 684 if (gridViewShowViewButton) 685 { 686 <div class="u-ta-center {{hideViewMore}}"> 687 <a href="{{link}}" id="CartButton_{{id}}" class="btn btn--secondary btn--full u-no-margin dw-mod">{{viewMoreText}}</a> 688 </div> 689 } 690 691 } 692 else if (gridViewShowViewButton) 693 { 694 <div class="u-ta-center"> 695 <a href="{{link}}" id="CartButton_{{id}}" class="btn btn--secondary btn--full u-no-margin dw-mod">{{viewMoreText}}</a> 696 </div> 697 } 698 699 @if (!onlyPreview && gridViewShowStock) 700 { 701 <div> 702 <span class="stock-icon {{stockState}} u-no-margin dw-mod" title="{{stockText}}"></span> {{stockText}}{{deliveryText}} 703 </div> 704 } 705 </div> 706 </div> 707 708 {{/.}} 709 </script> 710 711 @* Details view *@ 712 713 <script id="ProductDetailsItemContainer" type="text/x-template"> 714 {{#.}} 715 <div id="Product{{id}}" data-template="ProductDetailsItem" data-preloader="overlay" class="grid__col-md-12 product-list__details-item grid--direction-row grid--justify-space-between dw-mod" style="z-index: {{zIndex}}"> 716 {{#Product}} 717 {{>ProductDetailsItem}} 718 {{/Product}} 719 </div> 720 {{/.}} 721 </script> 722 723 <script id="ProductDetailsItem" type="text/x-template"> 724 {{#.}} 725 <input type="hidden" name="ProductLoopCounter{{id}}" value="{{id}}" /> 726 <input type="hidden" name="ProductID{{id}}" value="{{productId}}" /> 727 728 <div class="product-list__details-item__left grid__cell dw-mod"> 729 @if (detailsViewShowImage) 730 { 731 <div class="lightbox u-hidden-xxs"> 732 <a href="{{link}}" onclick="Scroll.SavePosition(event)"> 733 <img class="lightbox__image {{noImage}}" src="/Admin/Public/GetImage.ashx?width=220&amp;height=220&amp;crop=5&amp;Compression=75&amp;image={{image}}" alt="{{name}}" /> 734 <div class="u-margin-right {{noImage}}"> 735 <img src="/Admin/Public/GetImage.ashx?width=75&amp;height=55&amp;crop=5&FillCanvas=true&amp;Compression=75&amp;image={{image}}" alt="{{name}}" /> 736 </div> 737 </a> 738 </div> 739 } 740 <div class="u-margin-left u-margin-right"> 741 <a href="{{link}}" onclick="Scroll.SavePosition(event)" title="{{name}}"><h6 class="u-no-margin">{{name}}</h6></a> 742 <div class="item-number item-number--compressed dw-mod"> 743 {{number}} 744 @if (!onlyPreview) 745 { 746 <span> 747 <span class="stock-icon {{stockState}} u-no-margin dw-mod" title="{{stockText}}"></span> {{stockText}}{{deliveryText}} 748 </span> 749 } 750 <div class="grid__cell-footer stickers-container stickers-container--block dw-mod"> 751 {{#Stickers}} 752 {{>MiniSticker}} 753 {{/Stickers}} 754 </div> 755 </div> 756 </div> 757 </div> 758 <div class="product-list__details-item__right grid__cell dw-mod"> 759 @if (!onlyPreview && Pageview.Device.ToString() == "Mobile") 760 { 761 <div class="u-full-width u-ta-right u-padding-right"> 762 <div class="before-price {{onSale}} before-price--micro dw-mod b-price">{{discount}}</div> 763 <div class="price price--product-list price--micro dw-mod">{{price}}</div> 764 </div> 765 } 766 @if (!onlyPreview && detailsViewShowCartButton) 767 { 768 <div class="u-margin-right"> 769 <input type="checkbox" id="UnitOptions_{{id}}" class="dropdown-trigger" /> 770 <div class="dropdown u-w120px {{hasUnits}} dw-mod"> 771 <label class="dropdown__header dropdown__btn dw-mod" for="UnitOptions_{{id}}">{{unitName}}</label> 772 <div id="unitOptions" class="dropdown__content dw-mod"> 773 {{#unitOptions}} 774 {{>UnitOption}} 775 {{/unitOptions}} 776 </div> 777 <label class="dropdown-trigger-off" for="UnitOptions_{{id}}"></label> 778 </div> 779 <input type="hidden" value="{{unitId}}" name="Unit{{id}}" id="Unit_{{id}}" /> 780 <input type="hidden" value="{{variantid}}" name="VariantID{{id}}" id="Variant_{{id}}" /> 781 </div> 782 } 783 @if (!onlyPreview && Pageview.Device.ToString() != "Mobile") 784 { 785 <div class="u-min-w120px"> 786 <div class="u-full-width u-ta-right u-padding-right"> 787 <div class="before-price {{onSale}} before-price--micro dw-mod">{{discount}}</div> 788 <div class="price price--product-list price--micro dw-mod">{{price}}</div> 789 </div> 790 </div> 791 } 792 @if (!onlyPreview && detailsViewShowCartButton) 793 { 794 <div class="{{hideBuyOptions}}"> 795 <input type="number" class="u-w80px u-no-margin u-margin-right" id="Quantity_{{id}}" name="Quantity{{id}}" value="1" min="1"> 796 </div> 797 <div class="{{hideBuyOptions}}"> 798 <button type="button" id="CartButton_{{id}}" class="btn btn--primary btn--condensed u-no-margin dw-mod {{hasVariants}}" name="submit" onclick="Cart.AddToCart(event, '{{productId}}', document.getElementById('Quantity_{{id}}').value, 'Unit_{{id}}', 'Variant_{{id}}');" {{hasVariants}}><i class="@cartIcon"></i></button> 799 </div> 800 if (detailsViewShowViewButton) { 801 <div class="{{hideViewMore}}"> 802 <a href="{{link}}" class="btn btn--secondary u-no-margin u-w133px dw-mod" onclick="Scroll.SavePosition(event)" title="{{name}}">{{viewMoreText}}</a> 803 </div> 804 } 805 } 806 else if (detailsViewShowViewButton) 807 { 808 <div> 809 <a href="{{link}}" class="btn btn--secondary u-no-margin u-w133px dw-mod" onclick="Scroll.SavePosition(event)" title="{{name}}">{{viewMoreText}}</a> 810 </div> 811 } 812 813 @if(detailsViewShowListButton){ 814 <div class="favorites u-margin {{hasVariants}} dw-mod" {{hasVariants}}> 815 {{#Favorite}} 816 {{>FavoriteTemplate}} 817 {{/Favorite}} 818 </div> 819 820 <div class="favorites favorites--lg u-hidden {{hasVariants}} u-hidden-xs u-hidden-xxs dw-mod" {{hasVariants}}> 821 {{#Favorite}} 822 {{>FavoriteListItem}} 823 {{/Favorite}} 824 </div> 825 } 826 </div> 827 {{/.}} 828 </script> 829 830 <!--<script id="Sticker" type="text/x-template"> 831 <div class="stickers-container__tag {{className}} dw-mod">{{text}}</div> 832 </script>--> 833 834 <script id="Sticker" type="text/x-template"> 835 <div class="stickers-container__tag stickers-container__tag--custom dw-mod">{{text}}</div> 836 </script> 837 <script id="MiniSticker" type="text/x-template"> 838 <div class="stickers-container__tag stickers-container__tag--micro {{className}} dw-mod">{{text}}</div> 839 </script> 840 841 @* Units templates *@ 842 843 <script id="UnitOption" type="text/x-template"> 844 <option value="{{link}}&feed=true&UnitID={{value}}&rid={{id}}" {{selected}}>{{name}}</option> 845 846 </script> 847 848 @* Variants templates *@ 849 850 <script id="VariantsTemplate" type="text/x-template"> 851 {{#.}} 852 <div> 853 <div class="u-bold">{{name}}</div> 854 <div> 855 {{#VariantOptions}} 856 {{>VariantOption}} 857 {{/VariantOptions}} 858 </div> 859 </div> 860 {{/.}} 861 </script> 862 863 864 <script id="VariantOption" type="text/x-template"> 865 <button type="button" data-variant-id="{{variantId}}" data-variant-group="{{groupId}}" onclick="MatchVariants.SelectThis(event)" class="btn btn--tag {{disabled}} {{selected}} js-variant-option" data-check="{{selected}}" {{disabled}}>{{name}}</button> 866 </script> 867 868 <script id="VariantOptionImage" type="text/x-template"> 869 <img data-variant-id="{{variantId}}" data-friends="{{friendsList}}" data-variant-group="{{groupId}}" onclick="MatchVariants.SelectThis(event)" src="/Admin/Public/GetImage.ashx?width=100&amp;height=50&amp;crop=5&amp;Compression=75&amp;image=/Images/{{image}}" alt="{{name}}" title="{{name}}" class="btn btn--tag {{disabled}} {{selected}} js-variant-option" data-check="{{selected}}" {{disabled}} /> 870 </script> 871 872 873 @* Favorites templates *@ 874 875 <script id="FavoriteTemplate" type="text/x-template"> 876 <div class="favorites-list u-ta-left"> 877 <label for="FavoriteTrigger_{{id}}" class="u-no-margin js-favorite-btn"><i class="{{favoriteIcon}} fa-1_5x"></i></label> 878 <input type="checkbox" id="FavoriteTrigger_{{id}}" class="dropdown-trigger" /> 879 <div class="dropdown dropdown--absolute-position"> 880 <div class="dropdown__content dropdown__content--show-left dropdown__content--padding u-w220px dw-mod"> 881 <ul class="list list--clean dw-mod"> 882 {{#FavoriteLists}} 883 {{>FavoriteListItem}} 884 {{/FavoriteLists}} 885 </ul> 886 </div> 887 <label class="dropdown-trigger-off" for="FavoriteTrigger_{{id}}"></label> 888 </div> 889 </div> 890 </script> 891 892 <script id="FavoriteListItem" type="text/x-template"> 893 <li> 894 <a href="{{link}}" class="list__link u-no-underline dw-mod"><i class="{{favoriteIcon}}"></i> {{name}}</a> 895 </li> 896 </script> 897 898 <style> 899 div#content{ 900 margin-top: 0px; 901 } 902 </style> 903 904 905 <script> 906 document.addEventListener("DOMContentLoaded", function (event) { 907 Facets.Init("productList", '@productCatalogId', '@requestQuery'); 908 909 document.getElementById("productList").addEventListener('contentLoaded', function (e) { 910 if (e.srcElement.id === "productList") { 911 Search.Init(); 912 if($("#headerBanner").hasClass( "u-hidden" )) 913 { 914 915 $("#headerBanner").removeClass( "u-hidden" ); 916 $("#productList").removeClass( "u-hidden" ); 917 } 918 } 919 }, false); 920 921 showHideHighlight(); 922 923 924 925 }); 926 927 function AddToCartBtn(btn){ 928 $(btn).hide(); 929 $(btn).parent().find('.cart_qty').show(); 930 } 931 932 933 function Quant(q){ 934 935 var inputBox = $(q).parent().find("input"); 936 var qty = $(inputBox).val(); 937 var action = $(q).attr("class"); 938 if (action == "qty_minus" && qty > 0) 939 qty--; 940 941 if (action == "qty_plus") 942 qty++; 943 944 945 if (qty == 0){ 946 947 $(".cart_qty").hide(); 948 $(".cart_btn").show(); 949 950 } 951 952 $(inputBox).val(qty); 953 } 954 955 function showHideHighlight(){ 956 957 var highlight = ''; 958 if( document.getElementById('HighlightOfTheWeek') ){ 959 highlight = document.getElementById('HighlightOfTheWeek'); 960 var url = window.location.href; 961 var query = ''; 962 if ( url.indexOf('?') > -1 ){ 963 highlight.style.display = 'none'; 964 }else{ 965 $(highlight).show(); 966 } 967 } 968 969 } 970 971 function multiSearchSelect(item, searchItem){ 972 973 var li = item.parentElement; 974 var ul = li.parentElement; 975 var liList = ul.children; 976 //if( li.classList.contains('active_tab') == false){ 977 for( var i = 0 ; i < liList.length ; i++ ){ 978 if( liList[i].classList.contains('active_tab') ){ 979 liList[i].classList.remove('active_tab'); 980 } 981 } 982 983 li.classList.add('active_tab'); 984 985 var url = document.getElementById('productList').getAttribute('data-json-feed'); 986 var newUrl = ''; 987 988 var toReplace = url.split('MultiSearch=')[1].split('&')[0]; 989 newUrl = url.replace( toReplace, searchItem ); 990 991 var subIndex = 'MultiSearch='+searchItem; 992 993 newUrl = newUrl.substring(0, newUrl.indexOf(subIndex) + subIndex.length ) + "&feed=true"; 994 995 _requestQuery = '?' + newUrl.split('?')[1]; 996 997 document.getElementById('productList').setAttribute('data-json-feed', newUrl ); 998 999 var cURL = window.location.href; 1000 var c1 = cURL.split('MultiSearch=')[1].split('&')[0]; 1001 cURL = cURL.replace('MultiSearch='+c1, 'MultiSearch='+searchItem); 1002 1003 cURL = cURL.substring(0, cURL.indexOf(subIndex) + subIndex.length ); 1004 window.history.pushState(null, null, cURL); 1005 1006 1007 1008 HandlebarsBolt.UpdateContent('productList', document.getElementById('productList').getAttribute('data-json-feed') ); 1009 //} 1010 } 1011 1012 function FilterSortBy(filterOption){ 1013 var url = window.location.href; 1014 if(url.includes("?")) 1015 { 1016 url = url + filterOption.replace('?','&') + '&feed=true'; 1017 } 1018 else 1019 { 1020 url = url + filterOption+ '&feed=true'; 1021 } 1022 1023 HandlebarsBolt.UpdateContent( 'productList', url ); 1024 } 1025 1026 </script> 1027 <script type="text/javascript"> 1028 function restrictAlphabets(e){ 1029 var iKeyCode = (e.which) ? e.which : e.keyCode 1030 if (iKeyCode != 46 && iKeyCode > 31 && (iKeyCode < 48 || iKeyCode > 57)) 1031 { return false;} 1032 else{ 1033 return true;} 1034 } 1035 </script>