local_shippingBestil før kl. 13 og du modtager pakken i morgen!
Error executing template "Designs/Rapido/eCom/Productlist/ProductsRender.cshtml"
System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
   at System.ThrowHelper.ThrowKeyNotFoundException()
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at CompiledRazorTemplates.Dynamic.RazorEngine_f664d8ef51374c948aba4de89ac87116.Execute() in D:\DynamicWeb\Solutions\fleggaard-homeparts\Files\Templates\Designs\Rapido\eCom\Productlist\ProductsRender.cshtml:line 317
   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.Web.Script.Serialization; 10 @using System.Linq 11 @using System.Text.RegularExpressions; 12 @using Dynamicweb.Ecommerce.Products; 13 @using Dynamicweb.Ecommerce; 14 @using Dynamicweb.Data; 15 @using HomeParts.CustomModules.Helpers; 16 17 @{ 18 string pageUrl = GetGlobalValue("Global:Pageview.Url.Raw"); 19 20 string search = HttpContext.Current.Request.QueryString.Get("Search"); 21 string search2 = HttpContext.Current.Request.QueryString.Get("search2"); 22 string AppSearch = HttpContext.Current.Request.QueryString.Get("SearchAppliance"); 23 string aswoSearchFeed = ""; 24 string brand = HttpContext.Current.Request.QueryString.Get("brand"); 25 string vgruppe = HttpContext.Current.Request.QueryString.Get("vgruppe"); 26 string applianceSearchFeed = ""; 27 string appliancePage = "/Default.aspx?ID=" + GetPageIdByNavigationTag("AppliancePage") + "&Search=" + search; 28 string productsPage = "/Default.aspx?ID=" + GetPageIdByNavigationTag("ProductPage") + "&Search=" + search; 29 string aswovgroup = HttpContext.Current.Request.QueryString.Get("aswovgroup"); 30 31 List<string> aswoDWValidated = new List<string>(); 32 Dictionary<string, string> aswoPids; 33 string cleanProductsPage = "/Default.aspx?ID=" + GetPageIdByNavigationTag("ApplianceSearch") + "&SearchAppliance="; 34 string appName = HttpContext.Current.Request.QueryString.Get("AppName"); 35 string geraeteart = HttpContext.Current.Request.QueryString.Get("geraeteart"); 36 var searching = "right-alignment"; 37 var customApplicancePage = false; 38 39 if (Pageview.Page.PropertyItem["ApplianceNumber"] != null && Pageview.Page.PropertyItem["ApplianceName"] != null) 40 { 41 AppSearch = Pageview.Page.PropertyItem["ApplianceNumber"].ToString(); 42 appName = Pageview.Page.PropertyItem["ApplianceName"].ToString(); 43 customApplicancePage = true; 44 } 45 46 if (System.Web.HttpContext.Current.Items.Contains("aswoSorting")) 47 { 48 aswoPids = (Dictionary<string, string>)System.Web.HttpContext.Current.Items["aswoSorting"]; 49 } 50 else 51 { 52 aswoPids = new Dictionary<string, string>(); 53 } 54 if (!string.IsNullOrWhiteSpace(AppSearch)) 55 { 56 searching = ""; 57 } 58 if (!string.IsNullOrWhiteSpace(search)) 59 { 60 searching = ""; 61 62 var pageNumber = 1; 63 try 64 { 65 pageNumber = Int32.Parse(Dynamicweb.Context.Current.Request["ASWO_pageNumber"]); 66 } 67 catch 68 { 69 70 } 71 72 73 74 var searchKey = ""; 75 if (search.Length > 2) 76 { 77 searchKey = AswoHelper.Connector.ArticleSearch(AswoHelper.GetCurrentOrNewSessionId(), search, "", 50, pageNumber, true, "", ""); 78 } 79 80 var searchArt = AswoHelper.Connector.ArticleSearch(AswoHelper.GetCurrentOrNewSessionId(), "", search, 50, pageNumber, true, "", ""); 81 //var result = Newtonsoft.Json.JsonConvert.SerializeObject(search); 82 83 string json = searchKey; 84 string jsonArt = searchArt; 85 string result1 = ""; 86 List<string> productnumbers = new List<string>(); 87 List<string> changedProducts = new List<string>(); 88 Dynamicweb.Ecommerce.Products.ProductService service = new Dynamicweb.Ecommerce.Products.ProductService(); 89 90 91 if (!string.IsNullOrWhiteSpace(searchKey)) 92 { 93 JavaScriptSerializer jsonSerializer = new JavaScriptSerializer(); 94 dynamic dobj = jsonSerializer.Deserialize<dynamic>(json); 95 96 97 98 foreach (System.Collections.Generic.KeyValuePair<string, object> treffer in dobj["treffer"]) 99 { 100 101 //result1 += treffer.Key + " / " + treffer.Value; 102 var value = treffer.Value as System.Collections.Generic.Dictionary<string, object>; 103 if (!aswoPids.ContainsKey(value["artikelnummer"].ToString())) 104 { 105 aswoPids.Add(value["artikelnummer"].ToString(), treffer.Key.ToString()); 106 } 107 108 109 Dynamicweb.Ecommerce.Products.Product product = service.GetProductById(value["artikelnummer"].ToString(), "", true); 110 if (product != null) 111 { 112 if (value["bestellbar"].ToString() == "N" && product.IsActive && !changedProducts.Contains(product.Id)) 113 { 114 product.Active = false; 115 changedProducts.Add(product.Id); 116 } 117 else if (value["bestellbar"].ToString() == "J" && !product.IsActive && !changedProducts.Contains(product.Id)) 118 { 119 product.Active = true; 120 changedProducts.Add(product.Id); 121 } 122 //product.Save(); 123 } 124 productnumbers.Add(value["artikelnummer"].ToString()); 125 } 126 127 128 129 int totalPages = int.Parse(dobj["anzahlseiten"].ToString()); 130 int page = int.Parse(dobj["seite"].ToString()); 131 132 133 134 if (totalPages > page) 135 { 136 for (int i = page; i < totalPages; i++) 137 { 138 var products = AswoHelper.Connector.ArticleSearch(AswoHelper.GetCurrentOrNewSessionId(), search, "", 50, i + 1, true, "", ""); 139 string productsJson = products; 140 JavaScriptSerializer jsonSerializer1 = new JavaScriptSerializer(); 141 dynamic dobj1 = jsonSerializer1.Deserialize<dynamic>(productsJson); 142 foreach (System.Collections.Generic.KeyValuePair<string, object> treffer1 in dobj1["treffer"]) 143 { 144 145 //result1 += treffer.Key + " / " + treffer.Value; 146 var value1 = treffer1.Value as System.Collections.Generic.Dictionary<string, object>; 147 if (!aswoPids.ContainsKey(value1["artikelnummer"].ToString())) 148 { 149 aswoPids.Add(value1["artikelnummer"].ToString(), treffer1.Key.ToString()); 150 } 151 152 153 Dynamicweb.Ecommerce.Products.Product product = service.GetProductById(value1["artikelnummer"].ToString(), "", true); 154 if (product != null) 155 { 156 if (value1["bestellbar"].ToString() == "N" && product.IsActive && !changedProducts.Contains(product.Id)) 157 { 158 product.Active = false; 159 changedProducts.Add(product.Id); 160 } 161 else if (value1["bestellbar"].ToString() == "J" && !product.IsActive && !changedProducts.Contains(product.Id)) 162 { 163 product.Active = true; 164 changedProducts.Add(product.Id); 165 } 166 //product.Save(); 167 } 168 productnumbers.Add(value1["artikelnummer"].ToString()); 169 } 170 171 } 172 } 173 //result1 = String.Join(",", productnumbers); 174 if (changedProducts.Count > 0) 175 { 176 Dynamicweb.Ecommerce.Indexing.ProductIndexBuilderService.Build("Fleggaard Products", "Ecommerce.index", changedProducts); 177 } 178 } 179 180 System.Web.HttpContext.Current.Items["aswoSorting"] = aswoPids; 181 182 if (!string.IsNullOrWhiteSpace(searchArt)) 183 { 184 185 JavaScriptSerializer jsonSerializer = new JavaScriptSerializer(); 186 dynamic dobj = jsonSerializer.Deserialize<dynamic>(jsonArt); 187 188 189 foreach (System.Collections.Generic.KeyValuePair<string, object> treffer in dobj["treffer"]) 190 { 191 192 //result1 += treffer.Key + " / " + treffer.Value; 193 var value = treffer.Value as System.Collections.Generic.Dictionary<string, object>; 194 Dynamicweb.Ecommerce.Products.Product product = service.GetProductById(value["artikelnummer"].ToString(), "", true); 195 if (product != null) 196 { 197 if (value["bestellbar"].ToString() == "N" && product.IsActive && !changedProducts.Contains(product.Id)) 198 { 199 product.Active = false; 200 changedProducts.Add(product.Id); 201 } 202 else if (value["bestellbar"].ToString() == "J" && !product.IsActive && !changedProducts.Contains(product.Id)) 203 { 204 product.Active = true; 205 changedProducts.Add(product.Id); 206 } 207 //product.Save(); 208 } 209 if (!productnumbers.Contains(value["artikelnummer"].ToString())) 210 { 211 productnumbers.Add(value["artikelnummer"].ToString()); 212 } 213 214 } 215 216 217 218 int totalPages = int.Parse(dobj["anzahlseiten"].ToString()); 219 int page = int.Parse(dobj["seite"].ToString()); 220 221 222 223 if (totalPages > page) 224 { 225 for (int i = page; i < totalPages; i++) 226 { 227 var products = AswoHelper.Connector.ArticleSearch(AswoHelper.GetCurrentOrNewSessionId(), "", search, 50, i + 1, true, "", ""); 228 string productsJson = products; 229 JavaScriptSerializer jsonSerializer1 = new JavaScriptSerializer(); 230 dynamic dobj1 = jsonSerializer1.Deserialize<dynamic>(productsJson); 231 foreach (System.Collections.Generic.KeyValuePair<string, object> treffer1 in dobj1["treffer"]) 232 { 233 234 //result1 += treffer.Key + " / " + treffer.Value; 235 var value1 = treffer1.Value as System.Collections.Generic.Dictionary<string, object>; 236 Dynamicweb.Ecommerce.Products.Product product = service.GetProductById(value1["artikelnummer"].ToString(), "", true); 237 if (product != null) 238 { 239 if (value1["bestellbar"].ToString() == "N" && product.IsActive && !changedProducts.Contains(product.Id)) 240 { 241 product.Active = false; 242 changedProducts.Add(product.Id); 243 } 244 else if (value1["bestellbar"].ToString() == "J" && !product.IsActive && !changedProducts.Contains(product.Id)) 245 { 246 product.Active = true; 247 changedProducts.Add(product.Id); 248 } 249 //product.Save(); 250 } 251 if (!productnumbers.Contains(value1["artikelnummer"].ToString())) 252 { 253 productnumbers.Add(value1["artikelnummer"].ToString()); 254 } 255 } 256 257 } 258 } 259 if (changedProducts.Count > 0) 260 { 261 Dynamicweb.Ecommerce.Indexing.ProductIndexBuilderService.Build("Fleggaard Products", "Ecommerce.index", changedProducts); 262 } 263 //result1 = String.Join(",", productnumbers); 264 } 265 if (productnumbers.Count > 0) 266 { 267 result1 = String.Join(",", productnumbers); 268 } 269 aswoSearchFeed = result1; 270 271 if (!aswoSearchFeed.Contains("The search for an article was invalid") && !aswoSearchFeed.Contains("Exception")) 272 { 273 aswoSearchFeed = aswoSearchFeed.Trim(); 274 } 275 else 276 { 277 aswoSearchFeed = ""; 278 } 279 } 280 281 if (!string.IsNullOrWhiteSpace(AppSearch)) 282 { 283 284 var pageNumber1 = 1; 285 try 286 { 287 pageNumber1 = Int32.Parse(Dynamicweb.Context.Current.Request["ASWO_pageNumber"]); 288 } 289 catch 290 { 291 292 } 293 294 string vgroup = "top"; 295 if (!string.IsNullOrWhiteSpace(aswovgroup)) 296 { 297 vgroup = aswovgroup; 298 } 299 300 var search1 = AswoHelper.Connector.ApplianceArticleSearch(AswoHelper.GetCurrentOrNewSessionId(), pageNumber1, true, vgroup, AppSearch); 301 302 303 string json1 = search1; 304 int totalPages1 = 0; 305 string result11 = ""; 306 List<string> productnumbers1 = new List<string>(); 307 308 309 310 if (!string.IsNullOrWhiteSpace(search1)) 311 { 312 JavaScriptSerializer jsonSerializer = new JavaScriptSerializer(); 313 dynamic dobj = jsonSerializer.Deserialize<dynamic>(json1); 314 315 316 317 foreach (System.Collections.Generic.KeyValuePair<string, object> treffer2 in dobj["treffer"]) 318 { 319 320 //result1 += treffer.Key + " / " + treffer.Value; 321 var value = treffer2.Value as System.Collections.Generic.Dictionary<string, object>; 322 productnumbers1.Add(value["artikelnummer"].ToString()); 323 } 324 325 326 if (productnumbers1.Count > 0 && vgroup == "top") 327 { 328 totalPages1 = int.Parse(dobj["anzahltreffer"].ToString()); 329 } 330 331 332 double totalPagesDB = totalPages1 / 10; 333 //int page = int.Parse(dobj["seite"].ToString()); 334 335 336 337 if (totalPages1 > 10) 338 { 339 for (int i = 1; i < totalPagesDB; i++) 340 { 341 pageNumber1 = pageNumber1 + 1; 342 var products = AswoHelper.Connector.ApplianceArticleSearch(AswoHelper.GetCurrentOrNewSessionId(), pageNumber1, true, "top", AppSearch); 343 string productsJson = products; 344 JavaScriptSerializer jsonSerializer1 = new JavaScriptSerializer(); 345 dynamic dobj1 = jsonSerializer1.Deserialize<dynamic>(productsJson); 346 foreach (System.Collections.Generic.KeyValuePair<string, object> treffer1 in dobj1["treffer"]) 347 { 348 349 //result1 += treffer.Key + " / " + treffer.Value; 350 var value1 = treffer1.Value as System.Collections.Generic.Dictionary<string, object>; 351 productnumbers1.Add(value1["artikelnummer"].ToString()); 352 } 353 354 } 355 } 356 //result1 = String.Join(",", productnumbers); 357 } 358 359 360 if (productnumbers1.Count > 0) 361 { 362 result11 = String.Join(",", productnumbers1); 363 } 364 365 applianceSearchFeed = result11; 366 367 if (!applianceSearchFeed.Contains("The search for an article was invalid") && !applianceSearchFeed.Contains("Exception")) 368 { 369 aswoSearchFeed = applianceSearchFeed.Trim(); 370 } 371 else 372 { 373 aswoSearchFeed = ""; 374 } 375 376 377 } 378 379 //Favorites 380 string pageId = GetGlobalValue("Global:Page.ID"); 381 string feedFullUrl = pageUrl + "&feed=true" + "&productids=" + aswoSearchFeed; 382 string requestQuery = GetGlobalValue("Global:Request.Query") + "&feed=true"; 383 string groupID = HttpContext.Current.Request.QueryString.Get("groupid"); 384 string productCatalogId = GetGlobalValue("Global:Page.ID"); 385 string listId = HttpContext.Current.Request.QueryString.Get("ListID"); 386 bool isFavoriteList = !String.IsNullOrEmpty(listId) ? true : false; 387 requestQuery += !isFavoriteList ? "&DoNotShowVariantsAsSingleProducts=True" : ""; 388 feedFullUrl += !isFavoriteList ? "&DoNotShowVariantsAsSingleProducts=True" : ""; 389 390 int listViewsCount = 0; 391 listViewsCount += Converter.ToBoolean(Pageview.Area.Item["ProductItemContainer"]) ? 1 : 0; 392 listViewsCount += Converter.ToBoolean(Pageview.Area.Item["ProductGridItemContainer"]) ? 1 : 0; 393 listViewsCount += Converter.ToBoolean(Pageview.Area.Item["ProductDetailsItemContainer"]) ? 1 : 0; 394 395 bool hideSorting = Converter.ToBoolean(Pageview.Area.Item["HideSorting"]); 396 bool onlyPreview = Converter.ToBoolean(Pageview.Area.Item["OnlyPreviewForAnonymous"]) && Pageview.User == null; 397 398 var navigationMarkup = RenderNavigation(new 399 { 400 id = "leftnav", 401 cssclass = "dwnavigation", 402 startLevel = 1, 403 endlevel = 50, 404 template = "LeftNavigation.xslt", 405 mode = "ecom" 406 }); 407 408 Dynamicweb.Content.Items.Item customSettings = Dynamicweb.Content.Items.Item.GetItemById("CustomWebsiteSettings", Pageview.Area.Item["CustomSettings"].ToString()); 409 string feedPageId = customSettings["ASWOConnector_API"].ToString(); 410 string aswoFeed = "/Default.aspx?ID=" + GetPageIdByNavigationTag("ASWOProductsPage"); 411 var feedPage = "/Default.aspx?ID=" + feedPageId; 412 string aswoFeedFullImageUrl = aswoFeed + "&ASWO_action=articlePicture&ASWO_productId="; 413 414 415 416 } 417 418 @GetValue("DoNotRenderProductListTemplate") 419 420 421 422 <form name="multiForm" id="multiForm" method="post" style="width:100%;"> 423 <input type="hidden" name="CartCmd" id="CartCmd" value="addMulti" /> 424 <div class="paragraph-container__grid--bleed-x paragraph-container__grid--bleed-y" style="top:0;"> 425 @if (!string.IsNullOrWhiteSpace(appName) && !customApplicancePage) 426 { 427 <div class="grid__col-12"> 428 <div class="grid__col-12"> 429 <h1>@Translate("Model"): @appName</h1> 430 </div> 431 </div> 432 } 433 <div class="grid 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> 434 </div> 435 </form> 436 437 <script id="ProductPreRenderContainer" type="text/x-template"> 438 <div class="grid__col-12"> 439 <div class="pre-render-element pre-render-element--xxs"></div> 440 </div> 441 <div class="grid__col-12"> 442 <div class="pre-render-element pre-render-element--xs"></div> 443 </div> 444 @if (Pageview.Area.Item["EcommerceFacetsViewMode"].ToString() == "left" && Pageview.Device.ToString() != "Mobile") 445 { 446 <div class="grid__col-3"> 447 <div class="pre-render-element pre-render-element--xs"></div> 448 <div class="pre-render-element pre-render-element--md"></div> 449 <div class="pre-render-element pre-render-element--md"></div> 450 <div class="pre-render-element pre-render-element--md"></div> 451 </div> 452 } 453 <div class="grid__col-auto"> 454 <div class="pre-render-element pre-render-element--xs"></div> 455 <div class="pre-render-element pre-render-element--lg"></div> 456 <div class="pre-render-element pre-render-element--lg"></div> 457 <div class="pre-render-element pre-render-element--lg"></div> 458 <div class="pre-render-element pre-render-element--lg"></div> 459 </div> 460 </script> 461 462 463 464 <script id="ProductContainer" type="text/x-template"> 465 {{#each .}} 466 @if (!isFavoriteList) 467 { 468 switch (Pageview.Area.Item["PromotionBlockDesign"].ToString()) 469 { 470 case "OnlyText": 471 <article class="grid__col-12 u-margin-bottom"> 472 <h1>{{groupName}}</h1> 473 {{{groupDescription}}} 474 </article> 475 break; 476 case "TextAndImage": 477 <article class="grid__col-12 u-margin-bottom"> 478 <div class="grid grid--bleed"> 479 <div class="grid__col-md-9"> 480 <h1>{{groupName}}</h1> 481 {{{groupDescription}}} 482 </div> 483 {{#ifCond groupPromotionImage "!==" ""}} 484 <div class="grid__col-md-3"> 485 <img src="/Admin/Public/GetImage.ashx?width=300&height=300&crop=5&Compression=75&DoNotUpscale=true&FillCanvas=true&image={{groupPromotionImage}}" class="grid__cell-img grid__cell-img--centered" /> 486 </div> 487 {{/ifCond}} 488 </div> 489 </article> 490 break; 491 case "Banner": 492 <text> 493 {{#ifCond groupPromotionImage "!==" ""}} 494 <article class="grid__col-12 u-margin-bottom"> 495 <div class="u-color-light grid center-container center-container--with-background-image u-padding" style="background-image:url('{{groupPromotionImage}}'); background-size: cover;"> 496 <div class="grid__col-12 u-middle"> 497 <div class="grid__cell"> 498 {{{groupDescription}}} 499 </div> 500 </div> 501 </div> 502 </article> 503 {{/ifCond}} 504 </text> 505 break; 506 } 507 } 508 509 <!--Render Group view here--> 510 <div class="grid__col-12"> 511 <div class="grid__cell"> 512 <div class="grid"> 513 <div id="ProductgroupContainer" data-template="ProductGroupContainer" class="grid product-list dw-mod" data-save-cookie="true"> 514 {{#SubGroups}} 515 {{>ProductGroupContainer}} 516 {{/SubGroups}} 517 </div> 518 </div> 519 </div> 520 </div> 521 522 523 524 @if (Pageview.Area.Item["EcommerceFacetsViewMode"].ToString() == "top" || Pageview.Device.ToString() == "Mobile" || Pageview.Device.ToString() == "Tablet") 525 { 526 <div class="grid__col-12"> 527 @if (!string.IsNullOrWhiteSpace(search) && (Pageview.Device.ToString() == "Mobile" || Pageview.Device.ToString() == "Tablet")) 528 { 529 <select onchange="location = this.value;"> 530 <option selected="selected" value="@productsPage">@Translate("Products")</option> 531 <option value="@appliancePage">@Translate("Appliances")</option> 532 </select> 533 } 534 <div class="grid__col-12"> 535 536 <h2 class="{{refilterText}} {{showLoadAppliences}}">@Translate("Søgningen skal indsnævres, for at give et bedre resultat")</h2> 537 538 </div> 539 540 <input type="checkbox" id="CheckFacetGroups" class="facets-container-trigger" /> 541 <div class="grid facets-container dw-mod @searching"> 542 {{#FacetGroups}} 543 <div class="grid__col-lg-3 grid__col-md-3 grid__col-sm-4 grid__col-xs-12"> 544 <input type="checkbox" id="OptionsGroup_{{counter}}" class="dropdown-trigger" /> 545 <div class="dropdown dw-mod"> 546 <label class="dropdown__header dropdown__btn dw-mod" for="OptionsGroup_{{counter}}"> 547 <div class="icon-facets"> 548 <img src="/Files/Templates/Designs/Rapido/Images/SVG/{{faceticon}}-icon.svg" /> 549 </div> 550 551 <div class="text-facets">{{name}}</div> 552 553 </label> 554 <div id="FacetOptions" class="dropdown__content dropdown__content--padding dw-mod"> 555 <div class="u-margin u-color-inherit search-facets-form" style="display:flex;"> 556 <input type="hidden" name="ID" value="724"> 557 <input type="text" name="Search" class="u-no-margin search-input" onkeyup="filterFunction(this)" data-filter="OptionsGroup_{{counter}}"> 558 <button type="button" class="btn btn--condensed btn--primary u-no-margin dw-mod " onclick="submitFilterFunction(this)"><i class="fa fa-search"></i></button> 559 </div> 560 <div class="grid__col-lg-5 grid__col-lg-pull-6"> 561 {{#SpecialFacetOptions}} 562 {{#ifCond template "===" "Checkboxes"}} 563 {{>Checkboxes}} 564 {{/ifCond}} 565 {{/SpecialFacetOptions}} 566 </div> 567 <div class="{{ifexistspecial}}"> 568 {{#FacetOptions}} 569 {{#ifCond template "===" "Checkboxes"}} 570 {{>Checkboxes}} 571 {{/ifCond}} 572 {{#ifCond template "===" "Range"}} 573 {{>Range}} 574 {{/ifCond}} 575 {{#ifCond template "===" "Weight"}} 576 {{>Weight}} 577 {{/ifCond}} 578 {{#ifCond template "===" "Tags"}} 579 {{>Tags}} 580 {{/ifCond}} 581 {{#ifCond template "===" "Colors"}} 582 {{>Colors}} 583 {{/ifCond}} 584 {{/FacetOptions}} 585 </div> 586 587 </div> 588 <label class="dropdown-trigger-off" for="OptionsGroup_{{counter}}"></label> 589 </div> 590 </div> 591 {{/FacetGroups}} 592 593 594 <div class="grid__col-lg-3 grid__col-md-3 grid__col-sm-4 grid__col-xs-12 {{showTypes}}"> 595 <input type="checkbox" id="OptionsGroup_500" class="dropdown-trigger" /> 596 <div class="dropdown dw-mod"> 597 <label class="dropdown__header dropdown__btn dw-mod" for="OptionsGroup_500"> 598 <div class="icon-facets"> 599 <img src="/Files/Templates/Designs/Rapido/Images/SVG/icon-washing.svg" /> 600 </div> 601 <div class="text-facets">{{chosenType}}</div> 602 </label> 603 <div id="FacetOptions" class="dropdown__content dropdown__content--padding dw-mod"> 604 <div class="u-margin u-color-inherit search-facets-form"> 605 <input type="hidden" name="ID" value="724"> 606 <input type="text" name="Search" class="u-no-margin search-input" onkeyup="filterFunction(this)" data-filter="OptionsGroup_500"> 607 <button type="button" class="btn btn--condensed btn--primary u-no-margin dw-mod " onclick="submitFilterFunction(this)"><i class="fa fa-search"></i></button> 608 </div> 609 610 {{#ASWOTypesList}} 611 {{>CheckboxesASWO}} 612 {{/ASWOTypesList}} 613 </div> 614 <label class="dropdown-trigger-off" for="OptionsGroup_500"></label> 615 </div> 616 </div> 617 618 <div class="grid__col-lg-3 grid__col-md-3 grid__col-sm-4 grid__col-xs-12 {{showASWOVGroups}}"> 619 <input type="checkbox" id="OptionsGroup_700" class="dropdown-trigger" /> 620 <div class="dropdown dw-mod"> 621 <label class="dropdown__header dropdown__btn dw-mod" for="OptionsGroup_700"> 622 <div class="icon-facets"> 623 <img src="/Files/Templates/Designs/Rapido/Images/SVG/icon-washing.svg" /> 624 </div> 625 <div class="text-facets">{{chosenVgroup}}</div> 626 </label> 627 <div id="FacetOptions" class="dropdown__content dropdown__content--padding dw-mod"> 628 <div class="u-margin u-color-inherit search-facets-form"> 629 <input type="hidden" name="ID" value="724"> 630 <input type="text" name="Search" class="u-no-margin search-input" onkeyup="filterFunction(this)" data-filter="OptionsGroup_700"> 631 <button type="button" class="btn btn--condensed btn--primary u-no-margin dw-mod " onclick="submitFilterFunction(this)"><i class="fa fa-search"></i></button> 632 </div> 633 634 {{#ASWOVGroupsList}} 635 {{>CheckboxesASWOVGroups}} 636 {{/ASWOVGroupsList}} 637 </div> 638 <label class="dropdown-trigger-off" for="OptionsGroup_700"></label> 639 </div> 640 </div> 641 642 <div class="grid__col-lg-3 grid__col-md-3 grid__col-sm-4 grid__col-xs-12 {{showSearch}}"> 643 <div id="SearchGroup" class="dw-mod"> 644 <div class="u-color-inherit search-facets-form u-no-padding" style="display:flex;"> 645 <input type="text" name="search2" class="u-no-margin search-input" value="@search2" id="search2" placeholder="@Translate("Search") " onkeypress="return runScript(event)"> 646 <button type="button" class="btn btn--condensed btn--primary u-no-margin dw-mod " onclick="msp();"><i class="fa fa-search"></i></button> 647 </div> 648 649 </div> 650 651 652 </div> 653 654 </div> 655 <label for="CheckFacetGroups" class="hidden btn btn--primary btn--full dw-mod facet-selector more">@Translate("Select filters")</label> 656 <label for="CheckFacetGroups" class="hidden btn btn--primary btn--full dw-mod facet-selector less">@Translate("Close filters")</label> 657 </div> 658 <div class="grid__col-6 {{showLoadAppliences}}"> 659 <div class="grid__col-12"> 660 <div class="collection u-no-margin"> 661 <h2 class="u-pull--left">@Translate("Appliances found"): {{applianceCount}}</h2> 662 </div> 663 </div> 664 </div> 665 <div class="grid__col-6 grid__col-6 grid--align-end grid__col--bleed-y {{showLoadAppliences}}"> 666 <div class="collection u-no-margin u-ta-right"> 667 <h2 class="u-no-margin u-block" style="margin-right:0;">@Translate("Click on Show products next to your appliance")</h2> 668 <p class="u-no-margin u-block">@Translate("Then we show all products that fit")</p> 669 </div> 670 </div> 671 672 673 } 674 @* 675 @if (Pageview.Area.Item["EcommerceFacetsViewMode"].ToString() == "left" && Pageview.Device.ToString() != "Mobile") 676 { 677 <div class="grid__col-3"> 678 <h2>@Translate("Filters")</h2> 679 <input type="checkbox" id="CheckFacetGroups" class="facets-container-trigger" /> 680 <div class="facets-container dw-mod"> 681 {{#FacetGroups}} 682 <input type="checkbox" id="OptionsGroup_{{counter}}" class="expand-trigger js-remember-state" {{defaultState}} /> 683 684 <div class="expand-box expand-container dw-mod"> 685 <label class="expand-box__header expand-container__btn dw-mod" for="OptionsGroup_{{counter}}">{{name}}</label> 686 <div id="FacetOptions" class="expand-box__content expand-container__content expand-container__content--limit-height dw-mod"> 687 {{#FacetOptions}} 688 {{#ifCond template "===" "Checkboxes"}} 689 {{>Checkboxes}} 690 {{/ifCond}} 691 {{#ifCond template "===" "Range"}} 692 {{>Range}} 693 {{/ifCond}} 694 {{#ifCond template "===" "Weight"}} 695 {{>Weight}} 696 {{/ifCond}} 697 {{#ifCond template "===" "Tags"}} 698 {{>Tags}} 699 {{/ifCond}} 700 {{#ifCond template "===" "Colors"}} 701 {{>Colors}} 702 {{/ifCond}} 703 {{/FacetOptions}} 704 </div> 705 </div> 706 {{/FacetGroups}} 707 </div> 708 <label for="CheckFacetGroups" class="btn btn--primary btn--full dw-mod facet-selector more">@Translate("Select filters")</label> 709 <label for="CheckFacetGroups" class="btn btn--primary btn--full dw-mod facet-selector less">@Translate("Close filters")</label> 710 </div> 711 } 712 *@ 713 714 715 @if (!string.IsNullOrWhiteSpace(search)) 716 { 717 718 719 720 721 @*<div class="u-margin u-color-inherit search-facets-form"> 722 723 <input type="text" name="search2" class="u-no-margin search-input" id="search2"> 724 <button type="button" class="btn btn--condensed btn--primary u-no-margin dw-mod " onclick="msp();"><i class="fa fa-search"></i></button> 725 </div>*@ 726 @*<input type="text" name="search2" id="search2" /> 727 <input onclick="msp();" type="button" value="Search"/>*@ 728 729 730 } 731 else if (Pageview.Page.NavigationSettings != null && Pageview.Page.NavigationSettings.UseEcomGroups) 732 { 733 <div class="grid__col-3 left-menu-mobile"> 734 <h2 class="u-margin-bottom">@Translate("Product categories")</h2> 735 736 <div class="u-padding-bottom--lg"> 737 @navigationMarkup 738 </div> 739 </div> 740 } 741 742 743 <div class="grid__col-auto"> 744 745 @if (isFavoriteList) 746 { 747 string searchPlaceholder = Translate("Search products", "Search products"); 748 string searchValue = HttpContext.Current.Request.QueryString.Get("Search") != null ? HttpContext.Current.Request.QueryString.Get("Search") : ""; 749 <div class="grid--align-self-center grid__col--bleed grid__col-12 u-margin-bottom"> 750 <div class="typeahead u-margin u-color-inherit js-typeahead" data-page-size="10" id="FavoritesSearch" data-list-id="@listId" data-search-page-id="@pageId&feed=true" data-result-page-id="@pageId"> 751 <input type="text" class="typeahead-search-field u-no-margin u-full-width js-typeahead-search-field" placeholder="@searchPlaceholder" value="@searchValue"> 752 <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> 753 <button type="button" class="btn btn--condensed btn--primary u-no-margin dw-mod js-typeahead-enter-btn"><i class="fa fa-search"></i></button> 754 </div> 755 </div> 756 } 757 758 <div id="AppliancesContainer" data-template="AppliancesItemContainer" class="product-list dw-mod" data-save-cookie="true"> 759 {{#ApplianceContainer}} 760 {{>AppliancesItemContainer}} 761 {{/ApplianceContainer}} 762 <div class="grid"> 763 <div class="grid__col-12 grid__col--bleed-y"> 764 <a href="@appliancePage{{brandParameter}}" id="LoadMoreButton" class="btn btn--primary btn--full dw-mod {{showApp}}" style="margin-top:25px;">@Translate("Find my appliance")</a> 765 766 </div> 767 </div> 768 </div> 769 770 <div class="grid {{showLoadAppliences}}"> 771 <div class="grid__col-12 grid__col--bleed-y"> 772 <button type="button" id="LoadMoreButton" class="btn btn--primary btn--full {{showLoad}} dw-mod" data-current="{{appCurrentPage}}" data-page-size="{{pageSize}}" data-total="{{appTotalPages}}" data-container="AppliancesContainer" data-feed-url="@feedFullUrl&groupid=@groupID{{loadMoreFeedParams}}" onclick="LoadMore.AppNext(this)">@Translate("Load") @Translate("more")</button> 773 774 </div> 775 </div> 776 777 <div class="grid__cell"> 778 779 <div class="grid"> 780 <div class="grid__col-6 grid__col--bleed-y"> 781 <h2 class="{{showProd}}"><i class="{{headerIcon}}"></i>{{header}}</h2> 782 783 </div> 784 785 <div class="grid__col-6 grid--align-end grid__col--bleed-y {{showProd}}"> 786 <div class="collection u-no-margin"> 787 788 @if (!hideSorting) 789 { 790 <h5 class="u-inline-block u-margin-right">@Translate("Sort by")</h5> 791 <input type="checkbox" id="ProductSort" class="dropdown-trigger" /> 792 <div class="dropdown u-w150px u-w125px--xs u-margin-right u-inline-block dw-mod"> 793 <label class="dropdown__header dropdown__btn dropdown__btn--small dw-mod" for="ProductSort" style="height:32px;">{{selectedSort}}</label> 794 <div class="dropdown__content dw-mod"> 795 <div class="dropdown__item" onclick="HandlebarsBolt.UpdateContent('productList', '@feedFullUrl{{parametersForSorting}}')">@Translate("Default")</div> 796 <div class="dropdown__item" onclick="HandlebarsBolt.UpdateContent('productList', '@feedFullUrl&SortBy=Created&SortOrder=DESC{{parametersForSorting}}')">@Translate("Newest")</div> 797 @if (!onlyPreview) 798 { 799 <div class="dropdown__item" onclick="HandlebarsBolt.UpdateContent('productList', '@feedFullUrl&SortBy=Price&SortOrder=ASC{{parametersForSorting}}')">@Translate("Price low - high")</div> 800 <div class="dropdown__item" onclick="HandlebarsBolt.UpdateContent('productList', '@feedFullUrl&SortBy=Price&SortOrder=DESC{{parametersForSorting}}')">@Translate("Price high - low")</div> 801 } 802 </div> 803 <label class="dropdown-trigger-off" for="ProductSort"></label> 804 </div> 805 } 806 @if (listViewsCount > 1) 807 { 808 if (Converter.ToBoolean(Pageview.Area.Item["ProductItemContainer"])) 809 { 810 <button type="button" class="btn btn--tag btn--sm" onclick="HandlebarsBolt.UpdateTemplate('ProductsContainer', 'ProductItemContainer')"><i class="fa fa-th-list"></i></button> 811 } 812 if (Converter.ToBoolean(Pageview.Area.Item["ProductGridItemContainer"])) 813 { 814 <button type="button" class="btn btn--tag btn--sm" onclick="HandlebarsBolt.UpdateTemplate('ProductsContainer', 'ProductGridItemContainer')"><i class="fa fa-th"></i></button> 815 } 816 if (Converter.ToBoolean(Pageview.Area.Item["ProductDetailsItemContainer"])) 817 { 818 <button type="button" class="btn btn--tag btn--sm" onclick="HandlebarsBolt.UpdateTemplate('ProductsContainer', 'ProductDetailsItemContainer')"><i class="fa fa-list"></i></button> 819 } 820 } 821 822 @if (isFavoriteList) 823 { 824 <button type="submit" class="btn btn--primary btn--sm dw-mod">@Translate("Buy all") <i class="fa fa-shopping-cart"></i></button> 825 } 826 </div> 827 </div> 828 829 <div class="grid"> 830 <div class="grid__col-12 grid__col--bleed-y"> 831 <div class="collection u-no-margin"> 832 {{#FacetSelections}} 833 {{#ifCond template "===" "SelectedFilter"}} 834 {{>SelectedFilter}} 835 {{/ifCond}} 836 {{#ifCond template "===" "SelectedColorFilter"}} 837 {{>SelectedColorFilter}} 838 {{/ifCond}} 839 {{#ifCond template "===" "ResetFilters"}} 840 {{>ResetFilters}} 841 {{/ifCond}} 842 {{/FacetSelections}} 843 </div> 844 </div> 845 </div> 846 847 848 849 <div id="ProductsContainer" data-template="{{listTemplate}}" class="grid product-list dw-mod" data-save-cookie="true"> 850 851 {{#ProductsContainer}} 852 {{#ifCond template "===" "ProductItemContainer"}} 853 {{>ProductItemContainer}} 854 {{/ifCond}} 855 {{#ifCond template "===" "ProductGridItemContainer"}} 856 {{>ProductGridItemContainer}} 857 {{/ifCond}} 858 {{#ifCond template "===" "ProductDetailsItemContainer"}} 859 {{>ProductDetailsItemContainer}} 860 {{/ifCond}} 861 {{/ProductsContainer}} 862 </div> 863 864 <div class="grid"> 865 <div class="grid__col-12 grid__col--bleed-y"> 866 <button type="button" id="LoadMoreButton" class="btn btn--primary btn--full {{nextdisabled}} dw-mod" data-current="{{currentPage}}" data-page-size="{{pageSize}}" data-total="{{totalPages}}" data-container="ProductsContainer" data-feed-url="@feedFullUrl{{loadMoreFeedParams}}" onclick="LoadMore.Next(this)" {{nextdisabled}}>@Translate("Load") {{pageSizeText}} @Translate("more")</button> 867 <button type="button" class="btn btn--clean" onclick="window.scroll(0, 0)">@Translate("Return to top")</button> 868 </div> 869 </div> 870 </div> 871 </div> 872 </div> 873 {{else}} 874 <div class="grid__col-12"> 875 <h2 class="u-ta-center">@Translate("No products found")</h2> 876 </div> 877 {{/each}} 878 </script> 879 880 @*Partial templates*@ 881 <script id="Checkboxes" type="text/x-template"> 882 <div class="options-facets" data-options="{{label}}"> 883 <label class=""> 884 <i class="fa fa-check-square-o {{selected}}"></i> 885 <i class="fa fa-square-o {{selected}}"></i> 886 <input type="checkbox" class="{{selected}}" onclick="Facets.UpdateFacets(this);" name="{{queryParameter}}" value="{{value}}" {{selected}}> 887 {{{label}}} <span class="u-color-light-gray u-pull--right"></span> 888 889 </label> 890 </div> 891 </script> 892 893 <script id="CheckboxesASWO" type="text/x-template"> 894 <div class="options-facets" data-options="{{geraeteart}}"> 895 <label class=""> 896 <i class="fa fa-check-square-o {{selected}}"></i> 897 <i class="fa fa-square-o {{selected}}"></i> 898 <input type="checkbox" class="{{selected}}" onclick="Facets.UpdateBrandFacets(this);" name="type" value="{{warensort}}" {{selected}}> 899 {{geraeteart}} <span class="u-color-light-gray u-pull--right"></span> 900 </label> 901 </div> 902 </script> 903 904 <script id="CheckboxesASWOVGroups" type="text/x-template"> 905 <div class="options-facets" data-options="{{vgruppenname}}"> 906 <label style="padding-left:9px;" class=""> 907 908 <input type="checkbox" class="{{selected}}" onclick="filterVGroup(this);" name="aswovgroup" value="{{vgruppenid}}" {{selected}}> 909 {{vgruppenname}} <span class="u-color-light-gray u-pull--right"></span> 910 </label> 911 </div> 912 </script> 913 914 <script id="Range" type="text/x-template"> 915 <div> 916 <label class="{{disabled}}"> 917 <input type="checkbox" class="{{selected}}" onclick="Facets.UpdateFacets(this);" name="{{queryParameter}}" value="{{value}}" {{selected}} {{disabled}}> 918 {{label}} {{currency}} <span class="u-color-light-gray u-pull--right">({{count}})</span> 919 </label> 920 </div> 921 </script> 922 923 <script id="Weight" type="text/x-template"> 924 <div> 925 <label class=""> 926 <input type="checkbox" class="{{selected}}" onclick="Facets.UpdateFacets(this);" name="{{queryParameter}}" value="{{value}}" {{selected}}> 927 {{label}} {{weight}} <span class="u-color-light-gray u-pull--right"></span> 928 </label> 929 </div> 930 </script> 931 932 <script id="Tags" type="text/x-template"> 933 <button type="button" class="btn btn--tag {{selected}} {{disabled}}" data-check="{{selected}}" onclick="Facets.UpdateFacets(this);" name="{{queryParameter}}" value="{{value}}" {{disabled}}> 934 {{label}} <span class="facets-group__counter">({{count}})</span> 935 </button> 936 </script> 937 938 <script id="Colors" type="text/x-template"> 939 <button type="button" class="btn btn--colorbox u-margin-right {{selected}} {{disabled}}" style="background-color: {{value}}" title="{{label}}" data-check="{{selected}}" onclick="Facets.UpdateFacets(this);" name="{{queryParameter}}" value="{{value}}" {{disabled}}></button> 940 </script> 941 942 <script id="SelectedFilter" type="text/x-template"> 943 <button type="button" class="btn btn--tag" data-check="checked" onclick="Facets.UpdateFacets(this);" name="{{queryParameter}}" value="{{value}}" title="@Translate("Remove filter")"> 944 {{group}}: {{label}} <i class="fa fa-times"></i> 945 </button> 946 </script> 947 948 <script id="SelectedColorFilter" type="text/x-template"> 949 <button type="button" class="btn btn--tag" data-check="checked" onclick="Facets.UpdateFacets(this);" name="{{queryParameter}}" value="{{value}}" title="@Translate("Remove filter")"> 950 {{group}}: <div class="btn__colorbox" style="background-color: {{label}}"></div> <i class="fa fa-times"></i> 951 </button> 952 </script> 953 954 <script id="ResetFilters" type="text/x-template"> 955 <button type="button" class="btn btn--tag" onclick="Facets.ResetFacets(this);"> 956 @Translate("Reset all filters") <i class="fa fa-rotate-left"></i> 957 </button> 958 </script> 959 960 961 962 963 @* Product list templates *@ 964 965 @* List view *@ 966 967 <script id="ProductItemContainer" type="text/x-template"> 968 {{#.}} 969 <div id="Product{{id}}" data-template="ProductItem" data-preloader="overlay" class="grid__col-12"> 970 {{#Product}} 971 {{>ProductItem}} 972 {{/Product}} 973 </div> 974 {{/.}} 975 </script> 976 977 <script id="ProductItem" type="text/x-template"> 978 {{#.}} 979 <input type="hidden" name="ProductLoopCounter{{id}}" value="{{id}}" /> 980 <input type="hidden" name="ProductID{{id}}" value="{{productId}}" /> 981 <input type="hidden" value="{{variantid}}" name="VariantID{{id}}" id="Variant_{{id}}" /> 982 983 984 <div class="grid product-list__list-item dw-mod"> 985 <div class="grid__col-md-4 {{noImage}} product-list__list-item__left dw-mod"> 986 <div class="stickers-container dw-mod"> 987 {{#Stickers}} 988 {{>Sticker}} 989 {{/Stickers}} 990 </div> 991 <div class="grid__cell"> 992 <a href="{{link}}" style="{{disableLink}}" onclick="{{savePosition}}"><img style="max-height:200px;" class="grid__cell-img grid__cell-img--centered b-lazy" src="/Files/Images/placeholder.gif" data-src="{{image}}" alt="{{name}}" /></a> 993 </div> 994 </div> 995 <div class="grid__col-md-8 product-list__list-item__right dw-mod"> 996 <div> 997 <div class="u-pull--left"> 998 <a href="{{link}}" style="{{disableLink}}" onclick="{{savePosition}}" title="{{name}}"><h2 class="u-no-margin">{{name}}</h2></a> 999 <div class="item-number dw-mod">{{number}}</div> 1000 1001 <div class="stock-icon" style='background-color:#{{stockUnit}}'></div><span class="item-number">{{stockText}}{{deliveryTimeText}}</span> 1002 1003 1004 </div> 1005 <div class="favorites u-pull--right {{hasVariants}} dw-mod" {{hasVariants}}> 1006 {{#Favorite}} 1007 {{>FavoriteTemplate}} 1008 {{/Favorite}} 1009 </div> 1010 </div> 1011 1012 <div class="grid__cell"> 1013 {{{description}}} 1014 </div> 1015 1016 @* Combinations div needed to handle variant options(used in script block with Variants.SetVariantOptionStatesForProductList function) and should not be deleted *@ 1017 <div id="Combinations" data-product-id="{{productId}}" data-id="{{id}}" class="js-variants-wrap u-hidden"> 1018 {{#VariantStockCombination}} 1019 {{>VariantStockCombination}} 1020 {{/VariantStockCombination}} 1021 </div> 1022 1023 <div id="Variants{{id}}" data-template="VariantsTemplate" data-product-id="{{productId}}"> 1024 {{#Variants}} 1025 {{>VariantsTemplate}} 1026 {{/Variants}} 1027 </div> 1028 1029 <small id="helpText_{{id}}" class="help-text {{hideViewMore}} {{hideHelpText}}">@Translate("Please select variant!")</small> 1030 @if (!onlyPreview) 1031 { 1032 <div class="grid__cell-footer"> 1033 <div class="grid__cell"> 1034 <div class="product-list__list-item__price-actions dw-mod"> 1035 <div class="u-margin-bottom"> 1036 <div class="before-price {{onSale}} dw-mod">{{discount}}</div> 1037 <div class="price dw-mod">{{price}}</div> 1038 </div> 1039 <div class="buttons-collection buttons-collection--right"> 1040 <button type="button" id="CartButton_{{id}}" class="btn btn--primary btn--condensed u-pull--right dw-mod {{hasVariants}} {{aswoCheck}}" name="submit" onclick="Cart.AddToCart(event, '{{productId}}', document.getElementById('Quantity_{{id}}').value, 'Unit_{{id}}', 'Variant_{{id}}');" {{hasVariants}}><i class="fa fa-shopping-cart"></i><span class="u-hidden-xs u-hidden-xxs"> @Translate("Add to cart")</span></button> 1041 <input type="number" class="u-w80px u-pull--right {{aswoCheck}}" id="Quantity_{{id}}" name="Quantity{{id}}" value="1" min="1"> 1042 1043 <input type="checkbox" id="UnitOptions_{{id}}" class="dropdown-trigger" /> 1044 <div class="dropdown u-w110px u-w100px--xs {{hasUnits}} dw-mod"> 1045 <label class="dropdown__header dropdown__btn dw-mod" for="UnitOptions_{{id}}">{{unitName}}</label> 1046 <div id="unitOptions" class="dropdown__content dw-mod"> 1047 {{#unitOptions}} 1048 {{>UnitOption}} 1049 {{/unitOptions}} 1050 </div> 1051 <label class="dropdown-trigger-off" for="UnitOptions_{{id}}"></label> 1052 </div> 1053 <input type="hidden" value="{{unitId}}" name="Unit{{id}}" id="Unit_{{id}}" /> 1054 </div> 1055 </div> 1056 </div> 1057 </div> 1058 } 1059 else 1060 { 1061 <button type="button" id="CartButton_{{id}}" class="u-hidden"></button> 1062 } 1063 </div> 1064 </div> 1065 {{/.}} 1066 </script> 1067 1068 @* Grid view *@ 1069 1070 <script id="AppliancesItemContainer" type="text/x-template"> 1071 {{#.}} 1072 <div id="Appliance{{id}}" data-template="ApplianceItem" data-preloader="overlay" class="grid__col-md-12 product-list__details-item dw-mod {{show}} ApplianceHide{{id}}" style="z-index: {{zIndex}}"> 1073 {{#Appliances}} 1074 {{>ApplianceItem}} 1075 {{/Appliances}} 1076 </div> 1077 {{/.}} 1078 </script> 1079 1080 <script id="ApplianceItem" type="text/x-template"> 1081 {{#.}} 1082 <div class="grid__cell"> 1083 <div class="product-list__details-item__left dw-mod"> 1084 <div class="lightbox u-hidden-xxs hidden"> 1085 <a href="@cleanProductsPage{{geraeteid}}&AppName={{geraetename}}&geraeteart={{geraeteart}}" onclick="Scroll.SavePosition(event)"> 1086 <img class="lightbox__image {{noImage}}" src="{{noImage}}" alt="{{geraetename}}" /> 1087 <div class="u-margin-right {{noImage}}" style="width:40px;"> 1088 <img src="{{aswoJson}}" alt="{{name}}" height="35" style="margin:0 auto;" /> 1089 </div> 1090 </a> 1091 </div> 1092 <div class="u-margin-right"> 1093 <a href="@cleanProductsPage{{geraeteid}}&AppName={{geraetename}}&geraeteart={{geraeteart}}" onclick="Scroll.SavePosition(event)" title="{{name}}"><h6 class="u-no-margin">{{geraetehersteller}} {{geraetename}}</h6></a> 1094 <div class="item-number item-number--compressed dw-mod"> 1095 {{geraetehersteller}} {{geraeteart}} 1096 1097 </div> 1098 </div> 1099 </div> 1100 <div class="product-list__details-item__right dw-mod"> 1101 1102 <div class="grid__cell grid__cell--align-middle-right"> 1103 1104 <div class="favorites u-pull--right u-margin-right {{hasVariants}} dw-mod" {{hasVariants}}> 1105 1106 </div> 1107 1108 <div class="u-pull--right"> 1109 <a href="@cleanProductsPage{{geraeteid}}&AppName={{geraetename}}&geraeteart={{geraeteart}}" class="btn btn--secondary u-no-margin u-w180px dw-mod" onclick="Scroll.SavePosition(event)" title="{{name}}">@Translate("Show")</a> 1110 </div> 1111 1112 <div class="favorites favorites--lg u-hidden {{hasVariants}} u-hidden-xs u-hidden-xxs dw-mod" {{hasVariants}}> 1113 1114 </div> 1115 </div> 1116 </div> 1117 <div class="grid__cell-footer stickers-container stickers-container--block dw-mod"> 1118 1119 </div> 1120 </div> 1121 {{/.}} 1122 </script> 1123 1124 <script id="ProductGroupContainer" type="text/x-template"> 1125 {{#.}} 1126 <div id="Product{{id}}" data-template="ProductGridItem" data-preloader="overlay" class="grid__col-lg-3 grid__col-md-3 grid__col-sm-3 grid__col-xs-6 product-list__list-item dw-mod"> 1127 1128 <div class="grid__cell product-list__grid-item__image dw-mod"> 1129 1130 <a href="{{link}}"> 1131 <img style="max-height:200px;" class="grid__cell-img grid__cell-img--centered u-padding" src="{{image}}" alt="{{groupName}}" /> 1132 </a> 1133 1134 1135 </div> 1136 1137 <div class="grid__cell product-list__grid-item__price-info {{shortGridInfo}} dw-mod"> 1138 <a href="{{link}}" style="{{disableLink}}" onclick="{{savePosition}}" title="{{groupName}}"><h6 class="u-condensed-text">{{groupName}}</h6></a> 1139 <div class="item-number dw-mod">{{description}}</div> 1140 @if (!onlyPreview) 1141 { 1142 <div class="price dw-mod">{{price}}</div> 1143 <div class="before-price {{onSale}} dw-mod">{{discount}}</div> 1144 } 1145 <input type="hidden" id="Quantity_{{id}}" name="Quantity{{id}}" value="1" min="1"> 1146 <input type="hidden" value="{{unitId}}" name="Unit{{id}}" id="Unit_{{id}}" /> 1147 <input type="hidden" value="{{variantid}}" name="VariantID{{id}}" id="Variant_{{id}}" /> 1148 </div> 1149 1150 <div class="product-list__grid-item__footer dw-mod "> 1151 <div class="u-ta-center {{aswoCheck}}"> 1152 <a href="{{link}}" style="{{disableLink}}" id="CartButton_{{id}}" class="btn btn--secondary btn--full u-no-margin dw-mod" onclick="getArticleDetail({{productId}});">@Translate("View")</a> 1153 </div> 1154 </div> 1155 </div> 1156 {{/.}} 1157 </script> 1158 1159 <script id="ProductGridItemContainer" type="text/x-template"> 1160 {{#.}} 1161 <div id="Product{{id}}" data-template="ProductGridItem" data-preloader="overlay" class="grid__col-lg-4 grid__col-md-4 grid__col-sm-4 grid__col-xs-6 product-list__list-item dw-mod"> 1162 {{#Product}} 1163 {{>ProductGridItem}} 1164 {{/Product}} 1165 </div> 1166 {{/.}} 1167 </script> 1168 1169 <script id="ProductGridItem" type="text/x-template"> 1170 {{#.}} 1171 <input type="hidden" name="ProductLoopCounter{{id}}" value="{{id}}" /> 1172 <input type="hidden" name="ProductID{{id}}" value="{{productId}}" /> 1173 1174 <div class="grid__cell product-list__grid-item__image dw-mod"> 1175 <div class="stickers-container dw-mod"> 1176 {{#Stickers}} 1177 {{>Sticker}} 1178 {{/Stickers}} 1179 </div> 1180 <a href="{{link}}" style="{{disableLink}}" onclick="{{savePosition}}"> 1181 <img style="max-height:200px;" class="grid__cell-img grid__cell-img--centered u-padding b-lazy" src="/Files/Images/placeholder.gif" data-src="{{image}}" alt="{{name}}" /> 1182 </a> 1183 1184 <div class="favorites favorites--for-grid-view u-pull--right {{hasVariants}} dw-mod" {{hasVariants}}> 1185 {{#Favorite}} 1186 {{>FavoriteTemplate}} 1187 {{/Favorite}} 1188 </div> 1189 </div> 1190 1191 <div class="grid__cell product-list__grid-item__price-info {{shortGridInfo}} dw-mod"> 1192 <a href="{{link}}" style="{{disableLink}}" onclick="{{savePosition}}" title="{{name}}"><h6 class="u-condensed-text">{{name}}</h6></a> 1193 1194 1195 1196 <div class="stock-icon" style='background-color:#{{stockUnit}}'></div><span class="item-number">{{stockText}}{{deliveryTimeText}}</span> 1197 1198 @if (!onlyPreview) 1199 { 1200 <div class="price dw-mod">{{price}}</div> 1201 <div class="before-price {{onSale}} dw-mod">{{discount}}</div> 1202 } 1203 <input type="hidden" id="Quantity_{{id}}" name="Quantity{{id}}" value="1" min="1"> 1204 <input type="hidden" value="{{unitId}}" name="Unit{{id}}" id="Unit_{{id}}" /> 1205 <input type="hidden" value="{{variantid}}" name="VariantID{{id}}" id="Variant_{{id}}" /> 1206 </div> 1207 1208 <div class="product-list__grid-item__footer dw-mod "> 1209 <div class="u-ta-center {{aswoCheck}}"> 1210 <a href="{{link}}" style="{{disableLink}}" id="CartButton_{{id}}" class="btn btn--secondary btn--full u-no-margin dw-mod" onclick="getArticleDetail({{productId}});">@Translate("View")</a> 1211 </div> 1212 </div> 1213 {{/.}} 1214 </script> 1215 1216 @* Details view *@ 1217 1218 <script id="ProductDetailsItemContainer" type="text/x-template"> 1219 {{#.}} 1220 <div id="Product{{id}}" data-template="ProductDetailsItem" data-preloader="overlay" class="grid__col-md-12 product-list__details-item dw-mod" style="z-index: {{zIndex}}"> 1221 {{#Product}} 1222 {{>ProductDetailsItem}} 1223 {{/Product}} 1224 </div> 1225 {{/.}} 1226 </script> 1227 1228 <script id="ProductDetailsItem" type="text/x-template"> 1229 {{#.}} 1230 <input type="hidden" name="ProductLoopCounter{{id}}" value="{{id}}" /> 1231 <input type="hidden" name="ProductID{{id}}" value="{{productId}}" /> 1232 1233 <div class="grid__cell"> 1234 <div class="product-list__details-item__left dw-mod"> 1235 <div class="lightbox u-hidden-xxs"> 1236 <a href="{{link}}" style="{{disableLink}}" onclick="{{savePosition}}"> 1237 <img class="lightbox__image {{noImage}}" src="{{image}}" alt="{{name}}" /> 1238 <div class="u-margin-right {{noImage}}" style="width:40px;"> 1239 <img src="{{image}}" alt="{{name}}" height="35" style="margin:0 auto;" /> 1240 </div> 1241 </a> 1242 </div> 1243 <div class="u-margin-right"> 1244 <a href="{{link}}" style="{{disableLink}}" onclick="{{savePosition}}" title="{{name}}"><h6 class="u-no-margin">{{name}}</h6></a> 1245 <div class="item-number item-number--compressed dw-mod"> 1246 {{number}} 1247 @if (!onlyPreview) 1248 { 1249 @*<span> 1250 <span class="stock-icon {{stockState}} dw-mod" title="{{stockText}}"></span> {{stockText}}{{deliveryText}} 1251 </span>*@ 1252 <span> 1253 1254 1255 <div class="stock-icon" style='background-color:#{{stockUnit}}'></div><span class="item-number">{{stockText}}{{deliveryTimeText}}</span> 1256 1257 </span> 1258 } 1259 </div> 1260 </div> 1261 </div> 1262 <div class="product-list__details-item__right dw-mod"> 1263 @if (!onlyPreview) 1264 { 1265 <div class="grid__cell u-hidden-sm u-hidden-md u-hidden-lg"> 1266 <div class="u-full-width u-ta-right"> 1267 <div class="before-price {{onSale}} dw-mod">{{discount}}</div> 1268 <div class="price price--condensed dw-mod">{{price}}</div> 1269 </div> 1270 </div> 1271 } 1272 <div class="grid__cell grid__cell--align-middle-right"> 1273 @if (!onlyPreview) 1274 { 1275 <div class="u-pull--right u-margin-right"> 1276 <input type="checkbox" id="UnitOptions_{{id}}" class="dropdown-trigger" /> 1277 <div class="dropdown u-w120px {{hasUnits}} dw-mod"> 1278 <label class="dropdown__header dropdown__btn dw-mod" for="UnitOptions_{{id}}">{{unitName}}</label> 1279 <div id="unitOptions" class="dropdown__content dw-mod"> 1280 {{#unitOptions}} 1281 {{>UnitOption}} 1282 {{/unitOptions}} 1283 </div> 1284 <label class="dropdown-trigger-off" for="UnitOptions_{{id}}"></label> 1285 </div> 1286 <input type="hidden" value="{{unitId}}" name="Unit{{id}}" id="Unit_{{id}}" /> 1287 <input type="hidden" value="{{variantid}}" name="VariantID{{id}}" id="Variant_{{id}}" /> 1288 </div> 1289 } 1290 <div class="favorites u-pull--right u-margin-right {{hasVariants}} dw-mod" {{hasVariants}}> 1291 {{#Favorite}} 1292 {{>FavoriteTemplate}} 1293 {{/Favorite}} 1294 </div> 1295 @if (!onlyPreview) 1296 { 1297 <div class="u-pull--right u-margin-right u-w100px u-ta-right u-hidden-xs u-hidden-xxs"> 1298 <div class="before-price {{onSale}} dw-mod">{{discount}}</div> 1299 <div class="price price--condensed dw-mod">{{price}}</div> 1300 </div> 1301 <div class="u-pull--right {{hideBuyOptions}}"> 1302 <input type="number" class="u-w80px u-no-margin u-margin-right {{aswoCheck}}" id="Quantity_{{id}}" name="Quantity{{id}}" value="1" min="1"> 1303 </div> 1304 <div class="u-pull--right {{hideBuyOptions}}"> 1305 <button type="button" id="CartButton_{{id}}" class="btn btn--primary btn--condensed u-no-margin dw-mod {{hasVariants}} {{aswoCheck}}" name="submit" onclick="Cart.AddToCart(event, '{{productId}}', document.getElementById('Quantity_{{id}}').value, 'Unit_{{id}}', 'Variant_{{id}}');" {{hasVariants}}><i class="fa fa-shopping-cart"></i></button> 1306 </div> 1307 <div class="u-pull--right {{hideViewMore}}"> 1308 <a href="{{link}}" class="btn btn--secondary u-no-margin u-w130px dw-mod" onclick="{{savePosition}}" title="{{name}}">@Translate("View")</a> 1309 </div> 1310 } 1311 else 1312 { 1313 <div class="u-pull--right"> 1314 <a href="{{link}}" class="btn btn--secondary u-no-margin u-w130px dw-mod" onclick="{{savePosition}}" title="{{name}}">@Translate("View")</a> 1315 </div> 1316 } 1317 <div class="favorites favorites--lg u-hidden {{hasVariants}} u-hidden-xs u-hidden-xxs dw-mod" {{hasVariants}}> 1318 {{#Favorite}} 1319 {{>FavoriteListItem}} 1320 {{/Favorite}} 1321 </div> 1322 </div> 1323 </div> 1324 <div class="grid__cell-footer stickers-container stickers-container--block dw-mod"> 1325 {{#Stickers}} 1326 {{>MiniSticker}} 1327 {{/Stickers}} 1328 </div> 1329 </div> 1330 {{/.}} 1331 </script> 1332 1333 <script id="Sticker" type="text/x-template"> 1334 <div class="stickers-container__tag {{className}} dw-mod">{{text}}</div> 1335 </script> 1336 1337 <script id="MiniSticker" type="text/x-template"> 1338 <div class="stickers-container__tag stickers-container__tag--micro {{className}} dw-mod">{{text}}</div> 1339 </script> 1340 1341 @* Units templates *@ 1342 1343 <script id="UnitOption" type="text/x-template"> 1344 <div class="dropdown__item dw-mod" onclick="HandlebarsBolt.UpdateContent('Product{{id}}', '{{link}}&feed=true&UnitID={{value}}&rid={{id}}')">{{name}}</div> 1345 </script> 1346 1347 @* Variants templates *@ 1348 1349 <script id="VariantsTemplate" type="text/x-template"> 1350 {{#.}} 1351 <div> 1352 <div class="u-bold">{{name}}</div> 1353 <div id="VariantOptions{{id}}"> 1354 {{#VariantOptions}} 1355 {{>VariantOption}} 1356 {{/VariantOptions}} 1357 </div> 1358 </div> 1359 {{/.}} 1360 </script> 1361 1362 <script id="VariantOption" type="text/x-template"> 1363 <button type="button" id="{{id}}{{variantId}}" data-id="{{id}}" data-variant-id="{{variantId}}" data-product-id="{{productId}}" onclick="Variants.UpdateVariants(this)" class="btn btn--tag {{disabled}} {{selected}}" data-check="{{selected}}" {{disabled}}>{{name}}</button> 1364 </script> 1365 1366 <script id="VariantOptionImage" type="text/x-template"> 1367 <img src="/Admin/Public/GetImage.ashx?width=100&amp;height=50&amp;crop=5&amp;Compression=75&amp;image=/Images/{{image}}" title="{{name}}" id="{{productid}}{{id}}" data-variant-id="{{id}}" data-product-id="{{productid}}" onclick="Variants.UpdateVariants(this)" class="btn btn--tag {{disabled}} {{selected}}" data-check="{{selected}}" {{disabled}} /> 1368 </script> 1369 1370 <script id="VariantCombinations" type="text/x-template"> 1371 </script> 1372 1373 @* Favorites templates *@ 1374 1375 <script id="FavoriteTemplate" type="text/x-template"> 1376 <div class="favorites-list u-pull--right u-ta-left"> 1377 <label for="FavoriteTrigger_{{id}}"><i class="{{favoriteIcon}} fa-1_5x"></i></label> 1378 <input type="checkbox" id="FavoriteTrigger_{{id}}" class="dropdown-trigger" /> 1379 <div class="dropdown dropdown--absolute-position"> 1380 <div class="dropdown__content dropdown__content--show-left dropdown__content--padding u-w220px dw-mod"> 1381 <ul class="list list--clean dw-mod"> 1382 {{#FavoriteLists}} 1383 {{>FavoriteListItem}} 1384 {{/FavoriteLists}} 1385 </ul> 1386 </div> 1387 <label class="dropdown-trigger-off" for="FavoriteTrigger_{{id}}"></label> 1388 </div> 1389 </div> 1390 </script> 1391 1392 <script id="FavoriteListItem" type="text/x-template"> 1393 <li> 1394 <a href="{{link}}" class="list__link u-no-underline dw-mod"><i class="{{favoriteIcon}}"></i> {{name}}</a> 1395 </li> 1396 </script> 1397 1398 <script id="ASWOImageContainer" type="text/x-template"> 1399 {{#.}} 1400 {{#if tempurl}} 1401 <img src="{{tempurl}}" alt="aswoProductImage" /> 1402 {{else}} 1403 <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}}" /> 1404 {{/if}} 1405 {{/.}} 1406 </script> 1407 1408 <script> 1409 document.addEventListener("DOMContentLoaded", function (event) { 1410 Facets.Init("productList", '@productCatalogId', '@requestQuery'); 1411 1412 Variants.SetProductFeedId('@productCatalogId'); 1413 Variants.SetViewMode("productList"); 1414 1415 document.getElementById("productList").addEventListener('contentLoaded', function (e) { 1416 //var variantsContainers = document.getElementsByClassName("js-variants-wrap"); 1417 1418 //for (var i = 0; i < variantsContainers.length; i++) { 1419 // var variantsContainerElement = variantsContainers[i]; 1420 // Variants.SetVariantOptionStatesForProductList(variantsContainerElement); 1421 //} 1422 1423 if (e.srcElement.classList.contains("js-variants-wrap")) { 1424 Variants.SetVariantOptionStatesForProductList(e.srcElement); 1425 } 1426 if (e.srcElement.id === "productList") { 1427 //Search.Init(); 1428 } 1429 }, false); 1430 }); 1431 1432 1433 </script> 1434 1435 <script> 1436 1437 function runScript(e) { 1438 1439 if (e.keyCode == 13) { 1440 1441 e.preventDefault(); 1442 msp(); 1443 1444 } 1445 } 1446 function msp() { 1447 var element = document.getElementById("search2"); 1448 removeParams(element.value); 1449 } 1450 1451 function filterVGroup(el) { 1452 1453 removeVGroupParams(el.value); 1454 } 1455 1456 function removeParams(sParam) { 1457 var url = window.location.href.split('?')[0] + '?'; 1458 var sPageURL = decodeURIComponent(window.location.search.substring(1)), 1459 sURLVariables = sPageURL.split('&'), 1460 sParameterName, 1461 i; 1462 1463 for (i = 0; i < sURLVariables.length; i++) { 1464 sParameterName = sURLVariables[i].split('='); 1465 1466 if (sParameterName[0]) { 1467 if (sParameterName[0] != sParam) { 1468 url = url + sParameterName[0] + '=' + sParameterName[1] + '&'; 1469 } 1470 } 1471 1472 } 1473 if (document.location.href.indexOf('?') === -1) { 1474 1475 1476 setUrlParameter("@GetGlobalValue("Global:Request.Url")", "&search2", sParam); 1477 1478 } 1479 else { 1480 setUrlParameter(url, "search2", sParam); 1481 } 1482 1483 1484 } 1485 1486 function removeVGroupParams(sParam) { 1487 var url = window.location.href.split('?')[0] + '?'; 1488 var sPageURL = decodeURIComponent(window.location.search.substring(1)), 1489 sURLVariables = sPageURL.split('&'), 1490 sParameterName, 1491 i; 1492 1493 for (i = 0; i < sURLVariables.length; i++) { 1494 sParameterName = sURLVariables[i].split('='); 1495 1496 if (sParameterName[0]) { 1497 if (sParameterName[0] != sParam) { 1498 url = url + sParameterName[0] + '=' + sParameterName[1] + '&'; 1499 } 1500 } 1501 1502 } 1503 if (document.location.href.indexOf('?') === -1) { 1504 1505 1506 setUrlParameter("@GetGlobalValue("Global:Request.Url")", "&aswovgroup", sParam); 1507 1508 } 1509 else { 1510 setUrlParameter(url, "aswovgroup", sParam); 1511 } 1512 1513 1514 } 1515 1516 function setUrlParameter(url, key, value) { 1517 var baseUrl = url.split('?')[0], 1518 urlQueryString = '?' + url.split('?')[1], 1519 newParam = key + '=' + value, 1520 params = '?' + newParam; 1521 1522 // If the "search" string exists, then build params from it 1523 if (urlQueryString) { 1524 var updateRegex = new RegExp('([\?&])' + key + '[^&]*'); 1525 var removeRegex = new RegExp('([\?&])' + key + '=[^&;]+[&;]?'); 1526 1527 if (typeof value === 'undefined' || value === null || value === '') { // Remove param if value is empty 1528 params = urlQueryString.replace(removeRegex, "$1"); 1529 params = params.replace(/[&;]$/, ""); 1530 1531 } else if (urlQueryString.match(updateRegex) !== null) { // If param exists already, update it 1532 params = urlQueryString.replace(updateRegex, "$1" + newParam); 1533 params = params.substring(0, params.length - 1); 1534 1535 } else { // Otherwise, add it to end of query string 1536 params = urlQueryString + newParam; 1537 } 1538 } 1539 1540 // no parameter was set so we don't need the question mark 1541 params = params === '?' ? '' : params; 1542 location.href = baseUrl + params; 1543 } 1544 1545 </script> 1546 1547 <script> 1548 function getArticleDetail(id) { 1549 $.getJSON("@feedPage&ASWO_action=articleDetails" + "&ASWO_productId=" + id, function (data) { 1550 1551 }); 1552 } 1553 1554 function getArticleImage(id) { 1555 $.getJSON("@feedPage&ASWO_action=articlePicture" + "&ASWO_productId=" + id, function (data) { 1556 1557 }); 1558 } 1559 1560 1561 </script> 1562