Error compiling template "Designs/CHG/eCom/Productlist/FeaturedOnBrandsPage.cshtml"
Line 12036: The name 'GetPriceLabel' does not exist in the current context

1 //------------------------------------------------------------------------------ 2 // <auto-generated> 3 // This code was generated by a tool. 4 // Runtime Version:4.0.30319.42000 5 // 6 // Changes to this file may cause incorrect behavior and will be lost if 7 // the code is regenerated. 8 // </auto-generated> 9 //------------------------------------------------------------------------------ 10 11 namespace CompiledRazorTemplates.Dynamic { 12 13 #line 3121 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 14 using System; 15 16 #line default 17 #line hidden 18 19 #line 3777 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 20 using System.Collections.Generic; 21 22 #line default 23 #line hidden 24 25 #line 3123 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 26 using System.Linq; 27 28 #line default 29 #line hidden 30 31 #line 3869 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 32 using Dynamicweb.Rendering; 33 34 #line default 35 #line hidden 36 37 #line 3129 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 38 using Dna.Validation; 39 40 #line default 41 #line hidden 42 43 #line 2647 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 44 using System.Text; 45 46 #line default 47 #line hidden 48 49 #line 3124 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 50 using System.Web; 51 52 #line default 53 #line hidden 54 55 #line 3125 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 56 using Dna.Frontend; 57 58 #line default 59 #line hidden 60 61 #line 3779 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 62 using Dna.Frontend.UI; 63 64 #line default 65 #line hidden 66 67 #line 3778 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 68 using Dna.Frontend.Forms; 69 70 #line default 71 #line hidden 72 73 #line 2651 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 74 using Dna.UrlServices; 75 76 #line default 77 #line hidden 78 79 #line 3870 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 80 using Dynamicweb.Core; 81 82 #line default 83 #line hidden 84 85 #line 3781 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 86 using Dynamicweb.Forms; 87 88 #line default 89 #line hidden 90 91 #line 18 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 92 using Dynamicweb.Content; 93 94 #line default 95 #line hidden 96 97 #line 3131 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 98 using Dynamicweb.Ecommerce; 99 100 #line default 101 #line hidden 102 103 #line 2377 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 104 using Dynamicweb.Security.UserManagement; 105 106 #line default 107 #line hidden 108 109 #line 22 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 110 using SF.Snowball; 111 112 #line default 113 #line hidden 114 115 #line 25 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 116 using System.IO; 117 118 #line default 119 #line hidden 120 121 #line 29 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 122 using System.Text.RegularExpressions; 123 124 #line default 125 #line hidden 126 127 #line 31 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 128 using System.Collections.Specialized; 129 130 #line default 131 #line hidden 132 133 #line 2378 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 134 using Lucene.Net.Search; 135 136 #line default 137 #line hidden 138 139 #line 3128 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 140 using Dna.ImageProcessing; 141 142 #line default 143 #line hidden 144 145 #line 3133 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 146 using FieldType = Dynamicweb.Forms.FieldType; 147 148 #line default 149 #line hidden 150 151 152 public class RazorEngine_d3fc03497f3f46c6a6c7d1deddec0f0a : RazorTemplateBase<RazorTemplateModel<Template>> { 153 154 #line hidden 155 156 #line 40 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 157 158 159 #region Url functions 160 161 public string GetCustomerCenterSortUrl(string field, string listType = "Order") 162 { 163 var paragraphId = Pageview.CurrentParagraph.ID.ToString(); 164 var sortDirectionParameter = "CCSort" + listType + paragraphId; 165 var sortFieldParameter = "CC" + listType + "ByField" + paragraphId; 166 var sortDirection = Sanitize.Parameter(sortDirectionParameter) == "Desc" || Sanitize.Parameter(sortFieldParameter) == field ? "Desc" : "Asc"; 167 168 if (field.IsNotNullOrEmpty()) 169 { 170 return "/Default.aspx?Id=" + Pageview.Page.ID + "&" + sortFieldParameter + "=" + field + "&" + sortDirectionParameter + "=" + sortDirection; 171 } 172 173 return string.Empty; 174 } 175 176 public string GetSortFieldParameter(string key, string field = "", string listType = "Order") 177 { 178 var paragraphId = Pageview.CurrentParagraph.ID.ToString(); 179 if (key.IsNullOrEmpty()) throw new NotSupportedException("'key' is a required field"); 180 181 switch (key) 182 { 183 case "name": 184 var parameter = "CC" + listType + "ByField" + paragraphId; 185 return Sanitize.Parameter(parameter); 186 case "value": 187 if (field.IsNullOrEmpty()) return "asc"; 188 var sortDirectionParameter = "CCSort" + listType + paragraphId; 189 var sortFieldParameter = "CC" + listType + "ByField" + paragraphId; 190 return Sanitize.Parameter(sortDirectionParameter) == "Desc" || Sanitize.Parameter(sortFieldParameter) == field ? "Desc" : "Asc"; 191 default: 192 throw new NotSupportedException(string.Format("The key '{0}' in not supported", key)); 193 } 194 } 195 196 #endregion Url functions 197 198 #region Generic functions 199 200 public static string GetAttributes(Dictionary<string, string> attributes) 201 { 202 if (attributes == null || !attributes.Any()) 203 { 204 return string.Empty; 205 } 206 207 var attributesConcat = attributes.Aggregate(string.Empty, (current, attribute) => current + GetAttribute(attribute.Key, attribute.Value)); 208 209 return attributesConcat; 210 } 211 212 public static string GetAttribute(string attributeName, string attributeValue) 213 { 214 if (attributeValue.IsNullOrEmpty() && !attributeName.Equals("value", StringComparison.InvariantCultureIgnoreCase)) return string.Empty; 215 return " " + attributeName + "=\"" + attributeValue + "\""; 216 } 217 218 #endregion Generic functions 219 220 #region Files functions 221 222 const string ImagesListTitleKey = "title"; 223 const string ImagesListImageKey = "image"; 224 225 /// <summary> 226 /// Gets the list of files from a folder. 227 /// </summary> 228 /// <return>Item1 is filename (with extension), Item2 is the title and Item3 is the FileType.</return> 229 public static List<Tuple<string,string,FileType>> GetFilesInFolder(string defaultFile, string searchPattern, string fileTitle = "", bool addDefaultFile = true) 230 { 231 var files = new List<Tuple<string,string,FileType>>(); 232 var mapPath = HttpContext.Current.Server.MapPath(defaultFile); 233 var folderServerPath = Path.GetDirectoryName(mapPath); 234 235 if (!Directory.Exists(folderServerPath)) return files; 236 237 // Get Images from folder 238 const string temp = @"\"; 239 const string metafield = "title"; 240 var metadata = Dynamicweb.Content.Files.Metadata.EditorFactory.GetMetadataForFile(defaultFile); 241 var title = metadata != null && metadata.GetValue(metafield).IsNotNullOrEmpty() ? metadata.GetValue(metafield) : fileTitle; 242 var folderWebPath = defaultFile.Contains("/") ? defaultFile.Substring(0, defaultFile.LastIndexOf("/")) : defaultFile; 243 244 var dctImage = new Dictionary<string, string>(); 245 246 if (addDefaultFile && File.Exists(mapPath)) 247 { 248 files.Add(new Tuple<string, string, FileType>(defaultFile, title, defaultFile.GetFileType())); 249 } 250 251 foreach (var file in Directory.GetFiles(folderServerPath, searchPattern)) 252 { 253 var filePath = folderWebPath + "/" + file.Substring(file.LastIndexOf(temp, StringComparison.Ordinal) + 1, file.Length - file.LastIndexOf(temp, StringComparison.Ordinal) - 1); 254 metadata = Dynamicweb.Content.Files.Metadata.EditorFactory.GetMetadataForFile(filePath); 255 title = metadata != null && metadata.GetValue(metafield).IsNullOrEmpty() ? metadata.GetValue(metafield) : fileTitle; 256 257 files.Add(new Tuple<string, string, FileType>(filePath, title, file.GetFileType())); 258 } 259 260 return files; 261 } 262 /// <summary> 263 /// Gets the list of image or HTML5 video files from a folder. 264 /// </summary> 265 /// <return>Item1 is filename (with extension), Item2 is the title and Item3 is the FileType (Image, Video).</return> 266 public static List<Tuple<string,string,FileType>> GetMediaFilesInFolder(string defaulMedia, string searchPattern, string defaultName = "", bool addDefaultMedia = true) 267 { 268 return GetFilesInFolder(defaulMedia, searchPattern, defaultName, addDefaultMedia).Where(f => f.Item3 == FileType.Image || f.Item3 == FileType.Video).ToList(); 269 } 270 271 #endregion Files functions 272 273 #region Image functions 274 275 public static Dictionary<string, string> GetWidthAndHeightFromQueryString(string imageSource, bool addSource = false) 276 { 277 var widthAndHeight = new Dictionary<string, string>(); 278 279 if(imageSource.Contains("?")){ 280 var querySubstring = imageSource.Substring(imageSource.LastIndexOf('?') + 1); 281 var queryParams = HttpUtility.HtmlDecode(querySubstring).Split('&'); 282 283 if (!queryParams.Any()) 284 return widthAndHeight; 285 286 foreach (var param in queryParams.Where(k => k.StartsWith("width") || k.StartsWith("height"))) 287 { 288 var keyValuePair = param.Split('='); 289 290 if (keyValuePair[1].IsNotNullOrEmpty()) 291 { 292 widthAndHeight.Add(keyValuePair[0].ToLower(), keyValuePair[1]); 293 } 294 } 295 } 296 else if(imageSource.Contains("width") || imageSource.Contains("height")) 297 { 298 var queryParams = imageSource.Split('/'); 299 var imgParam = string.Empty; 300 301 foreach (var param in queryParams) 302 { 303 switch (imgParam) 304 { 305 case "width": 306 widthAndHeight.Add("width", param); 307 break; 308 case "height": 309 widthAndHeight.Add("height", param); 310 break; 311 } 312 313 switch (param) 314 { 315 case "width": 316 imgParam = "width"; 317 break; 318 case "height": 319 imgParam = "height"; 320 break; 321 default: 322 imgParam = string.Empty; 323 break; 324 } 325 } 326 } 327 328 if (addSource && imageSource.IsNotNullOrEmpty()) 329 { 330 widthAndHeight.Add("srcset", imageSource); 331 } 332 333 return widthAndHeight; 334 } 335 336 #endregion Image functions 337 338 #region Form Field functions 339 340 public string GetWrapperStart(bool includeWrapper, FieldType fieldType, string htmlElement, bool isRequired = false, string fieldClass = "") 341 { 342 if (!includeWrapper || htmlElement.IsNullOrEmpty()) return string.Empty; 343 var cssClass = new List<string> {fieldType.ToString().ToLower(), fieldClass}; 344 if (isRequired) 345 { 346 cssClass.Add("mandatory"); 347 } 348 var attributes = new Dictionary<string, string>() 349 { 350 {"class", string.Join(" ", cssClass.ToArray())} 351 }; 352 return GetHtmlElement(htmlElement, attributes); 353 } 354 355 public string GetWrapperEnd(bool includeWrapper, string htmlElement) 356 { 357 return !includeWrapper ? string.Empty : GetHtmlElement(htmlElement, true); 358 } 359 360 public string GetControlWithRequiredClass(bool isRequired, string control, string cssClass = "") 361 { 362 if (!isRequired) return control; 363 var regex = new Regex(Regex.Escape(" ")); 364 return regex.Replace(control, " required class=\"mandatory "+cssClass+"\"", 1); 365 } 366 367 public static string GetAttributes(FieldSettings settings, bool returnFieldType = true) 368 { 369 var attributes = new StringBuilder(); 370 if (returnFieldType) 371 { 372 var fieldType = string.Empty; 373 switch (settings.Type) 374 { 375 case FieldType.Select: 376 break; 377 case FieldType.Checkboxlist: 378 fieldType = FieldType.Checkbox.ToString().ToLower(); 379 break; 380 case FieldType.DatetimeLocal: 381 fieldType = "datetime-local"; 382 break; 383 case FieldType.Textarea: 384 case FieldType.File: 385 case FieldType.Text: 386 case FieldType.Hidden: 387 case FieldType.Submit: 388 case FieldType.Reset: 389 case FieldType.Radio: 390 case FieldType.Checkbox: 391 case FieldType.Divider: 392 case FieldType.Image: 393 case FieldType.Password: 394 case FieldType.Textstring: 395 case FieldType.Button: 396 case FieldType.Search: 397 case FieldType.Email: 398 case FieldType.Url: 399 case FieldType.Tel: 400 case FieldType.Number: 401 case FieldType.Range: 402 case FieldType.Date: 403 case FieldType.Month: 404 case FieldType.Week: 405 case FieldType.Time: 406 case FieldType.Datetime: 407 case FieldType.Color: 408 case FieldType.Unknown: 409 default: 410 fieldType = settings.Type.ToString().ToLower(); 411 break; 412 } 413 if (!settings.Attributes.ContainsKey("type")) 414 { 415 attributes.Append(GetAttribute("type", fieldType)); 416 } 417 } 418 attributes.Append(GetAttribute("class", settings.CssClass)); 419 attributes.Append(GetAttribute("id", settings.Id)); 420 attributes.Append(GetAttribute("name", settings.SystemName)); 421 attributes.Append(GetAttribute("value", settings.Value)); 422 if (settings.Type == FieldType.Email || settings.Type == FieldType.Password || settings.Type == FieldType.Search || settings.Type == FieldType.Tel || settings.Type == FieldType.Text || settings.Type == FieldType.Url || settings.Type == FieldType.Textarea) 423 { 424 // Only works wit these types 425 attributes.Append(GetAttribute("placeholder", settings.Placeholder)); 426 } 427 if (settings.Type == FieldType.Datetime) 428 { 429 attributes.Append(GetAttribute("placeholder", "&#x1f4c5;")); 430 } 431 if (settings.Type != FieldType.Checkboxlist) 432 { 433 attributes.Append(GetAttribute("required", settings.IsRequired)); 434 } 435 attributes.Append(GetAttributes(settings.Attributes)); 436 return attributes.ToString(); 437 } 438 439 public static string GetAttributes(FieldOption optionSettings, FieldType fieldType = FieldType.Select) 440 { 441 var attributes = new StringBuilder(); 442 if (fieldType != FieldType.Select) 443 { 444 attributes.Append(GetAttribute("name", optionSettings.SystemName)); 445 } 446 attributes.Append(GetAttribute("value", optionSettings.Value)); 447 attributes.Append(GetAttributes(optionSettings.Attributes)); 448 return attributes.ToString(); 449 } 450 451 public static string GetAttribute(string attributeName, bool attributeValue) 452 { 453 if (!attributeValue) return string.Empty; 454 return " " + attributeName + "=\"" + attributeName + "\""; 455 } 456 457 #endregion 458 459 #region Dynamicweb Template Engine Workaround 460 461 public static string GetHtmlElement(string element, bool isClosingElement = false) 462 { 463 return GetHtmlElementForDw(element, null, string.Empty, isClosingElement); 464 } 465 466 public static string GetHtmlElement(string element, Dictionary<string, string> attributes, bool isClosingElement = false) 467 { 468 return GetHtmlElementForDw(element, attributes, string.Empty, isClosingElement); 469 } 470 471 public static string GetHtmlElement(string element, string processedAttributes, bool isClosingElement = false) 472 { 473 return GetHtmlElementForDw(element, null, processedAttributes, isClosingElement); 474 } 475 476 private static string GetHtmlElementForDw(string element, Dictionary<string, string> attributes = null, string processedAttributes = "", bool isClosingElement = false) 477 { 478 var result = new StringBuilder("<"); 479 480 if (attributes != null || processedAttributes.IsNotNullOrEmpty()) 481 { 482 result.Append(element); 483 if (attributes != null) 484 { 485 result.Append(GetAttributes(attributes)); 486 } 487 else if (processedAttributes.IsNotNullOrEmpty()) 488 { 489 result.Append(processedAttributes); 490 } 491 if (isClosingElement) 492 { 493 result.Append("/"); 494 } 495 } 496 else 497 { 498 if (isClosingElement) 499 { 500 result.Append("/"); 501 } 502 result.Append(element); 503 } 504 505 result.Append(">"); 506 507 return result.ToString(); 508 } 509 510 #endregion Dynamicweb Template Engine Workaround 511 512 #line default 513 #line hidden 514 515 516 #line 398 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 517 public RazorEngine.Templating.TemplateWriter InternalRenderTabHeader(string key, string label, string cssClass = "") 518 { 519 #line default 520 #line hidden 521 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 522 523 #line 399 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 524 525 526 527 #line default 528 #line hidden 529 530 #line 400 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 531 WriteTo(__razor_helper_writer, SnippetStart("tabHeaders")); 532 533 534 #line default 535 #line hidden 536 537 #line 400 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 538 539 540 541 #line default 542 #line hidden 543 WriteLiteralTo(__razor_helper_writer, " <li"); 544 545 WriteAttributeTo(__razor_helper_writer, "class", Tuple.Create(" class=\"", 15538), Tuple.Create("\"", 15555) 546 547 #line 401 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 548 , Tuple.Create(Tuple.Create("", 15546), Tuple.Create<System.Object, System.Int32>(cssClass 549 550 #line default 551 #line hidden 552 , 15546), false) 553 ); 554 555 WriteLiteralTo(__razor_helper_writer, ">\r\n <a"); 556 557 WriteAttributeTo(__razor_helper_writer, "href", Tuple.Create(" href=\"", 15573), Tuple.Create("\"", 15584) 558 559 #line 402 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 560 , Tuple.Create(Tuple.Create("", 15580), Tuple.Create<System.Object, System.Int32>(key 561 562 #line default 563 #line hidden 564 , 15580), false) 565 ); 566 567 WriteLiteralTo(__razor_helper_writer, ">"); 568 569 570 #line 402 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 571 WriteTo(__razor_helper_writer, label); 572 573 574 #line default 575 #line hidden 576 WriteLiteralTo(__razor_helper_writer, "</a>\r\n </li>\r\n"); 577 578 579 #line 404 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 580 581 582 #line default 583 #line hidden 584 585 #line 404 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 586 WriteTo(__razor_helper_writer, SnippetEnd("tabHeaders")); 587 588 589 #line default 590 #line hidden 591 592 #line 404 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 593 594 595 596 #line default 597 #line hidden 598 }); 599 600 #line 405 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 601 } 602 #line default 603 #line hidden 604 605 606 #line 409 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 607 public RazorEngine.Templating.TemplateWriter InternalRenderGoToFirstPage(NameValueCollection queryParameters, string pageNumQueryParameter, int currentPage, int numOfPages, int loopPageSize, int currentPageNum = 0) 608 { 609 #line default 610 #line hidden 611 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 612 613 #line 410 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 614 615 if (currentPageNum == 0) 616 { 617 currentPageNum = currentPage; 618 } 619 620 if (currentPage > 2 && numOfPages > loopPageSize && currentPageNum != 1) 621 { 622 queryParameters.Remove(pageNumQueryParameter); 623 624 625 #line default 626 #line hidden 627 628 #line 419 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 629 WriteTo(__razor_helper_writer, InternalRenderPageItem(queryParameters, "1")); 630 631 632 #line default 633 #line hidden 634 635 #line 419 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 636 637 638 639 #line default 640 #line hidden 641 642 #line 420 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 643 WriteTo(__razor_helper_writer, InternalRenderEllipsis()); 644 645 646 #line default 647 #line hidden 648 649 #line 420 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 650 651 } 652 653 654 #line default 655 #line hidden 656 }); 657 658 #line 422 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 659 } 660 #line default 661 #line hidden 662 663 664 #line 424 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 665 public RazorEngine.Templating.TemplateWriter InternalRenderGoToLastPage(NameValueCollection queryParameters, string pageNumQueryParameter, int currentPage, int numOfPages, int loopPageSize, int endPage) 666 { 667 #line default 668 #line hidden 669 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 670 671 #line 425 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 672 673 if (currentPage < numOfPages - 1 && numOfPages > loopPageSize && endPage != numOfPages) 674 { 675 queryParameters = Dna.UrlServices.Helpers.UpdateQueryStringKeyValue(queryParameters, pageNumQueryParameter, numOfPages.ToString()); 676 677 678 #line default 679 #line hidden 680 681 #line 429 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 682 WriteTo(__razor_helper_writer, InternalRenderEllipsis()); 683 684 685 #line default 686 #line hidden 687 688 #line 429 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 689 690 691 692 #line default 693 #line hidden 694 695 #line 430 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 696 WriteTo(__razor_helper_writer, InternalRenderPageItem(queryParameters, numOfPages.ToString())); 697 698 699 #line default 700 #line hidden 701 702 #line 430 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 703 704 } 705 706 707 #line default 708 #line hidden 709 }); 710 711 #line 432 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 712 } 713 #line default 714 #line hidden 715 716 717 #line 434 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 718 public RazorEngine.Templating.TemplateWriter InternalRenderPageItem(NameValueCollection queryParameters, string pageNum, string cssClass = "") 719 { 720 #line default 721 #line hidden 722 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 723 724 #line 435 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 725 726 var url = Dna.UrlServices.Helpers.GetCurrentUrl(true, true); 727 var href = Dna.UrlServices.Helpers.BuildUri(url, queryParameters); 728 729 730 731 #line default 732 #line hidden 733 WriteLiteralTo(__razor_helper_writer, " <li"); 734 735 WriteAttributeTo(__razor_helper_writer, "class", Tuple.Create(" class=\"", 17120), Tuple.Create("\"", 17137) 736 737 #line 439 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 738 , Tuple.Create(Tuple.Create("", 17128), Tuple.Create<System.Object, System.Int32>(cssClass 739 740 #line default 741 #line hidden 742 , 17128), false) 743 ); 744 745 WriteLiteralTo(__razor_helper_writer, ">\r\n <a"); 746 747 WriteAttributeTo(__razor_helper_writer, "href", Tuple.Create(" href=\"", 17155), Tuple.Create("\"", 17180) 748 749 #line 440 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 750 , Tuple.Create(Tuple.Create("", 17162), Tuple.Create<System.Object, System.Int32>(href.PathAndQuery 751 752 #line default 753 #line hidden 754 , 17162), false) 755 ); 756 757 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 758 759 WriteLiteralTo(__razor_helper_writer, " "); 760 761 762 #line 441 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 763 WriteTo(__razor_helper_writer, pageNum); 764 765 766 #line default 767 #line hidden 768 WriteLiteralTo(__razor_helper_writer, "\r\n </a>\r\n </li>\r\n"); 769 770 771 #line 444 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 772 773 774 #line default 775 #line hidden 776 }); 777 778 #line 444 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 779 } 780 #line default 781 #line hidden 782 783 784 #line 446 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 785 public RazorEngine.Templating.TemplateWriter InternalRenderPageItem(string href, string label, string cssPartialClass, IconPosition position) 786 { 787 #line default 788 #line hidden 789 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 790 791 #line 447 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 792 793 794 795 #line default 796 #line hidden 797 WriteLiteralTo(__razor_helper_writer, " <li>\r\n <a"); 798 799 WriteAttributeTo(__razor_helper_writer, "href", Tuple.Create(" href=\"", 17401), Tuple.Create("\"", 17413) 800 801 #line 449 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 802 , Tuple.Create(Tuple.Create("", 17408), Tuple.Create<System.Object, System.Int32>(href 803 804 #line default 805 #line hidden 806 , 17408), false) 807 ); 808 809 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 810 811 WriteLiteralTo(__razor_helper_writer, " "); 812 813 814 #line 450 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 815 WriteTo(__razor_helper_writer, RenderIcon(cssPartialClass, label, position)); 816 817 818 #line default 819 #line hidden 820 WriteLiteralTo(__razor_helper_writer, "\r\n </a>\r\n </li>\r\n"); 821 822 823 #line 453 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 824 825 826 #line default 827 #line hidden 828 }); 829 830 #line 453 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 831 } 832 #line default 833 #line hidden 834 835 836 #line 455 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 837 public RazorEngine.Templating.TemplateWriter InternalRenderEllipsis() 838 { 839 #line default 840 #line hidden 841 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 842 843 #line 456 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 844 845 846 847 #line default 848 #line hidden 849 WriteLiteralTo(__razor_helper_writer, " <li>\r\n <span>...</span>\r\n </li>\r\n"); 850 851 852 #line 460 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 853 854 855 #line default 856 #line hidden 857 }); 858 859 #line 460 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 860 } 861 #line default 862 #line hidden 863 864 865 #line 464 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 866 public RazorEngine.Templating.TemplateWriter InternalRenderLabel(FieldSettings settings) 867 { 868 #line default 869 #line hidden 870 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 871 872 #line 465 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 873 874 875 876 #line default 877 #line hidden 878 879 #line 466 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 880 WriteTo(__razor_helper_writer, InternalRenderLabel(settings.Label, settings.TranslateKeyForLabel)); 881 882 883 #line default 884 #line hidden 885 886 #line 466 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 887 888 889 890 #line default 891 #line hidden 892 }); 893 894 #line 467 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 895 } 896 #line default 897 #line hidden 898 899 900 #line 469 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 901 public RazorEngine.Templating.TemplateWriter InternalRenderLabel(string label, string translateKey = "") 902 { 903 #line default 904 #line hidden 905 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 906 907 #line 470 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 908 909 910 911 #line default 912 #line hidden 913 914 #line 471 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 915 WriteTo(__razor_helper_writer, translateKey.IsNotNullOrEmpty() ? Translate(translateKey) : label); 916 917 918 #line default 919 #line hidden 920 921 #line 471 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 922 923 924 925 #line default 926 #line hidden 927 }); 928 929 #line 472 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 930 } 931 #line default 932 #line hidden 933 934 935 #line 474 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 936 public RazorEngine.Templating.TemplateWriter InternalRenderCheckboxField(FieldSettings settings) 937 { 938 #line default 939 #line hidden 940 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 941 942 #line 475 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 943 944 if (settings.SystemName.IsNotNullOrEmpty() || settings.Control.IsNotNullOrEmpty()) 945 { 946 settings.Assert(FieldType.Checkbox); 947 if (settings.IsChecked && !settings.Attributes.ContainsKey("checked")) 948 { 949 settings.Attributes.Add("checked", "checked"); 950 } 951 952 953 954 #line default 955 #line hidden 956 957 #line 484 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 958 WriteTo(__razor_helper_writer, InternalRenderFieldHeader(settings, false)); 959 960 961 #line default 962 #line hidden 963 964 #line 484 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 965 966 967 if (settings.Label.IsNotNullOrEmpty() || settings.TranslateKeyForLabel.IsNotNullOrEmpty()) 968 { 969 var possibleClasses = new List<string> {settings.Type.ToString().ToLower(), settings.LabelCssClass}; 970 var cssClass = string.Join(" ", possibleClasses.Where(s => s.IsNotNullOrEmpty())); 971 972 if (!settings.LabelAttributes.ContainsKey("class")) 973 { 974 settings.LabelAttributes.Add("class", cssClass); 975 } 976 else 977 { 978 settings.LabelAttributes["class"] = string.Concat(cssClass, " ", settings.LabelAttributes["class"]); 979 } 980 if (!settings.LabelAttributes.ContainsKey("for")) 981 { 982 settings.LabelAttributes.Add("for", settings.Id); 983 } 984 985 986 987 #line default 988 #line hidden 989 990 #line 504 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 991 WriteTo(__razor_helper_writer, GetHtmlElement("label", settings.LabelAttributes)); 992 993 994 #line default 995 #line hidden 996 997 #line 504 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 998 999 1000 1001 #line default 1002 #line hidden 1003 1004 #line 505 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1005 WriteTo(__razor_helper_writer, settings.Control.IsNotNullOrEmpty() ? settings.Control : GetHtmlElement("input", GetAttributes(settings))); 1006 1007 1008 #line default 1009 #line hidden 1010 1011 #line 505 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1012 1013 1014 1015 #line default 1016 #line hidden 1017 WriteLiteralTo(__razor_helper_writer, " <span>\r\n"); 1018 1019 WriteLiteralTo(__razor_helper_writer, " "); 1020 1021 1022 #line 507 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1023 WriteTo(__razor_helper_writer, InternalRenderLabel(settings)); 1024 1025 1026 #line default 1027 #line hidden 1028 WriteLiteralTo(__razor_helper_writer, " \r\n </span>\r\n"); 1029 1030 1031 #line 509 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1032 1033 1034 #line default 1035 #line hidden 1036 1037 #line 509 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1038 WriteTo(__razor_helper_writer, GetHtmlElement("label", true)); 1039 1040 1041 #line default 1042 #line hidden 1043 1044 #line 509 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1045 1046 } 1047 else 1048 { 1049 if (settings.Control.IsNotNullOrEmpty()) 1050 { 1051 1052 1053 #line default 1054 #line hidden 1055 1056 #line 515 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1057 WriteTo(__razor_helper_writer, settings.Control); 1058 1059 1060 #line default 1061 #line hidden 1062 1063 #line 515 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1064 1065 } 1066 else 1067 { 1068 1069 1070 #line default 1071 #line hidden 1072 1073 #line 519 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1074 WriteTo(__razor_helper_writer, GetHtmlElement("input", GetAttributes(settings), true)); 1075 1076 1077 #line default 1078 #line hidden 1079 1080 #line 519 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1081 1082 } 1083 } 1084 1085 1086 1087 #line default 1088 #line hidden 1089 1090 #line 523 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1091 WriteTo(__razor_helper_writer, InternalRenderFieldFooter(settings)); 1092 1093 1094 #line default 1095 #line hidden 1096 1097 #line 523 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1098 1099 } 1100 1101 1102 #line default 1103 #line hidden 1104 }); 1105 1106 #line 525 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1107 } 1108 #line default 1109 #line hidden 1110 1111 1112 #line 527 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1113 public RazorEngine.Templating.TemplateWriter InternalRenderTextareaField(FieldSettings settings) 1114 { 1115 #line default 1116 #line hidden 1117 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 1118 1119 #line 528 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1120 1121 if (settings.SystemName.IsNotNullOrEmpty() || settings.Control.IsNotNullOrEmpty()) 1122 { 1123 settings.Assert(FieldType.Textarea); 1124 1125 1126 1127 #line default 1128 #line hidden 1129 1130 #line 533 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1131 WriteTo(__razor_helper_writer, InternalRenderFieldHeader(settings)); 1132 1133 1134 #line default 1135 #line hidden 1136 1137 #line 533 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1138 1139 1140 if (settings.Control.IsNotNullOrEmpty()) 1141 { 1142 1143 1144 #line default 1145 #line hidden 1146 1147 #line 537 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1148 WriteTo(__razor_helper_writer, GetControlWithRequiredClass(settings.IsRequired, settings.Control)); 1149 1150 1151 #line default 1152 #line hidden 1153 1154 #line 537 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1155 1156 } 1157 else 1158 { 1159 if (!settings.Attributes.ContainsKey("rows")) 1160 { 1161 settings.Attributes.Add("rows", "6"); 1162 } 1163 if (!settings.Attributes.ContainsKey("cols")) 1164 { 1165 settings.Attributes.Add("cols", "50"); 1166 } 1167 1168 1169 #line default 1170 #line hidden 1171 1172 #line 549 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1173 WriteTo(__razor_helper_writer, GetHtmlElement("textarea", GetAttributes(settings, false))); 1174 1175 1176 #line default 1177 #line hidden 1178 1179 #line 549 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1180 1181 1182 1183 #line default 1184 #line hidden 1185 1186 #line 550 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1187 WriteTo(__razor_helper_writer, GetHtmlElement("textarea", true)); 1188 1189 1190 #line default 1191 #line hidden 1192 1193 #line 550 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1194 1195 } 1196 1197 1198 1199 #line default 1200 #line hidden 1201 1202 #line 553 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1203 WriteTo(__razor_helper_writer, InternalRenderFieldFooter(settings)); 1204 1205 1206 #line default 1207 #line hidden 1208 1209 #line 553 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1210 1211 } 1212 1213 1214 #line default 1215 #line hidden 1216 }); 1217 1218 #line 555 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1219 } 1220 #line default 1221 #line hidden 1222 1223 1224 #line 557 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1225 public RazorEngine.Templating.TemplateWriter InternalRenderRadioOrCheckboxListField(FieldSettings settings) 1226 { 1227 #line default 1228 #line hidden 1229 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 1230 1231 #line 558 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1232 1233 if (settings.LoopOptions.Any() || settings.FieldOptionsList.Any() || settings.Control.IsNotNullOrEmpty()) 1234 { 1235 var optionCount = 0; 1236 1237 settings.Assert(FieldType.Radio); 1238 1239 1240 1241 #line default 1242 #line hidden 1243 1244 #line 565 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1245 WriteTo(__razor_helper_writer, InternalRenderFieldHeader(settings)); 1246 1247 1248 #line default 1249 #line hidden 1250 1251 #line 565 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1252 1253 1254 if (settings.LoopOptions.Any()) 1255 { 1256 settings.CssClass = settings.Type.ToString().ToLower(); 1257 foreach (var option in settings.LoopOptions) 1258 { 1259 optionCount++; 1260 if (settings.Id.IsNullOrEmpty() || settings.Id == settings.SystemName) 1261 { 1262 settings.Id = settings.SystemName + optionCount; 1263 } 1264 1265 1266 #line default 1267 #line hidden 1268 WriteLiteralTo(__razor_helper_writer, " <label"); 1269 1270 WriteAttributeTo(__razor_helper_writer, "class", Tuple.Create(" class=\"", 22003), Tuple.Create("\"", 22029) 1271 1272 #line 577 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1273 , Tuple.Create(Tuple.Create("", 22011), Tuple.Create<System.Object, System.Int32>(settings.CssClass 1274 1275 #line default 1276 #line hidden 1277 , 22011), false) 1278 ); 1279 1280 WriteAttributeTo(__razor_helper_writer, "for", Tuple.Create(" for=\"", 22030), Tuple.Create("\"", 22048) 1281 1282 #line 577 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1283 , Tuple.Create(Tuple.Create("", 22036), Tuple.Create<System.Object, System.Int32>(settings.Id 1284 1285 #line default 1286 #line hidden 1287 , 22036), false) 1288 ); 1289 1290 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 1291 1292 WriteLiteralTo(__razor_helper_writer, " "); 1293 1294 1295 #line 578 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1296 WriteTo(__razor_helper_writer, GetHtmlElement("input", GetAttributes(settings), true)); 1297 1298 1299 #line default 1300 #line hidden 1301 WriteLiteralTo(__razor_helper_writer, "\r\n <span>"); 1302 1303 1304 #line 579 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1305 WriteTo(__razor_helper_writer, option.GetString(settings.LabelLoopTag)); 1306 1307 1308 #line default 1309 #line hidden 1310 WriteLiteralTo(__razor_helper_writer, "</span>\r\n </label>\r\n"); 1311 1312 1313 #line 581 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1314 } 1315 } 1316 else if (settings.FieldOptionsList.Any()) 1317 { 1318 foreach (var option in settings.FieldOptionsList) 1319 { 1320 optionCount++; 1321 if (option.Id.IsNullOrEmpty() || option.Id == option.SystemName) 1322 { 1323 option.Id = settings.SystemName + optionCount; 1324 } 1325 option.CssClass = settings.Type.ToString().ToLower(); 1326 1327 1328 1329 #line default 1330 #line hidden 1331 WriteLiteralTo(__razor_helper_writer, " <label"); 1332 1333 WriteAttributeTo(__razor_helper_writer, "class", Tuple.Create(" class=\"", 22795), Tuple.Create("\"", 22819) 1334 1335 #line 594 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1336 , Tuple.Create(Tuple.Create("", 22803), Tuple.Create<System.Object, System.Int32>(option.CssClass 1337 1338 #line default 1339 #line hidden 1340 , 22803), false) 1341 ); 1342 1343 WriteAttributeTo(__razor_helper_writer, "for", Tuple.Create(" for=\"", 22820), Tuple.Create("\"", 22836) 1344 1345 #line 594 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1346 , Tuple.Create(Tuple.Create("", 22826), Tuple.Create<System.Object, System.Int32>(option.Id 1347 1348 #line default 1349 #line hidden 1350 , 22826), false) 1351 ); 1352 1353 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 1354 1355 WriteLiteralTo(__razor_helper_writer, " "); 1356 1357 1358 #line 595 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1359 WriteTo(__razor_helper_writer, InternalRenderInputOptionField("input", option, settings.Type)); 1360 1361 1362 #line default 1363 #line hidden 1364 WriteLiteralTo(__razor_helper_writer, "\r\n <span>"); 1365 1366 1367 #line 596 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1368 WriteTo(__razor_helper_writer, option.Label); 1369 1370 1371 #line default 1372 #line hidden 1373 WriteLiteralTo(__razor_helper_writer, "</span>\r\n </label>\r\n"); 1374 1375 1376 #line 598 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1377 } 1378 } 1379 else if (settings.Control.IsNotNullOrEmpty()) 1380 { 1381 1382 1383 #line default 1384 #line hidden 1385 1386 #line 602 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1387 WriteTo(__razor_helper_writer, settings.Control); 1388 1389 1390 #line default 1391 #line hidden 1392 1393 #line 602 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1394 1395 } 1396 1397 1398 1399 #line default 1400 #line hidden 1401 1402 #line 605 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1403 WriteTo(__razor_helper_writer, InternalRenderFieldFooter(settings)); 1404 1405 1406 #line default 1407 #line hidden 1408 1409 #line 605 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1410 1411 } 1412 1413 1414 #line default 1415 #line hidden 1416 }); 1417 1418 #line 607 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1419 } 1420 #line default 1421 #line hidden 1422 1423 1424 #line 609 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1425 public RazorEngine.Templating.TemplateWriter InternalRenderInputField(FieldSettings settings) 1426 { 1427 #line default 1428 #line hidden 1429 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 1430 1431 #line 610 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1432 1433 if (settings.SystemName.IsNotNullOrEmpty() || settings.Control.IsNotNullOrEmpty()) 1434 { 1435 settings.Assert(FieldType.Text); 1436 1437 1438 1439 #line default 1440 #line hidden 1441 1442 #line 615 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1443 WriteTo(__razor_helper_writer, InternalRenderFieldHeader(settings)); 1444 1445 1446 #line default 1447 #line hidden 1448 1449 #line 615 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1450 1451 1452 if (settings.Control.IsNotNullOrEmpty()) 1453 { 1454 var type = settings.Type.ToString().ToLower(); 1455 if (settings.Type == FieldType.DatetimeLocal) 1456 { 1457 type = "datetime-local"; 1458 } 1459 1460 settings.Control = settings.Control.Replace("type=\"text\"", "type=\"" + type + "\""); 1461 if (settings.Type == FieldType.Password) 1462 { 1463 settings.Control = settings.Control.Replace("input ", "input autocomplete=\"off\" "); 1464 } 1465 1466 1467 #line default 1468 #line hidden 1469 1470 #line 630 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1471 WriteTo(__razor_helper_writer, GetControlWithRequiredClass(settings.IsRequired, settings.Control)); 1472 1473 1474 #line default 1475 #line hidden 1476 1477 #line 630 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1478 1479 } 1480 else 1481 { 1482 if (settings.Type == FieldType.Password && !settings.Attributes.ContainsKey("autocomplete")) 1483 { 1484 settings.Attributes.Add("autocomplete", "off"); 1485 } 1486 1487 1488 #line default 1489 #line hidden 1490 1491 #line 638 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1492 WriteTo(__razor_helper_writer, GetHtmlElement("input", GetAttributes(settings), true)); 1493 1494 1495 #line default 1496 #line hidden 1497 1498 #line 638 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1499 1500 } 1501 1502 1503 1504 #line default 1505 #line hidden 1506 1507 #line 641 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1508 WriteTo(__razor_helper_writer, InternalRenderFieldFooter(settings)); 1509 1510 1511 #line default 1512 #line hidden 1513 1514 #line 641 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1515 1516 } 1517 1518 1519 #line default 1520 #line hidden 1521 }); 1522 1523 #line 643 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1524 } 1525 #line default 1526 #line hidden 1527 1528 1529 #line 645 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1530 public RazorEngine.Templating.TemplateWriter InternalRenderDateTimeField(FieldSettings settings) 1531 { 1532 #line default 1533 #line hidden 1534 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 1535 1536 #line 646 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1537 1538 if (settings.SystemName.IsNotNullOrEmpty() || settings.Control.IsNotNullOrEmpty()) 1539 { 1540 settings.Assert(FieldType.Datetime); 1541 settings.Attributes = new Dictionary<string, string> 1542 { 1543 {"placeholder", "&#xf073;"} 1544 }; 1545 1546 1547 1548 #line default 1549 #line hidden 1550 1551 #line 655 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1552 WriteTo(__razor_helper_writer, InternalRenderFieldHeader(settings)); 1553 1554 1555 #line default 1556 #line hidden 1557 1558 #line 655 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1559 1560 1561 if (settings.Control.IsNotNullOrEmpty()) 1562 { 1563 var type = settings.Type.ToString().ToLower(); 1564 1565 settings.Control = settings.Control.Replace("type=\"text\"", "type=\"" + type + "\""); 1566 1567 1568 #line default 1569 #line hidden 1570 1571 #line 662 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1572 WriteTo(__razor_helper_writer, GetControlWithRequiredClass(settings.IsRequired, settings.Control)); 1573 1574 1575 #line default 1576 #line hidden 1577 1578 #line 662 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1579 1580 } 1581 else 1582 { 1583 1584 1585 #line default 1586 #line hidden 1587 1588 #line 666 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1589 WriteTo(__razor_helper_writer, GetHtmlElement("input", GetAttributes(settings), true)); 1590 1591 1592 #line default 1593 #line hidden 1594 1595 #line 666 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1596 1597 } 1598 1599 1600 1601 #line default 1602 #line hidden 1603 1604 #line 669 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1605 WriteTo(__razor_helper_writer, InternalRenderFieldFooter(settings)); 1606 1607 1608 #line default 1609 #line hidden 1610 1611 #line 669 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1612 1613 } 1614 1615 1616 #line default 1617 #line hidden 1618 }); 1619 1620 #line 671 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1621 } 1622 #line default 1623 #line hidden 1624 1625 1626 #line 673 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1627 public RazorEngine.Templating.TemplateWriter InternalRenderSelectField(FieldSettings settings) 1628 { 1629 #line default 1630 #line hidden 1631 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 1632 1633 #line 674 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1634 1635 const int limit = 10; 1636 1637 settings.Assert(FieldType.Select); 1638 1639 if (settings.CssClass.ToLower().Contains("country")) 1640 { 1641 1642 1643 #line default 1644 #line hidden 1645 1646 #line 681 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1647 WriteTo(__razor_helper_writer, RenderCountriesDropdownField(settings, true, settings.CssClass.ToLower().Contains("highlights"))); 1648 1649 1650 #line default 1651 #line hidden 1652 1653 #line 681 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1654 1655 } 1656 else 1657 { 1658 if (settings.SystemName.IsNotNullOrEmpty() || settings.Control.IsNotNullOrEmpty() || settings.FieldOptionsList.Any() || settings.ValuesList.Any()) 1659 { 1660 1661 1662 #line default 1663 #line hidden 1664 1665 #line 687 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1666 WriteTo(__razor_helper_writer, InternalRenderFieldHeader(settings)); 1667 1668 1669 #line default 1670 #line hidden 1671 1672 #line 687 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1673 1674 1675 var optionsCount = 0; 1676 if (settings.Control.IsNotNullOrEmpty()) 1677 { 1678 optionsCount = Regex.Matches(settings.Control, "option ").Count; 1679 1680 if (optionsCount > limit || optionsCount == 0) 1681 { 1682 settings.Control = settings.Control.Replace("select ", "select data-live-search=\"true\" "); 1683 } 1684 1685 1686 #line default 1687 #line hidden 1688 1689 #line 698 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1690 WriteTo(__razor_helper_writer, GetControlWithRequiredClass(settings.IsRequired, settings.Control, settings.CssClass)); 1691 1692 1693 #line default 1694 #line hidden 1695 1696 #line 698 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1697 1698 } 1699 else 1700 { 1701 optionsCount = settings.FieldOptionsList.Count + settings.ValuesList.Count; 1702 1703 if (!settings.Attributes.ContainsKey("multiple") && !settings.Attributes.ContainsKey("data-live-search") && (optionsCount > limit || optionsCount == 0)) 1704 { 1705 settings.Attributes.Add("data-live-search", "true"); 1706 } 1707 1708 1709 #line default 1710 #line hidden 1711 1712 #line 708 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1713 WriteTo(__razor_helper_writer, GetHtmlElement("select", GetAttributes(settings, false))); 1714 1715 1716 #line default 1717 #line hidden 1718 1719 #line 708 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1720 1721 1722 if (settings.FirstHardcodedOptionLabel.IsNotNullOrEmpty()) 1723 { 1724 1725 1726 #line default 1727 #line hidden 1728 1729 #line 712 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1730 WriteTo(__razor_helper_writer, InternalRenderOption(FieldOption.CreateOption(settings.FirstHardcodedOptionLabel, settings.FirstHardcodedOptionValue, settings.IsFirstHardcodedOptionSelected))); 1731 1732 1733 #line default 1734 #line hidden 1735 1736 #line 712 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1737 1738 } 1739 1740 foreach (var option in settings.FieldOptionsList) 1741 { 1742 1743 1744 #line default 1745 #line hidden 1746 1747 #line 717 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1748 WriteTo(__razor_helper_writer, InternalRenderOption(option)); 1749 1750 1751 #line default 1752 #line hidden 1753 1754 #line 717 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1755 1756 } 1757 foreach (var option in settings.ValuesList) 1758 { 1759 1760 1761 #line default 1762 #line hidden 1763 1764 #line 721 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1765 WriteTo(__razor_helper_writer, InternalRenderOption(FieldOption.CreateOption(option, option))); 1766 1767 1768 #line default 1769 #line hidden 1770 1771 #line 721 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1772 1773 } 1774 1775 1776 1777 #line default 1778 #line hidden 1779 1780 #line 724 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1781 WriteTo(__razor_helper_writer, GetHtmlElement("select", false)); 1782 1783 1784 #line default 1785 #line hidden 1786 1787 #line 724 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1788 1789 } 1790 1791 1792 1793 #line default 1794 #line hidden 1795 1796 #line 727 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1797 WriteTo(__razor_helper_writer, InternalRenderFieldFooter(settings)); 1798 1799 1800 #line default 1801 #line hidden 1802 1803 #line 727 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1804 1805 } 1806 } 1807 1808 1809 #line default 1810 #line hidden 1811 }); 1812 1813 #line 730 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1814 } 1815 #line default 1816 #line hidden 1817 1818 1819 #line 732 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1820 public RazorEngine.Templating.TemplateWriter InternalRenderButtonField(FieldSettings settings) 1821 { 1822 #line default 1823 #line hidden 1824 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 1825 1826 #line 733 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1827 1828 settings.Assert(FieldType.Button); 1829 1830 1831 1832 #line default 1833 #line hidden 1834 1835 #line 736 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1836 WriteTo(__razor_helper_writer, InternalRenderFieldHeader(settings, false)); 1837 1838 1839 #line default 1840 #line hidden 1841 1842 #line 736 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1843 1844 1845 if (settings.Control.IsNotNullOrEmpty()) 1846 { 1847 var controlOutput = settings.Control; 1848 switch (settings.Type) 1849 { 1850 case FieldType.Submit: 1851 controlOutput = controlOutput.Replace("input ", "input class='btn btn-default'"); 1852 break; 1853 case FieldType.Reset: 1854 controlOutput = controlOutput.Replace("input ", "input class='btn btn-bg2'"); 1855 break; 1856 case FieldType.Button: 1857 case FieldType.Textarea: 1858 case FieldType.File: 1859 case FieldType.Text: 1860 case FieldType.Hidden: 1861 case FieldType.Radio: 1862 case FieldType.Checkbox: 1863 case FieldType.Select: 1864 case FieldType.Checkboxlist: 1865 case FieldType.Divider: 1866 case FieldType.Image: 1867 case FieldType.Password: 1868 case FieldType.Textstring: 1869 case FieldType.Search: 1870 case FieldType.Email: 1871 case FieldType.Url: 1872 case FieldType.Tel: 1873 case FieldType.Number: 1874 case FieldType.Range: 1875 case FieldType.Date: 1876 case FieldType.Month: 1877 case FieldType.Week: 1878 case FieldType.Time: 1879 case FieldType.Datetime: 1880 case FieldType.DatetimeLocal: 1881 case FieldType.Color: 1882 case FieldType.Unknown: 1883 default: 1884 throw new NotSupportedException(string.Format("Unsupported Field Type: {0}.", settings.Type.ToString())); 1885 } 1886 1887 1888 #line default 1889 #line hidden 1890 1891 #line 779 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1892 WriteTo(__razor_helper_writer, controlOutput); 1893 1894 1895 #line default 1896 #line hidden 1897 1898 #line 779 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1899 1900 } 1901 else 1902 { 1903 settings.CssClass = settings.CssClass.IsNullOrEmpty() ? "btn btn-default" : "btn " + settings.CssClass; 1904 settings.Value = settings.Value.IsNotNullOrEmpty() ? settings.Value : settings.Label; 1905 if (settings.Type == FieldType.Button) 1906 { 1907 if (settings.Label.IsNullOrEmpty()) 1908 { 1909 settings.Label = Translate("Button"); 1910 } 1911 1912 1913 #line default 1914 #line hidden 1915 1916 #line 791 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1917 WriteTo(__razor_helper_writer, GetHtmlElement("button", GetAttributes(settings))); 1918 1919 1920 #line default 1921 #line hidden 1922 1923 #line 791 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1924 1925 1926 1927 #line default 1928 #line hidden 1929 1930 #line 792 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1931 WriteTo(__razor_helper_writer, InternalRenderLabel(settings)); 1932 1933 1934 #line default 1935 #line hidden 1936 1937 #line 792 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1938 1939 1940 1941 #line default 1942 #line hidden 1943 1944 #line 793 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1945 WriteTo(__razor_helper_writer, GetHtmlElement("button", true)); 1946 1947 1948 #line default 1949 #line hidden 1950 1951 #line 793 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1952 1953 } 1954 else 1955 { 1956 1957 1958 #line default 1959 #line hidden 1960 1961 #line 797 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1962 WriteTo(__razor_helper_writer, GetHtmlElement("input", GetAttributes(settings), true)); 1963 1964 1965 #line default 1966 #line hidden 1967 1968 #line 797 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1969 1970 } 1971 } 1972 1973 1974 1975 #line default 1976 #line hidden 1977 1978 #line 801 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1979 WriteTo(__razor_helper_writer, InternalRenderFieldFooter(settings)); 1980 1981 1982 #line default 1983 #line hidden 1984 1985 #line 801 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1986 1987 1988 1989 #line default 1990 #line hidden 1991 }); 1992 1993 #line 802 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 1994 } 1995 #line default 1996 #line hidden 1997 1998 1999 #line 806 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2000 public RazorEngine.Templating.TemplateWriter InternalRenderTextStringField(FieldSettings settings) 2001 { 2002 #line default 2003 #line hidden 2004 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 2005 2006 #line 807 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2007 2008 settings.Assert(FieldType.Textstring); 2009 2010 if (settings.Description.IsNotNullOrEmpty() || settings.Control.IsNotNullOrEmpty()) 2011 { 2012 if (settings.Control.IsNotNullOrEmpty()) 2013 { 2014 2015 2016 #line default 2017 #line hidden 2018 2019 #line 814 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2020 WriteTo(__razor_helper_writer, settings.Control); 2021 2022 2023 #line default 2024 #line hidden 2025 2026 #line 814 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2027 2028 } 2029 else 2030 { 2031 2032 2033 #line default 2034 #line hidden 2035 WriteLiteralTo(__razor_helper_writer, " <p"); 2036 2037 WriteLiteralTo(__razor_helper_writer, " class=\"help-block\""); 2038 2039 WriteLiteralTo(__razor_helper_writer, ">"); 2040 2041 2042 #line 818 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2043 WriteTo(__razor_helper_writer, settings.Description); 2044 2045 2046 #line default 2047 #line hidden 2048 WriteLiteralTo(__razor_helper_writer, "</p>\r\n"); 2049 2050 2051 #line 819 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2052 } 2053 } 2054 2055 2056 #line default 2057 #line hidden 2058 }); 2059 2060 #line 821 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2061 } 2062 #line default 2063 #line hidden 2064 2065 2066 #line 823 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2067 public RazorEngine.Templating.TemplateWriter InternalRenderImageField(FieldSettings settings) 2068 { 2069 #line default 2070 #line hidden 2071 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 2072 2073 #line 824 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2074 2075 settings.Assert(FieldType.Image); 2076 2077 if (settings.Control.IsNotNullOrEmpty()) 2078 { 2079 2080 2081 #line default 2082 #line hidden 2083 2084 #line 829 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2085 WriteTo(__razor_helper_writer, settings.Control); 2086 2087 2088 #line default 2089 #line hidden 2090 2091 #line 829 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2092 2093 } 2094 2095 2096 #line default 2097 #line hidden 2098 }); 2099 2100 #line 831 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2101 } 2102 #line default 2103 #line hidden 2104 2105 2106 #line 833 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2107 public RazorEngine.Templating.TemplateWriter InternalRenderDividerField(FieldSettings settings) 2108 { 2109 #line default 2110 #line hidden 2111 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 2112 2113 #line 834 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2114 2115 settings.Assert(FieldType.Divider); 2116 2117 2118 2119 #line default 2120 #line hidden 2121 WriteLiteralTo(__razor_helper_writer, " <hr"); 2122 2123 WriteLiteralTo(__razor_helper_writer, " class=\"divider\""); 2124 2125 WriteLiteralTo(__razor_helper_writer, " />\r\n"); 2126 2127 2128 #line 838 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2129 2130 2131 #line default 2132 #line hidden 2133 }); 2134 2135 #line 838 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2136 } 2137 #line default 2138 #line hidden 2139 2140 2141 #line 840 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2142 public RazorEngine.Templating.TemplateWriter InternalRenderInputOptionField(string htmlElement, FieldOption optionSettings, FieldType type = FieldType.Radio) 2143 { 2144 #line default 2145 #line hidden 2146 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 2147 2148 #line 841 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2149 2150 var fieldType = type == FieldType.Checkboxlist ? FieldType.Checkbox.ToString().ToLower() : type.ToString().ToLower(); 2151 var attributes = new StringBuilder(GetAttribute("type", fieldType)); 2152 attributes.Append(GetAttribute("value", optionSettings.Value)); 2153 attributes.Append(GetAttribute("name", optionSettings.SystemName)); 2154 attributes.Append(optionSettings.Id.IsNotNullOrEmpty() ? GetAttribute("id", optionSettings.Id) : optionSettings.SystemName); 2155 attributes.Append(GetAttributes(optionSettings.Attributes)); 2156 2157 if (optionSettings.IsSelected) 2158 { 2159 attributes.Append(GetAttribute("checked", "checked")); 2160 } 2161 if (optionSettings.IsDisabled) 2162 { 2163 attributes.Append(GetAttribute("disabled", "disabled")); 2164 } 2165 2166 2167 2168 #line default 2169 #line hidden 2170 2171 #line 858 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2172 WriteTo(__razor_helper_writer, GetHtmlElement(htmlElement, attributes.ToString())); 2173 2174 2175 #line default 2176 #line hidden 2177 2178 #line 858 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2179 2180 2181 2182 #line default 2183 #line hidden 2184 }); 2185 2186 #line 859 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2187 } 2188 #line default 2189 #line hidden 2190 2191 2192 #line 861 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2193 public RazorEngine.Templating.TemplateWriter InternalRenderOption(FieldOption optionSettings) 2194 { 2195 #line default 2196 #line hidden 2197 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 2198 2199 #line 862 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2200 2201 var selected = optionSettings.IsSelected ? " selected" : string.Empty; 2202 var disabled = optionSettings.IsDisabled ? " disabled" : string.Empty; 2203 var readOnly = optionSettings.IsReadOnly ? " readonly" : string.Empty; 2204 var attributes = GetAttributes(optionSettings); 2205 2206 2207 2208 #line default 2209 #line hidden 2210 2211 #line 868 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2212 WriteTo(__razor_helper_writer, GetHtmlElement("option", attributes + selected + disabled + readOnly)); 2213 2214 2215 #line default 2216 #line hidden 2217 2218 #line 868 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2219 2220 2221 2222 #line default 2223 #line hidden 2224 2225 #line 869 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2226 WriteTo(__razor_helper_writer, InternalRenderLabel(optionSettings.Label, optionSettings.TranslateKeyForLabel)); 2227 2228 2229 #line default 2230 #line hidden 2231 2232 #line 869 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2233 2234 2235 2236 #line default 2237 #line hidden 2238 2239 #line 870 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2240 WriteTo(__razor_helper_writer, GetHtmlElement("option", true)); 2241 2242 2243 #line default 2244 #line hidden 2245 2246 #line 870 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2247 2248 2249 2250 #line default 2251 #line hidden 2252 }); 2253 2254 #line 871 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2255 } 2256 #line default 2257 #line hidden 2258 2259 2260 #line 873 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2261 public RazorEngine.Templating.TemplateWriter InternalRenderFieldHeader(FieldSettings settings, bool renderLabel = true) 2262 { 2263 #line default 2264 #line hidden 2265 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 2266 2267 #line 874 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2268 2269 2270 2271 #line default 2272 #line hidden 2273 2274 #line 875 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2275 WriteTo(__razor_helper_writer, GetWrapperStart(settings.IncludeWrapper, settings.Type, settings.WrapperElement, settings.IsRequired, settings.WrapperCssClass)); 2276 2277 2278 #line default 2279 #line hidden 2280 2281 #line 875 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2282 2283 if ((settings.Label.IsNotNullOrEmpty() || settings.TranslateKeyForLabel.IsNotNullOrEmpty()) && renderLabel) 2284 { 2285 if (settings.Type == FieldType.Checkboxlist || settings.Type == FieldType.Radio) 2286 { 2287 2288 2289 #line default 2290 #line hidden 2291 WriteLiteralTo(__razor_helper_writer, " <label"); 2292 2293 WriteAttributeTo(__razor_helper_writer, "class", Tuple.Create(" class=\"", 34086), Tuple.Create("\"", 34128) 2294 , Tuple.Create(Tuple.Create("", 34094), Tuple.Create("form-label", 34094), true) 2295 2296 #line 880 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2297 , Tuple.Create(Tuple.Create(" ", 34104), Tuple.Create<System.Object, System.Int32>(settings.LabelCssClass 2298 2299 #line default 2300 #line hidden 2301 , 34105), false) 2302 ); 2303 2304 WriteLiteralTo(__razor_helper_writer, ">"); 2305 2306 2307 #line 880 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2308 WriteTo(__razor_helper_writer, InternalRenderLabel(settings)); 2309 2310 2311 #line default 2312 #line hidden 2313 WriteLiteralTo(__razor_helper_writer, "</label>\r\n"); 2314 2315 2316 #line 881 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2317 } 2318 else 2319 { 2320 2321 2322 #line default 2323 #line hidden 2324 WriteLiteralTo(__razor_helper_writer, " <label"); 2325 2326 WriteAttributeTo(__razor_helper_writer, "for", Tuple.Create(" for=\"", 34240), Tuple.Create("\"", 34266) 2327 2328 #line 884 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2329 , Tuple.Create(Tuple.Create("", 34246), Tuple.Create<System.Object, System.Int32>(settings.SystemName 2330 2331 #line default 2332 #line hidden 2333 , 34246), false) 2334 ); 2335 2336 WriteAttributeTo(__razor_helper_writer, "class", Tuple.Create(" class=\"", 34267), Tuple.Create("\"", 34309) 2337 , Tuple.Create(Tuple.Create("", 34275), Tuple.Create("form-label", 34275), true) 2338 2339 #line 884 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2340 , Tuple.Create(Tuple.Create(" ", 34285), Tuple.Create<System.Object, System.Int32>(settings.LabelCssClass 2341 2342 #line default 2343 #line hidden 2344 , 34286), false) 2345 ); 2346 2347 WriteLiteralTo(__razor_helper_writer, ">"); 2348 2349 2350 #line 884 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2351 WriteTo(__razor_helper_writer, InternalRenderLabel(settings)); 2352 2353 2354 #line default 2355 #line hidden 2356 WriteLiteralTo(__razor_helper_writer, "</label>\r\n"); 2357 2358 2359 #line 885 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2360 } 2361 2362 } 2363 if (settings.Prepend.IsNotNullOrEmpty()) 2364 { 2365 2366 2367 #line default 2368 #line hidden 2369 WriteLiteralTo(__razor_helper_writer, " <div"); 2370 2371 WriteLiteralTo(__razor_helper_writer, " class=\"fieldPrepend input-group-addon\""); 2372 2373 WriteLiteralTo(__razor_helper_writer, ">"); 2374 2375 2376 #line 890 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2377 WriteTo(__razor_helper_writer, settings.Prepend); 2378 2379 2380 #line default 2381 #line hidden 2382 WriteLiteralTo(__razor_helper_writer, "</div>\r\n"); 2383 2384 2385 #line 891 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2386 } 2387 if (settings.IncludeFieldWrapper) 2388 { 2389 2390 2391 #line default 2392 #line hidden 2393 WriteLiteralTo(__razor_helper_writer, " "); 2394 2395 WriteLiteralTo(__razor_helper_writer, "<div class=\"fieldContainer hidden "); 2396 2397 2398 #line 894 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2399 WriteTo(__razor_helper_writer, settings.FieldWrapperCssClass); 2400 2401 2402 #line default 2403 #line hidden 2404 WriteLiteralTo(__razor_helper_writer, "\">\r\n"); 2405 2406 2407 #line 895 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2408 } 2409 2410 2411 #line default 2412 #line hidden 2413 }); 2414 2415 #line 896 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2416 } 2417 #line default 2418 #line hidden 2419 2420 2421 #line 898 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2422 public RazorEngine.Templating.TemplateWriter InternalRenderFieldFooter(FieldSettings settings) 2423 { 2424 #line default 2425 #line hidden 2426 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 2427 2428 #line 899 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2429 2430 if (settings.Icon.IsNotNullOrEmpty()) 2431 { 2432 2433 2434 #line default 2435 #line hidden 2436 2437 #line 902 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2438 WriteTo(__razor_helper_writer, RenderIcon(settings.Icon, settings.Tooltip, IconPosition.Left, true)); 2439 2440 2441 #line default 2442 #line hidden 2443 2444 #line 902 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2445 2446 } 2447 if (settings.Append.IsNotNullOrEmpty()) 2448 { 2449 2450 2451 #line default 2452 #line hidden 2453 WriteLiteralTo(__razor_helper_writer, " <div"); 2454 2455 WriteLiteralTo(__razor_helper_writer, " class=\"fieldAppend input-group-addon\""); 2456 2457 WriteLiteralTo(__razor_helper_writer, ">"); 2458 2459 2460 #line 906 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2461 WriteTo(__razor_helper_writer, settings.Append); 2462 2463 2464 #line default 2465 #line hidden 2466 WriteLiteralTo(__razor_helper_writer, "</div>\r\n"); 2467 2468 2469 #line 907 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2470 } 2471 if (settings.Description.IsNotNullOrEmpty()) 2472 { 2473 2474 2475 #line default 2476 #line hidden 2477 WriteLiteralTo(__razor_helper_writer, " <p"); 2478 2479 WriteLiteralTo(__razor_helper_writer, " class=\"help-block\""); 2480 2481 WriteLiteralTo(__razor_helper_writer, ">"); 2482 2483 2484 #line 910 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2485 WriteTo(__razor_helper_writer, settings.Description); 2486 2487 2488 #line default 2489 #line hidden 2490 WriteLiteralTo(__razor_helper_writer, "</p>\r\n"); 2491 2492 2493 #line 911 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2494 } 2495 if (settings.IncludeFieldWrapper) 2496 { 2497 2498 2499 #line default 2500 #line hidden 2501 WriteLiteralTo(__razor_helper_writer, " "); 2502 2503 WriteLiteralTo(__razor_helper_writer, "</div>\r\n"); 2504 2505 2506 #line 915 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2507 } 2508 2509 2510 #line default 2511 #line hidden 2512 2513 #line 916 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2514 WriteTo(__razor_helper_writer, GetWrapperEnd(settings.IncludeWrapper, settings.WrapperElement)); 2515 2516 2517 #line default 2518 #line hidden 2519 2520 #line 916 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2521 2522 2523 2524 #line default 2525 #line hidden 2526 }); 2527 2528 #line 917 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2529 } 2530 #line default 2531 #line hidden 2532 2533 2534 #line 919 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2535 public RazorEngine.Templating.TemplateWriter InternalRenderQuantityField(int productStock, int productAvailableAmount, int selectedQuantity = 1, int productType = 0) 2536 { 2537 #line default 2538 #line hidden 2539 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 2540 2541 #line 920 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2542 2543 2544 2545 #line default 2546 #line hidden 2547 2548 #line 921 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2549 WriteTo(__razor_helper_writer, InternalRenderQuantityField(productStock, productAvailableAmount, selectedQuantity, string.Empty, 10, false, false, productType)); 2550 2551 2552 #line default 2553 #line hidden 2554 2555 #line 921 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2556 2557 2558 2559 #line default 2560 #line hidden 2561 }); 2562 2563 #line 922 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2564 } 2565 #line default 2566 #line hidden 2567 2568 2569 #line 924 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2570 public RazorEngine.Templating.TemplateWriter InternalRenderQuantityField(int productStock, int productAvailableAmount, int selectedQuantity = 1, bool variantGroupsExistList = false) 2571 { 2572 #line default 2573 #line hidden 2574 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 2575 2576 #line 925 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2577 2578 2579 2580 #line default 2581 #line hidden 2582 2583 #line 926 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2584 WriteTo(__razor_helper_writer, InternalRenderQuantityField(productStock, productAvailableAmount, selectedQuantity, string.Empty, 10, false, variantGroupsExistList)); 2585 2586 2587 #line default 2588 #line hidden 2589 2590 #line 926 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2591 2592 2593 2594 #line default 2595 #line hidden 2596 }); 2597 2598 #line 927 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2599 } 2600 #line default 2601 #line hidden 2602 2603 2604 #line 929 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2605 public RazorEngine.Templating.TemplateWriter InternalRenderQuantityField(int productStock, int productAvailableAmount, int selectedQuantity = 1, string fieldSystemName = "", int limit = 10, bool isCheckout = true, bool variantGroupsExistList = false, int productType = 0, string productId = "") 2606 { 2607 #line default 2608 #line hidden 2609 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 2610 2611 #line 930 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2612 2613 // var isQuantityTextHidden = selectedQuantity < 10 && productStock > 0 || !isCheckout ? " hidden" : string.Empty; 2614 var isQuantityTextHidden = string.Empty; 2615 var isSelectDisabled = productStock <= 0 && !isCheckout; 2616 var quantityTextFieldSettings = new FieldSettings 2617 { 2618 Value = selectedQuantity.ToString(), 2619 SystemName = fieldSystemName.IsNullOrEmpty() ? "quantity" : fieldSystemName, 2620 Id = (fieldSystemName.IsNullOrEmpty() ? "quantity_" : fieldSystemName) + productId, 2621 Attributes = new Dictionary<string, string> 2622 { 2623 {"min", "1"}, 2624 {"max", "999999"}, 2625 {"autocomplete", "off"}, 2626 {"data-productStock", productStock.ToString()}, 2627 {"data-productAvailable", productAvailableAmount.ToString()}, 2628 {"data-outofstock", Translate("Out of stock")}, 2629 {"data-stocktranslate", Translate("The current stock is")}, 2630 {"data-currentValue", selectedQuantity.ToString()} 2631 } 2632 }; 2633 2634 if (productType != 1 && productType != 3) 2635 { 2636 quantityTextFieldSettings.Type = FieldType.Number; 2637 quantityTextFieldSettings.Label = Translate("Qty"); 2638 quantityTextFieldSettings.CssClass = "col-xs-4 col-sm-7 quantityInput" + isQuantityTextHidden; 2639 //quantityTextFieldSettings.LabelCssClass = productStock > 0 ? "" : "hidden"; 2640 2641 2642 2643 #line default 2644 #line hidden 2645 WriteLiteralTo(__razor_helper_writer, " <fieldset"); 2646 2647 WriteLiteralTo(__razor_helper_writer, " class=\"quantity-container pull-left\""); 2648 2649 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 2650 2651 2652 #line 960 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2653 2654 2655 #line default 2656 #line hidden 2657 2658 #line 960 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2659 if (isCheckout) 2660 { 2661 2662 2663 #line default 2664 #line hidden 2665 WriteLiteralTo(__razor_helper_writer, " <div"); 2666 2667 WriteAttributeTo(__razor_helper_writer, "class", Tuple.Create(" class=\"", 37924), Tuple.Create("\"", 37976) 2668 2669 #line 962 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2670 , Tuple.Create(Tuple.Create("", 37932), Tuple.Create<System.Object, System.Int32>(isQuantityTextHidden 2671 2672 #line default 2673 #line hidden 2674 , 37932), false) 2675 , Tuple.Create(Tuple.Create(" ", 37953), Tuple.Create("quantityPriceContainer", 37954), true) 2676 ); 2677 2678 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 2679 2680 WriteLiteralTo(__razor_helper_writer, " "); 2681 2682 2683 #line 963 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2684 WriteTo(__razor_helper_writer, RenderField(quantityTextFieldSettings)); 2685 2686 2687 #line default 2688 #line hidden 2689 WriteLiteralTo(__razor_helper_writer, "\r\n"); 2690 2691 WriteLiteralTo(__razor_helper_writer, " "); 2692 2693 2694 #line 964 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2695 WriteTo(__razor_helper_writer, RenderBootstrapButton(new BootstrapButtonSettings {IconCssClass = "fa-refresh", CssClass = "submitQuantity btnCart-blue", ButtonType = BootstrapButtonSettings.BootstrapButtonType.Button})); 2696 2697 2698 #line default 2699 #line hidden 2700 WriteLiteralTo(__razor_helper_writer, "\r\n </div>\r\n"); 2701 2702 2703 #line 966 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2704 } 2705 else 2706 { 2707 2708 2709 #line default 2710 #line hidden 2711 2712 #line 969 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2713 WriteTo(__razor_helper_writer, RenderField(quantityTextFieldSettings)); 2714 2715 2716 #line default 2717 #line hidden 2718 2719 #line 969 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2720 2721 } 2722 2723 #line default 2724 #line hidden 2725 WriteLiteralTo(__razor_helper_writer, "\r\n \r\n "); 2726 2727 WriteLiteralTo(__razor_helper_writer, "\r\n </fieldset>\r\n"); 2728 2729 2730 #line 1001 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2731 } 2732 else 2733 { 2734 quantityTextFieldSettings.Type = FieldType.Hidden; 2735 2736 2737 #line default 2738 #line hidden 2739 2740 #line 1005 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2741 WriteTo(__razor_helper_writer, RenderField(quantityTextFieldSettings)); 2742 2743 2744 #line default 2745 #line hidden 2746 2747 #line 1005 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2748 2749 } 2750 2751 2752 #line default 2753 #line hidden 2754 }); 2755 2756 #line 1007 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2757 } 2758 #line default 2759 #line hidden 2760 2761 2762 #line 1010 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2763 public RazorEngine.Templating.TemplateWriter InternalRenderCountryAndRegionsJsVariables(Dynamicweb.Ecommerce.International.CountryCollection countries = null) 2764 { 2765 #line default 2766 #line hidden 2767 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 2768 2769 #line 1011 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2770 2771 if (countries == null) 2772 { 2773 countries = Dynamicweb.Ecommerce.Services.Countries.GetCountries(); 2774 } 2775 2776 if (countries.Any()) 2777 { 2778 2779 2780 #line default 2781 #line hidden 2782 WriteLiteralTo(__razor_helper_writer, " "); 2783 2784 WriteLiteralTo(__razor_helper_writer, " "); 2785 2786 2787 #line 1019 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2788 WriteTo(__razor_helper_writer, SnippetStart("jsVariables")); 2789 2790 2791 #line default 2792 #line hidden 2793 WriteLiteralTo(__razor_helper_writer, " var countryRegions = {}; "); 2794 2795 2796 #line 1019 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2797 WriteTo(__razor_helper_writer, SnippetEnd("jsVariables")); 2798 2799 2800 #line default 2801 #line hidden 2802 WriteLiteralTo(__razor_helper_writer, "\r\n"); 2803 2804 2805 #line 1020 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2806 2807 foreach (var country in countries.OrderBy(s => s.Name)) 2808 { 2809 var regions = Dynamicweb.Ecommerce.Services.Countries.GetRegions(country.Code2); 2810 2811 if (regions.Any()) 2812 { 2813 2814 2815 #line default 2816 #line hidden 2817 WriteLiteralTo(__razor_helper_writer, " "); 2818 2819 WriteLiteralTo(__razor_helper_writer, " "); 2820 2821 2822 #line 1027 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2823 WriteTo(__razor_helper_writer, SnippetStart("jsVariables")); 2824 2825 2826 #line default 2827 #line hidden 2828 WriteLiteralTo(__razor_helper_writer, " countryRegions."); 2829 2830 2831 #line 1027 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2832 WriteTo(__razor_helper_writer, country.Code2); 2833 2834 2835 #line default 2836 #line hidden 2837 WriteLiteralTo(__razor_helper_writer, " = {}; "); 2838 2839 2840 #line 1027 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2841 WriteTo(__razor_helper_writer, SnippetEnd("jsVariables")); 2842 2843 2844 #line default 2845 #line hidden 2846 WriteLiteralTo(__razor_helper_writer, "\r\n"); 2847 2848 WriteLiteralTo(__razor_helper_writer, " "); 2849 2850 WriteLiteralTo(__razor_helper_writer, "\r\n"); 2851 2852 WriteLiteralTo(__razor_helper_writer, " "); 2853 2854 2855 #line 1029 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2856 WriteTo(__razor_helper_writer, SnippetStart("jsVariables")); 2857 2858 2859 #line default 2860 #line hidden 2861 WriteLiteralTo(__razor_helper_writer, "\r\n countryRegions."); 2862 2863 2864 #line 1030 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2865 WriteTo(__razor_helper_writer, country.Code2); 2866 2867 2868 #line default 2869 #line hidden 2870 WriteLiteralTo(__razor_helper_writer, ".code = [];\r\n countryRegions."); 2871 2872 2873 #line 1031 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2874 WriteTo(__razor_helper_writer, country.Code2); 2875 2876 2877 #line default 2878 #line hidden 2879 WriteLiteralTo(__razor_helper_writer, ".name = [];\r\n"); 2880 2881 WriteLiteralTo(__razor_helper_writer, " "); 2882 2883 2884 #line 1032 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2885 WriteTo(__razor_helper_writer, SnippetEnd("jsVariables")); 2886 2887 2888 #line default 2889 #line hidden 2890 WriteLiteralTo(__razor_helper_writer, "\r\n "); 2891 2892 WriteLiteralTo(__razor_helper_writer, "\r\n"); 2893 2894 2895 #line 1034 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2896 foreach (var region in regions.OrderBy(s => s.Name)) 2897 { 2898 2899 2900 #line default 2901 #line hidden 2902 WriteLiteralTo(__razor_helper_writer, " "); 2903 2904 WriteLiteralTo(__razor_helper_writer, "\r\n"); 2905 2906 WriteLiteralTo(__razor_helper_writer, " "); 2907 2908 2909 #line 1037 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2910 WriteTo(__razor_helper_writer, SnippetStart("jsVariables")); 2911 2912 2913 #line default 2914 #line hidden 2915 WriteLiteralTo(__razor_helper_writer, "\r\n countryRegions[\""); 2916 2917 2918 #line 1038 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2919 WriteTo(__razor_helper_writer, country.Code2); 2920 2921 2922 #line default 2923 #line hidden 2924 WriteLiteralTo(__razor_helper_writer, "\"].code.push(\""); 2925 2926 2927 #line 1038 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2928 WriteTo(__razor_helper_writer, region.RegionCode); 2929 2930 2931 #line default 2932 #line hidden 2933 WriteLiteralTo(__razor_helper_writer, "\");\r\n countryRegions[\""); 2934 2935 2936 #line 1039 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2937 WriteTo(__razor_helper_writer, country.Code2); 2938 2939 2940 #line default 2941 #line hidden 2942 WriteLiteralTo(__razor_helper_writer, "\"].name.push(\""); 2943 2944 2945 #line 1039 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2946 WriteTo(__razor_helper_writer, region.Name); 2947 2948 2949 #line default 2950 #line hidden 2951 WriteLiteralTo(__razor_helper_writer, "\");\r\n"); 2952 2953 WriteLiteralTo(__razor_helper_writer, " "); 2954 2955 2956 #line 1040 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2957 WriteTo(__razor_helper_writer, SnippetEnd("jsVariables")); 2958 2959 2960 #line default 2961 #line hidden 2962 WriteLiteralTo(__razor_helper_writer, "\r\n "); 2963 2964 WriteLiteralTo(__razor_helper_writer, "\r\n"); 2965 2966 2967 #line 1042 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2968 } 2969 } 2970 } 2971 } 2972 2973 2974 #line default 2975 #line hidden 2976 }); 2977 2978 #line 1046 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2979 } 2980 #line default 2981 #line hidden 2982 2983 2984 #line 1051 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 2985 2986 public static bool IsBillingAddressReadOnly() 2987 { 2988 return Dna.Modules.Features.FeatureManager.IsEnabled("IsBillingAddressReadOnly", "Set to 'true' if the Billing Address should be read-only."); 2989 } 2990 2991 public static bool IsBillingAddressEditable() 2992 { 2993 return Dna.Modules.Features.FeatureManager.IsEnabled("IsBillingAddressEditable", "Set to 'true' if the Billing Address should be editable."); 2994 } 2995 2996 public static bool IsShippingAddressEditable() 2997 { 2998 return Dna.Modules.Features.FeatureManager.IsEnabled("IsShippingAddressEditable", "Set to 'true' if the Shipping Address should be editable."); 2999 } 3000 3001 public static bool ShowNoErpConnectionMessage() 3002 { 3003 return Dna.Modules.Features.FeatureManager.IsEnabled("showNoErpConnectionMessage", "Set to 'true' if want to show the 'No ERP Connection Message'."); 3004 } 3005 3006 public static bool ShowStateFieldAsDropdown() 3007 { 3008 return Dna.Modules.Features.FeatureManager.IsEnabled("showStateFieldAsDropdown", "Set to 'true' if the State field should be a drop-down."); 3009 } 3010 public static bool ShowVariantsAsDropdown() 3011 { 3012 return Dna.Modules.Features.FeatureManager.IsEnabled("showVariantsAsDropdown", "Set to 'true' if the Variant field should be a drop-down."); 3013 } 3014 public static bool ShowB2BLogin() 3015 { 3016 return Dna.Modules.Features.FeatureManager.IsEnabled("showB2BLogin", "Set to 'true' if it should display a login page."); 3017 } 3018 3019 3020 #line default 3021 #line hidden 3022 3023 3024 #line 1086 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3025 3026 3027 #region Redirect Workaround 3028 3029 public static void Redirect(string url) 3030 { 3031 HttpContext.Current.Response.Redirect(url, false); 3032 HttpContext.Current.ApplicationInstance.CompleteRequest(); 3033 } 3034 3035 #endregion Redirect Workaround 3036 3037 #region Css functions 3038 3039 public static string GetPalletColorNumber(int number = 0) 3040 { 3041 switch (number) 3042 { 3043 case 1: 3044 return "#666666"; 3045 case 2: 3046 return "#333333"; 3047 default: 3048 return "#ffffff"; 3049 } 3050 } 3051 3052 public static string GetFontFamilyNumber(int number = 0) 3053 { 3054 switch (number) 3055 { 3056 case 1: 3057 return "font-family: Arial, sans-serif;"; 3058 default: 3059 return "font-family: Helvetica, Arial, sans-serif;"; 3060 } 3061 } 3062 3063 public static string GetFontSize(int fontSize = 0) 3064 { 3065 return fontSize >= 0 ? string.Concat("font-size: ", fontSize, "px;") : "font-size: 14px"; 3066 } 3067 3068 #endregion Css functions 3069 3070 #region Icon functions 3071 3072 public static string GetIcon(string cssPartialClass, string label = "", string position = "") 3073 { 3074 var icon = "<i class='fa " + cssPartialClass + "'></i>"; 3075 var spacing = string.Empty; 3076 3077 if (!label.IsNullOrEmpty()) 3078 { 3079 spacing = "&nbsp;"; 3080 } 3081 3082 if (cssPartialClass.IsNullOrEmpty()) return label; 3083 if (position == IconPosition.Left.ToString() || position.IsNullOrEmpty()) 3084 { 3085 return icon + spacing + label; 3086 } 3087 return label + spacing + icon; 3088 } 3089 3090 #endregion Icon functions 3091 3092 #region Address functions 3093 3094 public string GetAddressFormatted(User user, bool getRegionName = false, bool getCountryName = false, bool addLineBreakBetweenAddressAndCity = false, string splitBetweenRegionAndCountry = " ") 3095 { 3096 return GetAddressFormatted(user.Address, user.Address2, user.City, user.State, user.Zip, user.Country, getRegionName, getCountryName, addLineBreakBetweenAddressAndCity, splitBetweenRegionAndCountry); 3097 } 3098 3099 public string GetAddressFormatted(UserAddress userAddress, bool getRegionName = false, bool getCountryName = false, bool addLineBreakBetweenAddressAndCity = false, string splitBetweenRegionAndCountry = " ") 3100 { 3101 return GetAddressFormatted(userAddress.Address, userAddress.Address2, userAddress.City, userAddress.State, userAddress.Zip, userAddress.Country, getRegionName, getCountryName, addLineBreakBetweenAddressAndCity, splitBetweenRegionAndCountry); 3102 } 3103 3104 public string GetAddressFormatted(int addressId) 3105 { 3106 var address = UserAddress.GetUserAddressById(addressId); 3107 return GetAddressFormatted(address.Address, address.Address2, address.City, address.State, address.Zip, address.Country); 3108 } 3109 3110 public string GetAddressFormatted(AddressSource addressSource, bool getRegionName = false, bool getCountryName = false, bool addLineBreakBetweenAddressAndCity = false, string splitBetweenRegionAndCountry = " ") 3111 { 3112 switch (addressSource) 3113 { 3114 case AddressSource.UserProfile: 3115 return GetAddressFormatted( 3116 GetString("UserManagement:User.Address"), 3117 GetString("UserManagement:User.Address2"), 3118 GetString("UserManagement:User.City"), 3119 GetString("UserManagement:User.State"), 3120 GetString("UserManagement:User.Zip"), 3121 GetString("UserManagement:User.Country"), 3122 getRegionName, 3123 getCountryName, 3124 addLineBreakBetweenAddressAndCity, 3125 splitBetweenRegionAndCountry 3126 ); 3127 case AddressSource.EcomCustomer: 3128 return GetAddressFormatted( 3129 GetString("Ecom:Order.Customer.Address"), 3130 GetString("Ecom:Order.Customer.Address2"), 3131 GetString("Ecom:Order.Customer.City"), 3132 GetString("Ecom:Order.Customer.Region"), 3133 GetString("Ecom:Order.Customer.Zip"), 3134 GetString("Ecom:Order.Customer.Country"), 3135 getRegionName, 3136 getCountryName, 3137 addLineBreakBetweenAddressAndCity, 3138 splitBetweenRegionAndCountry 3139 ); 3140 case AddressSource.EcomDelivery: 3141 return GetAddressFormatted( 3142 GetString("Ecom:Order.Delivery.Address"), 3143 GetString("Ecom:Order.Delivery.Address2"), 3144 GetString("Ecom:Order.Delivery.City"), 3145 GetString("Ecom:Order.Delivery.Region"), 3146 GetString("Ecom:Order.Delivery.Zip"), 3147 GetString("Ecom:Order.Delivery.Country"), 3148 getRegionName, 3149 getCountryName, 3150 addLineBreakBetweenAddressAndCity, 3151 splitBetweenRegionAndCountry 3152 ); 3153 case AddressSource.UserAddress: 3154 throw new NotSupportedException("Unsupported address source. Use an AddressId instead"); 3155 default: 3156 throw new ArgumentOutOfRangeException("addressSource property", addressSource, null); 3157 } 3158 } 3159 3160 public string GetAddressFormatted(string address, string address2, string city, string region, string zip, string country, bool getRegionName = false, bool getCountryName = false, bool addLineBreakBetweenAddressAndCity = false, string splitBetweenRegionAndCountry = " ") 3161 { 3162 3163 var formattedAddress = new StringBuilder(address); 3164 var hasCountry = country.IsNotNullOrEmpty(); 3165 var zipBeforeRegionCountries = new List<string>{"US","United States of America"}; 3166 3167 if (address2.IsNotNullOrEmpty()) 3168 { 3169 formattedAddress.Append(string.Concat(" ",address2)); 3170 } 3171 if (addLineBreakBetweenAddressAndCity && (city + region + country).IsNotNullOrEmpty()) 3172 { 3173 formattedAddress.Append("<br/>"); 3174 } 3175 if (city.IsNotNullOrEmpty()) 3176 { 3177 formattedAddress.Append(string.Concat(" ",city)); 3178 } 3179 if (region.IsNotNullOrEmpty()) 3180 { 3181 formattedAddress.Append(zip.IsNotNullOrEmpty() ? string.Empty : ","); 3182 if (getRegionName && country.IsNotNullOrEmpty()) 3183 { 3184 var getRegions = Services.Countries.GetRegions(country); 3185 if(getRegions != null) { 3186 var regionName = getRegions.First(c => c.RegionCode == region).Name; 3187 region = regionName.IsNotNullOrEmpty() ? regionName : region; 3188 } 3189 } 3190 formattedAddress.Append(string.Concat(" ",region)); 3191 } 3192 if (hasCountry && zipBeforeRegionCountries.Contains(country) && zip.IsNotNullOrEmpty()) 3193 { 3194 formattedAddress.Append(string.Concat(" ",zip)); 3195 } 3196 if (hasCountry && !zipBeforeRegionCountries.Contains(country) && zip.IsNotNullOrEmpty()) 3197 { 3198 formattedAddress.Append(string.Concat(" ",zip)); 3199 } 3200 if (!hasCountry) 3201 { 3202 return formattedAddress.ToString(); 3203 } 3204 3205 formattedAddress.Append(splitBetweenRegionAndCountry.IsNotNullOrEmpty() ? splitBetweenRegionAndCountry : " "); 3206 if (getCountryName) 3207 { 3208 var getCountry = Services.Countries.GetCountry(country); 3209 if(getCountry != null) 3210 { 3211 var countryName = getCountry.Name; 3212 country = countryName.IsNotNullOrEmpty() ? countryName : country; 3213 } 3214 } 3215 formattedAddress.Append(country); 3216 return formattedAddress.ToString(); 3217 } 3218 3219 #endregion Address functions 3220 3221 #region Field helper functions 3222 3223 const string HighlightedCountriesSplit = "----------------"; 3224 3225 internal readonly List<string> HighlightedCountries = new List<string> 3226 { 3227 "CA", 3228 "US", 3229 HighlightedCountriesSplit 3230 }; 3231 3232 #endregion Field helper functions 3233 3234 #region Generic functions 3235 3236 private static int FormatInteger(object value) 3237 { 3238 int num; 3239 if (value == null) 3240 { 3241 value = string.Empty; 3242 } 3243 return int.TryParse(value.ToString(), out num) ? num : 0; 3244 } 3245 3246 #endregion Generic functions 3247 3248 private string GetProductPrice(string productPrice = "") 3249 { 3250 var showNoErpConnectionMessage = ShowNoErpConnectionMessage(); 3251 var isWebServiceConnectionAvailable = Dna.Ecommerce.LiveIntegration.TemplatesHelper.IsWebServiceConnectionAvailable(); 3252 3253 if (!isWebServiceConnectionAvailable && showNoErpConnectionMessage) 3254 { 3255 if (productPrice.IsNullOrEmpty()) 3256 { 3257 return GetNoErpConnectionMessage(); 3258 } 3259 else 3260 { 3261 return string.Concat("<span class='noErpConnection'>", Translate("Unavailable"), "</span>"); 3262 } 3263 } 3264 return productPrice; 3265 } 3266 3267 public string GetNoErpConnectionMessage() 3268 { 3269 return string.Concat("<div class='col-xs-12 warningBox'><p>", Translate("Pricing and inventory are currently not available. Please check back soon"), "</p></div>"); 3270 } 3271 3272 #line default 3273 #line hidden 3274 3275 3276 #line 1335 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3277 public RazorEngine.Templating.TemplateWriter RenderTableHeading(string label, string sortByField = "", string listType = "Order") 3278 { 3279 #line default 3280 #line hidden 3281 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 3282 3283 #line 1336 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3284 3285 if (sortByField.IsNotNullOrEmpty()) 3286 { 3287 var href = string.Empty; 3288 var icon = "fa-sort-amount-asc"; 3289 if (listType == "Order" || listType == "Rma") 3290 { 3291 href = GetCustomerCenterSortUrl(sortByField, listType); 3292 if (GetSortFieldParameter("name") == sortByField) 3293 { 3294 icon = "fa-sort-amount-" + GetSortFieldParameter("value", sortByField).ToLower(); 3295 } 3296 } 3297 3298 3299 #line default 3300 #line hidden 3301 WriteLiteralTo(__razor_helper_writer, " <a"); 3302 3303 WriteAttributeTo(__razor_helper_writer, "href", Tuple.Create(" href=\"", 53856), Tuple.Create("\"", 53868) 3304 3305 #line 1349 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3306 , Tuple.Create(Tuple.Create("", 53863), Tuple.Create<System.Object, System.Int32>(href 3307 3308 #line default 3309 #line hidden 3310 , 53863), false) 3311 ); 3312 3313 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 3314 3315 WriteLiteralTo(__razor_helper_writer, " "); 3316 3317 3318 #line 1350 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3319 WriteTo(__razor_helper_writer, RenderIcon(icon, label, IconPosition.Right)); 3320 3321 3322 #line default 3323 #line hidden 3324 WriteLiteralTo(__razor_helper_writer, "\r\n </a>\r\n"); 3325 3326 3327 #line 1352 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3328 } 3329 else 3330 { 3331 3332 3333 #line default 3334 #line hidden 3335 3336 #line 1355 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3337 WriteTo(__razor_helper_writer, label); 3338 3339 3340 #line default 3341 #line hidden 3342 3343 #line 1355 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3344 3345 } 3346 3347 3348 #line default 3349 #line hidden 3350 }); 3351 3352 #line 1357 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3353 } 3354 #line default 3355 #line hidden 3356 3357 3358 #line 1359 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3359 public RazorEngine.Templating.TemplateWriter RenderDataListItem(string label, string value, string labelCss = "col-xs-4 text-right", string valueCss = "col-xs-8", string alternativeValue = "", bool isLabelBold = true) 3360 { 3361 #line default 3362 #line hidden 3363 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 3364 3365 #line 1360 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3366 3367 if (value.IsNotNullOrEmpty() || alternativeValue.IsNotNullOrEmpty()) 3368 { 3369 var displayValue = alternativeValue.IsNullOrEmpty() ? value : alternativeValue; 3370 3371 3372 #line default 3373 #line hidden 3374 WriteLiteralTo(__razor_helper_writer, " <dt"); 3375 3376 WriteAttributeTo(__razor_helper_writer, "class", Tuple.Create(" class=\"", 54422), Tuple.Create("\"", 54439) 3377 3378 #line 1364 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3379 , Tuple.Create(Tuple.Create("", 54430), Tuple.Create<System.Object, System.Int32>(labelCss 3380 3381 #line default 3382 #line hidden 3383 , 54430), false) 3384 ); 3385 3386 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 3387 3388 3389 #line 1365 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3390 3391 3392 #line default 3393 #line hidden 3394 3395 #line 1365 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3396 if (isLabelBold) 3397 { 3398 3399 3400 #line default 3401 #line hidden 3402 WriteLiteralTo(__razor_helper_writer, " "); 3403 3404 WriteLiteralTo(__razor_helper_writer, " <strong>\r\n"); 3405 3406 3407 #line 1368 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3408 } 3409 3410 #line default 3411 #line hidden 3412 WriteLiteralTo(__razor_helper_writer, "\r\n"); 3413 3414 WriteLiteralTo(__razor_helper_writer, " "); 3415 3416 3417 #line 1369 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3418 WriteTo(__razor_helper_writer, label); 3419 3420 3421 #line default 3422 #line hidden 3423 WriteLiteralTo(__razor_helper_writer, "\r\n"); 3424 3425 3426 #line 1370 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3427 3428 3429 #line default 3430 #line hidden 3431 3432 #line 1370 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3433 if (isLabelBold) 3434 { 3435 3436 3437 #line default 3438 #line hidden 3439 WriteLiteralTo(__razor_helper_writer, " "); 3440 3441 WriteLiteralTo(__razor_helper_writer, " </strong>\r\n"); 3442 3443 3444 #line 1373 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3445 } 3446 3447 #line default 3448 #line hidden 3449 WriteLiteralTo(__razor_helper_writer, "\r\n </dt>\r\n"); 3450 3451 WriteLiteralTo(__razor_helper_writer, " <dd"); 3452 3453 WriteAttributeTo(__razor_helper_writer, "class", Tuple.Create(" class=\"", 54714), Tuple.Create("\"", 54731) 3454 3455 #line 1375 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3456 , Tuple.Create(Tuple.Create("", 54722), Tuple.Create<System.Object, System.Int32>(valueCss 3457 3458 #line default 3459 #line hidden 3460 , 54722), false) 3461 ); 3462 3463 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 3464 3465 WriteLiteralTo(__razor_helper_writer, " "); 3466 3467 3468 #line 1376 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3469 WriteTo(__razor_helper_writer, displayValue); 3470 3471 3472 #line default 3473 #line hidden 3474 WriteLiteralTo(__razor_helper_writer, "\r\n </dd>\r\n"); 3475 3476 3477 #line 1378 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3478 } 3479 3480 3481 #line default 3482 #line hidden 3483 }); 3484 3485 #line 1379 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3486 } 3487 #line default 3488 #line hidden 3489 3490 3491 #line 1381 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3492 public RazorEngine.Templating.TemplateWriter RenderTableRowSpacer(int height = 30, int colspan = 1) 3493 { 3494 #line default 3495 #line hidden 3496 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 3497 3498 #line 1382 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3499 3500 if (height == 0) 3501 { 3502 height = 30; 3503 } 3504 3505 3506 3507 #line default 3508 #line hidden 3509 WriteLiteralTo(__razor_helper_writer, " <tr>\r\n"); 3510 3511 3512 #line 1389 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3513 3514 3515 #line default 3516 #line hidden 3517 3518 #line 1389 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3519 if (colspan > 1) 3520 { 3521 3522 3523 #line default 3524 #line hidden 3525 WriteLiteralTo(__razor_helper_writer, " "); 3526 3527 WriteLiteralTo(__razor_helper_writer, " <td colspan=\""); 3528 3529 3530 #line 1391 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3531 WriteTo(__razor_helper_writer, colspan); 3532 3533 3534 #line default 3535 #line hidden 3536 WriteLiteralTo(__razor_helper_writer, "\" height=\""); 3537 3538 3539 #line 1391 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3540 WriteTo(__razor_helper_writer, height); 3541 3542 3543 #line default 3544 #line hidden 3545 WriteLiteralTo(__razor_helper_writer, "\"></td>\r\n"); 3546 3547 3548 #line 1392 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3549 } 3550 else 3551 { 3552 3553 3554 #line default 3555 #line hidden 3556 WriteLiteralTo(__razor_helper_writer, " <td"); 3557 3558 WriteAttributeTo(__razor_helper_writer, "height", Tuple.Create(" height=\"", 55157), Tuple.Create("\"", 55173) 3559 3560 #line 1395 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3561 , Tuple.Create(Tuple.Create("", 55166), Tuple.Create<System.Object, System.Int32>(height 3562 3563 #line default 3564 #line hidden 3565 , 55166), false) 3566 ); 3567 3568 WriteLiteralTo(__razor_helper_writer, "></td>\r\n"); 3569 3570 3571 #line 1396 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3572 } 3573 3574 #line default 3575 #line hidden 3576 WriteLiteralTo(__razor_helper_writer, "\r\n </tr>\r\n"); 3577 3578 3579 #line 1398 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3580 3581 3582 #line default 3583 #line hidden 3584 }); 3585 3586 #line 1398 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3587 } 3588 #line default 3589 #line hidden 3590 3591 3592 #line 1400 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3593 public RazorEngine.Templating.TemplateWriter RenderTableCellSpacer(int width = 10, int height = 10) 3594 { 3595 #line default 3596 #line hidden 3597 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 3598 3599 #line 1401 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3600 3601 if (width == 0) 3602 { 3603 width = 10; 3604 } 3605 if (height == 0) 3606 { 3607 height = 10; 3608 } 3609 3610 3611 #line default 3612 #line hidden 3613 WriteLiteralTo(__razor_helper_writer, " <td"); 3614 3615 WriteAttributeTo(__razor_helper_writer, "width", Tuple.Create(" width=\"", 55457), Tuple.Create("\"", 55471) 3616 3617 #line 1410 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3618 , Tuple.Create(Tuple.Create("", 55465), Tuple.Create<System.Object, System.Int32>(width 3619 3620 #line default 3621 #line hidden 3622 , 55465), false) 3623 ); 3624 3625 WriteAttributeTo(__razor_helper_writer, "height", Tuple.Create(" height=\"", 55472), Tuple.Create("\"", 55488) 3626 3627 #line 1410 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3628 , Tuple.Create(Tuple.Create("", 55481), Tuple.Create<System.Object, System.Int32>(height 3629 3630 #line default 3631 #line hidden 3632 , 55481), false) 3633 ); 3634 3635 WriteLiteralTo(__razor_helper_writer, ">&nbsp;</td>\r\n"); 3636 3637 3638 #line 1411 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3639 3640 3641 #line default 3642 #line hidden 3643 }); 3644 3645 #line 1411 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3646 } 3647 #line default 3648 #line hidden 3649 3650 3651 #line 1415 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3652 public RazorEngine.Templating.TemplateWriter RenderTabContent(string tabKey, string tabLabel, string tabContent, string cssClass = "") 3653 { 3654 #line default 3655 #line hidden 3656 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 3657 3658 #line 1416 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3659 3660 if (tabContent.IsNotNullOrEmpty()) 3661 { 3662 3663 3664 #line default 3665 #line hidden 3666 3667 #line 1419 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3668 WriteTo(__razor_helper_writer, InternalRenderTabHeader("#" + tabKey, tabLabel, cssClass)); 3669 3670 3671 #line default 3672 #line hidden 3673 3674 #line 1419 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3675 3676 3677 3678 #line default 3679 #line hidden 3680 WriteLiteralTo(__razor_helper_writer, " <div"); 3681 3682 WriteAttributeTo(__razor_helper_writer, "class", Tuple.Create(" class=\"", 55798), Tuple.Create("\"", 55825) 3683 , Tuple.Create(Tuple.Create("", 55806), Tuple.Create("col-xs-12", 55806), true) 3684 3685 #line 1420 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3686 , Tuple.Create(Tuple.Create(" ", 55815), Tuple.Create<System.Object, System.Int32>(cssClass 3687 3688 #line default 3689 #line hidden 3690 , 55816), false) 3691 ); 3692 3693 WriteAttributeTo(__razor_helper_writer, "id", Tuple.Create(" id=\"", 55826), Tuple.Create("\"", 55838) 3694 3695 #line 1420 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3696 , Tuple.Create(Tuple.Create("", 55831), Tuple.Create<System.Object, System.Int32>(tabKey 3697 3698 #line default 3699 #line hidden 3700 , 55831), false) 3701 ); 3702 3703 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 3704 3705 WriteLiteralTo(__razor_helper_writer, " "); 3706 3707 3708 #line 1421 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3709 WriteTo(__razor_helper_writer, tabContent); 3710 3711 3712 #line default 3713 #line hidden 3714 WriteLiteralTo(__razor_helper_writer, "\r\n </div>\r\n"); 3715 3716 3717 #line 1423 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3718 } 3719 3720 3721 #line default 3722 #line hidden 3723 }); 3724 3725 #line 1424 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3726 } 3727 #line default 3728 #line hidden 3729 3730 3731 #line 1428 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3732 public RazorEngine.Templating.TemplateWriter RenderField(FieldSettings settings) 3733 { 3734 #line default 3735 #line hidden 3736 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 3737 3738 #line 1429 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3739 3740 switch (settings.Type) 3741 { 3742 case FieldType.Button: 3743 case FieldType.Reset: 3744 case FieldType.Submit: 3745 3746 3747 #line default 3748 #line hidden 3749 3750 #line 1435 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3751 WriteTo(__razor_helper_writer, InternalRenderButtonField(settings)); 3752 3753 3754 #line default 3755 #line hidden 3756 3757 #line 1435 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3758 3759 break; 3760 case FieldType.Checkbox: 3761 3762 3763 #line default 3764 #line hidden 3765 3766 #line 1438 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3767 WriteTo(__razor_helper_writer, InternalRenderCheckboxField(settings)); 3768 3769 3770 #line default 3771 #line hidden 3772 3773 #line 1438 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3774 3775 break; 3776 case FieldType.Image: 3777 3778 3779 #line default 3780 #line hidden 3781 3782 #line 1441 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3783 WriteTo(__razor_helper_writer, InternalRenderImageField(settings)); 3784 3785 3786 #line default 3787 #line hidden 3788 3789 #line 1441 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3790 3791 break; 3792 case FieldType.Checkboxlist: 3793 case FieldType.Radio: 3794 3795 3796 #line default 3797 #line hidden 3798 3799 #line 1445 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3800 WriteTo(__razor_helper_writer, InternalRenderRadioOrCheckboxListField(settings)); 3801 3802 3803 #line default 3804 #line hidden 3805 3806 #line 1445 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3807 3808 break; 3809 case FieldType.Select: 3810 3811 3812 #line default 3813 #line hidden 3814 3815 #line 1448 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3816 WriteTo(__razor_helper_writer, InternalRenderSelectField(settings)); 3817 3818 3819 #line default 3820 #line hidden 3821 3822 #line 1448 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3823 3824 break; 3825 case FieldType.Color: 3826 case FieldType.Date: 3827 case FieldType.DatetimeLocal: 3828 case FieldType.Email: 3829 case FieldType.File: 3830 case FieldType.Hidden: 3831 case FieldType.Password: 3832 case FieldType.Month: 3833 case FieldType.Number: 3834 case FieldType.Search: 3835 case FieldType.Tel: 3836 case FieldType.Text: 3837 case FieldType.Time: 3838 case FieldType.Url: 3839 case FieldType.Week: 3840 case FieldType.Range: 3841 3842 3843 #line default 3844 #line hidden 3845 3846 #line 1466 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3847 WriteTo(__razor_helper_writer, InternalRenderInputField(settings)); 3848 3849 3850 #line default 3851 #line hidden 3852 3853 #line 1466 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3854 3855 break; 3856 3857 case FieldType.Textarea: 3858 3859 3860 #line default 3861 #line hidden 3862 3863 #line 1470 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3864 WriteTo(__razor_helper_writer, InternalRenderTextareaField(settings)); 3865 3866 3867 #line default 3868 #line hidden 3869 3870 #line 1470 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3871 3872 break; 3873 case FieldType.Textstring: 3874 3875 3876 #line default 3877 #line hidden 3878 3879 #line 1473 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3880 WriteTo(__razor_helper_writer, InternalRenderTextStringField(settings)); 3881 3882 3883 #line default 3884 #line hidden 3885 3886 #line 1473 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3887 3888 break; 3889 case FieldType.Divider: 3890 3891 3892 #line default 3893 #line hidden 3894 3895 #line 1476 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3896 WriteTo(__razor_helper_writer, InternalRenderDividerField(settings)); 3897 3898 3899 #line default 3900 #line hidden 3901 3902 #line 1476 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3903 3904 break; 3905 case FieldType.Datetime: 3906 3907 3908 #line default 3909 #line hidden 3910 3911 #line 1479 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3912 WriteTo(__razor_helper_writer, InternalRenderDateTimeField(settings)); 3913 3914 3915 #line default 3916 #line hidden 3917 3918 #line 1479 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3919 3920 break; 3921 case FieldType.Unknown: 3922 3923 3924 #line default 3925 #line hidden 3926 WriteLiteralTo(__razor_helper_writer, " "); 3927 3928 WriteLiteralTo(__razor_helper_writer, "<div style=\"color: #f00\">Undefined FieldType: <strong>"); 3929 3930 3931 #line 1482 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3932 WriteTo(__razor_helper_writer, settings.Type); 3933 3934 3935 #line default 3936 #line hidden 3937 WriteLiteralTo(__razor_helper_writer, "</strong></div>\r\n"); 3938 3939 3940 #line 1483 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3941 break; 3942 default: 3943 throw new NotSupportedException(string.Format("Unsupported Field Type: {0}.", settings.Type.ToString())); 3944 } 3945 3946 3947 #line default 3948 #line hidden 3949 }); 3950 3951 #line 1487 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3952 } 3953 #line default 3954 #line hidden 3955 3956 3957 #line 1489 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3958 public RazorEngine.Templating.TemplateWriter RenderCountriesDropdownField(List<string> countries, bool renderJsVariables = true, bool renderHighlightOptions = true, bool isFirstHardcodedOptionDisabled = true) 3959 { 3960 #line default 3961 #line hidden 3962 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 3963 3964 #line 1490 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3965 3966 var settings = new FieldSettings 3967 { 3968 SystemName = "Country", 3969 Id = "Country", 3970 Label = Translate("Select your country:"), 3971 FirstHardcodedOptionLabel = Translate("All"), 3972 ValuesList = countries 3973 }; 3974 3975 3976 #line default 3977 #line hidden 3978 3979 #line 1499 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3980 WriteTo(__razor_helper_writer, RenderCountriesDropdownField(settings, renderJsVariables, renderHighlightOptions, isFirstHardcodedOptionDisabled)); 3981 3982 3983 #line default 3984 #line hidden 3985 3986 #line 1499 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3987 3988 3989 3990 #line default 3991 #line hidden 3992 }); 3993 3994 #line 1500 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 3995 } 3996 #line default 3997 #line hidden 3998 3999 4000 #line 1502 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4001 public RazorEngine.Templating.TemplateWriter RenderCountriesDropdownField(FieldSettings settings, bool renderJsVariables = true, bool renderHighlightOptions = true, bool isFirstHardcodedOptionDisabled = true) 4002 { 4003 #line default 4004 #line hidden 4005 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 4006 4007 #line 1503 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4008 4009 4010 if (settings.SystemName.IsNotNullOrEmpty()) 4011 { 4012 const int limit = 10; 4013 const int numOfCountriesForHighlight = 10; 4014 var countries = EcommerceHelpers.GetEcomCountries(); 4015 var numOfCountries = settings.LoopOptions.Any() ? settings.LoopOptions.Count : settings.ValuesList.Any() ? settings.ValuesList.Count : countries.Count; 4016 4017 settings.Assert(FieldType.Select); 4018 if (settings.FirstHardcodedOptionLabel.IsNullOrEmpty()) 4019 { 4020 settings.FirstHardcodedOptionLabel = Translate("Select an option"); 4021 } 4022 if (!settings.Attributes.ContainsKey("multiple") && !settings.Attributes.ContainsKey("data-live-search") && numOfCountries > limit) 4023 { 4024 settings.Attributes.Add("data-live-search", "true"); 4025 } 4026 4027 if (renderJsVariables) 4028 { 4029 4030 4031 #line default 4032 #line hidden 4033 4034 #line 1524 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4035 WriteTo(__razor_helper_writer, InternalRenderCountryAndRegionsJsVariables(countries)); 4036 4037 4038 #line default 4039 #line hidden 4040 4041 #line 1524 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4042 4043 } 4044 4045 4046 4047 #line default 4048 #line hidden 4049 4050 #line 1527 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4051 WriteTo(__razor_helper_writer, InternalRenderFieldHeader(settings)); 4052 4053 4054 #line default 4055 #line hidden 4056 4057 #line 1527 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4058 4059 4060 4061 #line default 4062 #line hidden 4063 4064 #line 1528 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4065 WriteTo(__razor_helper_writer, GetHtmlElement("select", GetAttributes(settings))); 4066 4067 4068 #line default 4069 #line hidden 4070 4071 #line 1528 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4072 4073 4074 4075 #line default 4076 #line hidden 4077 4078 #line 1529 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4079 WriteTo(__razor_helper_writer, InternalRenderOption(FieldOption.CreateOption(settings.FirstHardcodedOptionLabel, settings.FirstHardcodedOptionValue, settings.IsFirstHardcodedOptionSelected, isFirstHardcodedOptionDisabled))); 4080 4081 4082 #line default 4083 #line hidden 4084 4085 #line 1529 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4086 4087 4088 if (numOfCountries > numOfCountriesForHighlight) 4089 { 4090 4091 4092 #line default 4093 #line hidden 4094 4095 #line 1533 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4096 WriteTo(__razor_helper_writer, RenderSnippet("highlightedContries")); 4097 4098 4099 #line default 4100 #line hidden 4101 4102 #line 1533 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4103 4104 } 4105 4106 if (settings.LoopOptions.Any()) 4107 { 4108 4109 foreach (var country in settings.LoopOptions) 4110 { 4111 var countryName = country.GetString("Ecom:Country.Name"); 4112 var countryCode = country.GetString("Ecom:Country.Code2"); 4113 4114 if (renderHighlightOptions && HighlightedCountries.Any(c => c.Equals(countryCode, StringComparison.CurrentCultureIgnoreCase))) 4115 { 4116 4117 4118 #line default 4119 #line hidden 4120 4121 #line 1546 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4122 WriteTo(__razor_helper_writer, PopulateHighlightedCountries(countryName, countryCode)); 4123 4124 4125 #line default 4126 #line hidden 4127 4128 #line 1546 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4129 4130 } 4131 4132 4133 #line default 4134 #line hidden 4135 4136 #line 1548 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4137 WriteTo(__razor_helper_writer, InternalRenderOption(FieldOption.CreateOption(countryName, countryCode))); 4138 4139 4140 #line default 4141 #line hidden 4142 4143 #line 1548 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4144 4145 } 4146 } 4147 else if (settings.ValuesList.Any()) 4148 { 4149 foreach (var countryCode in settings.ValuesList.OrderBy(s => s)) 4150 { 4151 var countryName = countries.Any(c => c.Code2 == countryCode) ? countries.First(c => c.Code2 == countryCode).Name : countryCode; 4152 4153 if (renderHighlightOptions && HighlightedCountries.Any(c => c.Equals(countryCode, StringComparison.CurrentCultureIgnoreCase))) 4154 { 4155 4156 4157 #line default 4158 #line hidden 4159 4160 #line 1559 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4161 WriteTo(__razor_helper_writer, PopulateHighlightedCountries(countryName, countryCode)); 4162 4163 4164 #line default 4165 #line hidden 4166 4167 #line 1559 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4168 4169 } 4170 4171 4172 #line default 4173 #line hidden 4174 4175 #line 1561 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4176 WriteTo(__razor_helper_writer, InternalRenderOption(FieldOption.CreateOption(countryName, countryCode))); 4177 4178 4179 #line default 4180 #line hidden 4181 4182 #line 1561 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4183 4184 } 4185 } 4186 else 4187 { 4188 foreach (var country in countries.OrderBy(s => s.Name)) 4189 { 4190 var countryCode = country.Code2; 4191 4192 if (renderHighlightOptions && HighlightedCountries.Any(c => c.Equals(countryCode, StringComparison.CurrentCultureIgnoreCase))) 4193 { 4194 4195 4196 #line default 4197 #line hidden 4198 4199 #line 1572 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4200 WriteTo(__razor_helper_writer, PopulateHighlightedCountries(country.Name, countryCode)); 4201 4202 4203 #line default 4204 #line hidden 4205 4206 #line 1572 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4207 4208 } 4209 4210 4211 #line default 4212 #line hidden 4213 4214 #line 1574 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4215 WriteTo(__razor_helper_writer, InternalRenderOption(FieldOption.CreateOption(country.Name, countryCode))); 4216 4217 4218 #line default 4219 #line hidden 4220 4221 #line 1574 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4222 4223 } 4224 } 4225 4226 if (renderHighlightOptions && numOfCountries > numOfCountriesForHighlight && HighlightedCountries.Any(c => HighlightedCountriesSplit.Equals(c, StringComparison.CurrentCultureIgnoreCase))) 4227 { 4228 4229 4230 #line default 4231 #line hidden 4232 4233 #line 1580 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4234 WriteTo(__razor_helper_writer, PopulateHighlightedCountries(HighlightedCountriesSplit, string.Empty, false, true)); 4235 4236 4237 #line default 4238 #line hidden 4239 4240 #line 1580 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4241 4242 } 4243 4244 4245 4246 #line default 4247 #line hidden 4248 4249 #line 1583 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4250 WriteTo(__razor_helper_writer, GetHtmlElement("select", true)); 4251 4252 4253 #line default 4254 #line hidden 4255 4256 #line 1583 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4257 4258 4259 4260 4261 #line default 4262 #line hidden 4263 4264 #line 1585 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4265 WriteTo(__razor_helper_writer, InternalRenderFieldFooter(settings)); 4266 4267 4268 #line default 4269 #line hidden 4270 4271 #line 1585 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4272 4273 } 4274 4275 4276 #line default 4277 #line hidden 4278 }); 4279 4280 #line 1587 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4281 } 4282 #line default 4283 #line hidden 4284 4285 4286 #line 1589 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4287 public RazorEngine.Templating.TemplateWriter PopulateHighlightedCountries(string label, string value, bool isSelected = false, bool isDisabled = false) 4288 { 4289 #line default 4290 #line hidden 4291 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 4292 4293 #line 1590 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4294 4295 HighlightedCountries.Remove(value); 4296 if (value.IsNullOrEmpty()) 4297 { 4298 HighlightedCountries.Remove(label); 4299 } 4300 4301 4302 #line default 4303 #line hidden 4304 4305 #line 1596 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4306 WriteTo(__razor_helper_writer, SnippetStart("highlightedContries")); 4307 4308 4309 #line default 4310 #line hidden 4311 4312 #line 1596 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4313 4314 4315 4316 #line default 4317 #line hidden 4318 4319 #line 1597 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4320 WriteTo(__razor_helper_writer, InternalRenderOption(FieldOption.CreateOption(label, value, isSelected, isDisabled))); 4321 4322 4323 #line default 4324 #line hidden 4325 4326 #line 1597 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4327 4328 4329 4330 #line default 4331 #line hidden 4332 4333 #line 1598 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4334 WriteTo(__razor_helper_writer, SnippetEnd("highlightedContries")); 4335 4336 4337 #line default 4338 #line hidden 4339 4340 #line 1598 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4341 4342 4343 4344 #line default 4345 #line hidden 4346 }); 4347 4348 #line 1599 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4349 } 4350 #line default 4351 #line hidden 4352 4353 4354 #line 1603 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4355 public RazorEngine.Templating.TemplateWriter RenderPaging() 4356 { 4357 #line default 4358 #line hidden 4359 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 4360 4361 #line 1604 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4362 4363 4364 4365 #line default 4366 #line hidden 4367 4368 #line 1605 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4369 WriteTo(__razor_helper_writer, RenderPaging( 4370 GetInteger("Ecom:CustomerCenter.Paging.NumPages"), 4371 "CCPage", 4372 GetString("Ecom:CustomerCenter.Paging.Back.URL"), 4373 GetString("Ecom:CustomerCenter.Paging.Forward.URL"), 4374 GetInteger("Ecom:CustomerCenter.Paging.CurrentPage"), 4375 GetLoop("Ecom:CustomerCenter.Paging.Pages"), 4376 "Ecom:CustomerCenter.Paging.PageIndex", 4377 string.Empty, 4378 true, 4379 false 4380 )); 4381 4382 4383 #line default 4384 #line hidden 4385 4386 #line 1616 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4387 4388 4389 4390 #line default 4391 #line hidden 4392 }); 4393 4394 #line 1617 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4395 } 4396 #line default 4397 #line hidden 4398 4399 4400 #line 1619 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4401 public RazorEngine.Templating.TemplateWriter RenderPaging(int numOfPages, string pageQueryParameter, int currentPage) 4402 { 4403 #line default 4404 #line hidden 4405 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 4406 4407 #line 1620 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4408 4409 var queryParameters = HttpUtility.ParseQueryString(Dynamicweb.Context.Current.Request.Url.Query); 4410 var url = Dna.UrlServices.Helpers.GetCurrentUrl(true, true); 4411 var previousPageUrl = string.Empty; 4412 var nextPageUrl = string.Empty; 4413 4414 if (currentPage > 1) 4415 { 4416 queryParameters = Dna.UrlServices.Helpers.UpdateQueryStringKeyValue(queryParameters, pageQueryParameter, (currentPage - 1).ToString()); 4417 previousPageUrl = (string) Dna.UrlServices.Helpers.BuildUri(url, queryParameters).ToString(); 4418 } 4419 if (currentPage < numOfPages) 4420 { 4421 queryParameters = Dna.UrlServices.Helpers.UpdateQueryStringKeyValue(queryParameters, pageQueryParameter, (currentPage + 1).ToString()); 4422 nextPageUrl = (string) Dna.UrlServices.Helpers.BuildUri(url, queryParameters).ToString(); 4423 } 4424 4425 4426 4427 #line default 4428 #line hidden 4429 4430 #line 1637 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4431 WriteTo(__razor_helper_writer, RenderPaging(numOfPages, pageQueryParameter, previousPageUrl, nextPageUrl, currentPage)); 4432 4433 4434 #line default 4435 #line hidden 4436 4437 #line 1637 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4438 4439 4440 4441 #line default 4442 #line hidden 4443 }); 4444 4445 #line 1638 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4446 } 4447 #line default 4448 #line hidden 4449 4450 4451 #line 1640 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4452 public RazorEngine.Templating.TemplateWriter RenderPaging(int numOfPages, string pageQueryParameter, string previousPageUrl, string nextPageUrl, int currentPage, List<LoopItem> pagesLoop = null, string pageNumTag = "", string pageHrefTag = "", bool includeWrapper = true, bool includeFirstAndLastLabel = true) 4453 { 4454 #line default 4455 #line hidden 4456 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 4457 4458 #line 1641 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4459 4460 if (numOfPages > 1) 4461 { 4462 4463 4464 #line default 4465 #line hidden 4466 4467 #line 1644 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4468 4469 4470 4471 #line default 4472 #line hidden 4473 4474 #line 1650 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4475 4476 4477 var loopPageSize = 3; 4478 var startPage = 1; 4479 var endPage = numOfPages; 4480 4481 var pageQueryParameter2 = pageQueryParameter == "PageNum" || pageQueryParameter == "page" || pageQueryParameter == "DWPagingPageNum" ? string.Empty : Pageview.CurrentParagraph.ID.ToString(); 4482 var pageNumQueryParameter = pageQueryParameter + pageQueryParameter2; 4483 4484 var queryParameters = HttpUtility.ParseQueryString(Dynamicweb.Context.Current.Request.Url.Query); 4485 queryParameters.Remove(pageNumQueryParameter); 4486 queryParameters.Remove("pid"); 4487 4488 if (pageQueryParameter == "page") 4489 { 4490 queryParameters.Add("pid", Pageview.CurrentParagraph.ID.ToString()); 4491 } 4492 4493 if (pagesLoop != null) 4494 { 4495 loopPageSize = pagesLoop.Count; 4496 endPage = 1; 4497 } 4498 else 4499 { 4500 var pageOffset = Math.Floor(Convert.ToDecimal(loopPageSize / 2)); 4501 var middlePage = pageOffset + 1; 4502 4503 if (numOfPages > loopPageSize) 4504 { 4505 startPage = Convert.ToInt32(currentPage - pageOffset) < 1 ? 1 : Convert.ToInt32(currentPage - pageOffset); 4506 endPage = Convert.ToInt32(currentPage + pageOffset) > numOfPages ? numOfPages : Convert.ToInt32(currentPage + pageOffset); 4507 4508 if (currentPage < middlePage) 4509 { 4510 endPage = loopPageSize; 4511 } 4512 else if (currentPage >= middlePage) 4513 { 4514 if (numOfPages < currentPage + pageOffset) 4515 { 4516 startPage = numOfPages - loopPageSize; 4517 if (loopPageSize % 2 != 0) 4518 { 4519 startPage += 1; 4520 } 4521 } 4522 4523 if (loopPageSize % 2 == 0) 4524 { 4525 startPage += 1; 4526 } 4527 } 4528 } 4529 } 4530 4531 if (includeWrapper) 4532 { 4533 4534 4535 #line default 4536 #line hidden 4537 WriteLiteralTo(__razor_helper_writer, " "); 4538 4539 WriteLiteralTo(__razor_helper_writer, "<div class=\"col-xs-12 text-center paginationContainer\">\r\n"); 4540 4541 4542 #line 1709 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4543 } 4544 4545 4546 #line default 4547 #line hidden 4548 WriteLiteralTo(__razor_helper_writer, " <ul"); 4549 4550 WriteLiteralTo(__razor_helper_writer, " class=\"pagination\""); 4551 4552 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 4553 4554 4555 #line 1711 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4556 4557 4558 #line default 4559 #line hidden 4560 4561 #line 1711 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4562 if (previousPageUrl.IsNotNullOrEmpty() && previousPageUrl != "#") 4563 { 4564 var label = includeFirstAndLastLabel ? Translate("Previous") : string.Empty; 4565 4566 4567 #line default 4568 #line hidden 4569 4570 #line 1714 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4571 WriteTo(__razor_helper_writer, InternalRenderPageItem(previousPageUrl, label, "fa-caret-left", IconPosition.Left)); 4572 4573 4574 #line default 4575 #line hidden 4576 4577 #line 1714 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4578 4579 } 4580 4581 #line default 4582 #line hidden 4583 WriteLiteralTo(__razor_helper_writer, "\r\n"); 4584 4585 4586 #line 1716 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4587 4588 4589 #line default 4590 #line hidden 4591 4592 #line 1716 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4593 if (pagesLoop != null) 4594 { 4595 4596 4597 #line default 4598 #line hidden 4599 4600 #line 1718 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4601 WriteTo(__razor_helper_writer, InternalRenderGoToFirstPage(queryParameters, pageNumQueryParameter, currentPage, numOfPages, loopPageSize, pagesLoop[0].GetInteger(pageNumTag))); 4602 4603 4604 #line default 4605 #line hidden 4606 4607 #line 1718 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4608 4609 foreach (var page in pagesLoop) 4610 { 4611 var pageItemHref = pageQueryParameter == "PageNum" || pageQueryParameter == "page" ? page.GetString(pageHrefTag) : pageQueryParameter.StartsWith("CCPage") ? string.Concat("CCPage=", page.GetString(pageHrefTag)) : string.Empty; 4612 endPage = page.GetInteger(pageNumTag); 4613 4614 queryParameters.Remove(pageNumQueryParameter); 4615 if (pageItemHref.IsNotNullOrEmpty()) 4616 { 4617 queryParameters.Add(pageNumQueryParameter, page.GetString(pageNumTag)); 4618 } 4619 4620 4621 #line default 4622 #line hidden 4623 4624 #line 1729 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4625 WriteTo(__razor_helper_writer, InternalRenderPageItem(queryParameters, page.GetString(pageNumTag), page.GetInteger(pageNumTag) == currentPage ? "active" : string.Empty)); 4626 4627 4628 #line default 4629 #line hidden 4630 4631 #line 1729 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4632 4633 4634 } 4635 4636 4637 #line default 4638 #line hidden 4639 4640 #line 1732 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4641 WriteTo(__razor_helper_writer, InternalRenderGoToLastPage(queryParameters, pageNumQueryParameter, currentPage, numOfPages, loopPageSize, endPage)); 4642 4643 4644 #line default 4645 #line hidden 4646 4647 #line 1732 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4648 4649 } 4650 else 4651 { 4652 4653 4654 #line default 4655 #line hidden 4656 4657 #line 1736 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4658 WriteTo(__razor_helper_writer, InternalRenderGoToFirstPage(queryParameters, pageNumQueryParameter, currentPage, numOfPages, loopPageSize)); 4659 4660 4661 #line default 4662 #line hidden 4663 4664 #line 1736 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4665 4666 for (var page = startPage; page <= endPage; page++) 4667 { 4668 queryParameters = Dna.UrlServices.Helpers.UpdateQueryStringKeyValue(queryParameters, pageNumQueryParameter, page.ToString()); 4669 4670 4671 #line default 4672 #line hidden 4673 4674 #line 1740 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4675 WriteTo(__razor_helper_writer, InternalRenderPageItem(queryParameters, page.ToString(), page == currentPage ? "active" : string.Empty)); 4676 4677 4678 #line default 4679 #line hidden 4680 4681 #line 1740 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4682 4683 } 4684 4685 4686 #line default 4687 #line hidden 4688 4689 #line 1742 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4690 WriteTo(__razor_helper_writer, InternalRenderGoToLastPage(queryParameters, pageNumQueryParameter, currentPage, numOfPages, loopPageSize, endPage)); 4691 4692 4693 #line default 4694 #line hidden 4695 4696 #line 1742 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4697 4698 } 4699 4700 #line default 4701 #line hidden 4702 WriteLiteralTo(__razor_helper_writer, "\r\n \r\n"); 4703 4704 4705 #line 1745 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4706 4707 4708 #line default 4709 #line hidden 4710 4711 #line 1745 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4712 if (nextPageUrl.IsNotNullOrEmpty() && nextPageUrl != "#") 4713 { 4714 var label = includeFirstAndLastLabel ? Translate("Next") : string.Empty; 4715 4716 4717 #line default 4718 #line hidden 4719 4720 #line 1748 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4721 WriteTo(__razor_helper_writer, InternalRenderPageItem(nextPageUrl, label, "fa-caret-right", IconPosition.Right)); 4722 4723 4724 #line default 4725 #line hidden 4726 4727 #line 1748 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4728 4729 } 4730 4731 #line default 4732 #line hidden 4733 WriteLiteralTo(__razor_helper_writer, "\r\n </ul>\r\n"); 4734 4735 4736 #line 1751 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4737 if (includeWrapper) 4738 { 4739 4740 4741 #line default 4742 #line hidden 4743 WriteLiteralTo(__razor_helper_writer, " "); 4744 4745 WriteLiteralTo(__razor_helper_writer, "</div>\r\n"); 4746 4747 4748 #line 1754 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4749 } 4750 } 4751 4752 4753 #line default 4754 #line hidden 4755 }); 4756 4757 #line 1756 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4758 } 4759 #line default 4760 #line hidden 4761 4762 4763 #line 1760 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4764 public RazorEngine.Templating.TemplateWriter RenderIcon(string cssPartialClass, string label = "", IconPosition position = IconPosition.Left, bool isLabelATooltip = false) 4765 { 4766 #line default 4767 #line hidden 4768 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 4769 4770 #line 1761 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4771 4772 var icon = !isLabelATooltip ? "<i class='fa " + cssPartialClass + "'></i>" : "<i class='fa " + cssPartialClass + "' data-toggle='" + label + "'></i>"; 4773 var spacing = string.Empty; 4774 4775 if (label.IsNotNullOrEmpty()) 4776 { 4777 spacing = "&nbsp;"; 4778 } 4779 if (cssPartialClass.IsNotNullOrEmpty()) 4780 { 4781 if (isLabelATooltip) 4782 { 4783 4784 4785 #line default 4786 #line hidden 4787 4788 #line 1773 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4789 WriteTo(__razor_helper_writer, icon); 4790 4791 4792 #line default 4793 #line hidden 4794 4795 #line 1773 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4796 4797 } 4798 else if (position == IconPosition.Left) 4799 { 4800 4801 4802 #line default 4803 #line hidden 4804 4805 #line 1777 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4806 WriteTo(__razor_helper_writer, icon); 4807 4808 4809 #line default 4810 #line hidden 4811 4812 #line 1777 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4813 4814 4815 4816 #line default 4817 #line hidden 4818 4819 #line 1778 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4820 WriteTo(__razor_helper_writer, spacing); 4821 4822 4823 #line default 4824 #line hidden 4825 4826 #line 1778 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4827 4828 4829 4830 #line default 4831 #line hidden 4832 4833 #line 1779 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4834 WriteTo(__razor_helper_writer, label); 4835 4836 4837 #line default 4838 #line hidden 4839 4840 #line 1779 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4841 4842 } 4843 else 4844 { 4845 4846 4847 #line default 4848 #line hidden 4849 4850 #line 1783 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4851 WriteTo(__razor_helper_writer, label); 4852 4853 4854 #line default 4855 #line hidden 4856 4857 #line 1783 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4858 4859 4860 4861 #line default 4862 #line hidden 4863 4864 #line 1784 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4865 WriteTo(__razor_helper_writer, spacing); 4866 4867 4868 #line default 4869 #line hidden 4870 4871 #line 1784 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4872 4873 4874 4875 #line default 4876 #line hidden 4877 4878 #line 1785 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4879 WriteTo(__razor_helper_writer, icon); 4880 4881 4882 #line default 4883 #line hidden 4884 4885 #line 1785 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4886 4887 } 4888 } 4889 else 4890 { 4891 4892 4893 #line default 4894 #line hidden 4895 4896 #line 1790 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4897 WriteTo(__razor_helper_writer, label); 4898 4899 4900 #line default 4901 #line hidden 4902 4903 #line 1790 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4904 4905 } 4906 4907 4908 #line default 4909 #line hidden 4910 }); 4911 4912 #line 1792 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4913 } 4914 #line default 4915 #line hidden 4916 4917 4918 #line 1794 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4919 public RazorEngine.Templating.TemplateWriter RenderStackedIcons(string cssPrincipalPartialClass, string cssSecondaryPartialClass, string label = "", IconPosition position = IconPosition.Left, bool isLabelATooltip = false) 4920 { 4921 #line default 4922 #line hidden 4923 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 4924 4925 #line 1795 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4926 4927 var spacing = string.Empty; 4928 var icon = new StringBuilder("<span class='fa-stack'>"); 4929 4930 icon.Append(!isLabelATooltip ? "<i class='fa " + cssPrincipalPartialClass + " fa-stack-2x'></i>" : "<i class='fa " + cssPrincipalPartialClass + " fa-stack-2x' data-toggle='" + label + "'></i>"); 4931 icon.Append("<i class='fa " + cssSecondaryPartialClass + " fa-stack-1x'></i>"); 4932 icon.Append("</span>"); 4933 4934 if (label.IsNotNullOrEmpty()) 4935 { 4936 spacing = "<text>&nbsp;</text>"; 4937 } 4938 if (cssPrincipalPartialClass.IsNotNullOrEmpty() && cssSecondaryPartialClass.IsNotNullOrEmpty()) 4939 { 4940 if (isLabelATooltip) 4941 { 4942 4943 4944 #line default 4945 #line hidden 4946 4947 #line 1811 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4948 WriteTo(__razor_helper_writer, icon.ToString()); 4949 4950 4951 #line default 4952 #line hidden 4953 4954 #line 1811 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4955 4956 } 4957 else if (position == IconPosition.Left) 4958 { 4959 4960 4961 #line default 4962 #line hidden 4963 4964 #line 1815 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4965 WriteTo(__razor_helper_writer, icon.ToString()); 4966 4967 4968 #line default 4969 #line hidden 4970 4971 #line 1815 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4972 4973 4974 4975 #line default 4976 #line hidden 4977 4978 #line 1816 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4979 WriteTo(__razor_helper_writer, spacing); 4980 4981 4982 #line default 4983 #line hidden 4984 4985 #line 1816 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4986 4987 4988 4989 #line default 4990 #line hidden 4991 4992 #line 1817 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 4993 WriteTo(__razor_helper_writer, label); 4994 4995 4996 #line default 4997 #line hidden 4998 4999 #line 1817 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5000 5001 } 5002 else 5003 { 5004 5005 5006 #line default 5007 #line hidden 5008 5009 #line 1821 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5010 WriteTo(__razor_helper_writer, label); 5011 5012 5013 #line default 5014 #line hidden 5015 5016 #line 1821 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5017 5018 5019 5020 #line default 5021 #line hidden 5022 5023 #line 1822 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5024 WriteTo(__razor_helper_writer, spacing); 5025 5026 5027 #line default 5028 #line hidden 5029 5030 #line 1822 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5031 5032 5033 5034 #line default 5035 #line hidden 5036 5037 #line 1823 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5038 WriteTo(__razor_helper_writer, icon.ToString()); 5039 5040 5041 #line default 5042 #line hidden 5043 5044 #line 1823 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5045 5046 } 5047 } 5048 else 5049 { 5050 5051 5052 #line default 5053 #line hidden 5054 5055 #line 1828 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5056 WriteTo(__razor_helper_writer, label); 5057 5058 5059 #line default 5060 #line hidden 5061 5062 #line 1828 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5063 5064 } 5065 5066 5067 #line default 5068 #line hidden 5069 }); 5070 5071 #line 1830 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5072 } 5073 #line default 5074 #line hidden 5075 5076 5077 #line 1832 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5078 public RazorEngine.Templating.TemplateWriter RenderAction(IconAction action, string href = "", string title = "", string onClickConfirm = "") 5079 { 5080 #line default 5081 #line hidden 5082 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 5083 5084 #line 1833 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5085 5086 var attributes = new Dictionary<string, string>(); 5087 5088 if (title.IsNotNullOrEmpty()) 5089 { 5090 attributes.Add("title", title); 5091 } 5092 if (onClickConfirm.IsNotNullOrEmpty()) 5093 { 5094 attributes.Add("onclick", "return confirm('" + onClickConfirm + "');"); 5095 } 5096 if (href.IsNotNullOrEmpty()) 5097 { 5098 attributes.Add("href", href); 5099 } 5100 5101 5102 #line default 5103 #line hidden 5104 5105 #line 1848 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5106 WriteTo(__razor_helper_writer, RenderAction(action, href, attributes)); 5107 5108 5109 #line default 5110 #line hidden 5111 5112 #line 1848 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5113 5114 5115 5116 #line default 5117 #line hidden 5118 }); 5119 5120 #line 1849 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5121 } 5122 #line default 5123 #line hidden 5124 5125 5126 #line 1851 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5127 public RazorEngine.Templating.TemplateWriter RenderAction(IconAction action, string href, Dictionary<string, string> attributes) 5128 { 5129 #line default 5130 #line hidden 5131 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 5132 5133 #line 1852 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5134 5135 var icon = string.Empty; 5136 var linkAttributes = string.Empty; 5137 var label = Translate(action.ToString()); 5138 5139 switch (action) 5140 { 5141 case IconAction.Add: 5142 break; 5143 case IconAction.View: 5144 icon = "fa-eye"; 5145 break; 5146 case IconAction.Edit: 5147 icon = "fa-edit"; 5148 break; 5149 case IconAction.Cancel: 5150 case IconAction.Remove: 5151 icon = "fa-times"; 5152 break; 5153 case IconAction.Delete: 5154 icon = "fa-trash"; 5155 break; 5156 case IconAction.Print: 5157 icon = "fa-print"; 5158 attributes.Add("target", "_blank"); 5159 break; 5160 case IconAction.Save: 5161 break; 5162 case IconAction.Reset: 5163 break; 5164 case IconAction.Undo: 5165 break; 5166 case IconAction.Reorder: 5167 icon = "fa-repeat"; 5168 break; 5169 case IconAction.SetDefault: 5170 icon = "fa-times"; 5171 label = string.Empty; 5172 break; 5173 case IconAction.IsDefault: 5174 icon = "fa-check"; 5175 label = string.Empty; 5176 break; 5177 default: 5178 throw new NotSupportedException("An action is needed to render this helper!"); 5179 } 5180 if (icon.IsNotNullOrEmpty()) 5181 { 5182 if (href.IsNotNullOrEmpty()) 5183 { 5184 5185 5186 #line default 5187 #line hidden 5188 5189 #line 1902 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5190 WriteTo(__razor_helper_writer, GetHtmlElement("a", GetAttributes(attributes))); 5191 5192 5193 #line default 5194 #line hidden 5195 5196 #line 1902 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5197 5198 5199 5200 #line default 5201 #line hidden 5202 5203 #line 1903 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5204 WriteTo(__razor_helper_writer, RenderIcon(icon, label)); 5205 5206 5207 #line default 5208 #line hidden 5209 5210 #line 1903 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5211 5212 5213 5214 #line default 5215 #line hidden 5216 5217 #line 1904 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5218 WriteTo(__razor_helper_writer, GetHtmlElement("a", true)); 5219 5220 5221 #line default 5222 #line hidden 5223 5224 #line 1904 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5225 5226 } 5227 else if (label.IsNullOrEmpty()) 5228 { 5229 5230 5231 #line default 5232 #line hidden 5233 5234 #line 1908 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5235 WriteTo(__razor_helper_writer, RenderIcon(icon)); 5236 5237 5238 #line default 5239 #line hidden 5240 5241 #line 1908 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5242 5243 } 5244 } 5245 5246 5247 5248 #line default 5249 #line hidden 5250 }); 5251 5252 #line 1912 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5253 } 5254 #line default 5255 #line hidden 5256 5257 5258 #line 1914 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5259 public RazorEngine.Templating.TemplateWriter RenderBootstrapButton(BootstrapButtonSettings settings) 5260 { 5261 #line default 5262 #line hidden 5263 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 5264 5265 #line 1915 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5266 5267 var attributes = new StringBuilder(GetAttribute("class", "btn " + (settings.CssClass.IsNotNullOrEmpty() ? settings.CssClass : "btn-default"))); 5268 attributes.Append(GetAttribute("target", settings.Target)); 5269 attributes.Append(GetAttribute("href", settings.Href)); 5270 attributes.Append(GetAttribute("name", settings.SystemName)); 5271 attributes.Append(GetAttribute("id", settings.Id)); 5272 attributes.Append(GetAttribute("value", settings.Value)); 5273 if (settings.ButtonType == BootstrapButtonSettings.BootstrapButtonType.Button && !settings.Attributes.ContainsKey("type")) 5274 { 5275 settings.Attributes.Add("type","submit"); 5276 } 5277 5278 attributes.Append(GetAttributes(settings.Attributes)); 5279 string htmlElement; 5280 5281 switch (settings.ButtonType) 5282 { 5283 case BootstrapButtonSettings.BootstrapButtonType.Button: 5284 htmlElement = "button"; 5285 break; 5286 case BootstrapButtonSettings.BootstrapButtonType.Anchor: 5287 htmlElement = "a"; 5288 break; 5289 default: 5290 throw new NotSupportedException(string.Format("Unsupported Bootstrap Button type: {0}.", settings.ButtonType.ToString())); 5291 } 5292 5293 5294 #line default 5295 #line hidden 5296 5297 #line 1941 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5298 WriteTo(__razor_helper_writer, GetHtmlElement(htmlElement, attributes.ToString())); 5299 5300 5301 #line default 5302 #line hidden 5303 5304 #line 1941 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5305 5306 5307 5308 #line default 5309 #line hidden 5310 5311 #line 1942 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5312 WriteTo(__razor_helper_writer, RenderIcon(settings.IconCssClass, settings.Label, settings.IconPosition)); 5313 5314 5315 #line default 5316 #line hidden 5317 5318 #line 1942 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5319 5320 5321 5322 #line default 5323 #line hidden 5324 5325 #line 1943 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5326 WriteTo(__razor_helper_writer, GetHtmlElement(htmlElement, true)); 5327 5328 5329 #line default 5330 #line hidden 5331 5332 #line 1943 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5333 5334 5335 5336 #line default 5337 #line hidden 5338 }); 5339 5340 #line 1944 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5341 } 5342 #line default 5343 #line hidden 5344 5345 5346 #line 1946 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5347 public RazorEngine.Templating.TemplateWriter RenderAddToCart(string productId, string productUnitId, string productVariantId, int availableAmount = 0, bool doNotRenderHiddenFields = false) 5348 { 5349 #line default 5350 #line hidden 5351 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 5352 5353 #line 1947 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5354 5355 var addToCartButtonSettings = new BootstrapButtonSettings 5356 { 5357 Label = Translate("Add to Cart"), 5358 CssClass = availableAmount <= 0 ? "btn-default addToCartSubmit disabled" : "btn-default addToCartSubmit", 5359 Href = string.Concat(Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(Dynamicweb.Services.Pages.GetPageByNavigationTag(Pageview.AreaID, "MiniCart").ID),"?productid=", productId, "&amp;variantID=", productVariantId, "&amp;cartcmd=add"), 5360 IconCssClass = "fa-shopping-cart", 5361 Attributes = new Dictionary<string, string> 5362 { 5363 {"data-add", Translate("Add to Cart")}, 5364 {"data-added", Translate("Added")}, 5365 {"data-outofstock", Translate("Out of stock")}, 5366 {"data-stock", availableAmount.ToString()} 5367 } 5368 }; 5369 5370 5371 #line default 5372 #line hidden 5373 5374 #line 1962 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5375 WriteTo(__razor_helper_writer, RenderBootstrapButton(addToCartButtonSettings)); 5376 5377 5378 #line default 5379 #line hidden 5380 5381 #line 1962 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5382 5383 if (!doNotRenderHiddenFields) 5384 { 5385 5386 5387 #line default 5388 #line hidden 5389 5390 #line 1965 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5391 WriteTo(__razor_helper_writer, RenderField(FieldSettings.CreateHiddenField("redirect", "false", "redirect" + productId))); 5392 5393 5394 #line default 5395 #line hidden 5396 5397 #line 1965 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5398 5399 5400 5401 #line default 5402 #line hidden 5403 5404 #line 1966 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5405 WriteTo(__razor_helper_writer, RenderField(FieldSettings.CreateHiddenField("cartcmd", "add", "cartcmd" + productId))); 5406 5407 5408 #line default 5409 #line hidden 5410 5411 #line 1966 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5412 5413 5414 5415 #line default 5416 #line hidden 5417 5418 #line 1967 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5419 WriteTo(__razor_helper_writer, RenderField(FieldSettings.CreateHiddenField("productid", productId, "productId" + productId))); 5420 5421 5422 #line default 5423 #line hidden 5424 5425 #line 1967 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5426 5427 5428 5429 #line default 5430 #line hidden 5431 5432 #line 1968 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5433 WriteTo(__razor_helper_writer, RenderField(FieldSettings.CreateHiddenField("unitID", productUnitId, "unitID" + productId))); 5434 5435 5436 #line default 5437 #line hidden 5438 5439 #line 1968 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5440 5441 if (Dynamicweb.Security.UserManagement.User.IsExtranetUserLoggedIn()) 5442 { 5443 5444 5445 #line default 5446 #line hidden 5447 5448 #line 1971 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5449 WriteTo(__razor_helper_writer, RenderField(FieldSettings.CreateHiddenField("getproductinfo", "true", "getproductinfo" + productId))); 5450 5451 5452 #line default 5453 #line hidden 5454 5455 #line 1971 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5456 5457 } 5458 } 5459 5460 5461 #line default 5462 #line hidden 5463 5464 #line 1974 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5465 WriteTo(__razor_helper_writer, RenderField(FieldSettings.CreateSubmitField(Translate("Add to Cart"), "hidden"))); 5466 5467 5468 #line default 5469 #line hidden 5470 5471 #line 1974 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5472 5473 5474 5475 #line default 5476 #line hidden 5477 }); 5478 5479 #line 1975 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5480 } 5481 #line default 5482 #line hidden 5483 5484 5485 #line 1977 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5486 public RazorEngine.Templating.TemplateWriter RenderSocialMediaShare() 5487 { 5488 #line default 5489 #line hidden 5490 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 5491 5492 #line 1978 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5493 5494 5495 5496 #line default 5497 #line hidden 5498 WriteLiteralTo(__razor_helper_writer, " <div"); 5499 5500 WriteLiteralTo(__razor_helper_writer, " class=\"shareIcons\""); 5501 5502 WriteLiteralTo(__razor_helper_writer, ">\r\n <span>"); 5503 5504 5505 #line 1980 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5506 WriteTo(__razor_helper_writer, Translate("Share")); 5507 5508 5509 #line default 5510 #line hidden 5511 WriteLiteralTo(__razor_helper_writer, "</span>\r\n"); 5512 5513 WriteLiteralTo(__razor_helper_writer, " "); 5514 5515 5516 #line 1981 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5517 WriteTo(__razor_helper_writer, RenderSocialMedia(false, true)); 5518 5519 5520 #line default 5521 #line hidden 5522 WriteLiteralTo(__razor_helper_writer, "\r\n </div>\r\n"); 5523 5524 5525 #line 1983 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5526 5527 5528 #line default 5529 #line hidden 5530 }); 5531 5532 #line 1983 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5533 } 5534 #line default 5535 #line hidden 5536 5537 5538 #line 1985 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5539 public RazorEngine.Templating.TemplateWriter RenderOpenGraphMeta(string type, string image, string title, string teaser = "", string imageAlt = "") 5540 { 5541 #line default 5542 #line hidden 5543 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 5544 5545 #line 1986 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5546 5547 var culture = Pageview.Area.Culture.Replace("-", "_"); 5548 teaser = System.Text.RegularExpressions.Regex.Replace(teaser, "<.*?>", string.Empty); 5549 if (type.IsNullOrEmpty()) 5550 { 5551 type = "article"; 5552 } 5553 if (imageAlt.IsNullOrEmpty()) 5554 { 5555 imageAlt = title; 5556 } 5557 5558 5559 #line default 5560 #line hidden 5561 5562 #line 1997 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5563 WriteTo(__razor_helper_writer, SnippetStart("OGMeta")); 5564 5565 5566 #line default 5567 #line hidden 5568 5569 #line 1997 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5570 5571 5572 5573 #line default 5574 #line hidden 5575 WriteLiteralTo(__razor_helper_writer, " <meta"); 5576 5577 WriteLiteralTo(__razor_helper_writer, " property=\"og:title\""); 5578 5579 WriteAttributeTo(__razor_helper_writer, "content", Tuple.Create(" content=\"", 80383), Tuple.Create("\"", 80423) 5580 5581 #line 1998 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5582 , Tuple.Create(Tuple.Create("", 80393), Tuple.Create<System.Object, System.Int32>(HttpUtility.HtmlEncode(title) 5583 5584 #line default 5585 #line hidden 5586 , 80393), false) 5587 ); 5588 5589 WriteLiteralTo(__razor_helper_writer, "/>\r\n"); 5590 5591 WriteLiteralTo(__razor_helper_writer, " <meta"); 5592 5593 WriteLiteralTo(__razor_helper_writer, " property=\"og:image\""); 5594 5595 WriteAttributeTo(__razor_helper_writer, "content", Tuple.Create(" content=\"", 80461), Tuple.Create("\"", 80537) 5596 5597 #line 1999 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5598 , Tuple.Create(Tuple.Create("", 80471), Tuple.Create<System.Object, System.Int32>(string.Concat(Dna.UrlServices.Helpers.GetCurrentUrl(true), image) 5599 5600 #line default 5601 #line hidden 5602 , 80471), false) 5603 ); 5604 5605 WriteLiteralTo(__razor_helper_writer, "/>\r\n"); 5606 5607 WriteLiteralTo(__razor_helper_writer, " <meta"); 5608 5609 WriteLiteralTo(__razor_helper_writer, " property=\"og:image:alt\""); 5610 5611 WriteAttributeTo(__razor_helper_writer, "content", Tuple.Create(" content=\"", 80579), Tuple.Create("\"", 80598) 5612 5613 #line 2000 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5614 , Tuple.Create(Tuple.Create("", 80589), Tuple.Create<System.Object, System.Int32>(imageAlt 5615 5616 #line default 5617 #line hidden 5618 , 80589), false) 5619 ); 5620 5621 WriteLiteralTo(__razor_helper_writer, "/>\r\n"); 5622 5623 WriteLiteralTo(__razor_helper_writer, " <meta"); 5624 5625 WriteLiteralTo(__razor_helper_writer, " property=\"og:site_name\""); 5626 5627 WriteAttributeTo(__razor_helper_writer, "content", Tuple.Create(" content=\"", 80640), Tuple.Create("\"", 80684) 5628 5629 #line 2001 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5630 , Tuple.Create(Tuple.Create("", 80650), Tuple.Create<System.Object, System.Int32>(Pageview.Area.Item["CompanyName"] 5631 5632 #line default 5633 #line hidden 5634 , 80650), false) 5635 ); 5636 5637 WriteLiteralTo(__razor_helper_writer, "/>\r\n"); 5638 5639 WriteLiteralTo(__razor_helper_writer, " <meta"); 5640 5641 WriteLiteralTo(__razor_helper_writer, " property=\"og:url\""); 5642 5643 WriteAttributeTo(__razor_helper_writer, "content", Tuple.Create(" content=\"", 80720), Tuple.Create("\"", 80770) 5644 5645 #line 2002 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5646 , Tuple.Create(Tuple.Create("", 80730), Tuple.Create<System.Object, System.Int32>(Dna.UrlServices.Helpers.GetCurrentUrl() 5647 5648 #line default 5649 #line hidden 5650 , 80730), false) 5651 ); 5652 5653 WriteLiteralTo(__razor_helper_writer, "/>\r\n"); 5654 5655 WriteLiteralTo(__razor_helper_writer, " <meta"); 5656 5657 WriteLiteralTo(__razor_helper_writer, " property=\"og:description\""); 5658 5659 WriteAttributeTo(__razor_helper_writer, "content", Tuple.Create(" content=\"", 80814), Tuple.Create("\"", 80855) 5660 5661 #line 2003 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5662 , Tuple.Create(Tuple.Create("", 80824), Tuple.Create<System.Object, System.Int32>(HttpUtility.HtmlEncode(teaser) 5663 5664 #line default 5665 #line hidden 5666 , 80824), false) 5667 ); 5668 5669 WriteLiteralTo(__razor_helper_writer, "/>\r\n"); 5670 5671 WriteLiteralTo(__razor_helper_writer, " <meta"); 5672 5673 WriteLiteralTo(__razor_helper_writer, " property=\"og:type\""); 5674 5675 WriteAttributeTo(__razor_helper_writer, "content", Tuple.Create(" content=\"", 80892), Tuple.Create("\"", 80907) 5676 5677 #line 2004 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5678 , Tuple.Create(Tuple.Create("", 80902), Tuple.Create<System.Object, System.Int32>(type 5679 5680 #line default 5681 #line hidden 5682 , 80902), false) 5683 ); 5684 5685 WriteLiteralTo(__razor_helper_writer, "/>\r\n"); 5686 5687 WriteLiteralTo(__razor_helper_writer, " <meta"); 5688 5689 WriteLiteralTo(__razor_helper_writer, " property=\"og:locale\""); 5690 5691 WriteAttributeTo(__razor_helper_writer, "content", Tuple.Create(" content=\"", 80946), Tuple.Create("\"", 80964) 5692 5693 #line 2005 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5694 , Tuple.Create(Tuple.Create("", 80956), Tuple.Create<System.Object, System.Int32>(culture 5695 5696 #line default 5697 #line hidden 5698 , 80956), false) 5699 ); 5700 5701 WriteLiteralTo(__razor_helper_writer, "/>\r\n"); 5702 5703 5704 #line 2006 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5705 5706 5707 #line default 5708 #line hidden 5709 5710 #line 2006 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5711 WriteTo(__razor_helper_writer, SnippetEnd("OGMeta")); 5712 5713 5714 #line default 5715 #line hidden 5716 5717 #line 2006 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5718 5719 5720 5721 #line default 5722 #line hidden 5723 }); 5724 5725 #line 2007 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5726 } 5727 #line default 5728 #line hidden 5729 5730 5731 #line 2009 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5732 public RazorEngine.Templating.TemplateWriter RenderSocialMedia(bool isEmailTemplate = false, bool isToShare = false) 5733 { 5734 #line default 5735 #line hidden 5736 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 5737 5738 #line 2010 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5739 5740 var page = Dynamicweb.Extensibility.ServiceLocator.Current.GetPageService().GetPage(Dynamicweb.Services.Pages.GetPageByNavigationTag(Pageview.AreaID, "GeneralSettings").ID); 5741 var generalSettings = Dynamicweb.Content.Items.Item.GetItemById(page.ItemType, page.ItemId); 5742 5743 if(generalSettings["SocialMedia"] != null) { 5744 var socialMedia = Dynamicweb.Content.Items.ItemList.GetItemListById(int.Parse(generalSettings["SocialMedia"].ToString())); 5745 5746 if(socialMedia.Relations.Any()) 5747 { 5748 if(!isEmailTemplate) 5749 { 5750 5751 5752 #line default 5753 #line hidden 5754 WriteLiteralTo(__razor_helper_writer, " "); 5755 5756 WriteLiteralTo(__razor_helper_writer, "<ul class=\"socialMedia\">\r\n"); 5757 5758 5759 #line 2022 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5760 } 5761 foreach (var r in socialMedia.Relations) 5762 { 5763 var socialNetwork = Dynamicweb.Content.Items.Item.GetItemById("SocialLinks", r.Id); 5764 var className = (socialNetwork["Icon"] ?? "").ToString(); 5765 var socialName = (socialNetwork["Name"] ?? "").ToString(); 5766 var socialLink = (socialNetwork["Link"] ?? "").ToString(); 5767 var shareLink = (socialNetwork["ShareURL"] ?? "").ToString(); 5768 5769 if (isEmailTemplate) 5770 { 5771 5772 5773 #line default 5774 #line hidden 5775 WriteLiteralTo(__razor_helper_writer, " "); 5776 5777 WriteLiteralTo(__razor_helper_writer, "&nbsp;\r\n"); 5778 5779 WriteLiteralTo(__razor_helper_writer, " <a"); 5780 5781 WriteAttributeTo(__razor_helper_writer, "title", Tuple.Create(" title=\"", 82439), Tuple.Create("\"", 82458) 5782 5783 #line 2034 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5784 , Tuple.Create(Tuple.Create("", 82447), Tuple.Create<System.Object, System.Int32>(socialName 5785 5786 #line default 5787 #line hidden 5788 , 82447), false) 5789 ); 5790 5791 WriteLiteralTo(__razor_helper_writer, " target=\"_blank\""); 5792 5793 WriteAttributeTo(__razor_helper_writer, "href", Tuple.Create(" href=\"", 82475), Tuple.Create("\"", 82493) 5794 5795 #line 2034 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5796 , Tuple.Create(Tuple.Create("", 82482), Tuple.Create<System.Object, System.Int32>(socialLink 5797 5798 #line default 5799 #line hidden 5800 , 82482), false) 5801 ); 5802 5803 WriteLiteralTo(__razor_helper_writer, ">"); 5804 5805 5806 #line 2034 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5807 WriteTo(__razor_helper_writer, socialName); 5808 5809 5810 #line default 5811 #line hidden 5812 WriteLiteralTo(__razor_helper_writer, "</a>\r\n"); 5813 5814 WriteLiteralTo(__razor_helper_writer, " "); 5815 5816 WriteLiteralTo(__razor_helper_writer, "&nbsp;\r\n"); 5817 5818 5819 #line 2036 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5820 } 5821 else if(!isToShare || shareLink.IsNotNullOrEmpty()) 5822 { 5823 5824 5825 #line default 5826 #line hidden 5827 WriteLiteralTo(__razor_helper_writer, " <li>\r\n <a"); 5828 5829 WriteAttributeTo(__razor_helper_writer, "title", Tuple.Create(" title=\"", 82725), Tuple.Create("\"", 82744) 5830 5831 #line 2040 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5832 , Tuple.Create(Tuple.Create("", 82733), Tuple.Create<System.Object, System.Int32>(socialName 5833 5834 #line default 5835 #line hidden 5836 , 82733), false) 5837 ); 5838 5839 WriteAttributeTo(__razor_helper_writer, "class", Tuple.Create(" class=\"", 82745), Tuple.Create("\"", 82766) 5840 5841 #line 2040 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5842 , Tuple.Create(Tuple.Create("", 82753), Tuple.Create<System.Object, System.Int32>(className 5843 5844 #line default 5845 #line hidden 5846 , 82753), false) 5847 , Tuple.Create(Tuple.Create(" ", 82763), Tuple.Create("fa", 82764), true) 5848 ); 5849 5850 WriteLiteralTo(__razor_helper_writer, " target=\"_blank\""); 5851 5852 WriteLiteralTo(__razor_helper_writer, " data-sharehref=\""); 5853 5854 5855 #line 2040 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5856 WriteTo(__razor_helper_writer, shareLink); 5857 5858 5859 #line default 5860 #line hidden 5861 5862 #line 2040 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5863 WriteTo(__razor_helper_writer, Dna.UrlServices.Helpers.GetCurrentUrl()); 5864 5865 5866 #line default 5867 #line hidden 5868 WriteLiteralTo(__razor_helper_writer, "\""); 5869 5870 WriteAttributeTo(__razor_helper_writer, "href", Tuple.Create(" href=\"", 82851), Tuple.Create("\"", 82869) 5871 5872 #line 2040 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5873 , Tuple.Create(Tuple.Create("", 82858), Tuple.Create<System.Object, System.Int32>(socialLink 5874 5875 #line default 5876 #line hidden 5877 , 82858), false) 5878 ); 5879 5880 WriteLiteralTo(__razor_helper_writer, "><span"); 5881 5882 WriteLiteralTo(__razor_helper_writer, " class=\"hidden\""); 5883 5884 WriteLiteralTo(__razor_helper_writer, ">"); 5885 5886 5887 #line 2040 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5888 WriteTo(__razor_helper_writer, socialName); 5889 5890 5891 #line default 5892 #line hidden 5893 WriteLiteralTo(__razor_helper_writer, "</span></a>\r\n </li>\r\n"); 5894 5895 5896 #line 2042 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5897 } 5898 } 5899 if(!isEmailTemplate) 5900 { 5901 5902 5903 #line default 5904 #line hidden 5905 WriteLiteralTo(__razor_helper_writer, " "); 5906 5907 WriteLiteralTo(__razor_helper_writer, "</ul>\r\n"); 5908 5909 5910 #line 2047 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5911 } 5912 } 5913 } 5914 5915 5916 #line default 5917 #line hidden 5918 }); 5919 5920 #line 2050 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5921 } 5922 #line default 5923 #line hidden 5924 5925 5926 #line 2052 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5927 public RazorEngine.Templating.TemplateWriter RenderNoResults(string wording, string title = "", bool hasWrapper = false, string wrapperClass = "col-xs-12 noPadding" ) 5928 { 5929 #line default 5930 #line hidden 5931 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 5932 5933 #line 2053 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5934 5935 if (hasWrapper) 5936 { 5937 5938 5939 #line default 5940 #line hidden 5941 WriteLiteralTo(__razor_helper_writer, " "); 5942 5943 WriteLiteralTo(__razor_helper_writer, "<div class=\"noResultsWrapper "); 5944 5945 5946 #line 2056 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5947 WriteTo(__razor_helper_writer, wrapperClass); 5948 5949 5950 #line default 5951 #line hidden 5952 WriteLiteralTo(__razor_helper_writer, "\">\r\n"); 5953 5954 5955 #line 2057 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5956 } 5957 if (title.IsNotNullOrEmpty()) 5958 { 5959 5960 5961 #line default 5962 #line hidden 5963 WriteLiteralTo(__razor_helper_writer, " <h2>"); 5964 5965 5966 #line 2060 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5967 WriteTo(__razor_helper_writer, title); 5968 5969 5970 #line default 5971 #line hidden 5972 WriteLiteralTo(__razor_helper_writer, "</h2>\r\n"); 5973 5974 5975 #line 2061 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5976 } 5977 5978 5979 #line default 5980 #line hidden 5981 WriteLiteralTo(__razor_helper_writer, " <p>"); 5982 5983 5984 #line 2062 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5985 WriteTo(__razor_helper_writer, wording); 5986 5987 5988 #line default 5989 #line hidden 5990 WriteLiteralTo(__razor_helper_writer, "</p>\r\n"); 5991 5992 5993 #line 2063 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 5994 if (hasWrapper) 5995 { 5996 5997 5998 #line default 5999 #line hidden 6000 WriteLiteralTo(__razor_helper_writer, " "); 6001 6002 WriteLiteralTo(__razor_helper_writer, "</div>\r\n"); 6003 6004 6005 #line 2066 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6006 } 6007 6008 6009 #line default 6010 #line hidden 6011 }); 6012 6013 #line 2067 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6014 } 6015 #line default 6016 #line hidden 6017 6018 6019 #line 2069 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6020 public RazorEngine.Templating.TemplateWriter RenderImage(ImageSettings imageSettings) 6021 { 6022 #line default 6023 #line hidden 6024 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 6025 6026 #line 2070 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6027 6028 var imageMarkup = new StringBuilder(); 6029 var widthAndHeight = GetWidthAndHeightFromQueryString(imageSettings.Source); 6030 var widthAndHeightForMobile = GetWidthAndHeightFromQueryString(imageSettings.SourceForMobile, true); 6031 var widthAndHeightForTablet = GetWidthAndHeightFromQueryString(imageSettings.SourceForTablet, true); 6032 6033 if (!imageSettings.Attributes.ContainsKey("width") && widthAndHeight.ContainsKey("width") && widthAndHeight["width"].IsNotNullOrEmpty()) 6034 { 6035 imageSettings.Attributes.Add("width", widthAndHeight["width"]); 6036 } 6037 if (!imageSettings.Attributes.ContainsKey("height") && widthAndHeight.ContainsKey("height") && widthAndHeight["height"].IsNotNullOrEmpty()) 6038 { 6039 imageSettings.Attributes.Add("height", widthAndHeight["height"]); 6040 } 6041 if (!imageSettings.Attributes.ContainsKey("class")) 6042 { 6043 imageSettings.Attributes.Add("class", "img-responsive " + imageSettings.CssClass); 6044 } 6045 if (!imageSettings.Attributes.ContainsKey("src")) 6046 { 6047 imageSettings.Attributes.Add("src", imageSettings.Source); 6048 } 6049 if (!imageSettings.Attributes.ContainsKey("alt")) 6050 { 6051 imageSettings.Attributes.Add("alt", imageSettings.AltText); 6052 } 6053 if (!imageSettings.Attributes.ContainsKey("title")) 6054 { 6055 imageSettings.Attributes.Add("title", imageSettings.Title); 6056 } 6057 6058 if (imageSettings.IncludeWrapper) 6059 { 6060 var wrapperAttributes = new Dictionary<string, string>(); 6061 if (imageSettings.WrapperCssClass.IsNotNullOrEmpty()) 6062 { 6063 wrapperAttributes.Add("class", imageSettings.WrapperCssClass); 6064 } 6065 6066 imageMarkup.Append(GetHtmlElement(imageSettings.WrapperElement, wrapperAttributes)); 6067 } 6068 6069 if (imageSettings.Href.IsNotNullOrEmpty()) 6070 { 6071 var linkAttributes = new Dictionary<string, string> {{"href", imageSettings.Href}}; 6072 if (imageSettings.HrefCssClass.IsNotNullOrEmpty()) 6073 { 6074 linkAttributes.Add("class", imageSettings.HrefCssClass); 6075 } 6076 if (imageSettings.HrefTarget.IsNotNullOrEmpty()) 6077 { 6078 linkAttributes.Add("target", imageSettings.HrefTarget); 6079 } 6080 6081 imageMarkup.Append(GetHtmlElement("a", linkAttributes)); 6082 } 6083 6084 if (widthAndHeightForMobile.Any() || widthAndHeightForTablet.Any()) 6085 { 6086 imageMarkup.Append(GetHtmlElement("picture")); 6087 6088 imageMarkup.Append(GetHtmlElement("source")); 6089 6090 if (widthAndHeightForMobile.Any()) 6091 { 6092 imageMarkup.Append(GetHtmlElement("srcset", widthAndHeightForMobile)); 6093 } 6094 6095 if (widthAndHeightForTablet.Any()) 6096 { 6097 imageMarkup.Append(GetHtmlElement("srcset", widthAndHeightForTablet)); 6098 } 6099 6100 imageMarkup.Append(GetHtmlElement("source", true)); 6101 } 6102 6103 imageMarkup.Append(GetHtmlElement("img", imageSettings.Attributes, true)); 6104 6105 if (imageSettings.SourceForMobile.IsNotNullOrEmpty() || imageSettings.SourceForTablet.IsNotNullOrEmpty()) 6106 { 6107 imageMarkup.Append(GetHtmlElement("picture", true)); 6108 } 6109 6110 if (imageSettings.Href.IsNotNullOrEmpty()) 6111 { 6112 imageMarkup.Append(GetHtmlElement("a", true)); 6113 } 6114 6115 if (imageSettings.IncludeWrapper) 6116 { 6117 imageMarkup.Append(GetHtmlElement(imageSettings.WrapperElement, true)); 6118 } 6119 6120 6121 6122 #line default 6123 #line hidden 6124 6125 #line 2163 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6126 WriteTo(__razor_helper_writer, imageMarkup.ToString()); 6127 6128 6129 #line default 6130 #line hidden 6131 6132 #line 2163 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6133 6134 6135 6136 #line default 6137 #line hidden 6138 }); 6139 6140 #line 2164 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6141 } 6142 #line default 6143 #line hidden 6144 6145 6146 #line 2166 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6147 public RazorEngine.Templating.TemplateWriter RenderHtmlElementBetweenEachString(List<string> listOfStrings, string htmlElement = "br" ) 6148 { 6149 #line default 6150 #line hidden 6151 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 6152 6153 #line 2167 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6154 6155 foreach (var str in listOfStrings) 6156 { 6157 if (str.IsNullOrEmpty()){continue;} 6158 6159 6160 #line default 6161 #line hidden 6162 6163 #line 2171 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6164 WriteTo(__razor_helper_writer, string.Concat(str, GetHtmlElement(htmlElement, true))); 6165 6166 6167 #line default 6168 #line hidden 6169 6170 #line 2171 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6171 6172 } 6173 6174 6175 #line default 6176 #line hidden 6177 }); 6178 6179 #line 2173 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6180 } 6181 #line default 6182 #line hidden 6183 6184 6185 #line 2175 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6186 public RazorEngine.Templating.TemplateWriter RenderProductPrice(string productPrice = "") 6187 { 6188 #line default 6189 #line hidden 6190 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 6191 6192 #line 2176 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6193 6194 6195 6196 #line default 6197 #line hidden 6198 6199 #line 2177 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6200 WriteTo(__razor_helper_writer, GetProductPrice(productPrice)); 6201 6202 6203 #line default 6204 #line hidden 6205 6206 #line 2177 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6207 6208 6209 6210 #line default 6211 #line hidden 6212 }); 6213 6214 #line 2178 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6215 } 6216 #line default 6217 #line hidden 6218 6219 6220 #line 2180 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6221 public RazorEngine.Templating.TemplateWriter RenderNoErpConnectionMessage() 6222 { 6223 #line default 6224 #line hidden 6225 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 6226 6227 #line 2181 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6228 6229 6230 6231 #line default 6232 #line hidden 6233 6234 #line 2182 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6235 WriteTo(__razor_helper_writer, GetNoErpConnectionMessage()); 6236 6237 6238 #line default 6239 #line hidden 6240 6241 #line 2182 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6242 6243 6244 6245 #line default 6246 #line hidden 6247 }); 6248 6249 #line 2183 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6250 } 6251 #line default 6252 #line hidden 6253 6254 6255 #line 2202 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6256 public RazorEngine.Templating.TemplateWriter InternalRenderGiftCardAmount(bool isGiftCard = false, string productPrice = "", string productId = "") 6257 { 6258 #line default 6259 #line hidden 6260 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 6261 6262 #line 2203 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6263 6264 if (isGiftCard) 6265 { 6266 var giftCardAmountFieldSettings = new FieldSettings 6267 { 6268 Type = FieldType.Number, 6269 SystemName = "Amount", 6270 Id = "Amount" + productId, 6271 Placeholder = Translate("amount"), 6272 Value = productPrice, 6273 IncludeWrapper = true, 6274 WrapperCssClass = "pull-left giftCardAmount", 6275 Attributes = new Dictionary<string, string> 6276 { 6277 {"step", "0.01"}, 6278 {"min", "0.01"} 6279 } 6280 }; 6281 6282 6283 #line default 6284 #line hidden 6285 6286 #line 2221 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6287 WriteTo(__razor_helper_writer, RenderField(giftCardAmountFieldSettings)); 6288 6289 6290 #line default 6291 #line hidden 6292 6293 #line 2221 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6294 6295 } 6296 6297 6298 #line default 6299 #line hidden 6300 }); 6301 6302 #line 2223 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6303 } 6304 #line default 6305 #line hidden 6306 6307 6308 #line 2227 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6309 public RazorEngine.Templating.TemplateWriter RenderProductReviewsCount(int count = -1) 6310 { 6311 #line default 6312 #line hidden 6313 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 6314 6315 #line 2228 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6316 6317 if (count == -1) 6318 { 6319 count = GetInteger("Comments.Count"); 6320 } 6321 6322 6323 #line default 6324 #line hidden 6325 WriteLiteralTo(__razor_helper_writer, " <span>"); 6326 6327 6328 #line 2233 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6329 WriteTo(__razor_helper_writer, string.Concat(count, " ", count == 1 ? Translate("Review") : Translate("Reviews"))); 6330 6331 6332 #line default 6333 #line hidden 6334 WriteLiteralTo(__razor_helper_writer, "</span>\r\n"); 6335 6336 6337 #line 2234 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6338 6339 6340 #line default 6341 #line hidden 6342 }); 6343 6344 #line 2234 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6345 } 6346 #line default 6347 #line hidden 6348 6349 6350 #line 2235 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6351 public RazorEngine.Templating.TemplateWriter RenderRating(double rating) 6352 { 6353 #line default 6354 #line hidden 6355 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 6356 6357 #line 2236 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6358 6359 6360 6361 #line default 6362 #line hidden 6363 WriteLiteralTo(__razor_helper_writer, " <ul"); 6364 6365 WriteLiteralTo(__razor_helper_writer, " class=\"rating\""); 6366 6367 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 6368 6369 6370 #line 2238 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6371 6372 6373 #line default 6374 #line hidden 6375 6376 #line 2238 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6377 for (var s = 5; s > 0; s--) 6378 { 6379 var cssClass = string.Empty; 6380 var iconCssClass = "fa-star"; 6381 6382 if (Math.Abs(s - Math.Ceiling(rating)) <= 0) 6383 { 6384 cssClass = "class='star'"; 6385 iconCssClass = !(Math.Abs(rating - Math.Round(rating)) <= 0) ? "fa-star-half-o" : "fa-star"; 6386 } 6387 else if (Math.Ceiling(rating) < s) 6388 { 6389 iconCssClass = "fa-star-o"; 6390 } 6391 6392 6393 6394 #line default 6395 #line hidden 6396 WriteLiteralTo(__razor_helper_writer, " <li"); 6397 6398 WriteLiteralTo(__razor_helper_writer, " data-star=\""); 6399 6400 6401 #line 2253 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6402 WriteTo(__razor_helper_writer, s); 6403 6404 6405 #line default 6406 #line hidden 6407 WriteLiteralTo(__razor_helper_writer, "\""); 6408 6409 WriteLiteralTo(__razor_helper_writer, " "); 6410 6411 6412 #line 2253 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6413 WriteTo(__razor_helper_writer, cssClass); 6414 6415 6416 #line default 6417 #line hidden 6418 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 6419 6420 WriteLiteralTo(__razor_helper_writer, " "); 6421 6422 6423 #line 2254 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6424 WriteTo(__razor_helper_writer, RenderIcon(iconCssClass)); 6425 6426 6427 #line default 6428 #line hidden 6429 WriteLiteralTo(__razor_helper_writer, "\r\n </li>\r\n"); 6430 6431 6432 #line 2256 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6433 } 6434 6435 #line default 6436 #line hidden 6437 WriteLiteralTo(__razor_helper_writer, "\r\n </ul>\r\n"); 6438 6439 6440 #line 2258 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6441 6442 6443 #line default 6444 #line hidden 6445 }); 6446 6447 #line 2258 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6448 } 6449 #line default 6450 #line hidden 6451 6452 6453 #line 2260 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6454 public RazorEngine.Templating.TemplateWriter RenderStockStatus(string stockStatus, int productType = 0) 6455 { 6456 #line default 6457 #line hidden 6458 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 6459 6460 #line 2261 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6461 6462 // Only show if it's not a Service or Gift Card 6463 if (productType != 1 && productType != 3) 6464 { 6465 6466 6467 #line default 6468 #line hidden 6469 WriteLiteralTo(__razor_helper_writer, " <div"); 6470 6471 WriteLiteralTo(__razor_helper_writer, " class=\"col-xs-12 noPadding stockStatus\""); 6472 6473 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 6474 6475 WriteLiteralTo(__razor_helper_writer, " "); 6476 6477 6478 #line 2266 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6479 WriteTo(__razor_helper_writer, RenderIcon(stockStatus, Translate("Stock"))); 6480 6481 6482 #line default 6483 #line hidden 6484 WriteLiteralTo(__razor_helper_writer, "\r\n </div>\r\n"); 6485 6486 6487 #line 2268 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6488 } 6489 6490 6491 #line default 6492 #line hidden 6493 }); 6494 6495 #line 2269 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6496 } 6497 #line default 6498 #line hidden 6499 6500 6501 #line 2271 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6502 public RazorEngine.Templating.TemplateWriter RenderFavorites(bool productIsFavorite, string productId, string variantId, string productLanguage, bool variantCombinations = false, bool iconOnly = false) 6503 { 6504 #line default 6505 #line hidden 6506 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 6507 6508 #line 2272 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6509 6510 // Favorites 6511 var favoritesUrl = "/Default.aspx?Id=" + Pageview.Page.ID + "&amp;CC{{favoriteAction}}MyLists=" + productId + "&amp;CC{{favoriteAction}}ListVariantID=" + variantId + "&amp;CC{{favoriteAction}}ListLanguageID=" + productLanguage; 6512 var addToFavorites = favoritesUrl.Replace("{{favoriteAction}}", "AddTo"); 6513 var removeFromFavorites = favoritesUrl.Replace("{{favoriteAction}}", "RemoveFrom"); 6514 var favoriteUrl = productIsFavorite ? removeFromFavorites : addToFavorites; 6515 var iconLabel = !iconOnly ? Translate(productIsFavorite ? "Remove from list" : "Add to List") : string.Empty; 6516 if (User.IsExtranetUserLoggedIn() && 6517 Dynamicweb.Environment.ExecutingContext.IsFrontEnd() && 6518 !variantCombinations) 6519 { 6520 6521 6522 #line default 6523 #line hidden 6524 WriteLiteralTo(__razor_helper_writer, " <a"); 6525 6526 WriteLiteralTo(__razor_helper_writer, " class=\"btn-gold-outline favorite\""); 6527 6528 WriteLiteralTo(__razor_helper_writer, " data-add=\""); 6529 6530 6531 #line 2283 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6532 WriteTo(__razor_helper_writer, addToFavorites); 6533 6534 6535 #line default 6536 #line hidden 6537 WriteLiteralTo(__razor_helper_writer, "\""); 6538 6539 WriteLiteralTo(__razor_helper_writer, " data-remove=\""); 6540 6541 6542 #line 2283 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6543 WriteTo(__razor_helper_writer, removeFromFavorites); 6544 6545 6546 #line default 6547 #line hidden 6548 WriteLiteralTo(__razor_helper_writer, "\""); 6549 6550 WriteLiteralTo(__razor_helper_writer, " data-favorite=\""); 6551 6552 6553 #line 2283 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6554 WriteTo(__razor_helper_writer, productIsFavorite); 6555 6556 6557 #line default 6558 #line hidden 6559 WriteLiteralTo(__razor_helper_writer, "\""); 6560 6561 WriteLiteralTo(__razor_helper_writer, " data-user=\""); 6562 6563 6564 #line 2283 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6565 WriteTo(__razor_helper_writer, User.IsExtranetUserLoggedIn()); 6566 6567 6568 #line default 6569 #line hidden 6570 WriteLiteralTo(__razor_helper_writer, "\""); 6571 6572 WriteLiteralTo(__razor_helper_writer, " data-addText=\'"); 6573 6574 6575 #line 2283 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6576 WriteTo(__razor_helper_writer, Translate("Add to List")); 6577 6578 6579 #line default 6580 #line hidden 6581 WriteLiteralTo(__razor_helper_writer, "\'"); 6582 6583 WriteLiteralTo(__razor_helper_writer, " data-removeText=\'"); 6584 6585 6586 #line 2283 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6587 WriteTo(__razor_helper_writer, Translate("Remove from List")); 6588 6589 6590 #line default 6591 #line hidden 6592 WriteLiteralTo(__razor_helper_writer, "\'"); 6593 6594 WriteAttributeTo(__razor_helper_writer, "href", Tuple.Create(" href=\"", 91978), Tuple.Create("\"", 91997) 6595 6596 #line 2283 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6597 , Tuple.Create(Tuple.Create("", 91985), Tuple.Create<System.Object, System.Int32>(favoriteUrl 6598 6599 #line default 6600 #line hidden 6601 , 91985), false) 6602 ); 6603 6604 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 6605 6606 WriteLiteralTo(__razor_helper_writer, " "); 6607 6608 6609 #line 2284 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6610 WriteTo(__razor_helper_writer, RenderIcon(productIsFavorite ? "fa-heart" : "fa-heart-o", iconLabel)); 6611 6612 6613 #line default 6614 #line hidden 6615 WriteLiteralTo(__razor_helper_writer, "\r\n </a>\r\n"); 6616 6617 6618 #line 2286 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6619 } 6620 6621 6622 #line default 6623 #line hidden 6624 }); 6625 6626 #line 2287 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6627 } 6628 #line default 6629 #line hidden 6630 6631 6632 #line 2289 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6633 public RazorEngine.Templating.TemplateWriter RenderQuantitySelector(bool variantGroupsExistList, int productStock, int productType = 0, string productId = "") 6634 { 6635 #line default 6636 #line hidden 6637 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 6638 6639 #line 2290 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6640 6641 if (Pageview.Area.Item["ShowQuantityField"].ToString() == "True") 6642 { 6643 6644 6645 #line default 6646 #line hidden 6647 6648 #line 2293 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6649 WriteTo(__razor_helper_writer, InternalRenderQuantityField(productStock, productStock, 1, string.Empty, 10, false, variantGroupsExistList, productType, productId)); 6650 6651 6652 #line default 6653 #line hidden 6654 6655 #line 2293 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6656 6657 } 6658 else 6659 { 6660 var quantityTextFieldSettings = new FieldSettings 6661 { 6662 Type = FieldType.Text, 6663 Value = "1", 6664 SystemName = "quantity", 6665 Id = "quantity" + productId, 6666 Attributes = new Dictionary<string, string> 6667 { 6668 {"maxlength", "5"}, 6669 {"data-productStock", productStock.ToString()}, 6670 {"data-outofstock", Translate("Out of stock")}, 6671 {"data-stocktranslate", Translate("The current stock is")} 6672 } 6673 }; 6674 6675 if (productType != 1 && productType != 3) 6676 { 6677 quantityTextFieldSettings.Type = FieldType.Number; 6678 quantityTextFieldSettings.Label = Translate("Qty"); 6679 quantityTextFieldSettings.CssClass = "quantityInput hidden"; 6680 quantityTextFieldSettings.Attributes.Add("autocomplete", "off"); 6681 } 6682 else 6683 { 6684 quantityTextFieldSettings.Type = FieldType.Hidden; 6685 } 6686 6687 6688 #line default 6689 #line hidden 6690 6691 #line 2323 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6692 WriteTo(__razor_helper_writer, RenderField(quantityTextFieldSettings)); 6693 6694 6695 #line default 6696 #line hidden 6697 6698 #line 2323 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6699 6700 } 6701 6702 6703 #line default 6704 #line hidden 6705 }); 6706 6707 #line 2325 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6708 } 6709 #line default 6710 #line hidden 6711 6712 6713 #line 2327 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6714 public RazorEngine.Templating.TemplateWriter RenderProductCompare(int productType, string productId, string variantId = "", string productLanguage = "") 6715 { 6716 #line default 6717 #line hidden 6718 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 6719 6720 #line 2328 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6721 6722 var isGiftCard = productType == 3; 6723 6724 if (!isGiftCard) 6725 { 6726 var compareLink = productId; 6727 compareLink += productLanguage.IsNotNullOrEmpty() ? "$" + productLanguage : ""; 6728 compareLink += variantId.IsNotNullOrEmpty() ? "$" + variantId : ""; 6729 const int compareLimit = 3; 6730 6731 6732 6733 #line default 6734 #line hidden 6735 6736 #line 2338 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6737 WriteTo(__razor_helper_writer, RenderField(new FieldSettings 6738 { 6739 Type = FieldType.Checkbox, 6740 Label = Translate("Add to compare"), 6741 SystemName = "addToCompare_" + productId, 6742 IncludeWrapper = true, 6743 WrapperElement = "div", 6744 WrapperCssClass = "addToCompare", 6745 Attributes = new Dictionary<string, string> 6746 { 6747 {"data-link", compareLink}, 6748 {"data-maxcompare", string.Concat(Translate("Maximum to compare"), ": ", compareLimit)} 6749 } 6750 })); 6751 6752 6753 #line default 6754 #line hidden 6755 6756 #line 2351 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6757 6758 } 6759 6760 6761 #line default 6762 #line hidden 6763 }); 6764 6765 #line 2353 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6766 } 6767 #line default 6768 #line hidden 6769 6770 6771 #line 2381 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6772 public RazorEngine.Templating.TemplateWriter InternalRenderVariantCombinations(List<LoopItem> variantCombinations) 6773 { 6774 #line default 6775 #line hidden 6776 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 6777 6778 #line 2382 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6779 6780 if (variantCombinations.Any()) 6781 { 6782 var variantCombinationFieldSettings = new FieldSettings 6783 { 6784 Type = FieldType.Select, 6785 SystemName = "variantID", 6786 IsRequired = true, 6787 IncludeWrapper = true, 6788 Attributes = new Dictionary<string, string> 6789 { 6790 {"data-width", "100%"} 6791 } 6792 }; 6793 6794 foreach (var variantCombination in variantCombinations.OrderBy(x => 6795 x.GetString("Ecom:VariantCombination.VariantID"))) 6796 { 6797 var isFavoriteBool = variantCombination.GetBoolean("Ecom:Product.IsProductInFavoriteList"); 6798 var variantCombinationId = variantCombination.GetString("Ecom:VariantCombination.VariantID"); 6799 var hideVariantCombination = 6800 variantCombination.GetString("Ecom:Product.DefaultVariantComboID") != 6801 variantCombination.GetString("Ecom:VariantCombination.VariantID") 6802 ? "hidden" 6803 : string.Empty; 6804 var addToList = variantCombination.GetString("Ecom:Product.AddToList"); 6805 var removeFromList = variantCombination.GetString("Ecom:Product.RemoveFromList"); 6806 var favoriteUrl = isFavoriteBool ? removeFromList : addToList; 6807 6808 variantCombinationFieldSettings.FieldOptionsList.Add(new FieldOption 6809 { 6810 Id = variantCombinationId, 6811 Value = variantCombinationId, 6812 Label = variantCombination.GetString("Ecom:VariantCombination.VariantText"), 6813 IsSelected = variantCombination.GetString("Ecom:Product.DefaultVariantComboID") == variantCombination.GetString("Ecom:VariantCombination.VariantID"), 6814 Attributes = new Dictionary<string, string> 6815 { 6816 {"data-favorite", isFavoriteBool.ToString()}, 6817 {"data-stock", variantCombination.GetString("Ecom:Product.AvailableAmount")}, 6818 {"data-price", variantCombination.GetString("Ecom:Product.Price")} 6819 } 6820 } 6821 ); 6822 } 6823 6824 6825 #line default 6826 #line hidden 6827 6828 #line 2426 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6829 WriteTo(__razor_helper_writer, RenderField(variantCombinationFieldSettings)); 6830 6831 6832 #line default 6833 #line hidden 6834 6835 #line 2426 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6836 6837 } 6838 6839 6840 #line default 6841 #line hidden 6842 }); 6843 6844 #line 2428 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6845 } 6846 #line default 6847 #line hidden 6848 6849 6850 #line 2433 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6851 public RazorEngine.Templating.TemplateWriter RenderPageSummary(int prodLoopCount, int pageProdCount, string cssClass = "col-sm-2 col-xs-12 noPaddingLeft") 6852 { 6853 #line default 6854 #line hidden 6855 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 6856 6857 #line 2434 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6858 6859 6860 6861 #line default 6862 #line hidden 6863 WriteLiteralTo(__razor_helper_writer, " <span"); 6864 6865 WriteAttributeTo(__razor_helper_writer, "class", Tuple.Create(" class=\"", 98185), Tuple.Create("\"", 98202) 6866 6867 #line 2435 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6868 , Tuple.Create(Tuple.Create("", 98193), Tuple.Create<System.Object, System.Int32>(cssClass 6869 6870 #line default 6871 #line hidden 6872 , 98193), false) 6873 ); 6874 6875 WriteLiteralTo(__razor_helper_writer, ">"); 6876 6877 6878 #line 2435 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6879 WriteTo(__razor_helper_writer, prodLoopCount); 6880 6881 6882 #line default 6883 #line hidden 6884 WriteLiteralTo(__razor_helper_writer, " "); 6885 6886 6887 #line 2435 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6888 WriteTo(__razor_helper_writer, Translate("of")); 6889 6890 6891 #line default 6892 #line hidden 6893 WriteLiteralTo(__razor_helper_writer, " "); 6894 6895 6896 #line 2435 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6897 WriteTo(__razor_helper_writer, pageProdCount); 6898 6899 6900 #line default 6901 #line hidden 6902 WriteLiteralTo(__razor_helper_writer, " "); 6903 6904 6905 #line 2435 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6906 WriteTo(__razor_helper_writer, Translate(pageProdCount > 1 ? "items" : "item")); 6907 6908 6909 #line default 6910 #line hidden 6911 WriteLiteralTo(__razor_helper_writer, "</span>\r\n"); 6912 6913 6914 #line 2436 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6915 6916 6917 #line default 6918 #line hidden 6919 }); 6920 6921 #line 2436 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6922 } 6923 #line default 6924 #line hidden 6925 6926 6927 #line 2438 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6928 public RazorEngine.Templating.TemplateWriter RenderProductListHeader(int prodLoopCount, int pageProdCount, int pageSize, string groupId) 6929 { 6930 #line default 6931 #line hidden 6932 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 6933 6934 #line 2439 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 6935 6936 var sortBy = Sanitize.Parameter("sortby"); 6937 var sortOrder = Sanitize.Parameter("SortOrder"); 6938 var sortByFieldSettings = new FieldSettings 6939 { 6940 Type = FieldType.Select, 6941 Label = Translate("Sort by"), 6942 SystemName = "sortby", 6943 Id = "sortSelect", 6944 WrapperCssClass = "col-lg-5 col-md-6 col-sm-6 col-xs-6 hidden", 6945 IncludeWrapper = true 6946 }; 6947 sortByFieldSettings.FieldOptionsList.Add(new FieldOption {Label = Translate("Created"), Value = "Created", IsSelected = sortBy == "Created"}); 6948 sortByFieldSettings.FieldOptionsList.Add(new FieldOption {Label = Translate("Created"), Value = "Created", IsSelected = sortBy == "Created"}); 6949 sortByFieldSettings.FieldOptionsList.Add(new FieldOption {Label = Translate("Created"), Value = "Created", IsSelected = sortBy == "Created"}); 6950 6951 var sortOrderFieldSettings = new FieldSettings 6952 { 6953 Type = FieldType.Select, 6954 Label = Translate("Order"), 6955 SystemName = "SortOrder", 6956 Id = "orderSelect", 6957 WrapperCssClass = "col-lg-7 col-md-6 col-sm-6 col-xs-6 hidden", 6958 IncludeWrapper = true 6959 }; 6960 sortOrderFieldSettings.FieldOptionsList.Add(new FieldOption {Label = Translate("Asc"), Value = "ASC", IsSelected = sortOrder == "ASC"}); 6961 sortOrderFieldSettings.FieldOptionsList.Add(new FieldOption {Label = Translate("Desc"), Value = "DESC", IsSelected = sortOrder == "DESC"}); 6962 6963 var sortOrderJoinFieldSettings = new FieldSettings 6964 { 6965 Type = FieldType.Select, 6966 Label = Translate("Sort"), 6967 SystemName = "SortOrderJoin", 6968 WrapperCssClass = "col-lg-7 col-md-7 col-sm-12 col-xs-6 pull-right", 6969 IncludeWrapper = true 6970 }; 6971 sortOrderJoinFieldSettings.FieldOptionsList.Add(new FieldOption 6972 { 6973 Label = Translate("Price (Low to High)"), 6974 IsSelected = sortOrder == "ASC" && sortBy == "Price", 6975 Value = "Price|ASC" 6976 }); 6977 sortOrderJoinFieldSettings.FieldOptionsList.Add(new FieldOption 6978 { 6979 Label = Translate("Price (High to Low)"), 6980 IsSelected = sortOrder == "DESC" && sortBy == "Price", 6981 Value = "Price|DESC" 6982 }); 6983 sortOrderJoinFieldSettings.FieldOptionsList.Add(new FieldOption 6984 { 6985 Label = Translate("Title (A - Z)"), 6986 IsSelected = sortOrder == "ASC" && sortBy == "Name_sortable", 6987 Value = "Name_sortable|ASC" 6988 }); 6989 sortOrderJoinFieldSettings.FieldOptionsList.Add(new FieldOption 6990 { 6991 Label = Translate("Title (Z - A)"), 6992 IsSelected = sortOrder == "DESC" && sortBy == "Name_sortable", 6993 Value = "Name_sortable|DESC" 6994 }); 6995 6996 var pageSizeFieldSettings = new FieldSettings 6997 { 6998 Type = FieldType.Select, 6999 Label = Translate("Page size"), 7000 SystemName = "PageSize", 7001 Id = "pageSize", 7002 IncludeWrapper = true, 7003 WrapperCssClass = "pageSize" 7004 }; 7005 7006 const int maxOf = 36; 7007 const string allPages = "9999"; 7008 var multipleOf = 12; 7009 var selected = Sanitize.Parameter("PageNum").IsNotNullOrEmpty() ? Sanitize.Parameter("PageNum", ParameterType.Number) : pageSize.ToString(); 7010 7011 while (multipleOf <= maxOf) 7012 { 7013 pageSizeFieldSettings.FieldOptionsList.Add(new FieldOption {Label = multipleOf.ToString(), Value = multipleOf.ToString(), IsSelected = selected == multipleOf.ToString()}); 7014 multipleOf = multipleOf + 12; 7015 if (multipleOf > pageProdCount) 7016 { 7017 break; 7018 } 7019 } 7020 pageSizeFieldSettings.FieldOptionsList.Add(new FieldOption {Label = Translate("All"), Value = allPages, IsSelected = selected == allPages}); 7021 7022 7023 7024 #line default 7025 #line hidden 7026 WriteLiteralTo(__razor_helper_writer, " <div"); 7027 7028 WriteLiteralTo(__razor_helper_writer, " class=\"headerBox col-xs-12\""); 7029 7030 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 7031 7032 WriteLiteralTo(__razor_helper_writer, " "); 7033 7034 7035 #line 2527 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7036 WriteTo(__razor_helper_writer, RenderPageSummary(prodLoopCount, pageProdCount)); 7037 7038 7039 #line default 7040 #line hidden 7041 WriteLiteralTo(__razor_helper_writer, "\r\n <form"); 7042 7043 WriteLiteralTo(__razor_helper_writer, " id=\"orderProdList\""); 7044 7045 WriteLiteralTo(__razor_helper_writer, " class=\"col-sm-8 col-xs-12 hidden-xs text-right\""); 7046 7047 WriteAttributeTo(__razor_helper_writer, "action", Tuple.Create(" action=\"", 102650), Tuple.Create("\"", 102737) 7048 7049 #line 2528 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7050 , Tuple.Create(Tuple.Create("", 102659), Tuple.Create<System.Object, System.Int32>(Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(Pageview.Page.ID) 7051 7052 #line default 7053 #line hidden 7054 , 102659), false) 7055 ); 7056 7057 WriteLiteralTo(__razor_helper_writer, " name=\"ExtUserForm_Main\""); 7058 7059 WriteLiteralTo(__razor_helper_writer, " method=\"GET\""); 7060 7061 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 7062 7063 WriteLiteralTo(__razor_helper_writer, " "); 7064 7065 7066 #line 2529 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7067 WriteTo(__razor_helper_writer, RenderField(sortByFieldSettings)); 7068 7069 7070 #line default 7071 #line hidden 7072 WriteLiteralTo(__razor_helper_writer, "\r\n"); 7073 7074 WriteLiteralTo(__razor_helper_writer, " "); 7075 7076 7077 #line 2530 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7078 WriteTo(__razor_helper_writer, RenderField(sortOrderFieldSettings)); 7079 7080 7081 #line default 7082 #line hidden 7083 WriteLiteralTo(__razor_helper_writer, "\r\n"); 7084 7085 WriteLiteralTo(__razor_helper_writer, " "); 7086 7087 7088 #line 2531 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7089 WriteTo(__razor_helper_writer, RenderField(sortOrderJoinFieldSettings)); 7090 7091 7092 #line default 7093 #line hidden 7094 WriteLiteralTo(__razor_helper_writer, "\r\n"); 7095 7096 WriteLiteralTo(__razor_helper_writer, " "); 7097 7098 7099 #line 2532 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7100 WriteTo(__razor_helper_writer, RenderField(pageSizeFieldSettings)); 7101 7102 7103 #line default 7104 #line hidden 7105 WriteLiteralTo(__razor_helper_writer, "\r\n </form>\r\n <ul"); 7106 7107 WriteLiteralTo(__razor_helper_writer, " class=\"listMode hidden-xs\""); 7108 7109 WriteLiteralTo(__razor_helper_writer, ">\r\n <li"); 7110 7111 WriteLiteralTo(__razor_helper_writer, " data-list=\"list\""); 7112 7113 WriteLiteralTo(__razor_helper_writer, " class=\"active\""); 7114 7115 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 7116 7117 WriteLiteralTo(__razor_helper_writer, " "); 7118 7119 7120 #line 2536 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7121 WriteTo(__razor_helper_writer, RenderIcon("fa-list-ul")); 7122 7123 7124 #line default 7125 #line hidden 7126 WriteLiteralTo(__razor_helper_writer, "\r\n </li>\r\n <li"); 7127 7128 WriteLiteralTo(__razor_helper_writer, " data-list=\"tile\""); 7129 7130 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 7131 7132 WriteLiteralTo(__razor_helper_writer, " "); 7133 7134 7135 #line 2539 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7136 WriteTo(__razor_helper_writer, RenderIcon("fa-th-large")); 7137 7138 7139 #line default 7140 #line hidden 7141 WriteLiteralTo(__razor_helper_writer, "\r\n </li>\r\n </ul>\r\n </div>\r\n"); 7142 7143 7144 #line 2543 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7145 7146 7147 #line default 7148 #line hidden 7149 }); 7150 7151 #line 2543 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7152 } 7153 #line default 7154 #line hidden 7155 7156 7157 #line 2545 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7158 public RazorEngine.Templating.TemplateWriter RenderListViewProduct(LoopItem product) 7159 { 7160 #line default 7161 #line hidden 7162 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 7163 7164 #line 2546 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7165 7166 var showQuantity = Pageview.Area.Item["ShowQuantityField"].ToString() == "True"; 7167 7168 7169 #line default 7170 #line hidden 7171 7172 #line 2554 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7173 7174 var productType = product.GetInteger("Ecom:Product.Type"); 7175 var isGiftCard = productType == 3; 7176 var isService = productType == 1; 7177 var productNumber = product.GetString("Ecom:Product.Number"); 7178 var image = product.GetImagePath(); 7179 var productName = product.GetString("Ecom:Product.Name"); 7180 var productId = product.GetString("Ecom:Product.ID"); 7181 var productShortDescription = product.GetString("Ecom:Product.ShortDescription"); 7182 var link = HttpUtility.HtmlEncode(Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(product.GetString("Ecom:Product.Link.Clean"))); 7183 var productLanguage = product.GetString("Ecom:Product.LanguageID"); 7184 var productUnitId = product.GetString("Ecom:Product.DefaultUnitID"); 7185 var variantCurrentId = product.GetString("Ecom:Product.VariantID"); 7186 var variantId = variantCurrentId.IsNotNullOrEmpty() ? variantCurrentId : product.GetString("Ecom:Product.DefaultVariantComboID"); 7187 var productIsFavoriteBool = product.GetBoolean("Ecom:Product.IsProductInFavoriteList"); 7188 var variantCombinations = product.GetLoop("VariantCombinations"); 7189 var hasVariantCombinations = variantCombinations.Any(); 7190 var miniCartPageId = GetPageIdByNavigationTag("MiniCart"); 7191 7192 7193 7194 #line default 7195 #line hidden 7196 7197 #line 2573 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7198 7199 var productStock = !variantCombinations.Any() ? product.GetInteger("Ecom:Product.AvailableAmount") : variantCombinations.FirstOrDefault(x => x.GetString("Ecom:Product.DefaultVariantComboID").Equals(x.GetString("Ecom:VariantCombination.VariantID"))) == null ? variantCombinations.OrderBy(x => x.GetString("Ecom:VariantCombination.VariantID")).FirstOrDefault().GetInteger("Ecom:Product.AvailableAmount") : variantCombinations.FirstOrDefault(x => x.GetString("Ecom:Product.DefaultVariantComboID").Equals(x.GetString("Ecom:VariantCombination.VariantID"))).GetInteger("Ecom:Product.AvailableAmount"); 7200 var productPrice = !variantCombinations.Any() ? product.GetString("Ecom:Product.Price") : variantCombinations.FirstOrDefault(x => x.GetString("Ecom:Product.DefaultVariantComboID").Equals(x.GetString("Ecom:VariantCombination.VariantID"))) == null ? variantCombinations.OrderBy(x => x.GetString("Ecom:VariantCombination.VariantID")).FirstOrDefault().GetString("Ecom:Product.Price") : variantCombinations.FirstOrDefault(x => x.GetString("Ecom:Product.DefaultVariantComboID").Equals(x.GetString("Ecom:VariantCombination.VariantID"))).GetString("Ecom:Product.Price"); 7201 7202 if (isService || isGiftCard) 7203 { 7204 productStock = 10000; 7205 } 7206 7207 7208 7209 #line default 7210 #line hidden 7211 WriteLiteralTo(__razor_helper_writer, " <div"); 7212 7213 WriteAttributeTo(__razor_helper_writer, "class", Tuple.Create(" class=\"", 106628), Tuple.Create("\"", 106703) 7214 , Tuple.Create(Tuple.Create("", 106636), Tuple.Create("col-xs-12", 106636), true) 7215 7216 #line 2582 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7217 , Tuple.Create(Tuple.Create("", 106645), Tuple.Create<System.Object, System.Int32>(hasVariantCombinations ? string.Empty : " hasNoVariant" 7218 7219 #line default 7220 #line hidden 7221 , 106645), false) 7222 ); 7223 7224 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 7225 7226 WriteLiteralTo(__razor_helper_writer, " "); 7227 7228 7229 #line 2583 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7230 WriteTo(__razor_helper_writer, RenderImage(new ImageSettings { IncludeWrapper = true, WrapperCssClass = "col-xs-3 noPadding", Href = link, Source = Images.GetImage(image, 200, 200, 400, 400, 200, 200), AltText = productName })); 7231 7232 7233 #line default 7234 #line hidden 7235 WriteLiteralTo(__razor_helper_writer, "\r\n <div"); 7236 7237 WriteLiteralTo(__razor_helper_writer, " class=\"col-xs-9\""); 7238 7239 WriteLiteralTo(__razor_helper_writer, ">\r\n <div"); 7240 7241 WriteLiteralTo(__razor_helper_writer, " class=\"col-xs-8\""); 7242 7243 WriteLiteralTo(__razor_helper_writer, ">\r\n <h2>\r\n <a"); 7244 7245 WriteLiteralTo(__razor_helper_writer, " itemprop=\"name\""); 7246 7247 WriteAttributeTo(__razor_helper_writer, "href", Tuple.Create(" href=\"", 107061), Tuple.Create("\"", 107073) 7248 7249 #line 2587 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7250 , Tuple.Create(Tuple.Create("", 107068), Tuple.Create<System.Object, System.Int32>(link 7251 7252 #line default 7253 #line hidden 7254 , 107068), false) 7255 ); 7256 7257 WriteLiteralTo(__razor_helper_writer, ">"); 7258 7259 7260 #line 2587 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7261 WriteTo(__razor_helper_writer, productName); 7262 7263 7264 #line default 7265 #line hidden 7266 WriteLiteralTo(__razor_helper_writer, "</a>\r\n </h2>\r\n"); 7267 7268 7269 #line 2589 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7270 7271 7272 #line default 7273 #line hidden 7274 7275 #line 2589 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7276 if (productShortDescription.IsNotNullOrEmpty()) 7277 { 7278 7279 7280 #line default 7281 #line hidden 7282 WriteLiteralTo(__razor_helper_writer, " <div"); 7283 7284 WriteLiteralTo(__razor_helper_writer, " class=\"tileHide shortDescription\""); 7285 7286 WriteLiteralTo(__razor_helper_writer, ">"); 7287 7288 7289 #line 2591 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7290 WriteTo(__razor_helper_writer, productShortDescription); 7291 7292 7293 #line default 7294 #line hidden 7295 WriteLiteralTo(__razor_helper_writer, "</div>\r\n"); 7296 7297 7298 #line 2592 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7299 } 7300 7301 #line default 7302 #line hidden 7303 WriteLiteralTo(__razor_helper_writer, "\r\n"); 7304 7305 7306 #line 2593 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7307 7308 7309 #line default 7310 #line hidden 7311 7312 #line 2593 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7313 if (productNumber.IsNotNullOrEmpty()) 7314 { 7315 7316 7317 #line default 7318 #line hidden 7319 WriteLiteralTo(__razor_helper_writer, " <div"); 7320 7321 WriteLiteralTo(__razor_helper_writer, " class=\"tileHide prodNumber\""); 7322 7323 WriteLiteralTo(__razor_helper_writer, ">"); 7324 7325 7326 #line 2595 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7327 WriteTo(__razor_helper_writer, Translate("Item number")); 7328 7329 7330 #line default 7331 #line hidden 7332 WriteLiteralTo(__razor_helper_writer, ": "); 7333 7334 7335 #line 2595 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7336 WriteTo(__razor_helper_writer, productNumber); 7337 7338 7339 #line default 7340 #line hidden 7341 WriteLiteralTo(__razor_helper_writer, "</div>\r\n"); 7342 7343 7344 #line 2596 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7345 } 7346 7347 #line default 7348 #line hidden 7349 WriteLiteralTo(__razor_helper_writer, "\r\n </div>\r\n <div"); 7350 7351 WriteLiteralTo(__razor_helper_writer, " class=\"col-xs-4 noPaddingRight pull-right priceContainer\""); 7352 7353 WriteLiteralTo(__razor_helper_writer, ">\r\n <form"); 7354 7355 WriteLiteralTo(__razor_helper_writer, " name=\"addToCart\""); 7356 7357 WriteAttributeTo(__razor_helper_writer, "action", Tuple.Create(" action=\"", 107690), Tuple.Create("\"", 107775) 7358 7359 #line 2599 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7360 , Tuple.Create(Tuple.Create("", 107699), Tuple.Create<System.Object, System.Int32>(Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(miniCartPageId) 7361 7362 #line default 7363 #line hidden 7364 , 107699), false) 7365 ); 7366 7367 WriteLiteralTo(__razor_helper_writer, " method=\"post\""); 7368 7369 WriteLiteralTo(__razor_helper_writer, " data-outofstock=\'"); 7370 7371 7372 #line 2599 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7373 WriteTo(__razor_helper_writer, Translate("Out of stock")); 7374 7375 7376 #line default 7377 #line hidden 7378 WriteLiteralTo(__razor_helper_writer, "\'"); 7379 7380 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 7381 7382 7383 #line 2600 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7384 7385 7386 #line default 7387 #line hidden 7388 7389 #line 2600 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7390 if (!showQuantity) 7391 { 7392 var stockQuantityFieldSettings = new FieldSettings 7393 { 7394 Type = FieldType.Hidden, 7395 SystemName = "quantity", 7396 Id = "quantity" + productId, 7397 Value = "1", 7398 CssClass = "quantityInput", 7399 Attributes = new Dictionary<string, string> 7400 { 7401 {"data-outofstock", Translate("Out of stock")}, 7402 {"data-stocktranslate", Translate("The current stock is")}, 7403 {"data-available", productStock.ToString()} 7404 } 7405 }; 7406 7407 7408 #line default 7409 #line hidden 7410 7411 #line 2616 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7412 WriteTo(__razor_helper_writer, RenderField(stockQuantityFieldSettings)); 7413 7414 7415 #line default 7416 #line hidden 7417 7418 #line 2616 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7419 7420 } 7421 7422 #line default 7423 #line hidden 7424 WriteLiteralTo(__razor_helper_writer, "\r\n"); 7425 7426 WriteLiteralTo(__razor_helper_writer, " "); 7427 7428 7429 #line 2618 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7430 WriteTo(__razor_helper_writer, RenderFavorites(productIsFavoriteBool, productId, variantId, productLanguage, hasVariantCombinations, true)); 7431 7432 7433 #line default 7434 #line hidden 7435 WriteLiteralTo(__razor_helper_writer, "\r\n <span"); 7436 7437 WriteLiteralTo(__razor_helper_writer, " class=\"listPrice text-right\""); 7438 7439 WriteLiteralTo(__razor_helper_writer, " itemprop=\"price\""); 7440 7441 WriteLiteralTo(__razor_helper_writer, ">"); 7442 7443 7444 #line 2619 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7445 WriteTo(__razor_helper_writer, RenderProductPrice(productPrice)); 7446 7447 7448 #line default 7449 #line hidden 7450 WriteLiteralTo(__razor_helper_writer, "</span>\r\n"); 7451 7452 WriteLiteralTo(__razor_helper_writer, " "); 7453 7454 7455 #line 2620 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7456 WriteTo(__razor_helper_writer, InternalRenderVariantCombinations(variantCombinations)); 7457 7458 7459 #line default 7460 #line hidden 7461 WriteLiteralTo(__razor_helper_writer, "\r\n"); 7462 7463 WriteLiteralTo(__razor_helper_writer, " "); 7464 7465 7466 #line 2621 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7467 WriteTo(__razor_helper_writer, RenderQuantitySelector(variantCombinations.Any(), productStock, productType, productId)); 7468 7469 7470 #line default 7471 #line hidden 7472 WriteLiteralTo(__razor_helper_writer, "\r\n"); 7473 7474 WriteLiteralTo(__razor_helper_writer, " "); 7475 7476 7477 #line 2622 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7478 WriteTo(__razor_helper_writer, RenderAddToCart(productId, productUnitId, variantId, productStock)); 7479 7480 7481 #line default 7482 #line hidden 7483 WriteLiteralTo(__razor_helper_writer, "\r\n"); 7484 7485 WriteLiteralTo(__razor_helper_writer, " "); 7486 7487 7488 #line 2623 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7489 WriteTo(__razor_helper_writer, RenderStockStatus(productStock > 0 ? "fa-check" : "fa-times", productType)); 7490 7491 7492 #line default 7493 #line hidden 7494 WriteLiteralTo(__razor_helper_writer, "\r\n </form>\r\n"); 7495 7496 WriteLiteralTo(__razor_helper_writer, " "); 7497 7498 7499 #line 2625 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7500 WriteTo(__razor_helper_writer, RenderProductCompare(productType, productId, variantId, productLanguage)); 7501 7502 7503 #line default 7504 #line hidden 7505 WriteLiteralTo(__razor_helper_writer, "\r\n </div>\r\n </div>\r\n </div>\r\n"); 7506 7507 7508 #line 2629 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7509 7510 7511 #line default 7512 #line hidden 7513 }); 7514 7515 #line 2629 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7516 } 7517 #line default 7518 #line hidden 7519 7520 7521 #line 2656 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7522 7523 7524 private string GetSeeMoreSeeLess(int facetOptionsCount) 7525 { 7526 const int visibleItems = 5; 7527 return (facetOptionsCount > visibleItems) ? string.Format("<span class=\"seeMore\" data-more=\"{0}\" data-hide=\"{1}\" data-facets=\"{2}\">{3}</span>", Translate("See More"), Translate("Show Less"), visibleItems, Translate("See More")) : string.Empty; 7528 } 7529 7530 7531 #line default 7532 #line hidden 7533 7534 7535 #line 2666 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7536 public RazorEngine.Templating.TemplateWriter InternalRenderFacetField(LoopItem loopItem, string parameterType, string templateOutput) 7537 { 7538 #line default 7539 #line hidden 7540 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 7541 7542 #line 2667 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7543 7544 var parameter = loopItem.GetString("Facet.QueryParameter"); 7545 var name = loopItem.GetString("Facet.Name"); 7546 var facetOptions = loopItem.GetLoop("FacetOptions"); 7547 //facetOptions = facetOptions.OrderBy(or => or.GetString("FacetOption.Count")).ThenByDescending(o => o.GetInteger("FacetOptions.LoopCounter")).ToList(); 7548 7549 if (name == "EcomGroups") 7550 { 7551 7552 7553 #line default 7554 #line hidden 7555 7556 #line 2675 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7557 WriteTo(__razor_helper_writer, InternalRenderEcomNavigation()); 7558 7559 7560 #line default 7561 #line hidden 7562 7563 #line 2675 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7564 7565 } 7566 else 7567 { 7568 var facetParameter = loopItem.GetString("Facet.QueryParameter"); 7569 switch (templateOutput) 7570 { 7571 case "Checkboxes": 7572 if(facetOptions.Any()) 7573 { 7574 var fieldOptions = new List<FieldOption>(); 7575 var optionCount = 1; 7576 foreach (var option in facetOptions) 7577 { 7578 var label = new StringBuilder(option.GetString("FacetOption.Label")); 7579 if (option.GetInteger("FacetOption.Count") > 0) 7580 { 7581 label.Append(string.Concat(" (", option.GetString("FacetOption.Count"),")")); 7582 } 7583 7584 var checkboxFieldOption = new FieldOption 7585 { 7586 SystemName = parameter, 7587 Id = parameter + optionCount++, 7588 Value = option.GetString("FacetOption.Value"), 7589 Label = label.ToString(), 7590 IsSelected = option.GetBoolean("FacetOption.Selected") 7591 }; 7592 fieldOptions.Add(checkboxFieldOption); 7593 } 7594 var checkboxFieldSettings = new FieldSettings 7595 { 7596 Type = FieldType.Checkboxlist, 7597 SystemName = parameter, 7598 Label = name, 7599 LabelCssClass = "filterTitle", 7600 FieldOptionsList = fieldOptions, 7601 IncludeWrapper = true, 7602 IncludeFieldWrapper = true 7603 }; 7604 7605 checkboxFieldSettings.Append = GetSeeMoreSeeLess(facetOptions.Count); 7606 7607 7608 #line default 7609 #line hidden 7610 7611 #line 2717 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7612 WriteTo(__razor_helper_writer, RenderField(checkboxFieldSettings)); 7613 7614 7615 #line default 7616 #line hidden 7617 7618 #line 2717 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7619 7620 } 7621 7622 break; 7623 case "Radio": 7624 if(facetOptions.Any()) 7625 { 7626 var fieldOptions = new List<FieldOption>(); 7627 var optionCount = 1; 7628 foreach (var option in facetOptions) 7629 { 7630 var label = new StringBuilder(option.GetString("FacetOption.Label")); 7631 if (option.GetInteger("FacetOption.Count") > 0) 7632 { 7633 label.Append(string.Concat("(", option.GetString("FacetOption.Count"),")")); 7634 } 7635 7636 var radioFieldOption = new FieldOption 7637 { 7638 SystemName = parameter, 7639 CssClass = "radio", 7640 Id = parameter + optionCount++, 7641 Value = option.GetString("FacetOption.Value"), 7642 Label = label.ToString(), 7643 IsSelected = option.GetBoolean("FacetOption.Selected") 7644 }; 7645 fieldOptions.Add(radioFieldOption); 7646 } 7647 var radioButtonSettings = new FieldSettings 7648 { 7649 Type = FieldType.Radio, 7650 SystemName = parameter, 7651 Label = name, 7652 LabelCssClass = "filterTitle", 7653 FieldOptionsList = fieldOptions, 7654 IncludeWrapper = true, 7655 IncludeFieldWrapper = true 7656 }; 7657 7658 radioButtonSettings.Append = GetSeeMoreSeeLess(facetOptions.Count); 7659 7660 7661 #line default 7662 #line hidden 7663 7664 #line 2757 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7665 WriteTo(__razor_helper_writer, RenderField(radioButtonSettings)); 7666 7667 7668 #line default 7669 #line hidden 7670 7671 #line 2757 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7672 7673 7674 } 7675 break; 7676 case "Select": 7677 if (facetOptions.Any()) 7678 { 7679 var multiSelectFieldSettings = new FieldSettings 7680 { 7681 Type = FieldType.Select, 7682 SystemName = parameter, 7683 Label = name, 7684 LabelCssClass = "filterTitle", 7685 IncludeWrapper = true, 7686 IncludeFieldWrapper = true, 7687 Attributes = new Dictionary<string, string> 7688 { 7689 {"data-size", "8"}, 7690 {"multiple", "multiple"} 7691 } 7692 }; 7693 foreach (var option in facetOptions) 7694 { 7695 multiSelectFieldSettings.FieldOptionsList.Add(new FieldOption {Label = option.GetString("FacetOption.Label"), Value = option.GetString("FacetOption.Value"), IsSelected = option.GetBoolean("FacetOption.Selected")}); 7696 } 7697 7698 7699 #line default 7700 #line hidden 7701 7702 #line 2782 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7703 WriteTo(__razor_helper_writer, RenderField(multiSelectFieldSettings)); 7704 7705 7706 #line default 7707 #line hidden 7708 7709 #line 2782 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7710 7711 } 7712 break; 7713 case "Range": 7714 if (facetParameter.IsNotNullOrEmpty()) 7715 { 7716 var rangeParam = Sanitize.Parameter(facetParameter, ParameterType.LongText); 7717 var minVal = string.Empty; 7718 var maxVal = string.Empty; 7719 if (rangeParam.IsNotNullOrEmpty()) 7720 { 7721 var rangeValues = rangeParam.Split(','); 7722 minVal = rangeValues[0].IsNotNullOrEmpty() ? rangeValues[0] : String.Empty; 7723 maxVal = rangeValues.Length > 1 ? rangeValues[1] : String.Empty; 7724 } 7725 7726 7727 #line default 7728 #line hidden 7729 WriteLiteralTo(__razor_helper_writer, " <fieldset> \r\n " + 7730 " <label"); 7731 7732 WriteLiteralTo(__razor_helper_writer, " for=\"Width\""); 7733 7734 WriteLiteralTo(__razor_helper_writer, " class=\"form-label filterTitle\""); 7735 7736 WriteLiteralTo(__razor_helper_writer, ">"); 7737 7738 7739 #line 2798 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7740 WriteTo(__razor_helper_writer, facetParameter); 7741 7742 7743 #line default 7744 #line hidden 7745 WriteLiteralTo(__razor_helper_writer, "</label>\r\n <div"); 7746 7747 WriteLiteralTo(__razor_helper_writer, " class=\"fieldContainer\""); 7748 7749 WriteLiteralTo(__razor_helper_writer, " style=\"display: none\""); 7750 7751 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 7752 7753 7754 #line 2800 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7755 7756 7757 #line default 7758 #line hidden 7759 7760 #line 2800 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7761 7762 var rangeFieldSettings2 = new FieldSettings 7763 { 7764 Type = FieldType.Text, 7765 SystemName = facetParameter, 7766 Id = "minRange_" + facetParameter, 7767 Value = minVal, 7768 CssClass = "col-xs-5", 7769 IncludeWrapper = false, 7770 IncludeFieldWrapper = false 7771 }; 7772 var rangeFieldSettings3 = new FieldSettings 7773 { 7774 Type = FieldType.Text, 7775 SystemName = facetParameter, 7776 Id = "maxRange_" + facetParameter, 7777 CssClass = "col-xs-5", 7778 Value = maxVal, 7779 IncludeWrapper = false, 7780 IncludeFieldWrapper = false 7781 }; 7782 7783 7784 #line default 7785 #line hidden 7786 7787 #line 2821 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7788 WriteTo(__razor_helper_writer, RenderField(rangeFieldSettings2)); 7789 7790 7791 #line default 7792 #line hidden 7793 7794 #line 2821 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7795 7796 7797 7798 #line default 7799 #line hidden 7800 WriteLiteralTo(__razor_helper_writer, " <span"); 7801 7802 WriteLiteralTo(__razor_helper_writer, " class=\"col-xs-2 betweenLabels\""); 7803 7804 WriteLiteralTo(__razor_helper_writer, ">"); 7805 7806 7807 #line 2822 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7808 WriteTo(__razor_helper_writer, Translate("to")); 7809 7810 7811 #line default 7812 #line hidden 7813 WriteLiteralTo(__razor_helper_writer, "</span>\r\n"); 7814 7815 7816 #line 2823 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7817 7818 7819 #line default 7820 #line hidden 7821 7822 #line 2823 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7823 WriteTo(__razor_helper_writer, RenderField(rangeFieldSettings3)); 7824 7825 7826 #line default 7827 #line hidden 7828 7829 #line 2823 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7830 7831 7832 7833 #line default 7834 #line hidden 7835 WriteLiteralTo(__razor_helper_writer, "\r\n </div>\r\n </fieldset>\r\n"); 7836 7837 7838 #line 2827 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7839 } 7840 break; 7841 case "Text": 7842 7843 7844 #line default 7845 #line hidden 7846 7847 #line 2830 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7848 WriteTo(__razor_helper_writer, RenderField(new FieldSettings{ Type = FieldType.Text, SystemName = parameter, Label = name, LabelCssClass = "filterTitle", IncludeWrapper = true, IncludeFieldWrapper = true})); 7849 7850 7851 #line default 7852 #line hidden 7853 7854 #line 2830 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7855 7856 break; 7857 case "Number": 7858 7859 7860 #line default 7861 #line hidden 7862 7863 #line 2833 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7864 WriteTo(__razor_helper_writer, RenderField(new FieldSettings{ Type = FieldType.Number, SystemName = parameter, Label = name, LabelCssClass = "filterTitle", IncludeWrapper = true, IncludeFieldWrapper = true})); 7865 7866 7867 #line default 7868 #line hidden 7869 7870 #line 2833 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7871 7872 break; 7873 case "Links": 7874 7875 if (facetOptions.Any()) 7876 { 7877 var currentUrl = Helpers.GetCurrentUrl(false).Contains("?") ? Helpers.GetCurrentUrl() : Helpers.GetCurrentUrl()+"/?"; 7878 7879 7880 #line default 7881 #line hidden 7882 WriteLiteralTo(__razor_helper_writer, " <fieldset class>\r\n <label"); 7883 7884 WriteLiteralTo(__razor_helper_writer, " class=\"form-label filterTitle\""); 7885 7886 WriteAttributeTo(__razor_helper_writer, "for", Tuple.Create(" for=\"", 120160), Tuple.Create("\"", 120171) 7887 7888 #line 2841 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7889 , Tuple.Create(Tuple.Create("", 120166), Tuple.Create<System.Object, System.Int32>(name 7890 7891 #line default 7892 #line hidden 7893 , 120166), false) 7894 ); 7895 7896 WriteLiteralTo(__razor_helper_writer, ">"); 7897 7898 7899 #line 2841 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7900 WriteTo(__razor_helper_writer, name); 7901 7902 7903 #line default 7904 #line hidden 7905 WriteLiteralTo(__razor_helper_writer, "</label>\r\n <div"); 7906 7907 WriteLiteralTo(__razor_helper_writer, " class=\"fieldContainer\""); 7908 7909 WriteLiteralTo(__razor_helper_writer, " style=\"display:none\""); 7910 7911 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 7912 7913 7914 #line 2843 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7915 7916 7917 #line default 7918 #line hidden 7919 7920 #line 2843 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7921 foreach (var option in facetOptions) 7922 { 7923 7924 7925 #line default 7926 #line hidden 7927 7928 #line 2845 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7929 WriteTo(__razor_helper_writer, RenderBootstrapButton(new BootstrapButtonSettings 7930 { 7931 IconCssClass = "", 7932 Label = option.GetString("FacetOption.Label"), 7933 Href = currentUrl+parameter+"="+option.GetString("FacetOption.Value"), 7934 CssClass = "link" 7935 })); 7936 7937 7938 #line default 7939 #line hidden 7940 7941 #line 2851 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7942 7943 } 7944 7945 #line default 7946 #line hidden 7947 WriteLiteralTo(__razor_helper_writer, "\r\n </div>\r\n </fieldset>\r\n"); 7948 7949 7950 #line 2855 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7951 } 7952 break; 7953 case "Colors": 7954 case "Tags": 7955 case "Icons": 7956 case "Images": 7957 break; 7958 default: 7959 7960 7961 #line default 7962 #line hidden 7963 7964 #line 2863 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7965 WriteTo(__razor_helper_writer, RenderField(new FieldSettings{ Type = FieldType.Textstring, SystemName = parameter, Label = name, LabelCssClass = "filterTitle", IncludeWrapper = true, IncludeFieldWrapper = true, Append = "<div style=\"color:#f00\">Unknown Render Type</div>"})); 7966 7967 7968 #line default 7969 #line hidden 7970 7971 #line 2863 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7972 7973 break; 7974 } 7975 } 7976 7977 7978 #line default 7979 #line hidden 7980 }); 7981 7982 #line 2867 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7983 } 7984 #line default 7985 #line hidden 7986 7987 7988 #line 2869 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7989 public RazorEngine.Templating.TemplateWriter InternalRenderEcomNavigation(Dynamicweb.Ecommerce.Products.GroupCollection groupCollection = null) 7990 { 7991 #line default 7992 #line hidden 7993 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 7994 7995 #line 2870 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 7996 7997 groupCollection = groupCollection ?? Dynamicweb.Ecommerce.Services.Shops.GetShop(Pageview.Area.EcomShopId).get_TopLevelGroups(Pageview.Area.EcomLanguageId); 7998 7999 foreach (var group in groupCollection) 8000 { 8001 var groupName = group.Name; 8002 var groupId = group.Id; 8003 8004 if (group.Subgroups.Any()) 8005 { 8006 var numberOfParentGroups = group.ParentGroups.Count; 8007 var hideSubgroups = numberOfParentGroups == 0 ? "hidden" : string.Empty; 8008 8009 8010 8011 #line default 8012 #line hidden 8013 WriteLiteralTo(__razor_helper_writer, " <fieldset"); 8014 8015 WriteAttributeTo(__razor_helper_writer, "class", Tuple.Create(" class=\"", 122216), Tuple.Create("\"", 122265) 8016 , Tuple.Create(Tuple.Create("", 122224), Tuple.Create("groupFieldset", 122224), true) 8017 , Tuple.Create(Tuple.Create(" ", 122237), Tuple.Create("level_", 122238), true) 8018 8019 #line 2883 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8020 , Tuple.Create(Tuple.Create("", 122244), Tuple.Create<System.Object, System.Int32>(numberOfParentGroups 8021 8022 #line default 8023 #line hidden 8024 , 122244), false) 8025 ); 8026 8027 WriteLiteralTo(__razor_helper_writer, ">\r\n <label"); 8028 8029 WriteAttributeTo(__razor_helper_writer, "class", Tuple.Create(" class=\"", 122295), Tuple.Create("\"", 122341) 8030 , Tuple.Create(Tuple.Create("", 122303), Tuple.Create("filterTitle", 122303), true) 8031 , Tuple.Create(Tuple.Create(" ", 122314), Tuple.Create("deep_", 122315), true) 8032 8033 #line 2884 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8034 , Tuple.Create(Tuple.Create("", 122320), Tuple.Create<System.Object, System.Int32>(numberOfParentGroups 8035 8036 #line default 8037 #line hidden 8038 , 122320), false) 8039 ); 8040 8041 WriteLiteralTo(__razor_helper_writer, ">\r\n \r\n "); 8042 8043 WriteLiteralTo(__razor_helper_writer, "\r\n"); 8044 8045 8046 #line 2889 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8047 8048 8049 #line default 8050 #line hidden 8051 8052 #line 2889 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8053 if (numberOfParentGroups > 0 || (bool) Pageview.Area.Item["ParentGroupsWithCheckbox"] && numberOfParentGroups == 0) 8054 { 8055 8056 8057 #line default 8058 #line hidden 8059 WriteLiteralTo(__razor_helper_writer, " <label"); 8060 8061 WriteLiteralTo(__razor_helper_writer, " class=\"checkBoxContainer \""); 8062 8063 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 8064 8065 WriteLiteralTo(__razor_helper_writer, " "); 8066 8067 8068 #line 2892 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8069 WriteTo(__razor_helper_writer, RenderField(new FieldSettings {Type = FieldType.Checkbox, SystemName = "group", Value = groupId})); 8070 8071 8072 #line default 8073 #line hidden 8074 WriteLiteralTo(__razor_helper_writer, "\r\n <span>\r\n"); 8075 8076 WriteLiteralTo(__razor_helper_writer, " "); 8077 8078 8079 #line 2894 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8080 WriteTo(__razor_helper_writer, groupName); 8081 8082 8083 #line default 8084 #line hidden 8085 WriteLiteralTo(__razor_helper_writer, "\r\n </span>\r\n </label>\r\n" + 8086 ""); 8087 8088 8089 #line 2897 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8090 } 8091 else 8092 { 8093 8094 8095 #line default 8096 #line hidden 8097 8098 #line 2900 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8099 WriteTo(__razor_helper_writer, RenderField(FieldSettings.CreateHiddenField("group", groupId))); 8100 8101 8102 #line default 8103 #line hidden 8104 8105 #line 2900 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8106 8107 8108 8109 #line default 8110 #line hidden 8111 8112 #line 2901 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8113 WriteTo(__razor_helper_writer, groupName); 8114 8115 8116 #line default 8117 #line hidden 8118 8119 #line 2901 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8120 8121 } 8122 8123 #line default 8124 #line hidden 8125 WriteLiteralTo(__razor_helper_writer, "\r\n </label>\r\n \r\n <div"); 8126 8127 WriteAttributeTo(__razor_helper_writer, "class", Tuple.Create(" class=\"", 123369), Tuple.Create("\"", 123444) 8128 , Tuple.Create(Tuple.Create("", 123377), Tuple.Create("filtersContainer", 123377), true) 8129 , Tuple.Create(Tuple.Create(" ", 123393), Tuple.Create("containerDeep_", 123394), true) 8130 8131 #line 2905 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8132 , Tuple.Create(Tuple.Create("", 123408), Tuple.Create<System.Object, System.Int32>(numberOfParentGroups 8133 8134 #line default 8135 #line hidden 8136 , 123408), false) 8137 8138 #line 2905 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8139 , Tuple.Create(Tuple.Create(" ", 123429), Tuple.Create<System.Object, System.Int32>(hideSubgroups 8140 8141 #line default 8142 #line hidden 8143 , 123430), false) 8144 ); 8145 8146 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 8147 8148 WriteLiteralTo(__razor_helper_writer, " "); 8149 8150 8151 #line 2906 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8152 WriteTo(__razor_helper_writer, InternalRenderEcomNavigation(group.Subgroups)); 8153 8154 8155 #line default 8156 #line hidden 8157 WriteLiteralTo(__razor_helper_writer, "\r\n </div>\r\n </fieldset>\r\n"); 8158 8159 8160 #line 2909 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8161 } 8162 else 8163 { 8164 8165 8166 #line default 8167 #line hidden 8168 WriteLiteralTo(__razor_helper_writer, " <label"); 8169 8170 WriteLiteralTo(__razor_helper_writer, " class=\"checkBoxContainer \""); 8171 8172 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 8173 8174 WriteLiteralTo(__razor_helper_writer, " "); 8175 8176 8177 #line 2913 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8178 WriteTo(__razor_helper_writer, RenderField(new FieldSettings {Type = FieldType.Checkbox, SystemName = "group", Value = groupId})); 8179 8180 8181 #line default 8182 #line hidden 8183 WriteLiteralTo(__razor_helper_writer, "\r\n <span>\r\n"); 8184 8185 WriteLiteralTo(__razor_helper_writer, " "); 8186 8187 8188 #line 2915 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8189 WriteTo(__razor_helper_writer, groupName); 8190 8191 8192 #line default 8193 #line hidden 8194 WriteLiteralTo(__razor_helper_writer, "\r\n </span>\r\n </label>\r\n"); 8195 8196 8197 #line 2918 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8198 } 8199 } 8200 8201 8202 #line default 8203 #line hidden 8204 }); 8205 8206 #line 2920 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8207 } 8208 #line default 8209 #line hidden 8210 8211 8212 #line 2925 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8213 public RazorEngine.Templating.TemplateWriter RenderFilters(List<LoopItem> facetGroups) 8214 { 8215 #line default 8216 #line hidden 8217 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 8218 8219 #line 2926 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8220 8221 var parametersList = GetLoop("Query.Parameters"); 8222 8223 8224 8225 #line default 8226 #line hidden 8227 WriteLiteralTo(__razor_helper_writer, " <div"); 8228 8229 WriteLiteralTo(__razor_helper_writer, " id=\"filtersContainer\""); 8230 8231 WriteLiteralTo(__razor_helper_writer, " class=\"col-xs-12 col-sm-3 noPaddingLeft\""); 8232 8233 WriteLiteralTo(__razor_helper_writer, ">\r\n \r\n <div"); 8234 8235 WriteLiteralTo(__razor_helper_writer, " class=\"headerBox filtersHead col-xs-12\""); 8236 8237 WriteLiteralTo(__razor_helper_writer, ">\r\n <span>"); 8238 8239 8240 #line 2932 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8241 WriteTo(__razor_helper_writer, Translate("Filter your results")); 8242 8243 8244 #line default 8245 #line hidden 8246 WriteLiteralTo(__razor_helper_writer, "</span>\r\n </div>\r\n"); 8247 8248 8249 #line 2934 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8250 8251 8252 #line default 8253 #line hidden 8254 8255 #line 2934 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8256 if(facetGroups.Any()) { 8257 8258 8259 #line default 8260 #line hidden 8261 WriteLiteralTo(__razor_helper_writer, " <form"); 8262 8263 WriteLiteralTo(__razor_helper_writer, " id=\"filtersForm\""); 8264 8265 WriteLiteralTo(__razor_helper_writer, " class=\"col-xs-12\""); 8266 8267 WriteAttributeTo(__razor_helper_writer, "action", Tuple.Create(" action=\"", 124416), Tuple.Create("\"", 124503) 8268 8269 #line 2935 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8270 , Tuple.Create(Tuple.Create("", 124425), Tuple.Create<System.Object, System.Int32>(Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(Pageview.Page.ID) 8271 8272 #line default 8273 #line hidden 8274 , 124425), false) 8275 ); 8276 8277 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 8278 8279 WriteLiteralTo(__razor_helper_writer, " "); 8280 8281 8282 #line 2936 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8283 WriteTo(__razor_helper_writer, RenderField(FieldSettings.CreateHiddenField("sortby", Sanitize.Parameter("sortby")))); 8284 8285 8286 #line default 8287 #line hidden 8288 WriteLiteralTo(__razor_helper_writer, "\r\n"); 8289 8290 WriteLiteralTo(__razor_helper_writer, " "); 8291 8292 8293 #line 2937 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8294 WriteTo(__razor_helper_writer, RenderField(FieldSettings.CreateHiddenField("SortOrder", Sanitize.Parameter("SortOrder")))); 8295 8296 8297 #line default 8298 #line hidden 8299 WriteLiteralTo(__razor_helper_writer, "\r\n"); 8300 8301 WriteLiteralTo(__razor_helper_writer, " "); 8302 8303 8304 #line 2938 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8305 WriteTo(__razor_helper_writer, RenderField(FieldSettings.CreateHiddenField("PageSize", Sanitize.Parameter("PageSize", ParameterType.Number)))); 8306 8307 8308 #line default 8309 #line hidden 8310 WriteLiteralTo(__razor_helper_writer, "\r\n"); 8311 8312 WriteLiteralTo(__razor_helper_writer, " "); 8313 8314 8315 #line 2939 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8316 WriteTo(__razor_helper_writer, RenderField(FieldSettings.CreateHiddenField("q", Sanitize.Parameter("q", ParameterType.LongText)))); 8317 8318 8319 #line default 8320 #line hidden 8321 WriteLiteralTo(__razor_helper_writer, "\r\n \r\n"); 8322 8323 8324 #line 2941 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8325 8326 8327 #line default 8328 #line hidden 8329 8330 #line 2941 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8331 foreach (var facetGroup in facetGroups) 8332 { 8333 foreach (var facet in facetGroup.GetLoop("Facets")) 8334 { 8335 var parameterType = parametersList.First(x => x.GetString("Parameter.Name") == facet.GetString("Facet.QueryParameter")).GetString("Parameter.Type"); 8336 var templateOutput = facet.GetString("Facet.RenderType").IsNotNullOrEmpty() ? facet.GetString("Facet.RenderType") : "Text"; 8337 8338 8339 #line default 8340 #line hidden 8341 8342 #line 2947 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8343 WriteTo(__razor_helper_writer, InternalRenderFacetField(facet, parameterType, templateOutput)); 8344 8345 8346 #line default 8347 #line hidden 8348 8349 #line 2947 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8350 8351 } 8352 } 8353 8354 #line default 8355 #line hidden 8356 WriteLiteralTo(__razor_helper_writer, "\r\n </form>\r\n"); 8357 8358 8359 #line 2951 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8360 } 8361 8362 #line default 8363 #line hidden 8364 WriteLiteralTo(__razor_helper_writer, "\r\n </div>\r\n"); 8365 8366 8367 #line 2953 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8368 8369 8370 #line default 8371 #line hidden 8372 }); 8373 8374 #line 2953 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8375 } 8376 #line default 8377 #line hidden 8378 8379 8380 #line 2955 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8381 public RazorEngine.Templating.TemplateWriter RenderProductFreeTextSearch() 8382 { 8383 #line default 8384 #line hidden 8385 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 8386 8387 #line 2956 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8388 8389 var qString = Sanitize.Parameter("q", ParameterType.LongText); 8390 var searchResultsPageId = GetPageIdByNavigationTag("SearchResults"); 8391 if (qString.IsNotNullOrEmpty()) 8392 { 8393 8394 8395 #line default 8396 #line hidden 8397 WriteLiteralTo(__razor_helper_writer, " <form"); 8398 8399 WriteAttributeTo(__razor_helper_writer, "action", Tuple.Create(" action=\"", 125937), Tuple.Create("\"", 126027) 8400 8401 #line 2961 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8402 , Tuple.Create(Tuple.Create("", 125946), Tuple.Create<System.Object, System.Int32>(Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(searchResultsPageId) 8403 8404 #line default 8405 #line hidden 8406 , 125946), false) 8407 ); 8408 8409 WriteLiteralTo(__razor_helper_writer, " id=\"searchFormList\""); 8410 8411 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 8412 8413 WriteLiteralTo(__razor_helper_writer, " "); 8414 8415 8416 #line 2962 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8417 WriteTo(__razor_helper_writer, RenderField(new FieldSettings {SystemName = "q", Type = FieldType.Search, Id = "searchSubmitList", Value = qString, IsRequired = true, IncludeWrapper = true, WrapperCssClass = "hidden-Label", Attributes = new Dictionary<string, string> {{"data-error", Translate("Search for something")}}})); 8418 8419 8420 #line default 8421 #line hidden 8422 WriteLiteralTo(__razor_helper_writer, "\r\n"); 8423 8424 WriteLiteralTo(__razor_helper_writer, " "); 8425 8426 8427 #line 2963 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8428 WriteTo(__razor_helper_writer, RenderBootstrapButton(new BootstrapButtonSettings {IconCssClass = "fa-search", ButtonType = BootstrapButtonSettings.BootstrapButtonType.Button})); 8429 8430 8431 #line default 8432 #line hidden 8433 WriteLiteralTo(__razor_helper_writer, "\r\n </form>\r\n"); 8434 8435 8436 #line 2965 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8437 } 8438 8439 8440 #line default 8441 #line hidden 8442 }); 8443 8444 #line 2966 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8445 } 8446 #line default 8447 #line hidden 8448 8449 8450 #line 2968 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8451 public RazorEngine.Templating.TemplateWriter RenderActiveFiltersSummary(List<LoopItem> facetGroups) 8452 { 8453 #line default 8454 #line hidden 8455 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 8456 8457 #line 2969 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8458 8459 8460 8461 #line default 8462 #line hidden 8463 WriteLiteralTo(__razor_helper_writer, " <div"); 8464 8465 WriteLiteralTo(__razor_helper_writer, " class=\"col-xs-12 removeFiltersContainer\""); 8466 8467 WriteLiteralTo(__razor_helper_writer, ">\r\n \r\n"); 8468 8469 8470 #line 2972 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8471 8472 8473 #line default 8474 #line hidden 8475 8476 #line 2972 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8477 foreach (var facetGroup in facetGroups) 8478 { 8479 foreach (var facet in facetGroup.GetLoop("Facets")) 8480 { 8481 if (facet.GetLoop("FacetOptions").Any(r => r.GetBoolean("FacetOption.Selected"))) 8482 { 8483 8484 8485 #line default 8486 #line hidden 8487 8488 #line 2978 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8489 WriteTo(__razor_helper_writer, RenderBootstrapButton(new BootstrapButtonSettings { Label = facet.GetString("Facet.Name"), IconCssClass = "fa-times", IconPosition = IconPosition.Right, Attributes = new Dictionary<string, string> {{"data-queryname",facet.GetString("Facet.QueryParameter")}} })); 8490 8491 8492 #line default 8493 #line hidden 8494 8495 #line 2978 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8496 8497 } 8498 } 8499 } 8500 8501 #line default 8502 #line hidden 8503 WriteLiteralTo(__razor_helper_writer, "\r\n <a"); 8504 8505 WriteLiteralTo(__razor_helper_writer, " class=\"removeAll\""); 8506 8507 WriteLiteralTo(__razor_helper_writer, " href=\"#\""); 8508 8509 WriteLiteralTo(__razor_helper_writer, ">"); 8510 8511 8512 #line 2982 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8513 WriteTo(__razor_helper_writer, Translate("Remove all filters")); 8514 8515 8516 #line default 8517 #line hidden 8518 WriteLiteralTo(__razor_helper_writer, "</a>\r\n </div>\r\n"); 8519 8520 8521 #line 2984 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8522 8523 8524 #line default 8525 #line hidden 8526 }); 8527 8528 #line 2984 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8529 } 8530 #line default 8531 #line hidden 8532 8533 8534 #line 2995 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8535 8536 public static bool ShowGuestCheckout() 8537 { 8538 return Dna.Modules.Features.FeatureManager.IsEnabled("showGuestCheckout", "Set to 'true' if Checkout as guest should be displayed."); 8539 } 8540 8541 8542 #line default 8543 #line hidden 8544 8545 8546 #line 3003 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8547 public RazorEngine.Templating.TemplateWriter RenderIconPopover(string cssPartialClass, string cssWrapperClass="", string label = "", string description = "", IconPosition position = IconPosition.Left) 8548 { 8549 #line default 8550 #line hidden 8551 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 8552 8553 #line 3004 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8554 8555 8556 8557 #line default 8558 #line hidden 8559 8560 #line 3007 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8561 8562 var icon = "<i class='fa " + cssPartialClass + "' data-toggle='" + label + "'></i>"; 8563 var spacing = string.Empty; 8564 8565 if (label.IsNotNullOrEmpty()) 8566 { 8567 spacing = "&nbsp;"; 8568 } 8569 if (cssPartialClass.IsNotNullOrEmpty()) 8570 { 8571 8572 8573 #line default 8574 #line hidden 8575 WriteLiteralTo(__razor_helper_writer, " <div"); 8576 8577 WriteAttributeTo(__razor_helper_writer, "class", Tuple.Create(" class=\"", 128669), Tuple.Create("\"", 128693) 8578 8579 #line 3017 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8580 , Tuple.Create(Tuple.Create("", 128677), Tuple.Create<System.Object, System.Int32>(cssWrapperClass 8581 8582 #line default 8583 #line hidden 8584 , 128677), false) 8585 ); 8586 8587 WriteLiteralTo(__razor_helper_writer, " data-container=\"body\""); 8588 8589 WriteLiteralTo(__razor_helper_writer, " title=\"\""); 8590 8591 WriteLiteralTo(__razor_helper_writer, " data-content=\""); 8592 8593 8594 #line 3017 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8595 WriteTo(__razor_helper_writer, description); 8596 8597 8598 #line default 8599 #line hidden 8600 WriteLiteralTo(__razor_helper_writer, "\""); 8601 8602 WriteLiteralTo(__razor_helper_writer, " data-original-title=\""); 8603 8604 8605 #line 3017 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8606 WriteTo(__razor_helper_writer, label); 8607 8608 8609 #line default 8610 #line hidden 8611 WriteLiteralTo(__razor_helper_writer, "\""); 8612 8613 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 8614 8615 WriteLiteralTo(__razor_helper_writer, " "); 8616 8617 8618 #line 3018 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8619 WriteTo(__razor_helper_writer, icon); 8620 8621 8622 #line default 8623 #line hidden 8624 WriteLiteralTo(__razor_helper_writer, "\r\n </div>\r\n"); 8625 8626 8627 #line 3020 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8628 8629 } 8630 8631 8632 8633 #line default 8634 #line hidden 8635 }); 8636 8637 #line 3023 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8638 } 8639 #line default 8640 #line hidden 8641 8642 8643 #line 3025 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8644 public RazorEngine.Templating.TemplateWriter RenderPageSummary(int totalItemCount, int currentPage, int itemsPerPage, string cssClass = "col-sm-2 col-xs-12 noPaddingLeft") 8645 { 8646 #line default 8647 #line hidden 8648 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 8649 8650 #line 3026 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8651 8652 currentPage = currentPage < 1 ? 1 : currentPage; 8653 8654 var endItemNumber = itemsPerPage * currentPage; 8655 var startItemNumber = endItemNumber - itemsPerPage + 1; 8656 var pageEndNumber = totalItemCount < endItemNumber ? totalItemCount : endItemNumber; 8657 8658 8659 8660 #line default 8661 #line hidden 8662 WriteLiteralTo(__razor_helper_writer, " <span"); 8663 8664 WriteAttributeTo(__razor_helper_writer, "class", Tuple.Create(" class=\"", 129318), Tuple.Create("\"", 129335) 8665 8666 #line 3033 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8667 , Tuple.Create(Tuple.Create("", 129326), Tuple.Create<System.Object, System.Int32>(cssClass 8668 8669 #line default 8670 #line hidden 8671 , 129326), false) 8672 ); 8673 8674 WriteLiteralTo(__razor_helper_writer, ">"); 8675 8676 8677 #line 3033 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8678 WriteTo(__razor_helper_writer, Translate("Showing")); 8679 8680 8681 #line default 8682 #line hidden 8683 WriteLiteralTo(__razor_helper_writer, " "); 8684 8685 8686 #line 3033 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8687 WriteTo(__razor_helper_writer, startItemNumber); 8688 8689 8690 #line default 8691 #line hidden 8692 WriteLiteralTo(__razor_helper_writer, " "); 8693 8694 8695 #line 3033 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8696 WriteTo(__razor_helper_writer, Translate("to")); 8697 8698 8699 #line default 8700 #line hidden 8701 WriteLiteralTo(__razor_helper_writer, " "); 8702 8703 8704 #line 3033 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8705 WriteTo(__razor_helper_writer, pageEndNumber); 8706 8707 8708 #line default 8709 #line hidden 8710 WriteLiteralTo(__razor_helper_writer, " "); 8711 8712 8713 #line 3033 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8714 WriteTo(__razor_helper_writer, Translate("of")); 8715 8716 8717 #line default 8718 #line hidden 8719 WriteLiteralTo(__razor_helper_writer, " "); 8720 8721 8722 #line 3033 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8723 WriteTo(__razor_helper_writer, totalItemCount); 8724 8725 8726 #line default 8727 #line hidden 8728 WriteLiteralTo(__razor_helper_writer, " "); 8729 8730 8731 #line 3033 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8732 WriteTo(__razor_helper_writer, Translate(totalItemCount > 1 ? "items" : "item")); 8733 8734 8735 #line default 8736 #line hidden 8737 WriteLiteralTo(__razor_helper_writer, "</span>\r\n"); 8738 8739 8740 #line 3034 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8741 8742 8743 #line default 8744 #line hidden 8745 }); 8746 8747 #line 3034 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8748 } 8749 #line default 8750 #line hidden 8751 8752 8753 #line 3037 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8754 public RazorEngine.Templating.TemplateWriter RenderActionCustom(IconAction action, string href = "", string title = "", string onClickConfirm = "", string totalQty = "", string productNumber="") 8755 { 8756 #line default 8757 #line hidden 8758 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 8759 8760 #line 3038 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8761 8762 var attributes = new Dictionary<string, string>(); 8763 8764 if (title.IsNotNullOrEmpty()) 8765 { 8766 attributes.Add("title", title); 8767 } 8768 if (onClickConfirm.IsNotNullOrEmpty()) 8769 { 8770 attributes.Add("onclick", "return confirm('" + onClickConfirm + "');"); 8771 } 8772 if (href.IsNotNullOrEmpty()) 8773 { 8774 attributes.Add("href", href); 8775 } 8776 8777 8778 #line default 8779 #line hidden 8780 8781 #line 3053 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8782 WriteTo(__razor_helper_writer, RenderActionCustom(action, href, attributes, totalQty, productNumber)); 8783 8784 8785 #line default 8786 #line hidden 8787 8788 #line 3053 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8789 8790 8791 8792 #line default 8793 #line hidden 8794 }); 8795 8796 #line 3054 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8797 } 8798 #line default 8799 #line hidden 8800 8801 8802 #line 3056 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8803 public RazorEngine.Templating.TemplateWriter RenderActionCustom(IconAction action, string href, Dictionary<string, string> attributes, string totalQty = "", string productNumber="") 8804 { 8805 #line default 8806 #line hidden 8807 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 8808 8809 #line 3057 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8810 8811 var icon = string.Empty; 8812 var linkAttributes = string.Empty; 8813 var label = string.Concat("<span class=\"actionText\">", Translate(action.ToString()), "</span>"); 8814 8815 switch (action) 8816 { 8817 case IconAction.Add: 8818 break; 8819 case IconAction.View: 8820 icon = "fa-eye"; 8821 break; 8822 case IconAction.Edit: 8823 icon = "fa-edit"; 8824 break; 8825 case IconAction.Cancel: 8826 case IconAction.Remove: 8827 icon = "fa-times"; 8828 break; 8829 case IconAction.Delete: 8830 icon = "fa-times"; 8831 break; 8832 case IconAction.Print: 8833 icon = "fa-print"; 8834 attributes.Add("target", "_blank"); 8835 break; 8836 case IconAction.Save: 8837 break; 8838 case IconAction.Reset: 8839 break; 8840 case IconAction.Undo: 8841 break; 8842 case IconAction.Reorder: 8843 icon = "fa-repeat"; 8844 attributes.Add("class", "reorderLink"); 8845 attributes.Add("data-totalqty", totalQty); 8846 attributes.Add("data-productlist", productNumber); 8847 break; 8848 case IconAction.SetDefault: 8849 icon = "fa-times"; 8850 label = string.Empty; 8851 break; 8852 case IconAction.IsDefault: 8853 icon = "fa-check-circle"; 8854 label = string.Empty; 8855 break; 8856 default: 8857 throw new NotSupportedException("An action is needed to render this helper!"); 8858 } 8859 if (icon.IsNotNullOrEmpty()) 8860 { 8861 if (href.IsNotNullOrEmpty()) 8862 { 8863 8864 8865 #line default 8866 #line hidden 8867 8868 #line 3110 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8869 WriteTo(__razor_helper_writer, GetHtmlElement("a", GetAttributes(attributes))); 8870 8871 8872 #line default 8873 #line hidden 8874 8875 #line 3110 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8876 8877 8878 8879 #line default 8880 #line hidden 8881 8882 #line 3111 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8883 WriteTo(__razor_helper_writer, RenderIcon(icon, label)); 8884 8885 8886 #line default 8887 #line hidden 8888 8889 #line 3111 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8890 8891 8892 8893 #line default 8894 #line hidden 8895 8896 #line 3112 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8897 WriteTo(__razor_helper_writer, GetHtmlElement("a", true)); 8898 8899 8900 #line default 8901 #line hidden 8902 8903 #line 3112 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8904 8905 } 8906 else if (label.IsNullOrEmpty()) 8907 { 8908 8909 8910 #line default 8911 #line hidden 8912 8913 #line 3116 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8914 WriteTo(__razor_helper_writer, RenderIcon(icon)); 8915 8916 8917 #line default 8918 #line hidden 8919 8920 #line 3116 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8921 8922 } 8923 } 8924 8925 8926 8927 #line default 8928 #line hidden 8929 }); 8930 8931 #line 3120 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8932 } 8933 #line default 8934 #line hidden 8935 8936 8937 #line 3136 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8938 8939 8940 public string GetGroupImage(string groupImagePath, string groupId) 8941 { 8942 var fixedPath = groupImagePath.Contains("Files/Files") ? groupImagePath : "/Files/" + groupImagePath; 8943 return groupImagePath.IsNotNullOrEmpty() ? fixedPath : string.Format("/Files/Files/{1}/Groups/Images/{0}.png", groupId, Pageview.Area.Layout.Design.Name); 8944 } 8945 8946 8947 #line default 8948 #line hidden 8949 8950 8951 #line 3146 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8952 public RazorEngine.Templating.TemplateWriter RenderListViewProductCustom(LoopItem product) 8953 { 8954 #line default 8955 #line hidden 8956 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 8957 8958 #line 3147 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8959 8960 var showQuantity = Pageview.Area.Item["ShowQuantityField"].ToString() == "True"; 8961 const int productStock = 999999999; 8962 var productType = product.GetInteger("Ecom:Product.Type"); 8963 8964 8965 #line default 8966 #line hidden 8967 8968 #line 3157 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 8969 8970 var productNumber = product.GetString("Ecom:Product.Number"); 8971 var modelNumber = product.GetString("Ecom:Product:Field.ModelNumber.Value.Clean"); 8972 var image = CHG.Helpers.Images.GetChgImagePath(product); 8973 var productName = product.GetString("Ecom:Product.Name"); 8974 var currentVariantId = product.GetString("Ecom:Product.VariantID"); 8975 var variantId = currentVariantId.IsNotNullOrEmpty() ? currentVariantId : product.GetString("Ecom:Product.DefaultVariantComboID"); 8976 var productId = product.GetString("Ecom:Product.ID"); 8977 var link = HttpUtility.HtmlEncode(Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(product.GetString("Ecom:Product.Link.Clean"))); 8978 var productLanguage = product.GetString("Ecom:Product.LanguageID"); 8979 var productUnitId = product.GetString("Ecom:Product.DefaultUnitID"); 8980 var miniCartPageId = GetPageIdByNavigationTag("MiniCart"); 8981 var actionCart = Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(miniCartPageId); 8982 var specialProductPricePage = GetSpecialItemPricingUrl(HttpUtility.UrlEncode(productName), productNumber, modelNumber); 8983 var hasTariff = product.GetBoolean("Ecom:Product:Field.TariffSurchargeable"); 8984 var quoteOrderContext = Dynamicweb.Configuration.SystemConfiguration.Instance.GetValue("/Globalsettings/CHG/Checkout/QuoteOrderContextId"); 8985 var isSpecialProduct = product.GetString("Ecom:Product:Field.CatalogClassification.Value").Equals("special", StringComparison.InvariantCultureIgnoreCase); 8986 8987 8988 8989 #line default 8990 #line hidden 8991 WriteLiteralTo(__razor_helper_writer, " <div"); 8992 8993 WriteLiteralTo(__razor_helper_writer, " class=\"col-xs-12 noPadding hasNoVariant\""); 8994 8995 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 8996 8997 WriteLiteralTo(__razor_helper_writer, " "); 8998 8999 9000 #line 3176 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9001 WriteTo(__razor_helper_writer, RenderImage(new ImageSettings {IncludeWrapper = true, WrapperCssClass = "col-xs-2 noPadding centerVertical", Href = link, Source = Images.GetImage(image, 480, 480), AltText = productName})); 9002 9003 9004 #line default 9005 #line hidden 9006 WriteLiteralTo(__razor_helper_writer, "\r\n <div"); 9007 9008 WriteLiteralTo(__razor_helper_writer, " class=\"col-xs-10 noPadding centerVertical\""); 9009 9010 WriteLiteralTo(__razor_helper_writer, ">\r\n <div"); 9011 9012 WriteLiteralTo(__razor_helper_writer, " class=\"prodNumberHolder col-xs-4\""); 9013 9014 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 9015 9016 9017 #line 3179 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9018 9019 9020 #line default 9021 #line hidden 9022 9023 #line 3179 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9024 if (productNumber.IsNotNullOrEmpty()) 9025 { 9026 9027 9028 #line default 9029 #line hidden 9030 WriteLiteralTo(__razor_helper_writer, " <a"); 9031 9032 WriteLiteralTo(__razor_helper_writer, " class=\"prodNumber\""); 9033 9034 WriteAttributeTo(__razor_helper_writer, "href", Tuple.Create(" href=\"", 135713), Tuple.Create("\"", 135725) 9035 9036 #line 3181 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9037 , Tuple.Create(Tuple.Create("", 135720), Tuple.Create<System.Object, System.Int32>(link 9038 9039 #line default 9040 #line hidden 9041 , 135720), false) 9042 ); 9043 9044 WriteLiteralTo(__razor_helper_writer, " >"); 9045 9046 9047 #line 3181 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9048 WriteTo(__razor_helper_writer, modelNumber); 9049 9050 9051 #line default 9052 #line hidden 9053 WriteLiteralTo(__razor_helper_writer, "</a>\r\n"); 9054 9055 9056 #line 3182 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9057 } 9058 9059 #line default 9060 #line hidden 9061 WriteLiteralTo(__razor_helper_writer, "\r\n </div>\r\n"); 9062 9063 9064 #line 3184 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9065 9066 9067 #line default 9068 #line hidden 9069 9070 #line 3184 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9071 if (!isSpecialProduct) 9072 { 9073 9074 9075 #line default 9076 #line hidden 9077 WriteLiteralTo(__razor_helper_writer, " <div"); 9078 9079 WriteLiteralTo(__razor_helper_writer, " class=\'listHide listPrice text-right\'"); 9080 9081 WriteLiteralTo(__razor_helper_writer, " id=\'tilesPrice\'"); 9082 9083 WriteLiteralTo(__razor_helper_writer, "></div>\r\n"); 9084 9085 9086 #line 3187 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9087 } 9088 9089 #line default 9090 #line hidden 9091 WriteLiteralTo(__razor_helper_writer, "\r\n <div"); 9092 9093 WriteLiteralTo(__razor_helper_writer, " class=\"col-xs-5 noPaddingLeft\""); 9094 9095 WriteLiteralTo(__razor_helper_writer, ">\r\n <h2>\r\n <a"); 9096 9097 WriteLiteralTo(__razor_helper_writer, " itemprop=\"name\""); 9098 9099 WriteAttributeTo(__razor_helper_writer, "href", Tuple.Create(" href=\"", 136081), Tuple.Create("\"", 136093) 9100 9101 #line 3190 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9102 , Tuple.Create(Tuple.Create("", 136088), Tuple.Create<System.Object, System.Int32>(link 9103 9104 #line default 9105 #line hidden 9106 , 136088), false) 9107 ); 9108 9109 WriteLiteralTo(__razor_helper_writer, ">"); 9110 9111 9112 #line 3190 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9113 WriteTo(__razor_helper_writer, productName); 9114 9115 9116 #line default 9117 #line hidden 9118 WriteLiteralTo(__razor_helper_writer, "</a>\r\n </h2>\r\n"); 9119 9120 WriteLiteralTo(__razor_helper_writer, " "); 9121 9122 9123 #line 3192 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9124 WriteTo(__razor_helper_writer, RenderProductCompareCustom(productType, productId, string.Empty, productLanguage)); 9125 9126 9127 #line default 9128 #line hidden 9129 WriteLiteralTo(__razor_helper_writer, "\r\n </div>\r\n <div "); 9130 9131 9132 #line 3194 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9133 WriteTo(__razor_helper_writer, !isSpecialProduct ? "data-liveproductinfo=" + productId : string.Empty); 9134 9135 9136 #line default 9137 #line hidden 9138 WriteLiteralTo(__razor_helper_writer, " class=\"liveProductInfo col-xs-8 noPadding text-right\">\r\n <div" + 9139 ""); 9140 9141 WriteLiteralTo(__razor_helper_writer, " class=\"addToCartWrapper\""); 9142 9143 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 9144 9145 9146 #line 3196 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9147 9148 9149 #line default 9150 #line hidden 9151 9152 #line 3196 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9153 if (isSpecialProduct) 9154 { 9155 9156 9157 #line default 9158 #line hidden 9159 WriteLiteralTo(__razor_helper_writer, " <a"); 9160 9161 WriteAttributeTo(__razor_helper_writer, "href", Tuple.Create(" href=\"", 136576), Tuple.Create("\"", 136607) 9162 9163 #line 3198 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9164 , Tuple.Create(Tuple.Create("", 136583), Tuple.Create<System.Object, System.Int32>(specialProductPricePage 9165 9166 #line default 9167 #line hidden 9168 , 136583), false) 9169 ); 9170 9171 WriteLiteralTo(__razor_helper_writer, ">"); 9172 9173 9174 #line 3198 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9175 WriteTo(__razor_helper_writer, Translate("Please click here for pricing and availability")); 9176 9177 9178 #line default 9179 #line hidden 9180 WriteLiteralTo(__razor_helper_writer, "</a>\r\n"); 9181 9182 9183 #line 3199 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9184 } 9185 else 9186 { 9187 9188 9189 #line default 9190 #line hidden 9191 WriteLiteralTo(__razor_helper_writer, " <div"); 9192 9193 WriteLiteralTo(__razor_helper_writer, " class=\"listPriceHolder col-xs-4 hidden\""); 9194 9195 WriteLiteralTo(__razor_helper_writer, ">\r\n <span"); 9196 9197 WriteLiteralTo(__razor_helper_writer, " class=\"listPrice\""); 9198 9199 WriteLiteralTo(__razor_helper_writer, "></span>\r\n </div>\r\n"); 9200 9201 WriteLiteralTo(__razor_helper_writer, " <div"); 9202 9203 WriteLiteralTo(__razor_helper_writer, " class=\"col-xs-8 noPaddingRight pull-right priceContainer hidden\""); 9204 9205 WriteLiteralTo(__razor_helper_writer, ">\r\n <form"); 9206 9207 WriteLiteralTo(__razor_helper_writer, " name=\"addToCart\""); 9208 9209 WriteAttributeTo(__razor_helper_writer, "action", Tuple.Create(" action=\"", 137089), Tuple.Create("\"", 137109) 9210 9211 #line 3206 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9212 , Tuple.Create(Tuple.Create("", 137098), Tuple.Create<System.Object, System.Int32>(actionCart 9213 9214 #line default 9215 #line hidden 9216 , 137098), false) 9217 ); 9218 9219 WriteLiteralTo(__razor_helper_writer, " method=\"post\""); 9220 9221 WriteLiteralTo(__razor_helper_writer, " data-outofstock=\'"); 9222 9223 9224 #line 3206 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9225 WriteTo(__razor_helper_writer, Translate("Out of stock")); 9226 9227 9228 #line default 9229 #line hidden 9230 WriteLiteralTo(__razor_helper_writer, "\'"); 9231 9232 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 9233 9234 9235 #line 3207 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9236 9237 9238 #line default 9239 #line hidden 9240 9241 #line 3207 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9242 if (!showQuantity) 9243 { 9244 var stockQuantityFieldSettings = new FieldSettings 9245 { 9246 Type = FieldType.Hidden, 9247 SystemName = "quantity", 9248 Id = "quantity" + productId, 9249 Value = "1", 9250 CssClass = "quantityInput", 9251 Attributes = new Dictionary<string, string> 9252 { 9253 {"data-outofstock", Translate("Out of stock")}, 9254 {"data-stocktranslate", Translate("The current stock is")}, 9255 {"data-available", productStock.ToString()} 9256 } 9257 }; 9258 9259 9260 #line default 9261 #line hidden 9262 9263 #line 3223 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9264 WriteTo(__razor_helper_writer, RenderField(stockQuantityFieldSettings)); 9265 9266 9267 #line default 9268 #line hidden 9269 9270 #line 3223 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9271 9272 } 9273 9274 #line default 9275 #line hidden 9276 WriteLiteralTo(__razor_helper_writer, "\r\n"); 9277 9278 WriteLiteralTo(__razor_helper_writer, " "); 9279 9280 9281 #line 3225 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9282 WriteTo(__razor_helper_writer, RenderQuantitySelector(false, productStock, productType, productId)); 9283 9284 9285 #line default 9286 #line hidden 9287 WriteLiteralTo(__razor_helper_writer, "\r\n"); 9288 9289 WriteLiteralTo(__razor_helper_writer, " "); 9290 9291 9292 #line 3226 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9293 WriteTo(__razor_helper_writer, RenderAddToCart(productId, productUnitId, string.Empty, productStock, false)); 9294 9295 9296 #line default 9297 #line hidden 9298 WriteLiteralTo(__razor_helper_writer, "\r\n </form>\r\n </div>\r\n"); 9299 9300 9301 #line 3229 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9302 } 9303 9304 #line default 9305 #line hidden 9306 WriteLiteralTo(__razor_helper_writer, "\r\n </div>\r\n"); 9307 9308 WriteLiteralTo(__razor_helper_writer, " "); 9309 9310 9311 #line 3231 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9312 WriteTo(__razor_helper_writer, RenderRequestQuoteButton(productId, productUnitId, variantId, quoteOrderContext)); 9313 9314 9315 #line default 9316 #line hidden 9317 WriteLiteralTo(__razor_helper_writer, "\r\n </div>\r\n </div>\r\n"); 9318 9319 9320 #line 3234 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9321 9322 9323 #line default 9324 #line hidden 9325 9326 #line 3234 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9327 9328 if ( hasTariff) 9329 { 9330 var isMyCatalogPage = Pageview.Page.NavigationTag == "CompanyCatalog"; 9331 var TarrifLegend = "A"; 9332 if (isMyCatalogPage) 9333 { 9334 TarrifLegend = "B"; 9335 } 9336 9337 9338 #line default 9339 #line hidden 9340 9341 #line 3243 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9342 WriteTo(__razor_helper_writer, RenderTarrif(TarrifLegend, "tileHide col-xs-12 tariffBox")); 9343 9344 9345 #line default 9346 #line hidden 9347 9348 #line 3243 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9349 ; 9350 9351 9352 #line default 9353 #line hidden 9354 9355 #line 3244 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9356 WriteTo(__razor_helper_writer, RenderTarrif(TarrifLegend, "listHide marginTop10 col-xs-12 tariffBox")); 9357 9358 9359 #line default 9360 #line hidden 9361 9362 #line 3244 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9363 ; 9364 } 9365 9366 9367 #line default 9368 #line hidden 9369 WriteLiteralTo(__razor_helper_writer, "\r\n </div>\r\n"); 9370 9371 9372 #line 3248 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9373 9374 9375 #line default 9376 #line hidden 9377 }); 9378 9379 #line 3248 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9380 } 9381 #line default 9382 #line hidden 9383 9384 9385 #line 3249 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9386 public RazorEngine.Templating.TemplateWriter RenderProductListHeaderCustom(int prodLoopCount, int pageProdCount, int pageSize, string groupId) 9387 { 9388 #line default 9389 #line hidden 9390 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 9391 9392 #line 3250 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9393 9394 var isMyCatalogPage = Pageview.Page.NavigationTag == "CompanyCatalog"; 9395 var sortBy = Sanitize.Parameter("sortby"); 9396 var sortOrder = Sanitize.Parameter("SortOrder"); 9397 var sortByFieldSettings = new FieldSettings 9398 { 9399 Type = FieldType.Select, 9400 Label = Translate("Sort by"), 9401 SystemName = "sortby", 9402 Id = "sortSelect", 9403 WrapperCssClass = "col-sm-6 col-xs-5 hidden", 9404 IncludeWrapper = true 9405 }; 9406 sortByFieldSettings.FieldOptionsList.Add(new FieldOption {Label = Translate("Created"), Value = "Created", IsSelected = sortBy == "Created"}); 9407 sortByFieldSettings.FieldOptionsList.Add(new FieldOption {Label = Translate("Created"), Value = "Created", IsSelected = sortBy == "Created"}); 9408 sortByFieldSettings.FieldOptionsList.Add(new FieldOption {Label = Translate("Created"), Value = "Created", IsSelected = sortBy == "Created"}); 9409 var sortOrderFieldSettings = new FieldSettings 9410 { 9411 Type = FieldType.Select, 9412 Label = Translate("Order"), 9413 SystemName = "SortOrder", 9414 Id = "orderSelect", 9415 WrapperCssClass = "hidden", 9416 IncludeWrapper = true 9417 }; 9418 sortOrderFieldSettings.FieldOptionsList.Add(new FieldOption {Label = Translate("Asc"), Value = "ASC", IsSelected = sortOrder == "ASC"}); 9419 sortOrderFieldSettings.FieldOptionsList.Add(new FieldOption {Label = Translate("Desc"), Value = "DESC", IsSelected = sortOrder == "DESC"}); 9420 var sortOrderJoinFieldSettings = new FieldSettings 9421 { 9422 Type = FieldType.Select, 9423 Label = Translate("Sort"), 9424 SystemName = "SortOrderJoin", 9425 WrapperCssClass = "col-xs-12 pull-right wrap-sort", 9426 IncludeWrapper = true 9427 }; 9428 9429 sortOrderJoinFieldSettings.FieldOptionsList.Add(new FieldOption 9430 { 9431 Label = Translate("Product Description (A - Z)"), 9432 IsSelected = sortOrder == "ASC" && sortBy == "Name_sortable", 9433 Value = "Name_sortable|ASC" 9434 }); 9435 sortOrderJoinFieldSettings.FieldOptionsList.Add(new FieldOption 9436 { 9437 Label = Translate("Product Description (Z - A)"), 9438 IsSelected = sortOrder == "DESC" && sortBy == "Name_sortable", 9439 Value = "Name_sortable|DESC" 9440 }); 9441 9442 9443 #line default 9444 #line hidden 9445 WriteLiteralTo(__razor_helper_writer, " <!-- Model -->\r\n"); 9446 9447 9448 #line 3299 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9449 sortOrderJoinFieldSettings.FieldOptionsList.Add(new FieldOption 9450 { 9451 Label = Translate("Model # (A - Z)"), 9452 IsSelected = sortOrder == "ASC" && sortBy == "Model_sortable", 9453 Value = "Model_sortable|ASC" 9454 }); 9455 sortOrderJoinFieldSettings.FieldOptionsList.Add(new FieldOption 9456 { 9457 Label = Translate("Model # (Z - A)"), 9458 IsSelected = sortOrder == "DESC" && sortBy == "Model_sortable", 9459 Value = "Model_sortable|DESC" 9460 }); 9461 if (Sanitize.Parameter("q", ParameterType.LongText).IsNotNullOrEmpty()) 9462 { 9463 sortOrderJoinFieldSettings.FieldOptionsList.Add(new FieldOption 9464 { 9465 Label = Translate("Relevance"), 9466 IsSelected = sortOrder.IsNullOrEmpty() && sortBy.IsNullOrEmpty(), 9467 Value = string.Empty 9468 }); 9469 } 9470 var pageSizeFieldSettings = new FieldSettings 9471 { 9472 Type = FieldType.Select, 9473 Label = Translate("Page size"), 9474 SystemName = "PageSize", 9475 Id = "pageSize", 9476 IncludeWrapper = true, 9477 WrapperCssClass = "hidden" 9478 }; 9479 const int maxOf = 36; 9480 9481 const string allPages = "9999"; 9482 var multipleOf = 12; 9483 var selected = Sanitize.Parameter("PageNum").IsNotNullOrEmpty() ? Sanitize.Parameter("PageNum", ParameterType.Number) : pageSize.ToString(); 9484 while (multipleOf <= maxOf) 9485 { 9486 pageSizeFieldSettings.FieldOptionsList.Add(new FieldOption {Label = multipleOf.ToString(), Value = multipleOf.ToString(), IsSelected = selected == multipleOf.ToString()}); 9487 multipleOf = multipleOf + 12; 9488 if (multipleOf > pageProdCount) 9489 { 9490 break; 9491 } 9492 } 9493 pageSizeFieldSettings.FieldOptionsList.Add(new FieldOption {Label = Translate("All"), Value = allPages, IsSelected = selected == allPages}); 9494 9495 var formCssClass = "col-sm-5 col-xs-12 hidden-xs pull-right"; 9496 9497 if (isMyCatalogPage) 9498 { 9499 formCssClass += " noPadding"; 9500 sortOrderJoinFieldSettings.WrapperCssClass += " noPadding"; 9501 } 9502 9503 9504 #line default 9505 #line hidden 9506 WriteLiteralTo(__razor_helper_writer, " <div"); 9507 9508 WriteLiteralTo(__razor_helper_writer, " id=\"productListHeader\""); 9509 9510 WriteLiteralTo(__razor_helper_writer, " class=\"headerBox col-xs-12\""); 9511 9512 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 9513 9514 WriteLiteralTo(__razor_helper_writer, " "); 9515 9516 9517 #line 3353 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9518 WriteTo(__razor_helper_writer, RenderPageSummaryCustom(pageProdCount, "col-xs-5 noPadding")); 9519 9520 9521 #line default 9522 #line hidden 9523 WriteLiteralTo(__razor_helper_writer, "\r\n"); 9524 9525 9526 #line 3354 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9527 9528 9529 #line default 9530 #line hidden 9531 9532 #line 3354 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9533 if (!isMyCatalogPage) 9534 { 9535 9536 9537 #line default 9538 #line hidden 9539 WriteLiteralTo(__razor_helper_writer, " <ul"); 9540 9541 WriteLiteralTo(__razor_helper_writer, " class=\"listMode hidden-xs pull-right\""); 9542 9543 WriteLiteralTo(__razor_helper_writer, ">\r\n <li"); 9544 9545 WriteLiteralTo(__razor_helper_writer, " data-list=\"list\""); 9546 9547 WriteLiteralTo(__razor_helper_writer, " class=\"active\""); 9548 9549 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 9550 9551 WriteLiteralTo(__razor_helper_writer, " "); 9552 9553 9554 #line 3358 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9555 WriteTo(__razor_helper_writer, RenderIcon("fa-list-ul")); 9556 9557 9558 #line default 9559 #line hidden 9560 WriteLiteralTo(__razor_helper_writer, "\r\n </li>\r\n <li"); 9561 9562 WriteLiteralTo(__razor_helper_writer, " data-list=\"tile\""); 9563 9564 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 9565 9566 WriteLiteralTo(__razor_helper_writer, " "); 9567 9568 9569 #line 3361 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9570 WriteTo(__razor_helper_writer, RenderIcon("fa-th-large")); 9571 9572 9573 #line default 9574 #line hidden 9575 WriteLiteralTo(__razor_helper_writer, "\r\n </li>\r\n </ul>\r\n"); 9576 9577 9578 #line 3364 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9579 } 9580 9581 #line default 9582 #line hidden 9583 WriteLiteralTo(__razor_helper_writer, "\r\n <form"); 9584 9585 WriteLiteralTo(__razor_helper_writer, " id=\"orderProdList\""); 9586 9587 WriteAttributeTo(__razor_helper_writer, "class", Tuple.Create(" class=\"", 144911), Tuple.Create("\"", 144932) 9588 9589 #line 3365 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9590 , Tuple.Create(Tuple.Create("", 144919), Tuple.Create<System.Object, System.Int32>(formCssClass 9591 9592 #line default 9593 #line hidden 9594 , 144919), false) 9595 ); 9596 9597 WriteAttributeTo(__razor_helper_writer, "action", Tuple.Create(" action=\"", 144933), Tuple.Create("\"", 145020) 9598 9599 #line 3365 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9600 , Tuple.Create(Tuple.Create("", 144942), Tuple.Create<System.Object, System.Int32>(Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(Pageview.Page.ID) 9601 9602 #line default 9603 #line hidden 9604 , 144942), false) 9605 ); 9606 9607 WriteLiteralTo(__razor_helper_writer, " name=\"ExtUserForm_Main\""); 9608 9609 WriteLiteralTo(__razor_helper_writer, " method=\"GET\""); 9610 9611 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 9612 9613 WriteLiteralTo(__razor_helper_writer, " "); 9614 9615 9616 #line 3366 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9617 WriteTo(__razor_helper_writer, RenderField(sortByFieldSettings)); 9618 9619 9620 #line default 9621 #line hidden 9622 WriteLiteralTo(__razor_helper_writer, "\r\n"); 9623 9624 WriteLiteralTo(__razor_helper_writer, " "); 9625 9626 9627 #line 3367 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9628 WriteTo(__razor_helper_writer, RenderField(sortOrderFieldSettings)); 9629 9630 9631 #line default 9632 #line hidden 9633 WriteLiteralTo(__razor_helper_writer, "\r\n"); 9634 9635 WriteLiteralTo(__razor_helper_writer, " "); 9636 9637 9638 #line 3368 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9639 WriteTo(__razor_helper_writer, RenderField(sortOrderJoinFieldSettings)); 9640 9641 9642 #line default 9643 #line hidden 9644 WriteLiteralTo(__razor_helper_writer, "\r\n"); 9645 9646 WriteLiteralTo(__razor_helper_writer, " "); 9647 9648 9649 #line 3369 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9650 WriteTo(__razor_helper_writer, RenderField(pageSizeFieldSettings)); 9651 9652 9653 #line default 9654 #line hidden 9655 WriteLiteralTo(__razor_helper_writer, "\r\n </form>\r\n </div>\r\n"); 9656 9657 9658 #line 3372 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9659 9660 9661 #line default 9662 #line hidden 9663 }); 9664 9665 #line 3372 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9666 } 9667 #line default 9668 #line hidden 9669 9670 9671 #line 3374 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9672 public RazorEngine.Templating.TemplateWriter RenderPageSummaryCustom(int totalItemCount, string cssClass = "col-sm-2 col-xs-12 noPaddingLeft") 9673 { 9674 #line default 9675 #line hidden 9676 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 9677 9678 #line 3375 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9679 9680 9681 9682 #line default 9683 #line hidden 9684 WriteLiteralTo(__razor_helper_writer, " <span"); 9685 9686 WriteAttributeTo(__razor_helper_writer, "class", Tuple.Create(" class=\"", 145458), Tuple.Create("\"", 145475) 9687 9688 #line 3376 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9689 , Tuple.Create(Tuple.Create("", 145466), Tuple.Create<System.Object, System.Int32>(cssClass 9690 9691 #line default 9692 #line hidden 9693 , 145466), false) 9694 ); 9695 9696 WriteLiteralTo(__razor_helper_writer, "> "); 9697 9698 9699 #line 3376 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9700 WriteTo(__razor_helper_writer, totalItemCount); 9701 9702 9703 #line default 9704 #line hidden 9705 WriteLiteralTo(__razor_helper_writer, " "); 9706 9707 9708 #line 3376 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9709 WriteTo(__razor_helper_writer, Translate(totalItemCount > 1 ? "products" : "product")); 9710 9711 9712 #line default 9713 #line hidden 9714 WriteLiteralTo(__razor_helper_writer, " "); 9715 9716 9717 #line 3376 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9718 WriteTo(__razor_helper_writer, Translate("found")); 9719 9720 9721 #line default 9722 #line hidden 9723 WriteLiteralTo(__razor_helper_writer, "</span>\r\n"); 9724 9725 9726 #line 3377 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9727 9728 9729 #line default 9730 #line hidden 9731 }); 9732 9733 #line 3377 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9734 } 9735 #line default 9736 #line hidden 9737 9738 9739 #line 3379 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9740 public RazorEngine.Templating.TemplateWriter RenderDepartmentsAndCategories(LoopItem loopItem) 9741 { 9742 #line default 9743 #line hidden 9744 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 9745 9746 #line 3380 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9747 9748 var topGroups = Services.ProductGroups.GetToplevelGroups(Pageview.Area.EcomLanguageId).Where(g => g.NavigationShowInSiteMap).ToList(); 9749 var resultSetGroupIds = loopItem.GetLoop("FacetOptions").Select(g => g.GetString("FacetOption.Value")).ToArray(); 9750 var groups = topGroups.Where(g => resultSetGroupIds.Contains(g.Id)).ToList(); 9751 9752 if (groups.Any()) 9753 { 9754 9755 9756 #line default 9757 #line hidden 9758 WriteLiteralTo(__razor_helper_writer, " <div"); 9759 9760 WriteLiteralTo(__razor_helper_writer, " class=\"headerBox filtersHead col-xs-12\""); 9761 9762 WriteLiteralTo(__razor_helper_writer, ">\r\n <span>"); 9763 9764 9765 #line 3388 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9766 WriteTo(__razor_helper_writer, Translate("Categories")); 9767 9768 9769 #line default 9770 #line hidden 9771 WriteLiteralTo(__razor_helper_writer, "</span>\r\n </div>\r\n"); 9772 9773 WriteLiteralTo(__razor_helper_writer, " <ul"); 9774 9775 WriteLiteralTo(__razor_helper_writer, " class=\"catalogCategories col-xs-12\""); 9776 9777 WriteLiteralTo(__razor_helper_writer, ">\r\n\r\n"); 9778 9779 9780 #line 3392 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9781 9782 9783 #line default 9784 #line hidden 9785 9786 #line 3392 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9787 foreach (var group in groups.Where(g => resultSetGroupIds.Contains(g.Id))) 9788 { 9789 9790 9791 #line default 9792 #line hidden 9793 WriteLiteralTo(__razor_helper_writer, " <li"); 9794 9795 WriteLiteralTo(__razor_helper_writer, " data-groupid=\""); 9796 9797 9798 #line 3394 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9799 WriteTo(__razor_helper_writer, group.Id); 9800 9801 9802 #line default 9803 #line hidden 9804 WriteLiteralTo(__razor_helper_writer, "\""); 9805 9806 WriteLiteralTo(__razor_helper_writer, " data-toggle=\"collapse\""); 9807 9808 WriteLiteralTo(__razor_helper_writer, " class=\"collapsed\""); 9809 9810 WriteLiteralTo(__razor_helper_writer, " data-target=\""); 9811 9812 9813 #line 3394 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9814 WriteTo(__razor_helper_writer, string.Concat("#collapse",group.Id)); 9815 9816 9817 #line default 9818 #line hidden 9819 WriteLiteralTo(__razor_helper_writer, "\""); 9820 9821 WriteLiteralTo(__razor_helper_writer, " aria-expanded=\"false\""); 9822 9823 WriteAttributeTo(__razor_helper_writer, "aria-controls", Tuple.Create(" aria-controls=\"", 146539), Tuple.Create("\"", 146590) 9824 9825 #line 3394 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9826 , Tuple.Create(Tuple.Create("", 146555), Tuple.Create<System.Object, System.Int32>(string.Concat("collapse",group.Id) 9827 9828 #line default 9829 #line hidden 9830 , 146555), false) 9831 ); 9832 9833 WriteLiteralTo(__razor_helper_writer, ">\r\n <a"); 9834 9835 WriteLiteralTo(__razor_helper_writer, " href=\"javascript:void(0);\""); 9836 9837 WriteLiteralTo(__razor_helper_writer, ">"); 9838 9839 9840 #line 3395 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9841 WriteTo(__razor_helper_writer, group.Name); 9842 9843 9844 #line default 9845 #line hidden 9846 WriteLiteralTo(__razor_helper_writer, "</a>\r\n \r\n"); 9847 9848 9849 #line 3397 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9850 9851 9852 #line default 9853 #line hidden 9854 9855 #line 3397 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9856 9857 var subgroups = group.Subgroups.Where(g => g.NavigationShowInSiteMap && resultSetGroupIds.Contains(g.Id)).ToList(); 9858 if (subgroups.Any()) 9859 { 9860 9861 9862 #line default 9863 #line hidden 9864 WriteLiteralTo(__razor_helper_writer, " <ul"); 9865 9866 WriteLiteralTo(__razor_helper_writer, " class=\"catalogSubCategories collapse\""); 9867 9868 WriteAttributeTo(__razor_helper_writer, "id", Tuple.Create(" id=\"", 147018), Tuple.Create("\"", 147059) 9869 9870 #line 3401 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9871 , Tuple.Create(Tuple.Create("", 147023), Tuple.Create<System.Object, System.Int32>(string.Concat("collapse", group.Id) 9872 9873 #line default 9874 #line hidden 9875 , 147023), false) 9876 ); 9877 9878 WriteLiteralTo(__razor_helper_writer, " aria-expanded=\"false\""); 9879 9880 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 9881 9882 9883 #line 3402 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9884 9885 9886 #line default 9887 #line hidden 9888 9889 #line 3402 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9890 foreach (var subgroup in subgroups) 9891 { 9892 9893 9894 #line default 9895 #line hidden 9896 WriteLiteralTo(__razor_helper_writer, " <li"); 9897 9898 WriteLiteralTo(__razor_helper_writer, " data-groupid=\""); 9899 9900 9901 #line 3404 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9902 WriteTo(__razor_helper_writer, subgroup.Id); 9903 9904 9905 #line default 9906 #line hidden 9907 WriteLiteralTo(__razor_helper_writer, "\""); 9908 9909 WriteLiteralTo(__razor_helper_writer, " data-toggle=\"collapse\""); 9910 9911 WriteLiteralTo(__razor_helper_writer, " class=\"collapsed\""); 9912 9913 WriteLiteralTo(__razor_helper_writer, " data-target=\""); 9914 9915 9916 #line 3404 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9917 WriteTo(__razor_helper_writer, string.Concat("#collapse", subgroup.Id)); 9918 9919 9920 #line default 9921 #line hidden 9922 WriteLiteralTo(__razor_helper_writer, "\""); 9923 9924 WriteLiteralTo(__razor_helper_writer, " aria-expanded=\"false\""); 9925 9926 WriteAttributeTo(__razor_helper_writer, "aria-controls", Tuple.Create(" aria-controls=\"", 147390), Tuple.Create("\"", 147445) 9927 9928 #line 3404 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9929 , Tuple.Create(Tuple.Create("", 147406), Tuple.Create<System.Object, System.Int32>(string.Concat("collapse", subgroup.Id) 9930 9931 #line default 9932 #line hidden 9933 , 147406), false) 9934 ); 9935 9936 WriteLiteralTo(__razor_helper_writer, ">\r\n <a"); 9937 9938 WriteLiteralTo(__razor_helper_writer, " href=\"javascript:void(0);\""); 9939 9940 WriteLiteralTo(__razor_helper_writer, ">"); 9941 9942 9943 #line 3405 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9944 WriteTo(__razor_helper_writer, subgroup.Name); 9945 9946 9947 #line default 9948 #line hidden 9949 WriteLiteralTo(__razor_helper_writer, "</a>\r\n </li>\r\n"); 9950 9951 9952 #line 3407 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9953 } 9954 9955 #line default 9956 #line hidden 9957 WriteLiteralTo(__razor_helper_writer, "\r\n </ul>\r\n"); 9958 9959 9960 #line 3409 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9961 } 9962 9963 9964 #line default 9965 #line hidden 9966 WriteLiteralTo(__razor_helper_writer, "\r\n </li>\r\n"); 9967 9968 9969 #line 3412 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9970 } 9971 9972 #line default 9973 #line hidden 9974 WriteLiteralTo(__razor_helper_writer, "\r\n </ul>\r\n"); 9975 9976 9977 #line 3414 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9978 } 9979 9980 9981 #line default 9982 #line hidden 9983 }); 9984 9985 #line 3415 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9986 } 9987 #line default 9988 #line hidden 9989 9990 9991 #line 3417 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9992 public RazorEngine.Templating.TemplateWriter RenderSpellSuggest() 9993 { 9994 #line default 9995 #line hidden 9996 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 9997 9998 #line 3418 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 9999 10000 if (GetString("DwSpellSuggest").IsNotNullOrEmpty()) 10001 { 10002 10003 10004 #line default 10005 #line hidden 10006 WriteLiteralTo(__razor_helper_writer, " <div"); 10007 10008 WriteLiteralTo(__razor_helper_writer, " class=\"col-xs-12\""); 10009 10010 WriteLiteralTo(__razor_helper_writer, ">"); 10011 10012 10013 #line 3421 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10014 WriteTo(__razor_helper_writer, Translate("Did you mean: ")); 10015 10016 10017 #line default 10018 #line hidden 10019 WriteLiteralTo(__razor_helper_writer, " <a"); 10020 10021 WriteLiteralTo(__razor_helper_writer, " class=\"wrapSpellSuggest\""); 10022 10023 WriteLiteralTo(__razor_helper_writer, ">"); 10024 10025 10026 #line 3421 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10027 WriteTo(__razor_helper_writer, GetString("DwSpellSuggest.Html")); 10028 10029 10030 #line default 10031 #line hidden 10032 WriteLiteralTo(__razor_helper_writer, "</a></div>\r\n"); 10033 10034 10035 #line 3422 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10036 } 10037 10038 10039 #line default 10040 #line hidden 10041 }); 10042 10043 #line 3423 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10044 } 10045 #line default 10046 #line hidden 10047 10048 10049 #line 3425 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10050 public RazorEngine.Templating.TemplateWriter RenderRefineSearch() 10051 { 10052 #line default 10053 #line hidden 10054 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 10055 10056 #line 3426 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10057 10058 10059 10060 #line default 10061 #line hidden 10062 WriteLiteralTo(__razor_helper_writer, " <div"); 10063 10064 WriteLiteralTo(__razor_helper_writer, " class=\"headerBox filtersHead\""); 10065 10066 WriteLiteralTo(__razor_helper_writer, ">"); 10067 10068 10069 #line 3427 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10070 WriteTo(__razor_helper_writer, Translate("Smart Filters")); 10071 10072 10073 #line default 10074 #line hidden 10075 WriteLiteralTo(__razor_helper_writer, "</div>\r\n"); 10076 10077 WriteLiteralTo(__razor_helper_writer, " <form"); 10078 10079 WriteLiteralTo(__razor_helper_writer, " class=\"fake\""); 10080 10081 WriteLiteralTo(__razor_helper_writer, ">\r\n \r\n"); 10082 10083 WriteLiteralTo(__razor_helper_writer, " "); 10084 10085 10086 #line 3430 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10087 WriteTo(__razor_helper_writer, RenderField(new FieldSettings 10088 { 10089 Type = FieldType.Checkbox, 10090 IncludeWrapper = true, 10091 IsChecked = Convert.ToBoolean(Sanitize.Parameter("PreviouslyBoughtProducts")), 10092 SystemName = "PreviouslyBoughtProducts_base", 10093 Label = Translate("Only show previously bought products") 10094 })); 10095 10096 10097 #line default 10098 #line hidden 10099 WriteLiteralTo(__razor_helper_writer, "\r\n </form>\r\n"); 10100 10101 10102 #line 3439 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10103 // Previously Bought Products 10104 //Proprietary Products 10105 10106 10107 #line default 10108 #line hidden 10109 }); 10110 10111 #line 3441 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10112 } 10113 #line default 10114 #line hidden 10115 10116 10117 #line 3443 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10118 public RazorEngine.Templating.TemplateWriter RenderFiltersCustom(List<LoopItem> facetGroups, List<LoopItem> groups) 10119 { 10120 #line default 10121 #line hidden 10122 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 10123 10124 #line 3444 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10125 10126 var parametersList = GetLoop("Query.Parameters"); 10127 var categoriesFacetGroups = facetGroups.Where(fgs => fgs.GetString("FacetGroup.Name").Equals("Departments and Categories")).ToList(); 10128 var allFiltersFacetGroups = facetGroups.Where(fgs => !fgs.GetString("FacetGroup.Name").Equals("Departments and Categories")).ToList(); 10129 10130 10131 10132 #line default 10133 #line hidden 10134 WriteLiteralTo(__razor_helper_writer, " <div"); 10135 10136 WriteLiteralTo(__razor_helper_writer, " id=\"filtersContainer\""); 10137 10138 WriteLiteralTo(__razor_helper_writer, " class=\"col-xs-12 col-md-3 noPaddingLeft\""); 10139 10140 WriteLiteralTo(__razor_helper_writer, ">\r\n \r\n"); 10141 10142 10143 #line 3451 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10144 10145 10146 #line default 10147 #line hidden 10148 10149 #line 3451 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10150 if ((Sanitize.Parameter("q", ParameterType.LongText).IsNotNullOrEmpty() || Pageview.Page.NavigationTag == "CompanyCatalog") && facetGroups.Any()) 10151 { 10152 foreach (var facetGroup in categoriesFacetGroups) 10153 { 10154 foreach (var facet in facetGroup.GetLoop("Facets").Where(fo => fo.GetInteger("Facet.OptionWithResultCount") > 0 && fo.GetString("Facet.Field").Equals("ParentGroupIDs"))) 10155 { 10156 10157 10158 #line default 10159 #line hidden 10160 10161 #line 3457 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10162 WriteTo(__razor_helper_writer, RenderDepartmentsAndCategories(facet)); 10163 10164 10165 #line default 10166 #line hidden 10167 10168 #line 3457 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10169 10170 } 10171 } 10172 10173 10174 #line default 10175 #line hidden 10176 WriteLiteralTo(__razor_helper_writer, " <div"); 10177 10178 WriteLiteralTo(__razor_helper_writer, " class=\"white row\""); 10179 10180 WriteLiteralTo(__razor_helper_writer, "></div>\r\n"); 10181 10182 10183 #line 3461 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10184 } 10185 10186 #line default 10187 #line hidden 10188 WriteLiteralTo(__razor_helper_writer, "\r\n <div"); 10189 10190 WriteLiteralTo(__razor_helper_writer, " class=\"headerBox filtersHead col-xs-12\""); 10191 10192 WriteLiteralTo(__razor_helper_writer, " id=\"expandSearchWrapper\""); 10193 10194 WriteLiteralTo(__razor_helper_writer, ">\r\n <span>"); 10195 10196 10197 #line 3463 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10198 WriteTo(__razor_helper_writer, Translate("Refine Search")); 10199 10200 10201 #line default 10202 #line hidden 10203 WriteLiteralTo(__razor_helper_writer, "</span>\r\n <a"); 10204 10205 WriteLiteralTo(__razor_helper_writer, " id=\"expandSearch\""); 10206 10207 WriteLiteralTo(__razor_helper_writer, " class=\"pull-right collapsed\""); 10208 10209 WriteLiteralTo(__razor_helper_writer, " aria-expanded=\"false\""); 10210 10211 WriteLiteralTo(__razor_helper_writer, " data-toggle=\"collapse\""); 10212 10213 WriteLiteralTo(__razor_helper_writer, " data-translate=\'"); 10214 10215 10216 #line 3464 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10217 WriteTo(__razor_helper_writer, Translate("Collapse")); 10218 10219 10220 #line default 10221 #line hidden 10222 WriteLiteralTo(__razor_helper_writer, "\'"); 10223 10224 WriteLiteralTo(__razor_helper_writer, " data-target=\"#searchWrapper\""); 10225 10226 WriteLiteralTo(__razor_helper_writer, " onclick=\"toggleExpandButton()\""); 10227 10228 WriteLiteralTo(__razor_helper_writer, " href=\"javascript:void(0)\""); 10229 10230 WriteLiteralTo(__razor_helper_writer, ">"); 10231 10232 10233 #line 3464 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10234 WriteTo(__razor_helper_writer, RenderIcon("fa-caret-down", Translate("expand"), IconPosition.Right)); 10235 10236 10237 #line default 10238 #line hidden 10239 WriteLiteralTo(__razor_helper_writer, "</a>\r\n </div>\r\n <div"); 10240 10241 WriteLiteralTo(__razor_helper_writer, " id=\"searchWrapper\""); 10242 10243 WriteLiteralTo(__razor_helper_writer, " class=\"searchWrapper-collapse collapse\""); 10244 10245 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 10246 10247 10248 #line 3467 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10249 10250 10251 #line default 10252 #line hidden 10253 10254 #line 3467 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10255 if (Pageview.Page.NavigationTag == "CompanyCatalog") 10256 { 10257 10258 10259 #line default 10260 #line hidden 10261 10262 #line 3469 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10263 WriteTo(__razor_helper_writer, RenderRefineSearch()); 10264 10265 10266 #line default 10267 #line hidden 10268 10269 #line 3469 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10270 10271 } 10272 10273 #line default 10274 #line hidden 10275 WriteLiteralTo(__razor_helper_writer, "\r\n"); 10276 10277 10278 #line 3471 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10279 10280 10281 #line default 10282 #line hidden 10283 10284 #line 3471 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10285 if (allFiltersFacetGroups.Any()) 10286 { 10287 10288 10289 #line default 10290 #line hidden 10291 WriteLiteralTo(__razor_helper_writer, " <div"); 10292 10293 WriteLiteralTo(__razor_helper_writer, " class=\"headerBox filtersHead col-xs-12\""); 10294 10295 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 10296 10297 WriteLiteralTo(__razor_helper_writer, " "); 10298 10299 10300 #line 3474 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10301 WriteTo(__razor_helper_writer, Translate("Filter your results")); 10302 10303 10304 #line default 10305 #line hidden 10306 WriteLiteralTo(__razor_helper_writer, "\r\n </div>\r\n"); 10307 10308 WriteLiteralTo(__razor_helper_writer, " <form"); 10309 10310 WriteLiteralTo(__razor_helper_writer, " id=\"filtersForm\""); 10311 10312 WriteLiteralTo(__razor_helper_writer, " class=\"col-xs-12\""); 10313 10314 WriteLiteralTo(__razor_helper_writer, " action=\"/Default.aspx#productListHeader\""); 10315 10316 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 10317 10318 WriteLiteralTo(__razor_helper_writer, " "); 10319 10320 10321 #line 3477 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10322 WriteTo(__razor_helper_writer, RenderField(FieldSettings.CreateHiddenField("id", Pageview.Page.ID.ToString()))); 10323 10324 10325 #line default 10326 #line hidden 10327 WriteLiteralTo(__razor_helper_writer, "\r\n"); 10328 10329 WriteLiteralTo(__razor_helper_writer, " "); 10330 10331 10332 #line 3478 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10333 WriteTo(__razor_helper_writer, RenderField(FieldSettings.CreateHiddenField("ParentGroupID", Sanitize.Parameter("ParentGroupID")))); 10334 10335 10336 #line default 10337 #line hidden 10338 WriteLiteralTo(__razor_helper_writer, "\r\n"); 10339 10340 WriteLiteralTo(__razor_helper_writer, " "); 10341 10342 10343 #line 3479 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10344 WriteTo(__razor_helper_writer, RenderField(FieldSettings.CreateHiddenField("GroupID", Sanitize.Parameter("GroupID")))); 10345 10346 10347 #line default 10348 #line hidden 10349 WriteLiteralTo(__razor_helper_writer, "\r\n"); 10350 10351 WriteLiteralTo(__razor_helper_writer, " "); 10352 10353 10354 #line 3480 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10355 WriteTo(__razor_helper_writer, RenderField(FieldSettings.CreateHiddenField("sortby", Sanitize.Parameter("sortby")))); 10356 10357 10358 #line default 10359 #line hidden 10360 WriteLiteralTo(__razor_helper_writer, "\r\n"); 10361 10362 WriteLiteralTo(__razor_helper_writer, " "); 10363 10364 10365 #line 3481 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10366 WriteTo(__razor_helper_writer, RenderField(FieldSettings.CreateHiddenField("SortOrder", Sanitize.Parameter("SortOrder")))); 10367 10368 10369 #line default 10370 #line hidden 10371 WriteLiteralTo(__razor_helper_writer, "\r\n"); 10372 10373 WriteLiteralTo(__razor_helper_writer, " "); 10374 10375 10376 #line 3482 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10377 WriteTo(__razor_helper_writer, RenderField(FieldSettings.CreateHiddenField("PageSize", Sanitize.Parameter("PageSize", ParameterType.Number)))); 10378 10379 10380 #line default 10381 #line hidden 10382 WriteLiteralTo(__razor_helper_writer, "\r\n"); 10383 10384 WriteLiteralTo(__razor_helper_writer, " "); 10385 10386 10387 #line 3483 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10388 WriteTo(__razor_helper_writer, RenderField(FieldSettings.CreateHiddenField("q", Sanitize.Parameter("q", ParameterType.LongText)))); 10389 10390 10391 #line default 10392 #line hidden 10393 WriteLiteralTo(__razor_helper_writer, "\r\n"); 10394 10395 WriteLiteralTo(__razor_helper_writer, " "); 10396 10397 10398 #line 3484 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10399 WriteTo(__razor_helper_writer, RenderField(new FieldSettings {Type = FieldType.Hidden, SystemName = "ProprietaryCodes", Value = "123", Attributes = new Dictionary<string, string> {{"disabled", "disabled"}}})); 10400 10401 10402 #line default 10403 #line hidden 10404 WriteLiteralTo(__razor_helper_writer, "\r\n"); 10405 10406 WriteLiteralTo(__razor_helper_writer, " "); 10407 10408 10409 #line 3485 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10410 WriteTo(__razor_helper_writer, RenderField(new FieldSettings {Type = FieldType.Hidden, SystemName = "PreviouslyOrderedIds", Value = "123", Attributes = new Dictionary<string, string> {{"disabled", "disabled"}}})); 10411 10412 10413 #line default 10414 #line hidden 10415 WriteLiteralTo(__razor_helper_writer, "\r\n"); 10416 10417 WriteLiteralTo(__razor_helper_writer, " "); 10418 10419 10420 #line 3486 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10421 WriteTo(__razor_helper_writer, RenderField(FieldSettings.CreateHiddenField("PreviouslyBoughtProducts", Sanitize.Parameter("PreviouslyBoughtProducts", ParameterType.Boolean)))); 10422 10423 10424 #line default 10425 #line hidden 10426 WriteLiteralTo(__razor_helper_writer, "\r\n"); 10427 10428 WriteLiteralTo(__razor_helper_writer, " "); 10429 10430 10431 #line 3487 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10432 WriteTo(__razor_helper_writer, RenderField(FieldSettings.CreateHiddenField("ProprietaryProducts", Sanitize.Parameter("ProprietaryProducts", ParameterType.Boolean)))); 10433 10434 10435 #line default 10436 #line hidden 10437 WriteLiteralTo(__razor_helper_writer, "\r\n\r\n"); 10438 10439 10440 #line 3489 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10441 10442 10443 #line default 10444 #line hidden 10445 10446 #line 3489 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10447 foreach (var facetGroup in allFiltersFacetGroups) 10448 { 10449 foreach (var facet in facetGroup.GetLoop("Facets").Where(fo => fo.GetInteger("Facet.OptionWithResultCount") > 0)) 10450 { 10451 var parameterType = parametersList.FirstOrDefault(x => x.GetString("Parameter.Name") == facet.GetString("Facet.QueryParameter")); 10452 var templateOutput = facet.GetString("Facet.RenderType").IsNotNullOrEmpty() ? facet.GetString("Facet.RenderType") : "Text"; 10453 if (parameterType == null) 10454 { 10455 continue; 10456 } 10457 10458 10459 #line default 10460 #line hidden 10461 10462 #line 3499 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10463 WriteTo(__razor_helper_writer, InternalRenderFacetField(facet, parameterType.GetString("Parameter.Type"), templateOutput)); 10464 10465 10466 #line default 10467 #line hidden 10468 10469 #line 3499 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10470 10471 } 10472 } 10473 10474 #line default 10475 #line hidden 10476 WriteLiteralTo(__razor_helper_writer, "\r\n </form>\r\n"); 10477 10478 10479 #line 3503 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10480 } 10481 10482 #line default 10483 #line hidden 10484 WriteLiteralTo(__razor_helper_writer, "\r\n </div>\r\n </div>\r\n"); 10485 10486 10487 #line 3506 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10488 10489 10490 #line default 10491 #line hidden 10492 }); 10493 10494 #line 3506 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10495 } 10496 #line default 10497 #line hidden 10498 10499 10500 #line 3508 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10501 public RazorEngine.Templating.TemplateWriter RenderFirstLevelGroups(List<LoopItem> groups, object listMatchingGroups = null, string title = "", int min = 0, int max = 999) 10502 { 10503 #line default 10504 #line hidden 10505 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 10506 10507 #line 3509 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10508 10509 if (groups != null && groups.Any()) 10510 { 10511 if (title.IsNotNullOrEmpty()) 10512 { 10513 10514 10515 #line default 10516 #line hidden 10517 WriteLiteralTo(__razor_helper_writer, " <h2>"); 10518 10519 10520 #line 3514 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10521 WriteTo(__razor_helper_writer, title); 10522 10523 10524 #line default 10525 #line hidden 10526 WriteLiteralTo(__razor_helper_writer, "</h2>\r\n"); 10527 10528 10529 #line 3515 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10530 } 10531 10532 10533 #line default 10534 #line hidden 10535 WriteLiteralTo(__razor_helper_writer, " <ul"); 10536 10537 WriteLiteralTo(__razor_helper_writer, " class=\"row groupListView\""); 10538 10539 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 10540 10541 10542 #line 3517 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10543 10544 10545 #line default 10546 #line hidden 10547 10548 #line 3517 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10549 foreach (var group in groups.Where(g => g.GetBoolean("Ecom:Group.ShowInSiteMap")).Take(max)) 10550 { 10551 var imageSource = GetGroupImage(group.GetString("Ecom:Group.SmallImage"), group.GetString("Ecom:Group.ID")); 10552 var groupDescription = group.GetString("Ecom:Group.Description"); 10553 var imageSettings = new ImageSettings 10554 { 10555 IncludeWrapper = true, 10556 WrapperCssClass = "col-xs-6 col-sm-3 noPaddingLeft", 10557 Source = Images.GetImage(imageSource, 320, 320), 10558 AltText = group.GetString("Ecom:Group.Name") 10559 }; 10560 10561 10562 #line default 10563 #line hidden 10564 WriteLiteralTo(__razor_helper_writer, " <li"); 10565 10566 WriteLiteralTo(__razor_helper_writer, " class=\"col-xs-12 col-sm-6\""); 10567 10568 WriteLiteralTo(__razor_helper_writer, ">\r\n <a"); 10569 10570 WriteLiteralTo(__razor_helper_writer, " class=\"col-xs-12 frame\""); 10571 10572 WriteAttributeTo(__razor_helper_writer, "href", Tuple.Create(" href=\"", 154783), Tuple.Create("\"", 154831) 10573 10574 #line 3529 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10575 , Tuple.Create(Tuple.Create("", 154790), Tuple.Create<System.Object, System.Int32>(group.GetString("Ecom:Group.Link.Clean") 10576 10577 #line default 10578 #line hidden 10579 , 154790), false) 10580 ); 10581 10582 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 10583 10584 WriteLiteralTo(__razor_helper_writer, " "); 10585 10586 10587 #line 3530 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10588 WriteTo(__razor_helper_writer, RenderImage(imageSettings)); 10589 10590 10591 #line default 10592 #line hidden 10593 WriteLiteralTo(__razor_helper_writer, "\r\n"); 10594 10595 10596 #line 3531 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10597 10598 10599 #line default 10600 #line hidden 10601 10602 #line 3531 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10603 if (groupDescription.IsNotNullOrEmpty()) 10604 { 10605 10606 10607 #line default 10608 #line hidden 10609 WriteLiteralTo(__razor_helper_writer, " <div"); 10610 10611 WriteLiteralTo(__razor_helper_writer, " class=\"col-xs-8 noPaddingLeft\""); 10612 10613 WriteLiteralTo(__razor_helper_writer, ">\r\n <h3>"); 10614 10615 10616 #line 3534 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10617 WriteTo(__razor_helper_writer, group.GetString("Ecom:Group.Name")); 10618 10619 10620 #line default 10621 #line hidden 10622 WriteLiteralTo(__razor_helper_writer, "</h3>\r\n <p>"); 10623 10624 10625 #line 3535 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10626 WriteTo(__razor_helper_writer, groupDescription); 10627 10628 10629 #line default 10630 #line hidden 10631 WriteLiteralTo(__razor_helper_writer, "</p>\r\n </div>\r\n"); 10632 10633 10634 #line 3537 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10635 } 10636 10637 #line default 10638 #line hidden 10639 WriteLiteralTo(__razor_helper_writer, "\r\n </a>\r\n </li>\r\n"); 10640 10641 10642 #line 3540 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10643 } 10644 10645 #line default 10646 #line hidden 10647 WriteLiteralTo(__razor_helper_writer, "\r\n \r\n </ul>\r\n"); 10648 10649 10650 #line 3543 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10651 } 10652 10653 10654 #line default 10655 #line hidden 10656 }); 10657 10658 #line 3544 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10659 } 10660 #line default 10661 #line hidden 10662 10663 10664 #line 3546 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10665 public RazorEngine.Templating.TemplateWriter RenderSecondLevelGroups(List<LoopItem> groups) 10666 { 10667 #line default 10668 #line hidden 10669 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 10670 10671 #line 3547 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10672 10673 if (groups != null && groups.Any()) 10674 { 10675 var buttonSettings = new BootstrapButtonSettings 10676 { 10677 Label = Translate("List"), 10678 CssClass = "btnToggleView", 10679 ButtonType = BootstrapButtonSettings.BootstrapButtonType.Button, 10680 }; 10681 buttonSettings.Attributes.Add("data-list", "list"); 10682 10683 10684 10685 #line default 10686 #line hidden 10687 WriteLiteralTo(__razor_helper_writer, " <h1>"); 10688 10689 10690 #line 3558 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10691 WriteTo(__razor_helper_writer, GetString("Ecom:Group.Name")); 10692 10693 10694 #line default 10695 #line hidden 10696 WriteLiteralTo(__razor_helper_writer, "</h1>\r\n"); 10697 10698 WriteLiteralTo(__razor_helper_writer, " <div"); 10699 10700 WriteLiteralTo(__razor_helper_writer, " class=\"col-xs-12\""); 10701 10702 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 10703 10704 WriteLiteralTo(__razor_helper_writer, " "); 10705 10706 10707 #line 3560 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10708 WriteTo(__razor_helper_writer, GetString("Ecom:Group.Description")); 10709 10710 10711 #line default 10712 #line hidden 10713 WriteLiteralTo(__razor_helper_writer, "\r\n </div>\r\n"); 10714 10715 10716 #line 3562 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10717 10718 10719 #line default 10720 #line hidden 10721 10722 #line 3562 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10723 WriteTo(__razor_helper_writer, RenderEcomGroupImageLarge()); 10724 10725 10726 #line default 10727 #line hidden 10728 10729 #line 3562 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10730 ; 10731 10732 10733 #line default 10734 #line hidden 10735 WriteLiteralTo(__razor_helper_writer, " <div"); 10736 10737 WriteLiteralTo(__razor_helper_writer, " class=\"mdAlignRight clear btnViewContainer\""); 10738 10739 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 10740 10741 WriteLiteralTo(__razor_helper_writer, " "); 10742 10743 10744 #line 3564 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10745 WriteTo(__razor_helper_writer, RenderBootstrapButton(buttonSettings)); 10746 10747 10748 #line default 10749 #line hidden 10750 WriteLiteralTo(__razor_helper_writer, "\r\n"); 10751 10752 10753 #line 3565 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10754 10755 10756 #line default 10757 #line hidden 10758 10759 #line 3565 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10760 10761 buttonSettings.Label = Translate("Grid"); 10762 buttonSettings.CssClass += " active"; 10763 buttonSettings.Attributes["data-list"] = "grid"; 10764 10765 10766 #line default 10767 #line hidden 10768 WriteLiteralTo(__razor_helper_writer, "\r\n"); 10769 10770 WriteLiteralTo(__razor_helper_writer, " "); 10771 10772 10773 #line 3570 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10774 WriteTo(__razor_helper_writer, RenderBootstrapButton(buttonSettings)); 10775 10776 10777 #line default 10778 #line hidden 10779 WriteLiteralTo(__razor_helper_writer, "\r\n </div>\r\n"); 10780 10781 WriteLiteralTo(__razor_helper_writer, " <ul"); 10782 10783 WriteLiteralTo(__razor_helper_writer, " class=\"row categoryView\""); 10784 10785 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 10786 10787 10788 #line 3573 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10789 10790 10791 #line default 10792 #line hidden 10793 10794 #line 3573 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10795 foreach (var subGroup in groups.Where(sg => sg.GetBoolean("Ecom:Group.ShowInSiteMap"))) 10796 { 10797 var imageSource = GetGroupImage(subGroup.GetString("Ecom:Group.SmallImage"), subGroup.GetString("Ecom:Group.ID")); 10798 10799 10800 #line default 10801 #line hidden 10802 WriteLiteralTo(__razor_helper_writer, " <li"); 10803 10804 WriteLiteralTo(__razor_helper_writer, " class=\"col-xs-12 col-sm-3\""); 10805 10806 WriteLiteralTo(__razor_helper_writer, ">\r\n <a"); 10807 10808 WriteLiteralTo(__razor_helper_writer, " class=\"frame\""); 10809 10810 WriteAttributeTo(__razor_helper_writer, "href", Tuple.Create(" href=\"", 156882), Tuple.Create("\"", 156933) 10811 10812 #line 3577 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10813 , Tuple.Create(Tuple.Create("", 156889), Tuple.Create<System.Object, System.Int32>(subGroup.GetString("Ecom:Group.Link.Clean") 10814 10815 #line default 10816 #line hidden 10817 , 156889), false) 10818 ); 10819 10820 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 10821 10822 10823 #line 3578 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10824 10825 10826 #line default 10827 #line hidden 10828 10829 #line 3578 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10830 10831 var imageSettings = new ImageSettings 10832 { 10833 IncludeWrapper = true, 10834 Source = Images.GetImage(imageSource, 320, 320), 10835 AltText = subGroup.GetString("Ecom:Group.Name"), 10836 }; 10837 10838 10839 #line default 10840 #line hidden 10841 10842 #line 3585 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10843 WriteTo(__razor_helper_writer, RenderImage(imageSettings)); 10844 10845 10846 #line default 10847 #line hidden 10848 10849 #line 3585 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10850 10851 10852 10853 #line default 10854 #line hidden 10855 WriteLiteralTo(__razor_helper_writer, "\r\n <h3>\r\n"); 10856 10857 WriteLiteralTo(__razor_helper_writer, " "); 10858 10859 10860 #line 3588 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10861 WriteTo(__razor_helper_writer, subGroup.GetString("Ecom:Group.Name")); 10862 10863 10864 #line default 10865 #line hidden 10866 WriteLiteralTo(__razor_helper_writer, "\r\n </h3>\r\n </a>\r\n " + 10867 " </li>\r\n"); 10868 10869 10870 #line 3592 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10871 } 10872 10873 #line default 10874 #line hidden 10875 WriteLiteralTo(__razor_helper_writer, "\r\n </ul>\r\n"); 10876 10877 10878 #line 3594 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10879 } 10880 10881 10882 #line default 10883 #line hidden 10884 }); 10885 10886 #line 3595 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10887 } 10888 #line default 10889 #line hidden 10890 10891 10892 #line 3597 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10893 public RazorEngine.Templating.TemplateWriter RenderEcomGroupImageLarge() 10894 { 10895 #line default 10896 #line hidden 10897 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 10898 10899 #line 3598 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10900 10901 var imgSource = GetString("Ecom:Group.LargeImage"); 10902 if (imgSource.IsNotNullOrEmpty()) 10903 { 10904 10905 10906 #line default 10907 #line hidden 10908 10909 #line 3602 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10910 WriteTo(__razor_helper_writer, RenderImage(new ImageSettings {IncludeWrapper = true, WrapperCssClass = "col-xs-12 noPadding centerText large-image-group", Href = "", Source = Images.GetImage(new ImageProcessorSettings {Width = 1200, ImageUrl = imgSource}), AltText = GetString("Ecom:Group.Name")})); 10911 10912 10913 #line default 10914 #line hidden 10915 10916 #line 3602 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10917 10918 } 10919 10920 10921 #line default 10922 #line hidden 10923 }); 10924 10925 #line 3604 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10926 } 10927 #line default 10928 #line hidden 10929 10930 10931 #line 3606 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10932 public RazorEngine.Templating.TemplateWriter RenderSecondLevelGroupsFacets(List<LoopItem> groups) 10933 { 10934 #line default 10935 #line hidden 10936 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 10937 10938 #line 3607 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10939 10940 if (groups != null && groups.Any()) 10941 { 10942 10943 10944 #line default 10945 #line hidden 10946 WriteLiteralTo(__razor_helper_writer, " <div>\r\n <h3>"); 10947 10948 10949 #line 3611 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10950 WriteTo(__razor_helper_writer, GetString("Ecom:Group.Name")); 10951 10952 10953 #line default 10954 #line hidden 10955 WriteLiteralTo(__razor_helper_writer, "</h3>\r\n </div>\r\n"); 10956 10957 WriteLiteralTo(__razor_helper_writer, " <ul"); 10958 10959 WriteLiteralTo(__razor_helper_writer, " class=\"row\""); 10960 10961 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 10962 10963 10964 #line 3614 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10965 10966 10967 #line default 10968 #line hidden 10969 10970 #line 3614 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10971 foreach (var subGroup in groups.Where(sg => sg.GetBoolean("Ecom:Group.ShowInSiteMap"))) 10972 { 10973 10974 10975 #line default 10976 #line hidden 10977 WriteLiteralTo(__razor_helper_writer, " <li>\r\n <a"); 10978 10979 WriteAttributeTo(__razor_helper_writer, "href", Tuple.Create(" href=\"", 158588), Tuple.Create("\"", 158639) 10980 10981 #line 3617 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10982 , Tuple.Create(Tuple.Create("", 158595), Tuple.Create<System.Object, System.Int32>(subGroup.GetString("Ecom:Group.Link.Clean") 10983 10984 #line default 10985 #line hidden 10986 , 158595), false) 10987 ); 10988 10989 WriteLiteralTo(__razor_helper_writer, ">"); 10990 10991 10992 #line 3617 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 10993 WriteTo(__razor_helper_writer, subGroup.GetString("Ecom:Group.Name")); 10994 10995 10996 #line default 10997 #line hidden 10998 WriteLiteralTo(__razor_helper_writer, "</a>\r\n </li>\r\n"); 10999 11000 11001 #line 3619 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11002 } 11003 11004 #line default 11005 #line hidden 11006 WriteLiteralTo(__razor_helper_writer, "\r\n </ul>\r\n"); 11007 11008 11009 #line 3621 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11010 } 11011 11012 11013 #line default 11014 #line hidden 11015 }); 11016 11017 #line 3622 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11018 } 11019 #line default 11020 #line hidden 11021 11022 11023 #line 3624 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11024 public RazorEngine.Templating.TemplateWriter RenderFirstLevelFeaturedGroupsHomepage(List<LoopItem> groups) 11025 { 11026 #line default 11027 #line hidden 11028 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 11029 11030 #line 3625 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11031 11032 11033 11034 #line default 11035 #line hidden 11036 WriteLiteralTo(__razor_helper_writer, " <ul"); 11037 11038 WriteLiteralTo(__razor_helper_writer, " class=\"row groupsRow\""); 11039 11040 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 11041 11042 11043 #line 3627 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11044 11045 11046 #line default 11047 #line hidden 11048 11049 #line 3627 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11050 foreach (var group in groups.Where(g => g.GetBoolean("Ecom:Group.ShowInSiteMap"))) 11051 { 11052 var imageSource = GetGroupImage(group.GetString("Ecom:Group.SmallImage"), group.GetString("Ecom:Group.ID")); 11053 var imagePath = Images.GetImage(imageSource, 95, 0); 11054 var imageSettings = new ImageSettings 11055 { 11056 IncludeWrapper = true, 11057 WrapperCssClass = "col-xs-6 col-sm-5 noPaddingLeft", 11058 Source = imagePath, 11059 AltText = group.GetString("Ecom:Group.Name") 11060 }; 11061 11062 11063 #line default 11064 #line hidden 11065 WriteLiteralTo(__razor_helper_writer, " <li"); 11066 11067 WriteLiteralTo(__razor_helper_writer, " class=\"col-xs-6 col-sm-4 col-md-3 productListHome\""); 11068 11069 WriteLiteralTo(__razor_helper_writer, ">\r\n <a"); 11070 11071 WriteLiteralTo(__razor_helper_writer, " class=\"col-xs-12\""); 11072 11073 WriteAttributeTo(__razor_helper_writer, "href", Tuple.Create(" href=\"", 159628), Tuple.Create("\"", 159676) 11074 11075 #line 3639 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11076 , Tuple.Create(Tuple.Create("", 159635), Tuple.Create<System.Object, System.Int32>(group.GetString("Ecom:Group.Link.Clean") 11077 11078 #line default 11079 #line hidden 11080 , 159635), false) 11081 ); 11082 11083 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 11084 11085 WriteLiteralTo(__razor_helper_writer, " "); 11086 11087 11088 #line 3640 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11089 WriteTo(__razor_helper_writer, RenderImage(imageSettings)); 11090 11091 11092 #line default 11093 #line hidden 11094 WriteLiteralTo(__razor_helper_writer, "\r\n <span>"); 11095 11096 11097 #line 3641 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11098 WriteTo(__razor_helper_writer, group.GetString("Ecom:Group.Name")); 11099 11100 11101 #line default 11102 #line hidden 11103 WriteLiteralTo(__razor_helper_writer, "</span>\r\n </a>\r\n </li>\r\n"); 11104 11105 11106 #line 3644 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11107 } 11108 11109 #line default 11110 #line hidden 11111 WriteLiteralTo(__razor_helper_writer, "\r\n </ul>\r\n"); 11112 11113 11114 #line 3646 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11115 11116 11117 #line default 11118 #line hidden 11119 }); 11120 11121 #line 3646 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11122 } 11123 #line default 11124 #line hidden 11125 11126 11127 #line 3648 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11128 public RazorEngine.Templating.TemplateWriter RenderFirstLevelGroupsHomepage(List<LoopItem> groups) 11129 { 11130 #line default 11131 #line hidden 11132 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 11133 11134 #line 3649 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11135 11136 11137 11138 #line default 11139 #line hidden 11140 WriteLiteralTo(__razor_helper_writer, " <ul"); 11141 11142 WriteLiteralTo(__razor_helper_writer, " class=\"row\""); 11143 11144 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 11145 11146 11147 #line 3651 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11148 11149 11150 #line default 11151 #line hidden 11152 11153 #line 3651 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11154 foreach (var group in groups.Where(g => g.GetBoolean("Ecom:Group.ShowInSiteMap"))) 11155 { 11156 var imageSource = GetGroupImage(group.GetString("Ecom:Group.SmallImage"), group.GetString("Ecom:Group.ID")); 11157 var imagePath = Images.GetImage(imageSource, 95, 95); 11158 var imageSettings = new ImageSettings 11159 { 11160 IncludeWrapper = true, 11161 WrapperCssClass = "col-md-4 noPaddingLeft", 11162 Href = group.GetString("Ecom:Group.Link.Clean"), 11163 Source = imagePath, 11164 AltText = group.GetString("Ecom:Group.Name") 11165 }; 11166 11167 11168 11169 #line default 11170 #line hidden 11171 WriteLiteralTo(__razor_helper_writer, " <li"); 11172 11173 WriteLiteralTo(__razor_helper_writer, " class=\"col-xs-12 col-sm-3\""); 11174 11175 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 11176 11177 WriteLiteralTo(__razor_helper_writer, " "); 11178 11179 11180 #line 3665 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11181 WriteTo(__razor_helper_writer, RenderImage(imageSettings)); 11182 11183 11184 #line default 11185 #line hidden 11186 WriteLiteralTo(__razor_helper_writer, "\r\n <h2>\r\n <a"); 11187 11188 WriteAttributeTo(__razor_helper_writer, "href", Tuple.Create(" href=\"", 160844), Tuple.Create("\"", 160892) 11189 11190 #line 3667 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11191 , Tuple.Create(Tuple.Create("", 160851), Tuple.Create<System.Object, System.Int32>(group.GetString("Ecom:Group.Link.Clean") 11192 11193 #line default 11194 #line hidden 11195 , 160851), false) 11196 ); 11197 11198 WriteLiteralTo(__razor_helper_writer, ">"); 11199 11200 11201 #line 3667 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11202 WriteTo(__razor_helper_writer, group.GetString("Ecom:Group.Name")); 11203 11204 11205 #line default 11206 #line hidden 11207 WriteLiteralTo(__razor_helper_writer, "</a>\r\n </h2>\r\n </li>\r\n"); 11208 11209 11210 #line 3670 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11211 } 11212 11213 #line default 11214 #line hidden 11215 WriteLiteralTo(__razor_helper_writer, "\r\n </ul>\r\n"); 11216 11217 11218 #line 3672 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11219 11220 11221 #line default 11222 #line hidden 11223 }); 11224 11225 #line 3672 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11226 } 11227 #line default 11228 #line hidden 11229 11230 11231 #line 3674 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11232 public RazorEngine.Templating.TemplateWriter RenderBrandsDescription() 11233 { 11234 #line default 11235 #line hidden 11236 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 11237 11238 #line 3675 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11239 11240 var itemLoop = GetLoop("Vendor"); 11241 foreach (var item in itemLoop) 11242 { 11243 11244 11245 #line default 11246 #line hidden 11247 WriteLiteralTo(__razor_helper_writer, " <p>"); 11248 11249 11250 #line 3679 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11251 WriteTo(__razor_helper_writer, GetString("Item.Short_Description.Value")); 11252 11253 11254 #line default 11255 #line hidden 11256 WriteLiteralTo(__razor_helper_writer, "</p>\r\n"); 11257 11258 11259 #line 3680 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11260 } 11261 11262 11263 #line default 11264 #line hidden 11265 }); 11266 11267 #line 3681 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11268 } 11269 #line default 11270 #line hidden 11271 11272 11273 #line 3683 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11274 public RazorEngine.Templating.TemplateWriter RenderFirstLevelGroupsBrandsPage(List<LoopItem> groups) 11275 { 11276 #line default 11277 #line hidden 11278 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 11279 11280 #line 3684 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11281 11282 11283 11284 #line default 11285 #line hidden 11286 11287 #line 3685 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11288 WriteTo(__razor_helper_writer, RenderBrandsDescription()); 11289 11290 11291 #line default 11292 #line hidden 11293 11294 #line 3685 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11295 11296 11297 11298 #line default 11299 #line hidden 11300 WriteLiteralTo(__razor_helper_writer, " <ul"); 11301 11302 WriteLiteralTo(__razor_helper_writer, " class=\"row brandsCategories\""); 11303 11304 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 11305 11306 11307 #line 3687 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11308 11309 11310 #line default 11311 #line hidden 11312 11313 #line 3687 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11314 foreach (var group in groups.Where(g => g.GetBoolean("Ecom:Group.ShowInSiteMap"))) 11315 { 11316 var groupDescription = group.GetString("Ecom:Group.Description"); 11317 var imageSource = GetGroupImage(group.GetString("Ecom:Group.SmallImage"), group.GetString("Ecom:Group.ID")); 11318 var imageSettings = new ImageSettings 11319 { 11320 IncludeWrapper = true, 11321 WrapperCssClass = "col-xs-6 col-sm-3 noPaddingLeft", 11322 Source = Images.GetImage(imageSource, 150, 0, 95, 0, 95, 0, new ImageProcessorSettings {ImageUrl = imageSource}), 11323 AltText = group.GetString("Ecom:Group.Name") 11324 }; 11325 11326 11327 11328 #line default 11329 #line hidden 11330 WriteLiteralTo(__razor_helper_writer, " <li"); 11331 11332 WriteLiteralTo(__razor_helper_writer, " class=\"col-xs-12 col-sm-6\""); 11333 11334 WriteLiteralTo(__razor_helper_writer, ">\r\n <a"); 11335 11336 WriteLiteralTo(__razor_helper_writer, " class=\"col-xs-12 frame\""); 11337 11338 WriteAttributeTo(__razor_helper_writer, "href", Tuple.Create(" href=\"", 162245), Tuple.Create("\"", 162293) 11339 11340 #line 3700 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11341 , Tuple.Create(Tuple.Create("", 162252), Tuple.Create<System.Object, System.Int32>(group.GetString("Ecom:Group.Link.Clean") 11342 11343 #line default 11344 #line hidden 11345 , 162252), false) 11346 ); 11347 11348 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 11349 11350 WriteLiteralTo(__razor_helper_writer, " "); 11351 11352 11353 #line 3701 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11354 WriteTo(__razor_helper_writer, RenderImage(imageSettings)); 11355 11356 11357 #line default 11358 #line hidden 11359 WriteLiteralTo(__razor_helper_writer, "\r\n"); 11360 11361 11362 #line 3702 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11363 11364 11365 #line default 11366 #line hidden 11367 11368 #line 3702 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11369 if (groupDescription.IsNotNullOrEmpty()) 11370 { 11371 11372 11373 #line default 11374 #line hidden 11375 WriteLiteralTo(__razor_helper_writer, " <div"); 11376 11377 WriteLiteralTo(__razor_helper_writer, " class=\"col-xs-8 noPaddingLeft\""); 11378 11379 WriteLiteralTo(__razor_helper_writer, ">\r\n <span>"); 11380 11381 11382 #line 3705 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11383 WriteTo(__razor_helper_writer, group.GetString("Ecom:Group.Name")); 11384 11385 11386 #line default 11387 #line hidden 11388 WriteLiteralTo(__razor_helper_writer, "</span>\r\n <p>"); 11389 11390 11391 #line 3706 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11392 WriteTo(__razor_helper_writer, groupDescription); 11393 11394 11395 #line default 11396 #line hidden 11397 WriteLiteralTo(__razor_helper_writer, "</p>\r\n </div>\r\n"); 11398 11399 11400 #line 3708 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11401 } 11402 11403 #line default 11404 #line hidden 11405 WriteLiteralTo(__razor_helper_writer, "\r\n </a>\r\n </li>\r\n"); 11406 11407 11408 #line 3711 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11409 } 11410 11411 #line default 11412 #line hidden 11413 WriteLiteralTo(__razor_helper_writer, "\r\n </ul>\r\n"); 11414 11415 11416 #line 3713 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11417 11418 11419 #line default 11420 #line hidden 11421 }); 11422 11423 #line 3713 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11424 } 11425 #line default 11426 #line hidden 11427 11428 11429 #line 3715 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11430 public RazorEngine.Templating.TemplateWriter RenderSecondLevelGroupsHomepage(List<LoopItem> groups) 11431 { 11432 #line default 11433 #line hidden 11434 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 11435 11436 #line 3716 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11437 11438 11439 11440 #line default 11441 #line hidden 11442 WriteLiteralTo(__razor_helper_writer, " <div"); 11443 11444 WriteLiteralTo(__razor_helper_writer, " class=\"col-xs-12 col-sm-3\""); 11445 11446 WriteLiteralTo(__razor_helper_writer, ">\r\n <h1>"); 11447 11448 11449 #line 3718 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11450 WriteTo(__razor_helper_writer, GetString("Ecom:Group.Name")); 11451 11452 11453 #line default 11454 #line hidden 11455 WriteLiteralTo(__razor_helper_writer, "</h1>\r\n <p>\r\n"); 11456 11457 WriteLiteralTo(__razor_helper_writer, " "); 11458 11459 11460 #line 3720 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11461 WriteTo(__razor_helper_writer, GetString("Ecom:Group.Description")); 11462 11463 11464 #line default 11465 #line hidden 11466 WriteLiteralTo(__razor_helper_writer, "\r\n </p>\r\n </div>\r\n"); 11467 11468 WriteLiteralTo(__razor_helper_writer, " <ul"); 11469 11470 WriteLiteralTo(__razor_helper_writer, " class=\"row categoryView\""); 11471 11472 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 11473 11474 11475 #line 3724 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11476 11477 11478 #line default 11479 #line hidden 11480 11481 #line 3724 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11482 foreach (var subGroup in groups.Where(sg => sg.GetBoolean("Ecom:Group.ShowInSiteMap"))) 11483 { 11484 var imageSource = GetGroupImage(subGroup.GetString("Ecom:Group.SmallImage"), subGroup.GetString("Ecom:Group.ID")); 11485 var imageSettings = new ImageSettings 11486 { 11487 IncludeWrapper = true, 11488 WrapperCssClass = "generalMarginBottom thumbnail", 11489 Href = subGroup.GetString("Ecom:Group.Link.Clean"), 11490 Source = Images.GetImage(imageSource, 640, 640), 11491 AltText = subGroup.GetString("Ecom:Group.Name") 11492 }; 11493 11494 11495 #line default 11496 #line hidden 11497 WriteLiteralTo(__razor_helper_writer, " <li"); 11498 11499 WriteLiteralTo(__razor_helper_writer, " class=\"col-xs-12 col-sm-3\""); 11500 11501 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 11502 11503 WriteLiteralTo(__razor_helper_writer, " "); 11504 11505 11506 #line 3736 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11507 WriteTo(__razor_helper_writer, RenderImage(imageSettings)); 11508 11509 11510 #line default 11511 #line hidden 11512 WriteLiteralTo(__razor_helper_writer, "\r\n <h2>\r\n <a"); 11513 11514 WriteAttributeTo(__razor_helper_writer, "href", Tuple.Create(" href=\"", 163939), Tuple.Create("\"", 163990) 11515 11516 #line 3738 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11517 , Tuple.Create(Tuple.Create("", 163946), Tuple.Create<System.Object, System.Int32>(subGroup.GetString("Ecom:Group.Link.Clean") 11518 11519 #line default 11520 #line hidden 11521 , 163946), false) 11522 ); 11523 11524 WriteLiteralTo(__razor_helper_writer, ">"); 11525 11526 11527 #line 3738 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11528 WriteTo(__razor_helper_writer, subGroup.GetString("Ecom:Group.Name")); 11529 11530 11531 #line default 11532 #line hidden 11533 WriteLiteralTo(__razor_helper_writer, "</a>\r\n </h2>\r\n </li>\r\n"); 11534 11535 11536 #line 3741 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11537 } 11538 11539 #line default 11540 #line hidden 11541 WriteLiteralTo(__razor_helper_writer, "\r\n </ul>\r\n"); 11542 11543 11544 #line 3743 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11545 11546 11547 #line default 11548 #line hidden 11549 }); 11550 11551 #line 3743 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11552 } 11553 #line default 11554 #line hidden 11555 11556 11557 #line 3745 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11558 public RazorEngine.Templating.TemplateWriter RenderBrandPageFeaturedProducts(List<LoopItem> prodLoop) 11559 { 11560 #line default 11561 #line hidden 11562 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 11563 11564 #line 3746 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11565 11566 11567 11568 #line default 11569 #line hidden 11570 WriteLiteralTo(__razor_helper_writer, " <ul"); 11571 11572 WriteLiteralTo(__razor_helper_writer, " class=\"col-xs-12 col-sm-6 col-md-4 featuredBrandsProd\""); 11573 11574 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 11575 11576 11577 #line 3748 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11578 11579 11580 #line default 11581 #line hidden 11582 11583 #line 3748 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11584 foreach (var product in prodLoop) 11585 { 11586 var productId = product.GetString("Ecom:Product.ID").FirstOrDefault(); 11587 var productName = product.GetString("Ecom:Product.Name"); 11588 var productShortDescriptionRaw = product.GetString("Ecom:Product.ShortDescription"); 11589 var productShortDescription = !string.IsNullOrEmpty(productShortDescriptionRaw) ? productShortDescriptionRaw : Translate("Missing Description"); 11590 var productImage = CHG.Helpers.Images.GetChgImagePath(product); 11591 var imageUrl = Images.GetImage(productImage, 300, 200); 11592 var productUrl = "/Default.aspx?Id=" + Dynamicweb.Services.Pages.GetPageByNavigationTag(Pageview.Area.ID, "Products").ID + "&amp;GroupID=" + product.GetString("Ecom:Product.PrimaryOrFirstGroupID") + "&amp;ProductID=" + productId; 11593 var figureClass = "text-center col-xs-12 noPadding"; 11594 var imageSettings = new ImageSettings 11595 { 11596 Source = imageUrl, 11597 AltText = productName, 11598 IncludeWrapper = true, 11599 WrapperElement = "figure", 11600 WrapperCssClass = figureClass 11601 }; 11602 11603 11604 #line default 11605 #line hidden 11606 WriteLiteralTo(__razor_helper_writer, " <li"); 11607 11608 WriteLiteralTo(__razor_helper_writer, " class=\"col-xs-12 col-sm-4 col-md-3\""); 11609 11610 WriteLiteralTo(__razor_helper_writer, ">\r\n <a"); 11611 11612 WriteLiteralTo(__razor_helper_writer, " class=\"col-xs-12\""); 11613 11614 WriteAttributeTo(__razor_helper_writer, "href", Tuple.Create(" href=\"", 165655), Tuple.Create("\"", 165673) 11615 11616 #line 3767 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11617 , Tuple.Create(Tuple.Create("", 165662), Tuple.Create<System.Object, System.Int32>(productUrl 11618 11619 #line default 11620 #line hidden 11621 , 165662), false) 11622 ); 11623 11624 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 11625 11626 WriteLiteralTo(__razor_helper_writer, " "); 11627 11628 11629 #line 3768 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11630 WriteTo(__razor_helper_writer, RenderImage(imageSettings)); 11631 11632 11633 #line default 11634 #line hidden 11635 WriteLiteralTo(__razor_helper_writer, "\r\n <span>"); 11636 11637 11638 #line 3769 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11639 WriteTo(__razor_helper_writer, productName); 11640 11641 11642 #line default 11643 #line hidden 11644 WriteLiteralTo(__razor_helper_writer, "</span>\r\n </a>\r\n </li>\r\n"); 11645 11646 11647 #line 3772 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11648 } 11649 11650 #line default 11651 #line hidden 11652 WriteLiteralTo(__razor_helper_writer, "\r\n </ul>\r\n"); 11653 11654 11655 #line 3774 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11656 11657 11658 #line default 11659 #line hidden 11660 }); 11661 11662 #line 3774 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11663 } 11664 #line default 11665 #line hidden 11666 11667 11668 #line 3783 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11669 11670 public string GetSpecialItemPricingUrl(string productName, string productNumber, string modelNumber) 11671 { 11672 return string.Concat("/Default.aspx?Id=", GetPageIdByNavigationTag("SpecialProductPrice"), "&00Nf400000O1e59=", productName, "&00Nf400000O1e4u=", productNumber, "&00Nf400000O1dXC=", modelNumber); 11673 } 11674 11675 #line default 11676 #line hidden 11677 11678 11679 #line 3790 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11680 public RazorEngine.Templating.TemplateWriter RenderMagic360Legend(bool hasImageCustom) 11681 { 11682 #line default 11683 #line hidden 11684 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 11685 11686 #line 3791 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11687 11688 if (hasImageCustom) 11689 { 11690 11691 11692 #line default 11693 #line hidden 11694 WriteLiteralTo(__razor_helper_writer, " <div"); 11695 11696 WriteLiteralTo(__razor_helper_writer, " id=\"zoom-legend\""); 11697 11698 WriteLiteralTo(__razor_helper_writer, ">\r\n <a"); 11699 11700 WriteLiteralTo(__razor_helper_writer, " id=\"zoom-link\""); 11701 11702 WriteLiteralTo(__razor_helper_writer, ">"); 11703 11704 11705 #line 3795 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11706 WriteTo(__razor_helper_writer, RenderIcon("fa-refresh", Translate("360ª View"))); 11707 11708 11709 #line default 11710 #line hidden 11711 WriteLiteralTo(__razor_helper_writer, "</a> <span> "); 11712 11713 11714 #line 3795 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11715 WriteTo(__razor_helper_writer, Translate("Drag the image to spin. Click to Zoom.")); 11716 11717 11718 #line default 11719 #line hidden 11720 WriteLiteralTo(__razor_helper_writer, "</span>\r\n </div>\r\n"); 11721 11722 11723 #line 3797 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11724 } 11725 11726 11727 11728 #line default 11729 #line hidden 11730 }); 11731 11732 #line 3799 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11733 } 11734 #line default 11735 #line hidden 11736 11737 11738 #line 3800 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11739 public RazorEngine.Templating.TemplateWriter RenderProductCompareCustom(int productType, string productId, string variantId = "", string productLanguage = "") 11740 { 11741 #line default 11742 #line hidden 11743 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 11744 11745 #line 3801 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11746 11747 var isGiftCard = productType == 3; 11748 11749 if (!isGiftCard) 11750 { 11751 var compareLink = productId; 11752 compareLink += productLanguage.IsNotNullOrEmpty() ? "$" + productLanguage : ""; 11753 compareLink += variantId.IsNotNullOrEmpty() ? "$" + variantId : ""; 11754 const int compareLimit = 10; 11755 11756 11757 #line default 11758 #line hidden 11759 11760 #line 3810 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11761 WriteTo(__razor_helper_writer, RenderField(new FieldSettings 11762 { 11763 Type = FieldType.Checkbox, 11764 Label = Translate("Compare"), 11765 SystemName = "addToCompare_" + productId, 11766 IncludeWrapper = true, 11767 WrapperElement = "div", 11768 WrapperCssClass = "addToCompare", 11769 Attributes = new Dictionary<string, string> 11770 { 11771 {"data-link", compareLink}, 11772 {"data-maxcompare", string.Concat(Translate("Maximum to compare"), ": ", compareLimit)} 11773 } 11774 })); 11775 11776 11777 #line default 11778 #line hidden 11779 11780 #line 3823 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11781 11782 } 11783 11784 11785 #line default 11786 #line hidden 11787 }); 11788 11789 #line 3825 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11790 } 11791 #line default 11792 #line hidden 11793 11794 11795 #line 3826 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11796 public RazorEngine.Templating.TemplateWriter RenderRequestQuoteButton(string productId, string productUnitId, string variantId, string orderContextId) 11797 { 11798 #line default 11799 #line hidden 11800 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 11801 11802 #line 3827 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11803 11804 11805 11806 #line default 11807 #line hidden 11808 WriteLiteralTo(__razor_helper_writer, " <form"); 11809 11810 WriteLiteralTo(__razor_helper_writer, " name=\"quoteCart\""); 11811 11812 WriteLiteralTo(__razor_helper_writer, " class=\"floatRight\""); 11813 11814 WriteAttributeTo(__razor_helper_writer, "action", Tuple.Create(" action=\"", 168036), Tuple.Create("\"", 168147) 11815 11816 #line 3828 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11817 , Tuple.Create(Tuple.Create("", 168045), Tuple.Create<System.Object, System.Int32>(Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(GetPageIdByNavigationTag("RequestQuote")) 11818 11819 #line default 11820 #line hidden 11821 , 168045), false) 11822 ); 11823 11824 WriteLiteralTo(__razor_helper_writer, " method=\"post\""); 11825 11826 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 11827 11828 WriteLiteralTo(__razor_helper_writer, " "); 11829 11830 11831 #line 3829 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11832 WriteTo(__razor_helper_writer, RenderField(FieldSettings.CreateHiddenField("redirect", "false", "quoteRedirect" + productId))); 11833 11834 11835 #line default 11836 #line hidden 11837 WriteLiteralTo(__razor_helper_writer, "\r\n"); 11838 11839 WriteLiteralTo(__razor_helper_writer, " "); 11840 11841 11842 #line 3830 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11843 WriteTo(__razor_helper_writer, RenderField(FieldSettings.CreateHiddenField("cartcmd", "add", "quoteCartcmd" + productId))); 11844 11845 11846 #line default 11847 #line hidden 11848 WriteLiteralTo(__razor_helper_writer, "\r\n"); 11849 11850 WriteLiteralTo(__razor_helper_writer, " "); 11851 11852 11853 #line 3831 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11854 WriteTo(__razor_helper_writer, RenderField(FieldSettings.CreateHiddenField("productid", productId, "quoteProductId" + productId))); 11855 11856 11857 #line default 11858 #line hidden 11859 WriteLiteralTo(__razor_helper_writer, "\r\n"); 11860 11861 WriteLiteralTo(__razor_helper_writer, " "); 11862 11863 11864 #line 3832 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11865 WriteTo(__razor_helper_writer, RenderField(FieldSettings.CreateHiddenField("unitID", productUnitId, "quoteUnitID" + productId))); 11866 11867 11868 #line default 11869 #line hidden 11870 WriteLiteralTo(__razor_helper_writer, "\r\n"); 11871 11872 WriteLiteralTo(__razor_helper_writer, " "); 11873 11874 11875 #line 3833 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11876 WriteTo(__razor_helper_writer, RenderField(FieldSettings.CreateHiddenField("OrderContext", orderContextId, "orderContext" + productId))); 11877 11878 11879 #line default 11880 #line hidden 11881 WriteLiteralTo(__razor_helper_writer, "\r\n"); 11882 11883 WriteLiteralTo(__razor_helper_writer, " "); 11884 11885 11886 #line 3834 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11887 WriteTo(__razor_helper_writer, RenderBootstrapButton(new BootstrapButtonSettings 11888 { 11889 Label = Translate("Request Quote"), 11890 CssClass = "btn-primary btn-outline btn-link request-quote", 11891 IconCssClass = "fa-shopping-bag", 11892 ButtonType = BootstrapButtonSettings.BootstrapButtonType.Button, 11893 Href = string.Concat(Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(Dynamicweb.Services.Pages.GetPageByNavigationTag(Pageview.AreaID, "RequestQuote").ID),"?productid=", productId, "&amp;variantID=", variantId, "&amp;orderContext=", orderContextId, "&amp;cartcmd=add") 11894 })); 11895 11896 11897 #line default 11898 #line hidden 11899 WriteLiteralTo(__razor_helper_writer, "\r\n <i>"); 11900 11901 11902 #line 3842 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11903 WriteTo(__razor_helper_writer, Translate("For volume pricing")); 11904 11905 11906 #line default 11907 #line hidden 11908 WriteLiteralTo(__razor_helper_writer, "</i>\r\n </form>\r\n"); 11909 11910 11911 #line 3844 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11912 11913 11914 #line default 11915 #line hidden 11916 }); 11917 11918 #line 3844 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11919 } 11920 #line default 11921 #line hidden 11922 11923 11924 #line 3847 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11925 11926 public string GetProductCrossReference(string productNumber) 11927 { 11928 if (!Dynamicweb.Security.UserManagement.User.IsExtranetUserLoggedIn()) 11929 { 11930 return string.Empty; 11931 } 11932 return GetProductCrossReference(productNumber, Pageview.User.ExternalID); 11933 } 11934 11935 public string GetProductCrossReference(string productNumber, string customerId) 11936 { 11937 var columnValue = Dynamicweb.Data.Database.ExecuteScalar(string.Format("SELECT ReferenceCode FROM _CrossReferences WHERE Type='Customer' and TypeNo='{0}' AND ItemNo='{1}'", customerId, productNumber)); 11938 11939 if (columnValue == null) 11940 { 11941 return string.Empty; 11942 } 11943 11944 return columnValue.ToString(); 11945 } 11946 11947 #line default 11948 #line hidden 11949 11950 11951 #line 3872 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11952 11953 11954 public string GetUnitIdLabel(string productUnitId, string productLanguage) 11955 { 11956 var variantService = new Dynamicweb.Ecommerce.VariantOptionService(); 11957 var defaultUnit = variantService.GetVariantOption(productUnitId,productLanguage); 11958 11959 return defaultUnit==null ? string.Empty : defaultUnit.Name; 11960 } 11961 11962 11963 #line default 11964 #line hidden 11965 11966 11967 #line 3884 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11968 public RazorEngine.Templating.TemplateWriter RenderUnitSales(string productUnitId, string productLanguage, string qtyBaseUnitMeasurePerUnits, string salesUnitOfMeasure, bool showLabelYP = false, string cssClass="product-price-holder col-sm-6 noPadding") 11969 { 11970 #line default 11971 #line hidden 11972 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 11973 11974 #line 3885 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11975 11976 var unitIdName = GetUnitIdLabel(productUnitId, productLanguage); 11977 if (unitIdName.IsNullOrEmpty()) 11978 { 11979 return; 11980 } 11981 11982 var amountPerUnit = string.Empty; 11983 if (qtyBaseUnitMeasurePerUnits.IsNotNullOrEmpty() && salesUnitOfMeasure.IsNotNullOrEmpty() /*&& salesUnitOfMeasure != "ea"*/) 11984 { 11985 amountPerUnit = qtyBaseUnitMeasurePerUnits=="1" && salesUnitOfMeasure == "ea" ? Translate("Each") : qtyBaseUnitMeasurePerUnits=="1" && salesUnitOfMeasure != "ea" ? unitIdName : string.Format(" {0} {1} {2} ", unitIdName, Translate("of"), qtyBaseUnitMeasurePerUnits); 11986 } 11987 11988 11989 #line default 11990 #line hidden 11991 WriteLiteralTo(__razor_helper_writer, " <div"); 11992 11993 WriteAttributeTo(__razor_helper_writer, "class", Tuple.Create(" class=\"", 171563), Tuple.Create("\"", 171580) 11994 11995 #line 3897 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 11996 , Tuple.Create(Tuple.Create("", 171571), Tuple.Create<System.Object, System.Int32>(cssClass 11997 11998 #line default 11999 #line hidden 12000 , 171571), false) 12001 ); 12002 12003 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 12004 12005 12006 #line 3898 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12007 12008 12009 #line default 12010 #line hidden 12011 12012 #line 3898 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12013 if(showLabelYP && amountPerUnit.IsNotNullOrEmpty()) 12014 { 12015 12016 12017 #line default 12018 #line hidden 12019 WriteLiteralTo(__razor_helper_writer, " <div"); 12020 12021 WriteAttributeTo(__razor_helper_writer, "class", Tuple.Create(" class=\"", 171682), Tuple.Create("\"", 171721) 12022 , Tuple.Create(Tuple.Create("", 171690), Tuple.Create("unitMeasure", 171690), true) 12023 12024 #line 3900 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12025 , Tuple.Create(Tuple.Create(" ", 171701), Tuple.Create<System.Object, System.Int32>(salesUnitOfMeasure 12026 12027 #line default 12028 #line hidden 12029 , 171702), false) 12030 ); 12031 12032 WriteLiteralTo(__razor_helper_writer, "><strong>"); 12033 12034 12035 #line 3900 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12036 WriteTo(__razor_helper_writer, GetPriceLabel()); 12037 12038 12039 #line default 12040 #line hidden 12041 WriteLiteralTo(__razor_helper_writer, "</strong> <span>"); 12042 12043 12044 #line 3900 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12045 WriteTo(__razor_helper_writer, amountPerUnit); 12046 12047 12048 #line default 12049 #line hidden 12050 WriteLiteralTo(__razor_helper_writer, "</span></div>\r\n"); 12051 12052 12053 #line 3901 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12054 } 12055 else 12056 { 12057 12058 12059 #line default 12060 #line hidden 12061 12062 #line 3904 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12063 WriteTo(__razor_helper_writer, amountPerUnit); 12064 12065 12066 #line default 12067 #line hidden 12068 12069 #line 3904 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12070 12071 } 12072 12073 #line default 12074 #line hidden 12075 WriteLiteralTo(__razor_helper_writer, "\r\n <strong"); 12076 12077 WriteLiteralTo(__razor_helper_writer, " class=\"product-price\""); 12078 12079 WriteLiteralTo(__razor_helper_writer, "></strong>\r\n </div>\r\n"); 12080 12081 12082 #line 3908 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12083 12084 12085 #line default 12086 #line hidden 12087 }); 12088 12089 #line 3908 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12090 } 12091 #line default 12092 #line hidden 12093 12094 12095 #line 3910 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12096 public RazorEngine.Templating.TemplateWriter RenderTarrif(string insertType = "", string cssClass = "col-xs-12 row") 12097 { 12098 #line default 12099 #line hidden 12100 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 12101 12102 #line 3911 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12103 12104 12105 var outputTarrif = string.Empty; 12106 switch (insertType) 12107 { 12108 case "B" : 12109 outputTarrif = "Price does not include any tariff surcharge that your Company has agreed to. Tariff surcharge will appear on final invoice."; 12110 break; 12111 case "C" : 12112 outputTarrif = "Above prices do not include any applicable tariff surcharges that your Company has agreed to. Tariff surcharges will appear on final invoice."; 12113 break; 12114 case "D": 12115 outputTarrif = "Prices do not include any applicable tariff surcharges that your Company has agreed to."; 12116 break; 12117 case "E": 12118 outputTarrif = "Prices do not include any applicable tariff surcharges that your Company has agreed to. Tariff surcharges will appear on final invoice."; 12119 break; 12120 case "A" : 12121 default: 12122 outputTarrif = "Price does not include any tariff surcharge that your Company has agreed to."; 12123 break; 12124 } 12125 12126 12127 #line default 12128 #line hidden 12129 WriteLiteralTo(__razor_helper_writer, " <div"); 12130 12131 WriteAttributeTo(__razor_helper_writer, "class", Tuple.Create(" class=\"", 173172), Tuple.Create("\"", 173189) 12132 12133 #line 3933 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12134 , Tuple.Create(Tuple.Create("", 173180), Tuple.Create<System.Object, System.Int32>(cssClass 12135 12136 #line default 12137 #line hidden 12138 , 173180), false) 12139 ); 12140 12141 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 12142 12143 WriteLiteralTo(__razor_helper_writer, " "); 12144 12145 12146 #line 3934 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12147 WriteTo(__razor_helper_writer, Translate(outputTarrif)); 12148 12149 12150 #line default 12151 #line hidden 12152 WriteLiteralTo(__razor_helper_writer, "\r\n </div> \r\n"); 12153 12154 12155 #line 3936 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12156 12157 12158 #line default 12159 #line hidden 12160 }); 12161 12162 #line 3936 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12163 } 12164 #line default 12165 #line hidden 12166 12167 12168 public RazorEngine_d3fc03497f3f46c6a6c7d1deddec0f0a() { 12169 } 12170 12171 public override void Execute() { 12172 12173 #line 395 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12174 12175 12176 12177 12178 #line default 12179 #line hidden 12180 12181 #line 397 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12182 12183 12184 12185 #line default 12186 #line hidden 12187 12188 #line 405 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12189 12190 12191 12192 12193 12194 #line default 12195 #line hidden 12196 12197 #line 408 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12198 12199 12200 12201 #line default 12202 #line hidden 12203 12204 #line 422 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12205 12206 12207 12208 12209 #line default 12210 #line hidden 12211 12212 #line 432 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12213 12214 12215 12216 12217 #line default 12218 #line hidden 12219 12220 #line 444 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12221 12222 12223 12224 12225 #line default 12226 #line hidden 12227 12228 #line 453 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12229 12230 12231 12232 12233 #line default 12234 #line hidden 12235 12236 #line 460 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12237 12238 12239 12240 12241 12242 #line default 12243 #line hidden 12244 12245 #line 463 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12246 12247 12248 12249 #line default 12250 #line hidden 12251 12252 #line 467 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12253 12254 12255 12256 12257 #line default 12258 #line hidden 12259 12260 #line 472 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12261 12262 12263 12264 12265 #line default 12266 #line hidden 12267 12268 #line 525 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12269 12270 12271 12272 12273 #line default 12274 #line hidden 12275 12276 #line 555 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12277 12278 12279 12280 12281 #line default 12282 #line hidden 12283 12284 #line 607 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12285 12286 12287 12288 12289 #line default 12290 #line hidden 12291 12292 #line 643 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12293 12294 12295 12296 12297 #line default 12298 #line hidden 12299 12300 #line 671 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12301 12302 12303 12304 12305 #line default 12306 #line hidden 12307 12308 #line 730 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12309 12310 12311 12312 12313 #line default 12314 #line hidden 12315 12316 #line 802 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12317 12318 12319 12320 12321 12322 #line default 12323 #line hidden 12324 12325 #line 805 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12326 12327 12328 12329 #line default 12330 #line hidden 12331 12332 #line 821 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12333 12334 12335 12336 12337 #line default 12338 #line hidden 12339 12340 #line 831 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12341 12342 12343 12344 12345 #line default 12346 #line hidden 12347 12348 #line 838 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12349 12350 12351 12352 12353 #line default 12354 #line hidden 12355 12356 #line 859 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12357 12358 12359 12360 12361 #line default 12362 #line hidden 12363 12364 #line 871 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12365 12366 12367 12368 12369 #line default 12370 #line hidden 12371 12372 #line 896 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12373 12374 12375 12376 12377 #line default 12378 #line hidden 12379 12380 #line 917 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12381 12382 12383 12384 12385 #line default 12386 #line hidden 12387 12388 #line 922 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12389 12390 12391 12392 12393 #line default 12394 #line hidden 12395 12396 #line 927 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12397 12398 12399 12400 12401 #line default 12402 #line hidden 12403 12404 #line 1007 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12405 12406 12407 12408 12409 #line default 12410 #line hidden 12411 12412 #line 1009 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12413 12414 12415 12416 #line default 12417 #line hidden 12418 12419 #line 1046 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12420 12421 12422 12423 12424 #line default 12425 #line hidden 12426 12427 #line 1333 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12428 12429 12430 12431 #line default 12432 #line hidden 12433 12434 #line 1334 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12435 12436 12437 12438 #line default 12439 #line hidden 12440 12441 #line 1357 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12442 12443 12444 12445 12446 #line default 12447 #line hidden 12448 12449 #line 1379 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12450 12451 12452 12453 12454 #line default 12455 #line hidden 12456 12457 #line 1398 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12458 12459 12460 12461 12462 #line default 12463 #line hidden 12464 12465 #line 1411 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12466 12467 12468 12469 12470 12471 #line default 12472 #line hidden 12473 12474 #line 1414 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12475 12476 12477 12478 #line default 12479 #line hidden 12480 12481 #line 1424 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12482 12483 12484 12485 12486 12487 #line default 12488 #line hidden 12489 12490 #line 1427 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12491 12492 12493 12494 #line default 12495 #line hidden 12496 12497 #line 1487 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12498 12499 12500 12501 12502 #line default 12503 #line hidden 12504 12505 #line 1500 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12506 12507 12508 12509 12510 #line default 12511 #line hidden 12512 12513 #line 1587 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12514 12515 12516 12517 12518 #line default 12519 #line hidden 12520 12521 #line 1599 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12522 12523 12524 12525 12526 12527 #line default 12528 #line hidden 12529 12530 #line 1602 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12531 12532 12533 12534 #line default 12535 #line hidden 12536 12537 #line 1617 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12538 12539 12540 12541 12542 #line default 12543 #line hidden 12544 12545 #line 1638 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12546 12547 12548 12549 12550 #line default 12551 #line hidden 12552 12553 #line 1756 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12554 12555 12556 12557 12558 12559 #line default 12560 #line hidden 12561 12562 #line 1759 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12563 12564 12565 12566 #line default 12567 #line hidden 12568 12569 #line 1792 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12570 12571 12572 12573 12574 #line default 12575 #line hidden 12576 12577 #line 1830 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12578 12579 12580 12581 12582 #line default 12583 #line hidden 12584 12585 #line 1849 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12586 12587 12588 12589 12590 #line default 12591 #line hidden 12592 12593 #line 1912 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12594 12595 12596 12597 12598 #line default 12599 #line hidden 12600 12601 #line 1944 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12602 12603 12604 12605 12606 #line default 12607 #line hidden 12608 12609 #line 1975 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12610 12611 12612 12613 12614 #line default 12615 #line hidden 12616 12617 #line 1983 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12618 12619 12620 12621 12622 #line default 12623 #line hidden 12624 12625 #line 2007 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12626 12627 12628 12629 12630 #line default 12631 #line hidden 12632 12633 #line 2050 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12634 12635 12636 12637 12638 #line default 12639 #line hidden 12640 12641 #line 2067 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12642 12643 12644 12645 12646 #line default 12647 #line hidden 12648 12649 #line 2164 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12650 12651 12652 12653 12654 #line default 12655 #line hidden 12656 12657 #line 2173 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12658 12659 12660 12661 12662 #line default 12663 #line hidden 12664 12665 #line 2178 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12666 12667 12668 12669 12670 #line default 12671 #line hidden 12672 12673 #line 2183 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12674 12675 12676 12677 #line default 12678 #line hidden 12679 WriteLiteral("\r\n\r\n"); 12680 12681 12682 #line 2200 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12683 12684 12685 12686 12687 #line default 12688 #line hidden 12689 12690 #line 2223 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12691 12692 12693 12694 12695 #line default 12696 #line hidden 12697 WriteLiteral("\r\n"); 12698 12699 12700 #line 2226 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12701 12702 12703 12704 #line default 12705 #line hidden 12706 12707 #line 2234 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12708 12709 12710 12711 #line default 12712 #line hidden 12713 12714 #line 2258 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12715 12716 12717 12718 12719 #line default 12720 #line hidden 12721 12722 #line 2269 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12723 12724 12725 12726 12727 #line default 12728 #line hidden 12729 12730 #line 2287 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12731 12732 12733 12734 12735 #line default 12736 #line hidden 12737 12738 #line 2325 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12739 12740 12741 12742 12743 #line default 12744 #line hidden 12745 12746 #line 2353 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12747 12748 12749 12750 #line default 12751 #line hidden 12752 WriteLiteral("\r\n"); 12753 12754 12755 #line 2379 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12756 12757 12758 12759 12760 #line default 12761 #line hidden 12762 12763 #line 2428 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12764 12765 12766 12767 12768 #line default 12769 #line hidden 12770 WriteLiteral("\r\n"); 12771 12772 12773 #line 2431 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12774 12775 12776 12777 12778 #line default 12779 #line hidden 12780 12781 #line 2436 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12782 12783 12784 12785 12786 #line default 12787 #line hidden 12788 12789 #line 2543 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12790 12791 12792 12793 12794 #line default 12795 #line hidden 12796 12797 #line 2629 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12798 12799 12800 12801 #line default 12802 #line hidden 12803 WriteLiteral("\r\n"); 12804 12805 12806 #line 2665 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12807 12808 12809 12810 #line default 12811 #line hidden 12812 12813 #line 2867 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12814 12815 12816 12817 12818 #line default 12819 #line hidden 12820 12821 #line 2920 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12822 12823 12824 12825 12826 #line default 12827 #line hidden 12828 WriteLiteral("\r\n"); 12829 12830 12831 #line 2923 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12832 12833 12834 12835 12836 #line default 12837 #line hidden 12838 12839 #line 2953 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12840 12841 12842 12843 12844 #line default 12845 #line hidden 12846 12847 #line 2966 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12848 12849 12850 12851 12852 #line default 12853 #line hidden 12854 12855 #line 2984 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12856 12857 12858 12859 #line default 12860 #line hidden 12861 WriteLiteral("\r\n"); 12862 12863 12864 #line 3002 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12865 12866 12867 12868 #line default 12869 #line hidden 12870 12871 #line 3023 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12872 12873 12874 12875 12876 #line default 12877 #line hidden 12878 12879 #line 3034 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12880 12881 12882 12883 #line default 12884 #line hidden 12885 WriteLiteral("\r\n\r\n"); 12886 12887 WriteLiteral("\r\n"); 12888 12889 WriteLiteral("\r\n"); 12890 12891 12892 #line 3145 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12893 12894 12895 12896 #line default 12897 #line hidden 12898 12899 #line 3248 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12900 12901 12902 12903 #line default 12904 #line hidden 12905 12906 #line 3372 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12907 12908 12909 12910 12911 #line default 12912 #line hidden 12913 12914 #line 3377 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12915 12916 12917 12918 12919 #line default 12920 #line hidden 12921 12922 #line 3415 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12923 12924 12925 12926 12927 #line default 12928 #line hidden 12929 12930 #line 3423 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12931 12932 12933 12934 12935 #line default 12936 #line hidden 12937 12938 #line 3441 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12939 12940 12941 12942 12943 #line default 12944 #line hidden 12945 12946 #line 3506 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12947 12948 12949 12950 12951 #line default 12952 #line hidden 12953 12954 #line 3544 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12955 12956 12957 12958 12959 #line default 12960 #line hidden 12961 12962 #line 3595 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12963 12964 12965 12966 12967 #line default 12968 #line hidden 12969 12970 #line 3604 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12971 12972 12973 12974 12975 #line default 12976 #line hidden 12977 12978 #line 3622 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12979 12980 12981 12982 12983 #line default 12984 #line hidden 12985 12986 #line 3646 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12987 12988 12989 12990 12991 #line default 12992 #line hidden 12993 12994 #line 3672 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 12995 12996 12997 12998 12999 #line default 13000 #line hidden 13001 13002 #line 3681 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 13003 13004 13005 13006 13007 #line default 13008 #line hidden 13009 13010 #line 3713 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 13011 13012 13013 13014 13015 #line default 13016 #line hidden 13017 13018 #line 3743 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 13019 13020 13021 13022 13023 #line default 13024 #line hidden 13025 13026 #line 3774 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 13027 13028 13029 13030 #line default 13031 #line hidden 13032 13033 #line 3789 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 13034 13035 13036 13037 #line default 13038 #line hidden 13039 13040 #line 3799 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 13041 13042 13043 13044 #line default 13045 #line hidden 13046 13047 #line 3825 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 13048 13049 13050 13051 #line default 13052 #line hidden 13053 13054 #line 3844 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 13055 13056 13057 13058 #line default 13059 #line hidden 13060 WriteLiteral("\r\n"); 13061 13062 13063 #line 3883 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 13064 13065 13066 13067 #line default 13068 #line hidden 13069 13070 #line 3908 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 13071 13072 13073 13074 13075 #line default 13076 #line hidden 13077 13078 #line 3936 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 13079 13080 13081 13082 #line default 13083 #line hidden 13084 WriteLiteral("\r\n\r\n"); 13085 13086 13087 #line 3939 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 13088 13089 var prodLoop = GetLoop("Products"); 13090 13091 13092 13093 #line default 13094 #line hidden 13095 WriteLiteral("\r\n <div"); 13096 13097 WriteLiteral(" class=\"container\""); 13098 13099 WriteLiteral(">\r\n <div"); 13100 13101 WriteLiteral(" class=\"row text-center brandsProdSlideshow\""); 13102 13103 WriteLiteral(">\r\n <h2"); 13104 13105 WriteLiteral(" class=\"featuredProductsBrandPageTitle\""); 13106 13107 WriteLiteral(">"); 13108 13109 13110 #line 3945 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 13111 Write(Translate("Featured Products")); 13112 13113 13114 #line default 13115 #line hidden 13116 WriteLiteral("</h2>\r\n \r\n"); 13117 13118 WriteLiteral(" "); 13119 13120 13121 #line 3947 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 13122 Write(RenderBrandPageFeaturedProducts(prodLoop)); 13123 13124 13125 #line default 13126 #line hidden 13127 WriteLiteral("\r\n \r\n </div>\r\n </div>\r\n\r\n"); 13128 13129 13130 #line 3952 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 13131 Write(SnippetStart("jsOnLoad")); 13132 13133 13134 #line default 13135 #line hidden 13136 WriteLiteral("\r\n"); 13137 13138 13139 #line 3953 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 13140 13141 var productsSortedByPrice = prodLoop.OrderBy(s => s.GetDouble("Ecom:Product.Price.Price")); 13142 var containsProducts = productsSortedByPrice.Any(); 13143 13144 var minPrice = containsProducts ? productsSortedByPrice.First().GetString("Ecom:Product.Price.Price") : ""; 13145 var maxPrice = containsProducts ? productsSortedByPrice.Last().GetString("Ecom:Product.Price.Price") : ""; 13146 13147 var groupsIds = Sanitize.Parameter("GroupID"); 13148 var price = Sanitize.Parameter("Price", ParameterType.Json); 13149 13150 13151 #line default 13152 #line hidden 13153 WriteLiteral("\r\nonLoadProductList(\""); 13154 13155 13156 #line 3963 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 13157 Write(minPrice.Replace(",", string.Empty)); 13158 13159 13160 #line default 13161 #line hidden 13162 WriteLiteral("\", \""); 13163 13164 13165 #line 3963 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 13166 Write(maxPrice.Replace(",", string.Empty)); 13167 13168 13169 #line default 13170 #line hidden 13171 WriteLiteral("\", \""); 13172 13173 13174 #line 3963 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 13175 Write(price); 13176 13177 13178 #line default 13179 #line hidden 13180 WriteLiteral("\", \""); 13181 13182 13183 #line 3963 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 13184 Write(groupsIds); 13185 13186 13187 #line default 13188 #line hidden 13189 WriteLiteral("\");\r\nonLoadBrandsProdSlideshow();\r\nonLoadBrandProductsList();\r\n"); 13190 13191 13192 #line 3966 "f:\Domains\Sites\componenthardware.com\Files\Templates\Designs\CHG\eCom\Productlist\FeaturedOnBrandsPage.cshtml" 13193 Write(SnippetEnd("jsOnLoad")); 13194 13195 13196 #line default 13197 #line hidden 13198 } 13199 } 13200 } 13201

1 @inherits RazorTemplateBase<RazorTemplateModel<Template>> 2 @using System 3 @using Dynamicweb.Rendering 4 @using System.Linq 5 @using Dna.Validation 6 @inherits RazorTemplateBase<RazorTemplateModel<Template>> 7 @using System 8 @using System.Linq 9 @using System.Text 10 @using System.Web 11 @using System.Collections.Generic 12 @using Dna.Frontend 13 @using Dna.Frontend.UI 14 @using Dna.Frontend.Forms 15 @using Dna.UrlServices 16 @using Dynamicweb.Core 17 @using Dynamicweb.Forms 18 @using Dynamicweb.Content 19 @using Dynamicweb.Ecommerce 20 @using Dynamicweb.Rendering 21 @using Dynamicweb.Security.UserManagement 22 @using SF.Snowball 23 @inherits RazorTemplateBase<RazorTemplateModel<Template>> 24 @using System 25 @using System.IO 26 @using System.Web 27 @using System.Linq 28 @using System.Text 29 @using System.Text.RegularExpressions 30 @using System.Collections.Generic 31 @using System.Collections.Specialized 32 @using Dna.Frontend 33 @using Dna.Validation 34 @using Dna.Frontend.UI 35 @using Dna.UrlServices 36 @using Dna.Frontend.Forms 37 @using Dynamicweb.Core 38 @using Dynamicweb.Forms 39 @using Dynamicweb.Rendering 40 @functions{ 41 42 #region Url functions 43 44 public string GetCustomerCenterSortUrl(string field, string listType = "Order") 45 { 46 var paragraphId = Pageview.CurrentParagraph.ID.ToString(); 47 var sortDirectionParameter = "CCSort" + listType + paragraphId; 48 var sortFieldParameter = "CC" + listType + "ByField" + paragraphId; 49 var sortDirection = Sanitize.Parameter(sortDirectionParameter) == "Desc" || Sanitize.Parameter(sortFieldParameter) == field ? "Desc" : "Asc"; 50 51 if (field.IsNotNullOrEmpty()) 52 { 53 return "/Default.aspx?Id=" + Pageview.Page.ID + "&" + sortFieldParameter + "=" + field + "&" + sortDirectionParameter + "=" + sortDirection; 54 } 55 56