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_adb868c062a34accace680245ee9d198.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 403 startLevel = 1, 404 endlevel = 9, 405 template = "LeftNavigation.xslt", 406 expandmode = "Pathonly" 407 408 }); 409 410 Dynamicweb.Content.Items.Item customSettings = Dynamicweb.Content.Items.Item.GetItemById("CustomWebsiteSettings", Pageview.Area.Item["CustomSettings"].ToString()); 411 string feedPageId = customSettings["ASWOConnector_API"].ToString(); 412 string aswoFeed = "/Default.aspx?ID=" + GetPageIdByNavigationTag("ASWOProductsPage"); 413 var feedPage = "/Default.aspx?ID=" + feedPageId; 414 string aswoFeedFullImageUrl = aswoFeed + "&ASWO_action=articlePicture&ASWO_productId="; 415 416 417 418 } 419 420 @GetValue("DoNotRenderProductListTemplate") 421 422 423 424 <form name="multiForm" id="multiForm" method="post" style="width:100%;"> 425 <input type="hidden" name="CartCmd" id="CartCmd" value="addMulti" /> 426 <div class="paragraph-container__grid--bleed-x paragraph-container__grid--bleed-y" style="top:0;"> 427 @if (!string.IsNullOrWhiteSpace(appName) && !customApplicancePage) 428 { 429 <div class="grid__col-12"> 430 <div class="grid__col-12"> 431 <h1>@Translate("Model"): @appName</h1> 432 </div> 433 </div> 434 } 435 <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> 436 </div> 437 </form> 438 439 <script id="ProductPreRenderContainer" type="text/x-template"> 440 <div class="grid__col-12"> 441 <div class="pre-render-element pre-render-element--xxs"></div> 442 </div> 443 <div class="grid__col-12"> 444 <div class="pre-render-element pre-render-element--xs"></div> 445 </div> 446 @if (Pageview.Area.Item["EcommerceFacetsViewMode"].ToString() == "left" && Pageview.Device.ToString() != "Mobile") 447 { 448 <div class="grid__col-3"> 449 <div class="pre-render-element pre-render-element--xs"></div> 450 <div class="pre-render-element pre-render-element--md"></div> 451 <div class="pre-render-element pre-render-element--md"></div> 452 <div class="pre-render-element pre-render-element--md"></div> 453 </div> 454 } 455 <div class="grid__col-auto"> 456 <div class="pre-render-element pre-render-element--xs"></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 class="pre-render-element pre-render-element--lg"></div> 460 <div class="pre-render-element pre-render-element--lg"></div> 461 </div> 462 </script> 463 464 465 466 <script id="ProductContainer" type="text/x-template"> 467 {{#each .}} 468 @if (!isFavoriteList) 469 { 470 switch (Pageview.Area.Item["PromotionBlockDesign"].ToString()) 471 { 472 case "OnlyText": 473 <article class="grid__col-12 u-margin-bottom"> 474 <h1>{{groupName}}</h1> 475 {{{groupDescription}}} 476 </article> 477 break; 478 case "TextAndImage": 479 <article class="grid__col-12 u-margin-bottom"> 480 <div class="grid grid--bleed"> 481 <div class="grid__col-md-9"> 482 <h1>{{groupName}}</h1> 483 {{{groupDescription}}} 484 </div> 485 {{#ifCond groupPromotionImage "!==" ""}} 486 <div class="grid__col-md-3"> 487 <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" /> 488 </div> 489 {{/ifCond}} 490 </div> 491 </article> 492 break; 493 case "Banner": 494 <text> 495 {{#ifCond groupPromotionImage "!==" ""}} 496 <article class="grid__col-12 u-margin-bottom"> 497 <div class="u-color-light grid center-container center-container--with-background-image u-padding" style="background-image:url('{{groupPromotionImage}}'); background-size: cover;"> 498 <div class="grid__col-12 u-middle"> 499 <div class="grid__cell"> 500 {{{groupDescription}}} 501 </div> 502 </div> 503 </div> 504 </article> 505 {{/ifCond}} 506 </text> 507 break; 508 } 509 } 510 511 <!--Render Group view here--> 512 <div class="grid__col-12"> 513 <div class="grid__cell"> 514 <div class="grid"> 515 <div id="ProductgroupContainer" data-template="ProductGroupContainer" class="grid product-list dw-mod" data-save-cookie="true"> 516 {{#SubGroups}} 517 {{>ProductGroupContainer}} 518 {{/SubGroups}} 519 </div> 520 </div> 521 </div> 522 </div> 523 524 525 526 @if (Pageview.Area.Item["EcommerceFacetsViewMode"].ToString() == "top" || Pageview.Device.ToString() == "Mobile" || Pageview.Device.ToString() == "Tablet") 527 { 528 <div class="grid__col-12"> 529 @if (!string.IsNullOrWhiteSpace(search) && (Pageview.Device.ToString() == "Mobile" || Pageview.Device.ToString() == "Tablet")) 530 { 531 <select onchange="location = this.value;"> 532 <option selected="selected" value="@productsPage">@Translate("Products")</option> 533 <option value="@appliancePage">@Translate("Appliances")</option> 534 </select> 535 } 536 <div class="grid__col-12"> 537 538 <h2 class="{{refilterText}} {{showLoad}}">@Translate("Søgningen skal indsnævres, for at give et bedre resultat")</h2> 539 540 </div> 541 542 <input type="checkbox" id="CheckFacetGroups" class="facets-container-trigger" /> 543 <div class="grid facets-container dw-mod @searching"> 544 {{#FacetGroups}} 545 <div class="grid__col-lg-3 grid__col-md-3 grid__col-sm-4 grid__col-xs-12"> 546 <input type="checkbox" id="OptionsGroup_{{counter}}" class="dropdown-trigger" /> 547 <div class="dropdown dw-mod"> 548 <label class="dropdown__header dropdown__btn dw-mod" for="OptionsGroup_{{counter}}"> 549 <div class="icon-facets"> 550 <img src="/Files/Templates/Designs/Rapido/Images/SVG/{{faceticon}}-icon.svg" /> 551 </div> 552 553 <div class="text-facets">{{name}}</div> 554 555 </label> 556 <div id="FacetOptions" class="dropdown__content dropdown__content--padding dw-mod"> 557 <div class="u-margin u-color-inherit search-facets-form" style="display:flex;"> 558 <input type="hidden" name="ID" value="724"> 559 <input type="text" name="Search" class="u-no-margin search-input" onkeyup="filterFunction(this)" data-filter="OptionsGroup_{{counter}}"> 560 <button type="button" class="btn btn--condensed btn--primary u-no-margin dw-mod " onclick="submitFilterFunction(this)"><i class="fa fa-search"></i></button> 561 </div> 562 <div class="grid__col-lg-5 grid__col-lg-pull-6"> 563 {{#SpecialFacetOptions}} 564 {{#ifCond template "===" "Checkboxes"}} 565 {{>Checkboxes}} 566 {{/ifCond}} 567 {{/SpecialFacetOptions}} 568 </div> 569 <div class="{{ifexistspecial}}"> 570 {{#FacetOptions}} 571 {{#ifCond template "===" "Checkboxes"}} 572 {{>Checkboxes}} 573 {{/ifCond}} 574 {{#ifCond template "===" "Range"}} 575 {{>Range}} 576 {{/ifCond}} 577 {{#ifCond template "===" "Weight"}} 578 {{>Weight}} 579 {{/ifCond}} 580 {{#ifCond template "===" "Tags"}} 581 {{>Tags}} 582 {{/ifCond}} 583 {{#ifCond template "===" "Colors"}} 584 {{>Colors}} 585 {{/ifCond}} 586 {{/FacetOptions}} 587 </div> 588 589 </div> 590 <label class="dropdown-trigger-off" for="OptionsGroup_{{counter}}"></label> 591 </div> 592 </div> 593 {{/FacetGroups}} 594 595 596 <div class="grid__col-lg-3 grid__col-md-3 grid__col-sm-4 grid__col-xs-12 {{showTypes}}"> 597 <input type="checkbox" id="OptionsGroup_500" class="dropdown-trigger" /> 598 <div class="dropdown dw-mod"> 599 <label class="dropdown__header dropdown__btn dw-mod" for="OptionsGroup_500"> 600 <div class="icon-facets"> 601 <img src="/Files/Templates/Designs/Rapido/Images/SVG/icon-washing.svg" /> 602 </div> 603 <div class="text-facets">{{chosenType}}</div> 604 </label> 605 <div id="FacetOptions" class="dropdown__content dropdown__content--padding dw-mod"> 606 <div class="u-margin u-color-inherit search-facets-form"> 607 <input type="hidden" name="ID" value="724"> 608 <input type="text" name="Search" class="u-no-margin search-input" onkeyup="filterFunction(this)" data-filter="OptionsGroup_500"> 609 <button type="button" class="btn btn--condensed btn--primary u-no-margin dw-mod " onclick="submitFilterFunction(this)"><i class="fa fa-search"></i></button> 610 </div> 611 612 {{#ASWOTypesList}} 613 {{>CheckboxesASWO}} 614 {{/ASWOTypesList}} 615 </div> 616 <label class="dropdown-trigger-off" for="OptionsGroup_500"></label> 617 </div> 618 </div> 619 620 <div class="grid__col-lg-3 grid__col-md-3 grid__col-sm-4 grid__col-xs-12 {{showASWOVGroups}}"> 621 <input type="checkbox" id="OptionsGroup_700" class="dropdown-trigger" /> 622 <div class="dropdown dw-mod"> 623 <label class="dropdown__header dropdown__btn dw-mod" for="OptionsGroup_700"> 624 <div class="icon-facets"> 625 <img src="/Files/Templates/Designs/Rapido/Images/SVG/icon-washing.svg" /> 626 </div> 627 <div class="text-facets">{{chosenVgroup}}</div> 628 </label> 629 <div id="FacetOptions" class="dropdown__content dropdown__content--padding dw-mod"> 630 <div class="u-margin u-color-inherit search-facets-form"> 631 <input type="hidden" name="ID" value="724"> 632 <input type="text" name="Search" class="u-no-margin search-input" onkeyup="filterFunction(this)" data-filter="OptionsGroup_700"> 633 <button type="button" class="btn btn--condensed btn--primary u-no-margin dw-mod " onclick="submitFilterFunction(this)"><i class="fa fa-search"></i></button> 634 </div> 635 636 {{#ASWOVGroupsList}} 637 {{>CheckboxesASWOVGroups}} 638 {{/ASWOVGroupsList}} 639 </div> 640 <label class="dropdown-trigger-off" for="OptionsGroup_700"></label> 641 </div> 642 </div> 643 644 <div class="grid__col-lg-3 grid__col-md-3 grid__col-sm-4 grid__col-xs-12 {{showSearch}}"> 645 <div id="SearchGroup" class="dw-mod"> 646 <div class="u-color-inherit search-facets-form u-no-padding" style="display:flex;"> 647 <input type="text" name="search2" class="u-no-margin search-input" value="@search2" id="search2" placeholder="@Translate("Search") " onkeypress="return runScript(event)"> 648 <button type="button" class="btn btn--condensed btn--primary u-no-margin dw-mod " onclick="msp();"><i class="fa fa-search"></i></button> 649 </div> 650 651 </div> 652 653 654 </div> 655 656 </div> 657 <label for="CheckFacetGroups" class="hidden btn btn--primary btn--full dw-mod facet-selector more">@Translate("Select filters")</label> 658 <label for="CheckFacetGroups" class="hidden btn btn--primary btn--full dw-mod facet-selector less">@Translate("Close filters")</label> 659 </div> 660 <div class="grid__col-6 {{showLoad}}"> 661 <div class="grid__col-12"> 662 <div class="collection u-no-margin"> 663 <h2 class="u-pull--left">@Translate("Appliances found"): {{applianceCount}}</h2> 664 </div> 665 </div> 666 </div> 667 <div class="grid__col-6 grid__col-6 grid--align-end grid__col--bleed-y {{showLoad}}"> 668 <div class="collection u-no-margin u-ta-right"> 669 <h2 class="u-no-margin u-block" style="margin-right:0;">@Translate("Click on Show products next to your appliance")</h2> 670 <p class="u-no-margin u-block">@Translate("Then we show all products that fit")</p> 671 </div> 672 </div> 673 674 675 } 676 @* 677 @if (Pageview.Area.Item["EcommerceFacetsViewMode"].ToString() == "left" && Pageview.Device.ToString() != "Mobile") 678 { 679 <div class="grid__col-3"> 680 <h2>@Translate("Filters")</h2> 681 <input type="checkbox" id="CheckFacetGroups" class="facets-container-trigger" /> 682 <div class="facets-container dw-mod"> 683 {{#FacetGroups}} 684 <input type="checkbox" id="OptionsGroup_{{counter}}" class="expand-trigger js-remember-state" {{defaultState}} /> 685 686 <div class="expand-box expand-container dw-mod"> 687 <label class="expand-box__header expand-container__btn dw-mod" for="OptionsGroup_{{counter}}">{{name}}</label> 688 <div id="FacetOptions" class="expand-box__content expand-container__content expand-container__content--limit-height dw-mod"> 689 {{#FacetOptions}} 690 {{#ifCond template "===" "Checkboxes"}} 691 {{>Checkboxes}} 692 {{/ifCond}} 693 {{#ifCond template "===" "Range"}} 694 {{>Range}} 695 {{/ifCond}} 696 {{#ifCond template "===" "Weight"}} 697 {{>Weight}} 698 {{/ifCond}} 699 {{#ifCond template "===" "Tags"}} 700 {{>Tags}} 701 {{/ifCond}} 702 {{#ifCond template "===" "Colors"}} 703 {{>Colors}} 704 {{/ifCond}} 705 {{/FacetOptions}} 706 </div> 707 </div> 708 {{/FacetGroups}} 709 </div> 710 <label for="CheckFacetGroups" class="btn btn--primary btn--full dw-mod facet-selector more">@Translate("Select filters")</label> 711 <label for="CheckFacetGroups" class="btn btn--primary btn--full dw-mod facet-selector less">@Translate("Close filters")</label> 712 </div> 713 } 714 *@ 715 716 717 @if (!string.IsNullOrWhiteSpace(search)) 718 { 719 720 721 722 723 @*<div class="u-margin u-color-inherit search-facets-form"> 724 725 <input type="text" name="search2" class="u-no-margin search-input" id="search2"> 726 <button type="button" class="btn btn--condensed btn--primary u-no-margin dw-mod " onclick="msp();"><i class="fa fa-search"></i></button> 727 </div>*@ 728 @*<input type="text" name="search2" id="search2" /> 729 <input onclick="msp();" type="button" value="Search"/>*@ 730 731 732 } 733 else if (Pageview.Page.NavigationSettings != null && Pageview.Page.NavigationSettings.UseEcomGroups) 734 { 735 <div class="grid__col-3 left-menu-mobile"> 736 <h2 class="u-margin-bottom">@Translate("Product categories")</h2> 737 738 <div class="u-padding-bottom--lg"> 739 @navigationMarkup 740 </div> 741 </div> 742 } 743 744 745 <div class="grid__col-auto"> 746 747 @if (isFavoriteList) 748 { 749 string searchPlaceholder = Translate("Search products", "Search products"); 750 string searchValue = HttpContext.Current.Request.QueryString.Get("Search") != null ? HttpContext.Current.Request.QueryString.Get("Search") : ""; 751 <div class="grid--align-self-center grid__col--bleed grid__col-12 u-margin-bottom"> 752 <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"> 753 <input type="text" class="typeahead-search-field u-no-margin u-full-width js-typeahead-search-field" placeholder="@searchPlaceholder" value="@searchValue"> 754 <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> 755 <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> 756 </div> 757 </div> 758 } 759 760 <div id="AppliancesContainer" data-template="AppliancesItemContainer" class="product-list dw-mod" data-save-cookie="true"> 761 {{#ApplianceContainer}} 762 {{>AppliancesItemContainer}} 763 {{/ApplianceContainer}} 764 <div class="grid"> 765 <div class="grid__col-12 grid__col--bleed-y"> 766 <a href="@appliancePage{{brandParameter}}" id="LoadMoreButton" class="btn btn--primary btn--full dw-mod {{showApp}}" style="margin-top:25px;">@Translate("Find my appliance")</a> 767 768 </div> 769 </div> 770 </div> 771 772 <div class="grid {{showLoadAppliences}}"> 773 <div class="grid__col-12 grid__col--bleed-y"> 774 <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> 775 776 </div> 777 </div> 778 779 <div class="grid__cell"> 780 781 <div class="grid"> 782 <div class="grid__col-6 grid__col--bleed-y"> 783 <h2 class="{{showProd}}"><i class="{{headerIcon}}"></i>{{header}}</h2> 784 785 </div> 786 787 <div class="grid__col-6 grid--align-end grid__col--bleed-y {{showProd}}"> 788 <div class="collection u-no-margin"> 789 790 @if (!hideSorting) 791 { 792 <h5 class="u-inline-block u-margin-right">@Translate("Sort by")</h5> 793 <input type="checkbox" id="ProductSort" class="dropdown-trigger" /> 794 <div class="dropdown u-w150px u-w125px--xs u-margin-right u-inline-block dw-mod"> 795 <label class="dropdown__header dropdown__btn dropdown__btn--small dw-mod" for="ProductSort" style="height:32px;">{{selectedSort}}</label> 796 <div class="dropdown__content dw-mod"> 797 <div class="dropdown__item" onclick="HandlebarsBolt.UpdateContent('productList', '@feedFullUrl{{parametersForSorting}}')">@Translate("Default")</div> 798 <div class="dropdown__item" onclick="HandlebarsBolt.UpdateContent('productList', '@feedFullUrl&SortBy=Created&SortOrder=DESC{{parametersForSorting}}')">@Translate("Newest")</div> 799 @if (!onlyPreview) 800 { 801 <div class="dropdown__item" onclick="HandlebarsBolt.UpdateContent('productList', '@feedFullUrl&SortBy=Price&SortOrder=ASC{{parametersForSorting}}')">@Translate("Price low - high")</div> 802 <div class="dropdown__item" onclick="HandlebarsBolt.UpdateContent('productList', '@feedFullUrl&SortBy=Price&SortOrder=DESC{{parametersForSorting}}')">@Translate("Price high - low")</div> 803 } 804 </div> 805 <label class="dropdown-trigger-off" for="ProductSort"></label> 806 </div> 807 } 808 @if (listViewsCount > 1) 809 { 810 if (Converter.ToBoolean(Pageview.Area.Item["ProductItemContainer"])) 811 { 812 <button type="button" class="btn btn--tag btn--sm" onclick="HandlebarsBolt.UpdateTemplate('ProductsContainer', 'ProductItemContainer')"><i class="fa fa-th-list"></i></button> 813 } 814 if (Converter.ToBoolean(Pageview.Area.Item["ProductGridItemContainer"])) 815 { 816 <button type="button" class="btn btn--tag btn--sm" onclick="HandlebarsBolt.UpdateTemplate('ProductsContainer', 'ProductGridItemContainer')"><i class="fa fa-th"></i></button> 817 } 818 if (Converter.ToBoolean(Pageview.Area.Item["ProductDetailsItemContainer"])) 819 { 820 <button type="button" class="btn btn--tag btn--sm" onclick="HandlebarsBolt.UpdateTemplate('ProductsContainer', 'ProductDetailsItemContainer')"><i class="fa fa-list"></i></button> 821 } 822 } 823 824 @if (isFavoriteList) 825 { 826 <button type="submit" class="btn btn--primary btn--sm dw-mod">@Translate("Buy all") <i class="fa fa-shopping-cart"></i></button> 827 } 828 </div> 829 </div> 830 831 <div class="grid"> 832 <div class="grid__col-12 grid__col--bleed-y"> 833 <div class="collection u-no-margin"> 834 {{#FacetSelections}} 835 {{#ifCond template "===" "SelectedFilter"}} 836 {{>SelectedFilter}} 837 {{/ifCond}} 838 {{#ifCond template "===" "SelectedColorFilter"}} 839 {{>SelectedColorFilter}} 840 {{/ifCond}} 841 {{#ifCond template "===" "ResetFilters"}} 842 {{>ResetFilters}} 843 {{/ifCond}} 844 {{/FacetSelections}} 845 </div> 846 </div> 847 </div> 848 849 850 851 <div id="ProductsContainer" data-template="{{listTemplate}}" class="grid product-list dw-mod" data-save-cookie="true"> 852 853 {{#ProductsContainer}} 854 {{#ifCond template "===" "ProductItemContainer"}} 855 {{>ProductItemContainer}} 856 {{/ifCond}} 857 {{#ifCond template "===" "ProductGridItemContainer"}} 858 {{>ProductGridItemContainer}} 859 {{/ifCond}} 860 {{#ifCond template "===" "ProductDetailsItemContainer"}} 861 {{>ProductDetailsItemContainer}} 862 {{/ifCond}} 863 {{/ProductsContainer}} 864 </div> 865 866 <div class="grid"> 867 <div class="grid__col-12 grid__col--bleed-y"> 868 <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> 869 <button type="button" class="btn btn--clean" onclick="window.scroll(0, 0)">@Translate("Return to top")</button> 870 </div> 871 </div> 872 </div> 873 </div> 874 </div> 875 {{else}} 876 <div class="grid__col-12"> 877 <h2 class="u-ta-center">@Translate("No products found")</h2> 878 </div> 879 {{/each}} 880 </script> 881 882 @*Partial templates*@ 883 <script id="Checkboxes" type="text/x-template"> 884 <div class="options-facets" data-options="{{label}}"> 885 <label class=""> 886 <i class="fa fa-check-square-o {{selected}}"></i> 887 <i class="fa fa-square-o {{selected}}"></i> 888 <input type="checkbox" class="{{selected}}" onclick="Facets.UpdateFacets(this);" name="{{queryParameter}}" value="{{value}}" {{selected}}> 889 {{{label}}} <span class="u-color-light-gray u-pull--right"></span> 890 891 </label> 892 </div> 893 </script> 894 895 <script id="CheckboxesASWO" type="text/x-template"> 896 <div class="options-facets" data-options="{{geraeteart}}"> 897 <label class=""> 898 <i class="fa fa-check-square-o {{selected}}"></i> 899 <i class="fa fa-square-o {{selected}}"></i> 900 <input type="checkbox" class="{{selected}}" onclick="Facets.UpdateBrandFacets(this);" name="type" value="{{warensort}}" {{selected}}> 901 {{geraeteart}} <span class="u-color-light-gray u-pull--right"></span> 902 </label> 903 </div> 904 </script> 905 906 <script id="CheckboxesASWOVGroups" type="text/x-template"> 907 <div class="options-facets" data-options="{{vgruppenname}}"> 908 <label style="padding-left:9px;" class=""> 909 910 <input type="checkbox" class="{{selected}}" onclick="filterVGroup(this);" name="aswovgroup" value="{{vgruppenid}}" {{selected}}> 911 {{vgruppenname}} <span class="u-color-light-gray u-pull--right"></span> 912 </label> 913 </div> 914 </script> 915 916 <script id="Range" type="text/x-template"> 917 <div> 918 <label class="{{disabled}}"> 919 <input type="checkbox" class="{{selected}}" onclick="Facets.UpdateFacets(this);" name="{{queryParameter}}" value="{{value}}" {{selected}} {{disabled}}> 920 {{label}} {{currency}} <span class="u-color-light-gray u-pull--right">({{count}})</span> 921 </label> 922 </div> 923 </script> 924 925 <script id="Weight" type="text/x-template"> 926 <div> 927 <label class=""> 928 <input type="checkbox" class="{{selected}}" onclick="Facets.UpdateFacets(this);" name="{{queryParameter}}" value="{{value}}" {{selected}}> 929 {{label}} {{weight}} <span class="u-color-light-gray u-pull--right"></span> 930 </label> 931 </div> 932 </script> 933 934 <script id="Tags" type="text/x-template"> 935 <button type="button" class="btn btn--tag {{selected}} {{disabled}}" data-check="{{selected}}" onclick="Facets.UpdateFacets(this);" name="{{queryParameter}}" value="{{value}}" {{disabled}}> 936 {{label}} <span class="facets-group__counter">({{count}})</span> 937 </button> 938 </script> 939 940 <script id="Colors" type="text/x-template"> 941 <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> 942 </script> 943 944 <script id="SelectedFilter" type="text/x-template"> 945 <button type="button" class="btn btn--tag" data-check="checked" onclick="Facets.UpdateFacets(this);" name="{{queryParameter}}" value="{{value}}" title="@Translate("Remove filter")"> 946 {{group}}: {{label}} <i class="fa fa-times"></i> 947 </button> 948 </script> 949 950 <script id="SelectedColorFilter" type="text/x-template"> 951 <button type="button" class="btn btn--tag" data-check="checked" onclick="Facets.UpdateFacets(this);" name="{{queryParameter}}" value="{{value}}" title="@Translate("Remove filter")"> 952 {{group}}: <div class="btn__colorbox" style="background-color: {{label}}"></div> <i class="fa fa-times"></i> 953 </button> 954 </script> 955 956 <script id="ResetFilters" type="text/x-template"> 957 <button type="button" class="btn btn--tag" onclick="Facets.ResetFacets(this);"> 958 @Translate("Reset all filters") <i class="fa fa-rotate-left"></i> 959 </button> 960 </script> 961 962 963 964 965 @* Product list templates *@ 966 967 @* List view *@ 968 969 <script id="ProductItemContainer" type="text/x-template"> 970 {{#.}} 971 <div id="Product{{id}}" data-template="ProductItem" data-preloader="overlay" class="grid__col-12"> 972 {{#Product}} 973 {{>ProductItem}} 974 {{/Product}} 975 </div> 976 {{/.}} 977 </script> 978 979 <script id="ProductItem" type="text/x-template"> 980 {{#.}} 981 <input type="hidden" name="ProductLoopCounter{{id}}" value="{{id}}" /> 982 <input type="hidden" name="ProductID{{id}}" value="{{productId}}" /> 983 <input type="hidden" value="{{variantid}}" name="VariantID{{id}}" id="Variant_{{id}}" /> 984 985 986 <div class="grid product-list__list-item dw-mod"> 987 <div class="grid__col-md-4 {{noImage}} product-list__list-item__left dw-mod"> 988 <div class="stickers-container dw-mod"> 989 {{#Stickers}} 990 {{>Sticker}} 991 {{/Stickers}} 992 </div> 993 <div class="grid__cell"> 994 <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> 995 </div> 996 </div> 997 <div class="grid__col-md-8 product-list__list-item__right dw-mod"> 998 <div> 999 <div class="u-pull--left"> 1000 <a href="{{link}}" style="{{disableLink}}" onclick="{{savePosition}}" title="{{name}}"><h2 class="u-no-margin">{{name}}</h2></a> 1001 <div class="item-number dw-mod">{{number}}</div> 1002 1003 <div class="stock-icon" style='background-color:#{{stockUnit}}'></div><span class="item-number">{{stockText}}{{deliveryTimeText}}</span> 1004 1005 1006 </div> 1007 <div class="favorites u-pull--right {{hasVariants}} dw-mod" {{hasVariants}}> 1008 {{#Favorite}} 1009 {{>FavoriteTemplate}} 1010 {{/Favorite}} 1011 </div> 1012 </div> 1013 1014 <div class="grid__cell"> 1015 {{{description}}} 1016 </div> 1017 1018 @* Combinations div needed to handle variant options(used in script block with Variants.SetVariantOptionStatesForProductList function) and should not be deleted *@ 1019 <div id="Combinations" data-product-id="{{productId}}" data-id="{{id}}" class="js-variants-wrap u-hidden"> 1020 {{#VariantStockCombination}} 1021 {{>VariantStockCombination}} 1022 {{/VariantStockCombination}} 1023 </div> 1024 1025 <div id="Variants{{id}}" data-template="VariantsTemplate" data-product-id="{{productId}}"> 1026 {{#Variants}} 1027 {{>VariantsTemplate}} 1028 {{/Variants}} 1029 </div> 1030 1031 <small id="helpText_{{id}}" class="help-text {{hideViewMore}} {{hideHelpText}}">@Translate("Please select variant!")</small> 1032 @if (!onlyPreview) 1033 { 1034 <div class="grid__cell-footer"> 1035 <div class="grid__cell"> 1036 <div class="product-list__list-item__price-actions dw-mod"> 1037 <div class="u-margin-bottom"> 1038 <div class="before-price {{onSale}} dw-mod">{{discount}}</div> 1039 <div class="price dw-mod">{{price}}</div> 1040 </div> 1041 <div class="buttons-collection buttons-collection--right"> 1042 <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> 1043 <input type="number" class="u-w80px u-pull--right {{aswoCheck}}" id="Quantity_{{id}}" name="Quantity{{id}}" value="1" min="1"> 1044 1045 <input type="checkbox" id="UnitOptions_{{id}}" class="dropdown-trigger" /> 1046 <div class="dropdown u-w110px u-w100px--xs {{hasUnits}} dw-mod"> 1047 <label class="dropdown__header dropdown__btn dw-mod" for="UnitOptions_{{id}}">{{unitName}}</label> 1048 <div id="unitOptions" class="dropdown__content dw-mod"> 1049 {{#unitOptions}} 1050 {{>UnitOption}} 1051 {{/unitOptions}} 1052 </div> 1053 <label class="dropdown-trigger-off" for="UnitOptions_{{id}}"></label> 1054 </div> 1055 <input type="hidden" value="{{unitId}}" name="Unit{{id}}" id="Unit_{{id}}" /> 1056 </div> 1057 </div> 1058 </div> 1059 </div> 1060 } 1061 else 1062 { 1063 <button type="button" id="CartButton_{{id}}" class="u-hidden"></button> 1064 } 1065 </div> 1066 </div> 1067 {{/.}} 1068 </script> 1069 1070 @* Grid view *@ 1071 1072 <script id="AppliancesItemContainer" type="text/x-template"> 1073 {{#.}} 1074 <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}}"> 1075 {{#Appliances}} 1076 {{>ApplianceItem}} 1077 {{/Appliances}} 1078 </div> 1079 {{/.}} 1080 </script> 1081 1082 <script id="ApplianceItem" type="text/x-template"> 1083 {{#.}} 1084 <div class="grid__cell"> 1085 <div class="product-list__details-item__left dw-mod"> 1086 <div class="lightbox u-hidden-xxs hidden"> 1087 <a href="@cleanProductsPage{{geraeteid}}&AppName={{geraetename}}&geraeteart={{geraeteart}}" onclick="Scroll.SavePosition(event)"> 1088 <img class="lightbox__image {{noImage}}" src="{{noImage}}" alt="{{geraetename}}" /> 1089 <div class="u-margin-right {{noImage}}" style="width:40px;"> 1090 <img src="{{aswoJson}}" alt="{{name}}" height="35" style="margin:0 auto;" /> 1091 </div> 1092 </a> 1093 </div> 1094 <div class="u-margin-right"> 1095 <a href="@cleanProductsPage{{geraeteid}}&AppName={{geraetename}}&geraeteart={{geraeteart}}" onclick="Scroll.SavePosition(event)" title="{{name}}"><h6 class="u-no-margin">{{geraetehersteller}} {{geraetename}}</h6></a> 1096 <div class="item-number item-number--compressed dw-mod"> 1097 {{geraetehersteller}} {{geraeteart}} 1098 1099 </div> 1100 </div> 1101 </div> 1102 <div class="product-list__details-item__right dw-mod"> 1103 1104 <div class="grid__cell grid__cell--align-middle-right"> 1105 1106 <div class="favorites u-pull--right u-margin-right {{hasVariants}} dw-mod" {{hasVariants}}> 1107 1108 </div> 1109 1110 <div class="u-pull--right"> 1111 <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> 1112 </div> 1113 1114 <div class="favorites favorites--lg u-hidden {{hasVariants}} u-hidden-xs u-hidden-xxs dw-mod" {{hasVariants}}> 1115 1116 </div> 1117 </div> 1118 </div> 1119 <div class="grid__cell-footer stickers-container stickers-container--block dw-mod"> 1120 1121 </div> 1122 </div> 1123 {{/.}} 1124 </script> 1125 1126 <script id="ProductGroupContainer" type="text/x-template"> 1127 {{#.}} 1128 <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"> 1129 1130 <div class="grid__cell product-list__grid-item__image dw-mod"> 1131 1132 <a href="{{link}}"> 1133 <img style="max-height:200px;" class="grid__cell-img grid__cell-img--centered u-padding" src="{{image}}" alt="{{groupName}}" /> 1134 </a> 1135 1136 1137 </div> 1138 1139 <div class="grid__cell product-list__grid-item__price-info {{shortGridInfo}} dw-mod"> 1140 <a href="{{link}}" style="{{disableLink}}" onclick="{{savePosition}}" title="{{groupName}}"><h6 class="u-condensed-text">{{groupName}}</h6></a> 1141 <div class="item-number dw-mod">{{description}}</div> 1142 @if (!onlyPreview) 1143 { 1144 <div class="price dw-mod">{{price}}</div> 1145 <div class="before-price {{onSale}} dw-mod">{{discount}}</div> 1146 } 1147 <input type="hidden" id="Quantity_{{id}}" name="Quantity{{id}}" value="1" min="1"> 1148 <input type="hidden" value="{{unitId}}" name="Unit{{id}}" id="Unit_{{id}}" /> 1149 <input type="hidden" value="{{variantid}}" name="VariantID{{id}}" id="Variant_{{id}}" /> 1150 </div> 1151 1152 <div class="product-list__grid-item__footer dw-mod "> 1153 <div class="u-ta-center {{aswoCheck}}"> 1154 <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> 1155 </div> 1156 </div> 1157 </div> 1158 {{/.}} 1159 </script> 1160 1161 <script id="ProductGridItemContainer" type="text/x-template"> 1162 {{#.}} 1163 <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"> 1164 {{#Product}} 1165 {{>ProductGridItem}} 1166 {{/Product}} 1167 </div> 1168 {{/.}} 1169 </script> 1170 1171 <script id="ProductGridItem" type="text/x-template"> 1172 {{#.}} 1173 <input type="hidden" name="ProductLoopCounter{{id}}" value="{{id}}" /> 1174 <input type="hidden" name="ProductID{{id}}" value="{{productId}}" /> 1175 1176 <div class="grid__cell product-list__grid-item__image dw-mod"> 1177 <div class="stickers-container dw-mod"> 1178 {{#Stickers}} 1179 {{>Sticker}} 1180 {{/Stickers}} 1181 </div> 1182 <a href="{{link}}" style="{{disableLink}}" onclick="{{savePosition}}"> 1183 <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}}" /> 1184 </a> 1185 1186 <div class="favorites favorites--for-grid-view u-pull--right {{hasVariants}} dw-mod" {{hasVariants}}> 1187 {{#Favorite}} 1188 {{>FavoriteTemplate}} 1189 {{/Favorite}} 1190 </div> 1191 </div> 1192 1193 <div class="grid__cell product-list__grid-item__price-info {{shortGridInfo}} dw-mod"> 1194 <a href="{{link}}" style="{{disableLink}}" onclick="{{savePosition}}" title="{{name}}"><h6 class="u-condensed-text">{{name}}</h6></a> 1195 1196 1197 1198 <div class="stock-icon" style='background-color:#{{stockUnit}}'></div><span class="item-number">{{stockText}}{{deliveryTimeText}}</span> 1199 1200 @if (!onlyPreview) 1201 { 1202 <div class="price dw-mod">{{price}}</div> 1203 <div class="before-price {{onSale}} dw-mod">{{discount}}</div> 1204 } 1205 <input type="hidden" id="Quantity_{{id}}" name="Quantity{{id}}" value="1" min="1"> 1206 <input type="hidden" value="{{unitId}}" name="Unit{{id}}" id="Unit_{{id}}" /> 1207 <input type="hidden" value="{{variantid}}" name="VariantID{{id}}" id="Variant_{{id}}" /> 1208 </div> 1209 1210 <div class="product-list__grid-item__footer dw-mod "> 1211 <div class="u-ta-center {{aswoCheck}}"> 1212 <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> 1213 </div> 1214 </div> 1215 {{/.}} 1216 </script> 1217 1218 @* Details view *@ 1219 1220 <script id="ProductDetailsItemContainer" type="text/x-template"> 1221 {{#.}} 1222 <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}}"> 1223 {{#Product}} 1224 {{>ProductDetailsItem}} 1225 {{/Product}} 1226 </div> 1227 {{/.}} 1228 </script> 1229 1230 <script id="ProductDetailsItem" type="text/x-template"> 1231 {{#.}} 1232 <input type="hidden" name="ProductLoopCounter{{id}}" value="{{id}}" /> 1233 <input type="hidden" name="ProductID{{id}}" value="{{productId}}" /> 1234 1235 <div class="grid__cell"> 1236 <div class="product-list__details-item__left dw-mod"> 1237 <div class="lightbox u-hidden-xxs"> 1238 <a href="{{link}}" style="{{disableLink}}" onclick="{{savePosition}}"> 1239 <img class="lightbox__image {{noImage}}" src="{{image}}" alt="{{name}}" /> 1240 <div class="u-margin-right {{noImage}}" style="width:40px;"> 1241 <img src="{{image}}" alt="{{name}}" height="35" style="margin:0 auto;" /> 1242 </div> 1243 </a> 1244 </div> 1245 <div class="u-margin-right"> 1246 <a href="{{link}}" style="{{disableLink}}" onclick="{{savePosition}}" title="{{name}}"><h6 class="u-no-margin">{{name}}</h6></a> 1247 <div class="item-number item-number--compressed dw-mod"> 1248 {{number}} 1249 @if (!onlyPreview) 1250 { 1251 @*<span> 1252 <span class="stock-icon {{stockState}} dw-mod" title="{{stockText}}"></span> {{stockText}}{{deliveryText}} 1253 </span>*@ 1254 <span> 1255 1256 1257 <div class="stock-icon" style='background-color:#{{stockUnit}}'></div><span class="item-number">{{stockText}}{{deliveryTimeText}}</span> 1258 1259 </span> 1260 } 1261 </div> 1262 </div> 1263 </div> 1264 <div class="product-list__details-item__right dw-mod"> 1265 @if (!onlyPreview) 1266 { 1267 <div class="grid__cell u-hidden-sm u-hidden-md u-hidden-lg"> 1268 <div class="u-full-width u-ta-right"> 1269 <div class="before-price {{onSale}} dw-mod">{{discount}}</div> 1270 <div class="price price--condensed dw-mod">{{price}}</div> 1271 </div> 1272 </div> 1273 } 1274 <div class="grid__cell grid__cell--align-middle-right"> 1275 @if (!onlyPreview) 1276 { 1277 <div class="u-pull--right u-margin-right"> 1278 <input type="checkbox" id="UnitOptions_{{id}}" class="dropdown-trigger" /> 1279 <div class="dropdown u-w120px {{hasUnits}} dw-mod"> 1280 <label class="dropdown__header dropdown__btn dw-mod" for="UnitOptions_{{id}}">{{unitName}}</label> 1281 <div id="unitOptions" class="dropdown__content dw-mod"> 1282 {{#unitOptions}} 1283 {{>UnitOption}} 1284 {{/unitOptions}} 1285 </div> 1286 <label class="dropdown-trigger-off" for="UnitOptions_{{id}}"></label> 1287 </div> 1288 <input type="hidden" value="{{unitId}}" name="Unit{{id}}" id="Unit_{{id}}" /> 1289 <input type="hidden" value="{{variantid}}" name="VariantID{{id}}" id="Variant_{{id}}" /> 1290 </div> 1291 } 1292 <div class="favorites u-pull--right u-margin-right {{hasVariants}} dw-mod" {{hasVariants}}> 1293 {{#Favorite}} 1294 {{>FavoriteTemplate}} 1295 {{/Favorite}} 1296 </div> 1297 @if (!onlyPreview) 1298 { 1299 <div class="u-pull--right u-margin-right u-w100px u-ta-right u-hidden-xs u-hidden-xxs"> 1300 <div class="before-price {{onSale}} dw-mod">{{discount}}</div> 1301 <div class="price price--condensed dw-mod">{{price}}</div> 1302 </div> 1303 <div class="u-pull--right {{hideBuyOptions}}"> 1304 <input type="number" class="u-w80px u-no-margin u-margin-right {{aswoCheck}}" id="Quantity_{{id}}" name="Quantity{{id}}" value="1" min="1"> 1305 </div> 1306 <div class="u-pull--right {{hideBuyOptions}}"> 1307 <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> 1308 </div> 1309 <div class="u-pull--right {{hideViewMore}}"> 1310 <a href="{{link}}" class="btn btn--secondary u-no-margin u-w130px dw-mod" onclick="{{savePosition}}" title="{{name}}">@Translate("View")</a> 1311 </div> 1312 } 1313 else 1314 { 1315 <div class="u-pull--right"> 1316 <a href="{{link}}" class="btn btn--secondary u-no-margin u-w130px dw-mod" onclick="{{savePosition}}" title="{{name}}">@Translate("View")</a> 1317 </div> 1318 } 1319 <div class="favorites favorites--lg u-hidden {{hasVariants}} u-hidden-xs u-hidden-xxs dw-mod" {{hasVariants}}> 1320 {{#Favorite}} 1321 {{>FavoriteListItem}} 1322 {{/Favorite}} 1323 </div> 1324 </div> 1325 </div> 1326 <div class="grid__cell-footer stickers-container stickers-container--block dw-mod"> 1327 {{#Stickers}} 1328 {{>MiniSticker}} 1329 {{/Stickers}} 1330 </div> 1331 </div> 1332 {{/.}} 1333 </script> 1334 1335 <script id="Sticker" type="text/x-template"> 1336 <div class="stickers-container__tag {{className}} dw-mod">{{text}}</div> 1337 </script> 1338 1339 <script id="MiniSticker" type="text/x-template"> 1340 <div class="stickers-container__tag stickers-container__tag--micro {{className}} dw-mod">{{text}}</div> 1341 </script> 1342 1343 @* Units templates *@ 1344 1345 <script id="UnitOption" type="text/x-template"> 1346 <div class="dropdown__item dw-mod" onclick="HandlebarsBolt.UpdateContent('Product{{id}}', '{{link}}&feed=true&UnitID={{value}}&rid={{id}}')">{{name}}</div> 1347 </script> 1348 1349 @* Variants templates *@ 1350 1351 <script id="VariantsTemplate" type="text/x-template"> 1352 {{#.}} 1353 <div> 1354 <div class="u-bold">{{name}}</div> 1355 <div id="VariantOptions{{id}}"> 1356 {{#VariantOptions}} 1357 {{>VariantOption}} 1358 {{/VariantOptions}} 1359 </div> 1360 </div> 1361 {{/.}} 1362 </script> 1363 1364 <script id="VariantOption" type="text/x-template"> 1365 <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> 1366 </script> 1367 1368 <script id="VariantOptionImage" type="text/x-template"> 1369 <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}} /> 1370 </script> 1371 1372 <script id="VariantCombinations" type="text/x-template"> 1373 </script> 1374 1375 @* Favorites templates *@ 1376 1377 <script id="FavoriteTemplate" type="text/x-template"> 1378 <div class="favorites-list u-pull--right u-ta-left"> 1379 <label for="FavoriteTrigger_{{id}}"><i class="{{favoriteIcon}} fa-1_5x"></i></label> 1380 <input type="checkbox" id="FavoriteTrigger_{{id}}" class="dropdown-trigger" /> 1381 <div class="dropdown dropdown--absolute-position"> 1382 <div class="dropdown__content dropdown__content--show-left dropdown__content--padding u-w220px dw-mod"> 1383 <ul class="list list--clean dw-mod"> 1384 {{#FavoriteLists}} 1385 {{>FavoriteListItem}} 1386 {{/FavoriteLists}} 1387 </ul> 1388 </div> 1389 <label class="dropdown-trigger-off" for="FavoriteTrigger_{{id}}"></label> 1390 </div> 1391 </div> 1392 </script> 1393 1394 <script id="FavoriteListItem" type="text/x-template"> 1395 <li> 1396 <a href="{{link}}" class="list__link u-no-underline dw-mod"><i class="{{favoriteIcon}}"></i> {{name}}</a> 1397 </li> 1398 </script> 1399 1400 <script id="ASWOImageContainer" type="text/x-template"> 1401 {{#.}} 1402 {{#if tempurl}} 1403 <img src="{{tempurl}}" alt="aswoProductImage" /> 1404 {{else}} 1405 <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}}" /> 1406 {{/if}} 1407 {{/.}} 1408 </script> 1409 1410 <script> 1411 document.addEventListener("DOMContentLoaded", function (event) { 1412 Facets.Init("productList", '@productCatalogId', '@requestQuery'); 1413 1414 Variants.SetProductFeedId('@productCatalogId'); 1415 Variants.SetViewMode("productList"); 1416 1417 document.getElementById("productList").addEventListener('contentLoaded', function (e) { 1418 //var variantsContainers = document.getElementsByClassName("js-variants-wrap"); 1419 1420 //for (var i = 0; i < variantsContainers.length; i++) { 1421 // var variantsContainerElement = variantsContainers[i]; 1422 // Variants.SetVariantOptionStatesForProductList(variantsContainerElement); 1423 //} 1424 1425 if (e.srcElement.classList.contains("js-variants-wrap")) { 1426 Variants.SetVariantOptionStatesForProductList(e.srcElement); 1427 } 1428 if (e.srcElement.id === "productList") { 1429 //Search.Init(); 1430 } 1431 }, false); 1432 }); 1433 1434 1435 </script> 1436 1437 <script> 1438 1439 function runScript(e) { 1440 1441 if (e.keyCode == 13) { 1442 1443 e.preventDefault(); 1444 msp(); 1445 1446 } 1447 } 1448 function msp() { 1449 var element = document.getElementById("search2"); 1450 removeParams(element.value); 1451 } 1452 1453 function filterVGroup(el) { 1454 1455 removeVGroupParams(el.value); 1456 } 1457 1458 function removeParams(sParam) { 1459 var url = window.location.href.split('?')[0] + '?'; 1460 var sPageURL = decodeURIComponent(window.location.search.substring(1)), 1461 sURLVariables = sPageURL.split('&'), 1462 sParameterName, 1463 i; 1464 1465 for (i = 0; i < sURLVariables.length; i++) { 1466 sParameterName = sURLVariables[i].split('='); 1467 1468 if (sParameterName[0]) { 1469 if (sParameterName[0] != sParam) { 1470 url = url + sParameterName[0] + '=' + sParameterName[1] + '&'; 1471 } 1472 } 1473 1474 } 1475 if (document.location.href.indexOf('?') === -1) { 1476 1477 1478 setUrlParameter("@GetGlobalValue("Global:Request.Url")", "&search2", sParam); 1479 1480 } 1481 else { 1482 setUrlParameter(url, "search2", sParam); 1483 } 1484 1485 1486 } 1487 1488 function removeVGroupParams(sParam) { 1489 var url = window.location.href.split('?')[0] + '?'; 1490 var sPageURL = decodeURIComponent(window.location.search.substring(1)), 1491 sURLVariables = sPageURL.split('&'), 1492 sParameterName, 1493 i; 1494 1495 for (i = 0; i < sURLVariables.length; i++) { 1496 sParameterName = sURLVariables[i].split('='); 1497 1498 if (sParameterName[0]) { 1499 if (sParameterName[0] != sParam) { 1500 url = url + sParameterName[0] + '=' + sParameterName[1] + '&'; 1501 } 1502 } 1503 1504 } 1505 if (document.location.href.indexOf('?') === -1) { 1506 1507 1508 setUrlParameter("@GetGlobalValue("Global:Request.Url")", "&aswovgroup", sParam); 1509 1510 } 1511 else { 1512 setUrlParameter(url, "aswovgroup", sParam); 1513 } 1514 1515 1516 } 1517 1518 function setUrlParameter(url, key, value) { 1519 var baseUrl = url.split('?')[0], 1520 urlQueryString = '?' + url.split('?')[1], 1521 newParam = key + '=' + value, 1522 params = '?' + newParam; 1523 1524 // If the "search" string exists, then build params from it 1525 if (urlQueryString) { 1526 var updateRegex = new RegExp('([\?&])' + key + '[^&]*'); 1527 var removeRegex = new RegExp('([\?&])' + key + '=[^&;]+[&;]?'); 1528 1529 if (typeof value === 'undefined' || value === null || value === '') { // Remove param if value is empty 1530 params = urlQueryString.replace(removeRegex, "$1"); 1531 params = params.replace(/[&;]$/, ""); 1532 1533 } else if (urlQueryString.match(updateRegex) !== null) { // If param exists already, update it 1534 params = urlQueryString.replace(updateRegex, "$1" + newParam); 1535 params = params.substring(0, params.length - 1); 1536 1537 } else { // Otherwise, add it to end of query string 1538 params = urlQueryString + newParam; 1539 } 1540 } 1541 1542 // no parameter was set so we don't need the question mark 1543 params = params === '?' ? '' : params; 1544 location.href = baseUrl + params; 1545 } 1546 1547 </script> 1548 1549 <script> 1550 function getArticleDetail(id) { 1551 $.getJSON("@feedPage&ASWO_action=articleDetails" + "&ASWO_productId=" + id, function (data) { 1552 1553 }); 1554 } 1555 1556 function getArticleImage(id) { 1557 $.getJSON("@feedPage&ASWO_action=articlePicture" + "&ASWO_productId=" + id, function (data) { 1558 1559 }); 1560 } 1561 1562 1563 </script> 1564