Error executing template "Designs/Rapido/eCom/Productlist/ConfiguratorRender.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
   at CompiledRazorTemplates.Dynamic.RazorEngine_11fc6495ceae4e93af870251306fa80f.<RenderPageTop>b__16_0(TextWriter __razor_helper_writer) in D:\dynamicweb.net\Solutions\Novicell\egholm2019.cloud.dynamicweb-cms.com\Files\Templates\Designs\Rapido\eCom\Productlist\ConfiguratorRender.cshtml:line 1030
   at CompiledRazorTemplates.Dynamic.RazorEngine_11fc6495ceae4e93af870251306fa80f.<RenderPageContainer>b__15_0(TextWriter __razor_helper_writer) in D:\dynamicweb.net\Solutions\Novicell\egholm2019.cloud.dynamicweb-cms.com\Files\Templates\Designs\Rapido\eCom\Productlist\ConfiguratorRender.cshtml:line 973
   at RazorEngine.Templating.TemplateWriter.ToString()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at CompiledRazorTemplates.Dynamic.RazorEngine_11fc6495ceae4e93af870251306fa80f.<>c__DisplayClass2_0.<RenderBlock>b__0(TextWriter __razor_helper_writer) in D:\dynamicweb.net\Solutions\Novicell\egholm2019.cloud.dynamicweb-cms.com\Files\Templates\Designs\Rapido\eCom\Productlist\ConfiguratorRender.cshtml:line 169
   at CompiledRazorTemplates.Dynamic.RazorEngine_11fc6495ceae4e93af870251306fa80f.<>c__DisplayClass1_0.<RenderBlockList>b__0(TextWriter __razor_helper_writer) in D:\dynamicweb.net\Solutions\Novicell\egholm2019.cloud.dynamicweb-cms.com\Files\Templates\Designs\Rapido\eCom\Productlist\ConfiguratorRender.cshtml:line 83
   at CompiledRazorTemplates.Dynamic.RazorEngine_11fc6495ceae4e93af870251306fa80f.Execute() in D:\dynamicweb.net\Solutions\Novicell\egholm2019.cloud.dynamicweb-cms.com\Files\Templates\Designs\Rapido\eCom\Productlist\ConfiguratorRender.cshtml:line 968
   at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader)
   at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<RunCompile>b__0(TextWriter writer)
   at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
   at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template)
   at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template)
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()

1 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 2 @using Dynamicweb.Frontend.Devices 3 @using Dynamicweb.Extensibility 4 @using Dynamicweb.Content 5 @using Dynamicweb.Core 6 @using System 7 @using System.IO 8 @using System.Web 9 @using System.Collections.Generic; 10 @using System.Linq 11 @using System.Text.RegularExpressions 12 @using Dynamicweb.Rapido.Blocks 13 @using Dynamicweb.Ecommerce.Products; 14 15 @functions { 16 BlocksPage productListPage = BlocksPage.GetBlockPage("ProductList"); 17 } 18 19 @{ 20 Block pageContainer = new Block() 21 { 22 Id = "PageContainer", 23 Template = RenderPageContainer(), 24 SkipRenderBlocksList = true 25 }; 26 productListPage.Add(pageContainer); 27 28 Block productListNavigation = new Block() 29 { 30 Id = "Navigation", 31 SortId = 20, 32 Design = new Design 33 { 34 RenderType = RenderType.Column, 35 Size = "0" 36 } 37 }; 38 productListPage.Add("PageContainer", productListNavigation); 39 40 Block productListContainer = new Block() 41 { 42 Id = "ProductList", 43 SortId = 30, 44 Template = RenderProductList(), 45 SkipRenderBlocksList = true 46 }; 47 productListPage.Add("PageContainer", productListContainer); 48 49 Block productListSnippets = new Block() 50 { 51 Id = "BottomSnippets", 52 SortId = 40 53 }; 54 productListPage.Add(productListSnippets); 55 } 56 57 @* This is required for the product list feed to work *@ 58 @GetValue("DoNotRenderProductListTemplate") 59 60 @* Include the required Grid builder (Contains the methods @RenderBlockList and @RenderBlock) *@ 61 @using System.Text.RegularExpressions 62 @using System.Collections.Generic 63 @using System.Reflection 64 @using System.Web.UI.HtmlControls 65 @using Dynamicweb.Rapido.Blocks.Components 66 @using Dynamicweb.Rapido.Blocks.Components.Articles 67 @using Dynamicweb.Rapido.Blocks.Components.Documentation 68 @using Dynamicweb.Rapido.Blocks 69 70 71 @*--- START: Base block renderers ---*@ 72 73 @helper RenderBlockList(List<Block> blocks) 74 { 75 blocks = blocks.OrderBy(item => item.SortId).ToList(); 76 77 foreach (Block item in blocks) 78 { 79 <!-- START: @item.Id --> 80 81 if (item.Design == null) 82 { 83 @RenderBlock(item) 84 } 85 else if (item.Design.RenderType == RenderType.None) { 86 string cssClass = item.Design.CssClass != null ? item.Design.CssClass : ""; 87 88 <div class="@cssClass dw-mod"> 89 @RenderBlock(item) 90 </div> 91 } 92 else if (item.Design.RenderType != RenderType.Hide) 93 { 94 string cssClass = item.Design.CssClass != null ? item.Design.CssClass : ""; 95 96 if (!item.SkipRenderBlocksList) { 97 if (item.Design.RenderType == RenderType.Row) 98 { 99 <div class="grid grid--align-content-start @cssClass dw-mod" id="Block__@item.Id"> 100 @RenderBlock(item) 101 </div> 102 } 103 104 if (item.Design.RenderType == RenderType.Column) 105 { 106 string hidePadding = item.Design.HidePadding ? "u-no-padding" : ""; 107 string size = item.Design.Size ?? "12"; 108 size = Regex.IsMatch(size, @"\d") ? "md-" + item.Design.Size : item.Design.Size; 109 110 <div class="grid__col-lg-@item.Design.Size grid__col-md-@item.Design.Size grid__col-sm-12 grid__col-xs-12 @hidePadding @cssClass dw-mod" id="Block__@item.Id"> 111 @RenderBlock(item) 112 </div> 113 } 114 115 if (item.Design.RenderType == RenderType.Table) 116 { 117 <table class="table @cssClass dw-mod" id="Block__@item.Id"> 118 @RenderBlock(item) 119 </table> 120 } 121 122 if (item.Design.RenderType == RenderType.TableRow) 123 { 124 <tr class="@cssClass dw-mod" id="Block__@item.Id"> 125 @RenderBlock(item) 126 </tr> 127 } 128 129 if (item.Design.RenderType == RenderType.TableColumn) 130 { 131 <td class="@cssClass dw-mod" id="Block__@item.Id"> 132 @RenderBlock(item) 133 </td> 134 } 135 136 if (item.Design.RenderType == RenderType.CardHeader) 137 { 138 <div class="card-header @cssClass dw-mod"> 139 @RenderBlock(item) 140 </div> 141 } 142 143 if (item.Design.RenderType == RenderType.CardBody) 144 { 145 <div class="card @cssClass dw-mod"> 146 @RenderBlock(item) 147 </div> 148 } 149 150 if (item.Design.RenderType == RenderType.CardFooter) 151 { 152 <div class="card-footer @cssClass dw-mod"> 153 @RenderBlock(item) 154 </div> 155 } 156 } 157 else 158 { 159 @RenderBlock(item) 160 } 161 } 162 163 <!-- END: @item.Id --> 164 } 165 } 166 167 @helper RenderBlock(Block item) 168 { 169 if (item.Template != null) 170 { 171 @BlocksPage.RenderTemplate(item.Template) 172 } 173 174 if (item.Component != null) 175 { 176 string methodName = item.Component.HelperName; 177 dynamic[] methodParameters = new dynamic[1]; 178 methodParameters[0] = item.Component; 179 Type methodType = this.GetType(); 180 MethodInfo generalMethod = methodType.GetMethod(methodName); 181 182 if (generalMethod != null) { 183 @generalMethod.Invoke(this, methodParameters).ToString(); 184 } else { 185 throw new Exception(item.Component.GetType().Name + " method '" + methodName +"' could not be invoked"); 186 } 187 } 188 189 if (item.BlocksList.Count > 0 && !item.SkipRenderBlocksList) 190 { 191 @RenderBlockList(item.BlocksList) 192 } 193 } 194 195 @*--- END: Base block renderers ---*@ 196 197 198 @* Include the Blocks for the page *@ 199 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 200 @using Dynamicweb.Core 201 @using System 202 @using System.Web 203 @using System.Collections.Generic 204 @using Dynamicweb.Rapido.Blocks 205 206 @{ 207 BlocksPage productListProductsBlocksPage = BlocksPage.GetBlockPage("ProductList"); 208 209 Block productsBlock = new Block 210 { 211 Id = "Views", 212 SortId = 30, 213 Template = RenderProducts() 214 }; 215 216 productListProductsBlocksPage.Add("ProductList", productsBlock); 217 } 218 219 @helper RenderProducts() 220 { 221 @*This is part of a script template *@ 222 223 <div id="ProductsContainer" data-template="{{listTemplate}}" class="grid product-list grid--external-bleed-x dw-mod" data-save-cookie="true"> 224 {{#ProductsContainer}} 225 {{> (lookup . 'template') }} 226 {{/ProductsContainer}} 227 </div> 228 } 229 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 230 @using Dynamicweb.Core 231 @using System 232 @using System.Web 233 @using System.Collections.Generic 234 @using Dynamicweb.Rapido.Blocks 235 236 @if (Pageview.AreaSettings.GetItem("ProductList").GetBoolean("EnableGridView")) 237 { 238 BlocksPage productList = BlocksPage.GetBlockPage("ProductList"); 239 240 Block gridViewButton = new Block 241 { 242 Id = "ProductGridItemContainer", 243 Name = "th", 244 SortId = 20 245 }; 246 productList.Add("Views", gridViewButton); 247 248 249 Block gridViewScripts = new Block 250 { 251 Id = "GridViewScripts", 252 SortId = 20, 253 Template = GridView() 254 }; 255 256 Block modalContent = new Block 257 { 258 Id = "ModalContent", 259 SortId = 30, 260 Template = RenderModalContent() 261 }; 262 263 productList.Add("BottomSnippets", gridViewScripts); 264 productList.Add("BottomSnippets", modalContent); 265 } 266 267 @helper GridView() 268 { 269 bool onlyPreview = Pageview.AreaSettings.GetItem("Ecommerce").GetBoolean("OnlyPreviewForAnonymous") && Pageview.User == null; 270 bool pointShopOnly = Pageview.AreaSettings.GetItem("Ecommerce").GetBoolean("PointShopOnly"); 271 bool showPrice = !Pageview.AreaSettings.GetItem("ProductList").GetBoolean("HidePrice"); 272 string cartIcon = Pageview.AreaSettings.GetItem("Layout").GetItem("Icons").GetList("CartIcon") != null ? Pageview.AreaSettings.GetItem("Layout").GetItem("Icons").GetList("CartIcon").SelectedValue : "fas fa-shopping-cart"; 273 string columnsCount = Pageview.AreaSettings.GetItem("ProductList").GetItem("GridView").GetList("Columns") != null ? Pageview.AreaSettings.GetItem("ProductList").GetItem("GridView").GetList("Columns").SelectedValue : "4"; 274 bool showCartButton = Pageview.AreaSettings.GetItem("ProductList").GetItem("GridView").GetBoolean("ShowAddToCartButton"); 275 bool showViewButton = Pageview.AreaSettings.GetItem("ProductList").GetItem("GridView").GetBoolean("ShowViewButton"); 276 bool showFavoriteButton = !Pageview.AreaSettings.GetItem("ProductList").GetItem("GridView").GetBoolean("HideFavoriteButton"); 277 bool showAddToDownloadButton = Pageview.AreaSettings.GetItem("ProductList").GetItem("GridView").GetBoolean("ShowAddToDownloadButton"); 278 bool showStock = Pageview.AreaSettings.GetItem("ProductList").GetItem("GridView").GetBoolean("ShowStockAndShipping"); 279 bool showNumber = Pageview.AreaSettings.GetItem("ProductList").GetItem("GridView").GetBoolean("ShowProductNumber"); 280 bool showStaticVariants = Pageview.AreaSettings.GetItem("ProductList").GetItem("GridView").GetBoolean("ShowStaticVariants"); 281 string cartButtonText = Translate("Add to cart"); 282 string viewMoreText = !string.IsNullOrEmpty(Pageview.AreaSettings.GetItem("ProductList").GetItem("GridView").GetString("ViewMoreText")) ? Pageview.AreaSettings.GetItem("ProductList").GetItem("GridView").GetString("ViewMoreText") : "View"; 283 bool useGoogleTagManager = !string.IsNullOrEmpty(Pageview.AreaSettings.GetItem("Settings").GetString("GoogleTagManagerID")); 284 bool showVATPrice = Pageview.AreaSettings.GetItem("ProductList").GetBoolean("ShowBothPricesWithWithoutVAT"); 285 bool isPricesWithVATEnabled = Converter.ToBoolean(Pageview.Area.EcomPricesWithVat); 286 string imageZoomOnHover = Pageview.AreaSettings.GetItem("ProductList").GetItem("GridView").GetBoolean("HoverImageZoom") ? "image-hover--zoom" : ""; 287 bool secondaryImage = Pageview.AreaSettings.GetItem("ProductList").GetItem("GridView").GetString("HoverAlternatineImage") != null ? Pageview.AreaSettings.GetItem("ProductList").GetItem("GridView").GetBoolean("HoverAlternatineImage") : false; 288 string footerClasses = showStaticVariants ? "u-min-h120px" : ""; 289 290 <script id="ProductGridItemContainer" type="text/x-template"> 291 {{#.}} 292 <div id="Product{{id}}" data-template="ProductGridItem" data-preloader="overlay" class="grid__col-lg-@columnsCount grid__col-md-@columnsCount grid__col-sm-@columnsCount grid__col-xs-6 product-list__grid-item @imageZoomOnHover dw-mod"> 293 {{#Product}} 294 {{>ProductGridItem}} 295 {{/Product}} 296 </div> 297 {{/.}} 298 </script> 299 300 <script id="ProductGridItem" type="text/x-template"> 301 {{#.}} 302 @if (useGoogleTagManager) 303 { 304 <text>{{{googleEnchantImpression 'Product catalogue' currency googleImpression}}}</text> 305 } 306 <input type="hidden" name="ProductLoopCounter{{id}}" value="{{id}}" /> 307 <input type="hidden" name="ProductID{{id}}" value="{{productId}}" /> 308 309 <div class="grid__cell product-list__grid-item__image dw-mod {{noImage}}"> 310 <img class="grid__cell-img b-lazy @*configurator-image*@" src="/Files/Images/placeholder.gif" 311 data-src="/Admin/Public/GetImage.ashx?width=377&amp;height=316&amp;crop=5&amp;Compression=85&amp;FillCanvas=true&amp;DoNotUpscale=false&amp;image={{image}}" 312 @if (secondaryImage) 313 { 314 <text> 315 {{#if secondaryImage}} 316 data-secondary-image-src="/Admin/Public/GetImage.ashx?width=300&amp;height=300&amp;crop=5&amp;Compression=75&amp;FillCanvas=true&amp;DoNotUpscale=true&amp;image={{secondaryImage}}" 317 {{/if}} 318 </text> 319 } 320 alt="{{name}}" /> 321 {{#StickersContainers}} 322 {{>StickersContainer}} 323 {{/StickersContainers}} 324 @if (showFavoriteButton) 325 { 326 <div class="favorites favorites--for-grid-view u-pull--right {{hasVariants}} dw-mod" {{hasVariants}}> 327 {{#Favorite}} 328 {{>FavoriteTemplate}} 329 {{/Favorite}} 330 </div> 331 } 332 </div> 333 334 <div class="grid__cell product-list__grid-item__price-info {{shortGridInfo}} dw-mod flex-configurator-product"> 335 <h2 class="u-condensed-text builder__content__card__header" title="{{name}}">{{name}}</h2> 336 <div class="builder__content__card__description">{{{description}}}</div> 337 {{#if TechnicalDocumentLink}} 338 <div class="configurator-technicalDocument-link"> 339 {{#if StandardEquipment}} 340 <div style="margin-top:5px;" class="attachment-content-information"> 341 <a href="javascript:void(0)" class="js-equipment-modal equipment-modal-trigger" data-prodid="{{productId}}" data-model="{{name}}" data-modalcontent="{{StandardEquipment}}"><strong>@Translate("view-attachment-equipment", "Se inkluderet standardudstyr")</strong></a> 342 </div> 343 {{/if}} 344 <a href="/Files/Files/{{TechnicalDocumentLink}}" target="_blank">@Translate("View Technical Data (pdf)")</a> 345 </div> 346 {{/if}} 347 @if (showPrice && !onlyPreview) 348 { 349 if (pointShopOnly) 350 { 351 <text> 352 {{#if havePointPrice}} 353 <div class="price price--product-list dw-mod">{{points}} @Translate("points")</div> 354 {{else}} 355 @Translate("Not available") 356 {{/if}} 357 </text> 358 } 359 else 360 { 361 <div class="price price--product-list dw-mod">{{price}}</div> 362 <div class="before-price {{onSale}} dw-mod">{{discount}}</div> 363 if (showVATPrice) 364 { 365 <div class="vat-price vat-price--product-list u-margin-top dw-mod"> 366 @if (isPricesWithVATEnabled) 367 { 368 <span>@Translate("excl. VAT")</span> 369 370 <span> ({{priceWithoutVAT}})</span> 371 } 372 else 373 { 374 <span>@Translate("incl. VAT")</span> 375 376 <span> ({{priceWithVAT}})</span> 377 } 378 379 380 381 382 </div> 383 } 384 } 385 386 387 } 388 <input type="hidden" value="{{unitId}}" name="Unit{{id}}" id="Unit_{{id}}" /> 389 <input type="hidden" value="{{variantid}}" name="VariantID{{id}}" id="Variant_{{id}}" /> 390 </div> 391 392 <div class="product-list__grid-item__footer @footerClasses dw-mod"> 393 <div class="u-ta-center u-inline-block u-full-width"> 394 <div class="buttons-collection {{hideBuyOptions}}"> 395 <button type="button" id="CartButton_{{id}}" class="js-cart-btn btn btn--secondary builder__content__btn dw-mod builder__content__btn--color-change--green u-full-width builder__mobile__btn {{disabledBuyButton}}" name="submit" data-prodid="{{productId}}" data-variantid="{{variantid}}" data-unitid="{{unitId}}" data-prodinfo="{{productInfo}}" {{#if HasRelatedProducts}} data-hasrelateditems="{{HasRelatedProducts}}" data-relatedproducts="{{SerializedRelatedProducts}}" data-image="{{image}}" {{/if}} data-isbrochure="{{IsBrochure}}" data-name="{{name}}" data-quantity="1" data-id="{{id}}" style="min-height: 42px !important;" 396 onclick="checkProductQuantity(event) {{disabledBuyButton}}"> 397 @cartButtonText 398 </button> 399 <input type="hidden" class="u-w80px u-pull--right use-btn-primary-height" id="Quantity_{{id}}" name="Quantity{{id}}" value="1" min="1"> 400 <input type="hidden" value="{{unitId}}" name="Unit{{id}}" id="Unit_{{id}}" /> 401 </div> 402 </div> 403 404 @if (!onlyPreview && showStock) 405 { 406 <div class="u-margin-top"> 407 <div><span class="stock-icon {{stockState}} u-no-margin dw-mod" title="{{stockText}}"></span> {{stockText}}</div> 408 <div> 409 {{#if deliveryText}} 410 {{deliveryText}} 411 {{else}} 412 - 413 {{/if}} 414 </div> 415 </div> 416 } 417 418 @if (showStaticVariants) 419 { 420 <text> 421 {{#Variants}} 422 {{>StaticVariantsTemplate}} 423 {{/Variants}} 424 425 {{#ifCond variantGroupsCount '>' 1}} 426 <div class="static-variant"> 427 @Translate("More options available") 428 </div> 429 {{/ifCond}} 430 431 {{#ifCond variantGroupsCount '==' 0}} 432 <div class="static-variant"></div> 433 {{/ifCond}} 434 </text> 435 } 436 437 @if (showAddToDownloadButton && Pageview.User != null) 438 { 439 <button type="button" class="btn btn--secondary u-no-margin u-margin-top btn--condensed dw-mod js-add-to-downloads" title="@Translate("Add")" data-product-id="{{productId}}"> 440 <i class="fas fa-plus js-button-icon"></i> 441 <span class="js-button-text">@Translate(viewMoreText)</span> 442 </button> 443 } 444 </div> 445 {{/.}} 446 </script> 447 } 448 449 @* Render modal content and script to close modal *@ 450 451 @helper RenderModalContent() 452 { 453 <div class="equipment-modal" id="equipment-modal"> 454 <div class="equipment-modal-header"> 455 <span id="equipment-modal-close" class="equipment-modal-close">&times;</span> 456 <div class="equipment-modal-header-item-name"> 457 @Translate("standard-equipment", "Standardudstyr") 458 </div> 459 <div class="equipment-modal-content"> 460 461 </div> 462 </div> 463 </div> 464 465 <script> 466 467 468 document.addEventListener("DOMContentLoaded",function (){ 469 470 471 var modal = document.getElementById("equipment-modal"); 472 var span = document.getElementsByClassName("equipment-modal-close")[0]; 473 474 span.addEventListener("click", function () { 475 modal.style.display = "none"; 476 477 document.documentElement.style.overflow = "auto"; 478 }); 479 480 window.addEventListener("click", function (event) { 481 if (event.target === modal) { 482 modal.style.display = "none"; 483 document.documentElement.style.overflow = "auto"; 484 } 485 }); 486 487 488 }) 489 490 </script> 491 } 492 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 493 @using Dynamicweb.Core 494 @using System 495 @using System.Web 496 @using System.Collections.Generic 497 @using Dynamicweb.Rapido.Blocks 498 499 @{ 500 BlocksPage productListPromotionsBlocksPage = BlocksPage.GetBlockPage("ProductList"); 501 502 Block productListPromotions = new Block 503 { 504 Id = "Promotions", 505 SortId = 10, 506 Template = RenderProductListPromotions() 507 }; 508 productListPromotionsBlocksPage.Add("PageContainer", productListPromotions); 509 } 510 511 @helper RenderProductListPromotions() 512 { 513 @*This is part of a script template *@ 514 515 string listId = HttpContext.Current.Request.QueryString.Get("ListID"); 516 bool isFavoriteList = !string.IsNullOrEmpty(listId); 517 518 if (!isFavoriteList) 519 { 520 switch (Pageview.AreaSettings.GetItem("ProductList").GetList("PromotionBlockDesign").SelectedValue) 521 { 522 case "OnlyText": 523 <article class="grid__col-12 u-margin-bottom"> 524 <h1>{{groupName}}</h1> 525 {{{groupDescription}}} 526 </article> 527 break; 528 case "TextAndImage": 529 <article class="grid__col-12 u-margin-bottom"> 530 <div class="grid grid--bleed"> 531 <div class="grid__col-md-6"> 532 <h1>{{groupName}}</h1> 533 {{{groupDescription}}} 534 </div> 535 {{#ifCond groupPromotionImage "!==" ""}} 536 <div class="grid__col-md-6"> 537 <img src="/Admin/Public/GetImage.ashx?width=600&crop=5&Compression=75&DoNotUpscale=true&image={{groupPromotionImage}}" alt="{{groupName}}" class="background-image__cover" /> 538 </div> 539 {{/ifCond}} 540 </div> 541 </article> 542 break; 543 case "Banner": 544 <text> 545 {{#ifCond groupPromotionImage "!==" ""}} 546 <article class="grid__col-12 u-margin-bottom"> 547 <div class="u-color-light grid center-container center-container--with-background-image u-padding" style="background-image:url('{{groupPromotionImage}}'); background-size: cover;"> 548 <div class="grid__col-12 u-middle"> 549 <div class="grid__cell"> 550 {{{groupDescription}}} 551 </div> 552 </div> 553 </div> 554 </article> 555 {{/ifCond}} 556 </text> 557 break; 558 } 559 } 560 } 561 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 562 @using Dynamicweb.Core 563 @using System 564 @using System.Web 565 @using System.Collections.Generic 566 @using Dynamicweb.Rapido.Blocks 567 568 @{ 569 BlocksPage productListMenuBlocksPage = BlocksPage.GetBlockPage("ProductList"); 570 571 var isLeftMenuEnabled = Converter.ToString(Pageview?.Page?.PropertyItem?["LeftMenu"]) == "True"; 572 var useEcomGroups = Pageview?.Page?.NavigationSettings?.UseEcomGroups ?? false; 573 574 if (productListMenuBlocksPage != null && isLeftMenuEnabled && useEcomGroups) 575 { 576 Block productListMenuBlock = new Block 577 { 578 Id = "Menu", 579 SortId = 20, 580 Template = RenderProductListMenu() 581 }; 582 583 productListMenuBlocksPage.Add("Navigation", productListMenuBlock); 584 } 585 } 586 587 @helper RenderProductListMenu() 588 { 589 var navigationMarkup = RenderNavigation(new 590 { 591 id = "leftnav", 592 cssclass = "dwnavigation", 593 startLevel = 1, 594 endlevel = 5, 595 template = "LeftNavigation.xslt", 596 mode = "ecom" 597 }); 598 599 <h2 class="u-margin-bottom">@Translate("Product categories")</h2> 600 601 <div class="u-padding-bottom--lg"> 602 @navigationMarkup 603 </div> 604 } 605 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 606 @using Dynamicweb.Core 607 @using System 608 @using System.Web 609 @using System.Collections.Generic 610 @using Dynamicweb.Rapido.Blocks 611 612 @{ 613 BlocksPage productListBottomSnippetsPage = BlocksPage.GetBlockPage("ProductList"); 614 615 Block productListStickers = new Block 616 { 617 Id = "Stickers", 618 SortId = 10, 619 Template = RenderStickersTemplates() 620 }; 621 productListBottomSnippetsPage.Add("BottomSnippets", productListStickers); 622 623 Block productListUnits = new Block 624 { 625 Id = "Units", 626 SortId = 20, 627 Template = RenderUnitTemplates() 628 }; 629 productListBottomSnippetsPage.Add("BottomSnippets", productListUnits); 630 631 Block productListVariants = new Block 632 { 633 Id = "Variants", 634 SortId = 30, 635 Template = RenderVariantTemplates() 636 }; 637 productListBottomSnippetsPage.Add("BottomSnippets", productListVariants); 638 639 Block productListFavorites = new Block 640 { 641 Id = "Favorites", 642 SortId = 40, 643 Template = RenderFavoritesTemplates() 644 }; 645 productListBottomSnippetsPage.Add("BottomSnippets", productListFavorites); 646 647 Block productListPreRender = new Block 648 { 649 Id = "PreRenders", 650 SortId = 50, 651 Template = RenderPreRenderTemplates() 652 }; 653 productListBottomSnippetsPage.Add("BottomSnippets", productListPreRender); 654 655 Block productListInitializers = new Block 656 { 657 Id = "Initializers", 658 SortId = 60, 659 Template = RenderInitializers() 660 }; 661 productListBottomSnippetsPage.Add("BottomSnippets", productListInitializers); 662 } 663 664 @helper RenderStickersTemplates() { 665 <script id="StickersContainer" type="text/x-template"> 666 <div class="stickers-container stickers-container--{{position}} dw-mod"> 667 {{#Stickers}} 668 {{>Sticker}} 669 {{/Stickers}} 670 </div> 671 </script> 672 673 <script id="Sticker" type="text/x-template"> 674 <div class="stickers-container__tag {{className}} dw-mod">{{text}}</div> 675 </script> 676 677 <script id="MiniSticker" type="text/x-template"> 678 <div class="stickers-container__tag stickers-container__tag--micro {{className}} dw-mod">{{text}}</div> 679 </script> 680 } 681 682 @helper RenderUnitTemplates() { 683 <script id="UnitOption" type="text/x-template"> 684 <div class="dropdown__item dw-mod" onclick="HandlebarsBolt.UpdateContent('Product{{id}}', '{{link}}&feed=true&UnitID={{value}}&rid={{id}}')">{{name}}</div> 685 </script> 686 } 687 688 @helper RenderVariantTemplates() { 689 <script id="VariantsTemplate" type="text/x-template"> 690 {{#.}} 691 <div> 692 <div class="u-bold">{{name}}</div> 693 <div> 694 {{#VariantOptions}} 695 {{>VariantOption}} 696 {{/VariantOptions}} 697 </div> 698 </div> 699 {{/.}} 700 </script> 701 702 <script id="VariantOption" type="text/x-template"> 703 {{#if color}} 704 <button type="button" data-variant-id="{{variantId}}" data-variant-group="{{groupId}}" onclick="MatchVariants.SelectThis(event)" class="btn btn--colorbox u-margin-right {{disabled}} {{selected}} js-variant-option" data-check="{{selected}}" {{disabled}} style="background-color: {{color}}"></button> 705 {{else}} 706 {{#if image}} 707 <img data-variant-id="{{variantId}}" data-variant-group="{{groupId}}" src="{{image}}" onclick="MatchVariants.SelectThis(event)" alt="{{name}}" title="{{name}}" class="btn btn--tag {{selected}} js-variant-option" data-check="{{selected}}" /> 708 {{else}} 709 <button type="button" data-variant-id="{{variantId}}" data-variant-group="{{groupId}}" onclick="MatchVariants.SelectThis(event)" class="btn btn--tag {{disabled}} {{selected}} js-variant-option" data-check="{{selected}}" {{disabled}}>{{name}}</button> 710 {{/if}} 711 {{/if}} 712 </script> 713 714 <script id="StaticVariantsTemplate" type="text/x-template"> 715 {{#.}} 716 {{#if isFirstGroup}} 717 <div> 718 {{#VariantOptions}} 719 {{>StaticVariantOption}} 720 {{/VariantOptions}} 721 </div> 722 {{/if}} 723 {{/.}} 724 </script> 725 726 <script id="StaticVariantOption" type="text/x-template"> 727 {{#if color}} 728 <div class="static-variant static-variant--color dw-mod" style="background-color: {{color}}" title="{{name}}"></div> 729 {{else}} 730 <div class="static-variant dw-mod">{{name}} </div> 731 {{/if}} 732 </script> 733 734 <script id="VariantOptionImage" type="text/x-template"> 735 <img data-variant-id="{{variantId}}" data-friends="{{friendsList}}" data-variant-group="{{groupId}}" onclick="MatchVariants.SelectThis(event)" src="/Admin/Public/GetImage.ashx?width=100&amp;height=50&amp;crop=5&amp;Compression=75&amp;image=/Images/{{image}}" alt="{{name}}" title="{{name}}" class="btn btn--tag {{disabled}} {{selected}} js-variant-option" data-check="{{selected}}" {{disabled}} /> 736 </script> 737 } 738 739 @helper RenderFavoritesTemplates() { 740 <script id="FavoriteTemplate" type="text/x-template"> 741 <div class="favorites-list u-ta-left"> 742 <label for="FavoriteTrigger_{{id}}" class="u-no-margin js-favorite-btn"><i class="{{favoriteIcon}} fa-1_5x"></i></label> 743 <input type="checkbox" id="FavoriteTrigger_{{id}}" class="dropdown-trigger" /> 744 <div class="dropdown dropdown--absolute-position"> 745 <div class="dropdown__content dropdown__content--show-left dropdown__content--padding u-w220px dw-mod"> 746 <ul class="list list--clean dw-mod"> 747 {{#FavoriteLists}} 748 {{>FavoriteListItem}} 749 {{/FavoriteLists}} 750 </ul> 751 </div> 752 <label class="dropdown-trigger-off" for="FavoriteTrigger_{{id}}"></label> 753 </div> 754 </div> 755 </script> 756 757 <script id="FavoriteListItem" type="text/x-template"> 758 <li> 759 <a href="{{link}}" class="list__link u-no-underline dw-mod" onclick="Scroll.SavePosition(event); {{facebookPixelAction}}"><i class="{{favoriteIcon}}"></i> {{name}}</a> 760 </li> 761 </script> 762 } 763 764 @helper RenderPreRenderTemplates() { 765 string facetsViewMode = !String.IsNullOrEmpty(Pageview.AreaSettings.GetItem("ProductList").GetString("FacetsViewMode")) ? Pageview.AreaSettings.GetItem("ProductList").GetString("FacetsViewMode").ToLower() : "left"; 766 767 <script id="ProductPreRenderContainer" type="text/x-template"> 768 @if (facetsViewMode == "left" && Pageview.Device.ToString() != "Mobile") 769 { 770 <div class="grid__col-3"> 771 <div class="pre-render-element pre-render-element--xs"></div> 772 <div class="pre-render-element pre-render-element--md"></div> 773 <div class="pre-render-element pre-render-element--md"></div> 774 <div class="pre-render-element pre-render-element--md"></div> 775 </div> 776 } 777 <div class="grid__col-auto"> 778 <div class="pre-render-element pre-render-element--xs"></div> 779 <div class="pre-render-element pre-render-element--lg"></div> 780 <div class="pre-render-element pre-render-element--lg"></div> 781 <div class="pre-render-element pre-render-element--lg"></div> 782 <div class="pre-render-element pre-render-element--lg"></div> 783 </div> 784 </script> 785 } 786 787 @helper RenderInitializers() { 788 <script> 789 document.addEventListener("DOMContentLoaded", function (event) { 790 document.getElementById("productList").addEventListener('contentLoaded', function (e) { 791 if (getTarget(e).id === "productList") { 792 Search.Init(); 793 Facets.Init("selectedFacets", "productList"); 794 } 795 }, false); 796 }); 797 </script> 798 } 799 800 @if (File.Exists(HttpContext.Current.Server.MapPath("/Files/Templates/Designs/Rapido/eCom/ProductList/Blocks/Custom__Blocks.cshtml"))) 801 { 802 <text>@inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 803 @using System 804 @using System.Web.UI 805 @using Dynamicweb.Ecommerce.Products; 806 807 @{ 808 BlocksPage customBlocksPage = BlocksPage.GetBlockPage("ProductList"); 809 BlocksPage masterBlocksPage = BlocksPage.GetBlockPage("Master"); 810 811 Block freeReturns = new Block 812 { 813 Id = "freeReturns", 814 SortId = 99, 815 Template = RenderFreeReturns() 816 }; 817 customBlocksPage.Add("PageContainer", freeReturns); 818 } 819 820 @helper RenderFreeReturns() 821 { 822 int optionsPageId = GetPageIdByNavigationTag("OptionsPage"); 823 int attachmentsPageId = GetPageIdByNavigationTag("AttachmentsPage"); 824 int documentsPageId = GetPageIdByNavigationTag("DocumentsPage"); 825 int cartPageId = GetPageIdByNavigationTag("CartPage"); 826 827 int currentPage = Convert.ToInt32(GetGlobalValue("Global:Page.ID")); 828 string nextPage = currentPage.ToString(); 829 830 string modelId = Dynamicweb.Context.Current.Request.QueryString["Model"]; 831 832 bool existingProduct = (Dynamicweb.Context.Current.Request.QueryString["Existing"] != null) ? Convert.ToBoolean(Dynamicweb.Context.Current.Request.QueryString["Existing"].ToString().ToLower()) : false; 833 834 string nextPageText = Translate("Continue"); 835 836 if (currentPage == attachmentsPageId) 837 { 838 if (!existingProduct) 839 { 840 if (!Egholm.Integration.Helpers.Users.IsInGroupConfigurator()) 841 { 842 nextPage = cartPageId.ToString() + "&Model=" + modelId + "&Existing=" + existingProduct; 843 nextPageText = Translate("Generate proposal - enduser"); 844 } 845 else 846 { 847 nextPage = documentsPageId.ToString() + "&Model=" + modelId + "&Existing=" + existingProduct; 848 nextPageText = Translate("Select documents"); 849 } 850 } 851 else 852 { 853 if (!Egholm.Integration.Helpers.Users.IsInGroupConfigurator()) 854 { 855 nextPage = cartPageId.ToString() + "&Model=" + modelId + "&Existing=" + existingProduct; 856 nextPageText = Translate("Generate proposal - enduser"); 857 } 858 else 859 { 860 nextPage = documentsPageId.ToString() + "&Model=" + modelId + "&Existing=" + existingProduct; 861 nextPageText = Translate("Select documents"); 862 } 863 } 864 } 865 866 if (currentPage == optionsPageId) 867 { 868 if (Egholm.Integration.Helpers.Users.IsInGroupConfigurator()) 869 { 870 if (!existingProduct) 871 { 872 nextPage = attachmentsPageId.ToString() + "&Model=" + modelId + "&Existing=" + existingProduct; 873 nextPageText = Translate("Select tools"); 874 } 875 else 876 { 877 nextPage = documentsPageId.ToString() + "&Model=" + modelId + "&Existing=" + existingProduct; 878 nextPageText = Translate("Select documents"); 879 } 880 } 881 else 882 { 883 if (existingProduct != false) 884 { 885 nextPage = cartPageId.ToString() + "&Model=" + modelId + "&Existing=" + existingProduct; 886 nextPageText = Translate("Generate proposal - enduser"); 887 } 888 else 889 { 890 nextPage = attachmentsPageId.ToString() + "&Model=" + modelId + "&Existing=False"; 891 nextPageText = Translate("Select tools"); 892 } 893 } 894 } 895 if (currentPage == documentsPageId) 896 { 897 nextPage = cartPageId.ToString() + "&Model=" + modelId + "&Existing=" + existingProduct; 898 if (!Egholm.Integration.Helpers.Users.IsInGroupConfigurator()) 899 { 900 nextPageText = Translate("Generate proposal - enduser"); 901 } 902 else 903 { 904 nextPageText = Translate("Generate proposal - dealer"); 905 } 906 } 907 908 <div class="grid__col-lg-4"> 909 <div class="builder__cart"> 910 @{ 911 Product product = new ProductService().GetProductsByGroupId("GROUP254", true, Pageview.Area.EcomLanguageId, false).FirstOrDefault(x => x.Number.Equals(modelId)); 912 if (product != null) 913 { 914 <div class="grid__col-12"> 915 <h2 class="builder__header--fontsize-28 u-mb-0px">@product.Name</h2> 916 </div> 917 } 918 919 <div>&nbsp;</div> 920 <div id="egholmCart"></div> 921 <input value="@Translate("Cart_Remove", "Remove")" id="egholmCartRemoveTranslations" type="hidden"/> 922 @*KR 09222020*@ 923 <input value="@Translate("Total", "Total")" id="egholmCartTotalTranslations" type="hidden"/> 924 <input value="@Translate("Price without VAT", "Price without VAT")" id="egholmCartPriceWithoutVATTranslations" type="hidden"/> 925 @*\KR 09222020*@ 926 } 927 <div class="grid__col-12"></div> 928 <div class="grid__col-12"> 929 <a href="/Default.aspx?ID=@nextPage" class="btn btn--secondary builder__content__btn builder__content__btn--orange builder__content__btn--width100 u-mt-20px">@nextPageText</a> 930 </div> 931 </div> 932 <div class="grid__col-12"> 933 @if ((currentPage == attachmentsPageId || currentPage == documentsPageId) && !existingProduct) 934 { 935 <a href="Default.aspx?ID=@optionsPageId&Model=@modelId&Existing=@existingProduct.ToString()" class="btn btn--secondary builder__content__btn builder__content__btn--grey u-mt-20px">@Translate("Back to Accessories")</a> 936 } 937 @if (currentPage == documentsPageId && !existingProduct) 938 { 939 <a href="Default.aspx?ID=@attachmentsPageId&Model=@modelId&Existing=@existingProduct.ToString()" class="btn btn--secondary builder__content__btn builder__content__btn--grey u-mt-10px">@Translate("Back to Attachments")</a> 940 } 941 <a href="/Default.aspx?ID=@GetPageIdByNavigationTag("CartPage")&cartcmd=emptycart&Redirect=@Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(GetPageIdByNavigationTag("ConfiguratorPage"))" class="btn btn--secondary builder__content__btn builder__content__btn--grey u-mt-10px">@Translate("Clear and restart")</a> 942 943 <!-- 944 <a href="#" onclick="Cart.EmptyCart(event); return false; window.location = '/configurator';" id="restart" name="restart" class="btn btn--secondary builder__content__btn builder__content__btn--grey u-mt-10px">@Translate("Clear and restart")</a> 945 --> 946 947 </div> 948 </div> 949 }</text> 950 } 951 952 @if (productListNavigation.BlocksList.Count < 1) 953 { 954 productListNavigation.Design.RenderType = RenderType.Hide; 955 } 956 <input type="hidden" id="CartOrderlinesFeed" name="CartOrderlinesFeed" value="@GetPageIdByNavigationTag("CartOrderlinesFeed")"/> 957 <input type="hidden" id="CartOrderlinesFeedDOM" name="CartOrderlinesFeedDOM" value="@GetPageIdByNavigationTag("CartOrderlinesFeedDOM")"/> 958 <input type="hidden" id="OptionsPage" name="OptionsPage" value="@GetPageIdByNavigationTag("OptionsPage")"/> 959 <input type="hidden" id="AttachmentsPage" name="AttachmentsPage" value="@GetPageIdByNavigationTag("AttachmentsPage")" /> 960 <input type="hidden" id="PageID" name="PageID" value="@Pageview.Page.ID" /> 961 <input type="hidden" id="DomainUrl" name="DomainUrl" value="@HttpContext.Current.Request.Url.ToString().Substring(0, HttpContext.Current.Request.Url.ToString().IndexOf("/Default.aspx"))"/> 962 <input type="hidden" id="ConfiguratorPath" name="ConfiguratorPath" value="@Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(GetPageIdByNavigationTag("ConfiguratorPage"))"/> 963 <input type="hidden" id="alertTranslation" name="alertTranslation" value="@Translate("already_in_cart", "Already in the cart")"/> 964 <input type="hidden" id="emptyCartTranslation" name="emptyCartTranslation" value="@Translate("empty_configurator", "Your configurator is empty")"/> 965 <form name="multiForm" id="multiForm" method="post"> 966 <input type="hidden" name="CartCmd" id="attachmentCartCmd" value="addMulti"/> 967 @* The @RenderBlockList base helper is included in Components/GridBuilder.cshtml *@ 968 @RenderBlockList(productListPage.BlocksRoot.BlocksList) 969 </form> 970 971 @helper RenderPageContainer() 972 { 973 @RenderPageTop() 974 975 List<Block> subBlocks = this.productListPage.GetBlockListById("PageContainer").OrderBy(item => item.SortId).ToList(); 976 977 string pageUrl = GetGlobalValue("Global:Pageview.Url.Raw"); 978 string listId = HttpContext.Current.Request.QueryString.Get("ListID"); 979 bool isFavoriteList = !string.IsNullOrEmpty(listId); 980 string feedFullUrl = pageUrl + "&feed=true"; 981 feedFullUrl += !isFavoriteList ? "&DoNotShowVariantsAsSingleProducts=True" : ""; 982 string smallDeviceCss = Pageview.Device.ToString() == "Mobile" ? "" : ""; 983 984 <div class="grid grid--align-content-start @smallDeviceCss js-handlebars-root rearrangecart" id="productList" data-template="ProductContainer" data-pre-render-template="ProductPreRenderContainer" data-json-feed="@feedFullUrl" data-preloader="overlay"></div> 985 986 <script id="ProductContainer" type="text/x-template"> 987 {{#each .}} 988 @RenderBlockList(subBlocks) 989 {{else}} 990 <div class="grid__col-12"> 991 <h2 class="u-ta-center">@Translate("Your search gave 0 results")</h2> 992 </div> 993 {{/each}} 994 </script> 995 } 996 997 @helper RenderPageTop() 998 { 999 string modelId = Dynamicweb.Context.Current.Request.QueryString["Model"]; 1000 Product product = new ProductService().GetProductsByGroupId("GROUP254", true, Pageview.Area.EcomLanguageId, false).FirstOrDefault(x => x.Number.Equals(modelId)); 1001 1002 int attachmentsPageId = GetPageIdByNavigationTag("AttachmentsPage"); 1003 int accessoriesPageId = GetPageIdByNavigationTag("OptionsPage"); 1004 int documentsPageId = GetPageIdByNavigationTag("DocumentsPage"); 1005 int currentPage = Convert.ToInt32(GetGlobalValue("Global:Page.ID")); 1006 1007 string heading = string.Empty; 1008 string paragraph = string.Empty; 1009 string clientString = string.Empty; 1010 string paragraphText = string.Empty; 1011 1012 if (currentPage == attachmentsPageId) 1013 { 1014 paragraph = Translate("Now select your attachments for"); 1015 } 1016 if (currentPage == accessoriesPageId) 1017 { 1018 paragraph = Translate("Now select your accessories for"); 1019 } 1020 if (currentPage == documentsPageId) 1021 { 1022 paragraph = Translate("Now select your documents for"); 1023 paragraphText = Translate("Document textarea"); 1024 } 1025 if (Egholm.Integration.Helpers.Users.IsInGroupConfigurator()) 1026 { 1027 clientString = Translate(" for client"); 1028 } 1029 1030 <h2>@Translate("Building") @product.Name @clientString</h2> 1031 <h4>@paragraph @product.Name</h4> 1032 if (!String.IsNullOrEmpty(paragraphText)) 1033 { 1034 <p>@paragraphText</p> 1035 } 1036 } 1037 1038 @helper RenderProductList() 1039 { 1040 @*This is part of a script template *@ 1041 1042 List<Block> subBlocks = productListPage.GetBlockListById("ProductList").OrderBy(item => item.SortId).ToList(); 1043 1044 string pageId = GetGlobalValue("Global:Page.ID"); 1045 string pageUrl = GetGlobalValue("Global:Pageview.Url.Raw"); 1046 string listId = HttpContext.Current.Request.QueryString.Get("ListID"); 1047 bool isFavoriteList = !string.IsNullOrEmpty(listId); 1048 string feedFullUrl = pageUrl + "&feed=true"; 1049 feedFullUrl += !isFavoriteList ? "&DoNotShowVariantsAsSingleProducts=True" : ""; 1050 string smallDeviceCss = Pageview.Device.ToString() == "Mobile" ? "u-no-padding" : ""; 1051 1052 <div class="grid__col-lg-8 @smallDeviceCss u-no-padding"> 1053 @if (isFavoriteList) 1054 { 1055 string searchPlaceholder = Translate("Search favorite products", "Search favorite products"); 1056 string searchValue = HttpContext.Current.Request.QueryString.Get("Search") ?? ""; 1057 1058 <div class="grid__cell"> 1059 <div class="u-pull--left"> 1060 <h2 class="u-no-margin"><i class="{{headerIcon}}"></i>{{header}}</h2> 1061 </div> 1062 <div class="grid__col--bleed grid__col-6 u-pull--right"> 1063 <div class="u-margin-bottom"> 1064 <div class="typeahead u-color-inherit js-typeahead" data-page-size="10" id="FavoritesSearch" data-list-id="@listId" data-search-feed-id="@pageId&feed=true" data-result-page-id="@pageId"> 1065 <input type="text" class="typeahead-search-field u-no-margin u-full-width js-typeahead-search-field" placeholder="@searchPlaceholder" value="@searchValue"> 1066 <ul class="dropdown dropdown--absolute-position u-full-width js-handlebars-root js-typeahead-search-content u-min-w220px u-full-width dw-mod" id="FavoritesSearchContent" data-template="SearchProductsTemplate" data-json-feed="@feedFullUrl&ListID=@listId" data-init-onload="false" data-preloader="minimal"></ul> 1067 <button type="button" class="btn btn--condensed btn--primary u-no-margin dw-mod js-typeahead-enter-btn"> 1068 <i class="fas fa-search"></i> 1069 </button> 1070 </div> 1071 </div> 1072 </div> 1073 </div> 1074 } 1075 1076 <div class="grid__cell"> 1077 @RenderBlockList(subBlocks) 1078 </div> 1079 </div> 1080 } 1081 <div class="options-modal" id="options-modal" data-currentlocation="configurator"> 1082 <div class="options-modal-header"> 1083 <span id="options-modal-close" class="options-modal-close">&times;</span> 1084 <div class="options-modal-header-item-name"> 1085 Rotary/mulch mover 1200 1086 </div> 1087 <div class="options-modal-content"> 1088 <p class="text">@Translate("has_options_text", "This item has options - please specify your preferred configuration below.")</p> 1089 <div class="options-container"> 1090 <div class="grid"> 1091 <div class="grid__col-lg-6 grid__col-md-8 u-padding-0"> 1092 <div class="js-options-container"> 1093 1094 </div> 1095 <button class="btn btn--secondary options-modal-btn js-add-options" disabled onclick="configuratorAddPartsToCart(event)">@Translate("add_to_selection", "ADD TO SELECTION")</button> 1096 <button class="btn btn--secondary options-modal-btn js-no-option-please" style="margin-bottom: 0px;" onclick="configuratorSkipOptions(event)">@Translate("no_options_please", "NO OPTIONS PLEASE")</button> 1097 </div> 1098 <div class="grid__col-lg-6 grid__col-md-4 u-padding-0"> 1099 <img class="js-options-modal-content-img" src=""/> 1100 </div> 1101 </div> 1102 </div> 1103 </div> 1104 </div> 1105 </div> 1106 1107 <script> 1108 var modal = document.getElementById("options-modal"); 1109 1110 var btn = document.getElementById("myBtn"); 1111 1112 var span = document.getElementsByClassName("options-modal-close")[0]; 1113 1114 span.onclick = function() { 1115 modal.style.display = "none"; 1116 $("html").css("overflow", "auto"); 1117 } 1118 1119 window.onclick = function(event) { 1120 if (event.target == modal) { 1121 modal.style.display = "none"; 1122 $("html").css("overflow", "auto"); 1123 } 1124 } 1125 </script>