Error compiling template "/Designs/elsalg/subpage/Paragraph/WidgetRaptorProductsSmall.cshtml"
Line 189: The type or namespace name 'Custom' does not exist in the namespace 'Elsalg' (are you missing an assembly reference?)
Line 190: The type or namespace name 'Custom' does not exist in the namespace 'Elsalg' (are you missing an assembly reference?)
Line 196: The type or namespace name 'Custom' does not exist in the namespace 'Elsalg' (are you missing an assembly reference?)
Line 198: The type or namespace name 'Custom' does not exist in the namespace 'Elsalg' (are you missing an assembly reference?)

1 //------------------------------------------------------------------------------ 2 // <auto-generated> 3 // This code was generated by a tool. 4 // Runtime Version:4.0.30319.42000 5 // 6 // Changes to this file may cause incorrect behavior and will be lost if 7 // the code is regenerated. 8 // </auto-generated> 9 //------------------------------------------------------------------------------ 10 11 namespace CompiledRazorTemplates.Dynamic { 12 using System; 13 using System.Collections.Generic; 14 using System.Linq; 15 16 #line 1 "d:\websites\elsalg.dk\application\Files\Templates\Designs\elsalg\subpage\Paragraph\WidgetRaptorProductsSmall.cshtml" 17 using System.Net; 18 19 #line default 20 #line hidden 21 22 #line 2 "d:\websites\elsalg.dk\application\Files\Templates\Designs\elsalg\subpage\Paragraph\WidgetRaptorProductsSmall.cshtml" 23 using System.Web; 24 25 #line default 26 #line hidden 27 28 #line 3 "d:\websites\elsalg.dk\application\Files\Templates\Designs\elsalg\subpage\Paragraph\WidgetRaptorProductsSmall.cshtml" 29 using eela.custom; 30 31 #line default 32 #line hidden 33 34 #line 4 "d:\websites\elsalg.dk\application\Files\Templates\Designs\elsalg\subpage\Paragraph\WidgetRaptorProductsSmall.cshtml" 35 using eela.custom.Providers; 36 37 #line default 38 #line hidden 39 40 #line 5 "d:\websites\elsalg.dk\application\Files\Templates\Designs\elsalg\subpage\Paragraph\WidgetRaptorProductsSmall.cshtml" 41 using Newtonsoft.Json; 42 43 #line default 44 #line hidden 45 46 #line 6 "d:\websites\elsalg.dk\application\Files\Templates\Designs\elsalg\subpage\Paragraph\WidgetRaptorProductsSmall.cshtml" 47 using Newtonsoft.Json.Linq; 48 49 #line default 50 #line hidden 51 52 53 public class RazorEngine_b4bce36bdbde44a4922205b5ac9fc49b : Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> { 54 55 #line hidden 56 57 public RazorEngine_b4bce36bdbde44a4922205b5ac9fc49b() { 58 } 59 60 public override void Execute() { 61 WriteLiteral("\r\n"); 62 63 64 #line 8 "d:\websites\elsalg.dk\application\Files\Templates\Designs\elsalg\subpage\Paragraph\WidgetRaptorProductsSmall.cshtml" 65 66 var parameterName = GetValue("Item.SectionName") != null && !string.IsNullOrWhiteSpace(GetValue("Item.SectionName").ToString()) ? GetValue("Item.SectionName").ToString() : String.Empty; 67 var parameterValue = GetValue("Item.SectionValue") != null && !string.IsNullOrWhiteSpace(GetValue("Item.SectionValue").ToString()) ? GetValue("Item.SectionValue").ToString() : String.Empty; 68 var raptorIntegrationType = GetValue("Item.RaptorIntegrationType") != null && !string.IsNullOrWhiteSpace(GetValue("Item.RaptorIntegrationType").ToString()) ? GetValue("Item.RaptorIntegrationType").ToString() : "GetOverallTopVisits"; 69 var productCount = GetValue("Item.NoOf_Products") != null && !string.IsNullOrWhiteSpace(GetValue("Item.NoOf_Products").ToString()) ? int.Parse(GetValue("Item.NoOf_Products").ToString()) : 10; 70 71 if (productCount < 1) 72 { 73 productCount = 10; 74 75 } 76 77 List<Dynamicweb.Ecommerce.Products.Product> products = new List<Dynamicweb.Ecommerce.Products.Product>(); 78 79 if (raptorIntegrationType == "GetTopSellingInCagegory") { raptorIntegrationType = "GetTopSellingInCategory"; } 80 if (!string.IsNullOrWhiteSpace(parameterName) && !string.IsNullOrWhiteSpace(parameterValue)) 81 { 82 products = eela.custom.Raptor.GetRaptorItems(raptorIntegrationType, parameterName, parameterValue, productCount); 83 } 84 else 85 { 86 products = eela.custom.Raptor.GetRaptorItems(raptorIntegrationType, productCount); 87 } 88 89 if (products.Count < 1) { return; } 90 91 92 #line default 93 #line hidden 94 WriteLiteral(@" 95 96 97 <!---------- widget products -----------> 98 <script type=""text/javascript""> 99 function formatPrice(fPrice) { 100 document.write(fPrice.replace(/,00$/, ',-')); 101 } 102 $(function () { 103 $('.owl-small-products').owlCarousel({ 104 loop: false, 105 lazyLoad: true, 106 margin: 30, 107 nav: true, 108 items: 6, 109 slideBy: ""page"", 110 responsive: { 111 0: { 112 items: 2 113 }, 114 600: { 115 items: 3 116 }, 117 1000: { 118 items: 6 119 } 120 } 121 }); 122 }); 123 </script> 124 125 <div class=""widget-products""> 126 <div class=""container_4 clearfix""> 127 128 <div class=""grid_4""> 129 130 <span class=""h2"">"); 131 132 133 #line 69 "d:\websites\elsalg.dk\application\Files\Templates\Designs\elsalg\subpage\Paragraph\WidgetRaptorProductsSmall.cshtml" 134 Write(GetString("Item.Title")); 135 136 137 #line default 138 #line hidden 139 WriteLiteral("</span>\r\n\r\n <div id=\"raptor-recomendations-"); 140 141 142 #line 71 "d:\websites\elsalg.dk\application\Files\Templates\Designs\elsalg\subpage\Paragraph\WidgetRaptorProductsSmall.cshtml" 143 Write(raptorIntegrationType); 144 145 146 #line default 147 #line hidden 148 WriteLiteral("\" class=\"owl-small-products owl-carousel owl-theme\">\r\n <!--item-->" + 149 "\r\n"); 150 151 152 #line 73 "d:\websites\elsalg.dk\application\Files\Templates\Designs\elsalg\subpage\Paragraph\WidgetRaptorProductsSmall.cshtml" 153 154 155 #line default 156 #line hidden 157 158 #line 73 "d:\websites\elsalg.dk\application\Files\Templates\Designs\elsalg\subpage\Paragraph\WidgetRaptorProductsSmall.cshtml" 159 foreach (Dynamicweb.Ecommerce.Products.Product product in products) 160 { 161 162 if (string.IsNullOrWhiteSpace(product.Name)) { continue; } 163 164 165 166 #line default 167 #line hidden 168 WriteLiteral(" <div"); 169 170 WriteLiteral(" class=\"item\""); 171 172 WriteLiteral(">\r\n <!-- pocetak slike widgeta -->\r\n " + 173 " <div"); 174 175 WriteLiteral(" class=\"image\""); 176 177 WriteLiteral(">\r\n"); 178 179 180 #line 81 "d:\websites\elsalg.dk\application\Files\Templates\Designs\elsalg\subpage\Paragraph\WidgetRaptorProductsSmall.cshtml" 181 182 183 #line default 184 #line hidden 185 186 #line 81 "d:\websites\elsalg.dk\application\Files\Templates\Designs\elsalg\subpage\Paragraph\WidgetRaptorProductsSmall.cshtml" 187 188 var altPictureId = string.IsNullOrEmpty(product.ProductFieldValues.GetProductFieldValue("ELSAlternatePictureID").Value.ToString()) ? "0000000000001" : product.ProductFieldValues.GetProductFieldValue("ELSAlternatePictureID").Value.ToString(); 189 var electraImgUrl = Elsalg.Custom.Providers.ProductProvider.GetElectraImgUrl(product.Number); 190 var electraImage = Elsalg.Custom.Providers.ProductProvider.ElectraImgExists(product.ProductFieldValues.GetProductFieldValue("ELSEan").Value.ToString(), product.Number); 191 192 string baseUrl = String.Format("Default.aspx?ID={0}&ProductID={1}", "9", product.Id); 193 string Url = Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(baseUrl).ToString(); 194 string buyURL = String.Format("{0}?cartcmd=add", Url); 195 196 var primaryGroup = Elsalg.Custom.Providers.ProductProvider.GetPrimaryParentGroup(product.Id); 197 var elsEnergy = product.ProductFieldValues.GetProductFieldValue("ELSEnergy").Value.ToString(); 198 var energyImgPath = Elsalg.Custom.Providers.ProductProvider.GetEnergyImagePath(product.ProductFieldValues.GetProductFieldValue("ELSEan").Value.ToString(), elsEnergy, primaryGroup.Id.Replace("-at-SHOP1", "")); 199 200 201 202 #line default 203 #line hidden 204 WriteLiteral("\r\n\r\n"); 205 206 207 #line 96 "d:\websites\elsalg.dk\application\Files\Templates\Designs\elsalg\subpage\Paragraph\WidgetRaptorProductsSmall.cshtml" 208 209 210 #line default 211 #line hidden 212 213 #line 96 "d:\websites\elsalg.dk\application\Files\Templates\Designs\elsalg\subpage\Paragraph\WidgetRaptorProductsSmall.cshtml" 214 if (!electraImage) 215 { 216 217 218 #line default 219 #line hidden 220 WriteLiteral(" <a"); 221 222 WriteLiteral(" class=\"productDefaultImg\""); 223 224 WriteAttribute("href", Tuple.Create(" href=\"", 4669), Tuple.Create("\"", 4680) 225 226 #line 98 "d:\websites\elsalg.dk\application\Files\Templates\Designs\elsalg\subpage\Paragraph\WidgetRaptorProductsSmall.cshtml" 227 , Tuple.Create(Tuple.Create("", 4676), Tuple.Create<System.Object, System.Int32>(Url 228 229 #line default 230 #line hidden 231 , 4676), false) 232 ); 233 234 WriteLiteral(" data-raptorrecommendation=\"productId:"); 235 236 237 #line 98 "d:\websites\elsalg.dk\application\Files\Templates\Designs\elsalg\subpage\Paragraph\WidgetRaptorProductsSmall.cshtml" 238 Write(product.Id); 239 240 241 #line default 242 #line hidden 243 WriteLiteral("\""); 244 245 WriteLiteral(">\r\n\r\n <img"); 246 247 WriteLiteral(" itemprop=\"image\""); 248 249 WriteLiteral(" class=\"imgtest owl-lazy\""); 250 251 WriteLiteral("\r\n onerror=\"$(\'.product-image-zoom\').addC" + 252 "lass(\'disabled\');src=\'https://cdn1.elsalg.dk/inetimagegen.ashx?altFmImage_path=/" + 253 "Files/ELSALG/eCom/Pictures/0000000000001.png&amp;height=466&amp;width=466&amp;cr" + 254 "op=5\'\""); 255 256 WriteLiteral("\r\n data-src=\"https://cdn1.elsalg.dk/ineti" + 257 "magegen.ashx?altFmImage_path=/Files/ELSALG/eCom/Pictures/"); 258 259 260 #line 102 "d:\websites\elsalg.dk\application\Files\Templates\Designs\elsalg\subpage\Paragraph\WidgetRaptorProductsSmall.cshtml" 261 Write(altPictureId); 262 263 264 #line default 265 #line hidden 266 WriteLiteral(".png&amp;image=/files/ELSALG/eCom/Pictures/"); 267 268 269 #line 102 "d:\websites\elsalg.dk\application\Files\Templates\Designs\elsalg\subpage\Paragraph\WidgetRaptorProductsSmall.cshtml" 270 Write(product.ProductFieldValues.GetProductFieldValue("ELSEan").Value.ToString()); 271 272 273 #line default 274 #line hidden 275 WriteLiteral(".png&amp;Width=466&amp;height=466&amp;crop=5\""); 276 277 WriteLiteral("\r\n alt=\"\""); 278 279 WriteLiteral(" />\r\n </a>\r\n"); 280 281 282 #line 105 "d:\websites\elsalg.dk\application\Files\Templates\Designs\elsalg\subpage\Paragraph\WidgetRaptorProductsSmall.cshtml" 283 } 284 else 285 { 286 287 288 289 #line default 290 #line hidden 291 WriteLiteral(" <a"); 292 293 WriteLiteral(" class=\"productDefaultImg\""); 294 295 WriteAttribute("href", Tuple.Create(" href=\"", 5633), Tuple.Create("\"", 5644) 296 297 #line 109 "d:\websites\elsalg.dk\application\Files\Templates\Designs\elsalg\subpage\Paragraph\WidgetRaptorProductsSmall.cshtml" 298 , Tuple.Create(Tuple.Create("", 5640), Tuple.Create<System.Object, System.Int32>(Url 299 300 #line default 301 #line hidden 302 , 5640), false) 303 ); 304 305 WriteLiteral(" data-raptorrecommendation=\"productId:"); 306 307 308 #line 109 "d:\websites\elsalg.dk\application\Files\Templates\Designs\elsalg\subpage\Paragraph\WidgetRaptorProductsSmall.cshtml" 309 Write(product.Id); 310 311 312 #line default 313 #line hidden 314 WriteLiteral("\""); 315 316 WriteLiteral(">\r\n <img"); 317 318 WriteLiteral(" itemprop=\"image\""); 319 320 WriteLiteral(" class=\"imgtest\""); 321 322 WriteAttribute("onerror", Tuple.Create("\r\n onerror=\"", 5771), Tuple.Create("\"", 5889) 323 , Tuple.Create(Tuple.Create("", 5823), Tuple.Create("$(\'.product-image-zoom\').addClass(\'disabled\');src=\'", 5823), true) 324 325 #line 111 "d:\websites\elsalg.dk\application\Files\Templates\Designs\elsalg\subpage\Paragraph\WidgetRaptorProductsSmall.cshtml" 326 , Tuple.Create(Tuple.Create("", 5874), Tuple.Create<System.Object, System.Int32>(electraImgUrl 327 328 #line default 329 #line hidden 330 , 5874), false) 331 , Tuple.Create(Tuple.Create("", 5888), Tuple.Create("\'", 5888), true) 332 ); 333 334 WriteAttribute("src", Tuple.Create("\r\n src=\"", 5890), Tuple.Create("\"", 5952) 335 336 #line 112 "d:\websites\elsalg.dk\application\Files\Templates\Designs\elsalg\subpage\Paragraph\WidgetRaptorProductsSmall.cshtml" 337 , Tuple.Create(Tuple.Create("", 5938), Tuple.Create<System.Object, System.Int32>(electraImgUrl 338 339 #line default 340 #line hidden 341 , 5938), false) 342 ); 343 344 WriteLiteral("\r\n alt=\"\""); 345 346 WriteLiteral(" />\r\n </a>\r\n"); 347 348 349 #line 115 "d:\websites\elsalg.dk\application\Files\Templates\Designs\elsalg\subpage\Paragraph\WidgetRaptorProductsSmall.cshtml" 350 } 351 352 353 #line default 354 #line hidden 355 WriteLiteral("\r\n <div"); 356 357 WriteLiteral(" class=\"product\""); 358 359 WriteLiteral(">\r\n <ul"); 360 361 WriteLiteral(" class=\"notes\""); 362 363 WriteLiteral(">\r\n "); 364 365 WriteLiteral("\r\n"); 366 367 368 #line 120 "d:\websites\elsalg.dk\application\Files\Templates\Designs\elsalg\subpage\Paragraph\WidgetRaptorProductsSmall.cshtml" 369 370 371 #line default 372 #line hidden 373 374 #line 120 "d:\websites\elsalg.dk\application\Files\Templates\Designs\elsalg\subpage\Paragraph\WidgetRaptorProductsSmall.cshtml" 375 376 var productSymbolsValue = product.ProductFieldValues.GetProductFieldValue("ELSProductSymbols").Value.ToString(); 377 378 bool hasDiscount = false; 379 380 if (Convert.ToDecimal(product.ProductFieldValues.GetProductFieldValue("ELSUnitSavings").Value.ToString()) != 0) 381 { 382 hasDiscount = true; 383 } 384 385 if (!string.IsNullOrWhiteSpace(productSymbolsValue.Trim())) 386 { 387 var productSymbols = JArray.Parse(productSymbolsValue) as JArray; 388 389 foreach (var productSymbol in productSymbols) 390 { 391 if (productSymbol["value"].ToString() == "4garanti.png") 392 { 393 394 395 #line default 396 #line hidden 397 WriteLiteral(" <li"); 398 399 WriteLiteral(" class=\"test-winner-fixed\""); 400 401 WriteLiteral(" data-symbol=\""); 402 403 404 #line 138 "d:\websites\elsalg.dk\application\Files\Templates\Designs\elsalg\subpage\Paragraph\WidgetRaptorProductsSmall.cshtml" 405 Write(productSymbol["value"].ToString()); 406 407 408 #line default 409 #line hidden 410 WriteLiteral("\""); 411 412 WriteLiteral("><img"); 413 414 WriteAttribute("src", Tuple.Create(" src=\"", 7545), Tuple.Create("\"", 7641) 415 , Tuple.Create(Tuple.Create("", 7551), Tuple.Create("../files/images/symbols/", 7551), true) 416 417 #line 138 "d:\websites\elsalg.dk\application\Files\Templates\Designs\elsalg\subpage\Paragraph\WidgetRaptorProductsSmall.cshtml" 418 , Tuple.Create(Tuple.Create("", 7575), Tuple.Create<System.Object, System.Int32>(productSymbol["value"].ToString().Replace(".png", "_large.png") 419 420 #line default 421 #line hidden 422 , 7575), false) 423 ); 424 425 WriteLiteral(" alt=\"Alternate Text\""); 426 427 WriteLiteral(" /></li>\r\n"); 428 429 430 #line 139 "d:\websites\elsalg.dk\application\Files\Templates\Designs\elsalg\subpage\Paragraph\WidgetRaptorProductsSmall.cshtml" 431 } 432 else 433 { 434 435 436 #line default 437 #line hidden 438 WriteLiteral(" <li"); 439 440 WriteLiteral(" class=\"test-winner\""); 441 442 WriteLiteral(" data-symbol=\""); 443 444 445 #line 142 "d:\websites\elsalg.dk\application\Files\Templates\Designs\elsalg\subpage\Paragraph\WidgetRaptorProductsSmall.cshtml" 446 Write(productSymbol["value"].ToString()); 447 448 449 #line default 450 #line hidden 451 WriteLiteral("\""); 452 453 WriteLiteral("><span"); 454 455 WriteLiteral(" class=\"ico\""); 456 457 WriteAttribute("style", Tuple.Create(" style=\"", 7971), Tuple.Create("\"", 8052) 458 , Tuple.Create(Tuple.Create("", 7979), Tuple.Create("background-image:url(\'../files/images/symbols/", 7979), true) 459 460 #line 142 "d:\websites\elsalg.dk\application\Files\Templates\Designs\elsalg\subpage\Paragraph\WidgetRaptorProductsSmall.cshtml" 461 , Tuple.Create(Tuple.Create("", 8025), Tuple.Create<System.Object, System.Int32>(productSymbol["value"] 462 463 #line default 464 #line hidden 465 , 8025), false) 466 , Tuple.Create(Tuple.Create("", 8050), Tuple.Create("\')", 8050), true) 467 ); 468 469 WriteLiteral("></span><span"); 470 471 WriteLiteral(" class=\"txt\""); 472 473 WriteLiteral(">"); 474 475 476 #line 142 "d:\websites\elsalg.dk\application\Files\Templates\Designs\elsalg\subpage\Paragraph\WidgetRaptorProductsSmall.cshtml" 477 Write(productSymbol["description"]); 478 479 480 #line default 481 #line hidden 482 WriteLiteral("</span></li>\r\n"); 483 484 485 #line 143 "d:\websites\elsalg.dk\application\Files\Templates\Designs\elsalg\subpage\Paragraph\WidgetRaptorProductsSmall.cshtml" 486 } 487 } 488 } 489 490 491 #line default 492 #line hidden 493 WriteLiteral("\r\n "); 494 495 WriteLiteral("\r\n\r\n"); 496 497 498 #line 149 "d:\websites\elsalg.dk\application\Files\Templates\Designs\elsalg\subpage\Paragraph\WidgetRaptorProductsSmall.cshtml" 499 500 501 #line default 502 #line hidden 503 504 #line 149 "d:\websites\elsalg.dk\application\Files\Templates\Designs\elsalg\subpage\Paragraph\WidgetRaptorProductsSmall.cshtml" 505 if (hasDiscount) 506 { 507 508 509 #line default 510 #line hidden 511 WriteLiteral(" <li"); 512 513 WriteLiteral(" class=\"discount\""); 514 515 WriteLiteral(" data-symbol=\"discount\""); 516 517 WriteLiteral("><span"); 518 519 WriteLiteral(" class=\"ico\""); 520 521 WriteLiteral(" style=\"background-image: url(\'../files/images/symbols/discount.png\')\""); 522 523 WriteLiteral("></span><span"); 524 525 WriteLiteral(" class=\"txt\""); 526 527 WriteLiteral(">Tilbud</span></li>\r\n"); 528 529 530 #line 152 "d:\websites\elsalg.dk\application\Files\Templates\Designs\elsalg\subpage\Paragraph\WidgetRaptorProductsSmall.cshtml" 531 } 532 533 534 #line default 535 #line hidden 536 WriteLiteral(" </ul>\r\n </div>\r\n\r\n " + 537 " <!-- <a class=\"product-image-zoom\">Se stort billede</a> " + 538 "-->\r\n </div>\r\n <div"); 539 540 WriteLiteral(" class=\"text\""); 541 542 WriteLiteral(">\r\n <div"); 543 544 WriteLiteral(" class=\"title\""); 545 546 WriteLiteral("><a"); 547 548 WriteAttribute("href", Tuple.Create(" href=\"", 9034), Tuple.Create("\"", 9045) 549 550 #line 159 "d:\websites\elsalg.dk\application\Files\Templates\Designs\elsalg\subpage\Paragraph\WidgetRaptorProductsSmall.cshtml" 551 , Tuple.Create(Tuple.Create("", 9041), Tuple.Create<System.Object, System.Int32>(Url 552 553 #line default 554 #line hidden 555 , 9041), false) 556 ); 557 558 WriteLiteral(" data-raptorrecommendation=\"productId:"); 559 560 561 #line 159 "d:\websites\elsalg.dk\application\Files\Templates\Designs\elsalg\subpage\Paragraph\WidgetRaptorProductsSmall.cshtml" 562 Write(product.Id); 563 564 565 #line default 566 #line hidden 567 WriteLiteral("\""); 568 569 WriteLiteral(">"); 570 571 572 #line 159 "d:\websites\elsalg.dk\application\Files\Templates\Designs\elsalg\subpage\Paragraph\WidgetRaptorProductsSmall.cshtml" 573 Write(product.Name); 574 575 576 #line default 577 #line hidden 578 WriteLiteral("</a></div>\r\n <div"); 579 580 WriteLiteral(" class=\"subtitle\""); 581 582 WriteLiteral(">"); 583 584 585 #line 160 "d:\websites\elsalg.dk\application\Files\Templates\Designs\elsalg\subpage\Paragraph\WidgetRaptorProductsSmall.cshtml" 586 Write(product.ProductFieldValues.GetProductFieldValue("ELSProductSubHeader").Value.ToString()); 587 588 589 #line default 590 #line hidden 591 WriteLiteral("</div>\r\n </div>\r\n <div"); 592 593 WriteLiteral(" class=\"pricing\""); 594 595 WriteLiteral(">\r\n <div"); 596 597 WriteLiteral(" class=\"prod-spec-tab\""); 598 599 WriteLiteral("><a"); 600 601 WriteAttribute("href", Tuple.Create(" href=\"", 9404), Tuple.Create("\"", 9456) 602 603 #line 163 "d:\websites\elsalg.dk\application\Files\Templates\Designs\elsalg\subpage\Paragraph\WidgetRaptorProductsSmall.cshtml" 604 , Tuple.Create(Tuple.Create("", 9411), Tuple.Create<System.Object, System.Int32>(string.Format("{0}?tab=specifications", Url) 605 606 #line default 607 #line hidden 608 , 9411), false) 609 ); 610 611 WriteLiteral(">Datablad</a></div>\r\n <div>\r\n " + 612 " <div"); 613 614 WriteLiteral(" class=\"price\""); 615 616 WriteLiteral(">\r\n <script>formatPrice(\'"); 617 618 619 #line 166 "d:\websites\elsalg.dk\application\Files\Templates\Designs\elsalg\subpage\Paragraph\WidgetRaptorProductsSmall.cshtml" 620 Write(product.GetPrice("DKK","DK").PriceWithVAT.ToString("0,0.00")); 621 622 623 #line default 624 #line hidden 625 WriteLiteral("\')</script>\r\n </div>\r\n"); 626 627 628 #line 168 "d:\websites\elsalg.dk\application\Files\Templates\Designs\elsalg\subpage\Paragraph\WidgetRaptorProductsSmall.cshtml" 629 630 631 #line default 632 #line hidden 633 634 #line 168 "d:\websites\elsalg.dk\application\Files\Templates\Designs\elsalg\subpage\Paragraph\WidgetRaptorProductsSmall.cshtml" 635 if (!string.IsNullOrEmpty(energyImgPath)) 636 { 637 638 639 #line default 640 #line hidden 641 WriteLiteral(" <span"); 642 643 WriteLiteral(" class=\"energy-pg\""); 644 645 WriteLiteral(">\r\n <a"); 646 647 WriteAttribute("href", Tuple.Create(" href=\"", 9952), Tuple.Create("\"", 10004) 648 649 #line 171 "d:\websites\elsalg.dk\application\Files\Templates\Designs\elsalg\subpage\Paragraph\WidgetRaptorProductsSmall.cshtml" 650 , Tuple.Create(Tuple.Create("", 9959), Tuple.Create<System.Object, System.Int32>(string.Format("{0}?tab=specifications", Url) 651 652 #line default 653 #line hidden 654 , 9959), false) 655 ); 656 657 WriteLiteral(">\r\n <img"); 658 659 WriteAttribute("src", Tuple.Create(" src=\"", 10056), Tuple.Create("\"", 10076) 660 661 #line 172 "d:\websites\elsalg.dk\application\Files\Templates\Designs\elsalg\subpage\Paragraph\WidgetRaptorProductsSmall.cshtml" 662 , Tuple.Create(Tuple.Create("", 10062), Tuple.Create<System.Object, System.Int32>(energyImgPath 663 664 #line default 665 #line hidden 666 , 10062), false) 667 ); 668 669 WriteLiteral(" alt=\"\""); 670 671 WriteLiteral(" />\r\n </a>\r\n " + 672 " </span>\r\n"); 673 674 675 #line 175 "d:\websites\elsalg.dk\application\Files\Templates\Designs\elsalg\subpage\Paragraph\WidgetRaptorProductsSmall.cshtml" 676 } 677 678 679 #line default 680 #line hidden 681 WriteLiteral(" </div>\r\n <span"); 682 683 WriteLiteral(" class=\"discount\""); 684 685 WriteLiteral(">\r\n"); 686 687 WriteLiteral(" "); 688 689 690 #line 178 "d:\websites\elsalg.dk\application\Files\Templates\Designs\elsalg\subpage\Paragraph\WidgetRaptorProductsSmall.cshtml" 691 Write(Convert.ToDecimal(product.ProductFieldValues.GetProductFieldValue("ELSUnitSavings").Value.ToString()) != 0 ? "Spar " + Convert.ToDouble(product.ProductFieldValues.GetProductFieldValue("ELSUnitSavings").Value.ToString()).ToString("0,0.00").Replace(",00", ",-") : ""); 692 693 694 #line default 695 #line hidden 696 WriteLiteral("\r\n </span>\r\n <div"); 697 698 WriteLiteral(" class=\"buy\""); 699 700 WriteLiteral(" style=\"display:none;\""); 701 702 WriteLiteral(">\r\n <div"); 703 704 WriteAttribute("onclick", Tuple.Create(" onclick=\"", 10747), Tuple.Create("\"", 10912) 705 , Tuple.Create(Tuple.Create("", 10757), Tuple.Create("AddToCartWithSupplemental(\'", 10757), true) 706 707 #line 181 "d:\websites\elsalg.dk\application\Files\Templates\Designs\elsalg\subpage\Paragraph\WidgetRaptorProductsSmall.cshtml" 708 , Tuple.Create(Tuple.Create("", 10784), Tuple.Create<System.Object, System.Int32>(buyURL 709 710 #line default 711 #line hidden 712 , 10784), false) 713 , Tuple.Create(Tuple.Create("", 10791), Tuple.Create("\',", 10791), true) 714 , Tuple.Create(Tuple.Create(" ", 10793), Tuple.Create("\'", 10794), true) 715 716 #line 181 "d:\websites\elsalg.dk\application\Files\Templates\Designs\elsalg\subpage\Paragraph\WidgetRaptorProductsSmall.cshtml" 717 , Tuple.Create(Tuple.Create("", 10795), Tuple.Create<System.Object, System.Int32>(product.Number 718 719 #line default 720 #line hidden 721 , 10795), false) 722 , Tuple.Create(Tuple.Create("", 10810), Tuple.Create("\',", 10810), true) 723 , Tuple.Create(Tuple.Create(" ", 10812), Tuple.Create("\'", 10813), true) 724 725 #line 181 "d:\websites\elsalg.dk\application\Files\Templates\Designs\elsalg\subpage\Paragraph\WidgetRaptorProductsSmall.cshtml" 726 , Tuple.Create(Tuple.Create("", 10814), Tuple.Create<System.Object, System.Int32>(product.Id 727 728 #line default 729 #line hidden 730 , 10814), false) 731 , Tuple.Create(Tuple.Create("", 10825), Tuple.Create("\',", 10825), true) 732 , Tuple.Create(Tuple.Create(" ", 10827), Tuple.Create("\'", 10828), true) 733 734 #line 181 "d:\websites\elsalg.dk\application\Files\Templates\Designs\elsalg\subpage\Paragraph\WidgetRaptorProductsSmall.cshtml" 735 , Tuple.Create(Tuple.Create("", 10829), Tuple.Create<System.Object, System.Int32>(HttpUtility.JavaScriptStringEncode(product.Name.Replace("''", "")) 736 737 #line default 738 #line hidden 739 , 10829), false) 740 , Tuple.Create(Tuple.Create("", 10896), Tuple.Create("\');return", 10896), true) 741 , Tuple.Create(Tuple.Create(" ", 10905), Tuple.Create("false;", 10906), true) 742 ); 743 744 WriteLiteral(" class=\"button skipSwipable\""); 745 746 WriteLiteral(">\r\n Køb\r\n </div" + 747 ">\r\n </div>\r\n </div>\r\n " + 748 " </div>\r\n"); 749 750 751 #line 187 "d:\websites\elsalg.dk\application\Files\Templates\Designs\elsalg\subpage\Paragraph\WidgetRaptorProductsSmall.cshtml" 752 } 753 754 755 #line default 756 #line hidden 757 WriteLiteral(" </div>\r\n\r\n </div>\r\n </div>\r\n</div>\r\n"); 758 759 } 760 } 761 } 762

1 @using System.Net; 2 @using System.Web; 3 @using eela.custom; 4 @using eela.custom.Providers; 5 @using Newtonsoft.Json; 6 @using Newtonsoft.Json.Linq; 7 8 @{ 9 var parameterName = GetValue("Item.SectionName") != null && !string.IsNullOrWhiteSpace(GetValue("Item.SectionName").ToString()) ? GetValue("Item.SectionName").ToString() : String.Empty; 10 var parameterValue = GetValue("Item.SectionValue") != null && !string.IsNullOrWhiteSpace(GetValue("Item.SectionValue").ToString()) ? GetValue("Item.SectionValue").ToString() : String.Empty; 11 var raptorIntegrationType = GetValue("Item.RaptorIntegrationType") != null && !string.IsNullOrWhiteSpace(GetValue("Item.RaptorIntegrationType").ToString()) ? GetValue("Item.RaptorIntegrationType").ToString() : "GetOverallTopVisits"; 12 var productCount = GetValue("Item.NoOf_Products") != null && !string.IsNullOrWhiteSpace(GetValue("Item.NoOf_Products").ToString()) ? int.Parse(GetValue("Item.NoOf_Products").ToString()) : 10; 13 14 if (productCount < 1) 15 { 16 productCount = 10; 17 18 } 19 20 List<Dynamicweb.Ecommerce.Products.Product> products = new List<Dynamicweb.Ecommerce.Products.Product>(); 21 22 if (raptorIntegrationType == "GetTopSellingInCagegory") { raptorIntegrationType = "GetTopSellingInCategory"; } 23 if (!string.IsNullOrWhiteSpace(parameterName) && !string.IsNullOrWhiteSpace(parameterValue)) 24 { 25 products = eela.custom.Raptor.GetRaptorItems(raptorIntegrationType, parameterName, parameterValue, productCount); 26 } 27 else 28 { 29 products = eela.custom.Raptor.GetRaptorItems(raptorIntegrationType, productCount); 30 } 31 32 if (products.Count < 1) { return; } 33 } 34 35 36 <!---------- widget products -----------> 37 <script type="text/javascript"> 38 function formatPrice(fPrice) { 39 document.write(fPrice.replace(/,00$/, ',-')); 40 } 41 $(function () { 42 $('.owl-small-products').owlCarousel({ 43 loop: false, 44 lazyLoad: true, 45 margin: 30, 46 nav: true, 47 items: 6, 48 slideBy: "page", 49 responsive: { 50 0: { 51 items: 2 52 }, 53 600: { 54 items: 3 55 }, 56 1000: { 57 items: 6 58 } 59 } 60 }); 61 }); 62 </script> 63 64 <div class="widget-products"> 65 <div class="container_4 clearfix"> 66 67 <div class="grid_4"> 68 69 <span class="h2">@GetString("Item.Title")</span> 70 71 <div id="raptor-recomendations-@raptorIntegrationType" class="owl-small-products owl-carousel owl-theme"> 72 <!--item--> 73 @foreach (Dynamicweb.Ecommerce.Products.Product product in products) 74 { 75 76 if (string.IsNullOrWhiteSpace(product.Name)) { continue; } 77 78 <div class="item"> 79 <!-- pocetak slike widgeta --> 80 <div class="image"> 81 @{ 82 var altPictureId = string.IsNullOrEmpty(product.ProductFieldValues.GetProductFieldValue("ELSAlternatePictureID").Value.ToString()) ? "0000000000001" : product.ProductFieldValues.GetProductFieldValue("ELSAlternatePictureID").Value.ToString(); 83 var electraImgUrl = Elsalg.Custom.Providers.ProductProvider.GetElectraImgUrl(product.Number); 84 var electraImage = Elsalg.Custom.Providers.ProductProvider.ElectraImgExists(product.ProductFieldValues.GetProductFieldValue("ELSEan").Value.ToString(), product.Number); 85 86 string baseUrl = String.Format("Default.aspx?ID={0}&ProductID={1}", "9", product.Id); 87 string Url = Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(baseUrl).ToString(); 88 string buyURL = String.Format("{0}?cartcmd=add", Url); 89 90 var primaryGroup = Elsalg.Custom.Providers.ProductProvider.GetPrimaryParentGroup(product.Id); 91 var elsEnergy = product.ProductFieldValues.GetProductFieldValue("ELSEnergy").Value.ToString(); 92 var energyImgPath = Elsalg.Custom.Providers.ProductProvider.GetEnergyImagePath(product.ProductFieldValues.GetProductFieldValue("ELSEan").Value.ToString(), elsEnergy, primaryGroup.Id.Replace("-at-SHOP1", "")); 93 94 } 95 96 @if (!electraImage) 97 { 98 <a class="productDefaultImg" href="@Url" data-raptorrecommendation="productId:@product.Id"> 99 100 <img itemprop="image" class="imgtest owl-lazy" 101 onerror="$('.product-image-zoom').addClass('disabled');src='https://cdn1.elsalg.dk/inetimagegen.ashx?altFmImage_path=/Files/ELSALG/eCom/Pictures/0000000000001.png&amp;height=466&amp;width=466&amp;crop=5'" 102 data-src="https://cdn1.elsalg.dk/inetimagegen.ashx?altFmImage_path=/Files/ELSALG/eCom/Pictures/@(altPictureId).png&amp;image=/files/ELSALG/eCom/Pictures/@(product.ProductFieldValues.GetProductFieldValue("ELSEan").Value.ToString()).png&amp;Width=466&amp;height=466&amp;crop=5" 103 alt="" /> 104 </a> 105 } 106 else 107 { 108 109 <a class="productDefaultImg" href="@Url" data-raptorrecommendation="productId:@product.Id"> 110 <img itemprop="image" class="imgtest" 111 onerror="$('.product-image-zoom').addClass('disabled');src='@electraImgUrl'" 112 src="@electraImgUrl" 113 alt="" /> 114 </a> 115 } 116 117 <div class="product"> 118 <ul class="notes"> 119 @*----- Render all the images related to the product notes. ----- *@ 120 @{ 121 var productSymbolsValue = product.ProductFieldValues.GetProductFieldValue("ELSProductSymbols").Value.ToString(); 122 123 bool hasDiscount = false; 124 125 if (Convert.ToDecimal(product.ProductFieldValues.GetProductFieldValue("ELSUnitSavings").Value.ToString()) != 0) 126 { 127 hasDiscount = true; 128 } 129 130 if (!string.IsNullOrWhiteSpace(productSymbolsValue.Trim())) 131 { 132 var productSymbols = JArray.Parse(productSymbolsValue) as JArray; 133 134 foreach (var productSymbol in productSymbols) 135 { 136 if (productSymbol["value"].ToString() == "4garanti.png") 137 { 138 <li class="test-winner-fixed" data-symbol="@productSymbol["value"].ToString()"><img src="../files/images/symbols/@(productSymbol["value"].ToString().Replace(".png", "_large.png"))" alt="Alternate Text" /></li> 139 } 140 else 141 { 142 <li class="test-winner" data-symbol="@productSymbol["value"].ToString()"><span class="ico" style="background-image:url('../files/images/symbols/@(productSymbol["value"])')"></span><span class="txt">@productSymbol["description"]</span></li> 143 } 144 } 145 } 146 } 147 @*----- Now add item related to the dicount -----*@ 148 149 @if (hasDiscount) 150 { 151 <li class="discount" data-symbol="discount"><span class="ico" style="background-image: url('../files/images/symbols/discount.png')"></span><span class="txt">Tilbud</span></li> 152 } 153 </ul> 154 </div> 155 156 <!-- <a class="product-image-zoom">Se stort billede</a> --> 157 </div> 158 <div class="text"> 159 <div class="title"><a href="@Url" data-raptorrecommendation="productId:@product.Id">@product.Name</a></div> 160 <div class="subtitle">@product.ProductFieldValues.GetProductFieldValue("ELSProductSubHeader").Value.ToString()</div> 161 </div> 162 <div class="pricing"> 163 <div class="prod-spec-tab"><a href="@string.Format("{0}?tab=specifications", Url)">Datablad</a></div> 164 <div> 165 <div class="price"> 166 <script>formatPrice('@product.GetPrice("DKK","DK").PriceWithVAT.ToString("0,0.00")')</script> 167 </div> 168 @if (!string.IsNullOrEmpty(energyImgPath)) 169 { 170 <span class="energy-pg"> 171 <a href="@string.Format("{0}?tab=specifications", Url)"> 172 <img src="@energyImgPath" alt="" /> 173 </a> 174 </span> 175 } 176 </div> 177 <span class="discount"> 178 @(Convert.ToDecimal(product.ProductFieldValues.GetProductFieldValue("ELSUnitSavings").Value.ToString()) != 0 ? "Spar " + Convert.ToDouble(product.ProductFieldValues.GetProductFieldValue("ELSUnitSavings").Value.ToString()).ToString("0,0.00").Replace(",00", ",-") : "") 179 </span> 180 <div class="buy" style="display:none;"> 181 <div onclick="AddToCartWithSupplemental('@buyURL', '@product.Number', '@product.Id', '@HttpUtility.JavaScriptStringEncode(product.Name.Replace("''", ""))');return false;" class="button skipSwipable"> 182 Køb 183 </div> 184 </div> 185 </div> 186 </div> 187 } 188 </div> 189 190 </div> 191 </div> 192 </div> 193