SKOHYLDER

Error compiling template "Designs/Rapido/eCom/Product/SpProduct.cshtml"
Line 82: A field initializer cannot reference the non-static field, method, or property 'RazorTemplateBase>.GetGlobalValue(string)'

1 //------------------------------------------------------------------------------ 2 // <auto-generated> 3 // This code was generated by a tool. 4 // Runtime Version:4.0.30319.42000 5 // 6 // Changes to this file may cause incorrect behavior and will be lost if 7 // the code is regenerated. 8 // </auto-generated> 9 //------------------------------------------------------------------------------ 10 11 namespace CompiledRazorTemplates.Dynamic { 12 13 #line 4 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 14 using System; 15 16 #line default 17 #line hidden 18 using System.Collections.Generic; 19 20 #line 6 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 21 using System.Linq; 22 23 #line default 24 #line hidden 25 26 #line 2 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 27 using Dynamicweb.Extensibility; 28 29 #line default 30 #line hidden 31 32 #line 3 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 33 using Dynamicweb.Content; 34 35 #line default 36 #line hidden 37 38 #line 5 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 39 using System.Globalization; 40 41 #line default 42 #line hidden 43 44 #line 7 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 45 using System.IO; 46 47 #line default 48 #line hidden 49 50 #line 8 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 51 using Dynamicweb.Core; 52 53 #line default 54 #line hidden 55 56 #line 9 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 57 using System.Web; 58 59 #line default 60 #line hidden 61 62 #line 10 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 63 using System.Web.UI.HtmlControls; 64 65 #line default 66 #line hidden 67 68 69 public class RazorEngine_ab8c34352259469399836ac9a29c992b : Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> { 70 71 #line hidden 72 73 #line 12 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 74 75 List<LoopItem> downloadDocuments = new List<LoopItem>(); 76 string pageId; 77 string productId; 78 string productVariantId; 79 string feedFullUrl; 80 string variantsFeedUrl; 81 string requestQuery; 82 int areaID = Convert.ToInt32(GetGlobalValue("Global:Area.ID")); 83 84 static string ConvertBytes(long bytes) 85 { 86 double size = bytes / 1024; //KB 87 if (size > 1024) 88 { 89 size = (bytes / 1024f) / 1024f; //MB 90 return string.Format("{0:n1} MB", size); 91 } 92 else 93 { 94 return string.Format("{0:n0} KB", size); 95 } 96 } 97 98 string imagePrefix = "/Admin/Public/GetImage.ashx?width=800&amp;height=550&amp;crop=5&FillCanvas=True&DoNotUpscale=true&amp;Compression=75&amp;image="; 99 string thumbPrefix = "/Admin/Public/GetImage.ashx?width=150&amp;height=150&amp;crop=5&FillCanvas=True&DoNotUpscale=true&amp;Compression=75&amp;image="; 100 string image = ""; 101 string thumb = ""; 102 103 104 public class ProductSection 105 { 106 public string name { get; set; } 107 public string id { get; set; } 108 public RazorEngine.Templating.TemplateWriter helper { get; set; } 109 public string layoutType { get; set; } 110 } 111 112 RazorEngine.Templating.TemplateWriter RenderSection(RazorEngine.Templating.TemplateWriter section) 113 { 114 return section; 115 } 116 117 List<ProductSection> productSectionsList = new List<ProductSection>(); 118 119 Dynamicweb.Content.Items.Item productDetails; 120 Dynamicweb.Content.Items.Item icons; 121 string cartIcon; 122 bool onlyPreview = false; 123 bool renderVariantsAsProducts = false; 124 125 #line default 126 #line hidden 127 128 129 #line 334 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 130 public RazorEngine.Templating.TemplateWriter ImageSection() 131 { 132 #line default 133 #line hidden 134 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 135 136 #line 335 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 137 138 string imageSectionPosition = productDetails["ProductDetailsImageSectionPosition"] != null ? productDetails["ProductDetailsImageSectionPosition"].ToString() : "right-right"; 139 string imageSectionWidth = productDetails["ProductDetailsTopLayout"] != null ? productDetails["ProductDetailsTopLayout"].ToString() : "6"; 140 imageSectionWidth = imageSectionPosition == "left-left" || imageSectionPosition == "left-right" ? Converter.ToString(12 - Converter.ToInt32(productDetails["ProductDetailsTopLayout"])) : imageSectionWidth; 141 142 if (!String.IsNullOrEmpty(GetString("Ecom:Product.ImageLarge.Default.Clean"))) 143 { 144 145 146 #line default 147 #line hidden 148 WriteLiteralTo(__razor_helper_writer, "<div"); 149 150 WriteAttributeTo(__razor_helper_writer, "class", Tuple.Create(" class=\"", 13775), Tuple.Create("\"", 13883) 151 , Tuple.Create(Tuple.Create("", 13783), Tuple.Create("grid__col-md-", 13783), true) 152 153 #line 342 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 154 , Tuple.Create(Tuple.Create("", 13796), Tuple.Create<System.Object, System.Int32>(imageSectionWidth 155 156 #line default 157 #line hidden 158 , 13796), false) 159 , Tuple.Create(Tuple.Create(" ", 13814), Tuple.Create("grid__col-sm-", 13815), true) 160 161 #line 342 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 162 , Tuple.Create(Tuple.Create("", 13828), Tuple.Create<System.Object, System.Int32>(imageSectionWidth 163 164 #line default 165 #line hidden 166 , 13828), false) 167 , Tuple.Create(Tuple.Create(" ", 13846), Tuple.Create("grid__col-xs-12", 13847), true) 168 , Tuple.Create(Tuple.Create(" ", 13862), Tuple.Create("u-padding-bottom--lg", 13863), true) 169 ); 170 171 WriteLiteralTo(__razor_helper_writer, ">\r\n\t<div"); 172 173 WriteLiteralTo(__razor_helper_writer, " class=\"grid grid--bleed\""); 174 175 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 176 177 178 #line 344 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 179 180 181 #line default 182 #line hidden 183 184 #line 344 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 185 if (imageSectionPosition == "left-left" || imageSectionPosition == "right-left") 186 { 187 188 189 #line default 190 #line hidden 191 192 #line 346 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 193 WriteTo(__razor_helper_writer, Thumbnails()); 194 195 196 #line default 197 #line hidden 198 199 #line 346 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 200 201 202 203 #line default 204 #line hidden 205 206 #line 347 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 207 WriteTo(__razor_helper_writer, ProductDownloads()); 208 209 210 #line default 211 #line hidden 212 213 #line 347 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 214 215 216 217 #line default 218 #line hidden 219 220 #line 348 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 221 WriteTo(__razor_helper_writer, MainImage()); 222 223 224 #line default 225 #line hidden 226 227 #line 348 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 228 229 } 230 else 231 { 232 233 234 #line default 235 #line hidden 236 237 #line 352 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 238 WriteTo(__razor_helper_writer, MainImage()); 239 240 241 #line default 242 #line hidden 243 244 #line 352 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 245 246 247 248 #line default 249 #line hidden 250 251 #line 353 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 252 WriteTo(__razor_helper_writer, Thumbnails()); 253 254 255 #line default 256 #line hidden 257 258 #line 353 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 259 260 261 262 #line default 263 #line hidden 264 265 #line 354 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 266 WriteTo(__razor_helper_writer, ProductDownloads()); 267 268 269 #line default 270 #line hidden 271 272 #line 354 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 273 274 } 275 276 277 #line default 278 #line hidden 279 WriteLiteralTo(__razor_helper_writer, "\t</div>\r\n</div>\r\n"); 280 281 282 #line 358 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 283 } 284 285 286 #line default 287 #line hidden 288 }); 289 290 #line 359 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 291 } 292 #line default 293 #line hidden 294 295 296 #line 361 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 297 public RazorEngine.Templating.TemplateWriter Thumbnails() 298 { 299 #line default 300 #line hidden 301 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 302 303 #line 362 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 304 305 306 307 #line default 308 #line hidden 309 WriteLiteralTo(__razor_helper_writer, "<div"); 310 311 WriteLiteralTo(__razor_helper_writer, " class=\"grid__col-12 u-hidden-xxs dw-modn u-margin-right--lg u-margin-left--lg\""); 312 313 WriteLiteralTo(__razor_helper_writer, " style=\"margin-top: 2em;\""); 314 315 WriteLiteralTo(__razor_helper_writer, ">\r\n\t<div"); 316 317 WriteLiteralTo(__razor_helper_writer, " class=\"product__thumbs dw-mod\""); 318 319 WriteLiteralTo(__razor_helper_writer, ">\r\n\t\t<i"); 320 321 WriteLiteralTo(__razor_helper_writer, " class=\"fas fa-circle-notch fa-spin preloader js-remove-after-load\""); 322 323 WriteLiteralTo(__razor_helper_writer, "></i> <!--preloader-->\r\n\t\t<div"); 324 325 WriteLiteralTo(__razor_helper_writer, " class=\"carousel js-carousel-container carousel--hidden dw-mod\""); 326 327 WriteLiteralTo(__razor_helper_writer, " id=\"leftCarousel\""); 328 329 WriteLiteralTo(__razor_helper_writer, ">\r\n\t\t\t<div"); 330 331 WriteLiteralTo(__razor_helper_writer, " class=\"thumb-list carousel__container dw-mod\""); 332 333 WriteLiteralTo(__razor_helper_writer, ">\r\n\t\t\t\t"); 334 335 WriteLiteralTo(__razor_helper_writer, "\r\n"); 336 337 338 #line 369 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 339 340 341 #line default 342 #line hidden 343 344 #line 369 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 345 346 image = imagePrefix + GetString("Ecom:Product.ImageLarge.Default.Clean"); 347 thumb = thumbPrefix + GetString("Ecom:Product.ImageLarge.Default.Clean"); 348 349 350 #line default 351 #line hidden 352 WriteLiteralTo(__razor_helper_writer, "\r\n\r\n"); 353 354 355 #line 374 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 356 357 358 #line default 359 #line hidden 360 361 #line 374 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 362 if (GetLoop("Ecom:Product.AlternativeImages").Count == 0) 363 { 364 365 366 #line default 367 #line hidden 368 WriteLiteralTo(__razor_helper_writer, "\t\t\t\t<div"); 369 370 WriteLiteralTo(__razor_helper_writer, " class=\"carousel__slide carousel__slide--vertical dw-mod\""); 371 372 WriteLiteralTo(__razor_helper_writer, ">\r\n\t\t\t\t\t<div"); 373 374 WriteLiteralTo(__razor_helper_writer, " class=\"thumb-list__item thumb-list__item--active dw-mod js-thumb js-gallery\""); 375 376 WriteLiteralTo(__razor_helper_writer, " data-for=\"Image_"); 377 378 379 #line 377 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 380 WriteTo(__razor_helper_writer, productId); 381 382 383 #line default 384 #line hidden 385 WriteLiteralTo(__razor_helper_writer, "\""); 386 387 WriteLiteralTo(__razor_helper_writer, " data-image=\""); 388 389 390 #line 377 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 391 WriteTo(__razor_helper_writer, image); 392 393 394 #line default 395 #line hidden 396 WriteLiteralTo(__razor_helper_writer, "\""); 397 398 WriteLiteralTo(__razor_helper_writer, " onmouseover=\"Gallery.openImage(this)\""); 399 400 WriteLiteralTo(__razor_helper_writer, ">\r\n\t\t\t\t\t\t<label"); 401 402 WriteLiteralTo(__razor_helper_writer, " for=\"GalleryModalTrigger\""); 403 404 WriteLiteralTo(__razor_helper_writer, ">\r\n\t\t\t\t\t\t\t<img"); 405 406 WriteAttributeTo(__razor_helper_writer, "src", Tuple.Create(" src=\"", 15153), Tuple.Create("\"", 15165) 407 408 #line 379 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 409 , Tuple.Create(Tuple.Create("", 15159), Tuple.Create<System.Object, System.Int32>(thumb 410 411 #line default 412 #line hidden 413 , 15159), false) 414 ); 415 416 WriteAttributeTo(__razor_helper_writer, "alt", Tuple.Create(" alt=\"", 15166), Tuple.Create("\"", 15203) 417 418 #line 379 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 419 , Tuple.Create(Tuple.Create("", 15172), Tuple.Create<System.Object, System.Int32>(GetString("Ecom:Product.Name") 420 421 #line default 422 #line hidden 423 , 15172), false) 424 ); 425 426 WriteLiteralTo(__razor_helper_writer, " class=\"js-gallery\""); 427 428 WriteLiteralTo(__razor_helper_writer, " data-for=\"FullImage\""); 429 430 WriteLiteralTo(__razor_helper_writer, " data-image=\""); 431 432 433 #line 379 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 434 WriteTo(__razor_helper_writer, image); 435 436 437 #line default 438 #line hidden 439 WriteLiteralTo(__razor_helper_writer, "\""); 440 441 WriteLiteralTo(__razor_helper_writer, " onclick=\"Gallery.openImage(this)\""); 442 443 WriteLiteralTo(__razor_helper_writer, ">\r\n\t\t\t\t\t\t</label>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n"); 444 445 446 #line 383 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 447 } 448 449 450 #line default 451 #line hidden 452 WriteLiteralTo(__razor_helper_writer, "\r\n"); 453 454 455 #line 385 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 456 457 458 #line default 459 #line hidden 460 461 #line 385 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 462 foreach (LoopItem alternativeImage in GetLoop("Ecom:Product.AlternativeImages")) 463 { 464 if (!String.IsNullOrEmpty(alternativeImage.GetString("Ecom:Product.AlternativeImages.Image"))) 465 { 466 image = imagePrefix + alternativeImage.GetString("Ecom:Product.AlternativeImages.Image"); 467 thumb = thumbPrefix + alternativeImage.GetString("Ecom:Product.AlternativeImages.Image"); 468 469 470 471 #line default 472 #line hidden 473 WriteLiteralTo(__razor_helper_writer, "\t\t\t\t<div"); 474 475 WriteLiteralTo(__razor_helper_writer, " class=\"carousel__slide carousel__slide--horizontal dw-mod\""); 476 477 WriteLiteralTo(__razor_helper_writer, ">\r\n\t\t\t\t\t<div"); 478 479 WriteLiteralTo(__razor_helper_writer, " class=\"thumb-list__item dw-mod js-thumb js-gallery\""); 480 481 WriteLiteralTo(__razor_helper_writer, " data-for=\"Image_"); 482 483 484 #line 393 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 485 WriteTo(__razor_helper_writer, productId); 486 487 488 #line default 489 #line hidden 490 WriteLiteralTo(__razor_helper_writer, "\""); 491 492 WriteLiteralTo(__razor_helper_writer, " data-image=\""); 493 494 495 #line 393 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 496 WriteTo(__razor_helper_writer, image); 497 498 499 #line default 500 #line hidden 501 WriteLiteralTo(__razor_helper_writer, "\""); 502 503 WriteLiteralTo(__razor_helper_writer, " onmouseover=\"Gallery.openImage(this)\""); 504 505 WriteLiteralTo(__razor_helper_writer, ">\r\n\t\t\t\t\t\t<label"); 506 507 WriteLiteralTo(__razor_helper_writer, " for=\"GalleryModalTrigger\""); 508 509 WriteLiteralTo(__razor_helper_writer, ">\r\n\t\t\t\t\t\t\t<img"); 510 511 WriteAttributeTo(__razor_helper_writer, "src", Tuple.Create(" src=\"", 16016), Tuple.Create("\"", 16028) 512 513 #line 395 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 514 , Tuple.Create(Tuple.Create("", 16022), Tuple.Create<System.Object, System.Int32>(thumb 515 516 #line default 517 #line hidden 518 , 16022), false) 519 ); 520 521 WriteAttributeTo(__razor_helper_writer, "alt", Tuple.Create(" alt=\"", 16029), Tuple.Create("\"", 16066) 522 523 #line 395 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 524 , Tuple.Create(Tuple.Create("", 16035), Tuple.Create<System.Object, System.Int32>(GetString("Ecom:Product.Name") 525 526 #line default 527 #line hidden 528 , 16035), false) 529 ); 530 531 WriteLiteralTo(__razor_helper_writer, " class=\"js-gallery\""); 532 533 WriteLiteralTo(__razor_helper_writer, " data-for=\"FullImage\""); 534 535 WriteLiteralTo(__razor_helper_writer, " data-image=\""); 536 537 538 #line 395 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 539 WriteTo(__razor_helper_writer, image); 540 541 542 #line default 543 #line hidden 544 WriteLiteralTo(__razor_helper_writer, "\""); 545 546 WriteLiteralTo(__razor_helper_writer, " onclick=\"Gallery.openImage(this)\""); 547 548 WriteLiteralTo(__razor_helper_writer, ">\r\n\t\t\t\t\t\t</label>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n"); 549 550 551 #line 399 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 552 } 553 } 554 555 556 #line default 557 #line hidden 558 WriteLiteralTo(__razor_helper_writer, "\r\n"); 559 560 561 #line 402 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 562 563 564 #line default 565 #line hidden 566 567 #line 402 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 568 foreach (LoopItem detail in GetLoop("Details")) 569 { 570 if (!String.IsNullOrEmpty(detail.GetString("Ecom:Product:Detail.Image.Clean"))) 571 { 572 string ext = Path.GetExtension(detail.GetString("Ecom:Product:Detail.Image.Clean")).ToLower(); 573 if (ext == ".jpg" || ext == ".jpeg" || ext == ".gif" || ext == ".png") 574 { 575 image = imagePrefix + detail.GetString("Ecom:Product:Detail.Image.Clean"); 576 thumb = thumbPrefix + detail.GetString("Ecom:Product:Detail.Image.Clean"); 577 578 579 580 #line default 581 #line hidden 582 WriteLiteralTo(__razor_helper_writer, "\t\t\t\t<div"); 583 584 WriteLiteralTo(__razor_helper_writer, " class=\"carousel__slide carousel__slide--horizontal dw-mod\""); 585 586 WriteLiteralTo(__razor_helper_writer, ">\r\n\t\t\t\t\t<div"); 587 588 WriteLiteralTo(__razor_helper_writer, " class=\"thumb-list__item dw-mod js-thumb js-gallery\""); 589 590 WriteLiteralTo(__razor_helper_writer, " data-for=\"Image_"); 591 592 593 #line 413 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 594 WriteTo(__razor_helper_writer, productId); 595 596 597 #line default 598 #line hidden 599 WriteLiteralTo(__razor_helper_writer, "\""); 600 601 WriteLiteralTo(__razor_helper_writer, " data-image=\""); 602 603 604 #line 413 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 605 WriteTo(__razor_helper_writer, image); 606 607 608 #line default 609 #line hidden 610 WriteLiteralTo(__razor_helper_writer, "\""); 611 612 WriteLiteralTo(__razor_helper_writer, " onmouseover=\"Gallery.openImage(this)\""); 613 614 WriteLiteralTo(__razor_helper_writer, ">\r\n\t\t\t\t\t\t<label"); 615 616 WriteLiteralTo(__razor_helper_writer, " for=\"GalleryModalTrigger\""); 617 618 WriteLiteralTo(__razor_helper_writer, ">\r\n\t\t\t\t\t\t\t<img"); 619 620 WriteAttributeTo(__razor_helper_writer, "src", Tuple.Create(" src=\"", 16991), Tuple.Create("\"", 17003) 621 622 #line 415 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 623 , Tuple.Create(Tuple.Create("", 16997), Tuple.Create<System.Object, System.Int32>(thumb 624 625 #line default 626 #line hidden 627 , 16997), false) 628 ); 629 630 WriteAttributeTo(__razor_helper_writer, "alt", Tuple.Create(" alt=\"", 17004), Tuple.Create("\"", 17041) 631 632 #line 415 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 633 , Tuple.Create(Tuple.Create("", 17010), Tuple.Create<System.Object, System.Int32>(GetString("Ecom:Product.Name") 634 635 #line default 636 #line hidden 637 , 17010), false) 638 ); 639 640 WriteLiteralTo(__razor_helper_writer, " class=\"js-gallery\""); 641 642 WriteLiteralTo(__razor_helper_writer, " data-for=\"FullImage\""); 643 644 WriteLiteralTo(__razor_helper_writer, " data-image=\""); 645 646 647 #line 415 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 648 WriteTo(__razor_helper_writer, image); 649 650 651 #line default 652 #line hidden 653 WriteLiteralTo(__razor_helper_writer, "\""); 654 655 WriteLiteralTo(__razor_helper_writer, " onclick=\"Gallery.openImage(this)\""); 656 657 WriteLiteralTo(__razor_helper_writer, ">\r\n\t\t\t\t\t\t</label>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n"); 658 659 660 #line 419 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 661 } 662 } 663 } 664 665 666 #line default 667 #line hidden 668 WriteLiteralTo(__razor_helper_writer, "\t\t\t</div>\r\n\t\t\t<div"); 669 670 WriteLiteralTo(__razor_helper_writer, " class=\"js-carousel-data\""); 671 672 WriteLiteralTo(__razor_helper_writer, " data-carousel-slide-time=\"0\""); 673 674 WriteLiteralTo(__razor_helper_writer, " data-direction=\"horizontal\""); 675 676 WriteLiteralTo(__razor_helper_writer, " data-sliding-type=\"items\""); 677 678 WriteLiteralTo(__razor_helper_writer, " data-slides-in-view=\"5\""); 679 680 WriteLiteralTo(__razor_helper_writer, ">\r\n\t\t\t\t<div"); 681 682 WriteLiteralTo(__razor_helper_writer, " class=\"carousel-prev-btn carousel-prev-btn--horizontal dw-mod\""); 683 684 WriteLiteralTo(__razor_helper_writer, " onclick=\"Carousel.GetPreviousSlide(\'leftCarousel\')\""); 685 686 WriteLiteralTo(__razor_helper_writer, "></div>\r\n\t\t\t\t<div"); 687 688 WriteLiteralTo(__razor_helper_writer, " class=\"carousel-next-btn carousel-next-btn--horizontal dw-mod\""); 689 690 WriteLiteralTo(__razor_helper_writer, " onclick=\"Carousel.GetNextSlide(\'leftCarousel\')\""); 691 692 WriteLiteralTo(__razor_helper_writer, "></div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n</div>\r\n"); 693 694 695 #line 430 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 696 697 698 #line default 699 #line hidden 700 }); 701 702 #line 430 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 703 } 704 #line default 705 #line hidden 706 707 708 #line 432 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 709 public RazorEngine.Templating.TemplateWriter MainImage() 710 { 711 #line default 712 #line hidden 713 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 714 715 #line 433 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 716 717 718 719 #line default 720 #line hidden 721 WriteLiteralTo(__razor_helper_writer, "<div"); 722 723 WriteLiteralTo(__razor_helper_writer, " class=\"grid__col-12 u-margin-right--lg\""); 724 725 WriteLiteralTo(__razor_helper_writer, ">\r\n\t<div"); 726 727 WriteLiteralTo(__razor_helper_writer, " class=\"stickers-container dw-mod\""); 728 729 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 730 731 732 #line 436 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 733 734 735 #line default 736 #line hidden 737 738 #line 436 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 739 740 if (Converter.ToBoolean(Pageview.Area.Item["EnableSaleTags"])) 741 { 742 string contentType = Pageview.Area.Item["EcommerceSaleTagContentType"].ToString(); 743 string text = ""; 744 var currency = Dynamicweb.Ecommerce.Services.Currencies.GetDefaultCurrency(); 745 746 switch (contentType) 747 { 748 case "Name": 749 foreach (LoopItem discount in GetLoop("ProductDiscounts")) 750 { 751 text = discount.GetString("Ecom:Product.Discount.Name"); 752 753 754 #line default 755 #line hidden 756 WriteLiteralTo(__razor_helper_writer, "\t\t<div"); 757 758 WriteLiteralTo(__razor_helper_writer, " class=\"stickers-container__tag stickers-container__tag--sale dw-mod\""); 759 760 WriteLiteralTo(__razor_helper_writer, ">"); 761 762 763 #line 449 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 764 WriteTo(__razor_helper_writer, text); 765 766 767 #line default 768 #line hidden 769 WriteLiteralTo(__razor_helper_writer, "</div>\r\n"); 770 771 772 #line 450 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 773 } 774 break; 775 case "Amount": 776 if (GetLoop("ProductDiscounts").Count > 0) 777 { 778 text = Dynamicweb.Ecommerce.Services.Currencies.Format(currency, GetDouble("Ecom:Product.Discount.Price.Price") - GetDouble("Ecom:Product.Price.Price")); 779 780 781 #line default 782 #line hidden 783 WriteLiteralTo(__razor_helper_writer, "\t\t<div"); 784 785 WriteLiteralTo(__razor_helper_writer, " class=\"stickers-container__tag stickers-container__tag--sale dw-mod\""); 786 787 WriteLiteralTo(__razor_helper_writer, ">"); 788 789 790 #line 456 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 791 WriteTo(__razor_helper_writer, text); 792 793 794 #line default 795 #line hidden 796 WriteLiteralTo(__razor_helper_writer, "</div>\r\n"); 797 798 799 #line 457 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 800 } 801 break; 802 case "Percents": 803 double percents = 0; 804 foreach (LoopItem discount in GetLoop("ProductDiscounts")) 805 { 806 percents += discount.GetDouble("Ecom:Product.Discount.PercentWithoutVAT"); 807 } 808 if (percents > 0) 809 { 810 text = Math.Round(percents, 0) + "%"; 811 812 813 #line default 814 #line hidden 815 WriteLiteralTo(__razor_helper_writer, "\t\t<div"); 816 817 WriteLiteralTo(__razor_helper_writer, " class=\"stickers-container__tag stickers-container__tag--sale dw-mod\""); 818 819 WriteLiteralTo(__razor_helper_writer, ">"); 820 821 822 #line 468 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 823 WriteTo(__razor_helper_writer, text); 824 825 826 #line default 827 #line hidden 828 WriteLiteralTo(__razor_helper_writer, "</div>\r\n"); 829 830 831 #line 469 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 832 } 833 break; 834 case "Amount and percents": 835 double amount = 0; 836 double percent = 0; 837 foreach (LoopItem discount in GetLoop("ProductDiscounts")) 838 { 839 if (discount.GetString("Ecom:Product.Discount.Type") == "PERCENT") 840 { 841 percent += discount.GetDouble("Ecom:Product.Discount.PercentWithoutVAT"); 842 } 843 else if (discount.GetString("Ecom:Product.Discount.Type") == "AMOUNT") 844 { 845 amount += discount.GetDouble("Ecom:Product.Discount.AmountWithVAT"); 846 } 847 } 848 if (percent > 0) 849 { 850 text = percent + "%"; 851 852 853 #line default 854 #line hidden 855 WriteLiteralTo(__razor_helper_writer, "\t\t<div"); 856 857 WriteLiteralTo(__razor_helper_writer, " class=\"stickers-container__tag stickers-container__tag--sale dw-mod\""); 858 859 WriteLiteralTo(__razor_helper_writer, ">"); 860 861 862 #line 488 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 863 WriteTo(__razor_helper_writer, text); 864 865 866 #line default 867 #line hidden 868 WriteLiteralTo(__razor_helper_writer, "</div>\r\n"); 869 870 871 #line 489 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 872 } 873 if (amount > 0) 874 { 875 text = Dynamicweb.Ecommerce.Services.Currencies.Format(currency, amount); 876 877 878 #line default 879 #line hidden 880 WriteLiteralTo(__razor_helper_writer, "\t\t<div"); 881 882 WriteLiteralTo(__razor_helper_writer, " class=\"stickers-container__tag stickers-container__tag--sale dw-mod\""); 883 884 WriteLiteralTo(__razor_helper_writer, ">"); 885 886 887 #line 493 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 888 WriteTo(__razor_helper_writer, text); 889 890 891 #line default 892 #line hidden 893 WriteLiteralTo(__razor_helper_writer, "</div>\r\n"); 894 895 896 #line 494 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 897 } 898 break; 899 default: 900 if (GetLoop("ProductDiscounts").Count > 0) 901 { 902 text = Translate("Sale!"); 903 904 905 #line default 906 #line hidden 907 WriteLiteralTo(__razor_helper_writer, "\t\t<div"); 908 909 WriteLiteralTo(__razor_helper_writer, " class=\"stickers-container__tag stickers-container__tag--sale dw-mod\""); 910 911 WriteLiteralTo(__razor_helper_writer, ">"); 912 913 914 #line 500 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 915 WriteTo(__razor_helper_writer, text); 916 917 918 #line default 919 #line hidden 920 WriteLiteralTo(__razor_helper_writer, "</div>\r\n"); 921 922 923 #line 501 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 924 } 925 break; 926 } 927 } 928 929 if (Converter.ToBoolean(Pageview.Area.Item["NewStickersEnable"]) && GetDate("Ecom:Product.Created").AddDays(Converter.ToDouble(Pageview.Area.Item["NewStickersExpiration"])) > DateTime.Now) 930 { 931 932 933 #line default 934 #line hidden 935 WriteLiteralTo(__razor_helper_writer, "\t\t<div"); 936 937 WriteLiteralTo(__razor_helper_writer, " class=\"stickers-container__tag stickers-container__tag--new dw-mod\""); 938 939 WriteLiteralTo(__razor_helper_writer, ">"); 940 941 942 #line 508 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 943 WriteTo(__razor_helper_writer, Translate("New!")); 944 945 946 #line default 947 #line hidden 948 WriteLiteralTo(__razor_helper_writer, "</div>\r\n"); 949 950 951 #line 509 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 952 } 953 954 if (!String.IsNullOrEmpty(GetString("Ecom:Product:Field.CustomSticker.Value"))) 955 { 956 957 958 #line default 959 #line hidden 960 WriteLiteralTo(__razor_helper_writer, "\t\t<div"); 961 962 WriteLiteralTo(__razor_helper_writer, " class=\"stickers-container__tag stickers-container__tag--custom dw-mod\""); 963 964 WriteLiteralTo(__razor_helper_writer, ">"); 965 966 967 #line 513 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 968 WriteTo(__razor_helper_writer, GetString("Ecom:Product:Field.CustomSticker.Value")); 969 970 971 #line default 972 #line hidden 973 WriteLiteralTo(__razor_helper_writer, "</div>\r\n"); 974 975 976 #line 514 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 977 } 978 979 980 #line default 981 #line hidden 982 WriteLiteralTo(__razor_helper_writer, "\r\n\t</div>\r\n\r\n"); 983 984 985 #line 518 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 986 987 988 #line default 989 #line hidden 990 991 #line 518 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 992 993 LoopItem ProductImage = null; 994 string imageSource = ""; 995 996 if (GetLoop("Ecom:Product.AlternativeImages") != null && GetLoop("Ecom:Product.AlternativeImages").Count > 0) 997 { 998 ProductImage = GetLoop("Ecom:Product.AlternativeImages")[0]; 999 imageSource = ProductImage.GetString("Ecom:Product.AlternativeImages.Image"); 1000 } 1001 1002 1003 #line default 1004 #line hidden 1005 WriteLiteralTo(__razor_helper_writer, "\r\n"); 1006 1007 1008 #line 528 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1009 1010 1011 #line default 1012 #line hidden 1013 1014 #line 528 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1015 if (!string.IsNullOrEmpty(imageSource)) 1016 { 1017 1018 1019 #line default 1020 #line hidden 1021 WriteLiteralTo(__razor_helper_writer, "\t<label"); 1022 1023 WriteLiteralTo(__razor_helper_writer, " for=\"GalleryModalTrigger\""); 1024 1025 WriteLiteralTo(__razor_helper_writer, " class=\"product__image-container\""); 1026 1027 WriteLiteralTo(__razor_helper_writer, ">\r\n\t\t<img"); 1028 1029 WriteLiteralTo(__razor_helper_writer, " class=\"thumb-image-view product__image-container__image dw-mod b-lazy\""); 1030 1031 WriteLiteralTo(__razor_helper_writer, " src=\"/Files/Images/placeholder.gif\""); 1032 1033 WriteLiteralTo(__razor_helper_writer, " data-src=\""); 1034 1035 1036 #line 531 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1037 WriteTo(__razor_helper_writer, imagePrefix); 1038 1039 1040 #line default 1041 #line hidden 1042 1043 #line 531 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1044 WriteTo(__razor_helper_writer, imageSource); 1045 1046 1047 #line default 1048 #line hidden 1049 WriteLiteralTo(__razor_helper_writer, "\""); 1050 1051 WriteAttributeTo(__razor_helper_writer, "alt", Tuple.Create(" alt=\"", 21177), Tuple.Create("\"", 21214) 1052 1053 #line 531 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1054 , Tuple.Create(Tuple.Create("", 21183), Tuple.Create<System.Object, System.Int32>(GetString("Ecom:Product.Name") 1055 1056 #line default 1057 #line hidden 1058 , 21183), false) 1059 ); 1060 1061 WriteAttributeTo(__razor_helper_writer, "id", Tuple.Create(" id=\"", 21215), Tuple.Create("\"", 21236) 1062 , Tuple.Create(Tuple.Create("", 21220), Tuple.Create("Image_", 21220), true) 1063 1064 #line 531 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1065 , Tuple.Create(Tuple.Create("", 21226), Tuple.Create<System.Object, System.Int32>(productId 1066 1067 #line default 1068 #line hidden 1069 , 21226), false) 1070 ); 1071 1072 WriteLiteralTo(__razor_helper_writer, " data-for=\"FullImage\""); 1073 1074 WriteLiteralTo(__razor_helper_writer, " data-number=\"0\""); 1075 1076 WriteLiteralTo(__razor_helper_writer, " onclick=\"Gallery.openImageByNum(this)\""); 1077 1078 WriteLiteralTo(__razor_helper_writer, " />\r\n\t</label>\r\n"); 1079 1080 1081 #line 533 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1082 } 1083 else 1084 { 1085 1086 1087 #line default 1088 #line hidden 1089 WriteLiteralTo(__razor_helper_writer, "\t<label"); 1090 1091 WriteLiteralTo(__razor_helper_writer, " for=\"GalleryModalTrigger\""); 1092 1093 WriteLiteralTo(__razor_helper_writer, " class=\"product__image-container\""); 1094 1095 WriteLiteralTo(__razor_helper_writer, ">\r\n\t\t<img"); 1096 1097 WriteLiteralTo(__razor_helper_writer, " class=\"thumb-image-view product__image-container__image dw-mod b-lazy\""); 1098 1099 WriteLiteralTo(__razor_helper_writer, " src=\"/Files/Images/placeholder.gif\""); 1100 1101 WriteLiteralTo(__razor_helper_writer, " data-src=\""); 1102 1103 1104 #line 537 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1105 WriteTo(__razor_helper_writer, imagePrefix); 1106 1107 1108 #line default 1109 #line hidden 1110 1111 #line 537 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1112 WriteTo(__razor_helper_writer, GetString("Ecom:Product.ImageLarge.Default.Clean")); 1113 1114 1115 #line default 1116 #line hidden 1117 WriteLiteralTo(__razor_helper_writer, "\""); 1118 1119 WriteAttributeTo(__razor_helper_writer, "alt", Tuple.Create(" alt=\"", 21601), Tuple.Create("\"", 21638) 1120 1121 #line 537 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1122 , Tuple.Create(Tuple.Create("", 21607), Tuple.Create<System.Object, System.Int32>(GetString("Ecom:Product.Name") 1123 1124 #line default 1125 #line hidden 1126 , 21607), false) 1127 ); 1128 1129 WriteAttributeTo(__razor_helper_writer, "id", Tuple.Create(" id=\"", 21639), Tuple.Create("\"", 21660) 1130 , Tuple.Create(Tuple.Create("", 21644), Tuple.Create("Image_", 21644), true) 1131 1132 #line 537 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1133 , Tuple.Create(Tuple.Create("", 21650), Tuple.Create<System.Object, System.Int32>(productId 1134 1135 #line default 1136 #line hidden 1137 , 21650), false) 1138 ); 1139 1140 WriteLiteralTo(__razor_helper_writer, " data-for=\"FullImage\""); 1141 1142 WriteLiteralTo(__razor_helper_writer, " data-number=\"0\""); 1143 1144 WriteLiteralTo(__razor_helper_writer, " onclick=\"Gallery.openImageByNum(this)\""); 1145 1146 WriteLiteralTo(__razor_helper_writer, " />\r\n\t</label>\r\n"); 1147 1148 1149 #line 539 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1150 } 1151 1152 1153 #line default 1154 #line hidden 1155 WriteLiteralTo(__razor_helper_writer, "</div>\r\n"); 1156 1157 1158 #line 541 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1159 1160 1161 #line default 1162 #line hidden 1163 }); 1164 1165 #line 541 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1166 } 1167 #line default 1168 #line hidden 1169 1170 1171 #line 543 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1172 public RazorEngine.Templating.TemplateWriter MainProductInformation() 1173 { 1174 #line default 1175 #line hidden 1176 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 1177 1178 #line 544 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1179 1180 string pageId = GetGlobalValue("Global:Page.ID").ToString(); 1181 string currentPrice = GetString("Ecom:Product.Discount.Price.PriceFormatted") == GetString("Ecom:Product.Price.PriceFormatted") ? GetString("Ecom:Product.Price.PriceFormatted") : GetString("Ecom:Product.Discount.Price.PriceFormatted"); 1182 string favoriteIcon = icons["FavoriteIcon"] != null ? "fas fa-" + icons["FavoriteIcon"].ToString() : "fas fa-star"; 1183 string favoriteOutlineIcon = icons["FavoriteIcon"] != null ? "far fa-" + icons["FavoriteIcon"].ToString() : "far fa-star"; 1184 1185 1186 1187 #line default 1188 #line hidden 1189 WriteLiteralTo(__razor_helper_writer, "<div"); 1190 1191 WriteLiteralTo(__razor_helper_writer, " class=\"grid__col-auto product__info dw-mod u-padding-bottom--lg\""); 1192 1193 WriteLiteralTo(__razor_helper_writer, ">\r\n\t<div"); 1194 1195 WriteLiteralTo(__razor_helper_writer, " class=\"grid__cell u-margin-left--lg u-margin-right--lg\""); 1196 1197 WriteLiteralTo(__razor_helper_writer, ">\r\n\t\t<div"); 1198 1199 WriteLiteralTo(__razor_helper_writer, " class=\"u-pull--left product__title dw-mod\""); 1200 1201 WriteLiteralTo(__razor_helper_writer, ">\r\n\t\t\t<h1"); 1202 1203 WriteLiteralTo(__razor_helper_writer, " class=\"u-no-margin\""); 1204 1205 WriteLiteralTo(__razor_helper_writer, ">"); 1206 1207 1208 #line 553 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1209 WriteTo(__razor_helper_writer, GetString("Ecom:Product.Name")); 1210 1211 1212 #line default 1213 #line hidden 1214 WriteLiteralTo(__razor_helper_writer, " "); 1215 1216 1217 #line 553 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1218 WriteTo(__razor_helper_writer, GetString("Ecom:Product.SelectedVariantComboName")); 1219 1220 1221 #line default 1222 #line hidden 1223 WriteLiteralTo(__razor_helper_writer, "</h1>\r\n\t\t</div>\r\n\t\t<div"); 1224 1225 WriteLiteralTo(__razor_helper_writer, " class=\"u-pull--right\""); 1226 1227 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 1228 1229 1230 #line 556 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1231 1232 1233 #line default 1234 #line hidden 1235 1236 #line 556 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1237 if (Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName")) && !renderVariantsAsProducts) 1238 { 1239 string favoriteId = "Favorite" + GetString("Ecom:Product.ID"); 1240 1241 1242 #line default 1243 #line hidden 1244 WriteLiteralTo(__razor_helper_writer, "\t\t\t<div"); 1245 1246 WriteAttributeTo(__razor_helper_writer, "id", Tuple.Create(" id=\"", 22894), Tuple.Create("\"", 22910) 1247 1248 #line 559 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1249 , Tuple.Create(Tuple.Create("", 22899), Tuple.Create<System.Object, System.Int32>(favoriteId 1250 1251 #line default 1252 #line hidden 1253 , 22899), false) 1254 ); 1255 1256 WriteLiteralTo(__razor_helper_writer, " class=\"favorites favorites--md u-pull--right js-favorite-btn dw-mod\""); 1257 1258 WriteLiteralTo(__razor_helper_writer, ">\r\n\t\t\t\t<div>\r\n"); 1259 1260 1261 #line 561 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1262 1263 1264 #line default 1265 #line hidden 1266 1267 #line 561 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1268 string favorite = GetBoolean("Ecom:Product.IsProductInFavoriteList") ? favoriteIcon : favoriteOutlineIcon; 1269 1270 #line default 1271 #line hidden 1272 WriteLiteralTo(__razor_helper_writer, "\r\n\t\t\t\t\t<label"); 1273 1274 WriteLiteralTo(__razor_helper_writer, " for=\"FavoriteTrigger\""); 1275 1276 WriteLiteralTo(__razor_helper_writer, "><i"); 1277 1278 WriteAttributeTo(__razor_helper_writer, "class", Tuple.Create(" class=\"", 23148), Tuple.Create("\"", 23173) 1279 1280 #line 562 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1281 , Tuple.Create(Tuple.Create("", 23156), Tuple.Create<System.Object, System.Int32>(favorite 1282 1283 #line default 1284 #line hidden 1285 , 23156), false) 1286 , Tuple.Create(Tuple.Create(" ", 23165), Tuple.Create("fa-1_5x", 23166), true) 1287 ); 1288 1289 WriteLiteralTo(__razor_helper_writer, "></i></label>\r\n\t\t\t\t</div>\r\n\t\t\t\t<input"); 1290 1291 WriteLiteralTo(__razor_helper_writer, " type=\"checkbox\""); 1292 1293 WriteLiteralTo(__razor_helper_writer, " id=\"FavoriteTrigger\""); 1294 1295 WriteLiteralTo(__razor_helper_writer, " class=\"dropdown-trigger\""); 1296 1297 WriteLiteralTo(__razor_helper_writer, " />\r\n\r\n\t\t\t\t<div"); 1298 1299 WriteLiteralTo(__razor_helper_writer, " class=\"dropdown\""); 1300 1301 WriteLiteralTo(__razor_helper_writer, ">\r\n\t\t\t\t\t<div"); 1302 1303 WriteLiteralTo(__razor_helper_writer, " class=\"dropdown__content dropdown__content--show-left dropdown__content--padding" + 1304 " u-w220px dw-mod\""); 1305 1306 WriteLiteralTo(__razor_helper_writer, ">\r\n\t\t\t\t\t\t<ul"); 1307 1308 WriteLiteralTo(__razor_helper_writer, " class=\"list list--clean dw-mod\""); 1309 1310 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 1311 1312 1313 #line 569 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1314 1315 1316 #line default 1317 #line hidden 1318 1319 #line 569 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1320 if (GetLoop("CustomerCenter.ListTypes").Count > 0) 1321 { 1322 foreach (LoopItem listType in GetLoop("CustomerCenter.ListTypes")) 1323 { 1324 foreach (LoopItem list in listType.GetLoop("CustomerCenter.ProductLists")) 1325 { 1326 string favLinkType = list.GetString("Ecom:Product.List.IsProductInThisList") == "True" ? list.GetString("Ecom:Product.RemoveFromThisList") : list.GetString("Ecom:Product.AddToThisListAction"); 1327 string isInListIcon = list.GetString("Ecom:Product.List.IsProductInThisList") == "True" ? favoriteIcon : favoriteOutlineIcon; 1328 1329 1330 #line default 1331 #line hidden 1332 WriteLiteralTo(__razor_helper_writer, "\t\t\t\t\t\t\t<li>\r\n\t\t\t\t\t\t\t\t<a"); 1333 1334 WriteAttributeTo(__razor_helper_writer, "href", Tuple.Create(" href=\"", 24068), Tuple.Create("\"", 24087) 1335 1336 #line 578 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1337 , Tuple.Create(Tuple.Create("", 24075), Tuple.Create<System.Object, System.Int32>(favLinkType 1338 1339 #line default 1340 #line hidden 1341 , 24075), false) 1342 ); 1343 1344 WriteLiteralTo(__razor_helper_writer, " class=\"list__link u-no-underline dw-mod\""); 1345 1346 WriteLiteralTo(__razor_helper_writer, "><i"); 1347 1348 WriteAttributeTo(__razor_helper_writer, "class", Tuple.Create(" class=\"", 24132), Tuple.Create("\"", 24153) 1349 1350 #line 578 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1351 , Tuple.Create(Tuple.Create("", 24140), Tuple.Create<System.Object, System.Int32>(isInListIcon 1352 1353 #line default 1354 #line hidden 1355 , 24140), false) 1356 ); 1357 1358 WriteLiteralTo(__razor_helper_writer, "></i> "); 1359 1360 1361 #line 578 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1362 WriteTo(__razor_helper_writer, list.GetValue("Ecom:CustomerCenter.List.Name")); 1363 1364 1365 #line default 1366 #line hidden 1367 WriteLiteralTo(__razor_helper_writer, "</a>\r\n\t\t\t\t\t\t\t</li>\r\n"); 1368 1369 1370 #line 580 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1371 } 1372 } 1373 } 1374 else 1375 { 1376 string favLinkType = GetString("Ecom:Product.AddToFavorites") + "&CCListType=0&CCCreateNewList=" + Translate("My favorites"); 1377 string isInListIcon = favoriteOutlineIcon; 1378 1379 1380 #line default 1381 #line hidden 1382 WriteLiteralTo(__razor_helper_writer, "\t\t\t\t\t\t\t<li>\r\n\t\t\t\t\t\t\t\t<a"); 1383 1384 WriteAttributeTo(__razor_helper_writer, "href", Tuple.Create(" href=\"", 24488), Tuple.Create("\"", 24507) 1385 1386 #line 588 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1387 , Tuple.Create(Tuple.Create("", 24495), Tuple.Create<System.Object, System.Int32>(favLinkType 1388 1389 #line default 1390 #line hidden 1391 , 24495), false) 1392 ); 1393 1394 WriteLiteralTo(__razor_helper_writer, " class=\"list__link u-no-underline dw-mod\""); 1395 1396 WriteLiteralTo(__razor_helper_writer, "><i"); 1397 1398 WriteAttributeTo(__razor_helper_writer, "class", Tuple.Create(" class=\"", 24552), Tuple.Create("\"", 24573) 1399 1400 #line 588 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1401 , Tuple.Create(Tuple.Create("", 24560), Tuple.Create<System.Object, System.Int32>(isInListIcon 1402 1403 #line default 1404 #line hidden 1405 , 24560), false) 1406 ); 1407 1408 WriteLiteralTo(__razor_helper_writer, "></i> "); 1409 1410 1411 #line 588 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1412 WriteTo(__razor_helper_writer, Translate("My favorites")); 1413 1414 1415 #line default 1416 #line hidden 1417 WriteLiteralTo(__razor_helper_writer, "</a>\r\n\t\t\t\t\t\t\t</li>\r\n"); 1418 1419 1420 #line 590 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1421 } 1422 1423 1424 #line default 1425 #line hidden 1426 WriteLiteralTo(__razor_helper_writer, "\t\t\t\t\t\t</ul>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<label"); 1427 1428 WriteLiteralTo(__razor_helper_writer, " class=\"dropdown-trigger-off\""); 1429 1430 WriteLiteralTo(__razor_helper_writer, " for=\"FavoriteTrigger\""); 1431 1432 WriteLiteralTo(__razor_helper_writer, "></label>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n"); 1433 1434 1435 #line 596 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1436 } 1437 1438 1439 #line default 1440 #line hidden 1441 WriteLiteralTo(__razor_helper_writer, "\t\t</div>\r\n\t\t<div"); 1442 1443 WriteLiteralTo(__razor_helper_writer, " class=\"u-clearfix\""); 1444 1445 WriteLiteralTo(__razor_helper_writer, "></div>\r\n"); 1446 1447 WriteLiteralTo(__razor_helper_writer, "\t\t"); 1448 1449 1450 #line 599 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1451 WriteTo(__razor_helper_writer, ShortDescription()); 1452 1453 1454 #line default 1455 #line hidden 1456 WriteLiteralTo(__razor_helper_writer, "\r\n\t</div>\r\n\r\n"); 1457 1458 1459 #line 602 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1460 1461 1462 #line default 1463 #line hidden 1464 1465 #line 602 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1466 foreach (ProductSection item in productSectionsList) 1467 { 1468 if (item.layoutType == "top") 1469 { 1470 1471 1472 1473 #line default 1474 #line hidden 1475 WriteLiteralTo(__razor_helper_writer, "\t<div>\r\n"); 1476 1477 WriteLiteralTo(__razor_helper_writer, "\t\t"); 1478 1479 1480 #line 608 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1481 WriteTo(__razor_helper_writer, RenderSection(item.helper)); 1482 1483 1484 #line default 1485 #line hidden 1486 WriteLiteralTo(__razor_helper_writer, "\r\n\t</div>\r\n"); 1487 1488 1489 #line 610 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1490 1491 } 1492 } 1493 1494 1495 #line default 1496 #line hidden 1497 WriteLiteralTo(__razor_helper_writer, "\r\n"); 1498 1499 1500 #line 614 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1501 1502 1503 #line default 1504 #line hidden 1505 1506 #line 614 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1507 if (!renderVariantsAsProducts) 1508 { 1509 1510 1511 #line default 1512 #line hidden 1513 1514 #line 616 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1515 WriteTo(__razor_helper_writer, Variants()); 1516 1517 1518 #line default 1519 #line hidden 1520 1521 #line 616 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1522 1523 1524 } 1525 1526 1527 #line default 1528 #line hidden 1529 WriteLiteralTo(__razor_helper_writer, "\r\n"); 1530 1531 WriteLiteralTo(__razor_helper_writer, "\t"); 1532 1533 1534 #line 620 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1535 WriteTo(__razor_helper_writer, BomProducts()); 1536 1537 1538 #line default 1539 #line hidden 1540 WriteLiteralTo(__razor_helper_writer, "\r\n\r\n\r\n"); 1541 1542 1543 #line 623 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1544 1545 1546 #line default 1547 #line hidden 1548 1549 #line 623 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1550 if (!renderVariantsAsProducts) 1551 { 1552 1553 1554 #line default 1555 #line hidden 1556 1557 #line 625 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1558 WriteTo(__razor_helper_writer, BuySection()); 1559 1560 1561 #line default 1562 #line hidden 1563 1564 #line 625 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1565 1566 1567 1568 1569 #line default 1570 #line hidden 1571 1572 #line 627 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1573 WriteTo(__razor_helper_writer, DeliveryStockInfo()); 1574 1575 1576 #line default 1577 #line hidden 1578 1579 #line 627 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1580 1581 1582 } 1583 1584 1585 #line default 1586 #line hidden 1587 WriteLiteralTo(__razor_helper_writer, "</div>\r\n"); 1588 1589 1590 #line 631 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1591 1592 1593 #line default 1594 #line hidden 1595 }); 1596 1597 #line 631 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1598 } 1599 #line default 1600 #line hidden 1601 1602 1603 #line 633 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1604 public RazorEngine.Templating.TemplateWriter Variants() 1605 { 1606 #line default 1607 #line hidden 1608 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 1609 1610 #line 634 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1611 1612 string pageId = GetGlobalValue("Global:Page.ID").ToString(); 1613 string variantSelection = !String.IsNullOrEmpty(HttpContext.Current.Request.QueryString.Get("variantId")) ? HttpContext.Current.Request.QueryString.Get("variantId").Replace(".", ",") : ""; 1614 string hideHelpText = ""; 1615 1616 foreach (LoopItem variantgroup in GetLoop("VariantGroups")) 1617 { 1618 foreach (LoopItem variantoption in variantgroup.GetLoop("VariantAvailableOptions")) 1619 { 1620 if (variantoption.GetBoolean("Ecom:VariantOption.Selected")) 1621 { 1622 hideHelpText = "u-hidden"; 1623 } 1624 } 1625 } 1626 1627 if (GetLoop("VariantGroups").Count > 0) 1628 { 1629 var variantCombinationsObject = new List<Array>(); 1630 foreach (LoopItem variantcomb in GetLoop("VariantStockCombinations")) 1631 { 1632 string[] combinations = variantcomb.GetString("Ecom:VariantStockCombination.VariantID").Split('.'); 1633 variantCombinationsObject.Add(combinations); 1634 } 1635 1636 string combinationsJson = Newtonsoft.Json.JsonConvert.SerializeObject(variantCombinationsObject).Replace("\"", "\'"); 1637 1638 var variantGroupsObject = new List<List<String>>(); 1639 foreach (LoopItem variantGroup in GetLoop("VariantGroups")) 1640 { 1641 var variantsObject = new List<String>(); 1642 foreach (LoopItem variantOption in variantGroup.GetLoop("VariantAvailableOptions")) 1643 { 1644 variantsObject.Add(variantOption.GetString("Ecom:VariantOption.ID")); 1645 } 1646 variantGroupsObject.Add(variantsObject); 1647 } 1648 string variantsJson = Newtonsoft.Json.JsonConvert.SerializeObject(variantGroupsObject).Replace("\"", "\'"); 1649 1650 1651 1652 1653 #line default 1654 #line hidden 1655 WriteLiteralTo(__razor_helper_writer, "<div>\r\n\r\n\t<div"); 1656 1657 WriteLiteralTo(__razor_helper_writer, " class=\"js-variants\""); 1658 1659 WriteLiteralTo(__razor_helper_writer, " data-total-variant-groups=\""); 1660 1661 1662 #line 676 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1663 WriteTo(__razor_helper_writer, GetLoop("VariantGroups").Count); 1664 1665 1666 #line default 1667 #line hidden 1668 WriteLiteralTo(__razor_helper_writer, "\""); 1669 1670 WriteLiteralTo(__razor_helper_writer, " data-combinations=\""); 1671 1672 1673 #line 676 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1674 WriteTo(__razor_helper_writer, combinationsJson); 1675 1676 1677 #line default 1678 #line hidden 1679 WriteLiteralTo(__razor_helper_writer, "\""); 1680 1681 WriteLiteralTo(__razor_helper_writer, " data-variants=\""); 1682 1683 1684 #line 676 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1685 WriteTo(__razor_helper_writer, variantsJson); 1686 1687 1688 #line default 1689 #line hidden 1690 WriteLiteralTo(__razor_helper_writer, "\""); 1691 1692 WriteLiteralTo(__razor_helper_writer, " data-variant-selections=\""); 1693 1694 1695 #line 676 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1696 WriteTo(__razor_helper_writer, variantSelection); 1697 1698 1699 #line default 1700 #line hidden 1701 WriteLiteralTo(__razor_helper_writer, "\""); 1702 1703 WriteLiteralTo(__razor_helper_writer, " data-selection-complete=\"UpdatePage\""); 1704 1705 WriteLiteralTo(__razor_helper_writer, " data-page-id=\""); 1706 1707 1708 #line 676 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1709 WriteTo(__razor_helper_writer, pageId); 1710 1711 1712 #line default 1713 #line hidden 1714 WriteLiteralTo(__razor_helper_writer, "\""); 1715 1716 WriteLiteralTo(__razor_helper_writer, " data-product-id=\""); 1717 1718 1719 #line 676 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1720 WriteTo(__razor_helper_writer, productId); 1721 1722 1723 #line default 1724 #line hidden 1725 WriteLiteralTo(__razor_helper_writer, "\""); 1726 1727 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 1728 1729 1730 #line 677 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1731 1732 1733 #line default 1734 #line hidden 1735 1736 #line 677 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1737 foreach (LoopItem variantGroup in GetLoop("VariantGroups")) 1738 { 1739 string groupId = variantGroup.GetString("Ecom:VariantGroup.ID"); 1740 1741 1742 1743 #line default 1744 #line hidden 1745 WriteLiteralTo(__razor_helper_writer, "\t\t<div>\r\n\t\t\t<div"); 1746 1747 WriteLiteralTo(__razor_helper_writer, " class=\"u-bold\""); 1748 1749 WriteLiteralTo(__razor_helper_writer, ">"); 1750 1751 1752 #line 682 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1753 WriteTo(__razor_helper_writer, variantGroup.GetString("Ecom:VariantGroup.Name")); 1754 1755 1756 #line default 1757 #line hidden 1758 WriteLiteralTo(__razor_helper_writer, "</div>\r\n\t\t\t<div>\r\n"); 1759 1760 1761 #line 684 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1762 1763 1764 #line default 1765 #line hidden 1766 1767 #line 684 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1768 foreach (LoopItem variantOption in variantGroup.GetLoop("VariantAvailableOptions")) 1769 { 1770 string selected = variantOption.GetBoolean("Ecom:VariantOption.Selected") ? "checked" : ""; 1771 1772 if (!string.IsNullOrEmpty(variantOption.GetString("Ecom:VariantOption.ImgSmall.Clean"))) 1773 { 1774 string variantImage = "/Admin/Public/GetImage.ashx?width=100&amp;height=50&amp;crop=5&amp;Compression=75&amp;image=/Images/" + variantOption.GetString("Ecom: VariantOption.ImgSmall.Clean"); 1775 1776 1777 #line default 1778 #line hidden 1779 WriteLiteralTo(__razor_helper_writer, "\t\t\t\t<img"); 1780 1781 WriteLiteralTo(__razor_helper_writer, " data-variant-id=\""); 1782 1783 1784 #line 691 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1785 WriteTo(__razor_helper_writer, variantOption.GetString("Ecom:VariantOption.ID")); 1786 1787 1788 #line default 1789 #line hidden 1790 WriteLiteralTo(__razor_helper_writer, "\""); 1791 1792 WriteLiteralTo(__razor_helper_writer, " data-variant-group=\""); 1793 1794 1795 #line 691 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1796 WriteTo(__razor_helper_writer, groupId); 1797 1798 1799 #line default 1800 #line hidden 1801 WriteLiteralTo(__razor_helper_writer, "\""); 1802 1803 WriteAttributeTo(__razor_helper_writer, "src", Tuple.Create(" src=\"", 27795), Tuple.Create("\"", 27814) 1804 1805 #line 691 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1806 , Tuple.Create(Tuple.Create("", 27801), Tuple.Create<System.Object, System.Int32>(variantImage 1807 1808 #line default 1809 #line hidden 1810 , 27801), false) 1811 ); 1812 1813 WriteLiteralTo(__razor_helper_writer, " onclick=\"MatchVariants.SelectThis(event)\""); 1814 1815 WriteAttributeTo(__razor_helper_writer, "alt", Tuple.Create(" alt=\"", 27857), Tuple.Create("\"", 27914) 1816 1817 #line 691 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1818 , Tuple.Create(Tuple.Create("", 27863), Tuple.Create<System.Object, System.Int32>(variantOption.GetString("Ecom:VariantOption.Name") 1819 1820 #line default 1821 #line hidden 1822 , 27863), false) 1823 ); 1824 1825 WriteAttributeTo(__razor_helper_writer, "title", Tuple.Create(" title=\"", 27915), Tuple.Create("\"", 27974) 1826 1827 #line 691 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1828 , Tuple.Create(Tuple.Create("", 27923), Tuple.Create<System.Object, System.Int32>(variantOption.GetString("Ecom:VariantOption.Name") 1829 1830 #line default 1831 #line hidden 1832 , 27923), false) 1833 ); 1834 1835 WriteAttributeTo(__razor_helper_writer, "class", Tuple.Create(" class=\"", 27975), Tuple.Create("\"", 28023) 1836 , Tuple.Create(Tuple.Create("", 27983), Tuple.Create("btn", 27983), true) 1837 , Tuple.Create(Tuple.Create(" ", 27986), Tuple.Create("btn--tag", 27987), true) 1838 1839 #line 691 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1840 , Tuple.Create(Tuple.Create(" ", 27995), Tuple.Create<System.Object, System.Int32>(selected 1841 1842 #line default 1843 #line hidden 1844 , 27996), false) 1845 , Tuple.Create(Tuple.Create(" ", 28005), Tuple.Create("js-variant-option", 28006), true) 1846 ); 1847 1848 WriteLiteralTo(__razor_helper_writer, " data-check=\""); 1849 1850 1851 #line 691 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1852 WriteTo(__razor_helper_writer, selected); 1853 1854 1855 #line default 1856 #line hidden 1857 WriteLiteralTo(__razor_helper_writer, "\""); 1858 1859 WriteLiteralTo(__razor_helper_writer, " />\r\n"); 1860 1861 1862 #line 692 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1863 } 1864 else 1865 { 1866 1867 1868 #line default 1869 #line hidden 1870 WriteLiteralTo(__razor_helper_writer, "\t\t\t\t<button"); 1871 1872 WriteLiteralTo(__razor_helper_writer, " type=\"button\""); 1873 1874 WriteLiteralTo(__razor_helper_writer, " data-variant-id=\""); 1875 1876 1877 #line 695 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1878 WriteTo(__razor_helper_writer, variantOption.GetString("Ecom:VariantOption.ID")); 1879 1880 1881 #line default 1882 #line hidden 1883 WriteLiteralTo(__razor_helper_writer, "\""); 1884 1885 WriteLiteralTo(__razor_helper_writer, " data-variant-group=\""); 1886 1887 1888 #line 695 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1889 WriteTo(__razor_helper_writer, groupId); 1890 1891 1892 #line default 1893 #line hidden 1894 WriteLiteralTo(__razor_helper_writer, "\""); 1895 1896 WriteLiteralTo(__razor_helper_writer, " onclick=\"MatchVariants.SelectThis(event)\""); 1897 1898 WriteAttributeTo(__razor_helper_writer, "class", Tuple.Create(" class=\"", 28241), Tuple.Create("\"", 28289) 1899 , Tuple.Create(Tuple.Create("", 28249), Tuple.Create("btn", 28249), true) 1900 , Tuple.Create(Tuple.Create(" ", 28252), Tuple.Create("btn--tag", 28253), true) 1901 1902 #line 695 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1903 , Tuple.Create(Tuple.Create(" ", 28261), Tuple.Create<System.Object, System.Int32>(selected 1904 1905 #line default 1906 #line hidden 1907 , 28262), false) 1908 , Tuple.Create(Tuple.Create(" ", 28271), Tuple.Create("js-variant-option", 28272), true) 1909 ); 1910 1911 WriteLiteralTo(__razor_helper_writer, " data-check=\""); 1912 1913 1914 #line 695 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1915 WriteTo(__razor_helper_writer, selected); 1916 1917 1918 #line default 1919 #line hidden 1920 WriteLiteralTo(__razor_helper_writer, "\""); 1921 1922 WriteLiteralTo(__razor_helper_writer, ">"); 1923 1924 1925 #line 695 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1926 WriteTo(__razor_helper_writer, variantOption.GetString("Ecom:VariantOption.Name")); 1927 1928 1929 #line default 1930 #line hidden 1931 WriteLiteralTo(__razor_helper_writer, "</button>\r\n"); 1932 1933 1934 #line 696 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1935 } 1936 } 1937 1938 1939 #line default 1940 #line hidden 1941 WriteLiteralTo(__razor_helper_writer, "\t\t\t</div>\r\n\t\t</div>\r\n"); 1942 1943 1944 #line 700 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1945 } 1946 1947 1948 #line default 1949 #line hidden 1950 WriteLiteralTo(__razor_helper_writer, "\t</div>\r\n\t<small"); 1951 1952 WriteAttributeTo(__razor_helper_writer, "class", Tuple.Create(" class=\"", 28432), Tuple.Create("\"", 28476) 1953 , Tuple.Create(Tuple.Create("", 28440), Tuple.Create("js-help-text", 28440), true) 1954 , Tuple.Create(Tuple.Create(" ", 28452), Tuple.Create("help-text", 28453), true) 1955 1956 #line 702 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1957 , Tuple.Create(Tuple.Create(" ", 28462), Tuple.Create<System.Object, System.Int32>(hideHelpText 1958 1959 #line default 1960 #line hidden 1961 , 28463), false) 1962 ); 1963 1964 WriteLiteralTo(__razor_helper_writer, ">"); 1965 1966 1967 #line 702 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1968 WriteTo(__razor_helper_writer, Translate("Please select variant!")); 1969 1970 1971 #line default 1972 #line hidden 1973 WriteLiteralTo(__razor_helper_writer, "</small>\r\n</div>\r\n"); 1974 1975 1976 #line 704 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1977 } 1978 1979 1980 #line default 1981 #line hidden 1982 }); 1983 1984 #line 705 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1985 } 1986 #line default 1987 #line hidden 1988 1989 1990 #line 707 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1991 public RazorEngine.Templating.TemplateWriter BomProducts() 1992 { 1993 #line default 1994 #line hidden 1995 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 1996 1997 #line 708 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 1998 1999 if (GetLoop("BOMProducts").Count > 0) 2000 { 2001 2002 2003 2004 #line default 2005 #line hidden 2006 WriteLiteralTo(__razor_helper_writer, "<h2"); 2007 2008 WriteLiteralTo(__razor_helper_writer, " class=\"section-title\""); 2009 2010 WriteLiteralTo(__razor_helper_writer, ">"); 2011 2012 2013 #line 712 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2014 WriteTo(__razor_helper_writer, Translate("Including products")); 2015 2016 2017 #line default 2018 #line hidden 2019 WriteLiteralTo(__razor_helper_writer, "</h2>\r\n"); 2020 2021 2022 #line 713 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2023 foreach (LoopItem BOMProductItem in GetLoop("BOMProducts")) 2024 { 2025 string link = "/" + BOMProductItem.GetString("Ecom:Product.LinkGroup.Clean") + (!String.IsNullOrEmpty(BOMProductItem.GetString("Ecom:Product.VariantID")) ? "&VariantID=" + BOMProductItem.GetString("Ecom:Product.VariantID") : ""); 2026 2027 2028 #line default 2029 #line hidden 2030 WriteLiteralTo(__razor_helper_writer, "<div"); 2031 2032 WriteLiteralTo(__razor_helper_writer, " class=\"grid__col--border grid\""); 2033 2034 WriteLiteralTo(__razor_helper_writer, ">\r\n\t<div"); 2035 2036 WriteLiteralTo(__razor_helper_writer, " class=\"grid__cell grid__cell--align-middle-left\""); 2037 2038 WriteLiteralTo(__razor_helper_writer, ">\r\n\t\t<a"); 2039 2040 WriteAttributeTo(__razor_helper_writer, "href", Tuple.Create(" href=\"", 29069), Tuple.Create("\"", 29081) 2041 2042 #line 718 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2043 , Tuple.Create(Tuple.Create("", 29076), Tuple.Create<System.Object, System.Int32>(link 2044 2045 #line default 2046 #line hidden 2047 , 29076), false) 2048 ); 2049 2050 WriteLiteralTo(__razor_helper_writer, " class=\"u-pull--left u-margin-right\""); 2051 2052 WriteLiteralTo(__razor_helper_writer, ">\r\n\t\t\t<img"); 2053 2054 WriteAttributeTo(__razor_helper_writer, "src", Tuple.Create(" src=\"", 29128), Tuple.Create("\"", 29258) 2055 , Tuple.Create(Tuple.Create("", 29134), Tuple.Create("/Admin/Public/GetImage.ashx?width=50&image=", 29134), true) 2056 2057 #line 719 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2058 , Tuple.Create(Tuple.Create("", 29177), Tuple.Create<System.Object, System.Int32>(BOMProductItem.GetString("Ecom:Product.ImageSmall.Default.Clean") 2059 2060 #line default 2061 #line hidden 2062 , 29177), false) 2063 , Tuple.Create(Tuple.Create("", 29243), Tuple.Create("&Compression=99", 29243), true) 2064 ); 2065 2066 WriteAttributeTo(__razor_helper_writer, "alt", Tuple.Create(" alt=\"", 29259), Tuple.Create("\"", 29311) 2067 2068 #line 719 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2069 , Tuple.Create(Tuple.Create("", 29265), Tuple.Create<System.Object, System.Int32>(BOMProductItem.GetString("Ecom:Product.Name") 2070 2071 #line default 2072 #line hidden 2073 , 29265), false) 2074 ); 2075 2076 WriteLiteralTo(__razor_helper_writer, " />\r\n\t\t</a>\r\n\t\t<a"); 2077 2078 WriteAttributeTo(__razor_helper_writer, "href", Tuple.Create(" href=\"", 29329), Tuple.Create("\"", 29341) 2079 2080 #line 721 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2081 , Tuple.Create(Tuple.Create("", 29336), Tuple.Create<System.Object, System.Int32>(link 2082 2083 #line default 2084 #line hidden 2085 , 29336), false) 2086 ); 2087 2088 WriteLiteralTo(__razor_helper_writer, ">"); 2089 2090 2091 #line 721 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2092 WriteTo(__razor_helper_writer, BOMProductItem.GetString("Ecom:Product.Name")); 2093 2094 2095 #line default 2096 #line hidden 2097 WriteLiteralTo(__razor_helper_writer, "</a>\r\n\r\n\t</div>\r\n\r\n</div>\r\n"); 2098 2099 2100 #line 726 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2101 } 2102 } 2103 2104 2105 #line default 2106 #line hidden 2107 }); 2108 2109 #line 728 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2110 } 2111 #line default 2112 #line hidden 2113 2114 2115 #line 730 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2116 public RazorEngine.Templating.TemplateWriter BuySection() 2117 { 2118 #line default 2119 #line hidden 2120 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 2121 2122 #line 731 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2123 2124 string pageId = GetGlobalValue("Global:Page.ID").ToString(); 2125 string variantId = HttpContext.Current.Request.QueryString.Get("variantId"); 2126 string feedId = pageId + "&ProductID=" + productId + "&VariantID=" + variantId + "&Feed=True&redirect=false"; 2127 2128 2129 2130 2131 #line default 2132 #line hidden 2133 WriteLiteralTo(__razor_helper_writer, "<div"); 2134 2135 WriteLiteralTo(__razor_helper_writer, " class=\"product__price-actions js-handlebars-root dw-mod\""); 2136 2137 WriteLiteralTo(__razor_helper_writer, " id=\"PriceAndActions\""); 2138 2139 WriteLiteralTo(__razor_helper_writer, " data-template=\"PricesAndActionsTemplate\""); 2140 2141 WriteLiteralTo(__razor_helper_writer, " data-json-feed=\"/Default.aspx?ID="); 2142 2143 2144 #line 737 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2145 WriteTo(__razor_helper_writer, feedId); 2146 2147 2148 #line default 2149 #line hidden 2150 WriteLiteralTo(__razor_helper_writer, "\""); 2151 2152 WriteLiteralTo(__razor_helper_writer, " data-preloader=\"minimal\""); 2153 2154 WriteLiteralTo(__razor_helper_writer, "></div>\r\n"); 2155 2156 WriteLiteralTo(__razor_helper_writer, "<input"); 2157 2158 WriteLiteralTo(__razor_helper_writer, " type=\"hidden\""); 2159 2160 WriteAttributeTo(__razor_helper_writer, "value", Tuple.Create(" value=\"", 29926), Tuple.Create("\"", 29979) 2161 2162 #line 738 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2163 , Tuple.Create(Tuple.Create("", 29934), Tuple.Create<System.Object, System.Int32>(GetString("Ecom:Product.VariantID.Extented") 2164 2165 #line default 2166 #line hidden 2167 , 29934), false) 2168 ); 2169 2170 WriteLiteralTo(__razor_helper_writer, " name=\"Variant\""); 2171 2172 WriteAttributeTo(__razor_helper_writer, "id", Tuple.Create(" id=\"", 29995), Tuple.Create("\"", 30037) 2173 , Tuple.Create(Tuple.Create("", 30000), Tuple.Create("Variant_", 30000), true) 2174 2175 #line 738 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2176 , Tuple.Create(Tuple.Create("", 30008), Tuple.Create<System.Object, System.Int32>(GetString("Ecom:Product.ID") 2177 2178 #line default 2179 #line hidden 2180 , 30008), false) 2181 ); 2182 2183 WriteLiteralTo(__razor_helper_writer, " />\r\n"); 2184 2185 2186 #line 739 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2187 2188 2189 #line default 2190 #line hidden 2191 }); 2192 2193 #line 739 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2194 } 2195 #line default 2196 #line hidden 2197 2198 2199 #line 741 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2200 public RazorEngine.Templating.TemplateWriter DeliveryStockInfo() 2201 { 2202 #line default 2203 #line hidden 2204 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 2205 2206 #line 742 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2207 2208 bool hideStockState = productDetails["ProductDetailsHideStockState"] != null ? Converter.ToBoolean(productDetails["ProductDetailsHideStockState"]) : false; 2209 bool hideDelivery = productDetails["ProductDetailsHideShipping"] != null ? Converter.ToBoolean(productDetails["ProductDetailsHideShipping"]) : false; 2210 2211 if (!onlyPreview && (!String.IsNullOrEmpty(GetString("Ecom:Product:Stock.Text")) || !String.IsNullOrEmpty(GetString("Ecom:Product:Stock.DeliveryText")))) 2212 { 2213 string stockIcon = GetInteger("Ecom:Product.Stock") > 0 ? "stock-icon--in" : "stock-icon--not"; 2214 2215 2216 2217 2218 #line default 2219 #line hidden 2220 WriteLiteralTo(__razor_helper_writer, "<div"); 2221 2222 WriteLiteralTo(__razor_helper_writer, " class=\"product__stock-delivery dw-mod\""); 2223 2224 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 2225 2226 2227 #line 752 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2228 2229 2230 #line default 2231 #line hidden 2232 2233 #line 752 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2234 if (!hideStockState) 2235 { 2236 2237 2238 #line default 2239 #line hidden 2240 2241 #line 754 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2242 WriteTo(__razor_helper_writer, GetString("Ecom:Product:Stock.Text")); 2243 2244 2245 #line default 2246 #line hidden 2247 WriteLiteralTo(__razor_helper_writer, " <div"); 2248 2249 WriteAttributeTo(__razor_helper_writer, "class", Tuple.Create(" class=\"", 30766), Tuple.Create("\"", 30795) 2250 , Tuple.Create(Tuple.Create("", 30774), Tuple.Create("stock-icon", 30774), true) 2251 2252 #line 754 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2253 , Tuple.Create(Tuple.Create(" ", 30784), Tuple.Create<System.Object, System.Int32>(stockIcon 2254 2255 #line default 2256 #line hidden 2257 , 30785), false) 2258 ); 2259 2260 WriteLiteralTo(__razor_helper_writer, "></div>\r\n"); 2261 2262 2263 #line 755 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2264 } 2265 2266 2267 #line default 2268 #line hidden 2269 WriteLiteralTo(__razor_helper_writer, "\r\n"); 2270 2271 2272 #line 757 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2273 2274 2275 #line default 2276 #line hidden 2277 2278 #line 757 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2279 if (!String.IsNullOrEmpty(GetString("Ecom:Product:Stock.DeliveryText")) && !hideDelivery) 2280 { 2281 2282 2283 #line default 2284 #line hidden 2285 WriteLiteralTo(__razor_helper_writer, "\t<span>"); 2286 2287 2288 #line 759 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2289 WriteTo(__razor_helper_writer, Translate("Shipping")); 2290 2291 2292 #line default 2293 #line hidden 2294 WriteLiteralTo(__razor_helper_writer, "</span> "); 2295 2296 WriteLiteralTo(__razor_helper_writer, "<span>"); 2297 2298 2299 #line 759 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2300 WriteTo(__razor_helper_writer, GetString("Ecom:Product:Stock.DeliveryText")); 2301 2302 2303 #line default 2304 #line hidden 2305 WriteLiteralTo(__razor_helper_writer, "</span> "); 2306 2307 WriteLiteralTo(__razor_helper_writer, "<span>"); 2308 2309 2310 #line 759 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2311 WriteTo(__razor_helper_writer, GetString("Ecom:Product:Stock.DeliveryUnit")); 2312 2313 2314 #line default 2315 #line hidden 2316 WriteLiteralTo(__razor_helper_writer, "</span>\r\n"); 2317 2318 2319 #line 760 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2320 } 2321 2322 2323 #line default 2324 #line hidden 2325 WriteLiteralTo(__razor_helper_writer, "</div>\r\n"); 2326 2327 2328 #line 762 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2329 } 2330 2331 2332 #line default 2333 #line hidden 2334 }); 2335 2336 #line 763 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2337 } 2338 #line default 2339 #line hidden 2340 2341 2342 #line 765 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2343 public RazorEngine.Templating.TemplateWriter ShortDescription() 2344 { 2345 #line default 2346 #line hidden 2347 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 2348 2349 #line 766 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2350 2351 bool showDiscountPrice = GetString("Ecom:Product:Field.ShowDiscountPrice") == "True"; 2352 string discountPrice = GetString("Ecom:Product:Field.DiscountPrice"); 2353 string shortDescription = GetString("Ecom:Product.ShortDescription"); 2354 bool hideProductNumber = productDetails["ProductDetailsHideProductNumber"] != null ? Converter.ToBoolean(productDetails["ProductDetailsHideProductNumber"]) : false; 2355 string eanNumber = GetString("Ecom:Product:Field.SP_EAN"); 2356 string colorFinish = GetString("Ecom:Product:Field.ColorFinish"); 2357 string material = GetString("Ecom:Product:Field.Material"); 2358 string height = GetString("Ecom:Product:Field.Height"); 2359 string width = GetString("Ecom:Product:Field.Width"); 2360 string depth = GetString("Ecom:Product:Field.Depth"); 2361 string weight = GetString("Ecom:Product.Weight"); 2362 string warranty = GetString("Ecom:Product:Field.Warranty"); 2363 string countryOfOrigin = GetString("Ecom:Product:Field.CountryOfOrigin"); 2364 string kelvinImageFile = "/Files/Images/Ecom/Kelvin/" + GetString("Ecom:Product.ID") + "_kelvin.jpg"; 2365 string kelvinAbsolutePath = System.Web.HttpContext.Current.Server.MapPath("~/" + kelvinImageFile); 2366 string kelvinImageGetImage = "/Admin/Public/GetImage.ashx?image=" + kelvinImageFile + "&width=300&crop=5"; 2367 2368 if (!String.IsNullOrEmpty(shortDescription)) 2369 { 2370 2371 2372 #line default 2373 #line hidden 2374 WriteLiteralTo(__razor_helper_writer, "<div"); 2375 2376 WriteLiteralTo(__razor_helper_writer, " class=\"introduction-text\""); 2377 2378 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 2379 2380 WriteLiteralTo(__razor_helper_writer, "\t"); 2381 2382 2383 #line 787 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2384 WriteTo(__razor_helper_writer, shortDescription); 2385 2386 2387 #line default 2388 #line hidden 2389 WriteLiteralTo(__razor_helper_writer, "\r\n</div>\r\n"); 2390 2391 2392 #line 789 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2393 } 2394 2395 2396 2397 #line default 2398 #line hidden 2399 WriteLiteralTo(__razor_helper_writer, "<div>\r\n\t<table>\r\n"); 2400 2401 2402 #line 793 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2403 2404 2405 #line default 2406 #line hidden 2407 2408 #line 793 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2409 if (showDiscountPrice && stringIsNotNullEmptyOrZero(discountPrice)) 2410 { 2411 2412 2413 #line default 2414 #line hidden 2415 WriteLiteralTo(__razor_helper_writer, "\t\t<tr>\r\n\t\t\t<td>"); 2416 2417 2418 #line 796 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2419 WriteTo(__razor_helper_writer, Translate("Product field: Vejledende pris", "Vejl, Salgspris")); 2420 2421 2422 #line default 2423 #line hidden 2424 WriteLiteralTo(__razor_helper_writer, "</td>\r\n\t\t\t<td>"); 2425 2426 2427 #line 797 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2428 WriteTo(__razor_helper_writer, addAfterFix(discountPrice, "kr.")); 2429 2430 2431 #line default 2432 #line hidden 2433 WriteLiteralTo(__razor_helper_writer, "</td>\r\n\t\t</tr>\r\n"); 2434 2435 2436 #line 799 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2437 } 2438 2439 2440 #line default 2441 #line hidden 2442 WriteLiteralTo(__razor_helper_writer, "\t\t"); 2443 2444 2445 #line 800 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2446 if (!hideProductNumber) 2447 { 2448 2449 2450 #line default 2451 #line hidden 2452 WriteLiteralTo(__razor_helper_writer, "\t\t<tr>\r\n\t\t\t<td>"); 2453 2454 2455 #line 803 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2456 WriteTo(__razor_helper_writer, Translate("Product field: Number", "Varenr.")); 2457 2458 2459 #line default 2460 #line hidden 2461 WriteLiteralTo(__razor_helper_writer, "</td>\r\n\t\t\t<td>"); 2462 2463 2464 #line 804 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2465 WriteTo(__razor_helper_writer, GetString("Ecom:Product.Number")); 2466 2467 2468 #line default 2469 #line hidden 2470 WriteLiteralTo(__razor_helper_writer, "</td>\r\n\t\t</tr>\r\n"); 2471 2472 2473 #line 806 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2474 } 2475 2476 2477 #line default 2478 #line hidden 2479 WriteLiteralTo(__razor_helper_writer, "\t\t"); 2480 2481 2482 #line 807 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2483 if (!String.IsNullOrEmpty(eanNumber)) 2484 { 2485 2486 2487 #line default 2488 #line hidden 2489 WriteLiteralTo(__razor_helper_writer, "\t\t<tr>\r\n\t\t\t<td>"); 2490 2491 2492 #line 810 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2493 WriteTo(__razor_helper_writer, Translate("Product field: EAN", "EAN")); 2494 2495 2496 #line default 2497 #line hidden 2498 WriteLiteralTo(__razor_helper_writer, "</td>\r\n\t\t\t<td>"); 2499 2500 2501 #line 811 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2502 WriteTo(__razor_helper_writer, eanNumber); 2503 2504 2505 #line default 2506 #line hidden 2507 WriteLiteralTo(__razor_helper_writer, "</td>\r\n\t\t</tr>\r\n"); 2508 2509 2510 #line 813 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2511 } 2512 2513 2514 #line default 2515 #line hidden 2516 WriteLiteralTo(__razor_helper_writer, "\t\t"); 2517 2518 2519 #line 814 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2520 if (!String.IsNullOrEmpty(colorFinish) && areaID != 1019) 2521 { 2522 2523 2524 #line default 2525 #line hidden 2526 WriteLiteralTo(__razor_helper_writer, "\t\t<tr>\r\n\t\t\t<td>"); 2527 2528 2529 #line 817 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2530 WriteTo(__razor_helper_writer, Translate("Product field: Color finish", "Farve")); 2531 2532 2533 #line default 2534 #line hidden 2535 WriteLiteralTo(__razor_helper_writer, "</td>\r\n\t\t\t<td>"); 2536 2537 2538 #line 818 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2539 WriteTo(__razor_helper_writer, colorFinish); 2540 2541 2542 #line default 2543 #line hidden 2544 WriteLiteralTo(__razor_helper_writer, "</td>\r\n\t\t</tr>\r\n"); 2545 2546 2547 #line 820 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2548 } 2549 2550 2551 #line default 2552 #line hidden 2553 WriteLiteralTo(__razor_helper_writer, "\t\t"); 2554 2555 2556 #line 821 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2557 if (!String.IsNullOrEmpty(material) && areaID != 1019) 2558 { 2559 2560 2561 #line default 2562 #line hidden 2563 WriteLiteralTo(__razor_helper_writer, "\t\t<tr>\r\n\t\t\t<td>"); 2564 2565 2566 #line 824 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2567 WriteTo(__razor_helper_writer, Translate("Product field: Material", "Matriale")); 2568 2569 2570 #line default 2571 #line hidden 2572 WriteLiteralTo(__razor_helper_writer, "</td>\r\n\t\t\t<td>"); 2573 2574 2575 #line 825 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2576 WriteTo(__razor_helper_writer, material); 2577 2578 2579 #line default 2580 #line hidden 2581 WriteLiteralTo(__razor_helper_writer, "</td>\r\n\t\t</tr>\r\n"); 2582 2583 2584 #line 827 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2585 } 2586 2587 2588 #line default 2589 #line hidden 2590 WriteLiteralTo(__razor_helper_writer, "\t\t"); 2591 2592 2593 #line 828 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2594 if (stringIsNotNullEmptyOrZero(height)) 2595 { 2596 2597 2598 #line default 2599 #line hidden 2600 WriteLiteralTo(__razor_helper_writer, "\t\t<tr>\r\n\t\t\t<td>"); 2601 2602 2603 #line 831 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2604 WriteTo(__razor_helper_writer, Translate("Product field: Height", "Højde")); 2605 2606 2607 #line default 2608 #line hidden 2609 WriteLiteralTo(__razor_helper_writer, "</td>\r\n\t\t\t<td>"); 2610 2611 2612 #line 832 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2613 WriteTo(__razor_helper_writer, addAfterFix(height, "cm")); 2614 2615 2616 #line default 2617 #line hidden 2618 WriteLiteralTo(__razor_helper_writer, "</td>\r\n\t\t</tr>\r\n"); 2619 2620 2621 #line 834 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2622 } 2623 2624 2625 #line default 2626 #line hidden 2627 WriteLiteralTo(__razor_helper_writer, "\t\t"); 2628 2629 2630 #line 835 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2631 if (stringIsNotNullEmptyOrZero(width)) 2632 { 2633 2634 2635 #line default 2636 #line hidden 2637 WriteLiteralTo(__razor_helper_writer, "\t\t<tr>\r\n\t\t\t<td>"); 2638 2639 2640 #line 838 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2641 WriteTo(__razor_helper_writer, Translate("Product field: Width", "Bredde")); 2642 2643 2644 #line default 2645 #line hidden 2646 WriteLiteralTo(__razor_helper_writer, "</td>\r\n\t\t\t<td>"); 2647 2648 2649 #line 839 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2650 WriteTo(__razor_helper_writer, addAfterFix(width, "cm")); 2651 2652 2653 #line default 2654 #line hidden 2655 WriteLiteralTo(__razor_helper_writer, "</td>\r\n\t\t</tr>\r\n"); 2656 2657 2658 #line 841 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2659 } 2660 2661 2662 #line default 2663 #line hidden 2664 WriteLiteralTo(__razor_helper_writer, "\t\t"); 2665 2666 2667 #line 842 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2668 if (stringIsNotNullEmptyOrZero(depth)) 2669 { 2670 2671 2672 #line default 2673 #line hidden 2674 WriteLiteralTo(__razor_helper_writer, "\t\t<tr>\r\n\t\t\t<td>"); 2675 2676 2677 #line 845 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2678 WriteTo(__razor_helper_writer, Translate("Product field: Depth", "Dybde")); 2679 2680 2681 #line default 2682 #line hidden 2683 WriteLiteralTo(__razor_helper_writer, "</td>\r\n\t\t\t<td>"); 2684 2685 2686 #line 846 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2687 WriteTo(__razor_helper_writer, addAfterFix(depth, "cm")); 2688 2689 2690 #line default 2691 #line hidden 2692 WriteLiteralTo(__razor_helper_writer, "</td>\r\n\t\t</tr>\r\n"); 2693 2694 2695 #line 848 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2696 } 2697 2698 2699 #line default 2700 #line hidden 2701 WriteLiteralTo(__razor_helper_writer, "\t\t"); 2702 2703 2704 #line 849 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2705 if (stringIsNotNullEmptyOrZero(weight)) 2706 { 2707 2708 2709 #line default 2710 #line hidden 2711 WriteLiteralTo(__razor_helper_writer, "\t\t<tr>\r\n\t\t\t<td>"); 2712 2713 2714 #line 852 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2715 WriteTo(__razor_helper_writer, Translate("Product field: Weight", "Vægt")); 2716 2717 2718 #line default 2719 #line hidden 2720 WriteLiteralTo(__razor_helper_writer, "</td>\r\n\t\t\t<td>"); 2721 2722 2723 #line 853 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2724 WriteTo(__razor_helper_writer, addAfterFix(weight, "kg")); 2725 2726 2727 #line default 2728 #line hidden 2729 WriteLiteralTo(__razor_helper_writer, "</td>\r\n\t\t</tr>\r\n"); 2730 2731 2732 #line 855 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2733 } 2734 2735 2736 #line default 2737 #line hidden 2738 WriteLiteralTo(__razor_helper_writer, "\t\t"); 2739 2740 2741 #line 856 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2742 if (stringIsNotNullEmptyOrZero(warranty)) 2743 { 2744 2745 2746 #line default 2747 #line hidden 2748 WriteLiteralTo(__razor_helper_writer, "\t\t\t<tr>\r\n\t\t\t\t<td>"); 2749 2750 2751 #line 859 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2752 WriteTo(__razor_helper_writer, Translate("Product field: Warranty", "Garanti")); 2753 2754 2755 #line default 2756 #line hidden 2757 WriteLiteralTo(__razor_helper_writer, "</td>\r\n\t\t\t\t<td>"); 2758 2759 2760 #line 860 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2761 WriteTo(__razor_helper_writer, addAfterFix(warranty, "År")); 2762 2763 2764 #line default 2765 #line hidden 2766 WriteLiteralTo(__razor_helper_writer, "</td>\r\n\t\t\t</tr>\r\n"); 2767 2768 2769 #line 862 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2770 } 2771 2772 2773 #line default 2774 #line hidden 2775 WriteLiteralTo(__razor_helper_writer, "\t\t"); 2776 2777 2778 #line 863 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2779 if (File.Exists(kelvinAbsolutePath)) 2780 { 2781 2782 2783 #line default 2784 #line hidden 2785 WriteLiteralTo(__razor_helper_writer, "\t\t<tr>\r\n\t\t\t<td>"); 2786 2787 2788 #line 866 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2789 WriteTo(__razor_helper_writer, Translate("Product field: Kelvin", "Kelvin")); 2790 2791 2792 #line default 2793 #line hidden 2794 WriteLiteralTo(__razor_helper_writer, "</td>\r\n\t\t\t<td><img"); 2795 2796 WriteAttributeTo(__razor_helper_writer, "src", Tuple.Create(" src=\"", 34355), Tuple.Create("\"", 34381) 2797 2798 #line 867 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2799 , Tuple.Create(Tuple.Create("", 34361), Tuple.Create<System.Object, System.Int32>(kelvinImageGetImage 2800 2801 #line default 2802 #line hidden 2803 , 34361), false) 2804 ); 2805 2806 WriteLiteralTo(__razor_helper_writer, " alt=\"kelvin\""); 2807 2808 WriteLiteralTo(__razor_helper_writer, " /></td>\r\n\t\t</tr>\r\n"); 2809 2810 2811 #line 869 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2812 } 2813 2814 2815 #line default 2816 #line hidden 2817 WriteLiteralTo(__razor_helper_writer, "\t</table>\r\n</div>\r\n"); 2818 2819 2820 #line 872 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2821 2822 2823 #line default 2824 #line hidden 2825 }); 2826 2827 #line 872 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2828 } 2829 #line default 2830 #line hidden 2831 2832 2833 #line 874 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2834 public RazorEngine.Templating.TemplateWriter ProductDownloads() 2835 { 2836 #line default 2837 #line hidden 2838 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 2839 2840 #line 875 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2841 2842 string manualPdfFile = "/Files/Images/Ecom/Manualer/" + GetString("Ecom:Product.ID") + "_manual.pdf"; 2843 string manualAbsolutePath = System.Web.HttpContext.Current.Server.MapPath("~/" + manualPdfFile); 2844 string drawingPdfFile = "/Files/Images/Ecom/Stregtegninger/" + GetString("Ecom:Product.ID") + "_stregtegning.pdf"; 2845 string drawingAbsolutePath = System.Web.HttpContext.Current.Server.MapPath("~/" + drawingPdfFile); 2846 string energyLabelPdfFile = "/Files/Images/Ecom/Energilabel/" + GetString("Ecom:Product.ID") + "_energilabel.pdf"; 2847 string energyLabelAbsolutePath = System.Web.HttpContext.Current.Server.MapPath("~/" + energyLabelPdfFile); 2848 2849 2850 2851 2852 #line default 2853 #line hidden 2854 WriteLiteralTo(__razor_helper_writer, "<div"); 2855 2856 WriteLiteralTo(__razor_helper_writer, " class=\"u-margin-left--lg\""); 2857 2858 WriteLiteralTo(__razor_helper_writer, "style=\"margin-top: 2em;\""); 2859 2860 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 2861 2862 2863 #line 885 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2864 2865 2866 #line default 2867 #line hidden 2868 2869 #line 885 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2870 if (File.Exists(manualAbsolutePath)) 2871 { 2872 2873 2874 #line default 2875 #line hidden 2876 WriteLiteralTo(__razor_helper_writer, "\t<div"); 2877 2878 WriteLiteralTo(__razor_helper_writer, " class=\"manualpdf\""); 2879 2880 WriteLiteralTo(__razor_helper_writer, ">\r\n\t\t<a"); 2881 2882 WriteLiteralTo(__razor_helper_writer, " class=\"btn\""); 2883 2884 WriteAttributeTo(__razor_helper_writer, "href", Tuple.Create(" href=\"", 35262), Tuple.Create("\"", 35283) 2885 2886 #line 888 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2887 , Tuple.Create(Tuple.Create("", 35269), Tuple.Create<System.Object, System.Int32>(manualPdfFile 2888 2889 #line default 2890 #line hidden 2891 , 35269), false) 2892 ); 2893 2894 WriteLiteralTo(__razor_helper_writer, " download><i"); 2895 2896 WriteLiteralTo(__razor_helper_writer, " class=\"fal fa-download\""); 2897 2898 WriteLiteralTo(__razor_helper_writer, "></i>&nbsp;&nbsp;"); 2899 2900 2901 #line 888 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2902 WriteTo(__razor_helper_writer, Translate("Product field: Monteringsvejledning", "Monteringsvejledning")); 2903 2904 2905 #line default 2906 #line hidden 2907 WriteLiteralTo(__razor_helper_writer, "</a>\r\n\t</div>\r\n"); 2908 2909 2910 #line 890 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2911 } 2912 2913 2914 #line default 2915 #line hidden 2916 WriteLiteralTo(__razor_helper_writer, "\t"); 2917 2918 2919 #line 891 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2920 if (File.Exists(drawingAbsolutePath)) 2921 { 2922 2923 2924 #line default 2925 #line hidden 2926 WriteLiteralTo(__razor_helper_writer, "\t<div"); 2927 2928 WriteLiteralTo(__razor_helper_writer, " class=\"drawingpdf\""); 2929 2930 WriteLiteralTo(__razor_helper_writer, ">\r\n\t\t<a"); 2931 2932 WriteLiteralTo(__razor_helper_writer, " class=\"btn\""); 2933 2934 WriteAttributeTo(__razor_helper_writer, "href", Tuple.Create(" href=\"", 35517), Tuple.Create("\"", 35539) 2935 2936 #line 894 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2937 , Tuple.Create(Tuple.Create("", 35524), Tuple.Create<System.Object, System.Int32>(drawingPdfFile 2938 2939 #line default 2940 #line hidden 2941 , 35524), false) 2942 ); 2943 2944 WriteLiteralTo(__razor_helper_writer, " download><i"); 2945 2946 WriteLiteralTo(__razor_helper_writer, " class=\"fal fa-download\""); 2947 2948 WriteLiteralTo(__razor_helper_writer, "></i>&nbsp;&nbsp;"); 2949 2950 2951 #line 894 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2952 WriteTo(__razor_helper_writer, Translate("Product field: Stregtegning", "Stregtegning")); 2953 2954 2955 #line default 2956 #line hidden 2957 WriteLiteralTo(__razor_helper_writer, "</a>\r\n\t</div>\r\n"); 2958 2959 2960 #line 896 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2961 } 2962 2963 2964 #line default 2965 #line hidden 2966 WriteLiteralTo(__razor_helper_writer, "\t"); 2967 2968 2969 #line 897 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2970 if (File.Exists(energyLabelAbsolutePath)) 2971 { 2972 2973 2974 #line default 2975 #line hidden 2976 WriteLiteralTo(__razor_helper_writer, "\t<div"); 2977 2978 WriteLiteralTo(__razor_helper_writer, " class=\"ernergypdf\""); 2979 2980 WriteLiteralTo(__razor_helper_writer, ">\r\n\t\t<a"); 2981 2982 WriteLiteralTo(__razor_helper_writer, " class=\"btn\""); 2983 2984 WriteAttributeTo(__razor_helper_writer, "href", Tuple.Create(" href=\"", 35761), Tuple.Create("\"", 35787) 2985 2986 #line 900 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 2987 , Tuple.Create(Tuple.Create("", 35768), Tuple.Create<System.Object, System.Int32>(energyLabelPdfFile 2988 2989 #line default 2990 #line hidden 2991 , 35768), false) 2992 ); 2993 2994 WriteLiteralTo(__razor_helper_writer, " download><i"); 2995 2996 WriteLiteralTo(__razor_helper_writer, " class=\"fal fa-download\""); 2997 2998 WriteLiteralTo(__razor_helper_writer, "></i>&nbsp;&nbsp;"); 2999 3000 3001 #line 900 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3002 WriteTo(__razor_helper_writer, Translate("Product field: Energilabel", "Energilabel")); 3003 3004 3005 #line default 3006 #line hidden 3007 WriteLiteralTo(__razor_helper_writer, "</a>\r\n\t</div>\r\n"); 3008 3009 3010 #line 902 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3011 } 3012 3013 3014 #line default 3015 #line hidden 3016 WriteLiteralTo(__razor_helper_writer, "</div>\r\n"); 3017 3018 3019 #line 904 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3020 3021 3022 #line default 3023 #line hidden 3024 }); 3025 3026 #line 904 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3027 } 3028 #line default 3029 #line hidden 3030 3031 3032 #line 908 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3033 public RazorEngine.Templating.TemplateWriter ProductDescription() 3034 { 3035 #line default 3036 #line hidden 3037 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 3038 3039 #line 909 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3040 3041 3042 3043 #line default 3044 #line hidden 3045 WriteLiteralTo(__razor_helper_writer, "<div"); 3046 3047 WriteLiteralTo(__razor_helper_writer, " class=\"product__description dw-mod\""); 3048 3049 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 3050 3051 WriteLiteralTo(__razor_helper_writer, "\t"); 3052 3053 3054 #line 911 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3055 WriteTo(__razor_helper_writer, GetString("Ecom:Product.LongDescription")); 3056 3057 3058 #line default 3059 #line hidden 3060 WriteLiteralTo(__razor_helper_writer, "\r\n</div>\r\n"); 3061 3062 3063 #line 913 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3064 3065 3066 #line default 3067 #line hidden 3068 }); 3069 3070 #line 913 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3071 } 3072 #line default 3073 #line hidden 3074 3075 3076 #line 915 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3077 public RazorEngine.Templating.TemplateWriter VariantsProductList() 3078 { 3079 #line default 3080 #line hidden 3081 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 3082 3083 #line 916 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3084 3085 3086 3087 #line default 3088 #line hidden 3089 WriteLiteralTo(__razor_helper_writer, "<div"); 3090 3091 WriteLiteralTo(__razor_helper_writer, " class=\"js-handlebars-root\""); 3092 3093 WriteLiteralTo(__razor_helper_writer, " id=\"VariantsList\""); 3094 3095 WriteLiteralTo(__razor_helper_writer, " data-template=\"VariantProductsContainer\""); 3096 3097 WriteLiteralTo(__razor_helper_writer, " data-json-feed=\""); 3098 3099 3100 #line 917 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3101 WriteTo(__razor_helper_writer, variantsFeedUrl); 3102 3103 3104 #line default 3105 #line hidden 3106 WriteLiteralTo(__razor_helper_writer, "\""); 3107 3108 WriteLiteralTo(__razor_helper_writer, " data-preloader=\"minimal\""); 3109 3110 WriteLiteralTo(__razor_helper_writer, "></div>\r\n"); 3111 3112 3113 #line 918 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3114 3115 3116 #line default 3117 #line hidden 3118 }); 3119 3120 #line 918 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3121 } 3122 #line default 3123 #line hidden 3124 3125 3126 #line 920 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3127 public RazorEngine.Templating.TemplateWriter ProductDetails(string layoutType) 3128 { 3129 #line default 3130 #line hidden 3131 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 3132 3133 #line 921 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3134 3135 string viewType = productDetails["ProductDetailsDetailFieldsView"] != null ? productDetails["ProductDetailsDetailFieldsView"].ToString() : "grid"; 3136 3137 if (viewType != "table") 3138 { 3139 3140 3141 #line default 3142 #line hidden 3143 WriteLiteralTo(__razor_helper_writer, "<div"); 3144 3145 WriteLiteralTo(__razor_helper_writer, " class=\"grid grid--external-bleed-x u-margin-bottom--lg\""); 3146 3147 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 3148 3149 WriteLiteralTo(__razor_helper_writer, "\t"); 3150 3151 3152 #line 927 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3153 WriteTo(__razor_helper_writer, ProductDetailsFields(GetLoop("CustomFieldValues"), viewType)); 3154 3155 3156 #line default 3157 #line hidden 3158 WriteLiteralTo(__razor_helper_writer, "\r\n</div>\r\n"); 3159 3160 3161 #line 929 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3162 } 3163 else 3164 { 3165 string tableWidth = layoutType != "top" ? "grid__col-md-6" : "grid__col-md-12"; 3166 3167 3168 3169 #line default 3170 #line hidden 3171 WriteLiteralTo(__razor_helper_writer, "<div"); 3172 3173 WriteLiteralTo(__razor_helper_writer, " class=\"grid grid--external-bleed-x u-margin-bottom--lg\""); 3174 3175 WriteLiteralTo(__razor_helper_writer, ">\r\n\t<div"); 3176 3177 WriteAttributeTo(__razor_helper_writer, "class", Tuple.Create(" class=\"", 36828), Tuple.Create("\"", 36879) 3178 3179 #line 935 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3180 , Tuple.Create(Tuple.Create("", 36836), Tuple.Create<System.Object, System.Int32>(tableWidth 3181 3182 #line default 3183 #line hidden 3184 , 36836), false) 3185 , Tuple.Create(Tuple.Create(" ", 36847), Tuple.Create("grid__col-sm-12", 36848), true) 3186 , Tuple.Create(Tuple.Create(" ", 36863), Tuple.Create("grid__col-xs-12", 36864), true) 3187 ); 3188 3189 WriteLiteralTo(__razor_helper_writer, ">\r\n\t\t<table>\r\n"); 3190 3191 WriteLiteralTo(__razor_helper_writer, "\t\t\t"); 3192 3193 3194 #line 937 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3195 WriteTo(__razor_helper_writer, ProductDetailsFields(GetLoop("CustomFieldValues"), viewType)); 3196 3197 3198 #line default 3199 #line hidden 3200 WriteLiteralTo(__razor_helper_writer, "\r\n\t\t</table>\r\n\t</div>\r\n</div>\r\n"); 3201 3202 3203 #line 941 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3204 } 3205 3206 3207 #line default 3208 #line hidden 3209 }); 3210 3211 #line 942 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3212 } 3213 #line default 3214 #line hidden 3215 3216 3217 #line 944 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3218 public RazorEngine.Templating.TemplateWriter ProductDetailsFields(List<LoopItem> fieldsLoop, string viewType) 3219 { 3220 #line default 3221 #line hidden 3222 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 3223 3224 #line 945 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3225 3226 foreach (LoopItem customField in fieldsLoop) 3227 { 3228 string fieldValue = customField.GetString("Product.CustomField.Value.Clean"); 3229 fieldValue = fieldValue == "False" ? Translate("No") : fieldValue; 3230 fieldValue = fieldValue == "True" ? Translate("Yes") : fieldValue; 3231 3232 if (customField.GetLoop("Product.CustomField.Options").Count > 0) 3233 { 3234 fieldValue = customField.GetString("Product.CustomField.Label"); 3235 } 3236 3237 if (!string.IsNullOrEmpty(customField.GetString("Product.CustomField.Name")) && !string.IsNullOrEmpty(fieldValue) && customField.GetString("Product.CustomField.Name") != "Custom sticker") 3238 { 3239 if (string.IsNullOrEmpty(customField.GetString("Document.FullPath"))) 3240 { 3241 3242 3243 #line default 3244 #line hidden 3245 3246 #line 961 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3247 WriteTo(__razor_helper_writer, RenderFieldItem(customField.GetString("Product.CustomField.Name"), fieldValue, viewType)); 3248 3249 3250 #line default 3251 #line hidden 3252 3253 #line 961 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3254 ; 3255 } 3256 } 3257 } 3258 3259 3260 #line default 3261 #line hidden 3262 }); 3263 3264 #line 965 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3265 } 3266 #line default 3267 #line hidden 3268 3269 3270 #line 967 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3271 public RazorEngine.Templating.TemplateWriter ProductCategory(string name, LoopItem categoryGroup, string layoutType) 3272 { 3273 #line default 3274 #line hidden 3275 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 3276 3277 #line 968 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3278 3279 string viewType = productDetails["ProductDetailsCategoryFieldsView"] != null ? productDetails["ProductDetailsCategoryFieldsView"].ToString() : "grid"; 3280 3281 if (viewType != "table") 3282 { 3283 3284 3285 #line default 3286 #line hidden 3287 WriteLiteralTo(__razor_helper_writer, "<div"); 3288 3289 WriteLiteralTo(__razor_helper_writer, " class=\"grid grid--external-bleed-x u-margin-bottom--lg\""); 3290 3291 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 3292 3293 WriteLiteralTo(__razor_helper_writer, "\t"); 3294 3295 3296 #line 974 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3297 WriteTo(__razor_helper_writer, ProductCategoryFields(categoryGroup.GetLoop("ProductCategoryFields"), viewType)); 3298 3299 3300 #line default 3301 #line hidden 3302 WriteLiteralTo(__razor_helper_writer, "\r\n</div>\r\n"); 3303 3304 3305 #line 976 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3306 } 3307 else 3308 { 3309 string tableWidth = layoutType != "top" ? "grid__col-md-6" : "grid__col-md-12"; 3310 3311 3312 3313 #line default 3314 #line hidden 3315 WriteLiteralTo(__razor_helper_writer, "<div"); 3316 3317 WriteLiteralTo(__razor_helper_writer, " class=\"grid grid--external-bleed-x u-margin-bottom--lg\""); 3318 3319 WriteLiteralTo(__razor_helper_writer, ">\r\n\t<div"); 3320 3321 WriteAttributeTo(__razor_helper_writer, "class", Tuple.Create(" class=\"", 38437), Tuple.Create("\"", 38488) 3322 3323 #line 982 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3324 , Tuple.Create(Tuple.Create("", 38445), Tuple.Create<System.Object, System.Int32>(tableWidth 3325 3326 #line default 3327 #line hidden 3328 , 38445), false) 3329 , Tuple.Create(Tuple.Create(" ", 38456), Tuple.Create("grid__col-sm-12", 38457), true) 3330 , Tuple.Create(Tuple.Create(" ", 38472), Tuple.Create("grid__col-xs-12", 38473), true) 3331 ); 3332 3333 WriteLiteralTo(__razor_helper_writer, ">\r\n\t\t<table>\r\n"); 3334 3335 WriteLiteralTo(__razor_helper_writer, "\t\t\t"); 3336 3337 3338 #line 984 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3339 WriteTo(__razor_helper_writer, ProductCategoryFields(categoryGroup.GetLoop("ProductCategoryFields"), viewType)); 3340 3341 3342 #line default 3343 #line hidden 3344 WriteLiteralTo(__razor_helper_writer, "\r\n\t\t</table>\r\n\t</div>\r\n</div>\r\n"); 3345 3346 3347 #line 988 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3348 } 3349 3350 3351 #line default 3352 #line hidden 3353 }); 3354 3355 #line 989 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3356 } 3357 #line default 3358 #line hidden 3359 3360 3361 #line 991 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3362 public RazorEngine.Templating.TemplateWriter ProductCategoryFields(List<LoopItem> fieldsLoop, string viewType) 3363 { 3364 #line default 3365 #line hidden 3366 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 3367 3368 #line 992 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3369 3370 foreach (LoopItem categoryField in fieldsLoop) 3371 { 3372 string fieldValue = categoryField.GetString("Ecom:Product.CategoryField.Value"); 3373 fieldValue = fieldValue == "False" ? Translate("No") : fieldValue; 3374 fieldValue = fieldValue == "True" ? Translate("Yes") : fieldValue; 3375 3376 if (!string.IsNullOrEmpty(categoryField.GetString("Ecom:Product.CategoryField.Label")) && !string.IsNullOrEmpty(fieldValue)) 3377 { 3378 if (categoryField.GetString("Ecom:Product.CategoryField.TypeID") != "9") 3379 { 3380 if (categoryField.GetString("Ecom:Product.CategoryField.TypeID") == "15") 3381 { 3382 3383 3384 #line default 3385 #line hidden 3386 3387 #line 1005 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3388 WriteTo(__razor_helper_writer, RenderFieldItem(categoryField.GetString("Ecom:Product.CategoryField.Label"), categoryField.GetString("Ecom:Product.CategoryField.OptionLabel"), viewType)); 3389 3390 3391 #line default 3392 #line hidden 3393 3394 #line 1005 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3395 ; 3396 } 3397 else if (categoryField.GetString("Ecom:Product.CategoryField.TypeID") == "8") 3398 { 3399 3400 3401 #line default 3402 #line hidden 3403 3404 #line 1009 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3405 WriteTo(__razor_helper_writer, RenderFieldItem(categoryField.GetString("Ecom:Product.CategoryField.Label"), fieldValue, viewType, "link")); 3406 3407 3408 #line default 3409 #line hidden 3410 3411 #line 1009 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3412 ; 3413 } 3414 else 3415 { 3416 3417 3418 #line default 3419 #line hidden 3420 3421 #line 1013 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3422 WriteTo(__razor_helper_writer, RenderFieldItem(categoryField.GetString("Ecom:Product.CategoryField.Label"), fieldValue, viewType)); 3423 3424 3425 #line default 3426 #line hidden 3427 3428 #line 1013 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3429 ; 3430 } 3431 } 3432 } 3433 } 3434 3435 3436 #line default 3437 #line hidden 3438 }); 3439 3440 #line 1018 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3441 } 3442 #line default 3443 #line hidden 3444 3445 3446 #line 1020 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3447 public RazorEngine.Templating.TemplateWriter ProductDownloads(string layoutType) 3448 { 3449 #line default 3450 #line hidden 3451 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 3452 3453 #line 1021 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3454 3455 string viewType = productDetails["ProductDetailsDownloadsView"] != null ? productDetails["ProductDetailsDownloadsView"].ToString() : "grid"; 3456 3457 if (viewType != "table") 3458 { 3459 3460 3461 #line default 3462 #line hidden 3463 WriteLiteralTo(__razor_helper_writer, "<div"); 3464 3465 WriteLiteralTo(__razor_helper_writer, " class=\"grid grid--external-bleed-x u-margin-bottom--lg\""); 3466 3467 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 3468 3469 WriteLiteralTo(__razor_helper_writer, "\t"); 3470 3471 3472 #line 1027 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3473 WriteTo(__razor_helper_writer, ProductDownloadsFields(downloadDocuments, viewType)); 3474 3475 3476 #line default 3477 #line hidden 3478 WriteLiteralTo(__razor_helper_writer, "\r\n</div>\r\n"); 3479 3480 3481 #line 1029 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3482 } 3483 else 3484 { 3485 string tableWidth = layoutType != "top" ? "grid__col-md-6" : "grid__col-md-12"; 3486 3487 3488 3489 #line default 3490 #line hidden 3491 WriteLiteralTo(__razor_helper_writer, "<div"); 3492 3493 WriteLiteralTo(__razor_helper_writer, " class=\"grid grid--external-bleed-x u-margin-bottom--lg\""); 3494 3495 WriteLiteralTo(__razor_helper_writer, ">\r\n\t<div"); 3496 3497 WriteAttributeTo(__razor_helper_writer, "class", Tuple.Create(" class=\"", 40251), Tuple.Create("\"", 40302) 3498 3499 #line 1035 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3500 , Tuple.Create(Tuple.Create("", 40259), Tuple.Create<System.Object, System.Int32>(tableWidth 3501 3502 #line default 3503 #line hidden 3504 , 40259), false) 3505 , Tuple.Create(Tuple.Create(" ", 40270), Tuple.Create("grid__col-sm-12", 40271), true) 3506 , Tuple.Create(Tuple.Create(" ", 40286), Tuple.Create("grid__col-xs-12", 40287), true) 3507 ); 3508 3509 WriteLiteralTo(__razor_helper_writer, ">\r\n\t\t<table>\r\n"); 3510 3511 WriteLiteralTo(__razor_helper_writer, "\t\t\t"); 3512 3513 3514 #line 1037 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3515 WriteTo(__razor_helper_writer, ProductDownloadsFields(downloadDocuments, viewType)); 3516 3517 3518 #line default 3519 #line hidden 3520 WriteLiteralTo(__razor_helper_writer, "\r\n\t\t</table>\r\n\t</div>\r\n</div>\r\n"); 3521 3522 3523 #line 1041 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3524 } 3525 3526 3527 #line default 3528 #line hidden 3529 }); 3530 3531 #line 1042 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3532 } 3533 #line default 3534 #line hidden 3535 3536 3537 #line 1044 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3538 public RazorEngine.Templating.TemplateWriter ProductDownloadsFields(List<LoopItem> fieldsLoop, string viewType) 3539 { 3540 #line default 3541 #line hidden 3542 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 3543 3544 #line 1045 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3545 3546 foreach (LoopItem document in fieldsLoop) 3547 { 3548 string fieldValue; 3549 if (!string.IsNullOrEmpty(document.GetString("Document.FullPath"))) 3550 { 3551 fieldValue = document.GetString("Product.CustomField.Value.Clean"); 3552 3553 3554 #line default 3555 #line hidden 3556 3557 #line 1052 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3558 WriteTo(__razor_helper_writer, RenderFieldItem(fieldValue, document.GetString("Document.FullPath"), viewType, "download")); 3559 3560 3561 #line default 3562 #line hidden 3563 3564 #line 1052 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3565 3566 } 3567 3568 if (document.GetString("Ecom:Product.CategoryField.TypeID") == "9") 3569 { 3570 fieldValue = document.GetString("Ecom:Product.CategoryField.Value"); 3571 3572 3573 #line default 3574 #line hidden 3575 3576 #line 1058 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3577 WriteTo(__razor_helper_writer, RenderFieldItem(fieldValue, fieldValue, viewType, "download")); 3578 3579 3580 #line default 3581 #line hidden 3582 3583 #line 1058 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3584 3585 } 3586 } 3587 3588 3589 #line default 3590 #line hidden 3591 }); 3592 3593 #line 1061 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3594 } 3595 #line default 3596 #line hidden 3597 3598 3599 #line 1063 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3600 public RazorEngine.Templating.TemplateWriter RenderFieldItem(string name, string value, string viewType, string fieldType = "clean") 3601 { 3602 #line default 3603 #line hidden 3604 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 3605 3606 #line 1064 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3607 3608 if (viewType != "table") 3609 { 3610 string fieldColumns = viewType == "list" ? "12" : "4"; 3611 3612 3613 #line default 3614 #line hidden 3615 WriteLiteralTo(__razor_helper_writer, "<div"); 3616 3617 WriteAttributeTo(__razor_helper_writer, "class", Tuple.Create(" class=\"", 41201), Tuple.Create("\"", 41251) 3618 , Tuple.Create(Tuple.Create("", 41209), Tuple.Create("grid__col-md-", 41209), true) 3619 3620 #line 1068 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3621 , Tuple.Create(Tuple.Create("", 41222), Tuple.Create<System.Object, System.Int32>(fieldColumns 3622 3623 #line default 3624 #line hidden 3625 , 41222), false) 3626 , Tuple.Create(Tuple.Create(" ", 41235), Tuple.Create("u-margin-bottom", 41236), true) 3627 ); 3628 3629 WriteLiteralTo(__razor_helper_writer, ">\r\n\t<div"); 3630 3631 WriteLiteralTo(__razor_helper_writer, " class=\"u-bold\""); 3632 3633 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 3634 3635 WriteLiteralTo(__razor_helper_writer, "\t\t"); 3636 3637 3638 #line 1070 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3639 WriteTo(__razor_helper_writer, name); 3640 3641 3642 #line default 3643 #line hidden 3644 WriteLiteralTo(__razor_helper_writer, "\r\n\t</div>\r\n\t<div>\r\n"); 3645 3646 WriteLiteralTo(__razor_helper_writer, "\t\t"); 3647 3648 3649 #line 1073 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3650 WriteTo(__razor_helper_writer, RenderFieldItemContent(name, value, fieldType)); 3651 3652 3653 #line default 3654 #line hidden 3655 WriteLiteralTo(__razor_helper_writer, "\r\n\t</div>\r\n</div>\r\n"); 3656 3657 3658 #line 1076 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3659 } 3660 else 3661 { 3662 3663 3664 #line default 3665 #line hidden 3666 WriteLiteralTo(__razor_helper_writer, "<tr>\r\n\t<td"); 3667 3668 WriteLiteralTo(__razor_helper_writer, " class=\"u-bold\""); 3669 3670 WriteLiteralTo(__razor_helper_writer, ">"); 3671 3672 3673 #line 1080 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3674 WriteTo(__razor_helper_writer, name); 3675 3676 3677 #line default 3678 #line hidden 3679 WriteLiteralTo(__razor_helper_writer, "</td>\r\n\t<td>\r\n"); 3680 3681 WriteLiteralTo(__razor_helper_writer, "\t\t"); 3682 3683 3684 #line 1082 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3685 WriteTo(__razor_helper_writer, RenderFieldItemContent(name, value, fieldType)); 3686 3687 3688 #line default 3689 #line hidden 3690 WriteLiteralTo(__razor_helper_writer, "\r\n\t</td>\r\n</tr>\r\n"); 3691 3692 3693 #line 1085 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3694 } 3695 3696 3697 #line default 3698 #line hidden 3699 }); 3700 3701 #line 1086 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3702 } 3703 #line default 3704 #line hidden 3705 3706 3707 #line 1088 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3708 public RazorEngine.Templating.TemplateWriter RenderFieldItemContent(string name, string value, string fieldType = "clean") 3709 { 3710 #line default 3711 #line hidden 3712 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 3713 3714 #line 1089 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3715 3716 if (fieldType == "link") 3717 { 3718 3719 3720 #line default 3721 #line hidden 3722 WriteLiteralTo(__razor_helper_writer, "<a"); 3723 3724 WriteLiteralTo(__razor_helper_writer, " target=\"_blank\""); 3725 3726 WriteAttributeTo(__razor_helper_writer, "href", Tuple.Create(" href=\"", 41640), Tuple.Create("\"", 41653) 3727 3728 #line 1092 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3729 , Tuple.Create(Tuple.Create("", 41647), Tuple.Create<System.Object, System.Int32>(value 3730 3731 #line default 3732 #line hidden 3733 , 41647), false) 3734 ); 3735 3736 WriteLiteralTo(__razor_helper_writer, ">"); 3737 3738 3739 #line 1092 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3740 WriteTo(__razor_helper_writer, value); 3741 3742 3743 #line default 3744 #line hidden 3745 WriteLiteralTo(__razor_helper_writer, "</a>\r\n"); 3746 3747 3748 #line 1093 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3749 } 3750 else if (fieldType == "download") 3751 { 3752 FileInfo info = new FileInfo(Dynamicweb.Core.SystemInformation.MapPath(value)); 3753 3754 if (info.Exists) 3755 { 3756 3757 3758 #line default 3759 #line hidden 3760 WriteLiteralTo(__razor_helper_writer, "<a"); 3761 3762 WriteAttributeTo(__razor_helper_writer, "href", Tuple.Create(" href=\"", 41814), Tuple.Create("\"", 41826) 3763 3764 #line 1100 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3765 , Tuple.Create(Tuple.Create("", 41821), Tuple.Create<System.Object, System.Int32>(name 3766 3767 #line default 3768 #line hidden 3769 , 41821), false) 3770 ); 3771 3772 WriteLiteralTo(__razor_helper_writer, " download"); 3773 3774 WriteAttributeTo(__razor_helper_writer, "title", Tuple.Create(" title=\"", 41836), Tuple.Create("\"", 41866) 3775 3776 #line 1100 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3777 , Tuple.Create(Tuple.Create("", 41844), Tuple.Create<System.Object, System.Int32>(Translate("Download") 3778 3779 #line default 3780 #line hidden 3781 , 41844), false) 3782 ); 3783 3784 WriteLiteralTo(__razor_helper_writer, " class=\"product__document dw-mod\""); 3785 3786 WriteLiteralTo(__razor_helper_writer, ">"); 3787 3788 3789 #line 1100 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3790 WriteTo(__razor_helper_writer, getIconForFile(value)); 3791 3792 3793 #line default 3794 #line hidden 3795 WriteLiteralTo(__razor_helper_writer, "</a>\r\n"); 3796 3797 WriteLiteralTo(__razor_helper_writer, "<div"); 3798 3799 WriteLiteralTo(__razor_helper_writer, " class=\"product__document-info dw-mod\""); 3800 3801 WriteLiteralTo(__razor_helper_writer, ">\r\n\t<a"); 3802 3803 WriteAttributeTo(__razor_helper_writer, "href", Tuple.Create(" href=\"", 41977), Tuple.Create("\"", 41989) 3804 3805 #line 1102 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3806 , Tuple.Create(Tuple.Create("", 41984), Tuple.Create<System.Object, System.Int32>(name 3807 3808 #line default 3809 #line hidden 3810 , 41984), false) 3811 ); 3812 3813 WriteLiteralTo(__razor_helper_writer, " download"); 3814 3815 WriteAttributeTo(__razor_helper_writer, "title", Tuple.Create(" title=\"", 41999), Tuple.Create("\"", 42029) 3816 3817 #line 1102 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3818 , Tuple.Create(Tuple.Create("", 42007), Tuple.Create<System.Object, System.Int32>(Translate("Download") 3819 3820 #line default 3821 #line hidden 3822 , 42007), false) 3823 ); 3824 3825 WriteLiteralTo(__razor_helper_writer, " class=\"product__document dw-mod\""); 3826 3827 WriteLiteralTo(__razor_helper_writer, ">"); 3828 3829 3830 #line 1102 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3831 WriteTo(__razor_helper_writer, Path.GetFileName(value)); 3832 3833 3834 #line default 3835 #line hidden 3836 WriteLiteralTo(__razor_helper_writer, "</a>\r\n\t<small"); 3837 3838 WriteLiteralTo(__razor_helper_writer, " class=\"u-block u-margin-top\""); 3839 3840 WriteLiteralTo(__razor_helper_writer, ">"); 3841 3842 3843 #line 1103 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3844 WriteTo(__razor_helper_writer, ConvertBytes(info.Length)); 3845 3846 3847 #line default 3848 #line hidden 3849 WriteLiteralTo(__razor_helper_writer, "</small>\r\n</div>\r\n"); 3850 3851 3852 #line 1105 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3853 } 3854 } 3855 else 3856 { 3857 3858 3859 #line default 3860 #line hidden 3861 3862 #line 1109 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3863 WriteTo(__razor_helper_writer, value); 3864 3865 3866 #line default 3867 #line hidden 3868 3869 #line 1109 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3870 3871 } 3872 3873 3874 #line default 3875 #line hidden 3876 }); 3877 3878 #line 1111 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3879 } 3880 #line default 3881 #line hidden 3882 3883 3884 #line 1113 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3885 public RazorEngine.Templating.TemplateWriter RelatedProducts(string name, string groupId, string relatedFeedUrl) 3886 { 3887 #line default 3888 #line hidden 3889 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 3890 3891 #line 1114 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3892 3893 3894 3895 #line default 3896 #line hidden 3897 WriteLiteralTo(__razor_helper_writer, "<div"); 3898 3899 WriteLiteralTo(__razor_helper_writer, " class=\"js-handlebars-root\""); 3900 3901 WriteAttributeTo(__razor_helper_writer, "id", Tuple.Create(" id=\"", 42317), Tuple.Create("\"", 42342) 3902 , Tuple.Create(Tuple.Create("", 42322), Tuple.Create("ProductList_", 42322), true) 3903 3904 #line 1115 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3905 , Tuple.Create(Tuple.Create("", 42334), Tuple.Create<System.Object, System.Int32>(groupId 3906 3907 #line default 3908 #line hidden 3909 , 42334), false) 3910 ); 3911 3912 WriteLiteralTo(__razor_helper_writer, " data-template=\"ProductContainer\""); 3913 3914 WriteLiteralTo(__razor_helper_writer, " data-pre-render-template=\"ProductPreRenderContainer\""); 3915 3916 WriteLiteralTo(__razor_helper_writer, " data-json-feed=\""); 3917 3918 3919 #line 1115 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3920 WriteTo(__razor_helper_writer, relatedFeedUrl); 3921 3922 3923 #line default 3924 #line hidden 3925 WriteLiteralTo(__razor_helper_writer, "\""); 3926 3927 WriteLiteralTo(__razor_helper_writer, " data-preloader=\"minimal\""); 3928 3929 WriteLiteralTo(__razor_helper_writer, "></div>\r\n"); 3930 3931 3932 #line 1116 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3933 3934 3935 #line default 3936 #line hidden 3937 }); 3938 3939 #line 1116 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3940 } 3941 #line default 3942 #line hidden 3943 3944 3945 #line 1118 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3946 public RazorEngine.Templating.TemplateWriter RelatedProductsMini(string name, string groupId, string relatedFeedUrl) 3947 { 3948 #line default 3949 #line hidden 3950 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 3951 3952 #line 1119 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3953 3954 3955 3956 #line default 3957 #line hidden 3958 WriteLiteralTo(__razor_helper_writer, "<div"); 3959 3960 WriteLiteralTo(__razor_helper_writer, " class=\"js-handlebars-root\""); 3961 3962 WriteAttributeTo(__razor_helper_writer, "id", Tuple.Create(" id=\"", 42616), Tuple.Create("\"", 42641) 3963 , Tuple.Create(Tuple.Create("", 42621), Tuple.Create("ProductList_", 42621), true) 3964 3965 #line 1120 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3966 , Tuple.Create(Tuple.Create("", 42633), Tuple.Create<System.Object, System.Int32>(groupId 3967 3968 #line default 3969 #line hidden 3970 , 42633), false) 3971 ); 3972 3973 WriteLiteralTo(__razor_helper_writer, " data-template=\"ProductContainerMini\""); 3974 3975 WriteLiteralTo(__razor_helper_writer, " data-pre-render-template=\"ProductPreRenderContainer\""); 3976 3977 WriteLiteralTo(__razor_helper_writer, " data-json-feed=\""); 3978 3979 3980 #line 1120 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3981 WriteTo(__razor_helper_writer, relatedFeedUrl); 3982 3983 3984 #line default 3985 #line hidden 3986 WriteLiteralTo(__razor_helper_writer, "\""); 3987 3988 WriteLiteralTo(__razor_helper_writer, " data-preloader=\"minimal\""); 3989 3990 WriteLiteralTo(__razor_helper_writer, "></div>\r\n"); 3991 3992 3993 #line 1121 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 3994 3995 3996 #line default 3997 #line hidden 3998 }); 3999 4000 #line 1121 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 4001 } 4002 #line default 4003 #line hidden 4004 4005 4006 #line 1479 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 4007 4008 4009 string addAfterFix(string value, string afterfix) 4010 { 4011 return value.TrimEnd() + " " + afterfix; 4012 } 4013 4014 bool stringIsNotNullEmptyOrZero(string value) 4015 { 4016 return !String.IsNullOrEmpty(value) && value != "0"; 4017 } 4018 4019 string getIconForFile(string fileName) 4020 { 4021 string ext = Path.GetExtension(fileName); 4022 string icon = ""; 4023 switch (ext.ToLower()) 4024 { 4025 case ".xls": 4026 case ".xlsx": 4027 icon = "fa-file-excel"; 4028 break; 4029 case ".ppt": 4030 case ".pptx": 4031 icon = "fa-file-powerpoint"; 4032 break; 4033 case ".doc": 4034 case ".docx": 4035 icon = "fa-file-word"; 4036 break; 4037 case ".jpg": 4038 case ".jpeg": 4039 case ".png": 4040 case ".gif": 4041 case ".pdf": 4042 return "<img class='product__document-img' alt='" + fileName + "' src='/Admin/Public/GetImage.ashx?crop=5&height=70&width=120&Compression=75&DoNotUpscale=true&image=" + fileName + "' />"; 4043 default: 4044 icon = "fa-file"; 4045 break; 4046 } 4047 return "<i class='product__document-icon far " + icon + "'></i> "; 4048 } 4049 4050 public static string ToPascalCase(string str) 4051 { 4052 return CultureInfo.InvariantCulture.TextInfo 4053 .ToTitleCase(str.ToLowerInvariant()) 4054 .Replace("-", "") 4055 .Replace("_", "") 4056 .Replace(" ", ""); 4057 } 4058 4059 #line default 4060 #line hidden 4061 4062 4063 public RazorEngine_ab8c34352259469399836ac9a29c992b() { 4064 } 4065 4066 public override void Execute() { 4067 WriteLiteral("\r\n"); 4068 4069 WriteLiteral("\r\n"); 4070 4071 4072 #line 64 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 4073 4074 onlyPreview = Converter.ToBoolean(Pageview.Area.Item["OnlyPreviewForAnonymous"]) && Pageview.User == null; 4075 productId = GetString("Ecom:Product.ID"); 4076 string uniqueId = GetString("Ecom:Product.ID") + GetString("Ecom:Product.VariantID"); 4077 requestQuery = GetGlobalValue("Global:Request.Query") + "&MainProductID=" + "&feed=true"; 4078 string productCatalogId = GetGlobalValue("Global:Page.ID"); 4079 4080 int featuresCount = 0; 4081 string brand = GetString("Ecom:Product:Field.brand"); 4082 4083 foreach (LoopItem customField in GetLoop("CustomFieldValues")) 4084 { 4085 if (!string.IsNullOrEmpty(customField.GetString("Product.CustomField.Name")) && !string.IsNullOrEmpty(customField.GetString("Product.CustomField.Value.Clean")) && customField.GetString("Product.CustomField.Name") != "Custom sticker") 4086 { 4087 if (!string.IsNullOrEmpty(customField.GetString("Document.FullPath"))) 4088 { 4089 downloadDocuments.Add(customField); 4090 } 4091 } 4092 4093 if (!String.IsNullOrEmpty(customField.GetString("Product.CustomField.Value.Clean")) && customField.GetString("Product.CustomField.Name") != "CustomSticker") 4094 { 4095 featuresCount++; 4096 } 4097 } 4098 4099 foreach (LoopItem customField in GetLoop("ProductCategories")) 4100 { 4101 foreach (LoopItem field in customField.GetLoop("ProductCategoryFields")) 4102 { 4103 if (!string.IsNullOrEmpty(field.GetString("Ecom:Product.CategoryField.Label")) && !string.IsNullOrEmpty(field.GetString("Ecom:Product.CategoryField.Value"))) 4104 { 4105 if (field.GetString("Ecom:Product.CategoryField.TypeID") == "9") 4106 { 4107 downloadDocuments.Add(field); 4108 } 4109 } 4110 4111 if (!String.IsNullOrEmpty(field.GetString("Ecom:Product.CategoryField.Value"))) 4112 { 4113 featuresCount++; 4114 } 4115 } 4116 } 4117 4118 int relatedProductsPageSize = 4; 4119 int relatedProductsColumnWidth = 3; 4120 4121 if (Pageview.Device.ToString() == "Mobile") 4122 { 4123 relatedProductsPageSize = 1; 4124 relatedProductsColumnWidth = 12; 4125 } 4126 4127 if (Pageview.Device.ToString() == "Tablet") 4128 { 4129 relatedProductsPageSize = 3; 4130 relatedProductsColumnWidth = 4; 4131 } 4132 4133 icons = Dynamicweb.Content.Items.Item.GetItemById("Icons", Pageview.Area.Item["Icons"].ToString()); 4134 cartIcon = icons["CartIcon"] != null ? icons["CartIcon"].ToString() : "fas fa-shopping-cart"; 4135 4136 pageId = GetGlobalValue("Global:Page.ID").ToString(); 4137 productVariantId = HttpContext.Current.Request.QueryString.Get("variantId") != null ? HttpContext.Current.Request.QueryString.Get("variantId") : ""; 4138 string feedId = pageId + "&ProductID=" + productId + "&VariantID=" + productVariantId + "&Feed=True&redirect=false"; 4139 string feedPageUrl = "/Default.aspx?ID=" + GetPageIdByNavigationTag("ProductsPage"); 4140 feedFullUrl = feedPageUrl + "&PageSize=" + relatedProductsPageSize + "&ProdID=" + productId + "&feed=true"; 4141 string variantsListPageSize = HttpContext.Current.Request.QueryString.Get("PageSize") != null ? HttpContext.Current.Request.QueryString.Get("PageSize") : "30"; 4142 variantsFeedUrl = feedPageUrl + "&PageSize=" + variantsListPageSize + "&MainProductID=" + productId + "&OnlyShowVariants=true&feed=true"; 4143 string productContainerId = "Product" + productId; 4144 4145 string siteURL = Dynamicweb.Context.Current.Request.Url.Scheme + "://" + Dynamicweb.Context.Current.Request.Url.Host; 4146 4147 productDetails = Dynamicweb.Content.Items.Item.GetItemById("ProductDetails", Pageview.Area.Item["ProductDetails"].ToString()); 4148 renderVariantsAsProducts = productDetails["ProductDetailsRenderVariantsAsProductList"] != null && GetInteger("Ecom:Product.VariantCount") > 1 ? Converter.ToBoolean(productDetails["ProductDetailsRenderVariantsAsProductList"]) : false; 4149 string imageSectionPosition = productDetails["ProductDetailsImageSectionPosition"] != null ? productDetails["ProductDetailsImageSectionPosition"].ToString() : "right-right"; 4150 string fullDesctiptionLayout = productDetails["ProductDetailsFullDescriptionLayout"] != null ? productDetails["ProductDetailsFullDescriptionLayout"].ToString() : "section"; 4151 string detailFieldsLayout = productDetails["ProductDetailsDetailFieldsLayout"] != null ? productDetails["ProductDetailsDetailFieldsLayout"].ToString() : "section"; 4152 string categoryFieldsLayout = productDetails["ProductDetailsCategoryFieldsLayout"] != null ? productDetails["ProductDetailsCategoryFieldsLayout"].ToString() : "section"; 4153 string downloadsFieldsLayout = productDetails["ProductDetailsDownloadsLayout"] != null ? productDetails["ProductDetailsDownloadsLayout"].ToString() : "section"; 4154 string relatedProductsLayout = productDetails["ProductDetailsRelatedProductsLayout"] != null ? productDetails["ProductDetailsRelatedProductsLayout"].ToString() : "section"; 4155 string variantsListLayout = productDetails["ProductDetailsVariantsListLayout"] != null ? productDetails["ProductDetailsVariantsListLayout"].ToString() : "section"; 4156 4157 if (!string.IsNullOrEmpty(GetString("Ecom:Product.LongDescription")) && fullDesctiptionLayout != "hide") 4158 { 4159 ProductSection descriptionSectionObject = new ProductSection(); 4160 descriptionSectionObject.name = Translate("Description"); 4161 descriptionSectionObject.id = "Description"; 4162 descriptionSectionObject.helper = @ProductDescription(); 4163 productSectionsList.Add(descriptionSectionObject); 4164 } 4165 4166 4167 #line default 4168 #line hidden 4169 WriteLiteral("\r\n"); 4170 4171 4172 #line 157 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 4173 if (renderVariantsAsProducts && variantsListLayout != "hide") 4174 { 4175 ProductSection variantSectionObject = new ProductSection(); 4176 variantSectionObject.name = Translate("Variants"); 4177 variantSectionObject.id = "Variants"; 4178 variantSectionObject.helper = @VariantsProductList(); 4179 variantSectionObject.layoutType = variantsListLayout; 4180 productSectionsList.Add(variantSectionObject); 4181 } 4182 4183 4184 #line default 4185 #line hidden 4186 4187 #line 166 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 4188 if (GetLoop("CustomFieldValues").Count > 0 && detailFieldsLayout != "hide") 4189 { 4190 ProductSection detailsSectionObject = new ProductSection(); 4191 detailsSectionObject.name = Translate("Product information"); 4192 detailsSectionObject.id = "ProductInformation"; 4193 detailsSectionObject.helper = @ProductDetails(detailFieldsLayout); 4194 detailsSectionObject.layoutType = detailFieldsLayout; 4195 productSectionsList.Add(detailsSectionObject); 4196 } 4197 4198 4199 #line default 4200 #line hidden 4201 4202 #line 175 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 4203 if (categoryFieldsLayout != "hide") 4204 { 4205 foreach (LoopItem categoryGroup in GetLoop("ProductCategories")) 4206 { 4207 bool hasFields = categoryGroup.GetLoop("ProductCategoryFields").FirstOrDefault(cf => !string.IsNullOrEmpty(cf.GetString("Ecom:Product.CategoryField.Value"))) != null; 4208 if (hasFields) 4209 { 4210 ProductSection categoryFieldsSectionObject = new ProductSection(); 4211 categoryFieldsSectionObject.name = categoryGroup.GetString("Ecom:Product.Category.Name"); 4212 categoryFieldsSectionObject.id = ToPascalCase(categoryGroup.GetString("Ecom:Product.Category.Name")); 4213 categoryFieldsSectionObject.helper = @ProductCategory(categoryGroup.GetString("Ecom:Product.Category.Name"), categoryGroup, categoryFieldsLayout); 4214 categoryFieldsSectionObject.layoutType = categoryFieldsLayout; 4215 productSectionsList.Add(categoryFieldsSectionObject); 4216 } 4217 } 4218 } 4219 4220 4221 #line default 4222 #line hidden 4223 4224 #line 191 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 4225 if (downloadDocuments.Count > 0 && downloadsFieldsLayout != "hide") 4226 { 4227 ProductSection downloadsSectionObject = new ProductSection(); 4228 downloadsSectionObject.name = Translate("Downloads"); 4229 downloadsSectionObject.id = "Downloads"; 4230 downloadsSectionObject.helper = @ProductDownloads(downloadsFieldsLayout); 4231 downloadsSectionObject.layoutType = downloadsFieldsLayout; 4232 productSectionsList.Add(downloadsSectionObject); 4233 } 4234 4235 4236 #line default 4237 #line hidden 4238 4239 #line 200 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 4240 if (relatedProductsLayout != "hide") 4241 { 4242 foreach (LoopItem relatedGroup in GetLoop("ProductRelatedGroups")) 4243 { 4244 string relatedGroupId = ToPascalCase(relatedGroup.GetString("Ecom:Product:RelatedGroup.Name")); 4245 string relatedFeed = feedFullUrl + "&" + relatedGroupId + "=" + productId + "&GroupName=" + relatedGroupId; 4246 4247 ProductSection relatedSectionObject = new ProductSection(); 4248 relatedSectionObject.name = relatedGroup.GetString("Ecom:Product:RelatedGroup.Name"); 4249 relatedSectionObject.id = relatedGroupId; 4250 if (relatedProductsLayout != "top") 4251 { 4252 relatedSectionObject.helper = @RelatedProducts(relatedSectionObject.name, relatedGroupId, relatedFeed); 4253 } 4254 else 4255 { 4256 relatedSectionObject.helper = @RelatedProductsMini(relatedSectionObject.name, relatedGroupId, relatedFeed); 4257 } 4258 relatedSectionObject.layoutType = relatedProductsLayout; 4259 productSectionsList.Add(relatedSectionObject); 4260 } 4261 } 4262 4263 4264 #line default 4265 #line hidden 4266 WriteLiteral("\r\n<!-- Trigger for the gallery modal -->\r\n<input"); 4267 4268 WriteLiteral(" type=\"checkbox\""); 4269 4270 WriteLiteral(" id=\"GalleryModalTrigger\""); 4271 4272 WriteLiteral(" class=\"modal-trigger\""); 4273 4274 WriteLiteral(" />\r\n\r\n"); 4275 4276 4277 #line 226 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 4278 if (!String.IsNullOrEmpty(GetString("Ecom:Product.ImageLarge.Default.Clean"))) 4279 { 4280 4281 4282 #line default 4283 #line hidden 4284 WriteLiteral("<!-- Gallery modal -->\r\n"); 4285 4286 WriteLiteral("<div"); 4287 4288 WriteLiteral(" class=\"modal-container\""); 4289 4290 WriteLiteral(">\r\n\t<label"); 4291 4292 WriteLiteral(" for=\"GalleryModalTrigger\""); 4293 4294 WriteLiteral(" id=\"GalleryModalOverlay\""); 4295 4296 WriteLiteral(" class=\"modal-overlay\""); 4297 4298 WriteLiteral("></label>\r\n\t<div"); 4299 4300 WriteLiteral(" class=\"modal modal--full\""); 4301 4302 WriteLiteral(" id=\"GalleryModal\""); 4303 4304 WriteLiteral(">\r\n\t\t<div"); 4305 4306 WriteLiteral(" class=\"modal__body modal__body--full\""); 4307 4308 WriteLiteral(">\r\n\t\t\t<div"); 4309 4310 WriteLiteral(" class=\"gallery-slider\""); 4311 4312 WriteLiteral(">\r\n\t\t\t\t<div"); 4313 4314 WriteLiteral(" class=\"gallery-slider__image\""); 4315 4316 WriteLiteral(">\r\n\t\t\t\t\t<img"); 4317 4318 WriteLiteral(" id=\"FullImage\""); 4319 4320 WriteAttribute("src", Tuple.Create(" src=\"", 10349), Tuple.Create("\"", 10418) 4321 4322 #line 235 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 4323 , Tuple.Create(Tuple.Create("", 10355), Tuple.Create<System.Object, System.Int32>(imagePrefix 4324 4325 #line default 4326 #line hidden 4327 , 10355), false) 4328 4329 #line 235 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 4330 , Tuple.Create(Tuple.Create("", 10367), Tuple.Create<System.Object, System.Int32>(GetString("Ecom:Product.ImageLarge.Default.Clean") 4331 4332 #line default 4333 #line hidden 4334 , 10367), false) 4335 ); 4336 4337 WriteLiteral(" class=\"modal--full__img js-gallery-image\""); 4338 4339 WriteAttribute("alt", Tuple.Create(" alt=\"", 10461), Tuple.Create("\"", 10498) 4340 4341 #line 235 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 4342 , Tuple.Create(Tuple.Create("", 10467), Tuple.Create<System.Object, System.Int32>(GetString("Ecom:Product.Name") 4343 4344 #line default 4345 #line hidden 4346 , 10467), false) 4347 ); 4348 4349 WriteLiteral(" />\r\n\t\t\t\t</div>\r\n\t\t\t\t<div"); 4350 4351 WriteLiteral(" class=\"gallery-slider__image-counter\""); 4352 4353 WriteLiteral(" id=\"FullImage_counter\""); 4354 4355 WriteLiteral("></div>\r\n\t\t\t\t<label"); 4356 4357 WriteLiteral(" class=\"gallery-slider__close-btn\""); 4358 4359 WriteLiteral(" for=\"GalleryModalTrigger\""); 4360 4361 WriteLiteral("></label>\r\n\t\t\t\t<button"); 4362 4363 WriteLiteral(" class=\"gallery-slider__previous-btn\""); 4364 4365 WriteLiteral(" id=\"FullImage_prev\""); 4366 4367 WriteLiteral(" onclick=\"Gallery.prevImage(\'FullImage\')\""); 4368 4369 WriteLiteral("></button>\r\n\t\t\t\t<button"); 4370 4371 WriteLiteral(" class=\"gallery-slider__next-btn\""); 4372 4373 WriteLiteral(" id=\"FullImage_next\""); 4374 4375 WriteLiteral(" onclick=\"Gallery.nextImage(\'FullImage\')\""); 4376 4377 WriteLiteral("></button>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n</div>\r\n"); 4378 4379 4380 #line 245 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 4381 } 4382 4383 4384 #line default 4385 #line hidden 4386 WriteLiteral("\r\n<div"); 4387 4388 WriteLiteral(" class=\"grid product grid--external-bleed-x u-padding-bottom--lg js-product\""); 4389 4390 WriteLiteral(" id=\"productGrid\""); 4391 4392 WriteLiteral(">\r\n"); 4393 4394 4395 #line 248 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 4396 4397 4398 #line default 4399 #line hidden 4400 4401 #line 248 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 4402 if (imageSectionPosition == "left-left" || imageSectionPosition == "left-right") 4403 { 4404 4405 4406 #line default 4407 #line hidden 4408 4409 #line 250 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 4410 4411 4412 4413 #line default 4414 #line hidden 4415 4416 #line 251 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 4417 Write(ImageSection()); 4418 4419 4420 #line default 4421 #line hidden 4422 4423 #line 251 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 4424 4425 4426 4427 4428 #line default 4429 #line hidden 4430 4431 #line 253 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 4432 4433 4434 4435 #line default 4436 #line hidden 4437 4438 #line 254 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 4439 Write(MainProductInformation()); 4440 4441 4442 #line default 4443 #line hidden 4444 4445 #line 254 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 4446 4447 } 4448 else 4449 { 4450 4451 4452 #line default 4453 #line hidden 4454 4455 #line 258 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 4456 4457 4458 4459 #line default 4460 #line hidden 4461 4462 #line 259 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 4463 Write(MainProductInformation()); 4464 4465 4466 #line default 4467 #line hidden 4468 4469 #line 259 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 4470 4471 4472 4473 4474 #line default 4475 #line hidden 4476 4477 #line 261 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 4478 4479 4480 4481 #line default 4482 #line hidden 4483 4484 #line 262 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 4485 Write(ImageSection()); 4486 4487 4488 #line default 4489 #line hidden 4490 4491 #line 262 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 4492 4493 } 4494 4495 4496 #line default 4497 #line hidden 4498 WriteLiteral("</div>\r\n\r\n<div"); 4499 4500 WriteLiteral(" class=\"product__info tabs\""); 4501 4502 WriteLiteral(">\r\n"); 4503 4504 4505 #line 267 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 4506 4507 4508 #line default 4509 #line hidden 4510 4511 #line 267 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 4512 4513 bool firstTab = true; 4514 foreach (ProductSection item in productSectionsList) 4515 { 4516 if (item.layoutType == "tab") 4517 { 4518 string isChecked = firstTab ? "checked" : ""; 4519 firstTab = false; 4520 4521 4522 #line default 4523 #line hidden 4524 WriteLiteral("\t<input"); 4525 4526 WriteLiteral(" type=\"radio\""); 4527 4528 WriteLiteral(" class=\"tabs__trigger\""); 4529 4530 WriteLiteral(" name=\"productTabs\""); 4531 4532 WriteAttribute("id", Tuple.Create(" id=\"", 11712), Tuple.Create("\"", 11725) 4533 4534 #line 275 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 4535 , Tuple.Create(Tuple.Create("", 11717), Tuple.Create<System.Object, System.Int32>(item.id 4536 4537 #line default 4538 #line hidden 4539 , 11717), false) 4540 ); 4541 4542 WriteLiteral(" onchange=\"bLazy.revalidate()\""); 4543 4544 WriteLiteral(" "); 4545 4546 4547 #line 275 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 4548 Write(isChecked); 4549 4550 4551 #line default 4552 #line hidden 4553 WriteLiteral(" />\r\n"); 4554 4555 4556 #line 276 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 4557 } 4558 } 4559 4560 4561 #line default 4562 #line hidden 4563 WriteLiteral("\r\n\r\n\t<div"); 4564 4565 WriteLiteral(" class=\"tabs__list dw-mod\""); 4566 4567 WriteLiteral(">\r\n"); 4568 4569 4570 #line 281 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 4571 4572 4573 #line default 4574 #line hidden 4575 4576 #line 281 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 4577 foreach (ProductSection item in productSectionsList) 4578 { 4579 if (item.layoutType == "tab") 4580 { 4581 4582 4583 #line default 4584 #line hidden 4585 WriteLiteral("\t\t<label"); 4586 4587 WriteAttribute("for", Tuple.Create(" for=\"", 11928), Tuple.Create("\"", 11942) 4588 4589 #line 285 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 4590 , Tuple.Create(Tuple.Create("", 11934), Tuple.Create<System.Object, System.Int32>(item.id 4591 4592 #line default 4593 #line hidden 4594 , 11934), false) 4595 ); 4596 4597 WriteLiteral(" class=\"tabs__label dw-mod\""); 4598 4599 WriteLiteral(">"); 4600 4601 4602 #line 285 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 4603 Write(item.name); 4604 4605 4606 #line default 4607 #line hidden 4608 WriteLiteral("</label>\r\n"); 4609 4610 4611 #line 286 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 4612 } 4613 } 4614 4615 4616 #line default 4617 #line hidden 4618 WriteLiteral("\t</div>\r\n\r\n\t<div"); 4619 4620 WriteLiteral(" class=\"tabs__blocks dw-mod\""); 4621 4622 WriteLiteral(">\r\n"); 4623 4624 4625 #line 291 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 4626 4627 4628 #line default 4629 #line hidden 4630 4631 #line 291 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 4632 4633 foreach (ProductSection item in productSectionsList) 4634 { 4635 if (item.layoutType == "tab") 4636 { 4637 4638 4639 #line default 4640 #line hidden 4641 WriteLiteral("\t\t<div"); 4642 4643 WriteLiteral(" class=\"tabs__block dw-mod\""); 4644 4645 WriteLiteral(">\r\n\t\t\t<section"); 4646 4647 WriteLiteral(" class=\"product__section paragraph-container paragraph-container--full-width prod" + 4648 "uct__section--bordered dw-mod\""); 4649 4650 WriteLiteral(">\r\n\t\t\t\t<div"); 4651 4652 WriteLiteral(" class=\"center-container u-padding--lg dw-mod\""); 4653 4654 WriteLiteral(">\r\n"); 4655 4656 WriteLiteral("\t\t\t\t\t"); 4657 4658 4659 #line 299 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 4660 Write(RenderSection(item.helper)); 4661 4662 4663 #line default 4664 #line hidden 4665 WriteLiteral("\r\n\t\t\t\t</div>\r\n\t\t\t</section>\r\n\t\t</div>\r\n"); 4666 4667 4668 #line 303 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 4669 } 4670 } 4671 4672 4673 #line default 4674 #line hidden 4675 WriteLiteral("\r\n\t</div>\r\n</div>\r\n\r\n"); 4676 4677 4678 #line 309 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 4679 foreach (ProductSection item in productSectionsList) 4680 { 4681 if (item.layoutType == "section") 4682 { 4683 4684 4685 #line default 4686 #line hidden 4687 WriteLiteral("<section"); 4688 4689 WriteLiteral(" class=\"product__section paragraph-container paragraph-container--full-width dw-m" + 4690 "od\""); 4691 4692 WriteLiteral(">\r\n\t<div"); 4693 4694 WriteLiteral(" class=\"center-container u-padding--lg dw-mod\""); 4695 4696 WriteLiteral(">\r\n\t\t<h2>"); 4697 4698 4699 #line 315 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 4700 Write(item.name); 4701 4702 4703 #line default 4704 #line hidden 4705 WriteLiteral("</h2>\r\n"); 4706 4707 WriteLiteral("\t\t"); 4708 4709 4710 #line 316 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 4711 Write(RenderSection(item.helper)); 4712 4713 4714 #line default 4715 #line hidden 4716 WriteLiteral("\r\n\t</div>\r\n</section>\r\n"); 4717 4718 4719 #line 319 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 4720 } 4721 4722 if (item.layoutType == "ribbon") 4723 { 4724 4725 4726 #line default 4727 #line hidden 4728 WriteLiteral("<section"); 4729 4730 WriteLiteral(" class=\"product__section product__section--ribbon paragraph-container paragraph-c" + 4731 "ontainer--full-width dw-mod\""); 4732 4733 WriteLiteral(">\r\n\t<div"); 4734 4735 WriteLiteral(" class=\"center-container u-padding--lg dw-mod\""); 4736 4737 WriteLiteral(">\r\n\t\t<h2>"); 4738 4739 4740 #line 325 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 4741 Write(item.name); 4742 4743 4744 #line default 4745 #line hidden 4746 WriteLiteral("</h2>\r\n"); 4747 4748 WriteLiteral("\t\t"); 4749 4750 4751 #line 326 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 4752 Write(RenderSection(item.helper)); 4753 4754 4755 #line default 4756 #line hidden 4757 WriteLiteral("\r\n\t</div>\r\n</section>\r\n"); 4758 4759 4760 #line 329 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 4761 } 4762 } 4763 4764 4765 #line default 4766 #line hidden 4767 WriteLiteral("\r\n"); 4768 4769 WriteLiteral("\r\n\r\n"); 4770 4771 WriteLiteral("\r\n"); 4772 4773 WriteLiteral("\r\n"); 4774 4775 WriteLiteral("\r\n"); 4776 4777 WriteLiteral("\r\n"); 4778 4779 WriteLiteral("\r\n"); 4780 4781 WriteLiteral("\r\n"); 4782 4783 WriteLiteral("\r\n"); 4784 4785 WriteLiteral("\r\n"); 4786 4787 WriteLiteral("\r\n"); 4788 4789 WriteLiteral("\r\n"); 4790 4791 WriteLiteral("\r\n\r\n"); 4792 4793 WriteLiteral("\r\n"); 4794 4795 WriteLiteral("\r\n"); 4796 4797 WriteLiteral("\r\n"); 4798 4799 WriteLiteral("\r\n"); 4800 4801 WriteLiteral("\r\n"); 4802 4803 WriteLiteral("\r\n"); 4804 4805 WriteLiteral("\r\n"); 4806 4807 WriteLiteral("\r\n"); 4808 4809 WriteLiteral("\r\n"); 4810 4811 WriteLiteral("\r\n"); 4812 4813 WriteLiteral("\r\n"); 4814 4815 WriteLiteral("\r\n<script"); 4816 4817 WriteLiteral(" id=\"PricesAndActionsTemplate\""); 4818 4819 WriteLiteral(" type=\"text/x-template\""); 4820 4821 WriteLiteral(">\r\n\t{{#.}}\r\n"); 4822 4823 4824 #line 1125 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 4825 4826 4827 #line default 4828 #line hidden 4829 4830 #line 1125 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 4831 if (!onlyPreview) 4832 { 4833 4834 4835 #line default 4836 #line hidden 4837 WriteLiteral("\t<div"); 4838 4839 WriteLiteral(" class=\"product__price-actions__price dw-mod u-margin-bottom--lg\""); 4840 4841 WriteLiteral(">\r\n\t\t<div"); 4842 4843 WriteLiteral(" class=\"before-price {{onSale}} dw-mod\""); 4844 4845 WriteLiteral(">{{discount}}</div>\r\n\t\t<div"); 4846 4847 WriteLiteral(" class=\"price price--product-page dw-mod\""); 4848 4849 WriteLiteral(">{{price}}</div>\r\n\t</div>\r\n"); 4850 4851 WriteLiteral("\t<div"); 4852 4853 WriteLiteral(" class=\"buttons-collection buttons-collection--right product__price-actions__acti" + 4854 "ons dw-mod\""); 4855 4856 WriteLiteral(">\r\n\t\t<input"); 4857 4858 WriteLiteral(" type=\"checkbox\""); 4859 4860 WriteLiteral(" id=\"UnitOptions_{{id}}\""); 4861 4862 WriteLiteral(" class=\"dropdown-trigger\""); 4863 4864 WriteLiteral(" />\r\n\t\t<div"); 4865 4866 WriteLiteral(" class=\"dropdown u-w150px u-w80px--xs dw-mod {{hasUnits}}\""); 4867 4868 WriteLiteral(">\r\n\t\t\t<label"); 4869 4870 WriteLiteral(" class=\"dropdown__header dropdown__btn dw-mod\""); 4871 4872 WriteLiteral(" for=\"UnitOptions_{{id}}\""); 4873 4874 WriteLiteral(">{{unitName}}</label>\r\n\t\t\t<div"); 4875 4876 WriteLiteral(" id=\"unitOptions\""); 4877 4878 WriteLiteral(" class=\"dropdown__content dw-mod\""); 4879 4880 WriteLiteral(">\r\n\t\t\t\t{{#unitOptions}}\r\n\t\t\t\t{{>UnitOption}}\r\n\t\t\t\t{{/unitOptions}}\r\n\t\t\t</div>\r\n\t\t" + 4881 "\t<label"); 4882 4883 WriteLiteral(" class=\"dropdown-trigger-off\""); 4884 4885 WriteLiteral(" for=\"UnitOptions_{{id}}\""); 4886 4887 WriteLiteral("></label>\r\n\t\t</div>\r\n\t\t<input"); 4888 4889 WriteLiteral(" type=\"hidden\""); 4890 4891 WriteLiteral(" value=\"{{unitId}}\""); 4892 4893 WriteLiteral(" name=\"Unit\""); 4894 4895 WriteLiteral(" id=\"Unit_{{id}}\""); 4896 4897 WriteLiteral(" />\r\n\t\t<input"); 4898 4899 WriteLiteral(" type=\"number\""); 4900 4901 WriteLiteral(" class=\"u-w70px\""); 4902 4903 WriteLiteral(" id=\"Quantity_{{id}}\""); 4904 4905 WriteLiteral(" name=\"Quantity\""); 4906 4907 WriteLiteral(" value=\"1\""); 4908 4909 WriteLiteral(" min=\"1\""); 4910 4911 WriteLiteral(">\r\n\t\t<button"); 4912 4913 WriteLiteral(" type=\"button\""); 4914 4915 WriteLiteral(" id=\"CartButton_{{id}}\""); 4916 4917 WriteLiteral(" class=\"btn btn--primary btn--condensed u-no-margin dw-mod js-cart-btn\""); 4918 4919 WriteLiteral(" name=\"submit\""); 4920 4921 WriteLiteral(" onclick=\"Cart.AddToCart(event, \'{{productId}}\', document.getElementById(\'Quantit" + 4922 "y_{{id}}\').value, \'Unit_{{id}}\', \'Variant_{{productId}}\');\""); 4923 4924 WriteLiteral("><i"); 4925 4926 WriteAttribute("class", Tuple.Create(" class=\"", 44127), Tuple.Create("\"", 44144) 4927 4928 #line 1144 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 4929 , Tuple.Create(Tuple.Create("", 44135), Tuple.Create<System.Object, System.Int32>(cartIcon 4930 4931 #line default 4932 #line hidden 4933 , 44135), false) 4934 ); 4935 4936 WriteLiteral("></i><span"); 4937 4938 WriteLiteral(" class=\"u-hidden-xs u-hidden-xxs\""); 4939 4940 WriteLiteral("> "); 4941 4942 4943 #line 1144 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 4944 Write(Translate("Add to cart")); 4945 4946 4947 #line default 4948 #line hidden 4949 WriteLiteral("</span></button>\r\n\t</div>\r\n"); 4950 4951 4952 #line 1146 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 4953 } 4954 else 4955 { 4956 4957 4958 #line default 4959 #line hidden 4960 WriteLiteral("\t<button"); 4961 4962 WriteLiteral(" type=\"button\""); 4963 4964 WriteLiteral(" id=\"CartButton_{{id}}\""); 4965 4966 WriteLiteral(" class=\"u-hidden\""); 4967 4968 WriteLiteral("></button>\r\n"); 4969 4970 4971 #line 1150 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 4972 } 4973 4974 4975 #line default 4976 #line hidden 4977 WriteLiteral("\t{{/.}}\r\n</script>\r\n\r\n<script"); 4978 4979 WriteLiteral(" id=\"Units\""); 4980 4981 WriteLiteral(" type=\"text/x-template\""); 4982 4983 WriteLiteral(">\r\n\t<div class=\"dropdown__item dw-mod\" onclick=\"HandlebarsBolt.UpdateContent(\'Pri" + 4984 "ceAndActions\', \'/Default.aspx?ID="); 4985 4986 4987 #line 1155 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 4988 Write(feedId); 4989 4990 4991 #line default 4992 #line hidden 4993 WriteLiteral("&UnitID={{value}}\')\">{{name}}</div>\r\n</script>\r\n\r\n\r\n"); 4994 4995 WriteLiteral("\r\n<script"); 4996 4997 WriteLiteral(" id=\"ProductPreRenderContainer\""); 4998 4999 WriteLiteral(" type=\"text/x-template\""); 5000 5001 WriteLiteral(">\r\n\t<div class=\"u-h600px u-full-width\">\r\n\t\t<div class=\"grid\">\r\n\t\t\t<div class=\"gri" + 5002 "d__col-12\">\r\n\t\t\t\t<div class=\"pre-render-element pre-render-element--md\"></div>\r\n" + 5003 "\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n</script>\r\n\r\n<script"); 5004 5005 WriteLiteral(" id=\"ProductContainer\""); 5006 5007 WriteLiteral(" type=\"text/x-template\""); 5008 5009 WriteLiteral(@"> 5010 {{#.}} 5011 <div class=""u-min-h400px u-full-width""> 5012 <div class=""grid""> 5013 <div class=""grid__col-45px grid__col--bleed-x""> 5014 <div class=""grid__cell grid__cell--align-middle-left""> 5015 <button class=""btn btn--condensed btn--clean {{prevdisabled}} dw-mod"" onclick=""HandlebarsBolt.UpdateContent('ProductList_{{groupName}}', '{{prevPage}}')"" {{prevdisabled}}><i class=""fas fa-chevron-left fa-2x""></i></button> 5016 </div> 5017 </div> 5018 <div class=""grid__col-auto grid__col--bleed-x""> 5019 <div id=""ProductsContainer"" class=""grid product-list dw-mod""> 5020 {{#ProductsContainer}} 5021 <div id=""Product{{productId}}"" class=""grid__col-"); 5022 5023 5024 #line 1182 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 5025 Write(relatedProductsColumnWidth); 5026 5027 5028 #line default 5029 #line hidden 5030 WriteLiteral(@" product-list__grid-item dw-mod""> 5031 {{#Product}} 5032 <div class=""grid__cell product-list__grid-item__image dw-mod {{noImage}}""> 5033 <div class=""stickers-container dw-mod""> 5034 {{#Stickers}} 5035 {{>Sticker}} 5036 {{/Stickers}} 5037 </div> 5038 <a href=""{{link}}"" onclick=""Scroll.SavePosition(event)""><img class=""grid__cell-img grid__cell-img--centered b-lazy"" src=""/Files/Images/placeholder.gif"" data-src=""/Admin/Public/GetImage.ashx?width=300&amp;height=300&amp;crop=5&amp;Compression=75&amp;image={{image}}"" alt=""{{name}}"" /></a> 5039 </div> 5040 5041 <div class=""grid__cell product-list__grid-item__price-info {{shortGridInfo}} dw-mod""> 5042 <a href=""{{link}}"" onclick=""Scroll.SavePosition(event)"" title=""{{name}}""><h6 class=""u-condensed-text"">{{name}}</h6></a> 5043 <div class=""item-number dw-mod"">{{number}}</div> 5044 "); 5045 5046 5047 #line 1196 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 5048 5049 5050 #line default 5051 #line hidden 5052 5053 #line 1196 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 5054 if (!onlyPreview) 5055 { 5056 5057 5058 #line default 5059 #line hidden 5060 WriteLiteral("\t\t\t\t\t\t\t<div"); 5061 5062 WriteLiteral(" class=\"price dw-mod\""); 5063 5064 WriteLiteral(">{{price}}</div>\r\n"); 5065 5066 WriteLiteral("\t\t\t\t\t\t\t<div"); 5067 5068 WriteLiteral(" class=\"before-price {{onSale}} dw-mod\""); 5069 5070 WriteLiteral(">{{discount}}</div>\r\n"); 5071 5072 5073 #line 1200 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 5074 } 5075 5076 5077 #line default 5078 #line hidden 5079 WriteLiteral("\t\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t\t<div class=\"product-list__grid-item__footer dw-mod\">\r\n\t\t\t\t\t" + 5080 "\t\t<div class=\"u-ta-center\">\r\n\t\t\t\t\t\t\t\t<a href=\"{{link}}\" id=\"CartButton_{{id}}\" c" + 5081 "lass=\"btn btn--secondary btn--full u-no-margin dw-mod\">"); 5082 5083 5084 #line 1205 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 5085 Write(Translate("View")); 5086 5087 5088 #line default 5089 #line hidden 5090 WriteLiteral(@"</a> 5091 </div> 5092 </div> 5093 {{/Product}} 5094 </div> 5095 {{/ProductsContainer}} 5096 </div> 5097 </div> 5098 <div class=""grid__col-45px grid__col--bleed-x""> 5099 <div class=""grid__cell grid__cell--align-middle-right""> 5100 <button class=""btn btn--condensed btn--clean {{nextdisabled}} dw-mod"" onclick=""HandlebarsBolt.UpdateContent('ProductList_{{groupName}}', '{{nextPage}}')"" {{nextdisabled}}><i class=""fas fa-chevron-right fa-2x""></i></button> 5101 </div> 5102 </div> 5103 </div> 5104 </div> 5105 {{/.}} 5106 </script> 5107 5108 <script"); 5109 5110 WriteLiteral(" id=\"ProductContainerMini\""); 5111 5112 WriteLiteral(" type=\"text/x-template\""); 5113 5114 WriteLiteral(@"> 5115 {{#.}} 5116 <div class=""u-full-width""> 5117 <div class=""grid""> 5118 <div class=""grid__col-45px grid__col--bleed-x""> 5119 <div class=""grid__cell grid__cell--align-middle-left""> 5120 <button class=""btn btn--condensed btn--clean {{prevdisabled}} dw-mod"" onclick=""HandlebarsBolt.UpdateContent('ProductList_{{groupName}}', '{{prevPage}}')"" {{prevdisabled}}><i class=""fas fa-chevron-left fa-2x""></i></button> 5121 </div> 5122 </div> 5123 <div class=""grid__col-auto grid__col--bleed-x""> 5124 <div id=""ProductsContainer"" class=""grid product-list dw-mod""> 5125 {{#ProductsContainer}} 5126 <div id=""Product{{productId}}"" class=""grid__col-"); 5127 5128 5129 #line 1235 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 5130 Write(relatedProductsColumnWidth); 5131 5132 5133 #line default 5134 #line hidden 5135 WriteLiteral(@" product-list__grid-item dw-mod""> 5136 {{#Product}} 5137 <div class=""grid__cell product-list__grid-item__image dw-mod {{noImage}}""> 5138 <div class=""stickers-container dw-mod""> 5139 {{#Stickers}} 5140 {{>Sticker}} 5141 {{/Stickers}} 5142 </div> 5143 <a href=""{{link}}"" onclick=""Scroll.SavePosition(event)""><img class=""grid__cell-img grid__cell-img--centered b-lazy"" src=""/Files/Images/placeholder.gif"" data-src=""/Admin/Public/GetImage.ashx?width=300&amp;height=300&amp;crop=5&amp;Compression=75&amp;image={{image}}"" alt=""{{name}}"" /></a> 5144 </div> 5145 5146 <div class=""grid__cell product-list__grid-item__price-info {{shortGridInfo}} dw-mod""> 5147 <a href=""{{link}}"" onclick=""Scroll.SavePosition(event)"" title=""{{name}}""><h6 class=""u-condensed-text"">{{name}}</h6></a> 5148 <div class=""item-number dw-mod"">{{number}}</div> 5149 "); 5150 5151 5152 #line 1249 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 5153 5154 5155 #line default 5156 #line hidden 5157 5158 #line 1249 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 5159 if (!onlyPreview) 5160 { 5161 5162 5163 #line default 5164 #line hidden 5165 WriteLiteral("\t\t\t\t\t\t\t<div>{{price}}</div>\r\n"); 5166 5167 WriteLiteral("\t\t\t\t\t\t\t<div"); 5168 5169 WriteLiteral(" class=\"before-price {{onSale}} dw-mod\""); 5170 5171 WriteLiteral(">{{discount}}</div>\r\n"); 5172 5173 5174 #line 1253 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 5175 } 5176 5177 5178 #line default 5179 #line hidden 5180 WriteLiteral(@" </div> 5181 {{/Product}} 5182 </div> 5183 {{/ProductsContainer}} 5184 </div> 5185 </div> 5186 <div class=""grid__col-45px grid__col--bleed-x""> 5187 <div class=""grid__cell grid__cell--align-middle-right""> 5188 <button class=""btn btn--condensed btn--clean {{nextdisabled}} dw-mod"" onclick=""HandlebarsBolt.UpdateContent('ProductList_{{groupName}}', '{{nextPage}}')"" {{nextdisabled}}><i class=""fas fa-chevron-right fa-2x""></i></button> 5189 </div> 5190 </div> 5191 </div> 5192 </div> 5193 {{/.}} 5194 </script> 5195 5196 <script"); 5197 5198 WriteLiteral(" id=\"Sticker\""); 5199 5200 WriteLiteral(" type=\"text/x-template\""); 5201 5202 WriteLiteral(">\r\n\t<div class=\"stickers-container__tag {{className}} dw-mod\">{{text}}</div>\r\n</s" + 5203 "cript>\r\n\r\n\r\n"); 5204 5205 WriteLiteral("\r\n\r\n<script"); 5206 5207 WriteLiteral(" id=\"VariantProductsContainer\""); 5208 5209 WriteLiteral(" type=\"text/x-template\""); 5210 5211 WriteLiteral(">\r\n\t{{#.}}\r\n\t<div class=\"\">\r\n\t\t<table id=\"VariantsProductsContainer\" class=\"table" + 5212 " u-position-relative dw-mod\">\r\n\t\t\t<thead>\r\n\t\t\t<tr>\r\n\t\t\t\t<td width=\"75\">&nbsp;</t" + 5213 "d>\r\n\t\t\t\t<td>"); 5214 5215 5216 #line 1284 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 5217 Write(Translate("Product")); 5218 5219 5220 #line default 5221 #line hidden 5222 WriteLiteral("</td>\r\n\t\t\t\t{{#AvailableCustomFields}}\r\n\t\t\t\t{{>TableFieldNameTemplate}}\r\n\t\t\t\t{{/Av" + 5223 "ailableCustomFields}}\r\n"); 5224 5225 5226 #line 1288 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 5227 5228 5229 #line default 5230 #line hidden 5231 5232 #line 1288 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 5233 if (Converter.ToBoolean(productDetails["ProductDetailsRenderVariantGroupsInTable"])) 5234 { 5235 foreach (LoopItem variantgroup in GetLoop("VariantGroups")) 5236 { 5237 5238 5239 #line default 5240 #line hidden 5241 WriteLiteral("\t\t\t\t<td>"); 5242 5243 5244 #line 1292 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 5245 Write(variantgroup.GetString("Ecom:VariantGroup.Name")); 5246 5247 5248 #line default 5249 #line hidden 5250 WriteLiteral("</td>\r\n"); 5251 5252 5253 #line 1293 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 5254 } 5255 } 5256 5257 5258 #line default 5259 #line hidden 5260 WriteLiteral(@" <td width=""320"">&nbsp;</td> 5261 </tr> 5262 </thead> 5263 5264 <tbody id=""VariantProductListContainer"" data-template=""VariantProductItemContainer"" data-save-cookie=""true""> 5265 {{#ProductsContainer}} 5266 {{>VariantProductItemContainer}} 5267 {{/ProductsContainer}} 5268 </tbody> 5269 </table> 5270 </div> 5271 5272 <div class=""grid""> 5273 <div class=""grid__col-12 grid__col--bleed-y""> 5274 <button type=""button"" id=""LoadMoreButton"" class=""btn btn--primary btn--full {{nextdisabled}} dw-mod"" data-current=""{{currentPage}}"" data-page-size=""{{pageSize}}"" data-total=""{{totalPages}}"" data-container=""VariantProductListContainer"" data-feed-url="""); 5275 5276 5277 #line 1309 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 5278 Write(variantsFeedUrl); 5279 5280 5281 #line default 5282 #line hidden 5283 WriteLiteral("{{loadMoreFeedParams}}\" onclick=\"LoadMore.Next(this)\" {{nextdisabled}}>"); 5284 5285 5286 #line 1309 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 5287 Write(Translate("Load")); 5288 5289 5290 #line default 5291 #line hidden 5292 WriteLiteral(" "); 5293 5294 5295 #line 1309 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 5296 Write(Translate("more")); 5297 5298 5299 #line default 5300 #line hidden 5301 WriteLiteral("</button>\r\n\t\t</div>\r\n\t</div>\r\n\t{{/.}}\r\n</script>\r\n\r\n<script"); 5302 5303 WriteLiteral(" id=\"VariantProductItemContainer\""); 5304 5305 WriteLiteral(" type=\"text/x-template\""); 5306 5307 WriteLiteral(">\r\n\t{{#.}}\r\n\t<tr id=\"VariantProduct{{id}}\" data-template=\"VariantProductItem\" dat" + 5308 "a-preloader=\"overlay\" style=\"z-index: {{zIndex}}\">\r\n\t\t{{#Product}}\r\n\t\t{{>Variant" + 5309 "ProductItem}}\r\n\t\t{{/Product}}\r\n\t</tr>\r\n\t{{/.}}\r\n</script>\r\n\r\n<script"); 5310 5311 WriteLiteral(" id=\"VariantProductItem\""); 5312 5313 WriteLiteral(" type=\"text/x-template\""); 5314 5315 WriteLiteral(@"> 5316 {{#.}} 5317 <td width=""75""> 5318 <div class=""lightbox u-hidden-xxs""> 5319 <a href=""{{link}}"" onclick=""Scroll.SavePosition(event)""> 5320 <img class=""lightbox__image {{noImage}}"" src=""/Admin/Public/GetImage.ashx?width=220&amp;height=220&amp;crop=5&amp;Compression=75&amp;image={{image}}"" alt=""{{name}}"" /> 5321 <div class=""u-margin-right {{noImage}}""> 5322 <img src=""/Admin/Public/GetImage.ashx?width=75&amp;height=55&amp;crop=5&FillCanvas=true&amp;Compression=75&amp;image={{image}}"" alt=""{{name}}"" /> 5323 </div> 5324 </a> 5325 </div> 5326 </td> 5327 <td class=""u-va-middle""> 5328 <a href=""{{link}}"" onclick=""Scroll.SavePosition(event)"" title=""{{name}}""><h6 class=""u-no-margin"">{{name}}</h6></a> 5329 <div class=""item-number item-number--compressed dw-mod""> 5330 {{number}} 5331 "); 5332 5333 5334 #line 1341 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 5335 5336 5337 #line default 5338 #line hidden 5339 5340 #line 1341 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 5341 if (!onlyPreview) 5342 { 5343 5344 5345 #line default 5346 #line hidden 5347 WriteLiteral("\t\t\t<span>\r\n\t\t\t\t\t<span"); 5348 5349 WriteLiteral(" class=\"stock-icon {{stockState}} u-no-margin dw-mod\""); 5350 5351 WriteLiteral(" title=\"{{stockText}}\""); 5352 5353 WriteLiteral("></span> {{stockText}}{{deliveryText}}\r\n\t\t\t\t</span>\r\n"); 5354 5355 5356 #line 1346 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 5357 } 5358 else 5359 { 5360 5361 5362 #line default 5363 #line hidden 5364 WriteLiteral("\t\t\t<div"); 5365 5366 WriteLiteral(" class=\"grid__cell-footer stickers-container stickers-container--block dw-mod\""); 5367 5368 WriteLiteral(">\r\n\t\t\t\t{{#Stickers}}\r\n\t\t\t\t{{>MiniSticker}}\r\n\t\t\t\t{{/Stickers}}\r\n\t\t\t</div>\r\n"); 5369 5370 5371 #line 1354 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 5372 } 5373 5374 5375 #line default 5376 #line hidden 5377 WriteLiteral("\t\t</div>\r\n\t</td>\r\n\t{{#CustomFields}}\r\n\t{{>TableFieldNameTemplate}}\r\n\t{{/CustomFie" + 5378 "lds}}\r\n"); 5379 5380 5381 #line 1360 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 5382 5383 5384 #line default 5385 #line hidden 5386 5387 #line 1360 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 5388 if (Converter.ToBoolean(productDetails["ProductDetailsRenderVariantGroupsInTable"])) 5389 { 5390 5391 5392 #line default 5393 #line hidden 5394 WriteLiteral("\t"); 5395 5396 WriteLiteral("\r\n\t{{#VariantSelectionNames}}\r\n\t{{>TableFieldNameTemplate}}\r\n\t{{/VariantSelection" + 5397 "Names}}\r\n\t"); 5398 5399 WriteLiteral("\r\n"); 5400 5401 5402 #line 1367 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 5403 } 5404 5405 5406 #line default 5407 #line hidden 5408 WriteLiteral("\t<td width=\"320\" class=\"u-va-middle\">\r\n"); 5409 5410 5411 #line 1369 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 5412 5413 5414 #line default 5415 #line hidden 5416 5417 #line 1369 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 5418 if (onlyPreview) 5419 { 5420 5421 5422 #line default 5423 #line hidden 5424 WriteLiteral("\t\t<div"); 5425 5426 WriteLiteral(" class=\"u-hidden-sm\""); 5427 5428 WriteLiteral(">\r\n\t\t\t<div"); 5429 5430 WriteLiteral(" class=\"u-full-width u-ta-right u-padding-right\""); 5431 5432 WriteLiteral(">\r\n\t\t\t\t<div"); 5433 5434 WriteLiteral(" class=\"before-price {{onSale}} before-price--micro dw-mod\""); 5435 5436 WriteLiteral(">{{discount}}</div>\r\n\t\t\t\t<div"); 5437 5438 WriteLiteral(" class=\"price price--product-list price--micro dw-mod\""); 5439 5440 WriteLiteral(">{{price}}</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n"); 5441 5442 5443 #line 1377 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 5444 } 5445 else 5446 { 5447 5448 5449 #line default 5450 #line hidden 5451 WriteLiteral("\t\t<div"); 5452 5453 WriteLiteral(" class=\"grid grid--align-center grid--justify-end\""); 5454 5455 WriteLiteral(">\r\n\t\t\t<div"); 5456 5457 WriteLiteral(" class=\"favorites u-margin-right {{hasVariants}} dw-mod\""); 5458 5459 WriteLiteral(" {{hasVariants}}>\r\n\t\t\t\t{{#Favorite}}\r\n\t\t\t\t{{>FavoriteTemplate}}\r\n\t\t\t\t{{/Favorite}" + 5460 "}\r\n\t\t\t</div>\r\n\t\t\t<div"); 5461 5462 WriteLiteral(" class=\"u-margin-right\""); 5463 5464 WriteLiteral(">\r\n\t\t\t\t<input"); 5465 5466 WriteLiteral(" type=\"checkbox\""); 5467 5468 WriteLiteral(" id=\"UnitOptions_{{id}}\""); 5469 5470 WriteLiteral(" class=\"dropdown-trigger\""); 5471 5472 WriteLiteral(" />\r\n\t\t\t\t<div"); 5473 5474 WriteLiteral(" class=\"dropdown u-w120px {{hasUnits}} dw-mod\""); 5475 5476 WriteLiteral(">\r\n\t\t\t\t\t<label"); 5477 5478 WriteLiteral(" class=\"dropdown__header dropdown__btn dw-mod\""); 5479 5480 WriteLiteral(" for=\"UnitOptions_{{id}}\""); 5481 5482 WriteLiteral(">{{unitName}}</label>\r\n\t\t\t\t\t<div"); 5483 5484 WriteLiteral(" id=\"unitOptions\""); 5485 5486 WriteLiteral(" class=\"dropdown__content dw-mod\""); 5487 5488 WriteLiteral(">\r\n\t\t\t\t\t\t{{#unitOptions}}\r\n\t\t\t\t\t\t{{>UnitOption}}\r\n\t\t\t\t\t\t{{/unitOptions}}\r\n\t\t\t\t\t</" + 5489 "div>\r\n\t\t\t\t\t<label"); 5490 5491 WriteLiteral(" class=\"dropdown-trigger-off\""); 5492 5493 WriteLiteral(" for=\"UnitOptions_{{id}}\""); 5494 5495 WriteLiteral("></label>\r\n\t\t\t\t</div>\r\n\t\t\t\t<input"); 5496 5497 WriteLiteral(" type=\"hidden\""); 5498 5499 WriteLiteral(" value=\"{{unitId}}\""); 5500 5501 WriteLiteral(" name=\"Unit{{id}}\""); 5502 5503 WriteLiteral(" id=\"Unit_{{id}}\""); 5504 5505 WriteLiteral(" />\r\n\t\t\t\t<input"); 5506 5507 WriteLiteral(" type=\"hidden\""); 5508 5509 WriteLiteral(" value=\"{{variantid}}\""); 5510 5511 WriteLiteral(" name=\"VariantID{{id}}\""); 5512 5513 WriteLiteral(" id=\"Variant_{{id}}\""); 5514 5515 WriteLiteral(" />\r\n\t\t\t</div>\r\n\t\t\t<div"); 5516 5517 WriteLiteral(" class=\"u-margin-right u-hidden-xs u-hidden-xxs\""); 5518 5519 WriteLiteral(">\r\n\t\t\t\t<div"); 5520 5521 WriteLiteral(" class=\"before-price before-price--micro {{onSale}} dw-mod\""); 5522 5523 WriteLiteral(">{{discount}}</div>\r\n\t\t\t\t<div"); 5524 5525 WriteLiteral(" class=\"price price--condensed price--product-list dw-mod\""); 5526 5527 WriteLiteral(">{{price}}</div>\r\n\t\t\t</div>\r\n\t\t\t<div>\r\n\t\t\t\t<input"); 5528 5529 WriteLiteral(" type=\"number\""); 5530 5531 WriteLiteral(" class=\"u-w80px u-no-margin u-margin-right\""); 5532 5533 WriteLiteral(" id=\"Quantity_{{id}}\""); 5534 5535 WriteLiteral(" name=\"Quantity{{id}}\""); 5536 5537 WriteLiteral(" value=\"1\""); 5538 5539 WriteLiteral(" min=\"1\""); 5540 5541 WriteLiteral(">\r\n\t\t\t</div>\r\n\t\t\t<div>\r\n\t\t\t\t<button"); 5542 5543 WriteLiteral(" type=\"button\""); 5544 5545 WriteLiteral(" id=\"CartButton_{{id}}\""); 5546 5547 WriteLiteral(" class=\"btn btn--primary btn--condensed u-no-margin dw-mod {{hasVariants}}\""); 5548 5549 WriteLiteral(" name=\"submit\""); 5550 5551 WriteLiteral(" onclick=\"Cart.AddToCart(event, \'{{productId}}\', document.getElementById(\'Quantit" + 5552 "y_{{id}}\').value, \'Unit_{{id}}\', \'Variant_{{id}}\');\""); 5553 5554 WriteLiteral(" {{hasVariants}}><i"); 5555 5556 WriteAttribute("class", Tuple.Create(" class=\"", 54912), Tuple.Create("\"", 54929) 5557 5558 #line 1408 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 5559 , Tuple.Create(Tuple.Create("", 54920), Tuple.Create<System.Object, System.Int32>(cartIcon 5560 5561 #line default 5562 #line hidden 5563 , 54920), false) 5564 ); 5565 5566 WriteLiteral("></i></button>\r\n\t\t\t</div>\r\n\t\t</div>\r\n"); 5567 5568 5569 #line 1411 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 5570 } 5571 5572 5573 #line default 5574 #line hidden 5575 WriteLiteral("\t</td>\r\n\t{{/.}}\r\n</script>\r\n\r\n<script"); 5576 5577 WriteLiteral(" id=\"TableFieldNameTemplate\""); 5578 5579 WriteLiteral(" type=\"text/x-template\""); 5580 5581 WriteLiteral(">\r\n\t<td class=\"u-va-middle\">{{name}}</td>\r\n</script>\r\n\r\n<script"); 5582 5583 WriteLiteral(" id=\"TableFieldValueTemplate\""); 5584 5585 WriteLiteral(" type=\"text/x-template\""); 5586 5587 WriteLiteral(">\r\n\t<td class=\"u-va-middle\">{{value}}</td>\r\n</script>\r\n\r\n<script"); 5588 5589 WriteLiteral(" id=\"MiniSticker\""); 5590 5591 WriteLiteral(" type=\"text/x-template\""); 5592 5593 WriteLiteral(">\r\n\t<div class=\"stickers-container__tag stickers-container__tag--micro {{classNam" + 5594 "e}} dw-mod\">{{text}}</div>\r\n</script>\r\n\r\n"); 5595 5596 WriteLiteral("\r\n\r\n<script"); 5597 5598 WriteLiteral(" id=\"FavoriteTemplate\""); 5599 5600 WriteLiteral(" type=\"text/x-template\""); 5601 5602 WriteLiteral(@"> 5603 <div class=""favorites-list u-ta-left""> 5604 <label for=""FavoriteTrigger_{{id}}"" class=""u-no-margin""><i class=""{{favoriteIcon}} fa-1_5x""></i></label> 5605 <input type=""checkbox"" id=""FavoriteTrigger_{{id}}"" class=""dropdown-trigger"" /> 5606 <div class=""dropdown dropdown--absolute-position""> 5607 <div class=""dropdown__content dropdown__content--show-left dropdown__content--padding u-w220px dw-mod""> 5608 <ul class=""list list--clean dw-mod""> 5609 {{#FavoriteLists}} 5610 {{>FavoriteListItem}} 5611 {{/FavoriteLists}} 5612 </ul> 5613 </div> 5614 <label class=""dropdown-trigger-off"" for=""FavoriteTrigger_{{id}}""></label> 5615 </div> 5616 </div> 5617 </script> 5618 5619 <script"); 5620 5621 WriteLiteral(" id=\"FavoriteListItem\""); 5622 5623 WriteLiteral(" type=\"text/x-template\""); 5624 5625 WriteLiteral(">\r\n\t<li>\r\n\t\t<a href=\"{{link}}\" class=\"list__link u-no-underline dw-mod\"><i class=" + 5626 "\"{{favoriteIcon}}\"></i> {{name}}</a>\r\n\t</li>\r\n</script>\r\n\r\n"); 5627 5628 WriteLiteral("\r\n\r\n<script"); 5629 5630 WriteLiteral(" id=\"Checkboxes\""); 5631 5632 WriteLiteral(" type=\"text/x-template\""); 5633 5634 WriteLiteral(@"> 5635 <label class=""{{disabled}} checkbox-facet dw-mod"" data-filter-value=""{{label}}""> 5636 <input type=""checkbox"" class=""{{selected}} checkbox-facet__checkbox dw-mod"" onclick=""Facets.UpdateFacets(this);"" name=""{{queryParameter}}"" value=""{{value}}"" {{selected}} {{disabled}}> 5637 <span class=""checkbox-facet__label dw-mod"">{{label}}</span> 5638 <span class=""checkbox-facet__count dw-mod"">({{count}})</span> 5639 </label> 5640 </script> 5641 5642 <script"); 5643 5644 WriteLiteral(" id=\"Tags\""); 5645 5646 WriteLiteral(" type=\"text/x-template\""); 5647 5648 WriteLiteral(@"> 5649 <button type=""button"" class=""btn btn--tag {{selected}} {{disabled}}"" data-filter-value=""{{label}}"" data-check=""{{selected}}"" onclick=""Facets.UpdateFacets(this);"" name=""{{queryParameter}}"" value=""{{value}}"" {{disabled}}> 5650 {{label}} <span class=""facets-group__counter"">({{count}})</span> 5651 </button> 5652 </script> 5653 5654 <script"); 5655 5656 WriteLiteral(" id=\"Colors\""); 5657 5658 WriteLiteral(" type=\"text/x-template\""); 5659 5660 WriteLiteral(@"> 5661 <button type=""button"" class=""btn btn--colorbox u-margin-right {{selected}} {{disabled}}"" data-filter-value=""{{label}}"" style=""background-color: {{value}}"" title=""{{label}}"" data-check=""{{selected}}"" onclick=""Facets.UpdateFacets(this);"" name=""{{queryParameter}}"" value=""{{value}}"" {{disabled}}></button> 5662 </script> 5663 5664 "); 5665 5666 WriteLiteral("\r\n\r\n<script"); 5667 5668 WriteLiteral(" id=\"UnitOption\""); 5669 5670 WriteLiteral(" type=\"text/x-template\""); 5671 5672 WriteLiteral(">\r\n\t<div class=\"dropdown__item dw-mod\" onclick=\"HandlebarsBolt.UpdateContent(\'Pri" + 5673 "ceAndActions\', \'{{link}}&feed=true&UnitID={{value}}&rid={{id}}\')\">{{name}}</div>" + 5674 "\r\n</script>\r\n\r\n"); 5675 5676 WriteLiteral("\r\n"); 5677 5678 WriteLiteral("<script"); 5679 5680 WriteLiteral(" type=\"application/ld+json\""); 5681 5682 WriteLiteral(">\r\n{\r\n \""); 5683 5684 WriteLiteral("@context\": \"http://schema.org/\",\r\n \""); 5685 5686 WriteLiteral("@type\": \"Product\",\r\n \"name\": \""); 5687 5688 5689 #line 1538 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 5690 Write(GetString("Ecom:Product.Name")); 5691 5692 5693 #line default 5694 #line hidden 5695 WriteLiteral("\",\r\n"); 5696 5697 5698 #line 1539 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 5699 5700 5701 #line default 5702 #line hidden 5703 5704 #line 1539 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 5705 if (!string.IsNullOrEmpty(GetString("Ecom:Product.ImageLarge.Default.Clean"))) 5706 { 5707 5708 5709 #line default 5710 #line hidden 5711 WriteLiteral(" "); 5712 5713 WriteLiteral("\"image\": [\r\n \""); 5714 5715 5716 #line 1542 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 5717 Write(siteURL); 5718 5719 5720 #line default 5721 #line hidden 5722 WriteLiteral("/Admin/Public/GetImage.ashx?width=400&height=400&crop=0&Compression=75&DoNotUpsca" + 5723 "le=true&image="); 5724 5725 5726 #line 1542 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 5727 Write(GetString("Ecom:Product.ImageLarge.Default.Clean")); 5728 5729 5730 #line default 5731 #line hidden 5732 WriteLiteral("\",\r\n \""); 5733 5734 5735 #line 1543 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 5736 Write(siteURL); 5737 5738 5739 #line default 5740 #line hidden 5741 WriteLiteral("/Admin/Public/GetImage.ashx?width=400&height=300&crop=0&Compression=75&DoNotUpsca" + 5742 "le=true&image="); 5743 5744 5745 #line 1543 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 5746 Write(GetString("Ecom:Product.ImageLarge.Default.Clean")); 5747 5748 5749 #line default 5750 #line hidden 5751 WriteLiteral("\",\r\n \""); 5752 5753 5754 #line 1544 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 5755 Write(siteURL); 5756 5757 5758 #line default 5759 #line hidden 5760 WriteLiteral("/Admin/Public/GetImage.ashx?width=448&height=225&crop=0&Compression=75&DoNotUpsca" + 5761 "le=true&image="); 5762 5763 5764 #line 1544 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 5765 Write(GetString("Ecom:Product.ImageLarge.Default.Clean")); 5766 5767 5768 #line default 5769 #line hidden 5770 WriteLiteral("\"\r\n ],"); 5771 5772 WriteLiteral("\r\n"); 5773 5774 5775 #line 1546 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 5776 } 5777 5778 5779 #line default 5780 #line hidden 5781 WriteLiteral(" \"description\": \""); 5782 5783 5784 #line 1547 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 5785 Write(GetString("Ecom:Product.ShortDescription")); 5786 5787 5788 #line default 5789 #line hidden 5790 WriteLiteral("\",\r\n \"mpn\": \"925872\",\r\n"); 5791 5792 5793 #line 1549 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 5794 5795 5796 #line default 5797 #line hidden 5798 5799 #line 1549 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 5800 if(!string.IsNullOrEmpty(brand)) 5801 { 5802 5803 5804 #line default 5805 #line hidden 5806 WriteLiteral(" "); 5807 5808 WriteLiteral("\"brand\": {\r\n \""); 5809 5810 WriteLiteral("@type\": \"Thing\",\r\n \"name\": \""); 5811 5812 5813 #line 1553 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 5814 Write(brand); 5815 5816 5817 #line default 5818 #line hidden 5819 WriteLiteral("\"\r\n },"); 5820 5821 WriteLiteral("\r\n"); 5822 5823 5824 #line 1555 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 5825 } 5826 5827 5828 #line default 5829 #line hidden 5830 WriteLiteral(" \"offers\": {\r\n \""); 5831 5832 WriteLiteral("@type\": \"Offer\",\r\n \"priceCurrency\": \""); 5833 5834 5835 #line 1558 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 5836 Write(GetString("Ecom:Product.Price.Currency.Code")); 5837 5838 5839 #line default 5840 #line hidden 5841 WriteLiteral("\",\r\n \"price\": \""); 5842 5843 5844 #line 1559 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 5845 Write(GetString("Ecom:Product.Price.Price")); 5846 5847 5848 #line default 5849 #line hidden 5850 WriteLiteral("\",\r\n \"availability\": \""); 5851 5852 5853 #line 1560 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 5854 Write(GetInteger("Ecom:Product.Stock") > 0 ? "InStock" : "OutOfStock"); 5855 5856 5857 #line default 5858 #line hidden 5859 WriteLiteral("\"\r\n }\r\n}\r\n</script>\r\n\r\n"); 5860 5861 5862 #line 1565 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 5863 if (renderVariantsAsProducts) 5864 { 5865 5866 5867 #line default 5868 #line hidden 5869 WriteLiteral("<script>\r\n\tdocument.addEventListener(\"DOMContentLoaded\", function (event) {\r\n\t\tFa" + 5870 "cets.Init(\"VariantsList\", \'"); 5871 5872 5873 #line 1569 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 5874 Write(productCatalogId); 5875 5876 5877 #line default 5878 #line hidden 5879 WriteLiteral("\', \'"); 5880 5881 5882 #line 1569 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 5883 Write(requestQuery); 5884 5885 5886 #line default 5887 #line hidden 5888 WriteLiteral("\');\r\n\t});\r\n</script>\r\n"); 5889 5890 5891 #line 1572 "D:\dynamicweb.net\Solutions\lope.LIVE\Files\Templates\Designs\Rapido\eCom\Product\SpProduct.cshtml" 5892 } 5893 5894 5895 #line default 5896 #line hidden 5897 WriteLiteral(@" 5898 <script> 5899 if (document.getElementById(""PriceAndActions"")) { 5900 document.getElementById(""PriceAndActions"").addEventListener(""contentLoaded"", function (event) { 5901 MatchVariants.Update(document.querySelector("".js-variants""), ""DoNothing""); 5902 }); 5903 } 5904 </script> 5905 5906 "); 5907 5908 } 5909 } 5910 } 5911

1 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 2 @using Dynamicweb.Extensibility 3 @using Dynamicweb.Content 4 @using System; 5 @using System.Globalization; 6 @using System.Linq 7 @using System.IO 8 @using Dynamicweb.Core 9 @using System.Web 10 @using System.Web.UI.HtmlControls 11 12 @functions { 13 List<LoopItem> downloadDocuments = new List<LoopItem>(); 14 string pageId; 15 string productId; 16 string productVariantId; 17 string feedFullUrl; 18 string variantsFeedUrl; 19 string requestQuery; 20 int areaID = Convert.ToInt32(GetGlobalValue("Global:Area.ID")); 21 22 static string ConvertBytes(long bytes) 23 { 24 double size = bytes / 1024; //KB 25 if (size > 1024) 26 { 27 size = (bytes / 1024f) / 1024f; //MB 28 return string.Format("{0:n1} MB", size); 29 } 30 else 31 { 32 return string.Format("{0:n0} KB", size); 33 } 34 } 35 36 string imagePrefix = "/Admin/Public/GetImage.ashx?width=800&amp;height=550&amp;crop=5&FillCanvas=True&DoNotUpscale=true&amp;Compression=75&amp;image="; 37 string thumbPrefix = "/Admin/Public/GetImage.ashx?width=150&amp;height=150&amp;crop=5&FillCanvas=True&DoNotUpscale=true&amp;Compression=75&amp;image="; 38 string image = ""; 39 string thumb = ""; 40 41 42 public class ProductSection 43 { 44 public string name { get; set; } 45 public string id { get; set; } 46 public RazorEngine.Templating.TemplateWriter helper { get; set; } 47 public string layoutType { get; set; } 48 } 49 50 RazorEngine.Templating.TemplateWriter RenderSection(RazorEngine.Templating.TemplateWriter section) 51 { 52 return section; 53 } 54 55 List<ProductSection> productSectionsList = new List<ProductSection>(); 56 57 Dynamicweb.Content.Items.Item productDetails; 58 Dynamicweb.Content.Items.Item icons; 59 string cartIcon; 60 bool onlyPreview = false; 61 bool renderVariantsAsProducts = false; 62 } 63 64 @{ 65 onlyPreview = Converter.ToBoolean(Pageview.Area.Item["OnlyPreviewForAnonymous"]) && Pageview.User == null; 66 productId = GetString("Ecom:Product.ID"); 67 string uniqueId = GetString("Ecom:Product.ID") + GetString("Ecom:Product.VariantID"); 68 requestQuery = GetGlobalValue("Global:Request.Query") + "&MainProductID=" + "&feed=true"; 69 string productCatalogId = GetGlobalValue("Global:Page.ID"); 70 71 int featuresCount = 0; 72 string brand = GetString("Ecom:Product:Field.brand"); 73 74 foreach (LoopItem customField in GetLoop("CustomFieldValues")) 75 { 76 if (!string.IsNullOrEmpty(customField.GetString("Product.CustomField.Name")) && !string.IsNullOrEmpty(customField.GetString("Product.CustomField.Value.Clean")) && customField.GetString("Product.CustomField.Name") != "Custom sticker") 77 { 78 if (!string.IsNullOrEmpty(customField.GetString("Document.FullPath"))) 79 { 80 downloadDocuments.Add(customField); 81 } 82 } 83 84 if (!String.IsNullOrEmpty(customField.GetString("Product.CustomField.Value.Clean")) && customField.GetString("Product.CustomField.Name") != "CustomSticker") 85 { 86 featuresCount++; 87 } 88 } 89 90 foreach (LoopItem customField in GetLoop("ProductCategories")) 91 { 92 foreach (LoopItem field in customField.GetLoop("ProductCategoryFields")) 93 { 94 if (!string.IsNullOrEmpty(field.GetString("Ecom:Product.CategoryField.Label")) && !string.IsNullOrEmpty(field.GetString("Ecom:Product.CategoryField.Value"))) 95 { 96 if (field.GetString("Ecom:Product.CategoryField.TypeID") == "9") 97 { 98 downloadDocuments.Add(field); 99 } 100 } 101 102 if (!String.IsNullOrEmpty(field.GetString("Ecom:Product.CategoryField.Value"))) 103 { 104 featuresCount++; 105 } 106 } 107 } 108 109 int relatedProductsPageSize = 4; 110 int relatedProductsColumnWidth = 3; 111 112 if (Pageview.Device.ToString() == "Mobile") 113 { 114 relatedProductsPageSize = 1; 115 relatedProductsColumnWidth = 12; 116 } 117 118 if (Pageview.Device.ToString() == "Tablet") 119 { 120 relatedProductsPageSize = 3; 121 relatedProductsColumnWidth = 4; 122 } 123 124 icons = Dynamicweb.Content.Items.Item.GetItemById("Icons", Pageview.Area.Item["Icons"].ToString()); 125 cartIcon = icons["CartIcon"] != null ? icons["CartIcon"].ToString() : "fas fa-shopping-cart"; 126 127 pageId = GetGlobalValue("Global:Page.ID").ToString(); 128 productVariantId = HttpContext.Current.Request.QueryString.Get("variantId") != null ? HttpContext.Current.Request.QueryString.Get("variantId") : ""; 129 string feedId = pageId + "&ProductID=" + productId + "&VariantID=" + productVariantId + "&Feed=True&redirect=false"; 130 string feedPageUrl = "/Default.aspx?ID=" + GetPageIdByNavigationTag("ProductsPage"); 131 feedFullUrl = feedPageUrl + "&PageSize=" + relatedProductsPageSize + "&ProdID=" + productId + "&feed=true"; 132 string variantsListPageSize = HttpContext.Current.Request.QueryString.Get("PageSize") != null ? HttpContext.Current.Request.QueryString.Get("PageSize") : "30"; 133 variantsFeedUrl = feedPageUrl + "&PageSize=" + variantsListPageSize + "&MainProductID=" + productId + "&OnlyShowVariants=true&feed=true"; 134 string productContainerId = "Product" + productId; 135 136 string siteURL = Dynamicweb.Context.Current.Request.Url.Scheme + "://" + Dynamicweb.Context.Current.Request.Url.Host; 137 138 productDetails = Dynamicweb.Content.Items.Item.GetItemById("ProductDetails", Pageview.Area.Item["ProductDetails"].ToString()); 139 renderVariantsAsProducts = productDetails["ProductDetailsRenderVariantsAsProductList"] != null && GetInteger("Ecom:Product.VariantCount") > 1 ? Converter.ToBoolean(productDetails["ProductDetailsRenderVariantsAsProductList"]) : false; 140 string imageSectionPosition = productDetails["ProductDetailsImageSectionPosition"] != null ? productDetails["ProductDetailsImageSectionPosition"].ToString() : "right-right"; 141 string fullDesctiptionLayout = productDetails["ProductDetailsFullDescriptionLayout"] != null ? productDetails["ProductDetailsFullDescriptionLayout"].ToString() : "section"; 142 string detailFieldsLayout = productDetails["ProductDetailsDetailFieldsLayout"] != null ? productDetails["ProductDetailsDetailFieldsLayout"].ToString() : "section"; 143 string categoryFieldsLayout = productDetails["ProductDetailsCategoryFieldsLayout"] != null ? productDetails["ProductDetailsCategoryFieldsLayout"].ToString() : "section"; 144 string downloadsFieldsLayout = productDetails["ProductDetailsDownloadsLayout"] != null ? productDetails["ProductDetailsDownloadsLayout"].ToString() : "section"; 145 string relatedProductsLayout = productDetails["ProductDetailsRelatedProductsLayout"] != null ? productDetails["ProductDetailsRelatedProductsLayout"].ToString() : "section"; 146 string variantsListLayout = productDetails["ProductDetailsVariantsListLayout"] != null ? productDetails["ProductDetailsVariantsListLayout"].ToString() : "section"; 147 148 if (!string.IsNullOrEmpty(GetString("Ecom:Product.LongDescription")) && fullDesctiptionLayout != "hide") 149 { 150 ProductSection descriptionSectionObject = new ProductSection(); 151 descriptionSectionObject.name = Translate("Description"); 152 descriptionSectionObject.id = "Description"; 153 descriptionSectionObject.helper = @ProductDescription(); 154 productSectionsList.Add(descriptionSectionObject); 155 } 156 } 157 @if (renderVariantsAsProducts && variantsListLayout != "hide") 158 { 159 ProductSection variantSectionObject = new ProductSection(); 160 variantSectionObject.name = Translate("Variants"); 161 variantSectionObject.id = "Variants"; 162 variantSectionObject.helper = @VariantsProductList(); 163 variantSectionObject.layoutType = variantsListLayout; 164 productSectionsList.Add(variantSectionObject); 165 } 166 @if (GetLoop("CustomFieldValues").Count > 0 && detailFieldsLayout != "hide") 167 { 168 ProductSection detailsSectionObject = new ProductSection(); 169 detailsSectionObject.name = Translate("Product information"); 170 detailsSectionObject.id = "ProductInformation"; 171 detailsSectionObject.helper = @ProductDetails(detailFieldsLayout); 172 detailsSectionObject.layoutType = detailFieldsLayout; 173 productSectionsList.Add(detailsSectionObject); 174 } 175 @if (categoryFieldsLayout != "hide") 176 { 177 foreach (LoopItem categoryGroup in GetLoop("ProductCategories")) 178 { 179 bool hasFields = categoryGroup.GetLoop("ProductCategoryFields").FirstOrDefault(cf => !string.IsNullOrEmpty(cf.GetString("Ecom:Product.CategoryField.Value"))) != null; 180 if (hasFields) 181 { 182 ProductSection categoryFieldsSectionObject = new ProductSection(); 183 categoryFieldsSectionObject.name = categoryGroup.GetString("Ecom:Product.Category.Name"); 184 categoryFieldsSectionObject.id = ToPascalCase(categoryGroup.GetString("Ecom:Product.Category.Name")); 185 categoryFieldsSectionObject.helper = @ProductCategory(categoryGroup.GetString("Ecom:Product.Category.Name"), categoryGroup, categoryFieldsLayout); 186 categoryFieldsSectionObject.layoutType = categoryFieldsLayout; 187 productSectionsList.Add(categoryFieldsSectionObject); 188 } 189 } 190 } 191 @if (downloadDocuments.Count > 0 && downloadsFieldsLayout != "hide") 192 { 193 ProductSection downloadsSectionObject = new ProductSection(); 194 downloadsSectionObject.name = Translate("Downloads"); 195 downloadsSectionObject.id = "Downloads"; 196 downloadsSectionObject.helper = @ProductDownloads(downloadsFieldsLayout); 197 downloadsSectionObject.layoutType = downloadsFieldsLayout; 198 productSectionsList.Add(downloadsSectionObject); 199 } 200 @if (relatedProductsLayout != "hide") 201 { 202 foreach (LoopItem relatedGroup in GetLoop("ProductRelatedGroups")) 203 { 204 string relatedGroupId = ToPascalCase(relatedGroup.GetString("Ecom:Product:RelatedGroup.Name")); 205 string relatedFeed = feedFullUrl + "&" + relatedGroupId + "=" + productId + "&GroupName=" + relatedGroupId; 206 207 ProductSection relatedSectionObject = new ProductSection(); 208 relatedSectionObject.name = relatedGroup.GetString("Ecom:Product:RelatedGroup.Name"); 209 relatedSectionObject.id = relatedGroupId; 210 if (relatedProductsLayout != "top") 211 { 212 relatedSectionObject.helper = @RelatedProducts(relatedSectionObject.name, relatedGroupId, relatedFeed); 213 } 214 else 215 { 216 relatedSectionObject.helper = @RelatedProductsMini(relatedSectionObject.name, relatedGroupId, relatedFeed); 217 } 218 relatedSectionObject.layoutType = relatedProductsLayout; 219 productSectionsList.Add(relatedSectionObject); 220 } 221 } 222 223 <!-- Trigger for the gallery modal --> 224 <input type="checkbox" id="GalleryModalTrigger" class="modal-trigger" /> 225 226 @if (!String.IsNullOrEmpty(GetString("Ecom:Product.ImageLarge.Default.Clean"))) 227 { 228 <!-- Gallery modal --> 229 <div class="modal-container"> 230 <label for="GalleryModalTrigger" id="GalleryModalOverlay" class="modal-overlay"></label> 231 <div class="modal modal--full" id="GalleryModal"> 232 <div class="modal__body modal__body--full"> 233 <div class="gallery-slider"> 234 <div class="gallery-slider__image"> 235 <img id="FullImage" src="@imagePrefix@GetString("Ecom:Product.ImageLarge.Default.Clean")" class="modal--full__img js-gallery-image" alt="@GetString("Ecom:Product.Name")" /> 236 </div> 237 <div class="gallery-slider__image-counter" id="FullImage_counter"></div> 238 <label class="gallery-slider__close-btn" for="GalleryModalTrigger"></label> 239 <button class="gallery-slider__previous-btn" id="FullImage_prev" onclick="Gallery.prevImage('FullImage')"></button> 240 <button class="gallery-slider__next-btn" id="FullImage_next" onclick="Gallery.nextImage('FullImage')"></button> 241 </div> 242 </div> 243 </div> 244 </div> 245 } 246 247 <div class="grid product grid--external-bleed-x u-padding-bottom--lg js-product" id="productGrid"> 248 @if (imageSectionPosition == "left-left" || imageSectionPosition == "left-right") 249 { 250 @* Image block with optional thumbs *@ 251 @ImageSection() 252 253 @* Primary product informations *@ 254 @MainProductInformation() 255 } 256 else 257 { 258 @* Primary product informations *@ 259 @MainProductInformation() 260 261 @* Image block with optional thumbs *@ 262 @ImageSection() 263 } 264 </div> 265 266 <div class="product__info tabs"> 267 @{ 268 bool firstTab = true; 269 foreach (ProductSection item in productSectionsList) 270 { 271 if (item.layoutType == "tab") 272 { 273 string isChecked = firstTab ? "checked" : ""; 274 firstTab = false; 275 <input type="radio" class="tabs__trigger" name="productTabs" id="@item.id" onchange="bLazy.revalidate()" @isChecked /> 276 } 277 } 278 } 279 280 <div class="tabs__list dw-mod"> 281 @foreach (ProductSection item in productSectionsList) 282 { 283 if (item.layoutType == "tab") 284 { 285 <label for="@item.id" class="tabs__label dw-mod">@item.name</label> 286 } 287 } 288 </div> 289 290 <div class="tabs__blocks dw-mod"> 291 @{ 292 foreach (ProductSection item in productSectionsList) 293 { 294 if (item.layoutType == "tab") 295 { 296 <div class="tabs__block dw-mod"> 297 <section class="product__section paragraph-container paragraph-container--full-width product__section--bordered dw-mod"> 298 <div class="center-container u-padding--lg dw-mod"> 299 @RenderSection(item.helper) 300 </div> 301 </section> 302 </div> 303 } 304 } 305 } 306 </div> 307 </div> 308 309 @foreach (ProductSection item in productSectionsList) 310 { 311 if (item.layoutType == "section") 312 { 313 <section class="product__section paragraph-container paragraph-container--full-width dw-mod"> 314 <div class="center-container u-padding--lg dw-mod"> 315 <h2>@item.name</h2> 316 @RenderSection(item.helper) 317 </div> 318 </section> 319 } 320 321 if (item.layoutType == "ribbon") 322 { 323 <section class="product__section product__section--ribbon paragraph-container paragraph-container--full-width dw-mod"> 324 <div class="center-container u-padding--lg dw-mod"> 325 <h2>@item.name</h2> 326 @RenderSection(item.helper) 327 </div> 328 </section> 329 } 330 } 331 332 @* Helpers for the main product area *@ 333 334 @helper ImageSection() 335 { 336 string imageSectionPosition = productDetails["ProductDetailsImageSectionPosition"] != null ? productDetails["ProductDetailsImageSectionPosition"].ToString() : "right-right"; 337 string imageSectionWidth = productDetails["ProductDetailsTopLayout"] != null ? productDetails["ProductDetailsTopLayout"].ToString() : "6"; 338 imageSectionWidth = imageSectionPosition == "left-left" || imageSectionPosition == "left-right" ? Converter.ToString(12 - Converter.ToInt32(productDetails["ProductDetailsTopLayout"])) : imageSectionWidth; 339 340 if (!String.IsNullOrEmpty(GetString("Ecom:Product.ImageLarge.Default.Clean"))) 341 { 342 <div class="grid__col-md-@imageSectionWidth grid__col-sm-@imageSectionWidth grid__col-xs-12 u-padding-bottom--lg"> 343 <div class="grid grid--bleed"> 344 @if (imageSectionPosition == "left-left" || imageSectionPosition == "right-left") 345 { 346 @Thumbnails() 347 @ProductDownloads() 348 @MainImage() 349 } 350 else 351 { 352 @MainImage() 353 @Thumbnails() 354 @ProductDownloads() 355 } 356 </div> 357 </div> 358 } 359 } 360 361 @helper Thumbnails() 362 { 363 <div class="grid__col-12 u-hidden-xxs dw-modn u-margin-right--lg u-margin-left--lg" style="margin-top: 2em;"> 364 <div class="product__thumbs dw-mod"> 365 <i class="fas fa-circle-notch fa-spin preloader js-remove-after-load"></i> <!--preloader--> 366 <div class="carousel js-carousel-container carousel--hidden dw-mod" id="leftCarousel"> 367 <div class="thumb-list carousel__container dw-mod"> 368 @*Main image thumb*@ 369 @{ 370 image = imagePrefix + GetString("Ecom:Product.ImageLarge.Default.Clean"); 371 thumb = thumbPrefix + GetString("Ecom:Product.ImageLarge.Default.Clean"); 372 } 373 374 @if (GetLoop("Ecom:Product.AlternativeImages").Count == 0) 375 { 376 <div class="carousel__slide carousel__slide--vertical dw-mod"> 377 <div class="thumb-list__item thumb-list__item--active dw-mod js-thumb js-gallery" data-for="Image_@productId" data-image="@image" onmouseover="Gallery.openImage(this)"> 378 <label for="GalleryModalTrigger"> 379 <img src="@thumb" alt="@GetString("Ecom:Product.Name")" class="js-gallery" data-for="FullImage" data-image="@image" onclick="Gallery.openImage(this)"> 380 </label> 381 </div> 382 </div> 383 } 384 385 @foreach (LoopItem alternativeImage in GetLoop("Ecom:Product.AlternativeImages")) 386 { 387 if (!String.IsNullOrEmpty(alternativeImage.GetString("Ecom:Product.AlternativeImages.Image"))) 388 { 389 image = imagePrefix + alternativeImage.GetString("Ecom:Product.AlternativeImages.Image"); 390 thumb = thumbPrefix + alternativeImage.GetString("Ecom:Product.AlternativeImages.Image"); 391 392 <div class="carousel__slide carousel__slide--horizontal dw-mod"> 393 <div class="thumb-list__item dw-mod js-thumb js-gallery" data-for="Image_@productId" data-image="@image" onmouseover="Gallery.openImage(this)"> 394 <label for="GalleryModalTrigger"> 395 <img src="@thumb" alt="@GetString("Ecom:Product.Name")" class="js-gallery" data-for="FullImage" data-image="@image" onclick="Gallery.openImage(this)"> 396 </label> 397 </div> 398 </div> 399 } 400 } 401 402 @foreach (LoopItem detail in GetLoop("Details")) 403 { 404 if (!String.IsNullOrEmpty(detail.GetString("Ecom:Product:Detail.Image.Clean"))) 405 { 406 string ext = Path.GetExtension(detail.GetString("Ecom:Product:Detail.Image.Clean")).ToLower(); 407 if (ext == ".jpg" || ext == ".jpeg" || ext == ".gif" || ext == ".png") 408 { 409 image = imagePrefix + detail.GetString("Ecom:Product:Detail.Image.Clean"); 410 thumb = thumbPrefix + detail.GetString("Ecom:Product:Detail.Image.Clean"); 411 412 <div class="carousel__slide carousel__slide--horizontal dw-mod"> 413 <div class="thumb-list__item dw-mod js-thumb js-gallery" data-for="Image_@productId" data-image="@image" onmouseover="Gallery.openImage(this)"> 414 <label for="GalleryModalTrigger"> 415 <img src="@thumb" alt="@GetString("Ecom:Product.Name")" class="js-gallery" data-for="FullImage" data-image="@image" onclick="Gallery.openImage(this)"> 416 </label> 417 </div> 418 </div> 419 } 420 } 421 } 422 </div> 423 <div class="js-carousel-data" data-carousel-slide-time="0" data-direction="horizontal" data-sliding-type="items" data-slides-in-view="5"> 424 <div class="carousel-prev-btn carousel-prev-btn--horizontal dw-mod" onclick="Carousel.GetPreviousSlide('leftCarousel')"></div> 425 <div class="carousel-next-btn carousel-next-btn--horizontal dw-mod" onclick="Carousel.GetNextSlide('leftCarousel')"></div> 426 </div> 427 </div> 428 </div> 429 </div> 430 } 431 432 @helper MainImage() 433 { 434 <div class="grid__col-12 u-margin-right--lg"> 435 <div class="stickers-container dw-mod"> 436 @{ 437 if (Converter.ToBoolean(Pageview.Area.Item["EnableSaleTags"])) 438 { 439 string contentType = Pageview.Area.Item["EcommerceSaleTagContentType"].ToString(); 440 string text = ""; 441 var currency = Dynamicweb.Ecommerce.Services.Currencies.GetDefaultCurrency(); 442 443 switch (contentType) 444 { 445 case "Name": 446 foreach (LoopItem discount in GetLoop("ProductDiscounts")) 447 { 448 text = discount.GetString("Ecom:Product.Discount.Name"); 449 <div class="stickers-container__tag stickers-container__tag--sale dw-mod">@text</div> 450 } 451 break; 452 case "Amount": 453 if (GetLoop("ProductDiscounts").Count > 0) 454 { 455 text = Dynamicweb.Ecommerce.Services.Currencies.Format(currency, GetDouble("Ecom:Product.Discount.Price.Price") - GetDouble("Ecom:Product.Price.Price")); 456 <div class="stickers-container__tag stickers-container__tag--sale dw-mod">@text</div> 457 } 458 break; 459 case "Percents": 460 double percents = 0; 461 foreach (LoopItem discount in GetLoop("ProductDiscounts")) 462 { 463 percents += discount.GetDouble("Ecom:Product.Discount.PercentWithoutVAT"); 464 } 465 if (percents > 0) 466 { 467 text = Math.Round(percents, 0) + "%"; 468 <div class="stickers-container__tag stickers-container__tag--sale dw-mod">@text</div> 469 } 470 break; 471 case "Amount and percents": 472 double amount = 0; 473 double percent = 0; 474 foreach (LoopItem discount in GetLoop("ProductDiscounts")) 475 { 476 if (discount.GetString("Ecom:Product.Discount.Type") == "PERCENT") 477 { 478 percent += discount.GetDouble("Ecom:Product.Discount.PercentWithoutVAT"); 479 } 480 else if (discount.GetString("Ecom:Product.Discount.Type") == "AMOUNT") 481 { 482 amount += discount.GetDouble("Ecom:Product.Discount.AmountWithVAT"); 483 } 484 } 485 if (percent > 0) 486 { 487 text = percent + "%"; 488 <div class="stickers-container__tag stickers-container__tag--sale dw-mod">@text</div> 489 } 490 if (amount > 0) 491 { 492 text = Dynamicweb.Ecommerce.Services.Currencies.Format(currency, amount); 493 <div class="stickers-container__tag stickers-container__tag--sale dw-mod">@text</div> 494 } 495 break; 496 default: 497 if (GetLoop("ProductDiscounts").Count > 0) 498 { 499 text = Translate("Sale!"); 500 <div class="stickers-container__tag stickers-container__tag--sale dw-mod">@text</div> 501 } 502 break; 503 } 504 } 505 506 if (Converter.ToBoolean(Pageview.Area.Item["NewStickersEnable"]) && GetDate("Ecom:Product.Created").AddDays(Converter.ToDouble(Pageview.Area.Item["NewStickersExpiration"])) > DateTime.Now) 507 { 508 <div class="stickers-container__tag stickers-container__tag--new dw-mod">@Translate("New!")</div> 509 } 510 511 if (!String.IsNullOrEmpty(GetString("Ecom:Product:Field.CustomSticker.Value"))) 512 { 513 <div class="stickers-container__tag stickers-container__tag--custom dw-mod">@GetString("Ecom:Product:Field.CustomSticker.Value")</div> 514 } 515 } 516 </div> 517 518 @{ 519 LoopItem ProductImage = null; 520 string imageSource = ""; 521 522 if (GetLoop("Ecom:Product.AlternativeImages") != null && GetLoop("Ecom:Product.AlternativeImages").Count > 0) 523 { 524 ProductImage = GetLoop("Ecom:Product.AlternativeImages")[0]; 525 imageSource = ProductImage.GetString("Ecom:Product.AlternativeImages.Image"); 526 } 527 } 528 @if (!string.IsNullOrEmpty(imageSource)) 529 { 530 <label for="GalleryModalTrigger" class="product__image-container"> 531 <img class="thumb-image-view product__image-container__image dw-mod b-lazy" src="/Files/Images/placeholder.gif" data-src="@imagePrefix@imageSource" alt="@GetString("Ecom:Product.Name")" id="Image_@productId" data-for="FullImage" data-number="0" onclick="Gallery.openImageByNum(this)" /> 532 </label> 533 } 534 else 535 { 536 <label for="GalleryModalTrigger" class="product__image-container"> 537 <img class="thumb-image-view product__image-container__image dw-mod b-lazy" src="/Files/Images/placeholder.gif" data-src="@imagePrefix@GetString("Ecom:Product.ImageLarge.Default.Clean")" alt="@GetString("Ecom:Product.Name")" id="Image_@productId" data-for="FullImage" data-number="0" onclick="Gallery.openImageByNum(this)" /> 538 </label> 539 } 540 </div> 541 } 542 543 @helper MainProductInformation() 544 { 545 string pageId = GetGlobalValue("Global:Page.ID").ToString(); 546 string currentPrice = GetString("Ecom:Product.Discount.Price.PriceFormatted") == GetString("Ecom:Product.Price.PriceFormatted") ? GetString("Ecom:Product.Price.PriceFormatted") : GetString("Ecom:Product.Discount.Price.PriceFormatted"); 547 string favoriteIcon = icons["FavoriteIcon"] != null ? "fas fa-" + icons["FavoriteIcon"].ToString() : "fas fa-star"; 548 string favoriteOutlineIcon = icons["FavoriteIcon"] != null ? "far fa-" + icons["FavoriteIcon"].ToString() : "far fa-star"; 549 550 <div class="grid__col-auto product__info dw-mod u-padding-bottom--lg"> 551 <div class="grid__cell u-margin-left--lg u-margin-right--lg"> 552 <div class="u-pull--left product__title dw-mod"> 553 <h1 class="u-no-margin">@GetString("Ecom:Product.Name") @GetString("Ecom:Product.SelectedVariantComboName")</h1> 554 </div> 555 <div class="u-pull--right"> 556 @if (Dynamicweb.Core.Converter.ToBoolean(GetGlobalValue("Global:Extranet.UserName")) && !renderVariantsAsProducts) 557 { 558 string favoriteId = "Favorite" + GetString("Ecom:Product.ID"); 559 <div id="@favoriteId" class="favorites favorites--md u-pull--right js-favorite-btn dw-mod"> 560 <div> 561 @{ string favorite = GetBoolean("Ecom:Product.IsProductInFavoriteList") ? favoriteIcon : favoriteOutlineIcon; } 562 <label for="FavoriteTrigger"><i class="@favorite fa-1_5x"></i></label> 563 </div> 564 <input type="checkbox" id="FavoriteTrigger" class="dropdown-trigger" /> 565 566 <div class="dropdown"> 567 <div class="dropdown__content dropdown__content--show-left dropdown__content--padding u-w220px dw-mod"> 568 <ul class="list list--clean dw-mod"> 569 @if (GetLoop("CustomerCenter.ListTypes").Count > 0) 570 { 571 foreach (LoopItem listType in GetLoop("CustomerCenter.ListTypes")) 572 { 573 foreach (LoopItem list in listType.GetLoop("CustomerCenter.ProductLists")) 574 { 575 string favLinkType = list.GetString("Ecom:Product.List.IsProductInThisList") == "True" ? list.GetString("Ecom:Product.RemoveFromThisList") : list.GetString("Ecom:Product.AddToThisListAction"); 576 string isInListIcon = list.GetString("Ecom:Product.List.IsProductInThisList") == "True" ? favoriteIcon : favoriteOutlineIcon; 577 <li> 578 <a href="@favLinkType" class="list__link u-no-underline dw-mod"><i class="@isInListIcon"></i> @list.GetValue("Ecom:CustomerCenter.List.Name")</a> 579 </li> 580 } 581 } 582 } 583 else 584 { 585 string favLinkType = GetString("Ecom:Product.AddToFavorites") + "&CCListType=0&CCCreateNewList=" + Translate("My favorites"); 586 string isInListIcon = favoriteOutlineIcon; 587 <li> 588 <a href="@favLinkType" class="list__link u-no-underline dw-mod"><i class="@isInListIcon"></i> @Translate("My favorites")</a> 589 </li> 590 } 591 </ul> 592 </div> 593 <label class="dropdown-trigger-off" for="FavoriteTrigger"></label> 594 </div> 595 </div> 596 } 597 </div> 598 <div class="u-clearfix"></div> 599 @ShortDescription() 600 </div> 601 602 @foreach (ProductSection item in productSectionsList) 603 { 604 if (item.layoutType == "top") 605 { 606 607 <div> 608 @RenderSection(item.helper) 609 </div> 610 611 } 612 } 613 614 @if (!renderVariantsAsProducts) 615 { 616 @Variants() 617 618 } 619 620 @BomProducts() 621 622 623 @if (!renderVariantsAsProducts) 624 { 625 @BuySection() 626 627 @DeliveryStockInfo() 628 629 } 630 </div> 631 } 632 633 @helper Variants() 634 { 635 string pageId = GetGlobalValue("Global:Page.ID").ToString(); 636 string variantSelection = !String.IsNullOrEmpty(HttpContext.Current.Request.QueryString.Get("variantId")) ? HttpContext.Current.Request.QueryString.Get("variantId").Replace(".", ",") : ""; 637 string hideHelpText = ""; 638 639 foreach (LoopItem variantgroup in GetLoop("VariantGroups")) 640 { 641 foreach (LoopItem variantoption in variantgroup.GetLoop("VariantAvailableOptions")) 642 { 643 if (variantoption.GetBoolean("Ecom:VariantOption.Selected")) 644 { 645 hideHelpText = "u-hidden"; 646 } 647 } 648 } 649 650 if (GetLoop("VariantGroups").Count > 0) 651 { 652 var variantCombinationsObject = new List<Array>(); 653 foreach (LoopItem variantcomb in GetLoop("VariantStockCombinations")) 654 { 655 string[] combinations = variantcomb.GetString("Ecom:VariantStockCombination.VariantID").Split('.'); 656 variantCombinationsObject.Add(combinations); 657 } 658 659 string combinationsJson = Newtonsoft.Json.JsonConvert.SerializeObject(variantCombinationsObject).Replace("\"", "\'"); 660 661 var variantGroupsObject = new List<List<String>>(); 662 foreach (LoopItem variantGroup in GetLoop("VariantGroups")) 663 { 664 var variantsObject = new List<String>(); 665 foreach (LoopItem variantOption in variantGroup.GetLoop("VariantAvailableOptions")) 666 { 667 variantsObject.Add(variantOption.GetString("Ecom:VariantOption.ID")); 668 } 669 variantGroupsObject.Add(variantsObject); 670 } 671 string variantsJson = Newtonsoft.Json.JsonConvert.SerializeObject(variantGroupsObject).Replace("\"", "\'"); 672 673 674 <div> 675 676 <div class="js-variants" data-total-variant-groups="@GetLoop("VariantGroups").Count" data-combinations="@combinationsJson" data-variants="@variantsJson" data-variant-selections="@variantSelection" data-selection-complete="UpdatePage" data-page-id="@pageId" data-product-id="@productId"> 677 @foreach (LoopItem variantGroup in GetLoop("VariantGroups")) 678 { 679 string groupId = variantGroup.GetString("Ecom:VariantGroup.ID"); 680 681 <div> 682 <div class="u-bold">@variantGroup.GetString("Ecom:VariantGroup.Name")</div> 683 <div> 684 @foreach (LoopItem variantOption in variantGroup.GetLoop("VariantAvailableOptions")) 685 { 686 string selected = variantOption.GetBoolean("Ecom:VariantOption.Selected") ? "checked" : ""; 687 688 if (!string.IsNullOrEmpty(variantOption.GetString("Ecom:VariantOption.ImgSmall.Clean"))) 689 { 690 string variantImage = "/Admin/Public/GetImage.ashx?width=100&amp;height=50&amp;crop=5&amp;Compression=75&amp;image=/Images/" + variantOption.GetString("Ecom: VariantOption.ImgSmall.Clean"); 691 <img data-variant-id="@variantOption.GetString("Ecom:VariantOption.ID")" data-variant-group="@groupId" src="@variantImage" onclick="MatchVariants.SelectThis(event)" alt="@variantOption.GetString("Ecom:VariantOption.Name")" title="@variantOption.GetString("Ecom:VariantOption.Name")" class="btn btn--tag @selected js-variant-option" data-check="@selected" /> 692 } 693 else 694 { 695 <button type="button" data-variant-id="@variantOption.GetString("Ecom:VariantOption.ID")" data-variant-group="@groupId" onclick="MatchVariants.SelectThis(event)" class="btn btn--tag @selected js-variant-option" data-check="@selected">@variantOption.GetString("Ecom:VariantOption.Name")</button> 696 } 697 } 698 </div> 699 </div> 700 } 701 </div> 702 <small class="js-help-text help-text @hideHelpText">@Translate("Please select variant!")</small> 703 </div> 704 } 705 } 706 707 @helper BomProducts() 708 { 709 if (GetLoop("BOMProducts").Count > 0) 710 { 711 712 <h2 class="section-title">@Translate("Including products")</h2> 713 foreach (LoopItem BOMProductItem in GetLoop("BOMProducts")) 714 { 715 string link = "/" + BOMProductItem.GetString("Ecom:Product.LinkGroup.Clean") + (!String.IsNullOrEmpty(BOMProductItem.GetString("Ecom:Product.VariantID")) ? "&VariantID=" + BOMProductItem.GetString("Ecom:Product.VariantID") : ""); 716 <div class="grid__col--border grid"> 717 <div class="grid__cell grid__cell--align-middle-left"> 718 <a href="@link" class="u-pull--left u-margin-right"> 719 <img src="/Admin/Public/GetImage.ashx?width=50&image=@BOMProductItem.GetString("Ecom:Product.ImageSmall.Default.Clean")&Compression=99" alt="@BOMProductItem.GetString("Ecom:Product.Name")" /> 720 </a> 721 <a href="@link">@BOMProductItem.GetString("Ecom:Product.Name")</a> 722 723 </div> 724 725 </div> 726 } 727 } 728 } 729 730 @helper BuySection() 731 { 732 string pageId = GetGlobalValue("Global:Page.ID").ToString(); 733 string variantId = HttpContext.Current.Request.QueryString.Get("variantId"); 734 string feedId = pageId + "&ProductID=" + productId + "&VariantID=" + variantId + "&Feed=True&redirect=false"; 735 736 737 <div class="product__price-actions js-handlebars-root dw-mod" id="PriceAndActions" data-template="PricesAndActionsTemplate" data-json-feed="/Default.aspx?ID=@feedId" data-preloader="minimal"></div> 738 <input type="hidden" value="@GetString("Ecom:Product.VariantID.Extented")" name="Variant" id="Variant_@GetString("Ecom:Product.ID")" /> 739 } 740 741 @helper DeliveryStockInfo() 742 { 743 bool hideStockState = productDetails["ProductDetailsHideStockState"] != null ? Converter.ToBoolean(productDetails["ProductDetailsHideStockState"]) : false; 744 bool hideDelivery = productDetails["ProductDetailsHideShipping"] != null ? Converter.ToBoolean(productDetails["ProductDetailsHideShipping"]) : false; 745 746 if (!onlyPreview && (!String.IsNullOrEmpty(GetString("Ecom:Product:Stock.Text")) || !String.IsNullOrEmpty(GetString("Ecom:Product:Stock.DeliveryText")))) 747 { 748 string stockIcon = GetInteger("Ecom:Product.Stock") > 0 ? "stock-icon--in" : "stock-icon--not"; 749 750 751 <div class="product__stock-delivery dw-mod"> 752 @if (!hideStockState) 753 { 754 @GetString("Ecom:Product:Stock.Text") <div class="stock-icon @stockIcon"></div> 755 } 756 757 @if (!String.IsNullOrEmpty(GetString("Ecom:Product:Stock.DeliveryText")) && !hideDelivery) 758 { 759 <span>@Translate("Shipping")</span> <span>@GetString("Ecom:Product:Stock.DeliveryText")</span> <span>@GetString("Ecom:Product:Stock.DeliveryUnit")</span> 760 } 761 </div> 762 } 763 } 764 765 @helper ShortDescription() 766 { 767 bool showDiscountPrice = GetString("Ecom:Product:Field.ShowDiscountPrice") == "True"; 768 string discountPrice = GetString("Ecom:Product:Field.DiscountPrice"); 769 string shortDescription = GetString("Ecom:Product.ShortDescription"); 770 bool hideProductNumber = productDetails["ProductDetailsHideProductNumber"] != null ? Converter.ToBoolean(productDetails["ProductDetailsHideProductNumber"]) : false; 771 string eanNumber = GetString("Ecom:Product:Field.SP_EAN"); 772 string colorFinish = GetString("Ecom:Product:Field.ColorFinish"); 773 string material = GetString("Ecom:Product:Field.Material"); 774 string height = GetString("Ecom:Product:Field.Height"); 775 string width = GetString("Ecom:Product:Field.Width"); 776 string depth = GetString("Ecom:Product:Field.Depth"); 777 string weight = GetString("Ecom:Product.Weight"); 778 string warranty = GetString("Ecom:Product:Field.Warranty"); 779 string countryOfOrigin = GetString("Ecom:Product:Field.CountryOfOrigin"); 780 string kelvinImageFile = "/Files/Images/Ecom/Kelvin/" + GetString("Ecom:Product.ID") + "_kelvin.jpg"; 781 string kelvinAbsolutePath = System.Web.HttpContext.Current.Server.MapPath("~/" + kelvinImageFile); 782 string kelvinImageGetImage = "/Admin/Public/GetImage.ashx?image=" + kelvinImageFile + "&width=300&crop=5"; 783 784 if (!String.IsNullOrEmpty(shortDescription)) 785 { 786 <div class="introduction-text"> 787 @shortDescription 788 </div> 789 } 790 791 <div> 792 <table> 793 @if (showDiscountPrice && stringIsNotNullEmptyOrZero(discountPrice)) 794 { 795 <tr> 796 <td>@Translate("Product field: Vejledende pris", "Vejl, Salgspris")</td> 797 <td>@addAfterFix(discountPrice, "kr.")</td> 798 </tr> 799 } 800 @if (!hideProductNumber) 801 { 802 <tr> 803 <td>@Translate("Product field: Number", "Varenr.")</td> 804 <td>@GetString("Ecom:Product.Number")</td> 805 </tr> 806 } 807 @if (!String.IsNullOrEmpty(eanNumber)) 808 { 809 <tr> 810 <td>@Translate("Product field: EAN", "EAN")</td> 811 <td>@eanNumber</td> 812 </tr> 813 } 814 @if (!String.IsNullOrEmpty(colorFinish) && areaID != 1019) 815 { 816 <tr> 817 <td>@Translate("Product field: Color finish", "Farve")</td> 818 <td>@colorFinish</td> 819 </tr> 820 } 821 @if (!String.IsNullOrEmpty(material) && areaID != 1019) 822 { 823 <tr> 824 <td>@Translate("Product field: Material", "Matriale")</td> 825 <td>@material</td> 826 </tr> 827 } 828 @if (stringIsNotNullEmptyOrZero(height)) 829 { 830 <tr> 831 <td>@Translate("Product field: Height", "Højde")</td> 832 <td>@addAfterFix(height, "cm")</td> 833 </tr> 834 } 835 @if (stringIsNotNullEmptyOrZero(width)) 836 { 837 <tr> 838 <td>@Translate("Product field: Width", "Bredde")</td> 839 <td>@addAfterFix(width, "cm")</td> 840 </tr> 841 } 842 @if (stringIsNotNullEmptyOrZero(depth)) 843 { 844 <tr> 845 <td>@Translate("Product field: Depth", "Dybde")</td> 846 <td>@addAfterFix(depth, "cm")</td> 847 </tr> 848 } 849 @if (stringIsNotNullEmptyOrZero(weight)) 850 { 851 <tr> 852 <td>@Translate("Product field: Weight", "Vægt")</td> 853 <td>@addAfterFix(weight, "kg")</td> 854 </tr> 855 } 856 @if (stringIsNotNullEmptyOrZero(warranty)) 857 { 858 <tr> 859 <td>@Translate("Product field: Warranty", "Garanti")</td> 860 <td>@addAfterFix(warranty, "År")</td> 861 </tr> 862 } 863 @if (File.Exists(kelvinAbsolutePath)) 864 { 865 <tr> 866 <td>@Translate("Product field: Kelvin", "Kelvin")</td> 867 <td><img src="@kelvinImageGetImage" alt="kelvin" /></td> 868 </tr> 869 } 870 </table> 871 </div> 872 } 873 874 @helper ProductDownloads() 875 { 876 string manualPdfFile = "/Files/Images/Ecom/Manualer/" + GetString("Ecom:Product.ID") + "_manual.pdf"; 877 string manualAbsolutePath = System.Web.HttpContext.Current.Server.MapPath("~/" + manualPdfFile); 878 string drawingPdfFile = "/Files/Images/Ecom/Stregtegninger/" + GetString("Ecom:Product.ID") + "_stregtegning.pdf"; 879 string drawingAbsolutePath = System.Web.HttpContext.Current.Server.MapPath("~/" + drawingPdfFile); 880 string energyLabelPdfFile = "/Files/Images/Ecom/Energilabel/" + GetString("Ecom:Product.ID") + "_energilabel.pdf"; 881 string energyLabelAbsolutePath = System.Web.HttpContext.Current.Server.MapPath("~/" + energyLabelPdfFile); 882 883 884 <div class="u-margin-left--lg"style="margin-top: 2em;"> 885 @if (File.Exists(manualAbsolutePath)) 886 { 887 <div class="manualpdf"> 888 <a class="btn" href="@manualPdfFile" download><i class="fal fa-download"></i>&nbsp;&nbsp;@Translate("Product field: Monteringsvejledning", "Monteringsvejledning")</a> 889 </div> 890 } 891 @if (File.Exists(drawingAbsolutePath)) 892 { 893 <div class="drawingpdf"> 894 <a class="btn" href="@drawingPdfFile" download><i class="fal fa-download"></i>&nbsp;&nbsp;@Translate("Product field: Stregtegning", "Stregtegning")</a> 895 </div> 896 } 897 @if (File.Exists(energyLabelAbsolutePath)) 898 { 899 <div class="ernergypdf"> 900 <a class="btn" href="@energyLabelPdfFile" download><i class="fal fa-download"></i>&nbsp;&nbsp;@Translate("Product field: Energilabel", "Energilabel")</a> 901 </div> 902 } 903 </div> 904 } 905 906 @* Helpers for the details product area *@ 907 908 @helper ProductDescription() 909 { 910 <div class="product__description dw-mod"> 911 @GetString("Ecom:Product.LongDescription") 912 </div> 913 } 914 915 @helper VariantsProductList() 916 { 917 <div class="js-handlebars-root" id="VariantsList" data-template="VariantProductsContainer" data-json-feed="@variantsFeedUrl" data-preloader="minimal"></div> 918 } 919 920 @helper ProductDetails(string layoutType) 921 { 922 string viewType = productDetails["ProductDetailsDetailFieldsView"] != null ? productDetails["ProductDetailsDetailFieldsView"].ToString() : "grid"; 923 924 if (viewType != "table") 925 { 926 <div class="grid grid--external-bleed-x u-margin-bottom--lg"> 927 @ProductDetailsFields(GetLoop("CustomFieldValues"), viewType) 928 </div> 929 } 930 else 931 { 932 string tableWidth = layoutType != "top" ? "grid__col-md-6" : "grid__col-md-12"; 933 934 <div class="grid grid--external-bleed-x u-margin-bottom--lg"> 935 <div class="@tableWidth grid__col-sm-12 grid__col-xs-12"> 936 <table> 937 @ProductDetailsFields(GetLoop("CustomFieldValues"), viewType) 938 </table> 939 </div> 940 </div> 941 } 942 } 943 944 @helper ProductDetailsFields(List<LoopItem> fieldsLoop, string viewType) 945 { 946 foreach (LoopItem customField in fieldsLoop) 947 { 948 string fieldValue = customField.GetString("Product.CustomField.Value.Clean"); 949 fieldValue = fieldValue == "False" ? Translate("No") : fieldValue; 950 fieldValue = fieldValue == "True" ? Translate("Yes") : fieldValue; 951 952 if (customField.GetLoop("Product.CustomField.Options").Count > 0) 953 { 954 fieldValue = customField.GetString("Product.CustomField.Label"); 955 } 956 957 if (!string.IsNullOrEmpty(customField.GetString("Product.CustomField.Name")) && !string.IsNullOrEmpty(fieldValue) && customField.GetString("Product.CustomField.Name") != "Custom sticker") 958 { 959 if (string.IsNullOrEmpty(customField.GetString("Document.FullPath"))) 960 { 961 @RenderFieldItem(customField.GetString("Product.CustomField.Name"), fieldValue, viewType); 962 } 963 } 964 } 965 } 966 967 @helper ProductCategory(string name, LoopItem categoryGroup, string layoutType) 968 { 969 string viewType = productDetails["ProductDetailsCategoryFieldsView"] != null ? productDetails["ProductDetailsCategoryFieldsView"].ToString() : "grid"; 970 971 if (viewType != "table") 972 { 973 <div class="grid grid--external-bleed-x u-margin-bottom--lg"> 974 @ProductCategoryFields(categoryGroup.GetLoop("ProductCategoryFields"), viewType) 975 </div> 976 } 977 else 978 { 979 string tableWidth = layoutType != "top" ? "grid__col-md-6" : "grid__col-md-12"; 980 981 <div class="grid grid--external-bleed-x u-margin-bottom--lg"> 982 <div class="@tableWidth grid__col-sm-12 grid__col-xs-12"> 983 <table> 984 @ProductCategoryFields(categoryGroup.GetLoop("ProductCategoryFields"), viewType) 985 </table> 986 </div> 987 </div> 988 } 989 } 990 991 @helper ProductCategoryFields(List<LoopItem> fieldsLoop, string viewType) 992 { 993 foreach (LoopItem categoryField in fieldsLoop) 994 { 995 string fieldValue = categoryField.GetString("Ecom:Product.CategoryField.Value"); 996 fieldValue = fieldValue == "False" ? Translate("No") : fieldValue; 997 fieldValue = fieldValue == "True" ? Translate("Yes") : fieldValue; 998 999 if (!string.IsNullOrEmpty(categoryField.GetString("Ecom:Product.CategoryField.Label")) && !string.IsNullOrEmpty(fieldValue)) 1000 { 1001 if (categoryField.GetString("Ecom:Product.CategoryField.TypeID") != "9") 1002 { 1003 if (categoryField.GetString("Ecom:Product.CategoryField.TypeID") == "15") 1004 { 1005 @RenderFieldItem(categoryField.GetString("Ecom:Product.CategoryField.Label"), categoryField.GetString("Ecom:Product.CategoryField.OptionLabel"), viewType); 1006 } 1007 else if (categoryField.GetString("Ecom:Product.CategoryField.TypeID") == "8") 1008 { 1009 @RenderFieldItem(categoryField.GetString("Ecom:Product.CategoryField.Label"), fieldValue, viewType, "link"); 1010 } 1011 else 1012 { 1013 @RenderFieldItem(categoryField.GetString("Ecom:Product.CategoryField.Label"), fieldValue, viewType); 1014 } 1015 } 1016 } 1017 } 1018 } 1019 1020 @helper ProductDownloads(string layoutType) 1021 { 1022 string viewType = productDetails["ProductDetailsDownloadsView"] != null ? productDetails["ProductDetailsDownloadsView"].ToString() : "grid"; 1023 1024 if (viewType != "table") 1025 { 1026 <div class="grid grid--external-bleed-x u-margin-bottom--lg"> 1027 @ProductDownloadsFields(downloadDocuments, viewType) 1028 </div> 1029 } 1030 else 1031 { 1032 string tableWidth = layoutType != "top" ? "grid__col-md-6" : "grid__col-md-12"; 1033 1034 <div class="grid grid--external-bleed-x u-margin-bottom--lg"> 1035 <div class="@tableWidth grid__col-sm-12 grid__col-xs-12"> 1036 <table> 1037 @ProductDownloadsFields(downloadDocuments, viewType) 1038 </table> 1039 </div> 1040 </div> 1041 } 1042 } 1043 1044 @helper ProductDownloadsFields(List<LoopItem> fieldsLoop, string viewType) 1045 { 1046 foreach (LoopItem document in fieldsLoop) 1047 { 1048 string fieldValue; 1049 if (!string.IsNullOrEmpty(document.GetString("Document.FullPath"))) 1050 { 1051 fieldValue = document.GetString("Product.CustomField.Value.Clean"); 1052 @RenderFieldItem(fieldValue, document.GetString("Document.FullPath"), viewType, "download") 1053 } 1054 1055 if (document.GetString("Ecom:Product.CategoryField.TypeID") == "9") 1056 { 1057 fieldValue = document.GetString("Ecom:Product.CategoryField.Value"); 1058 @RenderFieldItem(fieldValue, fieldValue, viewType, "download") 1059 } 1060 } 1061 } 1062 1063 @helper RenderFieldItem(string name, string value, string viewType, string fieldType = "clean") 1064 { 1065 if (viewType != "table") 1066 { 1067 string fieldColumns = viewType == "list" ? "12" : "4"; 1068 <div class="grid__col-md-@fieldColumns u-margin-bottom"> 1069 <div class="u-bold"> 1070 @name 1071 </div> 1072 <div> 1073 @RenderFieldItemContent(name, value, fieldType) 1074 </div> 1075 </div> 1076 } 1077 else 1078 { 1079 <tr> 1080 <td class="u-bold">@name</td> 1081 <td> 1082 @RenderFieldItemContent(name, value, fieldType) 1083 </td> 1084 </tr> 1085 } 1086 } 1087 1088 @helper RenderFieldItemContent(string name, string value, string fieldType = "clean") 1089 { 1090 if (fieldType == "link") 1091 { 1092 <a target="_blank" href="@value">@value</a> 1093 } 1094 else if (fieldType == "download") 1095 { 1096 FileInfo info = new FileInfo(Dynamicweb.Core.SystemInformation.MapPath(value)); 1097 1098 if (info.Exists) 1099 { 1100 <a href="@name" download title="@Translate("Download")" class="product__document dw-mod">@getIconForFile(value)</a> 1101 <div class="product__document-info dw-mod"> 1102 <a href="@name" download title="@Translate("Download")" class="product__document dw-mod">@Path.GetFileName(value)</a> 1103 <small class="u-block u-margin-top">@ConvertBytes(info.Length)</small> 1104 </div> 1105 } 1106 } 1107 else 1108 { 1109 @value 1110 } 1111 } 1112 1113 @helper RelatedProducts(string name, string groupId, string relatedFeedUrl) 1114 { 1115 <div class="js-handlebars-root" id="ProductList_@groupId" data-template="ProductContainer" data-pre-render-template="ProductPreRenderContainer" data-json-feed="@relatedFeedUrl" data-preloader="minimal"></div> 1116 } 1117 1118 @helper RelatedProductsMini(string name, string groupId, string relatedFeedUrl) 1119 { 1120 <div class="js-handlebars-root" id="ProductList_@groupId" data-template="ProductContainerMini" data-pre-render-template="ProductPreRenderContainer" data-json-feed="@relatedFeedUrl" data-preloader="minimal"></div> 1121 } 1122 1123 <script id="PricesAndActionsTemplate" type="text/x-template"> 1124 {{#.}} 1125 @if (!onlyPreview) 1126 { 1127 <div class="product__price-actions__price dw-mod u-margin-bottom--lg"> 1128 <div class="before-price {{onSale}} dw-mod">{{discount}}</div> 1129 <div class="price price--product-page dw-mod">{{price}}</div> 1130 </div> 1131 <div class="buttons-collection buttons-collection--right product__price-actions__actions dw-mod"> 1132 <input type="checkbox" id="UnitOptions_{{id}}" class="dropdown-trigger" /> 1133 <div class="dropdown u-w150px u-w80px--xs dw-mod {{hasUnits}}"> 1134 <label class="dropdown__header dropdown__btn dw-mod" for="UnitOptions_{{id}}">{{unitName}}</label> 1135 <div id="unitOptions" class="dropdown__content dw-mod"> 1136 {{#unitOptions}} 1137 {{>UnitOption}} 1138 {{/unitOptions}} 1139 </div> 1140 <label class="dropdown-trigger-off" for="UnitOptions_{{id}}"></label> 1141 </div> 1142 <input type="hidden" value="{{unitId}}" name="Unit" id="Unit_{{id}}" /> 1143 <input type="number" class="u-w70px" id="Quantity_{{id}}" name="Quantity" value="1" min="1"> 1144 <button type="button" id="CartButton_{{id}}" class="btn btn--primary btn--condensed u-no-margin dw-mod js-cart-btn" name="submit" onclick="Cart.AddToCart(event, '{{productId}}', document.getElementById('Quantity_{{id}}').value, 'Unit_{{id}}', 'Variant_{{productId}}');"><i class="@cartIcon"></i><span class="u-hidden-xs u-hidden-xxs"> @Translate("Add to cart")</span></button> 1145 </div> 1146 } 1147 else 1148 { 1149 <button type="button" id="CartButton_{{id}}" class="u-hidden"></button> 1150 } 1151 {{/.}} 1152 </script> 1153 1154 <script id="Units" type="text/x-template"> 1155 <div class="dropdown__item dw-mod" onclick="HandlebarsBolt.UpdateContent('PriceAndActions', '/Default.aspx?ID=@feedId&UnitID={{value}}')">{{name}}</div> 1156 </script> 1157 1158 1159 @* Script templates for related products *@ 1160 <script id="ProductPreRenderContainer" type="text/x-template"> 1161 <div class="u-h600px u-full-width"> 1162 <div class="grid"> 1163 <div class="grid__col-12"> 1164 <div class="pre-render-element pre-render-element--md"></div> 1165 </div> 1166 </div> 1167 </div> 1168 </script> 1169 1170 <script id="ProductContainer" type="text/x-template"> 1171 {{#.}} 1172 <div class="u-min-h400px u-full-width"> 1173 <div class="grid"> 1174 <div class="grid__col-45px grid__col--bleed-x"> 1175 <div class="grid__cell grid__cell--align-middle-left"> 1176 <button class="btn btn--condensed btn--clean {{prevdisabled}} dw-mod" onclick="HandlebarsBolt.UpdateContent('ProductList_{{groupName}}', '{{prevPage}}')" {{prevdisabled}}><i class="fas fa-chevron-left fa-2x"></i></button> 1177 </div> 1178 </div> 1179 <div class="grid__col-auto grid__col--bleed-x"> 1180 <div id="ProductsContainer" class="grid product-list dw-mod"> 1181 {{#ProductsContainer}} 1182 <div id="Product{{productId}}" class="grid__col-@relatedProductsColumnWidth product-list__grid-item dw-mod"> 1183 {{#Product}} 1184 <div class="grid__cell product-list__grid-item__image dw-mod {{noImage}}"> 1185 <div class="stickers-container dw-mod"> 1186 {{#Stickers}} 1187 {{>Sticker}} 1188 {{/Stickers}} 1189 </div> 1190 <a href="{{link}}" onclick="Scroll.SavePosition(event)"><img class="grid__cell-img grid__cell-img--centered b-lazy" src="/Files/Images/placeholder.gif" data-src="/Admin/Public/GetImage.ashx?width=300&amp;height=300&amp;crop=5&amp;Compression=75&amp;image={{image}}" alt="{{name}}" /></a> 1191 </div> 1192 1193 <div class="grid__cell product-list__grid-item__price-info {{shortGridInfo}} dw-mod"> 1194 <a href="{{link}}" onclick="Scroll.SavePosition(event)" title="{{name}}"><h6 class="u-condensed-text">{{name}}</h6></a> 1195 <div class="item-number dw-mod">{{number}}</div> 1196 @if (!onlyPreview) 1197 { 1198 <div class="price dw-mod">{{price}}</div> 1199 <div class="before-price {{onSale}} dw-mod">{{discount}}</div> 1200 } 1201 </div> 1202 1203 <div class="product-list__grid-item__footer dw-mod"> 1204 <div class="u-ta-center"> 1205 <a href="{{link}}" id="CartButton_{{id}}" class="btn btn--secondary btn--full u-no-margin dw-mod">@Translate("View")</a> 1206 </div> 1207 </div> 1208 {{/Product}} 1209 </div> 1210 {{/ProductsContainer}} 1211 </div> 1212 </div> 1213 <div class="grid__col-45px grid__col--bleed-x"> 1214 <div class="grid__cell grid__cell--align-middle-right"> 1215 <button class="btn btn--condensed btn--clean {{nextdisabled}} dw-mod" onclick="HandlebarsBolt.UpdateContent('ProductList_{{groupName}}', '{{nextPage}}')" {{nextdisabled}}><i class="fas fa-chevron-right fa-2x"></i></button> 1216 </div> 1217 </div> 1218 </div> 1219 </div> 1220 {{/.}} 1221 </script> 1222 1223 <script id="ProductContainerMini" type="text/x-template"> 1224 {{#.}} 1225 <div class="u-full-width"> 1226 <div class="grid"> 1227 <div class="grid__col-45px grid__col--bleed-x"> 1228 <div class="grid__cell grid__cell--align-middle-left"> 1229 <button class="btn btn--condensed btn--clean {{prevdisabled}} dw-mod" onclick="HandlebarsBolt.UpdateContent('ProductList_{{groupName}}', '{{prevPage}}')" {{prevdisabled}}><i class="fas fa-chevron-left fa-2x"></i></button> 1230 </div> 1231 </div> 1232 <div class="grid__col-auto grid__col--bleed-x"> 1233 <div id="ProductsContainer" class="grid product-list dw-mod"> 1234 {{#ProductsContainer}} 1235 <div id="Product{{productId}}" class="grid__col-@relatedProductsColumnWidth product-list__grid-item dw-mod"> 1236 {{#Product}} 1237 <div class="grid__cell product-list__grid-item__image dw-mod {{noImage}}"> 1238 <div class="stickers-container dw-mod"> 1239 {{#Stickers}} 1240 {{>Sticker}} 1241 {{/Stickers}} 1242 </div> 1243 <a href="{{link}}" onclick="Scroll.SavePosition(event)"><img class="grid__cell-img grid__cell-img--centered b-lazy" src="/Files/Images/placeholder.gif" data-src="/Admin/Public/GetImage.ashx?width=300&amp;height=300&amp;crop=5&amp;Compression=75&amp;image={{image}}" alt="{{name}}" /></a> 1244 </div> 1245 1246 <div class="grid__cell product-list__grid-item__price-info {{shortGridInfo}} dw-mod"> 1247 <a href="{{link}}" onclick="Scroll.SavePosition(event)" title="{{name}}"><h6 class="u-condensed-text">{{name}}</h6></a> 1248 <div class="item-number dw-mod">{{number}}</div> 1249 @if (!onlyPreview) 1250 { 1251 <div>{{price}}</div> 1252 <div class="before-price {{onSale}} dw-mod">{{discount}}</div> 1253 } 1254 </div> 1255 {{/Product}} 1256 </div> 1257 {{/ProductsContainer}} 1258 </div> 1259 </div> 1260 <div class="grid__col-45px grid__col--bleed-x"> 1261 <div class="grid__cell grid__cell--align-middle-right"> 1262 <button class="btn btn--condensed btn--clean {{nextdisabled}} dw-mod" onclick="HandlebarsBolt.UpdateContent('ProductList_{{groupName}}', '{{nextPage}}')" {{nextdisabled}}><i class="fas fa-chevron-right fa-2x"></i></button> 1263 </div> 1264 </div> 1265 </div> 1266 </div> 1267 {{/.}} 1268 </script> 1269 1270 <script id="Sticker" type="text/x-template"> 1271 <div class="stickers-container__tag {{className}} dw-mod">{{text}}</div> 1272 </script> 1273 1274 1275 @* Script templates for variant products *@ 1276 1277 <script id="VariantProductsContainer" type="text/x-template"> 1278 {{#.}} 1279 <div class=""> 1280 <table id="VariantsProductsContainer" class="table u-position-relative dw-mod"> 1281 <thead> 1282 <tr> 1283 <td width="75">&nbsp;</td> 1284 <td>@Translate("Product")</td> 1285 {{#AvailableCustomFields}} 1286 {{>TableFieldNameTemplate}} 1287 {{/AvailableCustomFields}} 1288 @if (Converter.ToBoolean(productDetails["ProductDetailsRenderVariantGroupsInTable"])) 1289 { 1290 foreach (LoopItem variantgroup in GetLoop("VariantGroups")) 1291 { 1292 <td>@variantgroup.GetString("Ecom:VariantGroup.Name")</td> 1293 } 1294 } 1295 <td width="320">&nbsp;</td> 1296 </tr> 1297 </thead> 1298 1299 <tbody id="VariantProductListContainer" data-template="VariantProductItemContainer" data-save-cookie="true"> 1300 {{#ProductsContainer}} 1301 {{>VariantProductItemContainer}} 1302 {{/ProductsContainer}} 1303 </tbody> 1304 </table> 1305 </div> 1306 1307 <div class="grid"> 1308 <div class="grid__col-12 grid__col--bleed-y"> 1309 <button type="button" id="LoadMoreButton" class="btn btn--primary btn--full {{nextdisabled}} dw-mod" data-current="{{currentPage}}" data-page-size="{{pageSize}}" data-total="{{totalPages}}" data-container="VariantProductListContainer" data-feed-url="@variantsFeedUrl{{loadMoreFeedParams}}" onclick="LoadMore.Next(this)" {{nextdisabled}}>@Translate("Load") @Translate("more")</button> 1310 </div> 1311 </div> 1312 {{/.}} 1313 </script> 1314 1315 <script id="VariantProductItemContainer" type="text/x-template"> 1316 {{#.}} 1317 <tr id="VariantProduct{{id}}" data-template="VariantProductItem" data-preloader="overlay" style="z-index: {{zIndex}}"> 1318 {{#Product}} 1319 {{>VariantProductItem}} 1320 {{/Product}} 1321 </tr> 1322 {{/.}} 1323 </script> 1324 1325 <script id="VariantProductItem" type="text/x-template"> 1326 {{#.}} 1327 <td width="75"> 1328 <div class="lightbox u-hidden-xxs"> 1329 <a href="{{link}}" onclick="Scroll.SavePosition(event)"> 1330 <img class="lightbox__image {{noImage}}" src="/Admin/Public/GetImage.ashx?width=220&amp;height=220&amp;crop=5&amp;Compression=75&amp;image={{image}}" alt="{{name}}" /> 1331 <div class="u-margin-right {{noImage}}"> 1332 <img src="/Admin/Public/GetImage.ashx?width=75&amp;height=55&amp;crop=5&FillCanvas=true&amp;Compression=75&amp;image={{image}}" alt="{{name}}" /> 1333 </div> 1334 </a> 1335 </div> 1336 </td> 1337 <td class="u-va-middle"> 1338 <a href="{{link}}" onclick="Scroll.SavePosition(event)" title="{{name}}"><h6 class="u-no-margin">{{name}}</h6></a> 1339 <div class="item-number item-number--compressed dw-mod"> 1340 {{number}} 1341 @if (!onlyPreview) 1342 { 1343 <span> 1344 <span class="stock-icon {{stockState}} u-no-margin dw-mod" title="{{stockText}}"></span> {{stockText}}{{deliveryText}} 1345 </span> 1346 } 1347 else 1348 { 1349 <div class="grid__cell-footer stickers-container stickers-container--block dw-mod"> 1350 {{#Stickers}} 1351 {{>MiniSticker}} 1352 {{/Stickers}} 1353 </div> 1354 } 1355 </div> 1356 </td> 1357 {{#CustomFields}} 1358 {{>TableFieldNameTemplate}} 1359 {{/CustomFields}} 1360 @if (Converter.ToBoolean(productDetails["ProductDetailsRenderVariantGroupsInTable"])) 1361 { 1362 <text> 1363 {{#VariantSelectionNames}} 1364 {{>TableFieldNameTemplate}} 1365 {{/VariantSelectionNames}} 1366 </text> 1367 } 1368 <td width="320" class="u-va-middle"> 1369 @if (onlyPreview) 1370 { 1371 <div class="u-hidden-sm"> 1372 <div class="u-full-width u-ta-right u-padding-right"> 1373 <div class="before-price {{onSale}} before-price--micro dw-mod">{{discount}}</div> 1374 <div class="price price--product-list price--micro dw-mod">{{price}}</div> 1375 </div> 1376 </div> 1377 } 1378 else 1379 { 1380 <div class="grid grid--align-center grid--justify-end"> 1381 <div class="favorites u-margin-right {{hasVariants}} dw-mod" {{hasVariants}}> 1382 {{#Favorite}} 1383 {{>FavoriteTemplate}} 1384 {{/Favorite}} 1385 </div> 1386 <div class="u-margin-right"> 1387 <input type="checkbox" id="UnitOptions_{{id}}" class="dropdown-trigger" /> 1388 <div class="dropdown u-w120px {{hasUnits}} dw-mod"> 1389 <label class="dropdown__header dropdown__btn dw-mod" for="UnitOptions_{{id}}">{{unitName}}</label> 1390 <div id="unitOptions" class="dropdown__content dw-mod"> 1391 {{#unitOptions}} 1392 {{>UnitOption}} 1393 {{/unitOptions}} 1394 </div> 1395 <label class="dropdown-trigger-off" for="UnitOptions_{{id}}"></label> 1396 </div> 1397 <input type="hidden" value="{{unitId}}" name="Unit{{id}}" id="Unit_{{id}}" /> 1398 <input type="hidden" value="{{variantid}}" name="VariantID{{id}}" id="Variant_{{id}}" /> 1399 </div> 1400 <div class="u-margin-right u-hidden-xs u-hidden-xxs"> 1401 <div class="before-price before-price--micro {{onSale}} dw-mod">{{discount}}</div> 1402 <div class="price price--condensed price--product-list dw-mod">{{price}}</div> 1403 </div> 1404 <div> 1405 <input type="number" class="u-w80px u-no-margin u-margin-right" id="Quantity_{{id}}" name="Quantity{{id}}" value="1" min="1"> 1406 </div> 1407 <div> 1408 <button type="button" id="CartButton_{{id}}" class="btn btn--primary btn--condensed u-no-margin dw-mod {{hasVariants}}" name="submit" onclick="Cart.AddToCart(event, '{{productId}}', document.getElementById('Quantity_{{id}}').value, 'Unit_{{id}}', 'Variant_{{id}}');" {{hasVariants}}><i class="@cartIcon"></i></button> 1409 </div> 1410 </div> 1411 } 1412 </td> 1413 {{/.}} 1414 </script> 1415 1416 <script id="TableFieldNameTemplate" type="text/x-template"> 1417 <td class="u-va-middle">{{name}}</td> 1418 </script> 1419 1420 <script id="TableFieldValueTemplate" type="text/x-template"> 1421 <td class="u-va-middle">{{value}}</td> 1422 </script> 1423 1424 <script id="MiniSticker" type="text/x-template"> 1425 <div class="stickers-container__tag stickers-container__tag--micro {{className}} dw-mod">{{text}}</div> 1426 </script> 1427 1428 @* Favorites templates *@ 1429 1430 <script id="FavoriteTemplate" type="text/x-template"> 1431 <div class="favorites-list u-ta-left"> 1432 <label for="FavoriteTrigger_{{id}}" class="u-no-margin"><i class="{{favoriteIcon}} fa-1_5x"></i></label> 1433 <input type="checkbox" id="FavoriteTrigger_{{id}}" class="dropdown-trigger" /> 1434 <div class="dropdown dropdown--absolute-position"> 1435 <div class="dropdown__content dropdown__content--show-left dropdown__content--padding u-w220px dw-mod"> 1436 <ul class="list list--clean dw-mod"> 1437 {{#FavoriteLists}} 1438 {{>FavoriteListItem}} 1439 {{/FavoriteLists}} 1440 </ul> 1441 </div> 1442 <label class="dropdown-trigger-off" for="FavoriteTrigger_{{id}}"></label> 1443 </div> 1444 </div> 1445 </script> 1446 1447 <script id="FavoriteListItem" type="text/x-template"> 1448 <li> 1449 <a href="{{link}}" class="list__link u-no-underline dw-mod"><i class="{{favoriteIcon}}"></i> {{name}}</a> 1450 </li> 1451 </script> 1452 1453 @* Facets templates *@ 1454 1455 <script id="Checkboxes" type="text/x-template"> 1456 <label class="{{disabled}} checkbox-facet dw-mod" data-filter-value="{{label}}"> 1457 <input type="checkbox" class="{{selected}} checkbox-facet__checkbox dw-mod" onclick="Facets.UpdateFacets(this);" name="{{queryParameter}}" value="{{value}}" {{selected}} {{disabled}}> 1458 <span class="checkbox-facet__label dw-mod">{{label}}</span> 1459 <span class="checkbox-facet__count dw-mod">({{count}})</span> 1460 </label> 1461 </script> 1462 1463 <script id="Tags" type="text/x-template"> 1464 <button type="button" class="btn btn--tag {{selected}} {{disabled}}" data-filter-value="{{label}}" data-check="{{selected}}" onclick="Facets.UpdateFacets(this);" name="{{queryParameter}}" value="{{value}}" {{disabled}}> 1465 {{label}} <span class="facets-group__counter">({{count}})</span> 1466 </button> 1467 </script> 1468 1469 <script id="Colors" type="text/x-template"> 1470 <button type="button" class="btn btn--colorbox u-margin-right {{selected}} {{disabled}}" data-filter-value="{{label}}" style="background-color: {{value}}" title="{{label}}" data-check="{{selected}}" onclick="Facets.UpdateFacets(this);" name="{{queryParameter}}" value="{{value}}" {{disabled}}></button> 1471 </script> 1472 1473 @* Units templates *@ 1474 1475 <script id="UnitOption" type="text/x-template"> 1476 <div class="dropdown__item dw-mod" onclick="HandlebarsBolt.UpdateContent('PriceAndActions', '{{link}}&feed=true&UnitID={{value}}&rid={{id}}')">{{name}}</div> 1477 </script> 1478 1479 @functions { 1480 1481 string addAfterFix(string value, string afterfix) 1482 { 1483 return value.TrimEnd() + " " + afterfix; 1484 } 1485 1486 bool stringIsNotNullEmptyOrZero(string value) 1487 { 1488 return !String.IsNullOrEmpty(value) && value != "0"; 1489 } 1490 1491 string getIconForFile(string fileName) 1492 { 1493 string ext = Path.GetExtension(fileName); 1494 string icon = ""; 1495 switch (ext.ToLower()) 1496 { 1497 case ".xls": 1498 case ".xlsx": 1499 icon = "fa-file-excel"; 1500 break; 1501 case ".ppt": 1502 case ".pptx": 1503 icon = "fa-file-powerpoint"; 1504 break; 1505 case ".doc": 1506 case ".docx": 1507 icon = "fa-file-word"; 1508 break; 1509 case ".jpg": 1510 case ".jpeg": 1511 case ".png": 1512 case ".gif": 1513 case ".pdf": 1514 return "<img class='product__document-img' alt='" + fileName + "' src='/Admin/Public/GetImage.ashx?crop=5&height=70&width=120&Compression=75&DoNotUpscale=true&image=" + fileName + "' />"; 1515 default: 1516 icon = "fa-file"; 1517 break; 1518 } 1519 return "<i class='product__document-icon far " + icon + "'></i> "; 1520 } 1521 1522 public static string ToPascalCase(string str) 1523 { 1524 return CultureInfo.InvariantCulture.TextInfo 1525 .ToTitleCase(str.ToLowerInvariant()) 1526 .Replace("-", "") 1527 .Replace("_", "") 1528 .Replace(" ", ""); 1529 } 1530 } 1531 1532 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 1533 1534 <script type="application/ld+json"> 1535 { 1536 "@@context": "http://schema.org/", 1537 "@@type": "Product", 1538 "name": "@GetString("Ecom:Product.Name")", 1539 @if (!string.IsNullOrEmpty(GetString("Ecom:Product.ImageLarge.Default.Clean"))) 1540 { 1541 <text>"image": [ 1542 "@siteURL/Admin/Public/GetImage.ashx?width=400&height=400&crop=0&Compression=75&DoNotUpscale=true&image=@GetString("Ecom:Product.ImageLarge.Default.Clean")", 1543 "@siteURL/Admin/Public/GetImage.ashx?width=400&height=300&crop=0&Compression=75&DoNotUpscale=true&image=@GetString("Ecom:Product.ImageLarge.Default.Clean")", 1544 "@siteURL/Admin/Public/GetImage.ashx?width=448&height=225&crop=0&Compression=75&DoNotUpscale=true&image=@GetString("Ecom:Product.ImageLarge.Default.Clean")" 1545 ],</text> 1546 } 1547 "description": "@GetString("Ecom:Product.ShortDescription")", 1548 "mpn": "925872", 1549 @if(!string.IsNullOrEmpty(brand)) 1550 { 1551 <text>"brand": { 1552 "@@type": "Thing", 1553 "name": "@brand" 1554 },</text> 1555 } 1556 "offers": { 1557 "@@type": "Offer", 1558 "priceCurrency": "@GetString("Ecom:Product.Price.Currency.Code")", 1559 "price": "@GetString("Ecom:Product.Price.Price")", 1560 "availability": "@(GetInteger("Ecom:Product.Stock") > 0 ? "InStock" : "OutOfStock")" 1561 } 1562 } 1563 </script> 1564 1565 @if (renderVariantsAsProducts) 1566 { 1567 <script> 1568 document.addEventListener("DOMContentLoaded", function (event) { 1569 Facets.Init("VariantsList", '@productCatalogId', '@requestQuery'); 1570 }); 1571 </script> 1572 } 1573 1574 <script> 1575 if (document.getElementById("PriceAndActions")) { 1576 document.getElementById("PriceAndActions").addEventListener("contentLoaded", function (event) { 1577 MatchVariants.Update(document.querySelector(".js-variants"), "DoNothing"); 1578 }); 1579 } 1580 </script> 1581 1582