Fragt | |||
Total Moms |
|
||
Total inkl. moms |
Error compiling template "Designs/Dwsimple/eCom/Product/Product.cshtml" Line 257: 'User.GetCurrentExtranetUser()' is obsolete: 'Use GetCurrentFrontendUser() instead.' Line 672: The name 'groups' does not exist in the current context Line 255: The variable 'hasSkiDeal' is assigned but its value is never used Line 1759: 'User.GetCurrentExtranetUser()' is obsolete: 'Use GetCurrentFrontendUser() instead.' Line 1880: 'Group.GetGroupById(string)' is obsolete: 'Use Services.ProductGroups.GetGroup instead.' Line 2018: 'User.GetCurrentExtranetUser()' is obsolete: 'Use GetCurrentFrontendUser() instead.' Line 2027: 'Product.GetProductById(string, string, string)' is obsolete: 'Use 'ProductService.GetProductById' instead' Line 2013: The variable 'Count' is assigned but its value is never used Line 2381: 'User.GetCurrentExtranetUser()' is obsolete: 'Use GetCurrentFrontendUser() instead.' Line 2786: The variable 'ex' is declared but never used
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 using System; 13 using System.Collections.Generic; 14 using System.Linq; 15 16 #line 27 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 17 using System.Web; 18 19 #line default 20 #line hidden 21 22 #line 2 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 23 using System.Net; 24 25 #line default 26 #line hidden 27 28 #line 18 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 29 using System.Globalization; 30 31 #line default 32 #line hidden 33 34 #line 607 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 35 using System.Text.RegularExpressions; 36 37 #line default 38 #line hidden 39 40 #line 5 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 41 using Dynamicweb; 42 43 #line default 44 #line hidden 45 46 #line 6 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 47 using Dynamicweb.Rendering; 48 49 #line default 50 #line hidden 51 52 #line 606 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 53 using Dynamicweb.Security.UserManagement; 54 55 #line default 56 #line hidden 57 58 #line 8 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 59 using System.IO; 60 61 #line default 62 #line hidden 63 64 #line 19 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 65 using Dynamicweb.Content; 66 67 #line default 68 #line hidden 69 70 #line 10 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 71 using Dynamicweb.Core; 72 73 #line default 74 #line hidden 75 76 #line 21 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 77 using Dynamicweb.Ecommerce.Products; 78 79 #line default 80 #line hidden 81 82 #line 608 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 83 using Hounisen.Website.Helpers; 84 85 #line default 86 #line hidden 87 88 #line 13 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 89 using VestjyskMarketing.Models; 90 91 #line default 92 #line hidden 93 94 #line 20 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 95 using Dynamicweb.Ecommerce; 96 97 #line default 98 #line hidden 99 100 101 public class RazorEngine_04b729d2a44c444eaf3b69e772bbf3cb : Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> { 102 103 #line hidden 104 105 #line 30 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 106 107 public class WrapMethods 108 { 109 //Gets the contrasting color 110 public static string getContrastYIQ(string hexcolor) 111 { 112 if (hexcolor != "") 113 { 114 hexcolor = Regex.Replace(hexcolor, "[^0-9a-zA-Z]+", ""); 115 116 int r = Convert.ToByte(hexcolor.Substring(0, 2), 16); 117 int g = Convert.ToByte(hexcolor.Substring(2, 2), 16); 118 int b = Convert.ToByte(hexcolor.Substring(4, 2), 16); 119 int yiq = ((r * 299) + (g * 587) + (b * 114)) / 1000; 120 121 if (yiq >= 128) 122 { 123 return "black"; 124 } 125 else 126 { 127 return "white"; 128 } 129 } 130 else 131 { 132 return "black"; 133 } 134 } 135 136 137 //Truncate text 138 public static string Truncate (string value, int count, bool strip=true) 139 { 140 if (strip == true){ 141 value = StripHtmlTagByCharArray(value); 142 } 143 144 if (value.Length > count) 145 { 146 value = value.Substring(0, count - 1) + "..."; 147 } 148 149 return value; 150 } 151 152 153 //Strip text from HTML 154 public static string StripHtmlTagByCharArray(string htmlString) 155 { 156 char[] array = new char[htmlString.Length]; 157 int arrayIndex = 0; 158 bool inside = false; 159 160 for (int i = 0; i < htmlString.Length; i++) 161 { 162 char let = htmlString[i]; 163 if (let == '<') 164 { 165 inside = true; 166 continue; 167 } 168 if (let == '>') 169 { 170 inside = false; 171 continue; 172 } 173 if (!inside) 174 { 175 array[arrayIndex] = let; 176 arrayIndex++; 177 } 178 } 179 return new string(array, 0, arrayIndex); 180 } 181 182 //Make the correct count of columns 183 public static string ColumnMaker(int Col, string ScreenSize) 184 { 185 string Columns = ""; 186 187 switch (Col) 188 { 189 case 1: 190 Columns = "col-"+ScreenSize+"-12"; 191 break; 192 193 case 2: 194 Columns = "col-"+ScreenSize+"-6"; 195 break; 196 197 case 3: 198 Columns = "col-"+ScreenSize+"-4"; 199 break; 200 201 case 4: 202 Columns = "col-"+ScreenSize+"-3"; 203 break; 204 205 default: 206 Columns = "col-"+ScreenSize+"-3"; 207 break; 208 } 209 210 return Columns; 211 } 212 213 214 private string Custom(string firstoption, string secondoption) 215 { 216 if (firstoption == "custom") 217 { 218 return secondoption; 219 } 220 else 221 { 222 return firstoption; 223 } 224 } 225 } 226 227 #line default 228 #line hidden 229 230 231 #line 157 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 232 public RazorEngine.Templating.TemplateWriter GetProductList(dynamic Loop, int ColMD = 3, int ColSM = 3, int ColXS = 1) 233 { 234 #line default 235 #line hidden 236 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 237 238 #line 158 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 239 240 int Count = 0; 241 242 int index = 1; 243 244 var embeddedScript = GetString("Ecom:Group:Field.ProductEmbeddedScript"); 245 var embedIndex = GetInteger("Ecom:Group:Field.EmbedScriptStartingIndex"); 246 247 IFormatProvider jsNumberFormat = new NumberFormatInfo() { NumberDecimalSeparator = ".", NumberGroupSeparator = "" }; 248 249 250 var groupService = new GroupService(); 251 var productService = new ProductService(); 252 var pageService = new PageService(); 253 254 // SKI AND Region H 255 bool hasSkiDeal = false; 256 bool hasRegionHDeal = false; 257 var currentUser = User.GetCurrentExtranetUser(); 258 if (currentUser != null) 259 { 260 var skiGroup = currentUser.Groups.FirstOrDefault(e => e.Name == "SKI"); 261 if (skiGroup != null && !string.IsNullOrEmpty(skiGroup.Name)) 262 { 263 hasSkiDeal = true; 264 } 265 266 hasRegionHDeal = Dynamicweb.Core.Converter.ToBoolean(currentUser.CustomFieldValues.Find(f => f.CustomField.SystemName == "AccessUser_RegionH").Value); 267 } 268 269 270 foreach (LoopItem product in Loop) 271 { 272 string GroupLink = "/Default.aspx?ID=" + product.GetString("Ecom:Product.PrimaryOrCurrentPageID") + "&groupid=" + product.GetString("Ecom:Product.PrimaryOrFirstGroupID") + "&productid=" + product.GetString("Ecom:Product.ID"); 273 // string GroupLink = product.GetString("Ecom:Product.LinkGroup.Clean"); 274 int stock = product.GetInteger("Ecom:Product.Stock"); 275 string Name = product.GetString("Ecom:Product.Name"); 276 string Description = product.GetString("Ecom:Product.ShortDescription"); 277 string prodID = product.GetString("Ecom:Product.ID"); 278 string prodVariantID = product.GetString("Ecom:Product.VariantID"); 279 string prodLanguageID = product.GetString("Ecom:Product.LanguageID"); 280 string Image = "/Admin/Public/GetImage.ashx?Image=/Files/Images/Ecom/Products/" + prodID + ".jpg&format=webp&quality=85"; 281 282 //prices and units 283 string defaultUnitId = product.GetString("Ecom:Product.DefaultUnitID"); 284 var prices = product.GetLoop("Product.Prices"); 285 List<string> pricesHtmlList = Hounisen.Website.Helpers.Helpers.PricesListMakeListString(prices); 286 List<Hounisen.Website.Models.Unit> unitsDropdown = Hounisen.Website.Helpers.Helpers.PopulateUnitsDropdown(prices); 287 var unitDefault = unitsDropdown.Where(x => x.Id.Equals(defaultUnitId)).FirstOrDefault(); 288 int minOrder = unitDefault != null ? unitDefault.MinOrder : 1; 289 290 if (!string.IsNullOrWhiteSpace(product.GetString("Ecom:Product.SelectedVariantComboID"))) 291 { 292 prodID = product.GetString("Ecom:Product.ID") + "&" + product.GetString("Ecom:Product.SelectedVariantComboID"); 293 } 294 295 GroupHelper gh = new GroupHelper(); 296 var masterPage = pageService.GetPage(product.GetInteger("Ecom:Product.PrimaryOrCurrentPageID")); 297 masterPage.GetDisplayName(); 298 299 var group = Dynamicweb.Ecommerce.Services.ProductGroups.GetGroup(product.GetString("Ecom:Product.PrimaryOrFirstGroupID")); 300 if (group != null) 301 { 302 var groupNames = gh.GetParentsRecursively(group, new List<string>()); 303 groupNames = gh.Format(groupNames, masterPage.GetDisplayName(), group); 304 var groups = gh.ListToString(groupNames); 305 } 306 307 308 309 #line default 310 #line hidden 311 WriteLiteralTo(__razor_helper_writer, " <div"); 312 313 WriteLiteralTo(__razor_helper_writer, " class=\"product-list__item\""); 314 315 WriteLiteralTo(__razor_helper_writer, ">\r\n <div"); 316 317 WriteLiteralTo(__razor_helper_writer, " class=\"col-xs-12\""); 318 319 WriteLiteralTo(__razor_helper_writer, ">\r\n <div"); 320 321 WriteLiteralTo(__razor_helper_writer, " class=\"product-list__item-inner\""); 322 323 WriteLiteralTo(__razor_helper_writer, ">\r\n <div"); 324 325 WriteLiteralTo(__razor_helper_writer, " class=\"col-xs-12 col-sm-4 col-flex\""); 326 327 WriteLiteralTo(__razor_helper_writer, ">\r\n\r\n <div"); 328 329 WriteLiteralTo(__razor_helper_writer, " class=\"product-list-item__primary-image\""); 330 331 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 332 333 334 #line 232 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 335 336 337 #line default 338 #line hidden 339 340 #line 232 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 341 if (currentUser != null) 342 { 343 344 345 #line default 346 #line hidden 347 WriteLiteralTo(__razor_helper_writer, " <a"); 348 349 WriteAttributeTo(__razor_helper_writer, "href", Tuple.Create(" href=\"", 8014), Tuple.Create("\"", 8031) 350 351 #line 234 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 352 , Tuple.Create(Tuple.Create("", 8021), Tuple.Create<System.Object, System.Int32>(GroupLink 353 354 #line default 355 #line hidden 356 , 8021), false) 357 ); 358 359 WriteAttributeTo(__razor_helper_writer, "title", Tuple.Create(" title=\"", 8032), Tuple.Create("\"", 8045) 360 361 #line 234 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 362 , Tuple.Create(Tuple.Create("", 8040), Tuple.Create<System.Object, System.Int32>(Name 363 364 #line default 365 #line hidden 366 , 8040), false) 367 ); 368 369 WriteLiteralTo(__razor_helper_writer, ">\r\n <img"); 370 371 WriteLiteralTo(__razor_helper_writer, " class=\"product-list-item__image lazy\""); 372 373 WriteAttributeTo(__razor_helper_writer, "alt", Tuple.Create(" alt=\"", 8127), Tuple.Create("\"", 8138) 374 375 #line 235 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 376 , Tuple.Create(Tuple.Create("", 8133), Tuple.Create<System.Object, System.Int32>(Name 377 378 #line default 379 #line hidden 380 , 8133), false) 381 ); 382 383 WriteLiteralTo(__razor_helper_writer, " data-src=\""); 384 385 386 #line 235 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 387 WriteTo(__razor_helper_writer, Image); 388 389 390 #line default 391 #line hidden 392 WriteLiteralTo(__razor_helper_writer, "&width=300\""); 393 394 WriteLiteralTo(__razor_helper_writer, " class=\"img-responsive img-center\""); 395 396 WriteLiteralTo(__razor_helper_writer, ">\r\n </a>\r\n"); 397 398 WriteLiteralTo(__razor_helper_writer, " <a"); 399 400 WriteLiteralTo(__razor_helper_writer, " class=\"fancybox\""); 401 402 WriteLiteralTo(__razor_helper_writer, " data-fancybox"); 403 404 WriteAttributeTo(__razor_helper_writer, "href", Tuple.Create(" href=\"", 8307), Tuple.Create("\"", 8331) 405 406 #line 237 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 407 , Tuple.Create(Tuple.Create("", 8314), Tuple.Create<System.Object, System.Int32>(Image 408 409 #line default 410 #line hidden 411 , 8314), false) 412 , Tuple.Create(Tuple.Create("", 8320), Tuple.Create("&width=1000", 8320), true) 413 ); 414 415 WriteAttributeTo(__razor_helper_writer, "title", Tuple.Create(" title=\"", 8332), Tuple.Create("\"", 8345) 416 417 #line 237 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 418 , Tuple.Create(Tuple.Create("", 8340), Tuple.Create<System.Object, System.Int32>(Name 419 420 #line default 421 #line hidden 422 , 8340), false) 423 ); 424 425 WriteLiteralTo(__razor_helper_writer, ">\r\n <svg"); 426 427 WriteLiteralTo(__razor_helper_writer, " class=\"product-list-item__image-icon\""); 428 429 WriteLiteralTo(__razor_helper_writer, ">\r\n <use"); 430 431 WriteLiteralTo(__razor_helper_writer, " xmlns:xlink=\"http://www.w3.org/1999/xlink\""); 432 433 WriteLiteralTo(__razor_helper_writer, " xlink:href=\"/dist/icons/icons.svg#fullscreen\""); 434 435 WriteLiteralTo(__razor_helper_writer, "></use>\r\n </svg>\r\n " + 436 " </a>\r\n"); 437 438 439 #line 242 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 440 } 441 else 442 { 443 444 445 #line default 446 #line hidden 447 WriteLiteralTo(__razor_helper_writer, " <a"); 448 449 WriteAttributeTo(__razor_helper_writer, "href", Tuple.Create(" href=\"", 8784), Tuple.Create("\"", 8801) 450 451 #line 245 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 452 , Tuple.Create(Tuple.Create("", 8791), Tuple.Create<System.Object, System.Int32>(GroupLink 453 454 #line default 455 #line hidden 456 , 8791), false) 457 ); 458 459 WriteAttributeTo(__razor_helper_writer, "title", Tuple.Create(" title=\"", 8802), Tuple.Create("\"", 8815) 460 461 #line 245 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 462 , Tuple.Create(Tuple.Create("", 8810), Tuple.Create<System.Object, System.Int32>(Name 463 464 #line default 465 #line hidden 466 , 8810), false) 467 ); 468 469 WriteLiteralTo(__razor_helper_writer, ">\r\n <img"); 470 471 WriteLiteralTo(__razor_helper_writer, " class=\"product-list-item__image lazy\""); 472 473 WriteAttributeTo(__razor_helper_writer, "alt", Tuple.Create(" alt=\"", 8897), Tuple.Create("\"", 8908) 474 475 #line 246 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 476 , Tuple.Create(Tuple.Create("", 8903), Tuple.Create<System.Object, System.Int32>(Name 477 478 #line default 479 #line hidden 480 , 8903), false) 481 ); 482 483 WriteLiteralTo(__razor_helper_writer, " data-src=\""); 484 485 486 #line 246 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 487 WriteTo(__razor_helper_writer, Image); 488 489 490 #line default 491 #line hidden 492 WriteLiteralTo(__razor_helper_writer, "&width=300\""); 493 494 WriteLiteralTo(__razor_helper_writer, " class=\"img-responsive img-center\""); 495 496 WriteLiteralTo(__razor_helper_writer, ">\r\n </a>\r\n"); 497 498 WriteLiteralTo(__razor_helper_writer, " <a"); 499 500 WriteLiteralTo(__razor_helper_writer, " class=\"fancybox\""); 501 502 WriteLiteralTo(__razor_helper_writer, " data-fancybox"); 503 504 WriteAttributeTo(__razor_helper_writer, "href", Tuple.Create(" href=\"", 9077), Tuple.Create("\"", 9101) 505 506 #line 248 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 507 , Tuple.Create(Tuple.Create("", 9084), Tuple.Create<System.Object, System.Int32>(Image 508 509 #line default 510 #line hidden 511 , 9084), false) 512 , Tuple.Create(Tuple.Create("", 9090), Tuple.Create("&width=1000", 9090), true) 513 ); 514 515 WriteAttributeTo(__razor_helper_writer, "title", Tuple.Create(" title=\"", 9102), Tuple.Create("\"", 9115) 516 517 #line 248 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 518 , Tuple.Create(Tuple.Create("", 9110), Tuple.Create<System.Object, System.Int32>(Name 519 520 #line default 521 #line hidden 522 , 9110), false) 523 ); 524 525 WriteLiteralTo(__razor_helper_writer, ">\r\n <svg"); 526 527 WriteLiteralTo(__razor_helper_writer, " class=\"product-list-item__image-icon\""); 528 529 WriteLiteralTo(__razor_helper_writer, ">\r\n <use"); 530 531 WriteLiteralTo(__razor_helper_writer, " xmlns:xlink=\"http://www.w3.org/1999/xlink\""); 532 533 WriteLiteralTo(__razor_helper_writer, " xlink:href=\"/dist/icons/icons.svg#fullscreen\""); 534 535 WriteLiteralTo(__razor_helper_writer, "></use>\r\n </svg>\r\n " + 536 " </a>\r\n"); 537 538 539 #line 253 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 540 } 541 542 543 #line default 544 #line hidden 545 WriteLiteralTo(__razor_helper_writer, "\r\n\r\n </div>\r\n"); 546 547 548 #line 257 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 549 550 551 #line default 552 #line hidden 553 554 #line 257 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 555 556 var productObj = productService.GetProductById(prodID, prodVariantID, prodLanguageID); 557 var overlayNameAndColors = new ProductImageOverlayHelper().GetTextAndColor(productObj); 558 559 560 561 #line default 562 #line hidden 563 WriteLiteralTo(__razor_helper_writer, " <div"); 564 565 WriteLiteralTo(__razor_helper_writer, " class=\"product__primary-image__overlay-container\""); 566 567 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 568 569 570 #line 262 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 571 572 573 #line default 574 #line hidden 575 576 #line 262 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 577 foreach (var overlayNameAndColo in overlayNameAndColors) 578 { 579 580 581 #line default 582 #line hidden 583 WriteLiteralTo(__razor_helper_writer, " <div"); 584 585 WriteAttributeTo(__razor_helper_writer, "style", Tuple.Create(" style=\"", 9989), Tuple.Create("\"", 10040) 586 , Tuple.Create(Tuple.Create("", 9997), Tuple.Create("background-color:", 9997), true) 587 588 #line 264 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 589 , Tuple.Create(Tuple.Create(" ", 10014), Tuple.Create<System.Object, System.Int32>(overlayNameAndColo.Value 590 591 #line default 592 #line hidden 593 , 10015), false) 594 ); 595 596 WriteLiteralTo(__razor_helper_writer, " class=\"product__primary-image__overlay-container__item\""); 597 598 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 599 600 WriteLiteralTo(__razor_helper_writer, " "); 601 602 603 #line 265 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 604 WriteTo(__razor_helper_writer, overlayNameAndColo.Key); 605 606 607 #line default 608 #line hidden 609 WriteLiteralTo(__razor_helper_writer, "\r\n </div>\r\n"); 610 611 612 #line 267 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 613 } 614 615 616 #line default 617 #line hidden 618 WriteLiteralTo(__razor_helper_writer, " </div>"); 619 620 621 #line 268 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 622 623 624 #line default 625 #line hidden 626 WriteLiteralTo(__razor_helper_writer, "\r\n </div>\r\n <div"); 627 628 WriteLiteralTo(__razor_helper_writer, " class=\"col-xs-12 col-sm-8\""); 629 630 WriteLiteralTo(__razor_helper_writer, ">\r\n <div"); 631 632 WriteLiteralTo(__razor_helper_writer, " class=\"product-list-item__info js-product-info\""); 633 634 WriteLiteralTo(__razor_helper_writer, ">\r\n <div"); 635 636 WriteLiteralTo(__razor_helper_writer, " class=\"row\""); 637 638 WriteLiteralTo(__razor_helper_writer, ">\r\n "); 639 640 WriteLiteralTo(__razor_helper_writer, "\r\n <div"); 641 642 WriteLiteralTo(__razor_helper_writer, " class=\"col-xs-12\""); 643 644 WriteLiteralTo(__razor_helper_writer, ">\r\n <h4"); 645 646 WriteLiteralTo(__razor_helper_writer, " data-name=\""); 647 648 649 #line 275 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 650 WriteTo(__razor_helper_writer, Name); 651 652 653 #line default 654 #line hidden 655 WriteLiteralTo(__razor_helper_writer, "\""); 656 657 WriteLiteralTo(__razor_helper_writer, " data-product_id=\""); 658 659 660 #line 275 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 661 WriteTo(__razor_helper_writer, prodID); 662 663 664 #line default 665 #line hidden 666 WriteLiteralTo(__razor_helper_writer, "\""); 667 668 WriteLiteralTo(__razor_helper_writer, " data-categories=\""); 669 670 671 #line 275 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 672 WriteTo(__razor_helper_writer, groups); 673 674 675 #line default 676 #line hidden 677 WriteLiteralTo(__razor_helper_writer, "\""); 678 679 WriteLiteralTo(__razor_helper_writer, " class=\"product-list-item__title\""); 680 681 WriteLiteralTo(__razor_helper_writer, ">\r\n <a"); 682 683 WriteLiteralTo(__razor_helper_writer, " class=\"product-list-item__title-link\""); 684 685 WriteAttributeTo(__razor_helper_writer, "href", Tuple.Create(" href=\"", 10807), Tuple.Create("\"", 10824) 686 687 #line 276 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 688 , Tuple.Create(Tuple.Create("", 10814), Tuple.Create<System.Object, System.Int32>(GroupLink 689 690 #line default 691 #line hidden 692 , 10814), false) 693 ); 694 695 WriteLiteralTo(__razor_helper_writer, ">"); 696 697 698 #line 276 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 699 WriteTo(__razor_helper_writer, Name); 700 701 702 #line default 703 #line hidden 704 WriteLiteralTo(__razor_helper_writer, "</a>\r\n </h4>\r\n " + 705 "</div>\r\n </div>\r\n <div"); 706 707 WriteLiteralTo(__razor_helper_writer, " class=\"row\""); 708 709 WriteLiteralTo(__razor_helper_writer, ">\r\n <div"); 710 711 WriteLiteralTo(__razor_helper_writer, " class=\"col-xs-12 col-sm-5\""); 712 713 WriteLiteralTo(__razor_helper_writer, ">\r\n\r\n <div"); 714 715 WriteLiteralTo(__razor_helper_writer, " class=\"product-list-item__attributes\""); 716 717 WriteLiteralTo(__razor_helper_writer, ">\r\n <p>\r\n " + 718 " <strong>Varenummer:</strong> "); 719 720 721 #line 285 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 722 WriteTo(__razor_helper_writer, product.GetString("Ecom:Product.Number")); 723 724 725 #line default 726 #line hidden 727 WriteLiteralTo(__razor_helper_writer, "\r\n </p>\r\n " + 728 " <p>\r\n <strong>"); 729 730 731 #line 288 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 732 WriteTo(__razor_helper_writer, product.GetString("Ecom:Product:Field.Attribut1A")); 733 734 735 #line default 736 #line hidden 737 WriteLiteralTo(__razor_helper_writer, ":</strong><br/>"); 738 739 740 #line 288 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 741 WriteTo(__razor_helper_writer, product.GetString("Ecom:Product:Field.Attribut1B")); 742 743 744 #line default 745 #line hidden 746 WriteLiteralTo(__razor_helper_writer, "\r\n </p>\r\n " + 747 " <p>\r\n <strong>"); 748 749 750 #line 291 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 751 WriteTo(__razor_helper_writer, product.GetString("Ecom:Product:Field.Attribut2A")); 752 753 754 #line default 755 #line hidden 756 WriteLiteralTo(__razor_helper_writer, ":</strong> "); 757 758 759 #line 291 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 760 WriteTo(__razor_helper_writer, product.GetString("Ecom:Product:Field.Attribut2B")); 761 762 763 #line default 764 #line hidden 765 WriteLiteralTo(__razor_helper_writer, "\r\n </p>\r\n " + 766 " </div>\r\n\r\n <div"); 767 768 WriteLiteralTo(__razor_helper_writer, " class=\"hidden-xs\""); 769 770 WriteLiteralTo(__razor_helper_writer, ">\r\n <div"); 771 772 WriteLiteralTo(__razor_helper_writer, " class=\"\""); 773 774 WriteLiteralTo(__razor_helper_writer, ">\r\n "); 775 776 WriteLiteralTo(__razor_helper_writer, "\r\n <div"); 777 778 WriteLiteralTo(__razor_helper_writer, " class=\"product-list-item__icons\""); 779 780 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 781 782 783 #line 299 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 784 785 786 #line default 787 #line hidden 788 789 #line 299 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 790 791 foreach (var c in product.GetString("Ecom:Product:Field.Certificates").Split(',')) 792 { 793 if (!string.IsNullOrEmpty(c)) 794 { 795 string src = "/Admin/Public/GetImage.ashx?Image=/Files/Images/Ecom/Certificates/" + @c + ".jpg&format=webp&quality=85&width=100"; 796 797 798 #line default 799 #line hidden 800 WriteLiteralTo(__razor_helper_writer, "<img"); 801 802 WriteLiteralTo(__razor_helper_writer, " class=\"product-list-item__icon lazy\""); 803 804 WriteAttributeTo(__razor_helper_writer, "alt", Tuple.Create(" alt=\"", 12865), Tuple.Create("\"", 12897) 805 806 #line 305 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 807 , Tuple.Create(Tuple.Create("", 12871), Tuple.Create<System.Object, System.Int32>(Translate("Cert_" + c, c) 808 809 #line default 810 #line hidden 811 , 12871), false) 812 ); 813 814 WriteAttributeTo(__razor_helper_writer, "title", Tuple.Create(" title=\"", 12898), Tuple.Create("\"", 12932) 815 816 #line 305 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 817 , Tuple.Create(Tuple.Create("", 12906), Tuple.Create<System.Object, System.Int32>(Translate("Cert_" + c, c) 818 819 #line default 820 #line hidden 821 , 12906), false) 822 ); 823 824 WriteLiteralTo(__razor_helper_writer, " data-src="); 825 826 827 #line 305 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 828 WriteTo(__razor_helper_writer, src); 829 830 831 #line default 832 #line hidden 833 WriteAttributeTo(__razor_helper_writer, "src", Tuple.Create(" src=", 12947), Tuple.Create("", 12956) 834 835 #line 305 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 836 , Tuple.Create(Tuple.Create("", 12952), Tuple.Create<System.Object, System.Int32>(src 837 838 #line default 839 #line hidden 840 , 12952), false) 841 ); 842 843 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 844 845 846 #line 306 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 847 } 848 } 849 850 851 #line default 852 #line hidden 853 WriteLiteralTo(__razor_helper_writer, "\r\n </div>\r\n " + 854 " </div>\r\n </div>\r\n " + 855 " </div>\r\n\r\n <div"); 856 857 WriteLiteralTo(__razor_helper_writer, " class=\"col-xs-12 col-sm-7\""); 858 859 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 860 861 862 #line 315 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 863 864 865 #line default 866 #line hidden 867 868 #line 315 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 869 if (Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) 870 { 871 872 873 #line default 874 #line hidden 875 WriteLiteralTo(__razor_helper_writer, " <ul"); 876 877 WriteLiteralTo(__razor_helper_writer, " class=\"product-list-item__prices\""); 878 879 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 880 881 882 #line 318 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 883 884 885 #line default 886 #line hidden 887 888 #line 318 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 889 foreach (var priceHtml in pricesHtmlList) 890 { 891 892 893 #line default 894 #line hidden 895 WriteLiteralTo(__razor_helper_writer, " <li>\r\n"); 896 897 WriteLiteralTo(__razor_helper_writer, " "); 898 899 900 #line 321 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 901 WriteTo(__razor_helper_writer, priceHtml); 902 903 904 #line default 905 #line hidden 906 WriteLiteralTo(__razor_helper_writer, "\r\n </li>\r\n"); 907 908 909 #line 323 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 910 } 911 912 913 #line default 914 #line hidden 915 WriteLiteralTo(__razor_helper_writer, " </ul>\r\n"); 916 917 918 #line 325 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 919 } 920 921 922 #line default 923 #line hidden 924 WriteLiteralTo(__razor_helper_writer, " </div>\r\n </div>\r\n\r\n " + 925 " <div"); 926 927 WriteLiteralTo(__razor_helper_writer, " class=\"row\""); 928 929 WriteLiteralTo(__razor_helper_writer, ">\r\n <div"); 930 931 WriteLiteralTo(__razor_helper_writer, " class=\"col-xs-12 col-sm-4 col-lg-5\""); 932 933 WriteLiteralTo(__razor_helper_writer, ">\r\n "); 934 935 WriteLiteralTo(__razor_helper_writer, "\r\n <div"); 936 937 WriteLiteralTo(__razor_helper_writer, " class=\"product-list-item__stock\""); 938 939 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 940 941 942 #line 333 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 943 944 945 #line default 946 #line hidden 947 948 #line 333 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 949 950 if (stock > 0) 951 { 952 953 954 #line default 955 #line hidden 956 WriteLiteralTo(__razor_helper_writer, " <p"); 957 958 WriteLiteralTo(__razor_helper_writer, " class=\"product-list-item__stock-text\""); 959 960 WriteLiteralTo(__razor_helper_writer, ">\r\n <span"); 961 962 WriteLiteralTo(__razor_helper_writer, " class=\"product-list-item__stock-circle product-list-item__stock-circle--green\""); 963 964 WriteLiteralTo(__razor_helper_writer, "></span> På lager\r\n </p>\r\n"); 965 966 967 #line 339 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 968 } 969 else 970 { 971 972 973 #line default 974 #line hidden 975 WriteLiteralTo(__razor_helper_writer, " <p"); 976 977 WriteLiteralTo(__razor_helper_writer, " class=\"product-list-item__stock-text\""); 978 979 WriteLiteralTo(__razor_helper_writer, ">\r\n <span"); 980 981 WriteLiteralTo(__razor_helper_writer, " class=\"product-list-item__stock-circle product-list-item__stock-circle--yellow\""); 982 983 WriteLiteralTo(__razor_helper_writer, "></span> Kontakt os for leveringstid: 86210800 eller salg@hounisen.com\r\n " + 984 " </p>\r\n"); 985 986 987 #line 345 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 988 } 989 990 991 #line default 992 #line hidden 993 WriteLiteralTo(__razor_helper_writer, "\r\n </div>\r\n\r\n " + 994 " <div"); 995 996 WriteLiteralTo(__razor_helper_writer, " class=\"product-list-item__see-product\""); 997 998 WriteLiteralTo(__razor_helper_writer, ">\r\n <a"); 999 1000 WriteLiteralTo(__razor_helper_writer, " class=\"product-list-item__link\""); 1001 1002 WriteAttributeTo(__razor_helper_writer, "href", Tuple.Create(" href=\"", 15635), Tuple.Create("\"", 15652) 1003 1004 #line 350 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1005 , Tuple.Create(Tuple.Create("", 15642), Tuple.Create<System.Object, System.Int32>(GroupLink 1006 1007 #line default 1008 #line hidden 1009 , 15642), false) 1010 ); 1011 1012 WriteLiteralTo(__razor_helper_writer, " class=\"\""); 1013 1014 WriteLiteralTo(__razor_helper_writer, ">"); 1015 1016 1017 #line 350 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1018 WriteTo(__razor_helper_writer, Translate("See product", "Se produkt")); 1019 1020 1021 #line default 1022 #line hidden 1023 WriteLiteralTo(__razor_helper_writer, "</a>\r\n </div>\r\n " + 1024 " </div>\r\n <div"); 1025 1026 WriteLiteralTo(__razor_helper_writer, " class=\"col-xs-12 col-sm-8 col-lg-7\""); 1027 1028 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 1029 1030 1031 #line 354 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1032 1033 1034 #line default 1035 #line hidden 1036 1037 #line 354 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1038 if (Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) 1039 { 1040 1041 1042 #line default 1043 #line hidden 1044 WriteLiteralTo(__razor_helper_writer, " <div"); 1045 1046 WriteLiteralTo(__razor_helper_writer, " class=\"row\""); 1047 1048 WriteLiteralTo(__razor_helper_writer, ">\r\n <div"); 1049 1050 WriteLiteralTo(__razor_helper_writer, " class=\"col-xs-7\""); 1051 1052 WriteLiteralTo(__razor_helper_writer, ">\r\n <div"); 1053 1054 WriteLiteralTo(__razor_helper_writer, " class=\"product__addtocart-input js-addtocart-input\""); 1055 1056 WriteLiteralTo(__razor_helper_writer, ">\r\n <input"); 1057 1058 WriteLiteralTo(__razor_helper_writer, " type=\"button\""); 1059 1060 WriteLiteralTo(__razor_helper_writer, " value=\"-\""); 1061 1062 WriteLiteralTo(__razor_helper_writer, " class=\"product-list-item__quantity-button product-list-item__quantity-button--mi" + 1063 "nus qtyminus\""); 1064 1065 WriteLiteralTo(__razor_helper_writer, " field=\"quantity\""); 1066 1067 WriteLiteralTo(__razor_helper_writer, "/>\r\n <input"); 1068 1069 WriteLiteralTo(__razor_helper_writer, " type=\"number\""); 1070 1071 WriteLiteralTo(__razor_helper_writer, " class=\"product__quantity-input product-list-item__quantity-input quantity\""); 1072 1073 WriteLiteralTo(__razor_helper_writer, " data-name=\"quantity\""); 1074 1075 WriteLiteralTo(__razor_helper_writer, " name=\"quantity\""); 1076 1077 WriteAttributeTo(__razor_helper_writer, "value", Tuple.Create(" value=\"", 16644), Tuple.Create("\"", 16661) 1078 1079 #line 360 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1080 , Tuple.Create(Tuple.Create("", 16652), Tuple.Create<System.Object, System.Int32>(minOrder 1081 1082 #line default 1083 #line hidden 1084 , 16652), false) 1085 ); 1086 1087 WriteLiteralTo(__razor_helper_writer, " field=\"quantity\""); 1088 1089 WriteLiteralTo(__razor_helper_writer, "/>\r\n <input"); 1090 1091 WriteLiteralTo(__razor_helper_writer, " type=\"button\""); 1092 1093 WriteLiteralTo(__razor_helper_writer, " value=\"+\""); 1094 1095 WriteLiteralTo(__razor_helper_writer, " class=\"product-list-item__quantity-button product-list-item__quantity-button--pl" + 1096 "us qtyplus\""); 1097 1098 WriteLiteralTo(__razor_helper_writer, " field=\"quantity\""); 1099 1100 WriteLiteralTo(__razor_helper_writer, "/>\r\n </div>\r\n " + 1101 " <div"); 1102 1103 WriteLiteralTo(__razor_helper_writer, " class=\"product__unit-selector\""); 1104 1105 WriteLiteralTo(__razor_helper_writer, " style=\"display: inline-block;\""); 1106 1107 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 1108 1109 1110 #line 364 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1111 1112 1113 #line default 1114 #line hidden 1115 1116 #line 364 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1117 1118 int counter = 0; 1119 1120 1121 #line default 1122 #line hidden 1123 WriteLiteralTo(__razor_helper_writer, "\r\n"); 1124 1125 1126 #line 367 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1127 1128 1129 #line default 1130 #line hidden 1131 1132 #line 367 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1133 foreach (var unitDropdown in unitsDropdown) 1134 { 1135 var currentUnitPrice = prices[counter].Values["Ecom:Product.Prices.Amount"]; 1136 1137 1138 #line default 1139 #line hidden 1140 WriteLiteralTo(__razor_helper_writer, " <input"); 1141 1142 WriteLiteralTo(__razor_helper_writer, " type=\"radio\""); 1143 1144 WriteLiteralTo(__razor_helper_writer, " data-id=\""); 1145 1146 1147 #line 370 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1148 WriteTo(__razor_helper_writer, index); 1149 1150 1151 #line default 1152 #line hidden 1153 WriteLiteralTo(__razor_helper_writer, "\""); 1154 1155 WriteLiteralTo(__razor_helper_writer, " data-price=\""); 1156 1157 1158 #line 370 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1159 WriteTo(__razor_helper_writer, currentUnitPrice); 1160 1161 1162 #line default 1163 #line hidden 1164 WriteLiteralTo(__razor_helper_writer, "\""); 1165 1166 WriteLiteralTo(__razor_helper_writer, " class=\"unit-type\""); 1167 1168 WriteAttributeTo(__razor_helper_writer, "id", Tuple.Create(" id=\"", 17664), Tuple.Create("\"", 17696) 1169 1170 #line 370 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1171 , Tuple.Create(Tuple.Create("", 17669), Tuple.Create<System.Object, System.Int32>(unitDropdown.Id + prodID 1172 1173 #line default 1174 #line hidden 1175 , 17669), false) 1176 ); 1177 1178 WriteAttributeTo(__razor_helper_writer, "name", Tuple.Create(" name=\"", 17697), Tuple.Create("\"", 17753) 1179 , Tuple.Create(Tuple.Create("", 17704), Tuple.Create("UnitID", 17704), true) 1180 1181 #line 370 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1182 , Tuple.Create(Tuple.Create("", 17710), Tuple.Create<System.Object, System.Int32>(product.GetString("Ecom:Product.Number") 1183 1184 #line default 1185 #line hidden 1186 , 17710), false) 1187 ); 1188 1189 WriteAttributeTo(__razor_helper_writer, "value", Tuple.Create(" value=\"", 17754), Tuple.Create("\"", 17778) 1190 1191 #line 370 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1192 , Tuple.Create(Tuple.Create("", 17762), Tuple.Create<System.Object, System.Int32>(unitDropdown.Id 1193 1194 #line default 1195 #line hidden 1196 , 17762), false) 1197 ); 1198 1199 WriteLiteralTo(__razor_helper_writer, " required"); 1200 1201 WriteLiteralTo(__razor_helper_writer, " data-lot-size=\""); 1202 1203 1204 #line 370 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1205 WriteTo(__razor_helper_writer, unitDropdown.LotSize); 1206 1207 1208 #line default 1209 #line hidden 1210 WriteLiteralTo(__razor_helper_writer, "\""); 1211 1212 WriteLiteralTo(__razor_helper_writer, " data-min-order=\""); 1213 1214 1215 #line 370 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1216 WriteTo(__razor_helper_writer, unitDropdown.MinOrder); 1217 1218 1219 #line default 1220 #line hidden 1221 WriteLiteralTo(__razor_helper_writer, "\""); 1222 1223 WriteLiteralTo(__razor_helper_writer, " "); 1224 1225 1226 #line 370 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1227 WriteTo(__razor_helper_writer, unitsDropdown.Count == 1 ? "checked='checked'" : ""); 1228 1229 1230 #line default 1231 #line hidden 1232 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 1233 1234 WriteLiteralTo(__razor_helper_writer, " <label"); 1235 1236 WriteAttributeTo(__razor_helper_writer, "for", Tuple.Create(" for=\"", 17986), Tuple.Create("\"", 18019) 1237 1238 #line 371 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1239 , Tuple.Create(Tuple.Create("", 17992), Tuple.Create<System.Object, System.Int32>(unitDropdown.Id + prodID 1240 1241 #line default 1242 #line hidden 1243 , 17992), false) 1244 ); 1245 1246 WriteLiteralTo(__razor_helper_writer, ">"); 1247 1248 1249 #line 371 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1250 WriteTo(__razor_helper_writer, unitDropdown.Name); 1251 1252 1253 #line default 1254 #line hidden 1255 WriteLiteralTo(__razor_helper_writer, "</label>\r\n"); 1256 1257 1258 #line 372 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1259 counter++; 1260 } 1261 1262 1263 #line default 1264 #line hidden 1265 WriteLiteralTo(__razor_helper_writer, " </div>\r\n " + 1266 " <p"); 1267 1268 WriteLiteralTo(__razor_helper_writer, " class=\"product__unit-selector-error-message\""); 1269 1270 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 1271 1272 WriteLiteralTo(__razor_helper_writer, " "); 1273 1274 1275 #line 376 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1276 WriteTo(__razor_helper_writer, Translate("unit-error-message", "* Du mangler at vælge type")); 1277 1278 1279 #line default 1280 #line hidden 1281 WriteLiteralTo(__razor_helper_writer, "\r\n </p>\r\n " + 1282 " </div>\r\n <div"); 1283 1284 WriteLiteralTo(__razor_helper_writer, " class=\"col-xs-5\""); 1285 1286 WriteLiteralTo(__razor_helper_writer, ">\r\n <div"); 1287 1288 WriteLiteralTo(__razor_helper_writer, " class=\"product__addtocart-button\""); 1289 1290 WriteLiteralTo(__razor_helper_writer, ">\r\n <button"); 1291 1292 WriteLiteralTo(__razor_helper_writer, " data-id=\""); 1293 1294 1295 #line 381 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1296 WriteTo(__razor_helper_writer, index); 1297 1298 1299 #line default 1300 #line hidden 1301 WriteLiteralTo(__razor_helper_writer, "\""); 1302 1303 WriteLiteralTo(__razor_helper_writer, " type=\"submit\""); 1304 1305 WriteLiteralTo(__razor_helper_writer, " name=\"submit\""); 1306 1307 WriteAttributeTo(__razor_helper_writer, "onclick", Tuple.Create(" onclick=\"", 18809), Tuple.Create("\"", 19032) 1308 , Tuple.Create(Tuple.Create("", 18819), Tuple.Create("AddToCart(event,", 18819), true) 1309 , Tuple.Create(Tuple.Create(" ", 18835), Tuple.Create("\'", 18836), true) 1310 1311 #line 381 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1312 , Tuple.Create(Tuple.Create("", 18837), Tuple.Create<System.Object, System.Int32>(prodID 1313 1314 #line default 1315 #line hidden 1316 , 18837), false) 1317 , Tuple.Create(Tuple.Create("", 18844), Tuple.Create("\',", 18844), true) 1318 , Tuple.Create(Tuple.Create(" ", 18846), Tuple.Create("$(this).parent().parent().prev().find(\'input.quantity\').val(),", 18847), true) 1319 , Tuple.Create(Tuple.Create(" ", 18909), Tuple.Create("$(this).parent().parent().prev().find(\'input[name=\\\'UnitID", 18910), true) 1320 1321 #line 381 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1322 , Tuple.Create(Tuple.Create("", 18968), Tuple.Create<System.Object, System.Int32>(product.GetString("Ecom:Product.Number") 1323 1324 #line default 1325 #line hidden 1326 , 18968), false) 1327 , Tuple.Create(Tuple.Create("", 19011), Tuple.Create("\\\']:checked\').val());", 19011), true) 1328 ); 1329 1330 WriteLiteralTo(__razor_helper_writer, " class=\"btn btn-primary product__button\""); 1331 1332 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 1333 1334 WriteLiteralTo(__razor_helper_writer, " "); 1335 1336 1337 #line 382 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1338 WriteTo(__razor_helper_writer, Translate("Add to cart", "Add to cart")); 1339 1340 1341 #line default 1342 #line hidden 1343 WriteLiteralTo(__razor_helper_writer, "\r\n <svg"); 1344 1345 WriteLiteralTo(__razor_helper_writer, " class=\"product__button-icon hidden-xs\""); 1346 1347 WriteLiteralTo(__razor_helper_writer, ">\r\n <use"); 1348 1349 WriteLiteralTo(__razor_helper_writer, " xmlns:xlink=\"http://www.w3.org/1999/xlink\""); 1350 1351 WriteLiteralTo(__razor_helper_writer, " xlink:href=\"/dist/icons/icons.svg#basket\""); 1352 1353 WriteLiteralTo(__razor_helper_writer, "></use>\r\n </svg>\r\n " + 1354 " </button>\r\n " + 1355 " <div"); 1356 1357 WriteLiteralTo(__razor_helper_writer, " class=\"product-list-item__favorite-list popup-wrap favorite\""); 1358 1359 WriteLiteralTo(__razor_helper_writer, ">\r\n\r\n"); 1360 1361 1362 #line 389 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1363 1364 1365 #line default 1366 #line hidden 1367 1368 #line 389 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1369 if (hasRegionHDeal == false) 1370 { 1371 1372 1373 #line default 1374 #line hidden 1375 WriteLiteralTo(__razor_helper_writer, " <button"); 1376 1377 WriteLiteralTo(__razor_helper_writer, " class=\"popup-show\""); 1378 1379 WriteLiteralTo(__razor_helper_writer, " data-popup=\"favorite-list\""); 1380 1381 WriteLiteralTo(__razor_helper_writer, " type=\"button\""); 1382 1383 WriteAttributeTo(__razor_helper_writer, "title", Tuple.Create(" title=\"", 19956), Tuple.Create("\"", 20014) 1384 1385 #line 391 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1386 , Tuple.Create(Tuple.Create("", 19964), Tuple.Create<System.Object, System.Int32>(Translate("Add to favorites", "Add to favorites") 1387 1388 #line default 1389 #line hidden 1390 , 19964), false) 1391 ); 1392 1393 WriteLiteralTo(__razor_helper_writer, ">\r\n <i"); 1394 1395 WriteLiteralTo(__razor_helper_writer, " class=\"fa fa-star-o\""); 1396 1397 WriteLiteralTo(__razor_helper_writer, "></i> <span>Tilføj til liste</span>\r\n " + 1398 " </button>\r\n"); 1399 1400 WriteLiteralTo(__razor_helper_writer, " <div"); 1401 1402 WriteLiteralTo(__razor_helper_writer, " id=\"favorite-list\""); 1403 1404 WriteLiteralTo(__razor_helper_writer, " class=\"popup-form\""); 1405 1406 WriteLiteralTo(__razor_helper_writer, ">\r\n <div"); 1407 1408 WriteLiteralTo(__razor_helper_writer, " class=\"close\""); 1409 1410 WriteLiteralTo(__razor_helper_writer, ">\r\n <i"); 1411 1412 WriteLiteralTo(__razor_helper_writer, " class=\"fa fa-times\""); 1413 1414 WriteLiteralTo(__razor_helper_writer, "></i>\r\n </div>\r\n " + 1415 " <h3>"); 1416 1417 1418 #line 398 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1419 WriteTo(__razor_helper_writer, Translate("Choose list", "Choose list")); 1420 1421 1422 #line default 1423 #line hidden 1424 WriteLiteralTo(__razor_helper_writer, "</h3>\r\n <ul>\r\n"); 1425 1426 1427 #line 400 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1428 1429 1430 #line default 1431 #line hidden 1432 1433 #line 400 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1434 1435 var lists = Dynamicweb.Ecommerce.CustomerCenter.CustomerProductList.GetListsByUserCustomerNumber(currentUser.CustomerNumber); 1436 1437 1438 #line default 1439 #line hidden 1440 WriteLiteralTo(__razor_helper_writer, "\r\n\r\n"); 1441 1442 1443 #line 404 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1444 1445 1446 #line default 1447 #line hidden 1448 1449 #line 404 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1450 foreach (var list in lists) 1451 { 1452 if (list.Products.Where(p => p.ProductId.ToString() == prodID).Count() > 0) 1453 { 1454 1455 1456 #line default 1457 #line hidden 1458 WriteLiteralTo(__razor_helper_writer, " <li>\r" + 1459 "\n " + 1460 " <a"); 1461 1462 WriteAttributeTo(__razor_helper_writer, "href", Tuple.Create(" href=\"", 21658), Tuple.Create("\"", 21827) 1463 1464 #line 409 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1465 , Tuple.Create(Tuple.Create("", 21665), Tuple.Create<System.Object, System.Int32>(System.Web.HttpContext.Current.Request.Url 1466 1467 #line default 1468 #line hidden 1469 , 21665), false) 1470 , Tuple.Create(Tuple.Create("", 21710), Tuple.Create("&CCRemoveFromMyLists=", 21710), true) 1471 1472 #line 409 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1473 , Tuple.Create(Tuple.Create("", 21731), Tuple.Create<System.Object, System.Int32>(prodID 1474 1475 #line default 1476 #line hidden 1477 , 21731), false) 1478 , Tuple.Create(Tuple.Create("", 21738), Tuple.Create("&CCAddToListVariantID=&CCAddToListLanguageID=LANG1&CCAddToListID=", 21738), true) 1479 1480 #line 409 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1481 , Tuple.Create(Tuple.Create("", 21803), Tuple.Create<System.Object, System.Int32>(list.ListId 1482 1483 #line default 1484 #line hidden 1485 , 21803), false) 1486 , Tuple.Create(Tuple.Create("", 21815), Tuple.Create("&CCListType=", 21815), true) 1487 ); 1488 1489 WriteLiteralTo(__razor_helper_writer, ">\r\n " + 1490 " <i"); 1491 1492 WriteLiteralTo(__razor_helper_writer, " class=\"fa fa-star\""); 1493 1494 WriteLiteralTo(__razor_helper_writer, "></i> "); 1495 1496 1497 #line 410 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1498 WriteTo(__razor_helper_writer, list.Name); 1499 1500 1501 #line default 1502 #line hidden 1503 WriteLiteralTo(__razor_helper_writer, "\r\n " + 1504 " </a>\r\n " + 1505 " </li>\r\n"); 1506 1507 1508 #line 413 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1509 } 1510 else 1511 { 1512 1513 1514 #line default 1515 #line hidden 1516 WriteLiteralTo(__razor_helper_writer, " <li>\r" + 1517 "\n " + 1518 " <a"); 1519 1520 WriteAttributeTo(__razor_helper_writer, "href", Tuple.Create(" href=\"", 22515), Tuple.Create("\"", 22679) 1521 1522 #line 417 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1523 , Tuple.Create(Tuple.Create("", 22522), Tuple.Create<System.Object, System.Int32>(System.Web.HttpContext.Current.Request.Url 1524 1525 #line default 1526 #line hidden 1527 , 22522), false) 1528 , Tuple.Create(Tuple.Create("", 22567), Tuple.Create("&CCAddToMyLists=", 22567), true) 1529 1530 #line 417 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1531 , Tuple.Create(Tuple.Create("", 22583), Tuple.Create<System.Object, System.Int32>(prodID 1532 1533 #line default 1534 #line hidden 1535 , 22583), false) 1536 , Tuple.Create(Tuple.Create("", 22590), Tuple.Create("&CCAddToListVariantID=&CCAddToListLanguageID=LANG1&CCAddToListID=", 22590), true) 1537 1538 #line 417 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1539 , Tuple.Create(Tuple.Create("", 22655), Tuple.Create<System.Object, System.Int32>(list.ListId 1540 1541 #line default 1542 #line hidden 1543 , 22655), false) 1544 , Tuple.Create(Tuple.Create("", 22667), Tuple.Create("&CCListType=", 22667), true) 1545 ); 1546 1547 WriteLiteralTo(__razor_helper_writer, ">\r\n " + 1548 " <i"); 1549 1550 WriteLiteralTo(__razor_helper_writer, " class=\"fa fa-star-o\""); 1551 1552 WriteLiteralTo(__razor_helper_writer, "></i> "); 1553 1554 1555 #line 418 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1556 WriteTo(__razor_helper_writer, list.Name); 1557 1558 1559 #line default 1560 #line hidden 1561 WriteLiteralTo(__razor_helper_writer, "\r\n " + 1562 " </a>\r\n " + 1563 " </li>\r\n"); 1564 1565 1566 #line 421 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1567 } 1568 } 1569 1570 1571 #line default 1572 #line hidden 1573 WriteLiteralTo(__razor_helper_writer, " <li>\r\n " + 1574 " <a"); 1575 1576 WriteAttributeTo(__razor_helper_writer, "href", Tuple.Create(" href=\"", 23271), Tuple.Create("\"", 23323) 1577 , Tuple.Create(Tuple.Create("", 23278), Tuple.Create("/favoritter/opret-favoritliste?ProdID=", 23278), true) 1578 1579 #line 424 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1580 , Tuple.Create(Tuple.Create("", 23316), Tuple.Create<System.Object, System.Int32>(prodID 1581 1582 #line default 1583 #line hidden 1584 , 23316), false) 1585 ); 1586 1587 WriteLiteralTo(__razor_helper_writer, ">\r\n <i" + 1588 ""); 1589 1590 WriteLiteralTo(__razor_helper_writer, " class=\"fa fa-plus\""); 1591 1592 WriteLiteralTo(__razor_helper_writer, "></i>"); 1593 1594 1595 #line 425 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1596 WriteTo(__razor_helper_writer, Translate("Add new list", "Add new list")); 1597 1598 1599 #line default 1600 #line hidden 1601 WriteLiteralTo(__razor_helper_writer, @" 1602 </a> 1603 </li> 1604 </ul> 1605 </div> 1606 "); 1607 1608 1609 #line 430 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1610 } 1611 1612 1613 #line default 1614 #line hidden 1615 WriteLiteralTo(__razor_helper_writer, "\r\n </div>\r\n " + 1616 " </div>\r\n " + 1617 " </div>\r\n </div>\r\n"); 1618 1619 1620 #line 436 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1621 } 1622 else 1623 { 1624 1625 1626 #line default 1627 #line hidden 1628 WriteLiteralTo(__razor_helper_writer, " <div"); 1629 1630 WriteLiteralTo(__razor_helper_writer, " class=\"not-loggedin\""); 1631 1632 WriteLiteralTo(__razor_helper_writer, ">\r\n <p"); 1633 1634 WriteLiteralTo(__razor_helper_writer, " class=\"not-loggedin-text\""); 1635 1636 WriteLiteralTo(__razor_helper_writer, "><a"); 1637 1638 WriteLiteralTo(__razor_helper_writer, " data-toggle=\"modal\""); 1639 1640 WriteLiteralTo(__razor_helper_writer, " data-target=\"#login\""); 1641 1642 WriteLiteralTo(__razor_helper_writer, " href=\"\""); 1643 1644 WriteLiteralTo(__razor_helper_writer, ">"); 1645 1646 1647 #line 440 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1648 WriteTo(__razor_helper_writer, Translate("Login", "Login")); 1649 1650 1651 #line default 1652 #line hidden 1653 WriteLiteralTo(__razor_helper_writer, "</a> eller <a"); 1654 1655 WriteLiteralTo(__razor_helper_writer, " href=\"/kontakt/opret-brugerprofil\""); 1656 1657 WriteLiteralTo(__razor_helper_writer, ">Bliv kunde</a> for at se priser og købe på Hounisen.com</p>\r\n " + 1658 " <a"); 1659 1660 WriteLiteralTo(__razor_helper_writer, " data-toggle=\"modal\""); 1661 1662 WriteLiteralTo(__razor_helper_writer, " data-target=\"#login\""); 1663 1664 WriteLiteralTo(__razor_helper_writer, " href=\"\""); 1665 1666 WriteLiteralTo(__razor_helper_writer, " class=\"btn btn-primary not-loggedin-button\""); 1667 1668 WriteLiteralTo(__razor_helper_writer, ">\r\n <span>Log ind</span>\r\n " + 1669 " </a>\r\n " + 1670 " </div>\r\n"); 1671 1672 1673 #line 445 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1674 } 1675 1676 1677 #line default 1678 #line hidden 1679 WriteLiteralTo(__razor_helper_writer, " </div>\r\n </div>\r\n " + 1680 " </div>\r\n\r\n\r\n </div>\r\n </div" + 1681 ">\r\n </div>\r\n </div>\r\n"); 1682 1683 1684 #line 455 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1685 1686 if (index == embedIndex) 1687 { 1688 1689 1690 #line default 1691 #line hidden 1692 WriteLiteralTo(__razor_helper_writer, " <div"); 1693 1694 WriteLiteralTo(__razor_helper_writer, " class=\"product-list__item\""); 1695 1696 WriteLiteralTo(__razor_helper_writer, ">\r\n <div"); 1697 1698 WriteLiteralTo(__razor_helper_writer, " class=\"col-xs-12\""); 1699 1700 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 1701 1702 WriteLiteralTo(__razor_helper_writer, " "); 1703 1704 1705 #line 460 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1706 WriteTo(__razor_helper_writer, embeddedScript); 1707 1708 1709 #line default 1710 #line hidden 1711 WriteLiteralTo(__razor_helper_writer, "\r\n </div>\r\n </div>\r\n"); 1712 1713 1714 #line 463 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1715 } 1716 1717 1718 Count++; 1719 index++; 1720 1721 if (Count == ColMD) 1722 { 1723 1724 1725 #line default 1726 #line hidden 1727 WriteLiteralTo(__razor_helper_writer, " <div"); 1728 1729 WriteLiteralTo(__razor_helper_writer, " class=\"row\""); 1730 1731 WriteLiteralTo(__razor_helper_writer, "></div>\r\n"); 1732 1733 1734 #line 472 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1735 Count = 0; 1736 } 1737 } 1738 1739 1740 #line default 1741 #line hidden 1742 }); 1743 1744 #line 475 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1745 } 1746 #line default 1747 #line hidden 1748 1749 1750 #line 550 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1751 public RazorEngine.Templating.TemplateWriter GetProductListRelated(dynamic Loop, int ColMD = 3, int ColSM = 3, int ColXS = 1) 1752 { 1753 #line default 1754 #line hidden 1755 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 1756 1757 #line 551 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1758 1759 var currentUser = User.GetCurrentExtranetUser(); 1760 1761 1762 1763 #line default 1764 #line hidden 1765 WriteLiteralTo(__razor_helper_writer, " <ul"); 1766 1767 WriteLiteralTo(__razor_helper_writer, " class=\"shop-list__list\""); 1768 1769 WriteLiteralTo(__razor_helper_writer, ">\r\n\r\n"); 1770 1771 1772 #line 556 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1773 1774 1775 #line default 1776 #line hidden 1777 1778 #line 556 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1779 foreach (LoopItem product in Loop) 1780 { 1781 1782 string GroupLink = "/Default.aspx?ID=" + product.GetString("Ecom:Product.PrimaryOrCurrentPageID") + "&groupid=" + product.GetString("Ecom:Product.PrimaryOrFirstGroupID") + "&productid=" + product.GetString("Ecom:Product.ID"); 1783 string Name = product.GetString("Ecom:Product.Name"); 1784 string Description = product.GetString("Ecom:Product.ShortDescription"); 1785 string prodID = product.GetString("Ecom:Product.ID"); 1786 string Image = "/Admin/Public/GetImage.ashx?Image=/Files/Images/Ecom/Products/" + prodID + ".jpg&format=webp&quality=85"; 1787 1788 1789 1790 #line default 1791 #line hidden 1792 WriteLiteralTo(__razor_helper_writer, " <li"); 1793 1794 WriteLiteralTo(__razor_helper_writer, " class=\"shop-list__item col-xs-12\""); 1795 1796 WriteLiteralTo(__razor_helper_writer, ">\r\n <a"); 1797 1798 WriteLiteralTo(__razor_helper_writer, " class=\"shop-list__link\""); 1799 1800 WriteAttributeTo(__razor_helper_writer, "href", Tuple.Create(" href=\"", 29688), Tuple.Create("\"", 29705) 1801 1802 #line 566 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1803 , Tuple.Create(Tuple.Create("", 29695), Tuple.Create<System.Object, System.Int32>(GroupLink 1804 1805 #line default 1806 #line hidden 1807 , 29695), false) 1808 ); 1809 1810 WriteAttributeTo(__razor_helper_writer, "title", Tuple.Create(" title=\"", 29706), Tuple.Create("\"", 29719) 1811 1812 #line 566 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1813 , Tuple.Create(Tuple.Create("", 29714), Tuple.Create<System.Object, System.Int32>(Name 1814 1815 #line default 1816 #line hidden 1817 , 29714), false) 1818 ); 1819 1820 WriteLiteralTo(__razor_helper_writer, ">\r\n <figure"); 1821 1822 WriteLiteralTo(__razor_helper_writer, " class=\"shop-list__figure\""); 1823 1824 WriteLiteralTo(__razor_helper_writer, ">\r\n <img"); 1825 1826 WriteLiteralTo(__razor_helper_writer, " class=\"shop-list__image lazy\""); 1827 1828 WriteLiteralTo(__razor_helper_writer, " style=\"width: 213px;\""); 1829 1830 WriteAttributeTo(__razor_helper_writer, "alt", Tuple.Create(" alt=\"", 29859), Tuple.Create("\"", 29870) 1831 1832 #line 568 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1833 , Tuple.Create(Tuple.Create("", 29865), Tuple.Create<System.Object, System.Int32>(Name 1834 1835 #line default 1836 #line hidden 1837 , 29865), false) 1838 ); 1839 1840 WriteLiteralTo(__razor_helper_writer, " data-src=\""); 1841 1842 1843 #line 568 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1844 WriteTo(__razor_helper_writer, Image); 1845 1846 1847 #line default 1848 #line hidden 1849 WriteLiteralTo(__razor_helper_writer, "&width=213\""); 1850 1851 WriteLiteralTo(__razor_helper_writer, ">\r\n </figure>\r\n <h4"); 1852 1853 WriteLiteralTo(__razor_helper_writer, " class=\"shop-list__title\""); 1854 1855 WriteLiteralTo(__razor_helper_writer, ">"); 1856 1857 1858 #line 570 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1859 WriteTo(__razor_helper_writer, Name); 1860 1861 1862 #line default 1863 #line hidden 1864 WriteLiteralTo(__razor_helper_writer, "</h4>\r\n <div"); 1865 1866 WriteLiteralTo(__razor_helper_writer, " class=\"shop-list__text\""); 1867 1868 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 1869 1870 1871 #line 572 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1872 1873 1874 #line default 1875 #line hidden 1876 1877 #line 572 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1878 if (String.IsNullOrEmpty(product.GetString("Ecom:Product.LongDescription"))) 1879 { 1880 var gr = Dynamicweb.Ecommerce.Products.Group.GetGroupById(product.GetString("Ecom:Product.PrimaryOrFirstGroupID")); 1881 1882 1883 1884 #line default 1885 #line hidden 1886 1887 #line 576 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1888 WriteTo(__razor_helper_writer, gr.Description.Replace("<a ", "<span ").Replace("</a>", "</span>").Replace("<h2>", "<p>").Replace("</h2>", "</p>")); 1889 1890 1891 #line default 1892 #line hidden 1893 1894 #line 576 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1895 1896 } 1897 else 1898 { 1899 1900 1901 #line default 1902 #line hidden 1903 1904 #line 580 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1905 WriteTo(__razor_helper_writer, product.GetString("Ecom:Product.LongDescription").Replace("<a ", "<span ").Replace("</a>", "</span>").Replace("<h2>", "<p>").Replace("</h2>", "</p>")); 1906 1907 1908 #line default 1909 #line hidden 1910 1911 #line 580 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1912 1913 } 1914 1915 1916 #line default 1917 #line hidden 1918 WriteLiteralTo(__razor_helper_writer, "\r\n </div>\r\n <div"); 1919 1920 WriteLiteralTo(__razor_helper_writer, " class=\"shop-list__price\""); 1921 1922 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 1923 1924 1925 #line 585 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1926 1927 1928 #line default 1929 #line hidden 1930 1931 #line 585 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1932 if (currentUser != null) 1933 { 1934 string baseUnitPrice = String.Empty; 1935 var price = product.GetLoop("Product.Prices").OrderBy(x => x.GetDouble("Ecom:Product.Prices.BaseUnitPrice")).FirstOrDefault(); 1936 if (price != null) 1937 { 1938 baseUnitPrice = price.GetString("Ecom:Product.Prices.BaseUnitPrice"); 1939 } 1940 1941 1942 #line default 1943 #line hidden 1944 WriteLiteralTo(__razor_helper_writer, " <span"); 1945 1946 WriteLiteralTo(__razor_helper_writer, " class=\"shop-list__price-from\""); 1947 1948 WriteLiteralTo(__razor_helper_writer, ">Priser fra</span>\r\n"); 1949 1950 WriteLiteralTo(__razor_helper_writer, " <span"); 1951 1952 WriteLiteralTo(__razor_helper_writer, " class=\"shop-list__price-value\""); 1953 1954 WriteLiteralTo(__razor_helper_writer, ">"); 1955 1956 1957 #line 594 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1958 WriteTo(__razor_helper_writer, baseUnitPrice); 1959 1960 1961 #line default 1962 #line hidden 1963 WriteLiteralTo(__razor_helper_writer, "</span>\r\n"); 1964 1965 WriteLiteralTo(__razor_helper_writer, " <span"); 1966 1967 WriteLiteralTo(__razor_helper_writer, " class=\"shop-list__price-unit\""); 1968 1969 WriteLiteralTo(__razor_helper_writer, ">kr./stk.</span>\r\n"); 1970 1971 1972 #line 596 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1973 } 1974 1975 1976 #line default 1977 #line hidden 1978 WriteLiteralTo(__razor_helper_writer, " </div>\r\n </a>\r\n </li>\r\n"); 1979 1980 1981 #line 600 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1982 1983 } 1984 1985 1986 #line default 1987 #line hidden 1988 WriteLiteralTo(__razor_helper_writer, " </ul>\r\n"); 1989 1990 1991 #line 603 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1992 1993 1994 #line default 1995 #line hidden 1996 }); 1997 1998 #line 603 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 1999 } 2000 #line default 2001 #line hidden 2002 2003 2004 #line 611 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 2005 public RazorEngine.Templating.TemplateWriter GetProductListFullRelated(dynamic Loop, int ColMD = 4, int ColSM = 4, int ColXS = 1) 2006 { 2007 #line default 2008 #line hidden 2009 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 2010 2011 #line 612 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 2012 2013 int Count = 0; 2014 2015 string ColumnsMD = WrapMethods.ColumnMaker(ColMD, "md"); 2016 string ColumnsSM = WrapMethods.ColumnMaker(ColSM, "sm"); 2017 string ColumnsXS = WrapMethods.ColumnMaker(ColXS, "xs"); 2018 var currentUser = User.GetCurrentExtranetUser(); 2019 2020 foreach (LoopItem product in Loop) 2021 { 2022 string GroupLink = "/Default.aspx?ID=" + product.GetString("Ecom:Product.PrimaryOrCurrentPageID") + "&groupid=" + product.GetString("Ecom:Product.PrimaryOrFirstGroupID") + "&productid=" + product.GetString("Ecom:Product.ID"); 2023 string Name = product.GetString("Ecom:Product.Name"); 2024 string Description = GetFormattedDescription(product.GetString("Ecom:Product.LongDescription")); 2025 string prodID = product.GetString("Ecom:Product.ID"); 2026 string Image = "/Admin/Public/GetImage.ashx?Image=/Files/Images/Ecom/Products/" + prodID + ".jpg&format=webp&quality=85"; 2027 var productObject = Dynamicweb.Ecommerce.Products.Product.GetProductById(product.GetString("Ecom:Product.ID"), product.GetString("Ecom:Product.VariantID"), product.GetString("Ecom:Product.LanguageID")); 2028 var textAndColors = new ProductImageOverlayHelper().GetTextAndColor(productObject); 2029 2030 2031 #line default 2032 #line hidden 2033 WriteLiteralTo(__razor_helper_writer, " <li"); 2034 2035 WriteLiteralTo(__razor_helper_writer, " class=\"shop-list__item col-xs-12\""); 2036 2037 WriteLiteralTo(__razor_helper_writer, ">\r\n <a"); 2038 2039 WriteLiteralTo(__razor_helper_writer, " class=\"shop-list__link\""); 2040 2041 WriteAttributeTo(__razor_helper_writer, "href", Tuple.Create(" href=\"", 33369), Tuple.Create("\"", 33386) 2042 2043 #line 630 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 2044 , Tuple.Create(Tuple.Create("", 33376), Tuple.Create<System.Object, System.Int32>(GroupLink 2045 2046 #line default 2047 #line hidden 2048 , 33376), false) 2049 ); 2050 2051 WriteAttributeTo(__razor_helper_writer, "title", Tuple.Create(" title=\"", 33387), Tuple.Create("\"", 33400) 2052 2053 #line 630 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 2054 , Tuple.Create(Tuple.Create("", 33395), Tuple.Create<System.Object, System.Int32>(Name 2055 2056 #line default 2057 #line hidden 2058 , 33395), false) 2059 ); 2060 2061 WriteLiteralTo(__razor_helper_writer, ">\r\n <figure"); 2062 2063 WriteLiteralTo(__razor_helper_writer, " class=\"shop-list__figure\""); 2064 2065 WriteLiteralTo(__razor_helper_writer, " style=\"position: relative\""); 2066 2067 WriteLiteralTo(__razor_helper_writer, ">\r\n <img"); 2068 2069 WriteLiteralTo(__razor_helper_writer, " class=\"shop-list__image lazy\""); 2070 2071 WriteLiteralTo(__razor_helper_writer, " style=\"width: 213px;\""); 2072 2073 WriteAttributeTo(__razor_helper_writer, "alt", Tuple.Create(" alt=\"", 33559), Tuple.Create("\"", 33570) 2074 2075 #line 632 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 2076 , Tuple.Create(Tuple.Create("", 33565), Tuple.Create<System.Object, System.Int32>(Name 2077 2078 #line default 2079 #line hidden 2080 , 33565), false) 2081 ); 2082 2083 WriteLiteralTo(__razor_helper_writer, " data-src=\""); 2084 2085 2086 #line 632 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 2087 WriteTo(__razor_helper_writer, Image); 2088 2089 2090 #line default 2091 #line hidden 2092 WriteLiteralTo(__razor_helper_writer, "&width=213\""); 2093 2094 WriteLiteralTo(__razor_helper_writer, ">\r\n <div"); 2095 2096 WriteLiteralTo(__razor_helper_writer, " class=\"product__primary-image__overlay-container\""); 2097 2098 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 2099 2100 2101 #line 634 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 2102 2103 2104 #line default 2105 #line hidden 2106 2107 #line 634 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 2108 foreach (var overlayNameAndColor in textAndColors) 2109 { 2110 2111 2112 #line default 2113 #line hidden 2114 WriteLiteralTo(__razor_helper_writer, " <div"); 2115 2116 WriteAttributeTo(__razor_helper_writer, "style", Tuple.Create(" style=\"", 33815), Tuple.Create("\"", 33867) 2117 , Tuple.Create(Tuple.Create("", 33823), Tuple.Create("background-color:", 33823), true) 2118 2119 #line 636 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 2120 , Tuple.Create(Tuple.Create(" ", 33840), Tuple.Create<System.Object, System.Int32>(overlayNameAndColor.Value 2121 2122 #line default 2123 #line hidden 2124 , 33841), false) 2125 ); 2126 2127 WriteLiteralTo(__razor_helper_writer, " class=\"product__primary-image__overlay-container__item\""); 2128 2129 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 2130 2131 WriteLiteralTo(__razor_helper_writer, " "); 2132 2133 2134 #line 637 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 2135 WriteTo(__razor_helper_writer, overlayNameAndColor.Key); 2136 2137 2138 #line default 2139 #line hidden 2140 WriteLiteralTo(__razor_helper_writer, "\r\n </div>\r\n"); 2141 2142 2143 #line 639 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 2144 } 2145 2146 2147 #line default 2148 #line hidden 2149 WriteLiteralTo(__razor_helper_writer, " </div>\r\n </figure>\r\n <h4"); 2150 2151 WriteLiteralTo(__razor_helper_writer, " class=\"shop-list__title\""); 2152 2153 WriteLiteralTo(__razor_helper_writer, ">"); 2154 2155 2156 #line 642 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 2157 WriteTo(__razor_helper_writer, Name); 2158 2159 2160 #line default 2161 #line hidden 2162 WriteLiteralTo(__razor_helper_writer, "</h4>\r\n <div"); 2163 2164 WriteLiteralTo(__razor_helper_writer, " class=\"shop-list__text\""); 2165 2166 WriteLiteralTo(__razor_helper_writer, ">"); 2167 2168 2169 #line 643 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 2170 WriteTo(__razor_helper_writer, Description); 2171 2172 2173 #line default 2174 #line hidden 2175 WriteLiteralTo(__razor_helper_writer, "</div>\r\n <div"); 2176 2177 WriteLiteralTo(__razor_helper_writer, " class=\"shop-list__price\""); 2178 2179 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 2180 2181 2182 #line 645 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 2183 2184 2185 #line default 2186 #line hidden 2187 2188 #line 645 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 2189 if (currentUser != null) 2190 { 2191 string baseUnitPrice = String.Empty; 2192 var price = product.GetLoop("Product.Prices").OrderBy(x => x.GetDouble("Ecom:Product.Prices.BaseUnitPrice")).FirstOrDefault(); 2193 if (price != null) 2194 { 2195 baseUnitPrice = price.GetString("Ecom:Product.Prices.BaseUnitPrice"); 2196 } 2197 2198 2199 2200 #line default 2201 #line hidden 2202 WriteLiteralTo(__razor_helper_writer, " <span"); 2203 2204 WriteLiteralTo(__razor_helper_writer, " class=\"shop-list__price-from\""); 2205 2206 WriteLiteralTo(__razor_helper_writer, ">Priser fra</span>\r\n"); 2207 2208 WriteLiteralTo(__razor_helper_writer, " <span"); 2209 2210 WriteLiteralTo(__razor_helper_writer, " class=\"shop-list__price-value\""); 2211 2212 WriteLiteralTo(__razor_helper_writer, ">"); 2213 2214 2215 #line 655 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 2216 WriteTo(__razor_helper_writer, baseUnitPrice); 2217 2218 2219 #line default 2220 #line hidden 2221 WriteLiteralTo(__razor_helper_writer, "</span>\r\n"); 2222 2223 WriteLiteralTo(__razor_helper_writer, " <span"); 2224 2225 WriteLiteralTo(__razor_helper_writer, " class=\"shop-list__price-unit\""); 2226 2227 WriteLiteralTo(__razor_helper_writer, ">kr./stk</span>\r\n"); 2228 2229 2230 #line 657 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 2231 } 2232 2233 2234 #line default 2235 #line hidden 2236 WriteLiteralTo(__razor_helper_writer, " </div>\r\n </a>\r\n </li>\r\n"); 2237 2238 2239 #line 661 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 2240 } 2241 2242 2243 #line default 2244 #line hidden 2245 }); 2246 2247 #line 662 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 2248 } 2249 #line default 2250 #line hidden 2251 2252 2253 #line 664 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 2254 2255 private static string GetFormattedDescription(string description = "") 2256 { 2257 string formattedDescription = Regex.Replace(description, @"<.*?>|[\r\n\t]| ", " "); 2258 return formattedDescription.Length > 103 ? formattedDescription.Substring(0, 103).TrimEnd() + "..." : formattedDescription; 2259 } 2260 2261 #line default 2262 #line hidden 2263 2264 2265 #line 1517 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 2266 2267 2268 public static string StripHTML(string input) 2269 { 2270 string regex = @"<.*?>"; 2271 return Regex.Replace(input, regex, String.Empty); 2272 } 2273 2274 2275 #line default 2276 #line hidden 2277 2278 2279 public RazorEngine_04b729d2a44c444eaf3b69e772bbf3cb() { 2280 } 2281 2282 public override void Execute() { 2283 WriteLiteral("\r\n\r\n"); 2284 2285 WriteLiteral("\r\n\r\n"); 2286 2287 WriteLiteral("\r\n\r\n\r\n\r\n\r\n\r\n"); 2288 2289 WriteLiteral("\r\n<script>\r\n\r\n document.addEventListener(\"DOMContentLoaded\", function () {\r\n\r\n" + 2290 " var addToCartButtons = document.querySelectorAll(\'.product__button\');\r\n " + 2291 " var unitTypes = document.getElementsByClassName(\"unit-type\");\r\n va" + 2292 "r product_names = document.getElementsByClassName(\"product-list-item__title\");\r\n" + 2293 "\r\n addToCartButtons.forEach(function (item) {\r\n\r\n item.addEven" + 2294 "tListener(\'click\', function () {\r\n\r\n var product_name = product_n" + 2295 "ames[this.dataset.id - 1].dataset.name;\r\n var product_id = produc" + 2296 "t_names[this.dataset.id - 1].dataset.product_id;\r\n var initialCat" + 2297 "egories = product_names[this.dataset.id - 1].dataset.categories;\r\n " + 2298 " var categories = initialCategories.split(\"_\");\r\n var quantity =" + 2299 " document.getElementsByClassName(\"quantity\")[this.dataset.id - 1].value;\r\n " + 2300 " var unitPrice;\r\n var variantIsNull = true;\r\n " + 2301 " var unitTypeName = null;\r\n\r\n //Get unittype price\r\n " + 2302 " for (const unitType of unitTypes) {\r\n\r\n if (unitType.d" + 2303 "ataset.id == this.dataset.id) {\r\n\r\n if (unitType.checked " + 2304 "== true) {\r\n\r\n var tempPrice = unitType.dataset.price" + 2305 ".replace(\".\", \"\");\r\n tempPrice = tempPrice.replace(\"," + 2306 "\", \".\");\r\n unitPrice = parseFloat(tempPrice);\r\n " + 2307 " variantIsNull = false;\r\n unitTy" + 2308 "peName = unitType.value;\r\n\r\n unitTypeName = unitTypeN" + 2309 "ame.toString().split(\"_\")[1];\r\n\r\n }\r\n " + 2310 "}\r\n }\r\n\r\n if (!variantIsNull) {\r\n " + 2311 " dataLayer.push({ ecommerce: null });\r\n dataLayer.push({\r\n " + 2312 " \'event\': \'add_to_cart\',\r\n \"ecommer" + 2313 "ce\": {\r\n \"currency\": \"DKK\",\r\n " + 2314 " \"value\": unitPrice * parseInt(quantity).toFixed(2),\r\n " + 2315 " \"items\": [\r\n {\r\n " + 2316 " \"item_name\": product_name + \" - \" + unitTypeName,\r\n " + 2317 " \'item_id\': product_id,\r\n \'pric" + 2318 "e\': unitPrice,\r\n \"item_brand\": \"\",\r\n " + 2319 " \"item_category\": (categories[0] != null ? categories[" + 2320 "0] : \"\"),\r\n \"item_category2\": (categories[1] " + 2321 "!= null ? categories[1] : \"\"),\r\n \"item_catego" + 2322 "ry3\": (categories[2] != null ? categories[2] : \"\"),\r\n " + 2323 " \"item_category4\": (categories[3] != null ? categories[3] : \"\"),\r\n " + 2324 " \"item_category5\": (categories[4] != null ? categor" + 2325 "ies[4] : \"\"),\r\n \"quantity\": parseInt(quantity" + 2326 "),\r\n }\r\n ]\r\n " + 2327 " },\r\n\r\n });\r\n }\r\n });\r" + 2328 "\n })\r\n });\r\n\r\n</script>\r\n"); 2329 2330 WriteLiteral("\r\n\r\n"); 2331 2332 WriteLiteral("\r\n"); 2333 2334 WriteLiteral("\r\n<script"); 2335 2336 WriteLiteral(" src=\"/Files/Templates/Designs/DwSimple/js/ProductVariantsAjax.js\""); 2337 2338 WriteLiteral("></script>\r\n<link"); 2339 2340 WriteLiteral(" rel=\"stylesheet\""); 2341 2342 WriteLiteral(" href=\"/Files/Templates/Designs/DwSimple/css/product.css\""); 2343 2344 WriteLiteral("/>\r\n\r\n"); 2345 2346 2347 #line 675 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 2348 2349 IFormatProvider jsNumberFormat = new NumberFormatInfo() { NumberDecimalSeparator = ".", NumberGroupSeparator = "" }; 2350 string initialPrice = string.Empty; 2351 string metaDescription = string.Empty; 2352 if (String.IsNullOrEmpty(GetString("Ecom:Product.LongDescription"))) 2353 { 2354 metaDescription = StripHTML(GetString("Ecom:Group.Description")); 2355 } 2356 else 2357 { 2358 metaDescription = StripHTML(GetString("Ecom:Product.LongDescription")); 2359 } 2360 2361 //prices and units 2362 string defaultUnitId = GetString("Ecom:Product.DefaultUnitID"); 2363 var prices = GetLoop("Product.Prices"); 2364 List<string> pricesHtmlList = Hounisen.Website.Helpers.Helpers.PricesListMakeListString(prices, false); 2365 List<Hounisen.Website.Models.Unit> unitsDropdown = Hounisen.Website.Helpers.Helpers.PopulateUnitsDropdown(prices); 2366 var unitDefault = unitsDropdown.Where(x => x.Id.Equals(defaultUnitId)).FirstOrDefault(); 2367 int minOrder = unitDefault != null ? unitDefault.MinOrder : 1; 2368 2369 2370 //other vars 2371 var pid = GetString("Ecom:Product.ID"); 2372 int stock = GetInteger("Ecom:Product.Stock"); 2373 string image = "/Admin/Public/GetImage.ashx?Image=/Files/Images/Ecom/Products/" + pid + ".jpg"; 2374 string productname = GetString("Ecom:Product.Name"); 2375 string productlink = "/Default.aspx?ID=" + GetString("Ecom:Product.PrimaryOrCurrentPageID") + "&groupid=" + GetString("Ecom:Product.PrimaryOrFirstGroupID") + "&productid=" + GetString("Ecom:Product.ID"); 2376 2377 2378 // SKI AND Region H 2379 bool hasSkiDeal = false; 2380 bool hasRegionHDeal = false; 2381 var currentUser = User.GetCurrentExtranetUser(); 2382 if (currentUser != null) 2383 { 2384 var skiGroup = currentUser.Groups.FirstOrDefault(e => e.Name == "SKI"); 2385 if (skiGroup != null && !string.IsNullOrEmpty(skiGroup.Name)) 2386 { 2387 hasSkiDeal = true; 2388 } 2389 2390 hasRegionHDeal = Dynamicweb.Core.Converter.ToBoolean(currentUser.CustomFieldValues.Find(f => f.CustomField.SystemName == "AccessUser_RegionH").Value); 2391 } 2392 2393 //serialized data 2394 var pagedata = new System.Collections.Generic.Dictionary<String, Object>(); 2395 Pageview.Area.Item.SerializeTo(pagedata); 2396 2397 2398 var pageService = new PageService(); 2399 GroupHelper gh = new GroupHelper(); 2400 var group = Dynamicweb.Ecommerce.Services.ProductGroups.GetGroup(GetString("Ecom:Product.PrimaryOrFirstGroupID")); 2401 var masterPage = pageService.GetPage(GetInteger("Ecom:Product.PrimaryOrCurrentPageID")); 2402 masterPage.GetDisplayName(); 2403 var groupNames = gh.GetParentsRecursively(group, new List<string>()); 2404 groupNames = gh.Format(groupNames, masterPage.GetDisplayName(), group); 2405 2406 var groups = gh.ListToString(groupNames); 2407 2408 2409 #line default 2410 #line hidden 2411 WriteLiteral("\r\n\r\n<div"); 2412 2413 WriteLiteral(" class=\"col-md-12 col-sm-12 col-xs-12 aaa\""); 2414 2415 WriteLiteral(">\r\n\r\n<div"); 2416 2417 WriteLiteral(" class=\"row product\""); 2418 2419 WriteLiteral(" itemscope"); 2420 2421 WriteLiteral(" itemtype=\"http://schema.org/Product\""); 2422 2423 WriteLiteral(">\r\n<section"); 2424 2425 WriteLiteral(" class=\"page-header\""); 2426 2427 WriteLiteral(">\r\n <div"); 2428 2429 WriteLiteral(" class=\"row product__help-name-container\""); 2430 2431 WriteLiteral(">\r\n <div"); 2432 2433 WriteLiteral(" class=\"col-xs-12 col-sm-7\""); 2434 2435 WriteLiteral(">\r\n <meta"); 2436 2437 WriteLiteral(" itemprop=\"description\""); 2438 2439 WriteAttribute("content", Tuple.Create(" content=\"", 38636), Tuple.Create("\"", 38662) 2440 2441 #line 742 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 2442 , Tuple.Create(Tuple.Create("", 38646), Tuple.Create<System.Object, System.Int32>(metaDescription 2443 2444 #line default 2445 #line hidden 2446 , 38646), false) 2447 ); 2448 2449 WriteLiteral("/>\r\n <h1"); 2450 2451 WriteLiteral(" data-categories=\""); 2452 2453 2454 #line 743 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 2455 Write(groups); 2456 2457 2458 #line default 2459 #line hidden 2460 WriteLiteral("\""); 2461 2462 WriteLiteral(" data-group=\""); 2463 2464 2465 #line 743 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 2466 Write(GetString("Ecom:Group.Name")); 2467 2468 2469 #line default 2470 #line hidden 2471 WriteLiteral("\""); 2472 2473 WriteLiteral(" class=\"page-header__title\""); 2474 2475 WriteLiteral(" itemprop=\"name\""); 2476 2477 WriteLiteral(">"); 2478 2479 2480 #line 743 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 2481 Write(GetString("Ecom:Product.Name")); 2482 2483 2484 #line default 2485 #line hidden 2486 WriteLiteral("</h1>\r\n <div"); 2487 2488 WriteLiteral(" class=\"page-header__short-description\""); 2489 2490 WriteLiteral(">\r\n <p"); 2491 2492 WriteLiteral(" class=\"product__number\""); 2493 2494 WriteLiteral(">"); 2495 2496 2497 #line 745 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 2498 Write(Translate("Productnumber", "Productnumber")); 2499 2500 2501 #line default 2502 #line hidden 2503 WriteLiteral(": <span"); 2504 2505 WriteLiteral(" property=\"identifier\""); 2506 2507 WriteLiteral(" itemprop=\"mpn\""); 2508 2509 WriteLiteral(">"); 2510 2511 2512 #line 745 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 2513 Write(GetString("Ecom:Product.Number")); 2514 2515 2516 #line default 2517 #line hidden 2518 WriteLiteral("</span></p>\r\n"); 2519 2520 2521 #line 746 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 2522 2523 2524 #line default 2525 #line hidden 2526 2527 #line 746 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 2528 if (hasSkiDeal) 2529 { 2530 2531 2532 #line default 2533 #line hidden 2534 WriteLiteral(" <p"); 2535 2536 WriteLiteral(" class=\"product__number\""); 2537 2538 WriteLiteral(">"); 2539 2540 2541 #line 748 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 2542 Write(Translate("Skinumber", "SKI nr")); 2543 2544 2545 #line default 2546 #line hidden 2547 WriteLiteral(": <span"); 2548 2549 WriteLiteral(" property=\"identifier\""); 2550 2551 WriteLiteral(">"); 2552 2553 2554 #line 748 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 2555 Write(GetString("Ecom:Product:Field.SkiId")); 2556 2557 2558 #line default 2559 #line hidden 2560 WriteLiteral("</span></p>\r\n"); 2561 2562 2563 #line 749 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 2564 } 2565 2566 2567 #line default 2568 #line hidden 2569 WriteLiteral(" "); 2570 2571 2572 #line 750 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 2573 if (hasRegionHDeal && GetBoolean("Ecom:Product:Field.RegionH")) 2574 { 2575 2576 2577 #line default 2578 #line hidden 2579 WriteLiteral(" <p"); 2580 2581 WriteLiteral(" class=\"product__number\""); 2582 2583 WriteLiteral(">"); 2584 2585 2586 #line 752 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 2587 Write(Translate("RegionHText")); 2588 2589 2590 #line default 2591 #line hidden 2592 WriteLiteral("</p>\r\n"); 2593 2594 2595 #line 753 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 2596 } 2597 2598 2599 #line default 2600 #line hidden 2601 WriteLiteral("\r\n </div>\r\n </div>\r\n <div"); 2602 2603 WriteLiteral(" class=\"col-xs-12 col-sm-offset-1 col-sm-4 product__help-name-container__help\""); 2604 2605 WriteLiteral(">\r\n <div"); 2606 2607 WriteLiteral(" class=\"need-help\""); 2608 2609 WriteLiteral(">\r\n <img"); 2610 2611 WriteLiteral(" class=\"need-help__image lazy\""); 2612 2613 WriteLiteral(" width=\"81\""); 2614 2615 WriteLiteral(" height=\"81\""); 2616 2617 WriteLiteral(" data-src=\'"); 2618 2619 2620 #line 759 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 2621 Write(Pageview.Area.Item["Support_Image"].ToString()); 2622 2623 2624 #line default 2625 #line hidden 2626 WriteLiteral("?format=webp&width=81&quality=75\'"); 2627 2628 WriteLiteral("/>\r\n <div"); 2629 2630 WriteLiteral(" class=\"need-help__text\""); 2631 2632 WriteLiteral(">\r\n"); 2633 2634 WriteLiteral(" "); 2635 2636 2637 #line 761 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 2638 Write(Pageview.Area.Item["Support_Content"].ToString()); 2639 2640 2641 #line default 2642 #line hidden 2643 WriteLiteral("\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</secti" + 2644 "on>\r\n<div"); 2645 2646 WriteLiteral(" class=\"row\""); 2647 2648 WriteLiteral(">\r\n\r\n"); 2649 2650 WriteLiteral("\r\n<div"); 2651 2652 WriteLiteral(" class=\"col-md-5 col-sm-4 col-xs-12\""); 2653 2654 WriteLiteral(">\r\n <div"); 2655 2656 WriteLiteral(" class=\"product__gallery\""); 2657 2658 WriteLiteral(">\r\n\r\n "); 2659 2660 WriteLiteral("\r\n\r\n"); 2661 2662 2663 #line 775 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 2664 2665 2666 #line default 2667 #line hidden 2668 2669 #line 775 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 2670 if (GetString("Ecom:Product.Discount.Price.PriceWithVATFormatted") != GetString("Ecom:Product.Price.PriceWithVATFormatted")) 2671 { 2672 if (pagedata["EcommerceStickerType"].ToString() == "ribbon") 2673 { 2674 2675 2676 #line default 2677 #line hidden 2678 WriteLiteral(" <span"); 2679 2680 WriteLiteral(" class=\"ribbon base\""); 2681 2682 WriteLiteral(">"); 2683 2684 2685 #line 779 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 2686 Write(Translate("On sale!", "On sale!")); 2687 2688 2689 #line default 2690 #line hidden 2691 WriteLiteral("</span>\r\n"); 2692 2693 2694 #line 780 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 2695 } 2696 2697 if (pagedata["EcommerceStickerType"].ToString() == "ball") 2698 { 2699 2700 2701 #line default 2702 #line hidden 2703 WriteLiteral(" <span"); 2704 2705 WriteLiteral(" class=\"ball\""); 2706 2707 WriteLiteral(">"); 2708 2709 2710 #line 784 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 2711 Write(Translate("On sale!", "On sale!")); 2712 2713 2714 #line default 2715 #line hidden 2716 WriteLiteral("</span>\r\n"); 2717 2718 2719 #line 785 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 2720 } 2721 } 2722 2723 2724 2725 2726 #line default 2727 #line hidden 2728 2729 #line 789 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 2730 2731 2732 2733 #line default 2734 #line hidden 2735 WriteLiteral(" "); 2736 2737 2738 #line 790 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 2739 2740 string currenthost = HttpContext.Current.Request.Url.AbsoluteUri; 2741 Uri uri = new Uri(currenthost); 2742 currenthost = string.Format("{0}://{1}", uri.Scheme, uri.Authority); 2743 string ImagePathloop = ""; 2744 string ImagePathClean = ""; 2745 string options = "format=webp&quality=85&width=1000"; 2746 List<string> imagepath = new List<string>(); 2747 for (int i = 0; i <= 4; i++) 2748 { 2749 if (i == 0) 2750 { 2751 ImagePathloop = VestjyskMarketing.Helpers.ImageHelper.ResizeImage(new ResizeImageSettings() 2752 { 2753 Image = $"/Files/Images/Ecom/Products/{pid}.jpg", 2754 Width = 1000, 2755 Quality = 85 2756 }); 2757 imagepath.Add(ImagePathloop); 2758 } 2759 else 2760 { 2761 ImagePathloop = "/Admin/Public/GetImage.ashx?Image=/Files/Images/Ecom/Products/" + pid + "-0" + i.ToString() + ".jpg"; 2762 //currenthost + 2763 ImagePathClean = "/Files/Images/Ecom/Products/" + pid + "-0" + i.ToString() + ".jpg"; 2764 2765 try 2766 { 2767 if (File.Exists(HttpContext.Current.Server.MapPath(ImagePathClean))) 2768 { 2769 imagepath.Add(ImagePathloop + "&" + options); 2770 } 2771 2772 2773 HttpWebRequest request = (HttpWebRequest)System.Net.WebRequest.Create(ImagePathloop); 2774 using (HttpWebResponse response = (HttpWebResponse)request.GetResponse()) 2775 { 2776 if (response.StatusCode == HttpStatusCode.NotFound) 2777 { 2778 break; 2779 } 2780 else 2781 { 2782 imagepath.Add("/Files/Images/Ecom/Products/" + pid + "-0" + i.ToString() + ".jpg" + "" + options); 2783 } 2784 } 2785 } 2786 catch (Exception ex) 2787 { 2788 } 2789 } 2790 } 2791 2792 2793 #line default 2794 #line hidden 2795 WriteLiteral("\r\n\r\n"); 2796 2797 2798 #line 844 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 2799 2800 2801 #line default 2802 #line hidden 2803 2804 #line 844 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 2805 2806 var resizedImageLarge = VestjyskMarketing.Helpers.ImageHelper.ResizeImage(new ResizeImageSettings() 2807 { 2808 Image = $"/Files/Images/Ecom/Products/{pid}.jpg", 2809 Width = 1000, 2810 Quality = 99 2811 }); 2812 2813 var resizedImage = VestjyskMarketing.Helpers.ImageHelper.ResizeImage(new ResizeImageSettings() 2814 { 2815 Image = $"/Files/Images/Ecom/Products/{pid}.jpg", 2816 Width = 458, 2817 Quality = 85 2818 }); 2819 2820 2821 #line default 2822 #line hidden 2823 WriteLiteral("\r\n\r\n <div"); 2824 2825 WriteLiteral(" class=\"product__primary-image\""); 2826 2827 WriteLiteral(">\r\n <a"); 2828 2829 WriteAttribute("href", Tuple.Create(" href=\"", 43734), Tuple.Create("\"", 43759) 2830 2831 #line 861 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 2832 , Tuple.Create(Tuple.Create("", 43741), Tuple.Create<System.Object, System.Int32>(resizedImageLarge 2833 2834 #line default 2835 #line hidden 2836 , 43741), false) 2837 ); 2838 2839 WriteLiteral(" data-fancybox"); 2840 2841 WriteLiteral(" class=\"fancybox\""); 2842 2843 WriteLiteral(">\r\n <img"); 2844 2845 WriteAttribute("src", Tuple.Create(" src=\"", 43814), Tuple.Create("\"", 43833) 2846 2847 #line 862 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 2848 , Tuple.Create(Tuple.Create("", 43820), Tuple.Create<System.Object, System.Int32>(resizedImage 2849 2850 #line default 2851 #line hidden 2852 , 43820), false) 2853 ); 2854 2855 WriteLiteral(" data-src=\""); 2856 2857 2858 #line 862 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 2859 Write(resizedImage); 2860 2861 2862 #line default 2863 #line hidden 2864 WriteLiteral("\""); 2865 2866 WriteLiteral(" width=\"458\""); 2867 2868 WriteAttribute("alt", Tuple.Create(" alt=\"", 43871), Tuple.Create("\"", 43889) 2869 2870 #line 862 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 2871 , Tuple.Create(Tuple.Create("", 43877), Tuple.Create<System.Object, System.Int32>(productname 2872 2873 #line default 2874 #line hidden 2875 , 43877), false) 2876 ); 2877 2878 WriteLiteral(" class=\"product__image img-responsive lazy\""); 2879 2880 WriteLiteral(" itemprop=\"image\""); 2881 2882 WriteLiteral(">\r\n"); 2883 2884 2885 #line 863 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 2886 2887 2888 #line default 2889 #line hidden 2890 2891 #line 863 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 2892 2893 var productObj = new ProductService().GetProductById(GetString("Ecom:Product.ID"),GetString("Ecom:Product.VariantID"),GetString("Ecom:Product.LanguageID")); 2894 var overlayNameAndColors = new ProductImageOverlayHelper().GetTextAndColor(productObj); 2895 2896 2897 #line default 2898 #line hidden 2899 WriteLiteral("\r\n\r\n <div"); 2900 2901 WriteLiteral(" class=\"product__primary-image__overlay-container\""); 2902 2903 WriteLiteral(">\r\n"); 2904 2905 2906 #line 869 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 2907 2908 2909 #line default 2910 #line hidden 2911 2912 #line 869 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 2913 foreach (var overlayNameAndColor in overlayNameAndColors) 2914 { 2915 2916 2917 #line default 2918 #line hidden 2919 WriteLiteral(" <div"); 2920 2921 WriteAttribute("style", Tuple.Create(" style=\"", 44485), Tuple.Create("\"", 44537) 2922 , Tuple.Create(Tuple.Create("", 44493), Tuple.Create("background-color:", 44493), true) 2923 2924 #line 871 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 2925 , Tuple.Create(Tuple.Create(" ", 44510), Tuple.Create<System.Object, System.Int32>(overlayNameAndColor.Value 2926 2927 #line default 2928 #line hidden 2929 , 44511), false) 2930 ); 2931 2932 WriteLiteral(" class=\"product__primary-image__overlay-container__item\""); 2933 2934 WriteLiteral(">\r\n"); 2935 2936 WriteLiteral(" "); 2937 2938 2939 #line 872 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 2940 Write(overlayNameAndColor.Key); 2941 2942 2943 #line default 2944 #line hidden 2945 WriteLiteral("\r\n </div>\r\n"); 2946 2947 2948 #line 874 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 2949 } 2950 2951 2952 #line default 2953 #line hidden 2954 WriteLiteral(" </div>\r\n <svg"); 2955 2956 WriteLiteral(" class=\"product__image-icon\""); 2957 2958 WriteLiteral(">\r\n <use"); 2959 2960 WriteLiteral(" xmlns:xlink=\"http://www.w3.org/1999/xlink\""); 2961 2962 WriteLiteral(" xlink:href=\"/dist/icons/icons.svg#fullscreen\""); 2963 2964 WriteLiteral("></use>\r\n </svg>\r\n </a>\r\n </div>\r\n <div"); 2965 2966 WriteLiteral(" class=\"row\""); 2967 2968 WriteLiteral(">\r\n <div"); 2969 2970 WriteLiteral(" class=\"product__thumbnail-list\""); 2971 2972 WriteLiteral(">\r\n"); 2973 2974 2975 #line 883 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 2976 2977 2978 #line default 2979 #line hidden 2980 2981 #line 883 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 2982 foreach (var imageThumb in imagepath) 2983 { 2984 2985 2986 #line default 2987 #line hidden 2988 WriteLiteral(" <div"); 2989 2990 WriteLiteral(" class=\"col-sm-3 col-xs-4\""); 2991 2992 WriteLiteral(">\r\n <div"); 2993 2994 WriteLiteral(" class=\"product__thumbnail-images\""); 2995 2996 WriteLiteral(">\r\n <a"); 2997 2998 WriteAttribute("href", Tuple.Create(" href=\"", 45262), Tuple.Create("\"", 45291) 2999 3000 #line 887 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 3001 , Tuple.Create(Tuple.Create("", 45269), Tuple.Create<System.Object, System.Int32>(imageThumb 3002 3003 #line default 3004 #line hidden 3005 , 45269), false) 3006 , Tuple.Create(Tuple.Create("", 45280), Tuple.Create("&width=1000", 45280), true) 3007 ); 3008 3009 WriteLiteral(" rel=\"product\""); 3010 3011 WriteLiteral(" class=\"fancybox\""); 3012 3013 WriteLiteral(">\r\n <img"); 3014 3015 WriteLiteral(" data-src=\""); 3016 3017 3018 #line 888 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 3019 Write(imageThumb); 3020 3021 3022 #line default 3023 #line hidden 3024 WriteLiteral("&width=458\""); 3025 3026 WriteLiteral(" width=\"458\""); 3027 3028 WriteAttribute("alt", Tuple.Create(" alt=\"", 45407), Tuple.Create("\"", 45425) 3029 3030 #line 888 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 3031 , Tuple.Create(Tuple.Create("", 45413), Tuple.Create<System.Object, System.Int32>(productname 3032 3033 #line default 3034 #line hidden 3035 , 45413), false) 3036 ); 3037 3038 WriteLiteral(" class=\"img-responsive lazy\""); 3039 3040 WriteLiteral(">\r\n </a>\r\n </div>\r\n " + 3041 " </div>\r\n"); 3042 3043 3044 #line 892 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 3045 } 3046 3047 3048 #line default 3049 #line hidden 3050 WriteLiteral(" "); 3051 3052 3053 #line 893 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 3054 3055 var youtubeId = GetString("Ecom:Product:Field.YoutubeId"); 3056 var youtubeUrl = $"//www.youtube.com/embed/{youtubeId}?autoplay=0"; 3057 if (!string.IsNullOrEmpty(youtubeId)) 3058 { 3059 3060 3061 #line default 3062 #line hidden 3063 WriteLiteral(" <div"); 3064 3065 WriteLiteral(" class=\"col-sm-3 col-xs-4\""); 3066 3067 WriteLiteral(">\r\n <div"); 3068 3069 WriteLiteral(" id=\"video-container\""); 3070 3071 WriteLiteral(" class=\"product__thumbnail-list__video-thumbnail\""); 3072 3073 WriteLiteral(" onclick=\"on(); return false;\""); 3074 3075 WriteLiteral(">\r\n <iframe"); 3076 3077 WriteLiteral(" width=\"100%\""); 3078 3079 WriteLiteral(" height=\"70\""); 3080 3081 WriteAttribute("src", Tuple.Create(" src=\"", 46097), Tuple.Create("\"", 46114) 3082 3083 #line 900 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 3084 , Tuple.Create(Tuple.Create("", 46103), Tuple.Create<System.Object, System.Int32>(youtubeUrl 3085 3086 #line default 3087 #line hidden 3088 , 46103), false) 3089 ); 3090 3091 WriteLiteral(" frameborder=\"0\""); 3092 3093 WriteLiteral("></iframe>\r\n <div"); 3094 3095 WriteLiteral(" class=\"product__thumbnail-list__video-thumbnail__video\""); 3096 3097 WriteLiteral("></div>\r\n </div>\r\n <div"); 3098 3099 WriteLiteral(" id=\"overlay\""); 3100 3101 WriteLiteral(" class=\"product__thumbnail-list__overlay\""); 3102 3103 WriteLiteral(" onclick=\"off()\""); 3104 3105 WriteLiteral(">\r\n <iframe"); 3106 3107 WriteLiteral(" class=\"product__thumbnail-list__overlay__video\""); 3108 3109 WriteLiteral(" id=\"product-video\""); 3110 3111 WriteLiteral(" width=\"100%\""); 3112 3113 WriteLiteral(" height=\"80%\""); 3114 3115 WriteAttribute("src", Tuple.Create(" src=\"", 46517), Tuple.Create("\"", 46559) 3116 3117 #line 904 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 3118 , Tuple.Create(Tuple.Create("", 46523), Tuple.Create<System.Object, System.Int32>(youtubeUrl 3119 3120 #line default 3121 #line hidden 3122 , 46523), false) 3123 , Tuple.Create(Tuple.Create("", 46534), Tuple.Create("?autoplay=1&enablejsapi=1", 46534), true) 3124 ); 3125 3126 WriteLiteral(" frameborder=\"0\""); 3127 3128 WriteLiteral("></iframe>\r\n </div>\r\n </div>\r\n"); 3129 3130 3131 #line 907 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 3132 } 3133 3134 3135 #line default 3136 #line hidden 3137 WriteLiteral("\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n"); 3138 3139 WriteLiteral("\r\n\r\n<div"); 3140 3141 WriteLiteral(" class=\"col-md-7 col-sm-8 col-xs-12 \""); 3142 3143 WriteLiteral(">\r\n <div"); 3144 3145 WriteLiteral(" class=\"product-info js-product-info\""); 3146 3147 WriteLiteral(" id=\"productinfo\""); 3148 3149 WriteLiteral(">\r\n <div"); 3150 3151 WriteLiteral(" class=\"product__control\""); 3152 3153 WriteLiteral(">\r\n <div"); 3154 3155 WriteLiteral(" class=\"row\""); 3156 3157 WriteLiteral(">\r\n <div"); 3158 3159 WriteLiteral(" class=\"col-xs-12 col-sm-6\""); 3160 3161 WriteLiteral(">\r\n "); 3162 3163 WriteLiteral("\r\n <div"); 3164 3165 WriteLiteral(" class=\"product__stock\""); 3166 3167 WriteLiteral(">\r\n"); 3168 3169 3170 #line 923 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 3171 3172 3173 #line default 3174 #line hidden 3175 3176 #line 923 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 3177 3178 if (stock > 0) 3179 { 3180 3181 3182 #line default 3183 #line hidden 3184 WriteLiteral(" <p"); 3185 3186 WriteLiteral(" class=\"product__stock-text\""); 3187 3188 WriteLiteral(">\r\n <span"); 3189 3190 WriteLiteral(" class=\"product__stock-circle product__stock-circle--green\""); 3191 3192 WriteLiteral("></span> På lager\r\n </p>\r\n"); 3193 3194 3195 #line 929 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 3196 } 3197 else 3198 { 3199 3200 3201 #line default 3202 #line hidden 3203 WriteLiteral(" <p"); 3204 3205 WriteLiteral(" class=\"product__stock-text\""); 3206 3207 WriteLiteral(">\r\n <span"); 3208 3209 WriteLiteral(" class=\"product__stock-circle product__stock-circle--yellow\""); 3210 3211 WriteLiteral("></span> Kontakt os for leveringstid: 86210800 eller salg@hounisen.com\r\n " + 3212 " </p>\r\n"); 3213 3214 3215 #line 935 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 3216 } 3217 3218 3219 #line default 3220 #line hidden 3221 WriteLiteral("\r\n </div>\r\n </div>\r\n <div"); 3222 3223 WriteLiteral(" class=\"col-xs-12 col-sm-6\""); 3224 3225 WriteLiteral(">\r\n "); 3226 3227 WriteLiteral("\r\n"); 3228 3229 3230 #line 941 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 3231 3232 3233 #line default 3234 #line hidden 3235 3236 #line 941 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 3237 if (Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) 3238 { 3239 if (hasRegionHDeal == false) 3240 { 3241 3242 3243 #line default 3244 #line hidden 3245 WriteLiteral(" <div"); 3246 3247 WriteLiteral(" class=\"product__favorite-list popup-wrap favorite\""); 3248 3249 WriteLiteral(">\r\n <button"); 3250 3251 WriteLiteral(" class=\"popup-show\""); 3252 3253 WriteLiteral(" data-popup=\"favorite-list\""); 3254 3255 WriteLiteral(" type=\"button\""); 3256 3257 WriteAttribute("title", Tuple.Create(" title=\"", 48413), Tuple.Create("\"", 48471) 3258 3259 #line 946 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 3260 , Tuple.Create(Tuple.Create("", 48421), Tuple.Create<System.Object, System.Int32>(Translate("Add to favorites", "Add to favorites") 3261 3262 #line default 3263 #line hidden 3264 , 48421), false) 3265 ); 3266 3267 WriteLiteral(">\r\n <i"); 3268 3269 WriteLiteral(" class=\"fa fa-star-o\""); 3270 3271 WriteLiteral("></i> <span>"); 3272 3273 3274 #line 947 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 3275 Write(Translate("Add to favorites", "Add to favorites")); 3276 3277 3278 #line default 3279 #line hidden 3280 WriteLiteral("</span>\r\n </button>\r\n " + 3281 " <div"); 3282 3283 WriteLiteral(" id=\"favorite-list\""); 3284 3285 WriteLiteral(" class=\"popup-form\""); 3286 3287 WriteLiteral(">\r\n <div"); 3288 3289 WriteLiteral(" class=\"close\""); 3290 3291 WriteLiteral(">\r\n <i"); 3292 3293 WriteLiteral(" class=\"fa fa-times\""); 3294 3295 WriteLiteral("></i>\r\n </div>\r\n " + 3296 " <h3>"); 3297 3298 3299 #line 953 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 3300 Write(Translate("Choose list", "Choose list")); 3301 3302 3303 #line default 3304 #line hidden 3305 WriteLiteral("</h3>\r\n <ul>\r\n"); 3306 3307 3308 #line 955 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 3309 3310 3311 #line default 3312 #line hidden 3313 3314 #line 955 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 3315 3316 var lists = Dynamicweb.Ecommerce.CustomerCenter.CustomerProductList.GetListsByUserCustomerNumber(currentUser.CustomerNumber); 3317 3318 3319 #line default 3320 #line hidden 3321 WriteLiteral("\r\n\r\n"); 3322 3323 3324 #line 959 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 3325 3326 3327 #line default 3328 #line hidden 3329 3330 #line 959 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 3331 foreach (var list in lists) 3332 { 3333 if (list.Products.Where(p => p.ProductId.ToString() == GetString("Ecom:Product.ID")).Count() > 0) 3334 { 3335 3336 3337 #line default 3338 #line hidden 3339 WriteLiteral(" <li>\r\n " + 3340 " <a"); 3341 3342 WriteAttribute("href", Tuple.Create(" href=\"", 49695), Tuple.Create("\"", 49886) 3343 3344 #line 964 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 3345 , Tuple.Create(Tuple.Create("", 49702), Tuple.Create<System.Object, System.Int32>(System.Web.HttpContext.Current.Request.Url 3346 3347 #line default 3348 #line hidden 3349 , 49702), false) 3350 , Tuple.Create(Tuple.Create("", 49747), Tuple.Create("&CCRemoveFromMyLists=", 49747), true) 3351 3352 #line 964 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 3353 , Tuple.Create(Tuple.Create("", 49768), Tuple.Create<System.Object, System.Int32>(GetString("Ecom:Product.ID") 3354 3355 #line default 3356 #line hidden 3357 , 49768), false) 3358 , Tuple.Create(Tuple.Create("", 49797), Tuple.Create("&CCAddToListVariantID=&CCAddToListLanguageID=LANG1&CCAddToListID=", 49797), true) 3359 3360 #line 964 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 3361 , Tuple.Create(Tuple.Create("", 49862), Tuple.Create<System.Object, System.Int32>(list.ListId 3362 3363 #line default 3364 #line hidden 3365 , 49862), false) 3366 , Tuple.Create(Tuple.Create("", 49874), Tuple.Create("&CCListType=", 49874), true) 3367 ); 3368 3369 WriteLiteral(">\r\n <i"); 3370 3371 WriteLiteral(" class=\"fa fa-star\""); 3372 3373 WriteLiteral("></i> "); 3374 3375 3376 #line 965 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 3377 Write(list.Name); 3378 3379 3380 #line default 3381 #line hidden 3382 WriteLiteral("\r\n </a>\r\n " + 3383 " </li>\r\n"); 3384 3385 3386 #line 968 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 3387 } 3388 else 3389 { 3390 3391 3392 #line default 3393 #line hidden 3394 WriteLiteral(" <li>\r\n " + 3395 " <a"); 3396 3397 WriteAttribute("href", Tuple.Create(" href=\"", 50350), Tuple.Create("\"", 50536) 3398 3399 #line 972 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 3400 , Tuple.Create(Tuple.Create("", 50357), Tuple.Create<System.Object, System.Int32>(System.Web.HttpContext.Current.Request.Url 3401 3402 #line default 3403 #line hidden 3404 , 50357), false) 3405 , Tuple.Create(Tuple.Create("", 50402), Tuple.Create("&CCAddToMyLists=", 50402), true) 3406 3407 #line 972 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 3408 , Tuple.Create(Tuple.Create("", 50418), Tuple.Create<System.Object, System.Int32>(GetString("Ecom:Product.ID") 3409 3410 #line default 3411 #line hidden 3412 , 50418), false) 3413 , Tuple.Create(Tuple.Create("", 50447), Tuple.Create("&CCAddToListVariantID=&CCAddToListLanguageID=LANG1&CCAddToListID=", 50447), true) 3414 3415 #line 972 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 3416 , Tuple.Create(Tuple.Create("", 50512), Tuple.Create<System.Object, System.Int32>(list.ListId 3417 3418 #line default 3419 #line hidden 3420 , 50512), false) 3421 , Tuple.Create(Tuple.Create("", 50524), Tuple.Create("&CCListType=", 50524), true) 3422 ); 3423 3424 WriteLiteral(">\r\n <i"); 3425 3426 WriteLiteral(" class=\"fa fa-star-o\""); 3427 3428 WriteLiteral("></i> "); 3429 3430 3431 #line 973 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 3432 Write(list.Name); 3433 3434 3435 #line default 3436 #line hidden 3437 WriteLiteral("\r\n </a>\r\n " + 3438 " </li>\r\n"); 3439 3440 3441 #line 976 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 3442 } 3443 } 3444 3445 3446 #line default 3447 #line hidden 3448 WriteLiteral(" <li>\r\n " + 3449 " <a"); 3450 3451 WriteAttribute("href", Tuple.Create(" href=\"", 50932), Tuple.Create("\"", 51006) 3452 , Tuple.Create(Tuple.Create("", 50939), Tuple.Create("/favoritter/opret-favoritliste?ProdID=", 50939), true) 3453 3454 #line 979 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 3455 , Tuple.Create(Tuple.Create("", 50977), Tuple.Create<System.Object, System.Int32>(GetString("Ecom:Product.ID") 3456 3457 #line default 3458 #line hidden 3459 , 50977), false) 3460 ); 3461 3462 WriteLiteral(">\r\n <i"); 3463 3464 WriteLiteral(" class=\"fa fa-plus\""); 3465 3466 WriteLiteral("></i>"); 3467 3468 3469 #line 980 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 3470 Write(Translate("Add new list", "Add new list")); 3471 3472 3473 #line default 3474 #line hidden 3475 WriteLiteral("\r\n </a>\r\n " + 3476 " </li>\r\n </ul>\r\n " + 3477 " </div>\r\n </div>\r\n"); 3478 3479 3480 #line 986 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 3481 } 3482 } 3483 else 3484 { 3485 3486 3487 #line default 3488 #line hidden 3489 WriteLiteral(" <div"); 3490 3491 WriteLiteral(" class=\"not-loggedin\""); 3492 3493 WriteLiteral(">\r\n <p"); 3494 3495 WriteLiteral(" class=\"not-loggedin-text\""); 3496 3497 WriteLiteral("><a"); 3498 3499 WriteLiteral(" data-toggle=\"modal\""); 3500 3501 WriteLiteral(" data-target=\"#login\""); 3502 3503 WriteLiteral(" href=\"\""); 3504 3505 WriteLiteral(">"); 3506 3507 3508 #line 991 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 3509 Write(Translate("Login", "Login")); 3510 3511 3512 #line default 3513 #line hidden 3514 WriteLiteral("</a> eller <a"); 3515 3516 WriteLiteral(" href=\"/kontakt/opret-brugerprofil\""); 3517 3518 WriteLiteral(">Bliv kunde</a> for at se priser og købe på Hounisen.com</p>\r\n " + 3519 " <a"); 3520 3521 WriteLiteral(" data-toggle=\"modal\""); 3522 3523 WriteLiteral(" data-target=\"#login\""); 3524 3525 WriteLiteral(" href=\"\""); 3526 3527 WriteLiteral(" class=\"btn btn-primary not-loggedin-button\""); 3528 3529 WriteLiteral(">\r\n <span>Log ind</span>\r\n " + 3530 " </a>\r\n </div>\r\n"); 3531 3532 3533 #line 996 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 3534 } 3535 3536 3537 #line default 3538 #line hidden 3539 WriteLiteral(" </div>\r\n </div>\r\n\r\n\r\n "); 3540 3541 WriteLiteral("\r\n"); 3542 3543 3544 #line 1002 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 3545 3546 3547 #line default 3548 #line hidden 3549 3550 #line 1002 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 3551 if (Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) 3552 { 3553 var product = GetString("Ecom:Product.ID"); 3554 if (!string.IsNullOrWhiteSpace(GetString("Ecom:Product.SelectedVariantComboID"))) 3555 { 3556 product = GetString("Ecom:Product.ID") + "&" + GetString("Ecom:Product.SelectedVariantComboID"); 3557 } 3558 3559 3560 3561 #line default 3562 #line hidden 3563 WriteLiteral(" <div"); 3564 3565 WriteLiteral(" class=\"row\""); 3566 3567 WriteLiteral(">\r\n <div"); 3568 3569 WriteLiteral(" class=\"col-xs-12\""); 3570 3571 WriteLiteral(">\r\n <ul"); 3572 3573 WriteLiteral(" class=\"product__prices\""); 3574 3575 WriteLiteral(">\r\n"); 3576 3577 3578 #line 1013 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 3579 3580 3581 #line default 3582 #line hidden 3583 3584 #line 1013 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 3585 foreach (var priceHtml in pricesHtmlList) 3586 { 3587 3588 3589 #line default 3590 #line hidden 3591 WriteLiteral(" <li>\r\n"); 3592 3593 WriteLiteral(" "); 3594 3595 3596 #line 1016 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 3597 Write(priceHtml); 3598 3599 3600 #line default 3601 #line hidden 3602 WriteLiteral("\r\n </li>\r\n"); 3603 3604 3605 #line 1018 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 3606 } 3607 3608 3609 #line default 3610 #line hidden 3611 WriteLiteral(" </ul>\r\n </div>\r\n </div>" + 3612 "\r\n"); 3613 3614 3615 #line 1022 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 3616 3617 3618 3619 #line default 3620 #line hidden 3621 WriteLiteral(" <div"); 3622 3623 WriteLiteral(" class=\"row\""); 3624 3625 WriteLiteral(">\r\n <div"); 3626 3627 WriteLiteral(" class=\"col-xs-7\""); 3628 3629 WriteLiteral(">\r\n <div"); 3630 3631 WriteLiteral(" class=\"product__addtocart-input js-addtocart-input\""); 3632 3633 WriteLiteral(">\r\n <input"); 3634 3635 WriteLiteral(" type=\"button\""); 3636 3637 WriteLiteral(" value=\"-\""); 3638 3639 WriteLiteral(" class=\"product__quantity-button product__quantity-button--minus qtyminus\""); 3640 3641 WriteLiteral(" field=\"quantity\""); 3642 3643 WriteLiteral("/>\r\n <input"); 3644 3645 WriteLiteral(" type=\"number\""); 3646 3647 WriteLiteral(" class=\"product__quantity-input quantity\""); 3648 3649 WriteLiteral(" data-name=\"quantity\""); 3650 3651 WriteLiteral(" name=\"quantity\""); 3652 3653 WriteAttribute("value", Tuple.Create(" value=\"", 53448), Tuple.Create("\"", 53465) 3654 3655 #line 1027 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 3656 , Tuple.Create(Tuple.Create("", 53456), Tuple.Create<System.Object, System.Int32>(minOrder 3657 3658 #line default 3659 #line hidden 3660 , 53456), false) 3661 ); 3662 3663 WriteLiteral(" field=\"quantity\""); 3664 3665 WriteLiteral("/>\r\n <input"); 3666 3667 WriteLiteral(" type=\"button\""); 3668 3669 WriteLiteral(" value=\"+\""); 3670 3671 WriteLiteral(" class=\"product__quantity-button product__quantity-button--plus qtyplus\""); 3672 3673 WriteLiteral(" field=\"quantity\""); 3674 3675 WriteLiteral("/>\r\n </div>\r\n <div"); 3676 3677 WriteLiteral(" class=\"product__unit-selector\""); 3678 3679 WriteLiteral(" style=\"display: inline-block;\""); 3680 3681 WriteLiteral(">\r\n\r\n"); 3682 3683 3684 #line 1032 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 3685 3686 3687 #line default 3688 #line hidden 3689 3690 #line 1032 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 3691 3692 var index = 0; 3693 3694 3695 #line default 3696 #line hidden 3697 WriteLiteral("\r\n\r\n"); 3698 3699 3700 #line 1036 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 3701 3702 3703 #line default 3704 #line hidden 3705 3706 #line 1036 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 3707 foreach (var unitDropdown in unitsDropdown) 3708 { 3709 index++; 3710 var currentUnitPrice = prices[index - 1].Values["Ecom:Product.Prices.Amount"]; 3711 3712 3713 #line default 3714 #line hidden 3715 WriteLiteral(" <input"); 3716 3717 WriteLiteral(" data-price=\""); 3718 3719 3720 #line 1040 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 3721 Write(currentUnitPrice); 3722 3723 3724 #line default 3725 #line hidden 3726 WriteLiteral("\""); 3727 3728 WriteLiteral(" class=\"unit-type\""); 3729 3730 WriteLiteral(" type=\"radio\""); 3731 3732 WriteAttribute("id", Tuple.Create(" id=\"", 54237), Tuple.Create("\"", 54258) 3733 3734 #line 1040 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 3735 , Tuple.Create(Tuple.Create("", 54242), Tuple.Create<System.Object, System.Int32>(unitDropdown.Id 3736 3737 #line default 3738 #line hidden 3739 , 54242), false) 3740 ); 3741 3742 WriteLiteral(" name=\"UnitID\""); 3743 3744 WriteAttribute("value", Tuple.Create(" value=\"", 54273), Tuple.Create("\"", 54297) 3745 3746 #line 1040 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 3747 , Tuple.Create(Tuple.Create("", 54281), Tuple.Create<System.Object, System.Int32>(unitDropdown.Id 3748 3749 #line default 3750 #line hidden 3751 , 54281), false) 3752 ); 3753 3754 WriteLiteral(" required"); 3755 3756 WriteLiteral(" data-lot-size=\""); 3757 3758 3759 #line 1040 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 3760 Write(unitDropdown.LotSize); 3761 3762 3763 #line default 3764 #line hidden 3765 WriteLiteral("\""); 3766 3767 WriteLiteral(" data-min-order=\""); 3768 3769 3770 #line 1040 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 3771 Write(unitDropdown.MinOrder); 3772 3773 3774 #line default 3775 #line hidden 3776 WriteLiteral("\""); 3777 3778 WriteLiteral(" "); 3779 3780 3781 #line 1040 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 3782 Write(unitsDropdown.Count == 1 ? "checked='checked'" : ""); 3783 3784 3785 #line default 3786 #line hidden 3787 WriteLiteral(">\r\n"); 3788 3789 WriteLiteral(" <label"); 3790 3791 WriteAttribute("for", Tuple.Create(" for=\"", 54481), Tuple.Create("\"", 54503) 3792 3793 #line 1041 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 3794 , Tuple.Create(Tuple.Create("", 54487), Tuple.Create<System.Object, System.Int32>(unitDropdown.Id 3795 3796 #line default 3797 #line hidden 3798 , 54487), false) 3799 ); 3800 3801 WriteLiteral(">"); 3802 3803 3804 #line 1041 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 3805 Write(unitDropdown.Name); 3806 3807 3808 #line default 3809 #line hidden 3810 WriteLiteral("</label>\r\n"); 3811 3812 3813 #line 1042 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 3814 } 3815 3816 3817 #line default 3818 #line hidden 3819 WriteLiteral(" </div>\r\n <p"); 3820 3821 WriteLiteral(" class=\"product__unit-selector-error-message\""); 3822 3823 WriteLiteral(">\r\n * Du mangler at vælge type\r\n " + 3824 " </p>\r\n </div>\r\n <div"); 3825 3826 WriteLiteral(" class=\"col-xs-5\""); 3827 3828 WriteLiteral(">\r\n <div"); 3829 3830 WriteLiteral(" class=\"product__addtocart-button\""); 3831 3832 WriteLiteral(">\r\n <button"); 3833 3834 WriteLiteral(" type=\"submit\""); 3835 3836 WriteLiteral(" name=\"submit\""); 3837 3838 WriteAttribute("onclick", Tuple.Create(" onclick=\"", 54956), Tuple.Create("\"", 55137) 3839 , Tuple.Create(Tuple.Create("", 54966), Tuple.Create("AddToCart(event,", 54966), true) 3840 , Tuple.Create(Tuple.Create(" ", 54982), Tuple.Create("\'", 54983), true) 3841 3842 #line 1050 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 3843 , Tuple.Create(Tuple.Create("", 54984), Tuple.Create<System.Object, System.Int32>(product 3844 3845 #line default 3846 #line hidden 3847 , 54984), false) 3848 , Tuple.Create(Tuple.Create("", 54992), Tuple.Create("\',", 54992), true) 3849 , Tuple.Create(Tuple.Create(" ", 54994), Tuple.Create("$(this).parent().parent().prev().find(\'input.quantity\').val(),", 54995), true) 3850 , Tuple.Create(Tuple.Create(" ", 55057), Tuple.Create("$(this).parent().parent().prev().find(\'input[name=\\\'UnitID\\\']:checked\').val());", 55058), true) 3851 ); 3852 3853 WriteLiteral(" class=\"btn btn-primary product__button\""); 3854 3855 WriteLiteral(">\r\n"); 3856 3857 WriteLiteral(" "); 3858 3859 3860 #line 1051 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 3861 Write(Translate("Add to cart", "Add to cart")); 3862 3863 3864 #line default 3865 #line hidden 3866 WriteLiteral("\r\n <svg"); 3867 3868 WriteLiteral(" class=\"product__button-icon hidden-xs\""); 3869 3870 WriteLiteral(">\r\n <use"); 3871 3872 WriteLiteral(" xmlns:xlink=\"http://www.w3.org/1999/xlink\""); 3873 3874 WriteLiteral(" xlink:href=\"/dist/icons/icons.svg#basket\""); 3875 3876 WriteLiteral("></use>\r\n </svg>\r\n </bu" + 3877 "tton>\r\n </div>\r\n </div>\r\n " + 3878 " </div>\r\n"); 3879 3880 3881 #line 1059 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 3882 } 3883 3884 3885 #line default 3886 #line hidden 3887 WriteLiteral(" </div>\r\n\r\n "); 3888 3889 WriteLiteral("\r\n <div>\r\n\r\n "); 3890 3891 WriteLiteral("\r\n "); 3892 3893 WriteLiteral("\r\n <div"); 3894 3895 WriteLiteral(" class=\"product__description\""); 3896 3897 WriteLiteral(">\r\n <p>\r\n"); 3898 3899 3900 #line 1069 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 3901 3902 3903 #line default 3904 #line hidden 3905 3906 #line 1069 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 3907 3908 string productDescrption = null; 3909 if (!String.IsNullOrEmpty(GetString("Ecom:Product:Field.Teaser"))) 3910 { 3911 productDescrption = GetString("Ecom:Product:Field.Teaser"); 3912 3913 3914 #line default 3915 #line hidden 3916 WriteLiteral(" <div>\r\n"); 3917 3918 3919 #line 1075 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 3920 3921 3922 #line default 3923 #line hidden 3924 3925 #line 1075 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 3926 if (GetString("Ecom:Product.LongDescription").Length > 150) 3927 { 3928 productDescrption = productDescrption + "..."; 3929 3930 3931 #line default 3932 #line hidden 3933 WriteLiteral(" <p"); 3934 3935 WriteLiteral(" class=\"product__description__long\""); 3936 3937 WriteLiteral(">\r\n"); 3938 3939 WriteLiteral(" "); 3940 3941 3942 #line 1079 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 3943 Write(productDescrption); 3944 3945 3946 #line default 3947 #line hidden 3948 WriteLiteral("\r\n </p>\r\n"); 3949 3950 WriteLiteral(" <p>\r\n " + 3951 "<a"); 3952 3953 WriteLiteral(" href=\"#productLongDescriptionID\""); 3954 3955 WriteLiteral(" id=\"js-smooth-scroll\""); 3956 3957 WriteLiteral(" class=\"js-smooth-scroll\""); 3958 3959 WriteLiteral(">"); 3960 3961 3962 #line 1082 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 3963 Write(Translate("ReadMore", "Læs mere")); 3964 3965 3966 #line default 3967 #line hidden 3968 WriteLiteral("</a>\r\n </p>\r\n"); 3969 3970 3971 #line 1084 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 3972 } 3973 else 3974 { 3975 3976 3977 #line default 3978 #line hidden 3979 WriteLiteral(" <p"); 3980 3981 WriteLiteral(" class=\"product__description__long\""); 3982 3983 WriteLiteral(">\r\n"); 3984 3985 WriteLiteral(" "); 3986 3987 3988 #line 1088 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 3989 Write(productDescrption); 3990 3991 3992 #line default 3993 #line hidden 3994 WriteLiteral("\r\n </p>\r\n"); 3995 3996 3997 #line 1090 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 3998 } 3999 4000 4001 #line default 4002 #line hidden 4003 WriteLiteral(" </div>\r\n"); 4004 4005 4006 #line 1092 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4007 } 4008 else if (String.IsNullOrEmpty(GetString("Ecom:Product.LongDescription")) && String.IsNullOrEmpty(GetString("Ecom:Product:Field.Teaser"))) 4009 { 4010 productDescrption = GetString("Ecom:Group.Description"); 4011 4012 4013 #line default 4014 #line hidden 4015 4016 #line 1096 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4017 Write(productDescrption); 4018 4019 4020 #line default 4021 #line hidden 4022 4023 #line 1096 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4024 4025 } 4026 else 4027 { 4028 productDescrption = StripHTML(GetString("Ecom:Product.LongDescription").ToString()); 4029 if (productDescrption.Length > 150) 4030 { 4031 productDescrption = productDescrption.Substring(0, 150) + "..."; 4032 4033 4034 4035 #line default 4036 #line hidden 4037 WriteLiteral(" <p"); 4038 4039 WriteLiteral(" class=\"product__description__long\""); 4040 4041 WriteLiteral(">\r\n"); 4042 4043 WriteLiteral(" "); 4044 4045 4046 #line 1106 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4047 Write(productDescrption); 4048 4049 4050 #line default 4051 #line hidden 4052 WriteLiteral("\r\n\r\n </p>\r\n"); 4053 4054 WriteLiteral(" <p>\r\n <a"); 4055 4056 WriteLiteral(" href=\"#productLongDescriptionID\""); 4057 4058 WriteLiteral(" id=\"js-smooth-scroll\""); 4059 4060 WriteLiteral(" class=\"js-smooth-scroll\""); 4061 4062 WriteLiteral(">"); 4063 4064 4065 #line 1110 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4066 Write(Translate("ReadMore", "Læs mere")); 4067 4068 4069 #line default 4070 #line hidden 4071 WriteLiteral("</a>\r\n </p>\r\n"); 4072 4073 4074 #line 1112 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4075 } 4076 else 4077 { 4078 productDescrption = GetString("Ecom:Product.LongDescription"); 4079 4080 4081 #line default 4082 #line hidden 4083 WriteLiteral(" <p"); 4084 4085 WriteLiteral(" class=\"product__description__long\""); 4086 4087 WriteLiteral(">\r\n"); 4088 4089 WriteLiteral(" "); 4090 4091 4092 #line 1117 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4093 Write(productDescrption); 4094 4095 4096 #line default 4097 #line hidden 4098 WriteLiteral("\r\n </p>\r\n"); 4099 4100 4101 #line 1119 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4102 } 4103 } 4104 4105 4106 #line default 4107 #line hidden 4108 WriteLiteral("\r\n\r\n </p>\r\n\r\n </div>\r\n\r\n "); 4109 4110 WriteLiteral("\r\n <div"); 4111 4112 WriteLiteral(" class=\"product__information\""); 4113 4114 WriteLiteral(">\r\n <h3>Specifikationer</h3>\r\n <dl"); 4115 4116 WriteLiteral(" class=\"product__information-table\""); 4117 4118 WriteLiteral(">\r\n"); 4119 4120 4121 #line 1131 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4122 4123 4124 #line default 4125 #line hidden 4126 4127 #line 1131 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4128 4129 int attributeLineCount = 0; 4130 for (int i = 1; i < 8; i++) 4131 { 4132 attributeLineCount++; 4133 string attributeName = "Ecom:Product:Field.Attribut" + attributeLineCount + "A"; 4134 string attributeValue = "Ecom:Product:Field.Attribut" + attributeLineCount + "B"; 4135 string attributeBrand = string.Empty; 4136 4137 if (GetString(attributeName) != "") 4138 { 4139 if (attributeLineCount == 7) 4140 { 4141 attributeBrand = "itemprop=\"brand\""; 4142 } 4143 4144 4145 4146 #line default 4147 #line hidden 4148 WriteLiteral(" <dt>"); 4149 4150 4151 #line 1147 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4152 Write(GetString(attributeName)); 4153 4154 4155 #line default 4156 #line hidden 4157 WriteLiteral(" :</dt>\r\n"); 4158 4159 WriteLiteral(" <dd "); 4160 4161 4162 #line 1148 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4163 Write(attributeBrand); 4164 4165 4166 #line default 4167 #line hidden 4168 WriteLiteral(">"); 4169 4170 4171 #line 1148 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4172 Write(GetString(attributeValue)); 4173 4174 4175 #line default 4176 #line hidden 4177 WriteLiteral("</dd>\r\n"); 4178 4179 4180 #line 1149 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4181 } 4182 } 4183 4184 4185 #line default 4186 #line hidden 4187 WriteLiteral("\r\n </dl>\r\n </div>\r\n\r\n "); 4188 4189 WriteLiteral("\r\n <div"); 4190 4191 WriteLiteral(" class=\"product__icons\""); 4192 4193 WriteLiteral(">\r\n"); 4194 4195 4196 #line 1157 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4197 4198 4199 #line default 4200 #line hidden 4201 4202 #line 1157 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4203 4204 foreach (var c in GetString("Ecom:Product:Field.Certificates").Split(',')) 4205 { 4206 if (!string.IsNullOrEmpty(c)) 4207 { 4208 4209 4210 #line default 4211 #line hidden 4212 WriteLiteral(" <img"); 4213 4214 WriteLiteral(" class=\"product__icon lazy\""); 4215 4216 WriteLiteral(" data-src=\"/Files/Images/Ecom/certificates/"); 4217 4218 4219 #line 1162 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4220 Write(c); 4221 4222 4223 #line default 4224 #line hidden 4225 WriteLiteral(".jpg\""); 4226 4227 WriteAttribute("title", Tuple.Create(" title=\"", 60457), Tuple.Create("\"", 60491) 4228 4229 #line 1162 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4230 , Tuple.Create(Tuple.Create("", 60465), Tuple.Create<System.Object, System.Int32>(Translate("Cert_" + c, c) 4231 4232 #line default 4233 #line hidden 4234 , 60465), false) 4235 ); 4236 4237 WriteLiteral("/>\r\n"); 4238 4239 4240 #line 1163 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4241 } 4242 } 4243 4244 4245 #line default 4246 #line hidden 4247 WriteLiteral("\r\n </div>\r\n\r\n\r\n "); 4248 4249 WriteLiteral("\r\n\r\n"); 4250 4251 4252 #line 1171 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4253 4254 4255 #line default 4256 #line hidden 4257 4258 #line 1171 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4259 if (GetString("Ecom:Product:Field.Link1Label") != "") 4260 { 4261 4262 4263 #line default 4264 #line hidden 4265 WriteLiteral(" <div>\r\n <a"); 4266 4267 WriteLiteral(" class=\"product__download-pdf\""); 4268 4269 WriteLiteral(" target=\"_blank\""); 4270 4271 WriteAttribute("href", Tuple.Create(" href=\"", 60793), Tuple.Create("\"", 60848) 4272 4273 #line 1174 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4274 , Tuple.Create(Tuple.Create("", 60800), Tuple.Create<System.Object, System.Int32>(GetString("Ecom:Product:Field.Link1File.Clean") 4275 4276 #line default 4277 #line hidden 4278 , 60800), false) 4279 ); 4280 4281 WriteLiteral(" class=\"\""); 4282 4283 WriteLiteral(">"); 4284 4285 4286 #line 1174 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4287 Write(GetString("Ecom:Product:Field.Link1Label")); 4288 4289 4290 #line default 4291 #line hidden 4292 WriteLiteral("</a>\r\n </div>\r\n"); 4293 4294 4295 #line 1176 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4296 } 4297 4298 4299 #line default 4300 #line hidden 4301 WriteLiteral(" "); 4302 4303 4304 #line 1177 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4305 if (GetString("Ecom:Product:Field.Link2Label") != "") 4306 { 4307 4308 4309 #line default 4310 #line hidden 4311 WriteLiteral(" <div>\r\n <a"); 4312 4313 WriteLiteral(" class=\"product__download-pdf\""); 4314 4315 WriteLiteral(" target=\"_blank\""); 4316 4317 WriteAttribute("href", Tuple.Create(" href=\"", 61121), Tuple.Create("\"", 61176) 4318 4319 #line 1180 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4320 , Tuple.Create(Tuple.Create("", 61128), Tuple.Create<System.Object, System.Int32>(GetString("Ecom:Product:Field.Link2File.Clean") 4321 4322 #line default 4323 #line hidden 4324 , 61128), false) 4325 ); 4326 4327 WriteLiteral(" class=\"\""); 4328 4329 WriteLiteral(">"); 4330 4331 4332 #line 1180 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4333 Write(GetString("Ecom:Product:Field.Link2Label")); 4334 4335 4336 #line default 4337 #line hidden 4338 WriteLiteral("</a>\r\n </div>\r\n"); 4339 4340 4341 #line 1182 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4342 } 4343 4344 4345 #line default 4346 #line hidden 4347 WriteLiteral(" "); 4348 4349 4350 #line 1183 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4351 if (GetString("Ecom:Product:Field.Link3Label") != "") 4352 { 4353 4354 4355 #line default 4356 #line hidden 4357 WriteLiteral(" <div>\r\n <a"); 4358 4359 WriteLiteral(" class=\"product__download-pdf\""); 4360 4361 WriteLiteral(" target=\"_blank\""); 4362 4363 WriteAttribute("href", Tuple.Create(" href=\"", 61449), Tuple.Create("\"", 61504) 4364 4365 #line 1186 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4366 , Tuple.Create(Tuple.Create("", 61456), Tuple.Create<System.Object, System.Int32>(GetString("Ecom:Product:Field.Link3File.Clean") 4367 4368 #line default 4369 #line hidden 4370 , 61456), false) 4371 ); 4372 4373 WriteLiteral(" class=\"\""); 4374 4375 WriteLiteral(">"); 4376 4377 4378 #line 1186 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4379 Write(GetString("Ecom:Product:Field.Link3Label")); 4380 4381 4382 #line default 4383 #line hidden 4384 WriteLiteral("</a>\r\n </div>\r\n"); 4385 4386 4387 #line 1188 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4388 } 4389 4390 4391 #line default 4392 #line hidden 4393 WriteLiteral(" "); 4394 4395 4396 #line 1189 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4397 if (GetString("Ecom:Product:Field.Link4Label") != "") 4398 { 4399 4400 4401 #line default 4402 #line hidden 4403 WriteLiteral(" <div>\r\n <a"); 4404 4405 WriteLiteral(" class=\"product__download-pdf\""); 4406 4407 WriteLiteral(" target=\"_blank\""); 4408 4409 WriteAttribute("href", Tuple.Create(" href=\"", 61777), Tuple.Create("\"", 61832) 4410 4411 #line 1192 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4412 , Tuple.Create(Tuple.Create("", 61784), Tuple.Create<System.Object, System.Int32>(GetString("Ecom:Product:Field.Link4File.Clean") 4413 4414 #line default 4415 #line hidden 4416 , 61784), false) 4417 ); 4418 4419 WriteLiteral(" class=\"\""); 4420 4421 WriteLiteral(">"); 4422 4423 4424 #line 1192 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4425 Write(GetString("Ecom:Product:Field.Link4Label")); 4426 4427 4428 #line default 4429 #line hidden 4430 WriteLiteral("</a>\r\n </div>\r\n"); 4431 4432 4433 #line 1194 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4434 } 4435 4436 4437 #line default 4438 #line hidden 4439 WriteLiteral(" "); 4440 4441 4442 #line 1195 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4443 if (GetString("Ecom:Product:Field.Link5Label") != "") 4444 { 4445 4446 4447 #line default 4448 #line hidden 4449 WriteLiteral(" <div>\r\n <a"); 4450 4451 WriteLiteral(" class=\"product__download-pdf\""); 4452 4453 WriteLiteral(" target=\"_blank\""); 4454 4455 WriteAttribute("href", Tuple.Create(" href=\"", 62105), Tuple.Create("\"", 62160) 4456 4457 #line 1198 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4458 , Tuple.Create(Tuple.Create("", 62112), Tuple.Create<System.Object, System.Int32>(GetString("Ecom:Product:Field.Link5File.Clean") 4459 4460 #line default 4461 #line hidden 4462 , 62112), false) 4463 ); 4464 4465 WriteLiteral(" class=\"\""); 4466 4467 WriteLiteral(">"); 4468 4469 4470 #line 1198 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4471 Write(GetString("Ecom:Product:Field.Link5Label")); 4472 4473 4474 #line default 4475 #line hidden 4476 WriteLiteral("</a>\r\n </div>\r\n"); 4477 4478 4479 #line 1200 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4480 } 4481 4482 4483 #line default 4484 #line hidden 4485 WriteLiteral("\r\n\r\n </div>\r\n </div>\r\n</div>\r\n</div>\r\n</div>\r\n</div>\r\n\r\n"); 4486 4487 WriteLiteral("\r\n\r\n"); 4488 4489 4490 #line 1212 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4491 if (GetString("Ecom:Product.RelatedCount") != "0") 4492 { 4493 4494 4495 #line default 4496 #line hidden 4497 WriteLiteral(" <div"); 4498 4499 WriteLiteral(" class=\"row\""); 4500 4501 WriteLiteral(">\r\n <div"); 4502 4503 WriteLiteral(" class=\"col-xs-12\""); 4504 4505 WriteLiteral(">\r\n <h3"); 4506 4507 WriteLiteral(" class=\"section-header shop-list__header\""); 4508 4509 WriteLiteral(">Relaterede varer</h3>\r\n <ul"); 4510 4511 WriteLiteral(" class=\"shop-list__list\""); 4512 4513 WriteLiteral(">\r\n"); 4514 4515 4516 #line 1218 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4517 4518 4519 #line default 4520 #line hidden 4521 4522 #line 1218 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4523 foreach (LoopItem relatedgroup in GetLoop("ProductRelatedGroups")) 4524 { 4525 var relatedproductloop = relatedgroup.GetLoop("RelatedProducts").OrderByDescending(g => g.GetString("Ecom:Product.LoopCounter")).Take(4).ToList(); 4526 4527 4528 #line default 4529 #line hidden 4530 4531 #line 1221 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4532 Write(GetProductListFullRelated(relatedproductloop, 3, 3, 1)); 4533 4534 4535 #line default 4536 #line hidden 4537 4538 #line 1221 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4539 4540 } 4541 4542 4543 #line default 4544 #line hidden 4545 WriteLiteral(" </ul>\r\n </div>\r\n </div>\r\n"); 4546 4547 4548 #line 1226 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4549 } 4550 4551 4552 #line default 4553 #line hidden 4554 WriteLiteral("\r\n"); 4555 4556 4557 #line 1228 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4558 if (!String.IsNullOrEmpty(GetString("Ecom:Product.LongDescription")) && StripHTML(GetString("Ecom:Product.LongDescription").ToString()).Length > 150) 4559 { 4560 4561 4562 #line default 4563 #line hidden 4564 WriteLiteral(" <div"); 4565 4566 WriteLiteral(" class=\"row\""); 4567 4568 WriteLiteral(">\r\n <div"); 4569 4570 WriteLiteral(" class=\"col-xs-12\""); 4571 4572 WriteLiteral(">\r\n <h3"); 4573 4574 WriteLiteral(" id=\"productLongDescriptionID\""); 4575 4576 WriteLiteral(" class=\"product__description-title\""); 4577 4578 WriteLiteral(">"); 4579 4580 4581 #line 1232 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4582 Write(Translate("Description", "Description")); 4583 4584 4585 #line default 4586 #line hidden 4587 WriteLiteral("</h3>\r\n </div>\r\n <div"); 4588 4589 WriteLiteral(" class=\"col-xs-12 py-4\""); 4590 4591 WriteLiteral(">\r\n <div"); 4592 4593 WriteLiteral(" style=\"display: block; margin-bottom: 15px;\""); 4594 4595 WriteLiteral(">\r\n <div"); 4596 4597 WriteLiteral(" class=\"product__details\""); 4598 4599 WriteLiteral(">\r\n"); 4600 4601 4602 #line 1237 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4603 4604 4605 #line default 4606 #line hidden 4607 4608 #line 1237 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4609 4610 var description = GetString("Ecom:Product.LongDescription"); 4611 4612 // Remove HTML tags 4613 string cleanedText = Regex.Replace(description, "<.*?>", " "); 4614 string[] words = cleanedText.Split(new[] { ' ', '\n', '\r', '\t' }, StringSplitOptions.RemoveEmptyEntries); 4615 bool readMoreButton = words.Length > 80; 4616 4617 4618 #line default 4619 #line hidden 4620 WriteLiteral("\r\n"); 4621 4622 4623 #line 1245 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4624 4625 4626 #line default 4627 #line hidden 4628 4629 #line 1245 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4630 if (readMoreButton) 4631 { 4632 4633 4634 #line default 4635 #line hidden 4636 WriteLiteral(" <div"); 4637 4638 WriteLiteral(" class=\"product__details__content\""); 4639 4640 WriteLiteral(" style=\"max-height: 75px;\""); 4641 4642 WriteLiteral(">\r\n"); 4643 4644 WriteLiteral(" "); 4645 4646 4647 #line 1248 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4648 Write(description); 4649 4650 4651 #line default 4652 #line hidden 4653 WriteLiteral("\r\n </div>\r\n"); 4654 4655 WriteLiteral(" <a"); 4656 4657 WriteLiteral(" onclick=\"updateDetailAccessibility(this)\""); 4658 4659 WriteLiteral(">"); 4660 4661 4662 #line 1250 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4663 Write(Translate("Læs mere")); 4664 4665 4666 #line default 4667 #line hidden 4668 WriteLiteral("</a>\r\n"); 4669 4670 4671 #line 1251 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4672 } 4673 else 4674 { 4675 4676 4677 #line default 4678 #line hidden 4679 4680 #line 1254 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4681 Write(description); 4682 4683 4684 #line default 4685 #line hidden 4686 4687 #line 1254 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4688 4689 } 4690 4691 4692 #line default 4693 #line hidden 4694 WriteLiteral(" </div>\r\n </div>\r\n </div>\r\n </div>\r\n"); 4695 4696 4697 #line 1260 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4698 } 4699 4700 4701 #line default 4702 #line hidden 4703 WriteLiteral("\r\n<span"); 4704 4705 WriteLiteral(" class=\"clerk\""); 4706 4707 WriteLiteral("\r\n data-template=\""); 4708 4709 WriteLiteral("@product-page-others-also-bought\""); 4710 4711 WriteLiteral("\r\n data-products=\'[\""); 4712 4713 4714 #line 1264 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4715 Write(GetString("Ecom:Product.ID")); 4716 4717 4718 #line default 4719 #line hidden 4720 WriteLiteral("\"]\'"); 4721 4722 WriteLiteral(">\r\n</span>\r\n\r\n\r\n<div"); 4723 4724 WriteLiteral(" class=\"row\""); 4725 4726 WriteLiteral(">\r\n <div"); 4727 4728 WriteLiteral(" class=\"col-md-12 col-sm-12 col-xs-12\""); 4729 4730 WriteLiteral("> </div>\r\n</div>\r\n\r\n"); 4731 4732 4733 #line 1272 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4734 4735 var priceInitial = prices.Where(x => x.GetString("Ecom:Product.Prices.UnitID").Equals(unitDefault.Id)).OrderBy(x => x.GetDouble("Ecom:Product.Prices.Quantity")).FirstOrDefault(); 4736 4737 CultureInfo us = new CultureInfo("en-US"); 4738 string datalayerPriceInitial = string.Empty; 4739 if (priceInitial != null && Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) 4740 { 4741 datalayerPriceInitial = priceInitial.GetDouble("Ecom:Product.Prices.Amount").ToString("n", us).Replace(",", ""); 4742 } 4743 4744 var pricesJs = new List<Dynamicweb.Ecommerce.LiveIntegration.Products.ProductPrice>(); 4745 foreach (var priceJs in prices) 4746 { 4747 var productPrice = new Dynamicweb.Ecommerce.LiveIntegration.Products.ProductPrice(); 4748 productPrice.BaseUnitPrice = priceJs.GetDouble("Ecom:Product.Prices.BaseUnitPrice"); 4749 productPrice.PriceQuantityPerUnit = priceJs.GetDouble("Ecom:Product.Prices.PriceQuantityPerUnit"); 4750 productPrice.Quantity = priceJs.GetDouble("Ecom:Product.Prices.Quantity"); 4751 productPrice.UnitId = priceJs.GetString("Ecom:Product.Prices.UnitID"); 4752 pricesJs.Add(productPrice); 4753 } 4754 4755 4756 #line default 4757 #line hidden 4758 WriteLiteral("\r\n\r\n"); 4759 4760 4761 #line 1294 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4762 if (!String.IsNullOrWhiteSpace(GetString("Item.Page.ScriptsBottom"))) 4763 { 4764 4765 4766 #line default 4767 #line hidden 4768 4769 #line 1296 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4770 Write(SnippetStart("JavaScriptBottom")); 4771 4772 4773 #line default 4774 #line hidden 4775 4776 #line 1296 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4777 4778 4779 4780 #line default 4781 #line hidden 4782 4783 #line 1297 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4784 Write(GetString("Item.Page.ScriptsBottom")); 4785 4786 4787 #line default 4788 #line hidden 4789 4790 #line 1297 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4791 4792 4793 4794 #line default 4795 #line hidden 4796 4797 #line 1298 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4798 Write(SnippetEnd("JavaScriptBottom")); 4799 4800 4801 #line default 4802 #line hidden 4803 4804 #line 1298 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4805 4806 } 4807 4808 4809 #line default 4810 #line hidden 4811 WriteLiteral("\r\n<script>\r\n var pricesJs = JSON.parse(\'"); 4812 4813 4814 #line 1302 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4815 Write(Newtonsoft.Json.JsonConvert.SerializeObject(pricesJs)); 4816 4817 4818 #line default 4819 #line hidden 4820 WriteLiteral("\');\r\n\r\n // Create our number formatter.\r\n var formatterUs = new Intl.Number" + 4821 "Format(\'en-US\', {\r\n minimumFractionDigits: 2,\r\n });\r\n\r\n\r\n\r\n\r\n $(\'.p" + 4822 "roduct__addtocart-button\').on(\'click\', function () {\r\n\r\n var quantityAdde" + 4823 "d = parseInt($(this).parent().prev().find(\'input.quantity\').val());\r\n var" + 4824 " unitAdded = $(this).parent().prev().find(\'select.unit\').val();\r\n var pri" + 4825 "ceFound = null;\r\n for (const key in pricesJs) {\r\n if (pricesJs" + 4826 "[key].UnitId == unitAdded && quantityAdded >= parseInt(pricesJs[key].Quantity)){" + 4827 "\r\n priceFound = pricesJs[key];\r\n }\r\n }\r\n\r\n " + 4828 " var priceAdded = 0;\r\n if (priceFound != null) {\r\n priceAdded = " + 4829 "(priceFound.BaseUnitPrice * priceFound.PriceQuantityPerUnit) * quantityAdded; " + 4830 " }\r\n\r\n var quantity = document.getElementsByClassName(\"product__quant" + 4831 "ity-input\")[0].value;\r\n var unitTypes = document.getElementsByClassName(\"" + 4832 "unit-type\");\r\n var isVariantNull = true;\r\n\r\n var index = 0;\r\n " + 4833 " var unitPrice;\r\n var currentUnitName;\r\n for (const button of un" + 4834 "itTypes){\r\n\r\n if (button.checked != false)\r\n {\r\n " + 4835 " isVariantNull = false;\r\n var tempPrice = button.dataset.pri" + 4836 "ce.replace(\".\",\"\");\r\n tempPrice = tempPrice.replace(\",\",\".\");\r\n " + 4837 " unitPrice = parseFloat(tempPrice);\r\n currentUnitNam" + 4838 "e = button.value.split(\"_\")[1];\r\n index++;\r\n }\r\n " + 4839 " }\r\n\r\n if (!isVariantNull)\r\n {\r\n dataLayer.push({ec" + 4840 "ommerce:null});\r\n dataLayer.push({\r\n \'event" + 4841 "\': \'add_to_cart\',\r\n \"ecommerce\":{\r\n " + 4842 " \"currency\" : \""); 4843 4844 4845 #line 1353 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4846 Write(GetString("Ecom:Product.CurrencyCode")); 4847 4848 4849 #line default 4850 #line hidden 4851 WriteLiteral("\",\r\n \"value\" : unitPrice * (parseInt(quantity)).toFixe" + 4852 "d(2),\r\n \"items\":[\r\n {\r" + 4853 "\n \"item_name\": \""); 4854 4855 4856 #line 1357 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4857 Write(GetString("Ecom:Product.Name")); 4858 4859 4860 #line default 4861 #line hidden 4862 WriteLiteral("\" + \" - \" + currentUnitName,\r\n \'item_id\': \'"); 4863 4864 4865 #line 1358 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4866 Write(GetString("Ecom:Product.ID")); 4867 4868 4869 #line default 4870 #line hidden 4871 WriteLiteral("\',\r\n \'price\': unitPrice,\r\n " + 4872 " \"item_brand\" : \"\",\r\n \"item_ca" + 4873 "tegory\": (categories[0] != null ? categories[0] : \"\"),\r\n " + 4874 " \"item_category2\": (categories[1] != null ? categories[1] : \"\"),\r\n " + 4875 " \"item_category3\": (categories[2] != null ? cate" + 4876 "gories[2] : \"\"),\r\n \"item_category4\": (categor" + 4877 "ies[3] != null ? categories[3] : \"\"),\r\n \"item" + 4878 "_category5\": (categories[4] != null ? categories[4] : \"\"),\r\n " + 4879 " \"quantity\": parseInt(quantity),\r\n " + 4880 " }\r\n ]\r\n },\r\n\r\n " + 4881 " });\r\n }\r\n\r\n });\r\n\r\n //Sets the unittype if only one unittype fo" + 4882 "r the product exists\r\n var types = document.getElementsByClassName(\"unit-type" + 4883 "\");\r\n var currentUnitName;\r\n var currentUnitPrice = 0;\r\n\r\n if (types.le" + 4884 "ngth === 1){\r\n currentUnitName = \" - \" + (types[0].value.split(\"_\")[1]);\r" + 4885 "\n var tempPrice = types[0].dataset.price;\r\n\r\n tempPrice = tempPric" + 4886 "e.replace(\".\",\"\");\r\n tempPrice = tempPrice.replace(\",\",\".\");\r\n cur" + 4887 "rentUnitPrice = parseFloat(tempPrice);\r\n\r\n }\r\n else{\r\n currentUnit" + 4888 "Name = \"\";\r\n }\r\n\r\n\r\n\r\n var initialCategories = document.getElementsByClassNa" + 4889 "me(\"page-header__title\")[0].dataset.categories;\r\n var categories = initialCateg" + 4890 "ories.split(\"_\");\r\n\r\n\r\n// View_item initial\r\n dataLayer.push({ecommerce:null});\r" + 4891 "\n dataLayer.push({\r\n \'event\': \'view_item\',\r\n \"ecommerce\":{" + 4892 "\r\n \"currency\" : \""); 4893 4894 4895 #line 1405 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4896 Write(GetString("Ecom:Product.CurrencyCode")); 4897 4898 4899 #line default 4900 #line hidden 4901 WriteLiteral("\",\r\n \"value\" : currentUnitPrice,\r\n \"items\":[\r\n " + 4902 " {\r\n \"item_name\": \""); 4903 4904 4905 #line 1409 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4906 Write(GetString("Ecom:Product.Name")); 4907 4908 4909 #line default 4910 #line hidden 4911 WriteLiteral("\" + currentUnitName,\r\n \'item_id\': \'"); 4912 4913 4914 #line 1410 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4915 Write(GetString("Ecom:Product.ID")); 4916 4917 4918 #line default 4919 #line hidden 4920 WriteLiteral(@"', 4921 'price': currentUnitPrice, 4922 ""item_brand"" : """", 4923 ""item_category"": (categories[0] != null ? categories[0] : """"), 4924 ""item_category2"": (categories[1] != null ? categories[1] : """"), 4925 ""item_category3"": (categories[2] != null ? categories[2] : """"), 4926 ""item_category4"": (categories[3] != null ? categories[3] : """"), 4927 ""item_category5"": (categories[4] != null ? categories[4] : """"), 4928 ""quantity"": 1, 4929 4930 } 4931 ] 4932 }, 4933 4934 }); 4935 4936 var unitTypes = document.getElementsByClassName(""unit-type""); 4937 4938 var price; 4939 var oldPrice; 4940 4941 for (const btn of unitTypes) 4942 { 4943 btn.addEventListener(""click"", function () { 4944 4945 4946 tempPrice = this.dataset.price.replace(""."",""""); 4947 tempPrice = tempPrice.replace("","","".""); 4948 price = parseFloat(tempPrice); 4949 4950 currentUnitName = btn.value.split(""_"")[1]; 4951 4952 //checks to see if the new variant is the same as the old one 4953 if (price != oldPrice){ 4954 4955 dataLayer.push({ecommerce:null}); 4956 dataLayer.push({ 4957 'event': 'view_item', 4958 ""ecommerce"":{ 4959 ""currency"" : """); 4960 4961 4962 #line 1449 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4963 Write(GetString("Ecom:Product.CurrencyCode")); 4964 4965 4966 #line default 4967 #line hidden 4968 WriteLiteral("\",\r\n \"value\" : currentUnitPrice,\r\n " + 4969 " \"items\":[\r\n {\r\n " + 4970 " \"item_name\": \""); 4971 4972 4973 #line 1453 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4974 Write(GetString("Ecom:Product.Name")); 4975 4976 4977 #line default 4978 #line hidden 4979 WriteLiteral("\" + currentUnitName,\r\n \'item_id\': \'"); 4980 4981 4982 #line 1454 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 4983 Write(GetString("Ecom:Product.ID")); 4984 4985 4986 #line default 4987 #line hidden 4988 WriteLiteral(@"', 4989 'price': currentUnitPrice, 4990 ""item_brand"" : """", 4991 ""item_category"": (categories[0] != null ? categories[0] : """"), 4992 ""item_category2"": (categories[1] != null ? categories[1] : """"), 4993 ""item_category3"": (categories[2] != null ? categories[2] : """"), 4994 ""item_category4"": (categories[3] != null ? categories[3] : """"), 4995 ""item_category5"": (categories[4] != null ? categories[4] : """"), 4996 ""quantity"": 1, 4997 4998 } 4999 ] 5000 }, 5001 5002 }); 5003 5004 } 5005 oldPrice = price; 5006 }) 5007 } 5008 5009 </script> 5010 5011 "); 5012 5013 5014 #line 1477 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 5015 Write(SnippetStart("JavaScriptBottom")); 5016 5017 5018 #line default 5019 #line hidden 5020 WriteLiteral("\r\n<script"); 5021 5022 WriteLiteral(" type=\"text/javascript\""); 5023 5024 WriteAttribute("src", Tuple.Create(" src=\"", 73038), Tuple.Create("\"", 73094) 5025 , Tuple.Create(Tuple.Create("", 73044), Tuple.Create<System.Object, System.Int32>(ResolveUrl("~/Files/Templates/Designs/Dwsimple/js/video-api.js") 5026 , 73044), false) 5027 ); 5028 5029 WriteLiteral("></script>\r\n\r\n"); 5030 5031 5032 #line 1480 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 5033 if (currentUser != null) 5034 { 5035 5036 5037 #line default 5038 #line hidden 5039 WriteLiteral(" <script"); 5040 5041 WriteLiteral(" type=\"text/javascript\""); 5042 5043 WriteAttribute("src", Tuple.Create(" src=\"", 73173), Tuple.Create("\"", 73225) 5044 , Tuple.Create(Tuple.Create("", 73179), Tuple.Create<System.Object, System.Int32>(ResolveUrl("~/Files/Templates/Designs/Dwsimple/js/clerk.js") 5045 , 73179), false) 5046 ); 5047 5048 WriteLiteral("></script>\r\n"); 5049 5050 5051 #line 1483 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 5052 } 5053 5054 5055 #line default 5056 #line hidden 5057 WriteLiteral(@" 5058 <script> 5059 function on() { 5060 document.getElementById(""overlay"").style.display = ""block""; 5061 callPlayer('product-video', 'playVideo'); 5062 } 5063 function off() { 5064 document.getElementById(""overlay"").style.display = ""none""; 5065 callPlayer('product-video', 'pauseVideo'); 5066 } 5067 function updateDetailAccessibility(button) 5068 { 5069 5070 var content = document.getElementsByClassName(""product__details__content"")[0]; 5071 5072 var defaultHeight = ""75px""; 5073 5074 if (content.style.maxHeight == defaultHeight) 5075 { 5076 content.style.maxHeight = content.scrollHeight + ""px""; 5077 button.innerText = '"); 5078 5079 5080 #line 1504 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 5081 Write(Translate("ReadLess")); 5082 5083 5084 #line default 5085 #line hidden 5086 WriteLiteral("\'\r\n }\r\n else {\r\n content.style.maxHeight = d" + 5087 "efaultHeight; \r\n button.innerText = \'"); 5088 5089 5090 #line 1508 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 5091 Write(Translate("ReadMore")); 5092 5093 5094 #line default 5095 #line hidden 5096 WriteLiteral("\'\r\n }\r\n \r\n \r\n }\r\n </script>\r\n\r\n"); 5097 5098 5099 #line 1515 "D:\web\hounisen\Hounisen.Website\Files\Templates\Designs\Dwsimple\eCom\Product\Product.cshtml" 5100 Write(SnippetEnd("JavaScriptBottom")); 5101 5102 5103 #line default 5104 #line hidden 5105 WriteLiteral("\r\n\r\n"); 5106 5107 WriteLiteral(@" 5108 5109 <style> 5110 5111 .product__details { 5112 position: relative; 5113 p { 5114 margin: 0; 5115 width: fit-content; 5116 } 5117 a:hover{ 5118 cursor: pointer; 5119 } 5120 5121 .product__details__content { 5122 5123 5124 overflow: hidden; 5125 transition: max-height 0.3s ease; 5126 } 5127 5128 } 5129 5130 5131 </style>"); 5132 5133 } 5134 } 5135 } 5136
1 @using System.Web; 2 @using System.Net; 3 @using System.Globalization; 4 @using System.Text.RegularExpressions; 5 @using Dynamicweb; 6 @using Dynamicweb.Rendering; 7 @using Dynamicweb.Security.UserManagement; 8 @using System.IO; 9 @using Dynamicweb.Content 10 @using Dynamicweb.Core; 11 @using Dynamicweb.Ecommerce.Products 12 @using Hounisen.Website.Helpers 13 @using VestjyskMarketing.Models; 14 15 16 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 17 18 @using System.Globalization 19 @using Dynamicweb.Content 20 @using Dynamicweb.Ecommerce 21 @using Dynamicweb.Ecommerce.Products 22 @using Dynamicweb.Security.UserManagement 23 @using Hounisen.Website.Helpers 24 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 25 26 @using System.Text.RegularExpressions 27 @using System.Web 28 29 30 @functions{ 31 public class WrapMethods 32 { 33 //Gets the contrasting color 34 public static string getContrastYIQ(string hexcolor) 35 { 36 if (hexcolor != "") 37 { 38 hexcolor = Regex.Replace(hexcolor, "[^0-9a-zA-Z]+", ""); 39 40 int r = Convert.ToByte(hexcolor.Substring(0, 2), 16); 41 int g = Convert.ToByte(hexcolor.Substring(2, 2), 16); 42 int b = Convert.ToByte(hexcolor.Substring(4, 2), 16); 43 int yiq = ((r * 299) + (g * 587) + (b * 114)) / 1000; 44 45 if (yiq >= 128) 46 { 47 return "black"; 48 } 49 else 50 { 51 return "white"; 52 } 53 } 54 else 55 { 56 return "black"; 57 } 58 } 59 60 61 //Truncate text 62 public static string Truncate (string value, int count, bool strip=true) 63 { 64 if (strip == true){ 65 value = StripHtmlTagByCharArray(value); 66 } 67 68 if (value.Length > count) 69 { 70 value = value.Substring(0, count - 1) + "..."; 71 } 72 73 return value; 74 } 75 76 77 //Strip text from HTML 78 public static string StripHtmlTagByCharArray(string htmlString) 79 { 80 char[] array = new char[htmlString.Length]; 81 int arrayIndex = 0; 82 bool inside = false; 83 84 for (int i = 0; i < htmlString.Length; i++) 85 { 86 char let = htmlString[i]; 87 if (let == '<') 88 { 89 inside = true; 90 continue; 91 } 92 if (let == '>') 93 { 94 inside = false; 95 continue; 96 } 97 if (!inside) 98 { 99 array[arrayIndex] = let; 100 arrayIndex++; 101 } 102 } 103 return new string(array, 0, arrayIndex); 104 } 105 106 //Make the correct count of columns 107 public static string ColumnMaker(int Col, string ScreenSize) 108 { 109 string Columns = ""; 110 111 switch (Col) 112 { 113 case 1: 114 Columns = "col-"+ScreenSize+"-12"; 115 break; 116 117 case 2: 118 Columns = "col-"+ScreenSize+"-6"; 119 break; 120 121 case 3: 122 Columns = "col-"+ScreenSize+"-4"; 123 break; 124 125 case 4: 126 Columns = "col-"+ScreenSize+"-3"; 127 break; 128 129 default: 130 Columns = "col-"+ScreenSize+"-3"; 131 break; 132 } 133 134 return Columns; 135 } 136 137 138 private string Custom(string firstoption, string secondoption) 139 { 140 if (firstoption == "custom") 141 { 142 return secondoption; 143 } 144 else 145 { 146 return firstoption; 147 } 148 } 149 } 150 } 151 152 153 154 155 156 157 @helper GetProductList(dynamic Loop, int ColMD = 3, int ColSM = 3, int ColXS = 1) 158 { 159 int Count = 0; 160 161 int index = 1; 162 163 var embeddedScript = GetString("Ecom:Group:Field.ProductEmbeddedScript"); 164 var embedIndex = GetInteger("Ecom:Group:Field.EmbedScriptStartingIndex"); 165 166 IFormatProvider jsNumberFormat = new NumberFormatInfo() { NumberDecimalSeparator = ".", NumberGroupSeparator = "" }; 167 168 169 var groupService = new GroupService(); 170 var productService = new ProductService(); 171 var pageService = new PageService(); 172 173 // SKI AND Region H 174 bool hasSkiDeal = false; 175 bool hasRegionHDeal = false; 176 var currentUser = User.GetCurrentExtranetUser(); 177 if (currentUser != null) 178 { 179 var skiGroup = currentUser.Groups.FirstOrDefault(e => e.Name == "SKI"); 180 if (skiGroup != null && !string.IsNullOrEmpty(skiGroup.Name)) 181 { 182 hasSkiDeal = true; 183 } 184 185 hasRegionHDeal = Dynamicweb.Core.Converter.ToBoolean(currentUser.CustomFieldValues.Find(f => f.CustomField.SystemName == "AccessUser_RegionH").Value); 186 } 187 188 189 foreach (LoopItem product in Loop) 190 { 191 string GroupLink = "/Default.aspx?ID=" + product.GetString("Ecom:Product.PrimaryOrCurrentPageID") + "&groupid=" + product.GetString("Ecom:Product.PrimaryOrFirstGroupID") + "&productid=" + product.GetString("Ecom:Product.ID"); 192 // string GroupLink = product.GetString("Ecom:Product.LinkGroup.Clean"); 193 int stock = product.GetInteger("Ecom:Product.Stock"); 194 string Name = product.GetString("Ecom:Product.Name"); 195 string Description = product.GetString("Ecom:Product.ShortDescription"); 196 string prodID = product.GetString("Ecom:Product.ID"); 197 string prodVariantID = product.GetString("Ecom:Product.VariantID"); 198 string prodLanguageID = product.GetString("Ecom:Product.LanguageID"); 199 string Image = "/Admin/Public/GetImage.ashx?Image=/Files/Images/Ecom/Products/" + prodID + ".jpg&format=webp&quality=85"; 200 201 //prices and units 202 string defaultUnitId = product.GetString("Ecom:Product.DefaultUnitID"); 203 var prices = product.GetLoop("Product.Prices"); 204 List<string> pricesHtmlList = Hounisen.Website.Helpers.Helpers.PricesListMakeListString(prices); 205 List<Hounisen.Website.Models.Unit> unitsDropdown = Hounisen.Website.Helpers.Helpers.PopulateUnitsDropdown(prices); 206 var unitDefault = unitsDropdown.Where(x => x.Id.Equals(defaultUnitId)).FirstOrDefault(); 207 int minOrder = unitDefault != null ? unitDefault.MinOrder : 1; 208 209 if (!string.IsNullOrWhiteSpace(product.GetString("Ecom:Product.SelectedVariantComboID"))) 210 { 211 prodID = product.GetString("Ecom:Product.ID") + "&" + product.GetString("Ecom:Product.SelectedVariantComboID"); 212 } 213 214 GroupHelper gh = new GroupHelper(); 215 var masterPage = pageService.GetPage(product.GetInteger("Ecom:Product.PrimaryOrCurrentPageID")); 216 masterPage.GetDisplayName(); 217 218 var group = Dynamicweb.Ecommerce.Services.ProductGroups.GetGroup(product.GetString("Ecom:Product.PrimaryOrFirstGroupID")); 219 if (group != null) 220 { 221 var groupNames = gh.GetParentsRecursively(group, new List<string>()); 222 groupNames = gh.Format(groupNames, masterPage.GetDisplayName(), group); 223 var groups = gh.ListToString(groupNames); 224 } 225 226 <div class="product-list__item"> 227 <div class="col-xs-12"> 228 <div class="product-list__item-inner"> 229 <div class="col-xs-12 col-sm-4 col-flex"> 230 231 <div class="product-list-item__primary-image"> 232 @if (currentUser != null) 233 { 234 <a href="@GroupLink" title="@Name"> 235 <img class="product-list-item__image lazy" alt="@Name" data-src="@Image&width=300" class="img-responsive img-center"> 236 </a> 237 <a class="fancybox" data-fancybox href="@Image&width=1000" title="@Name"> 238 <svg class="product-list-item__image-icon"> 239 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/dist/icons/icons.svg#fullscreen"></use> 240 </svg> 241 </a> 242 } 243 else 244 { 245 <a href="@GroupLink" title="@Name"> 246 <img class="product-list-item__image lazy" alt="@Name" data-src="@Image&width=300" class="img-responsive img-center"> 247 </a> 248 <a class="fancybox" data-fancybox href="@Image&width=1000" title="@Name"> 249 <svg class="product-list-item__image-icon"> 250 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/dist/icons/icons.svg#fullscreen"></use> 251 </svg> 252 </a> 253 } 254 255 256 </div> 257 @{ 258 var productObj = productService.GetProductById(prodID, prodVariantID, prodLanguageID); 259 var overlayNameAndColors = new ProductImageOverlayHelper().GetTextAndColor(productObj); 260 261 <div class="product__primary-image__overlay-container"> 262 @foreach (var overlayNameAndColo in overlayNameAndColors) 263 { 264 <div style="background-color: @overlayNameAndColo.Value" class="product__primary-image__overlay-container__item"> 265 @overlayNameAndColo.Key 266 </div> 267 } 268 </div>} 269 </div> 270 <div class="col-xs-12 col-sm-8"> 271 <div class="product-list-item__info js-product-info"> 272 <div class="row"> 273 @*Title & Number*@ 274 <div class="col-xs-12"> 275 <h4 data-name="@Name" data-product_id="@prodID" data-categories="@groups" class="product-list-item__title"> 276 <a class="product-list-item__title-link" href="@GroupLink">@Name</a> 277 </h4> 278 </div> 279 </div> 280 <div class="row"> 281 <div class="col-xs-12 col-sm-5"> 282 283 <div class="product-list-item__attributes"> 284 <p> 285 <strong>Varenummer:</strong> @product.GetString("Ecom:Product.Number") 286 </p> 287 <p> 288 <strong>@product.GetString("Ecom:Product:Field.Attribut1A"):</strong><br/>@product.GetString("Ecom:Product:Field.Attribut1B") 289 </p> 290 <p> 291 <strong>@product.GetString("Ecom:Product:Field.Attribut2A"):</strong> @product.GetString("Ecom:Product:Field.Attribut2B") 292 </p> 293 </div> 294 295 <div class="hidden-xs"> 296 <div class=""> 297 @* IKONER *@ 298 <div class="product-list-item__icons"> 299 @{ 300 foreach (var c in product.GetString("Ecom:Product:Field.Certificates").Split(',')) 301 { 302 if (!string.IsNullOrEmpty(c)) 303 { 304 string src = "/Admin/Public/GetImage.ashx?Image=/Files/Images/Ecom/Certificates/" + @c + ".jpg&format=webp&quality=85&width=100"; 305 <img class="product-list-item__icon lazy" alt="@Translate("Cert_" + c, c)" title="@Translate("Cert_" + c, c)" data-src=@src src=@src> 306 } 307 } 308 } 309 </div> 310 </div> 311 </div> 312 </div> 313 314 <div class="col-xs-12 col-sm-7"> 315 @if (Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) 316 { 317 <ul class="product-list-item__prices"> 318 @foreach (var priceHtml in pricesHtmlList) 319 { 320 <li> 321 @priceHtml 322 </li> 323 } 324 </ul> 325 } 326 </div> 327 </div> 328 329 <div class="row"> 330 <div class="col-xs-12 col-sm-4 col-lg-5"> 331 @* LAGERBEHOLDNING *@ 332 <div class="product-list-item__stock"> 333 @{ 334 if (stock > 0) 335 { 336 <p class="product-list-item__stock-text"> 337 <span class="product-list-item__stock-circle product-list-item__stock-circle--green"></span> På lager 338 </p> 339 } 340 else 341 { 342 <p class="product-list-item__stock-text"> 343 <span class="product-list-item__stock-circle product-list-item__stock-circle--yellow"></span> Kontakt os for leveringstid: 86210800 eller salg@hounisen.com 344 </p> 345 } 346 } 347 </div> 348 349 <div class="product-list-item__see-product"> 350 <a class="product-list-item__link" href="@GroupLink" class="">@Translate("See product", "Se produkt")</a> 351 </div> 352 </div> 353 <div class="col-xs-12 col-sm-8 col-lg-7"> 354 @if (Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) 355 { 356 <div class="row"> 357 <div class="col-xs-7"> 358 <div class="product__addtocart-input js-addtocart-input"> 359 <input type="button" value="-" class="product-list-item__quantity-button product-list-item__quantity-button--minus qtyminus" field="quantity"/> 360 <input type="number" class="product__quantity-input product-list-item__quantity-input quantity" data-name="quantity" name="quantity" value="@minOrder" field="quantity"/> 361 <input type="button" value="+" class="product-list-item__quantity-button product-list-item__quantity-button--plus qtyplus" field="quantity"/> 362 </div> 363 <div class="product__unit-selector" style="display: inline-block;"> 364 @{ 365 int counter = 0; 366 } 367 @foreach (var unitDropdown in unitsDropdown) 368 { 369 var currentUnitPrice = prices[counter].Values["Ecom:Product.Prices.Amount"]; 370 <input type="radio" data-id="@index" data-price="@currentUnitPrice" class="unit-type" id="@(unitDropdown.Id + prodID)" name="UnitID@(product.GetString("Ecom:Product.Number"))" value="@unitDropdown.Id" required data-lot-size="@unitDropdown.LotSize" data-min-order="@unitDropdown.MinOrder" @(unitsDropdown.Count == 1 ? "checked='checked'" : "")> 371 <label for="@(unitDropdown.Id + prodID)">@unitDropdown.Name</label> 372 counter++; 373 } 374 </div> 375 <p class="product__unit-selector-error-message"> 376 @Translate("unit-error-message", "* Du mangler at vælge type") 377 </p> 378 </div> 379 <div class="col-xs-5"> 380 <div class="product__addtocart-button"> 381 <button data-id="@index" type="submit" name="submit" onclick="AddToCart(event, '@prodID', $(this).parent().parent().prev().find('input.quantity').val(), $(this).parent().parent().prev().find('input[name=\'UnitID@(product.GetString("Ecom:Product.Number"))\']:checked').val());" class="btn btn-primary product__button"> 382 @Translate("Add to cart", "Add to cart") 383 <svg class="product__button-icon hidden-xs"> 384 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/dist/icons/icons.svg#basket"></use> 385 </svg> 386 </button> 387 <div class="product-list-item__favorite-list popup-wrap favorite"> 388 389 @if (hasRegionHDeal == false) 390 { 391 <button class="popup-show" data-popup="favorite-list" type="button" title="@Translate("Add to favorites", "Add to favorites")"> 392 <i class="fa fa-star-o"></i> <span>Tilføj til liste</span> 393 </button> 394 <div id="favorite-list" class="popup-form"> 395 <div class="close"> 396 <i class="fa fa-times"></i> 397 </div> 398 <h3>@Translate("Choose list", "Choose list")</h3> 399 <ul> 400 @{ 401 var lists = Dynamicweb.Ecommerce.CustomerCenter.CustomerProductList.GetListsByUserCustomerNumber(currentUser.CustomerNumber); 402 } 403 404 @foreach (var list in lists) 405 { 406 if (list.Products.Where(p => p.ProductId.ToString() == prodID).Count() > 0) 407 { 408 <li> 409 <a href="@(System.Web.HttpContext.Current.Request.Url)&CCRemoveFromMyLists=@prodID&CCAddToListVariantID=&CCAddToListLanguageID=LANG1&CCAddToListID=@list.ListId&CCListType="> 410 <i class="fa fa-star"></i> @list.Name 411 </a> 412 </li> 413 } 414 else 415 { 416 <li> 417 <a href="@(System.Web.HttpContext.Current.Request.Url)&CCAddToMyLists=@prodID&CCAddToListVariantID=&CCAddToListLanguageID=LANG1&CCAddToListID=@list.ListId&CCListType="> 418 <i class="fa fa-star-o"></i> @list.Name 419 </a> 420 </li> 421 } 422 } 423 <li> 424 <a href="/favoritter/opret-favoritliste?ProdID=@prodID"> 425 <i class="fa fa-plus"></i>@Translate("Add new list", "Add new list") 426 </a> 427 </li> 428 </ul> 429 </div> 430 } 431 432 </div> 433 </div> 434 </div> 435 </div> 436 } 437 else 438 { 439 <div class="not-loggedin"> 440 <p class="not-loggedin-text"><a data-toggle="modal" data-target="#login" href="">@Translate("Login", "Login")</a> eller <a href="/kontakt/opret-brugerprofil">Bliv kunde</a> for at se priser og købe på Hounisen.com</p> 441 <a data-toggle="modal" data-target="#login" href="" class="btn btn-primary not-loggedin-button"> 442 <span>Log ind</span> 443 </a> 444 </div> 445 } 446 </div> 447 </div> 448 </div> 449 450 451 </div> 452 </div> 453 </div> 454 </div> 455 456 if (index == embedIndex) 457 { 458 <div class="product-list__item"> 459 <div class="col-xs-12"> 460 @embeddedScript 461 </div> 462 </div> 463 } 464 465 466 Count++; 467 index++; 468 469 if (Count == ColMD) 470 { 471 <div class="row"></div> 472 Count = 0; 473 } 474 } 475 } 476 477 <script> 478 479 document.addEventListener("DOMContentLoaded", function () { 480 481 var addToCartButtons = document.querySelectorAll('.product__button'); 482 var unitTypes = document.getElementsByClassName("unit-type"); 483 var product_names = document.getElementsByClassName("product-list-item__title"); 484 485 addToCartButtons.forEach(function (item) { 486 487 item.addEventListener('click', function () { 488 489 var product_name = product_names[this.dataset.id - 1].dataset.name; 490 var product_id = product_names[this.dataset.id - 1].dataset.product_id; 491 var initialCategories = product_names[this.dataset.id - 1].dataset.categories; 492 var categories = initialCategories.split("_"); 493 var quantity = document.getElementsByClassName("quantity")[this.dataset.id - 1].value; 494 var unitPrice; 495 var variantIsNull = true; 496 var unitTypeName = null; 497 498 //Get unittype price 499 for (const unitType of unitTypes) { 500 501 if (unitType.dataset.id == this.dataset.id) { 502 503 if (unitType.checked == true) { 504 505 var tempPrice = unitType.dataset.price.replace(".", ""); 506 tempPrice = tempPrice.replace(",", "."); 507 unitPrice = parseFloat(tempPrice); 508 variantIsNull = false; 509 unitTypeName = unitType.value; 510 511 unitTypeName = unitTypeName.toString().split("_")[1]; 512 513 } 514 } 515 } 516 517 if (!variantIsNull) { 518 dataLayer.push({ ecommerce: null }); 519 dataLayer.push({ 520 'event': 'add_to_cart', 521 "ecommerce": { 522 "currency": "DKK", 523 "value": unitPrice * parseInt(quantity).toFixed(2), 524 "items": [ 525 { 526 "item_name": product_name + " - " + unitTypeName, 527 'item_id': product_id, 528 'price': unitPrice, 529 "item_brand": "", 530 "item_category": (categories[0] != null ? categories[0] : ""), 531 "item_category2": (categories[1] != null ? categories[1] : ""), 532 "item_category3": (categories[2] != null ? categories[2] : ""), 533 "item_category4": (categories[3] != null ? categories[3] : ""), 534 "item_category5": (categories[4] != null ? categories[4] : ""), 535 "quantity": parseInt(quantity), 536 } 537 ] 538 }, 539 540 }); 541 } 542 }); 543 }) 544 }); 545 546 </script> 547 @using Dynamicweb.Security.UserManagement 548 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 549 550 @helper GetProductListRelated(dynamic Loop, int ColMD = 3, int ColSM = 3, int ColXS = 1) 551 { 552 var currentUser = User.GetCurrentExtranetUser(); 553 554 <ul class="shop-list__list"> 555 556 @foreach (LoopItem product in Loop) 557 { 558 559 string GroupLink = "/Default.aspx?ID=" + product.GetString("Ecom:Product.PrimaryOrCurrentPageID") + "&groupid=" + product.GetString("Ecom:Product.PrimaryOrFirstGroupID") + "&productid=" + product.GetString("Ecom:Product.ID"); 560 string Name = product.GetString("Ecom:Product.Name"); 561 string Description = product.GetString("Ecom:Product.ShortDescription"); 562 string prodID = product.GetString("Ecom:Product.ID"); 563 string Image = "/Admin/Public/GetImage.ashx?Image=/Files/Images/Ecom/Products/" + prodID + ".jpg&format=webp&quality=85"; 564 565 <li class="shop-list__item col-xs-12"> 566 <a class="shop-list__link" href="@GroupLink" title="@Name"> 567 <figure class="shop-list__figure"> 568 <img class="shop-list__image lazy" style="width: 213px;" alt="@Name" data-src="@Image&width=213"> 569 </figure> 570 <h4 class="shop-list__title">@Name</h4> 571 <div class="shop-list__text"> 572 @if (String.IsNullOrEmpty(product.GetString("Ecom:Product.LongDescription"))) 573 { 574 var gr = Dynamicweb.Ecommerce.Products.Group.GetGroupById(product.GetString("Ecom:Product.PrimaryOrFirstGroupID")); 575 576 @gr.Description.Replace("<a ", "<span ").Replace("</a>", "</span>").Replace("<h2>", "<p>").Replace("</h2>", "</p>") 577 } 578 else 579 { 580 @product.GetString("Ecom:Product.LongDescription").Replace("<a ", "<span ").Replace("</a>", "</span>").Replace("<h2>", "<p>").Replace("</h2>", "</p>") 581 } 582 583 </div> 584 <div class="shop-list__price"> 585 @if (currentUser != null) 586 { 587 string baseUnitPrice = String.Empty; 588 var price = product.GetLoop("Product.Prices").OrderBy(x => x.GetDouble("Ecom:Product.Prices.BaseUnitPrice")).FirstOrDefault(); 589 if (price != null) 590 { 591 baseUnitPrice = price.GetString("Ecom:Product.Prices.BaseUnitPrice"); 592 } 593 <span class="shop-list__price-from">Priser fra</span> 594 <span class="shop-list__price-value">@baseUnitPrice</span> 595 <span class="shop-list__price-unit">kr./stk.</span> 596 } 597 </div> 598 </a> 599 </li> 600 601 } 602 </ul> 603 } 604 605 606 @using Dynamicweb.Security.UserManagement 607 @using System.Text.RegularExpressions; 608 @using Hounisen.Website.Helpers 609 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 610 611 @helper GetProductListFullRelated(dynamic Loop, int ColMD = 4, int ColSM = 4, int ColXS = 1) 612 { 613 int Count = 0; 614 615 string ColumnsMD = WrapMethods.ColumnMaker(ColMD, "md"); 616 string ColumnsSM = WrapMethods.ColumnMaker(ColSM, "sm"); 617 string ColumnsXS = WrapMethods.ColumnMaker(ColXS, "xs"); 618 var currentUser = User.GetCurrentExtranetUser(); 619 620 foreach (LoopItem product in Loop) 621 { 622 string GroupLink = "/Default.aspx?ID=" + product.GetString("Ecom:Product.PrimaryOrCurrentPageID") + "&groupid=" + product.GetString("Ecom:Product.PrimaryOrFirstGroupID") + "&productid=" + product.GetString("Ecom:Product.ID"); 623 string Name = product.GetString("Ecom:Product.Name"); 624 string Description = GetFormattedDescription(product.GetString("Ecom:Product.LongDescription")); 625 string prodID = product.GetString("Ecom:Product.ID"); 626 string Image = "/Admin/Public/GetImage.ashx?Image=/Files/Images/Ecom/Products/" + prodID + ".jpg&format=webp&quality=85"; 627 var productObject = Dynamicweb.Ecommerce.Products.Product.GetProductById(product.GetString("Ecom:Product.ID"), product.GetString("Ecom:Product.VariantID"), product.GetString("Ecom:Product.LanguageID")); 628 var textAndColors = new ProductImageOverlayHelper().GetTextAndColor(productObject); 629 <li class="shop-list__item col-xs-12"> 630 <a class="shop-list__link" href="@GroupLink" title="@Name"> 631 <figure class="shop-list__figure" style="position: relative"> 632 <img class="shop-list__image lazy" style="width: 213px;" alt="@Name" data-src="@Image&width=213"> 633 <div class="product__primary-image__overlay-container"> 634 @foreach (var overlayNameAndColor in textAndColors) 635 { 636 <div style="background-color: @overlayNameAndColor.Value" class="product__primary-image__overlay-container__item"> 637 @overlayNameAndColor.Key 638 </div> 639 } 640 </div> 641 </figure> 642 <h4 class="shop-list__title">@Name</h4> 643 <div class="shop-list__text">@Description</div> 644 <div class="shop-list__price"> 645 @if (currentUser != null) 646 { 647 string baseUnitPrice = String.Empty; 648 var price = product.GetLoop("Product.Prices").OrderBy(x => x.GetDouble("Ecom:Product.Prices.BaseUnitPrice")).FirstOrDefault(); 649 if (price != null) 650 { 651 baseUnitPrice = price.GetString("Ecom:Product.Prices.BaseUnitPrice"); 652 } 653 654 <span class="shop-list__price-from">Priser fra</span> 655 <span class="shop-list__price-value">@baseUnitPrice</span> 656 <span class="shop-list__price-unit">kr./stk</span> 657 } 658 </div> 659 </a> 660 </li> 661 } 662 } 663 664 @functions { 665 private static string GetFormattedDescription(string description = "") 666 { 667 string formattedDescription = Regex.Replace(description, @"<.*?>|[\r\n\t]| ", " "); 668 return formattedDescription.Length > 103 ? formattedDescription.Substring(0, 103).TrimEnd() + "..." : formattedDescription; 669 } 670 } 671 672 <script src="/Files/Templates/Designs/DwSimple/js/ProductVariantsAjax.js"></script> 673 <link rel="stylesheet" href="/Files/Templates/Designs/DwSimple/css/product.css"/> 674 675 @{ 676 IFormatProvider jsNumberFormat = new NumberFormatInfo() { NumberDecimalSeparator = ".", NumberGroupSeparator = "" }; 677 string initialPrice = string.Empty; 678 string metaDescription = string.Empty; 679 if (String.IsNullOrEmpty(GetString("Ecom:Product.LongDescription"))) 680 { 681 metaDescription = StripHTML(GetString("Ecom:Group.Description")); 682 } 683 else 684 { 685 metaDescription = StripHTML(GetString("Ecom:Product.LongDescription")); 686 } 687 688 //prices and units 689 string defaultUnitId = GetString("Ecom:Product.DefaultUnitID"); 690 var prices = GetLoop("Product.Prices"); 691 List<string> pricesHtmlList = Hounisen.Website.Helpers.Helpers.PricesListMakeListString(prices, false); 692 List<Hounisen.Website.Models.Unit> unitsDropdown = Hounisen.Website.Helpers.Helpers.PopulateUnitsDropdown(prices); 693 var unitDefault = unitsDropdown.Where(x => x.Id.Equals(defaultUnitId)).FirstOrDefault(); 694 int minOrder = unitDefault != null ? unitDefault.MinOrder : 1; 695 696 697 //other vars 698 var pid = GetString("Ecom:Product.ID"); 699 int stock = GetInteger("Ecom:Product.Stock"); 700 string image = "/Admin/Public/GetImage.ashx?Image=/Files/Images/Ecom/Products/" + pid + ".jpg"; 701 string productname = GetString("Ecom:Product.Name"); 702 string productlink = "/Default.aspx?ID=" + GetString("Ecom:Product.PrimaryOrCurrentPageID") + "&groupid=" + GetString("Ecom:Product.PrimaryOrFirstGroupID") + "&productid=" + GetString("Ecom:Product.ID"); 703 704 705 // SKI AND Region H 706 bool hasSkiDeal = false; 707 bool hasRegionHDeal = false; 708 var currentUser = User.GetCurrentExtranetUser(); 709 if (currentUser != null) 710 { 711 var skiGroup = currentUser.Groups.FirstOrDefault(e => e.Name == "SKI"); 712 if (skiGroup != null && !string.IsNullOrEmpty(skiGroup.Name)) 713 { 714 hasSkiDeal = true; 715 } 716 717 hasRegionHDeal = Dynamicweb.Core.Converter.ToBoolean(currentUser.CustomFieldValues.Find(f => f.CustomField.SystemName == "AccessUser_RegionH").Value); 718 } 719 720 //serialized data 721 var pagedata = new System.Collections.Generic.Dictionary<String, Object>(); 722 Pageview.Area.Item.SerializeTo(pagedata); 723 724 725 var pageService = new PageService(); 726 GroupHelper gh = new GroupHelper(); 727 var group = Dynamicweb.Ecommerce.Services.ProductGroups.GetGroup(GetString("Ecom:Product.PrimaryOrFirstGroupID")); 728 var masterPage = pageService.GetPage(GetInteger("Ecom:Product.PrimaryOrCurrentPageID")); 729 masterPage.GetDisplayName(); 730 var groupNames = gh.GetParentsRecursively(group, new List<string>()); 731 groupNames = gh.Format(groupNames, masterPage.GetDisplayName(), group); 732 733 var groups = gh.ListToString(groupNames); 734 } 735 736 <div class="col-md-12 col-sm-12 col-xs-12 aaa"> 737 738 <div class="row product" itemscope itemtype="http://schema.org/Product"> 739 <section class="page-header"> 740 <div class="row product__help-name-container"> 741 <div class="col-xs-12 col-sm-7"> 742 <meta itemprop="description" content="@metaDescription"/> 743 <h1 data-categories="@groups" data-group="@GetString("Ecom:Group.Name")" class="page-header__title" itemprop="name">@GetString("Ecom:Product.Name")</h1> 744 <div class="page-header__short-description"> 745 <p class="product__number">@Translate("Productnumber", "Productnumber"): <span property="identifier" itemprop="mpn">@GetString("Ecom:Product.Number")</span></p> 746 @if (hasSkiDeal) 747 { 748 <p class="product__number">@Translate("Skinumber", "SKI nr"): <span property="identifier">@GetString("Ecom:Product:Field.SkiId")</span></p> 749 } 750 @if (hasRegionHDeal && GetBoolean("Ecom:Product:Field.RegionH")) 751 { 752 <p class="product__number">@Translate("RegionHText")</p> 753 } 754 755 </div> 756 </div> 757 <div class="col-xs-12 col-sm-offset-1 col-sm-4 product__help-name-container__help"> 758 <div class="need-help"> 759 <img class="need-help__image lazy" width="81" height="81" data-src='@(Pageview.Area.Item["Support_Image"].ToString())?format=webp&width=81&quality=75'/> 760 <div class="need-help__text"> 761 @Pageview.Area.Item["Support_Content"].ToString() 762 </div> 763 </div> 764 </div> 765 </div> 766 </section> 767 <div class="row"> 768 769 @* The image area *@ 770 <div class="col-md-5 col-sm-4 col-xs-12"> 771 <div class="product__gallery"> 772 773 @* Discount sticker *@ 774 775 @if (GetString("Ecom:Product.Discount.Price.PriceWithVATFormatted") != GetString("Ecom:Product.Price.PriceWithVATFormatted")) 776 { 777 if (pagedata["EcommerceStickerType"].ToString() == "ribbon") 778 { 779 <span class="ribbon base">@Translate("On sale!", "On sale!")</span> 780 } 781 782 if (pagedata["EcommerceStickerType"].ToString() == "ball") 783 { 784 <span class="ball">@Translate("On sale!", "On sale!")</span> 785 } 786 } 787 788 789 @* Product images *@ 790 @{ 791 string currenthost = HttpContext.Current.Request.Url.AbsoluteUri; 792 Uri uri = new Uri(currenthost); 793 currenthost = string.Format("{0}://{1}", uri.Scheme, uri.Authority); 794 string ImagePathloop = ""; 795 string ImagePathClean = ""; 796 string options = "format=webp&quality=85&width=1000"; 797 List<string> imagepath = new List<string>(); 798 for (int i = 0; i <= 4; i++) 799 { 800 if (i == 0) 801 { 802 ImagePathloop = VestjyskMarketing.Helpers.ImageHelper.ResizeImage(new ResizeImageSettings() 803 { 804 Image = $"/Files/Images/Ecom/Products/{pid}.jpg", 805 Width = 1000, 806 Quality = 85 807 }); 808 imagepath.Add(ImagePathloop); 809 } 810 else 811 { 812 ImagePathloop = "/Admin/Public/GetImage.ashx?Image=/Files/Images/Ecom/Products/" + pid + "-0" + i.ToString() + ".jpg"; 813 //currenthost + 814 ImagePathClean = "/Files/Images/Ecom/Products/" + pid + "-0" + i.ToString() + ".jpg"; 815 816 try 817 { 818 if (File.Exists(HttpContext.Current.Server.MapPath(ImagePathClean))) 819 { 820 imagepath.Add(ImagePathloop + "&" + options); 821 } 822 823 824 HttpWebRequest request = (HttpWebRequest)System.Net.WebRequest.Create(ImagePathloop); 825 using (HttpWebResponse response = (HttpWebResponse)request.GetResponse()) 826 { 827 if (response.StatusCode == HttpStatusCode.NotFound) 828 { 829 break; 830 } 831 else 832 { 833 imagepath.Add("/Files/Images/Ecom/Products/" + pid + "-0" + i.ToString() + ".jpg" + "" + options); 834 } 835 } 836 } 837 catch (Exception ex) 838 { 839 } 840 } 841 } 842 } 843 844 @{ 845 var resizedImageLarge = VestjyskMarketing.Helpers.ImageHelper.ResizeImage(new ResizeImageSettings() 846 { 847 Image = $"/Files/Images/Ecom/Products/{pid}.jpg", 848 Width = 1000, 849 Quality = 99 850 }); 851 852 var resizedImage = VestjyskMarketing.Helpers.ImageHelper.ResizeImage(new ResizeImageSettings() 853 { 854 Image = $"/Files/Images/Ecom/Products/{pid}.jpg", 855 Width = 458, 856 Quality = 85 857 }); 858 } 859 860 <div class="product__primary-image"> 861 <a href="@resizedImageLarge" data-fancybox class="fancybox"> 862 <img src="@resizedImage" data-src="@resizedImage" width="458" alt="@productname" class="product__image img-responsive lazy" itemprop="image"> 863 @{ 864 var productObj = new ProductService().GetProductById(GetString("Ecom:Product.ID"),GetString("Ecom:Product.VariantID"),GetString("Ecom:Product.LanguageID")); 865 var overlayNameAndColors = new ProductImageOverlayHelper().GetTextAndColor(productObj); 866 } 867 868 <div class="product__primary-image__overlay-container"> 869 @foreach (var overlayNameAndColor in overlayNameAndColors) 870 { 871 <div style="background-color: @overlayNameAndColor.Value" class="product__primary-image__overlay-container__item"> 872 @overlayNameAndColor.Key 873 </div> 874 } 875 </div> 876 <svg class="product__image-icon"> 877 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/dist/icons/icons.svg#fullscreen"></use> 878 </svg> 879 </a> 880 </div> 881 <div class="row"> 882 <div class="product__thumbnail-list"> 883 @foreach (var imageThumb in imagepath) 884 { 885 <div class="col-sm-3 col-xs-4"> 886 <div class="product__thumbnail-images"> 887 <a href="@imageThumb&width=1000" rel="product" class="fancybox"> 888 <img data-src="@imageThumb&width=458" width="458" alt="@productname" class="img-responsive lazy"> 889 </a> 890 </div> 891 </div> 892 } 893 @{ 894 var youtubeId = GetString("Ecom:Product:Field.YoutubeId"); 895 var youtubeUrl = $"//www.youtube.com/embed/{youtubeId}?autoplay=0"; 896 if (!string.IsNullOrEmpty(youtubeId)) 897 { 898 <div class="col-sm-3 col-xs-4"> 899 <div id="video-container" class="product__thumbnail-list__video-thumbnail" onclick="on(); return false;"> 900 <iframe width="100%" height="70" src="@youtubeUrl" frameborder="0"></iframe> 901 <div class="product__thumbnail-list__video-thumbnail__video"></div> 902 </div> 903 <div id="overlay" class="product__thumbnail-list__overlay" onclick="off()"> 904 <iframe class="product__thumbnail-list__overlay__video" id="product-video" width="100%" height="80%" src="@youtubeUrl?autoplay=1&enablejsapi=1" frameborder="0"></iframe> 905 </div> 906 </div> 907 } 908 } 909 </div> 910 </div> 911 </div> 912 </div> 913 914 @* The main product information area *@ 915 916 <div class="col-md-7 col-sm-8 col-xs-12 "> 917 <div class="product-info js-product-info" id="productinfo"> 918 <div class="product__control"> 919 <div class="row"> 920 <div class="col-xs-12 col-sm-6"> 921 @* LAGERBEHOLDNING *@ 922 <div class="product__stock"> 923 @{ 924 if (stock > 0) 925 { 926 <p class="product__stock-text"> 927 <span class="product__stock-circle product__stock-circle--green"></span> På lager 928 </p> 929 } 930 else 931 { 932 <p class="product__stock-text"> 933 <span class="product__stock-circle product__stock-circle--yellow"></span> Kontakt os for leveringstid: 86210800 eller salg@hounisen.com 934 </p> 935 } 936 } 937 </div> 938 </div> 939 <div class="col-xs-12 col-sm-6"> 940 @* FAVORITTER *@ 941 @if (Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) 942 { 943 if (hasRegionHDeal == false) 944 { 945 <div class="product__favorite-list popup-wrap favorite"> 946 <button class="popup-show" data-popup="favorite-list" type="button" title="@Translate("Add to favorites", "Add to favorites")"> 947 <i class="fa fa-star-o"></i> <span>@Translate("Add to favorites", "Add to favorites")</span> 948 </button> 949 <div id="favorite-list" class="popup-form"> 950 <div class="close"> 951 <i class="fa fa-times"></i> 952 </div> 953 <h3>@Translate("Choose list", "Choose list")</h3> 954 <ul> 955 @{ 956 var lists = Dynamicweb.Ecommerce.CustomerCenter.CustomerProductList.GetListsByUserCustomerNumber(currentUser.CustomerNumber); 957 } 958 959 @foreach (var list in lists) 960 { 961 if (list.Products.Where(p => p.ProductId.ToString() == GetString("Ecom:Product.ID")).Count() > 0) 962 { 963 <li> 964 <a href="@(System.Web.HttpContext.Current.Request.Url)&CCRemoveFromMyLists=@GetString("Ecom:Product.ID")&CCAddToListVariantID=&CCAddToListLanguageID=LANG1&CCAddToListID=@list.ListId&CCListType="> 965 <i class="fa fa-star"></i> @list.Name 966 </a> 967 </li> 968 } 969 else 970 { 971 <li> 972 <a href="@(System.Web.HttpContext.Current.Request.Url)&CCAddToMyLists=@GetString("Ecom:Product.ID")&CCAddToListVariantID=&CCAddToListLanguageID=LANG1&CCAddToListID=@list.ListId&CCListType="> 973 <i class="fa fa-star-o"></i> @list.Name 974 </a> 975 </li> 976 } 977 } 978 <li> 979 <a href="/favoritter/opret-favoritliste?ProdID=@GetString("Ecom:Product.ID")"> 980 <i class="fa fa-plus"></i>@Translate("Add new list", "Add new list") 981 </a> 982 </li> 983 </ul> 984 </div> 985 </div> 986 } 987 } 988 else 989 { 990 <div class="not-loggedin"> 991 <p class="not-loggedin-text"><a data-toggle="modal" data-target="#login" href="">@Translate("Login", "Login")</a> eller <a href="/kontakt/opret-brugerprofil">Bliv kunde</a> for at se priser og købe på Hounisen.com</p> 992 <a data-toggle="modal" data-target="#login" href="" class="btn btn-primary not-loggedin-button"> 993 <span>Log ind</span> 994 </a> 995 </div> 996 } 997 </div> 998 </div> 999 1000 1001 @* Prices and actions *@ 1002 @if (Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) 1003 { 1004 var product = GetString("Ecom:Product.ID"); 1005 if (!string.IsNullOrWhiteSpace(GetString("Ecom:Product.SelectedVariantComboID"))) 1006 { 1007 product = GetString("Ecom:Product.ID") + "&" + GetString("Ecom:Product.SelectedVariantComboID"); 1008 } 1009 1010 <div class="row"> 1011 <div class="col-xs-12"> 1012 <ul class="product__prices"> 1013 @foreach (var priceHtml in pricesHtmlList) 1014 { 1015 <li> 1016 @priceHtml 1017 </li> 1018 } 1019 </ul> 1020 </div> 1021 </div> 1022 1023 <div class="row"> 1024 <div class="col-xs-7"> 1025 <div class="product__addtocart-input js-addtocart-input"> 1026 <input type="button" value="-" class="product__quantity-button product__quantity-button--minus qtyminus" field="quantity"/> 1027 <input type="number" class="product__quantity-input quantity" data-name="quantity" name="quantity" value="@minOrder" field="quantity"/> 1028 <input type="button" value="+" class="product__quantity-button product__quantity-button--plus qtyplus" field="quantity"/> 1029 </div> 1030 <div class="product__unit-selector" style="display: inline-block;"> 1031 1032 @{ 1033 var index = 0; 1034 } 1035 1036 @foreach (var unitDropdown in unitsDropdown) 1037 { 1038 index++; 1039 var currentUnitPrice = prices[index - 1].Values["Ecom:Product.Prices.Amount"]; 1040 <input data-price="@currentUnitPrice" class="unit-type" type="radio" id="@unitDropdown.Id" name="UnitID" value="@unitDropdown.Id" required data-lot-size="@unitDropdown.LotSize" data-min-order="@unitDropdown.MinOrder" @(unitsDropdown.Count == 1 ? "checked='checked'" : "")> 1041 <label for="@unitDropdown.Id">@unitDropdown.Name</label> 1042 } 1043 </div> 1044 <p class="product__unit-selector-error-message"> 1045 * Du mangler at vælge type 1046 </p> 1047 </div> 1048 <div class="col-xs-5"> 1049 <div class="product__addtocart-button"> 1050 <button type="submit" name="submit" onclick="AddToCart(event, '@product', $(this).parent().parent().prev().find('input.quantity').val(), $(this).parent().parent().prev().find('input[name=\'UnitID\']:checked').val());" class="btn btn-primary product__button"> 1051 @Translate("Add to cart", "Add to cart") 1052 <svg class="product__button-icon hidden-xs"> 1053 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/dist/icons/icons.svg#basket"></use> 1054 </svg> 1055 </button> 1056 </div> 1057 </div> 1058 </div> 1059 } 1060 </div> 1061 1062 @* Product details *@ 1063 <div> 1064 1065 @* BESKRIVELSE *@ 1066 @*PRODUCT Long*@ 1067 <div class="product__description"> 1068 <p> 1069 @{ 1070 string productDescrption = null; 1071 if (!String.IsNullOrEmpty(GetString("Ecom:Product:Field.Teaser"))) 1072 { 1073 productDescrption = GetString("Ecom:Product:Field.Teaser"); 1074 <div> 1075 @if (GetString("Ecom:Product.LongDescription").Length > 150) 1076 { 1077 productDescrption = productDescrption + "..."; 1078 <p class="product__description__long"> 1079 @productDescrption 1080 </p> 1081 <p> 1082 <a href="#productLongDescriptionID" id="js-smooth-scroll" class="js-smooth-scroll">@Translate("ReadMore", "Læs mere")</a> 1083 </p> 1084 } 1085 else 1086 { 1087 <p class="product__description__long"> 1088 @productDescrption 1089 </p> 1090 } 1091 </div> 1092 } 1093 else if (String.IsNullOrEmpty(GetString("Ecom:Product.LongDescription")) && String.IsNullOrEmpty(GetString("Ecom:Product:Field.Teaser"))) 1094 { 1095 productDescrption = GetString("Ecom:Group.Description"); 1096 @productDescrption 1097 } 1098 else 1099 { 1100 productDescrption = StripHTML(GetString("Ecom:Product.LongDescription").ToString()); 1101 if (productDescrption.Length > 150) 1102 { 1103 productDescrption = productDescrption.Substring(0, 150) + "..."; 1104 1105 <p class="product__description__long"> 1106 @productDescrption 1107 1108 </p> 1109 <p> 1110 <a href="#productLongDescriptionID" id="js-smooth-scroll" class="js-smooth-scroll">@Translate("ReadMore", "Læs mere")</a> 1111 </p> 1112 } 1113 else 1114 { 1115 productDescrption = GetString("Ecom:Product.LongDescription"); 1116 <p class="product__description__long"> 1117 @productDescrption 1118 </p> 1119 } 1120 } 1121 } 1122 1123 </p> 1124 1125 </div> 1126 1127 @* ATTRIBUTTER *@ 1128 <div class="product__information"> 1129 <h3>Specifikationer</h3> 1130 <dl class="product__information-table"> 1131 @{ 1132 int attributeLineCount = 0; 1133 for (int i = 1; i < 8; i++) 1134 { 1135 attributeLineCount++; 1136 string attributeName = "Ecom:Product:Field.Attribut" + attributeLineCount + "A"; 1137 string attributeValue = "Ecom:Product:Field.Attribut" + attributeLineCount + "B"; 1138 string attributeBrand = string.Empty; 1139 1140 if (GetString(attributeName) != "") 1141 { 1142 if (attributeLineCount == 7) 1143 { 1144 attributeBrand = "itemprop=\"brand\""; 1145 } 1146 1147 <dt>@GetString(attributeName) :</dt> 1148 <dd @attributeBrand>@GetString(attributeValue)</dd> 1149 } 1150 } 1151 } 1152 </dl> 1153 </div> 1154 1155 @* IKONER *@ 1156 <div class="product__icons"> 1157 @{ 1158 foreach (var c in GetString("Ecom:Product:Field.Certificates").Split(',')) 1159 { 1160 if (!string.IsNullOrEmpty(c)) 1161 { 1162 <img class="product__icon lazy" data-src="/Files/Images/Ecom/certificates/@(c).jpg" title="@Translate("Cert_" + c, c)"/> 1163 } 1164 } 1165 } 1166 </div> 1167 1168 1169 @* DOWNLOAD *@ 1170 1171 @if (GetString("Ecom:Product:Field.Link1Label") != "") 1172 { 1173 <div> 1174 <a class="product__download-pdf" target="_blank" href="@GetString("Ecom:Product:Field.Link1File.Clean")" class="">@GetString("Ecom:Product:Field.Link1Label")</a> 1175 </div> 1176 } 1177 @if (GetString("Ecom:Product:Field.Link2Label") != "") 1178 { 1179 <div> 1180 <a class="product__download-pdf" target="_blank" href="@GetString("Ecom:Product:Field.Link2File.Clean")" class="">@GetString("Ecom:Product:Field.Link2Label")</a> 1181 </div> 1182 } 1183 @if (GetString("Ecom:Product:Field.Link3Label") != "") 1184 { 1185 <div> 1186 <a class="product__download-pdf" target="_blank" href="@GetString("Ecom:Product:Field.Link3File.Clean")" class="">@GetString("Ecom:Product:Field.Link3Label")</a> 1187 </div> 1188 } 1189 @if (GetString("Ecom:Product:Field.Link4Label") != "") 1190 { 1191 <div> 1192 <a class="product__download-pdf" target="_blank" href="@GetString("Ecom:Product:Field.Link4File.Clean")" class="">@GetString("Ecom:Product:Field.Link4Label")</a> 1193 </div> 1194 } 1195 @if (GetString("Ecom:Product:Field.Link5Label") != "") 1196 { 1197 <div> 1198 <a class="product__download-pdf" target="_blank" href="@GetString("Ecom:Product:Field.Link5File.Clean")" class="">@GetString("Ecom:Product:Field.Link5Label")</a> 1199 </div> 1200 } 1201 1202 1203 </div> 1204 </div> 1205 </div> 1206 </div> 1207 </div> 1208 </div> 1209 1210 @* Related products *@ 1211 1212 @if (GetString("Ecom:Product.RelatedCount") != "0") 1213 { 1214 <div class="row"> 1215 <div class="col-xs-12"> 1216 <h3 class="section-header shop-list__header">Relaterede varer</h3> 1217 <ul class="shop-list__list"> 1218 @foreach (LoopItem relatedgroup in GetLoop("ProductRelatedGroups")) 1219 { 1220 var relatedproductloop = relatedgroup.GetLoop("RelatedProducts").OrderByDescending(g => g.GetString("Ecom:Product.LoopCounter")).Take(4).ToList(); 1221 @GetProductListFullRelated(relatedproductloop, 3, 3, 1) 1222 } 1223 </ul> 1224 </div> 1225 </div> 1226 } 1227 1228 @if (!String.IsNullOrEmpty(GetString("Ecom:Product.LongDescription")) && StripHTML(GetString("Ecom:Product.LongDescription").ToString()).Length > 150) 1229 { 1230 <div class="row"> 1231 <div class="col-xs-12"> 1232 <h3 id="productLongDescriptionID" class="product__description-title">@Translate("Description", "Description")</h3> 1233 </div> 1234 <div class="col-xs-12 py-4"> 1235 <div style="display: block; margin-bottom: 15px;"> 1236 <div class="product__details"> 1237 @{ 1238 var description = GetString("Ecom:Product.LongDescription"); 1239 1240 // Remove HTML tags 1241 string cleanedText = Regex.Replace(description, "<.*?>", " "); 1242 string[] words = cleanedText.Split(new[] { ' ', '\n', '\r', '\t' }, StringSplitOptions.RemoveEmptyEntries); 1243 bool readMoreButton = words.Length > 80; 1244 } 1245 @if (readMoreButton) 1246 { 1247 <div class="product__details__content" style="max-height: 75px;"> 1248 @description 1249 </div> 1250 <a onclick="updateDetailAccessibility(this)">@Translate("Læs mere")</a> 1251 } 1252 else 1253 { 1254 @description 1255 } 1256 </div> 1257 </div> 1258 </div> 1259 </div> 1260 } 1261 1262 <span class="clerk" 1263 data-template="@@product-page-others-also-bought" 1264 data-products='["@GetString("Ecom:Product.ID")"]'> 1265 </span> 1266 1267 1268 <div class="row"> 1269 <div class="col-md-12 col-sm-12 col-xs-12"> </div> 1270 </div> 1271 1272 @{ 1273 var priceInitial = prices.Where(x => x.GetString("Ecom:Product.Prices.UnitID").Equals(unitDefault.Id)).OrderBy(x => x.GetDouble("Ecom:Product.Prices.Quantity")).FirstOrDefault(); 1274 1275 CultureInfo us = new CultureInfo("en-US"); 1276 string datalayerPriceInitial = string.Empty; 1277 if (priceInitial != null && Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName"))) 1278 { 1279 datalayerPriceInitial = priceInitial.GetDouble("Ecom:Product.Prices.Amount").ToString("n", us).Replace(",", ""); 1280 } 1281 1282 var pricesJs = new List<Dynamicweb.Ecommerce.LiveIntegration.Products.ProductPrice>(); 1283 foreach (var priceJs in prices) 1284 { 1285 var productPrice = new Dynamicweb.Ecommerce.LiveIntegration.Products.ProductPrice(); 1286 productPrice.BaseUnitPrice = priceJs.GetDouble("Ecom:Product.Prices.BaseUnitPrice"); 1287 productPrice.PriceQuantityPerUnit = priceJs.GetDouble("Ecom:Product.Prices.PriceQuantityPerUnit"); 1288 productPrice.Quantity = priceJs.GetDouble("Ecom:Product.Prices.Quantity"); 1289 productPrice.UnitId = priceJs.GetString("Ecom:Product.Prices.UnitID"); 1290 pricesJs.Add(productPrice); 1291 } 1292 } 1293 1294 @if (!String.IsNullOrWhiteSpace(GetString("Item.Page.ScriptsBottom"))) 1295 { 1296 @SnippetStart("JavaScriptBottom") 1297 @GetString("Item.Page.ScriptsBottom") 1298 @SnippetEnd("JavaScriptBottom") 1299 } 1300 1301 <script> 1302 var pricesJs = JSON.parse('@Newtonsoft.Json.JsonConvert.SerializeObject(pricesJs)'); 1303 1304 // Create our number formatter. 1305 var formatterUs = new Intl.NumberFormat('en-US', { 1306 minimumFractionDigits: 2, 1307 }); 1308 1309 1310 1311 1312 $('.product__addtocart-button').on('click', function () { 1313 1314 var quantityAdded = parseInt($(this).parent().prev().find('input.quantity').val()); 1315 var unitAdded = $(this).parent().prev().find('select.unit').val(); 1316 var priceFound = null; 1317 for (const key in pricesJs) { 1318 if (pricesJs[key].UnitId == unitAdded && quantityAdded >= parseInt(pricesJs[key].Quantity)){ 1319 priceFound = pricesJs[key]; 1320 } 1321 } 1322 1323 var priceAdded = 0; 1324 if (priceFound != null) { 1325 priceAdded = (priceFound.BaseUnitPrice * priceFound.PriceQuantityPerUnit) * quantityAdded; } 1326 1327 var quantity = document.getElementsByClassName("product__quantity-input")[0].value; 1328 var unitTypes = document.getElementsByClassName("unit-type"); 1329 var isVariantNull = true; 1330 1331 var index = 0; 1332 var unitPrice; 1333 var currentUnitName; 1334 for (const button of unitTypes){ 1335 1336 if (button.checked != false) 1337 { 1338 isVariantNull = false; 1339 var tempPrice = button.dataset.price.replace(".",""); 1340 tempPrice = tempPrice.replace(",","."); 1341 unitPrice = parseFloat(tempPrice); 1342 currentUnitName = button.value.split("_")[1]; 1343 index++; 1344 } 1345 } 1346 1347 if (!isVariantNull) 1348 { 1349 dataLayer.push({ecommerce:null}); 1350 dataLayer.push({ 1351 'event': 'add_to_cart', 1352 "ecommerce":{ 1353 "currency" : "@GetString("Ecom:Product.CurrencyCode")", 1354 "value" : unitPrice * (parseInt(quantity)).toFixed(2), 1355 "items":[ 1356 { 1357 "item_name": "@GetString("Ecom:Product.Name")" + " - " + currentUnitName, 1358 'item_id': '@GetString("Ecom:Product.ID")', 1359 'price': unitPrice, 1360 "item_brand" : "", 1361 "item_category": (categories[0] != null ? categories[0] : ""), 1362 "item_category2": (categories[1] != null ? categories[1] : ""), 1363 "item_category3": (categories[2] != null ? categories[2] : ""), 1364 "item_category4": (categories[3] != null ? categories[3] : ""), 1365 "item_category5": (categories[4] != null ? categories[4] : ""), 1366 "quantity": parseInt(quantity), 1367 } 1368 ] 1369 }, 1370 1371 }); 1372 } 1373 1374 }); 1375 1376 //Sets the unittype if only one unittype for the product exists 1377 var types = document.getElementsByClassName("unit-type"); 1378 var currentUnitName; 1379 var currentUnitPrice = 0; 1380 1381 if (types.length === 1){ 1382 currentUnitName = " - " + (types[0].value.split("_")[1]); 1383 var tempPrice = types[0].dataset.price; 1384 1385 tempPrice = tempPrice.replace(".",""); 1386 tempPrice = tempPrice.replace(",","."); 1387 currentUnitPrice = parseFloat(tempPrice); 1388 1389 } 1390 else{ 1391 currentUnitName = ""; 1392 } 1393 1394 1395 1396 var initialCategories = document.getElementsByClassName("page-header__title")[0].dataset.categories; 1397 var categories = initialCategories.split("_"); 1398 1399 1400 // View_item initial 1401 dataLayer.push({ecommerce:null}); 1402 dataLayer.push({ 1403 'event': 'view_item', 1404 "ecommerce":{ 1405 "currency" : "@GetString("Ecom:Product.CurrencyCode")", 1406 "value" : currentUnitPrice, 1407 "items":[ 1408 { 1409 "item_name": "@GetString("Ecom:Product.Name")" + currentUnitName, 1410 'item_id': '@GetString("Ecom:Product.ID")', 1411 'price': currentUnitPrice, 1412 "item_brand" : "", 1413 "item_category": (categories[0] != null ? categories[0] : ""), 1414 "item_category2": (categories[1] != null ? categories[1] : ""), 1415 "item_category3": (categories[2] != null ? categories[2] : ""), 1416 "item_category4": (categories[3] != null ? categories[3] : ""), 1417 "item_category5": (categories[4] != null ? categories[4] : ""), 1418 "quantity": 1, 1419 1420 } 1421 ] 1422 }, 1423 1424 }); 1425 1426 var unitTypes = document.getElementsByClassName("unit-type"); 1427 1428 var price; 1429 var oldPrice; 1430 1431 for (const btn of unitTypes) 1432 { 1433 btn.addEventListener("click", function () { 1434 1435 1436 tempPrice = this.dataset.price.replace(".",""); 1437 tempPrice = tempPrice.replace(",","."); 1438 price = parseFloat(tempPrice); 1439 1440 currentUnitName = btn.value.split("_")[1]; 1441 1442 //checks to see if the new variant is the same as the old one 1443 if (price != oldPrice){ 1444 1445 dataLayer.push({ecommerce:null}); 1446 dataLayer.push({ 1447 'event': 'view_item', 1448 "ecommerce":{ 1449 "currency" : "@GetString("Ecom:Product.CurrencyCode")", 1450 "value" : currentUnitPrice, 1451 "items":[ 1452 { 1453 "item_name": "@GetString("Ecom:Product.Name")" + currentUnitName, 1454 'item_id': '@GetString("Ecom:Product.ID")', 1455 'price': currentUnitPrice, 1456 "item_brand" : "", 1457 "item_category": (categories[0] != null ? categories[0] : ""), 1458 "item_category2": (categories[1] != null ? categories[1] : ""), 1459 "item_category3": (categories[2] != null ? categories[2] : ""), 1460 "item_category4": (categories[3] != null ? categories[3] : ""), 1461 "item_category5": (categories[4] != null ? categories[4] : ""), 1462 "quantity": 1, 1463 1464 } 1465 ] 1466 }, 1467 1468 }); 1469 1470 } 1471 oldPrice = price; 1472 }) 1473 } 1474 1475 </script> 1476 1477 @SnippetStart("JavaScriptBottom") 1478 <script type="text/javascript" src="~/Files/Templates/Designs/Dwsimple/js/video-api.js"></script> 1479 1480 @if (currentUser != null) 1481 { 1482 <script type="text/javascript" src="~/Files/Templates/Designs/Dwsimple/js/clerk.js"></script> 1483 } 1484 1485 <script> 1486 function on() { 1487 document.getElementById("overlay").style.display = "block"; 1488 callPlayer('product-video', 'playVideo'); 1489 } 1490 function off() { 1491 document.getElementById("overlay").style.display = "none"; 1492 callPlayer('product-video', 'pauseVideo'); 1493 } 1494 function updateDetailAccessibility(button) 1495 { 1496 1497 var content = document.getElementsByClassName("product__details__content")[0]; 1498 1499 var defaultHeight = "75px"; 1500 1501 if (content.style.maxHeight == defaultHeight) 1502 { 1503 content.style.maxHeight = content.scrollHeight + "px"; 1504 button.innerText = '@Translate("ReadLess")' 1505 } 1506 else { 1507 content.style.maxHeight = defaultHeight; 1508 button.innerText = '@Translate("ReadMore")' 1509 } 1510 1511 1512 } 1513 </script> 1514 1515 @SnippetEnd("JavaScriptBottom") 1516 1517 @functions { 1518 1519 public static string StripHTML(string input) 1520 { 1521 string regex = @"<.*?>"; 1522 return Regex.Replace(input, regex, String.Empty); 1523 } 1524 1525 } 1526 1527 1528 <style> 1529 1530 .product__details { 1531 position: relative; 1532 p { 1533 margin: 0; 1534 width: fit-content; 1535 } 1536 a:hover{ 1537 cursor: pointer; 1538 } 1539 1540 .product__details__content { 1541 1542 1543 overflow: hidden; 1544 transition: max-height 0.3s ease; 1545 } 1546 1547 } 1548 1549 1550 </style>