Error executing template "Designs/Rapido/eCom/Productlist/NZProductsRender.cshtml" System.NullReferenceException: Object reference not set to an instance of an object. at CompiledRazorTemplates.Dynamic.RazorEngine_858c98229b724fddbfbdfd41cca39c64.Execute() in E:\Solutions\S_DW_Lauridsen\lauridsen-live\Files\Templates\Designs\Rapido\eCom\Productlist\NZProductsRender.cshtml:line 44 at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader) at RazorEngine.Templating.RazorEngineCore.RunTemplate(ICompiledTemplate template, TextWriter writer, Object model, DynamicViewBag viewBag) at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag) at RazorEngine.Templating.DynamicWrapperService.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 RazorEngine.Templating.RazorEngineServiceExtensions.RunCompile(IRazorEngineService service, String name, Type modelType, Object model, DynamicViewBag viewBag) 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.Core 3 @using System 4 @using System.Web 5 @using System.Linq 6 @using Dynamicweb.Ecommerce.Products 7 8 @using Dynamicweb.Security.UserManagement; 9 10 11 @{ 12 string pageUrl = GetGlobalValue("Global:Pageview.Url.Raw"); 13 14 //Favorites 15 string pageId = GetGlobalValue("Global:Page.ID"); 16 string feedFullUrl = pageUrl + "&feed=true"; 17 string requestQuery = GetGlobalValue("Global:Request.Query") + "&feed=true"; 18 string groupID = HttpContext.Current.Request.QueryString.Get("groupid"); 19 string searchQuery = HttpContext.Current.Request.QueryString.Get("Search"); 20 string productCatalogId = GetGlobalValue("Global:Page.ID"); 21 string listId = HttpContext.Current.Request.QueryString.Get("ListID"); 22 bool isFavoriteList = !String.IsNullOrEmpty(listId) ? true : false; 23 requestQuery += !isFavoriteList ? "&DoNotShowVariantsAsSingleProducts=True" : ""; 24 feedFullUrl += !isFavoriteList ? "&DoNotShowVariantsAsSingleProducts=True" : ""; 25 int mostPopularProducts = GetInteger("eCom:Related.MostPopularProducts.Count"); 26 string favoritPage = String.Format("/Default.aspx?ID={0}&CC20=CreateFormList", GetPageIdByNavigationTag("CustomerFavorites").ToString()); 27 28 29 int productsPageId = GetPageIdByNavigationTag("ProductsPage"); 30 int productsSearchFeedId = productsPageId; 31 int productGroupsPageId = GetPageIdByNavigationTag("ProductGroupsFeed"); 32 string searchCountText = Translate("Showing page", "Showing page") + " " + GetValue("Ecom:ProductList.CurrentPage") + " " + Translate("of", "of") + " " + GetValue("Ecom:ProductList.TotalPages") + " (" + GetValue("Ecom:ProductList.PageProdCnt") + " " + Translate("products", "products") + ")"; 33 34 int listViewsCount = 0; 35 listViewsCount += Converter.ToBoolean(Pageview.Area.Item["ProductItemContainer"]) ? 1 : 0; 36 listViewsCount += Converter.ToBoolean(Pageview.Area.Item["ProductGridItemContainer"]) ? 1 : 0; 37 listViewsCount += Converter.ToBoolean(Pageview.Area.Item["ProductDetailsItemContainer"]) ? 1 : 0; 38 39 bool hideSorting = Converter.ToBoolean(Pageview.Area.Item["HideSorting"]); 40 bool onlyPreviewForAnonymousUsers = Pageview.AreaSettings.GetBoolean("OnlyPreviewForAnonymous"); 41 bool onlyPreview = onlyPreviewForAnonymousUsers ? Pageview.User == null : false; 42 43 Dynamicweb.Ecommerce.Products.GroupService currentGroup = new Dynamicweb.Ecommerce.Products.GroupService(); 44 string categoryBottomDescription = !string.IsNullOrWhiteSpace(groupID) && currentGroup.GetGroup(groupID).ProductGroupFieldValues.Any(x => x.ProductGroupField.SystemName.Equals("categoryBottomDescription")) ? currentGroup.GetGroup(groupID).ProductGroupFieldValues.GetProductGroupFieldValue("categoryBottomDescription").Value.ToString() : ""; 45 } 46 47 @* Set product canonical URL *@ 48 @SnippetStart("canonical") 49 @{ 50 string host = GetGlobalValue("Global:Request.Host"); 51 string url = GetGlobalValue("Global:Pageview.Url"); 52 int queryIndex = url.IndexOf("?", StringComparison.Ordinal); 53 if (queryIndex > -1) 54 { 55 url = url.Substring(0, queryIndex); 56 } 57 } 58 <link rel="canonical" href="https://@host@url"> 59 @SnippetEnd("canonical") 60 61 @if (GetGlobalValue("Global:Pageview.Url").Split('/').Count() > 3 || !string.IsNullOrEmpty(searchQuery)) 62 { 63 if (!string.IsNullOrEmpty(searchQuery)) 64 { 65 <section class="mt-5 grid__col--bleed-y"> 66 <h1 class="h2">@Translate("Search result for"): @searchQuery</h1> 67 </section> 68 69 <div class="grid__cell grid__cell--align-middle-right grid__col-12"> 70 <div class="grid__col--bleed"> 71 <div class="typeahead u-color-inherit js-typeahead" data-page-size="10" id="TopProductSearch" data-search-feed-id="@productsSearchFeedId&feed=true" data-result-page-id="@productsPageId" data-groups-page-id="@productGroupsPageId"> 72 <ul class="dropdown dropdown--absolute-position u-min-w220px js-handlebars-root js-typeahead-groups-content dw-mod" id="TopProductSearchGroupsContent" data-template="SearchGroupsTemplate" data-json-feed="/Default.aspx?ID=@productGroupsPageId&feedType=productGroups" data-init-onload="false" data-preloader="minimal"></ul> 73 <input type="text" class="typeahead-search-field u-no-margin js-typeahead-search-field w-100" placeholder="@searchQuery" value="@searchQuery"> 74 <ul class="dropdown dropdown--absolute-position u-min-w220px u-full-width js-handlebars-root js-typeahead-search-content u-full-width dw-mod" id="TopProductSearchContent" data-template="SearchContentTemplate" data-json-feed="/Default.aspx?ID=@productsSearchFeedId&feedType=productsOnly&feed=true" data-init-onload="false" data-preloader="minimal"></ul> 75 <i class="u-no-margin dw-mod js-typeahead-enter-btn fa fa-search search-icon"></i> 76 </div> 77 </div> 78 </div> 79 } 80 81 <div name="multiForm" id="multiForm" method="post"> 82 <input type="hidden" name="CartCmd" id="CartCmd" value="addMulti" /> 83 <div class="paragraph-container mt-5"> 84 <div class="grid grid--align-content-start js-handlebars-root product-list js-target" id="productList" data-template="ProductContainer" data-pre-render-template="ProductPreRenderContainer" data-json-feed="@feedFullUrl" data-preloader="overlay"></div> 85 </div> 86 </div> 87 88 <script id="ProductPreRenderContainer" type="text/x-template"> 89 <div class="grid__col-12"> 90 <div class="pre-render-element pre-render-element--xxs"></div> 91 </div> 92 <div class="grid__col-12"> 93 <div class="pre-render-element pre-render-element--xs"></div> 94 </div> 95 96 @if (Pageview.Area.Item["EcommerceFacetsViewMode"].ToString() == "left" && Pageview.Device.ToString() != "Mobile") 97 { 98 <div class="grid__col-3"> 99 <div class="pre-render-element pre-render-element--xs"></div> 100 <div class="pre-render-element pre-render-element--md"></div> 101 <div class="pre-render-element pre-render-element--md"></div> 102 <div class="pre-render-element pre-render-element--md"></div> 103 </div> 104 } 105 106 <div class="grid__col-auto"> 107 <div class="pre-render-element pre-render-element--xs"></div> 108 <div class="pre-render-element pre-render-element--lg"></div> 109 <div class="pre-render-element pre-render-element--lg"></div> 110 <div class="pre-render-element pre-render-element--lg"></div> 111 <div class="pre-render-element pre-render-element--lg"></div> 112 </div> 113 </script> 114 115 <script id="ProductContainer" type="text/x-template"> 116 {{#each .}} 117 @if (!isFavoriteList) 118 { 119 switch (Pageview.Area.Item["PromotionBlockDesign"].ToString()) 120 { 121 case "OnlyText": 122 break; 123 case "TextAndImage": 124 break; 125 case "Banner": 126 <text> 127 {{#ifCond groupPromotionImage "!==" ""}} 128 <article class="grid__col-12 u-margin-bottom"> 129 <div class="u-color-light grid center-container center-container--with-background-image u-padding" style="background-image:url('{{groupPromotionImage}}'); background-size: cover;"> 130 <div class="grid__col-12 u-middle"> 131 <div class="grid__cell"> 132 {{{groupDescription}}} 133 </div> 134 </div> 135 </div> 136 </article> 137 {{/ifCond}} 138 </text> 139 break; 140 } 141 } 142 143 @if (Pageview.Area.Item["EcommerceFacetsViewMode"].ToString() == "top" || Pageview.Device.ToString() == "Mobile") 144 { 145 <div class="grid__col-12 grid__col--bleed-x"> 146 <input type="checkbox" id="CheckFacetGroups" class="facets-container-trigger" /> 147 148 149 150 <div class="grid facets-container dw-mod"> 151 152 <div class="grid__col-xs-12 grid__col--bleed-y js-facets-group"> 153 <div class="facets-group__name">@Translate("Dimension1", "Dimension 1")</div> 154 <div class="js-facets-container"> 155 <div class="custom-control custom-control--number products__facet"> 156 <form id="dimension1" class="js-custom-facet-number facet-min-max" action="" method="GET"> 157 <input type="number" class="js-custom-facet-number-input w-100" name="dimension1" value="@Dynamicweb.Context.Current.Request.QueryString.Get("dimension1")" placeholder="Dimension 1"> 158 <i class="search-icon fa fa-search facet-min-max__submit"></i> 159 </form> 160 </div> 161 </div> 162 </div> 163 164 <div class="grid__col-xs-12 grid__col--bleed-y js-facets-group"> 165 <div class="facets-group__name">@Translate("Dimension2", "Dimension 2")</div> 166 <div class="js-facets-container"> 167 <div class="custom-control custom-control--number products__facet"> 168 <form id="dimension2" class="js-custom-facet-number facet-min-max" action="" method="GET"> 169 <input type="number" class="js-custom-facet-number-input w-100" name="dimension2" value="@Dynamicweb.Context.Current.Request.QueryString.Get("dimension2")" placeholder="Dimension 2"> 170 <i class="search-icon fa fa-search facet-min-max__submit"></i> 171 </form> 172 </div> 173 </div> 174 </div> 175 176 {{#FacetGroups}} 177 <div class="grid__col-lg-3 grid__col-md-3 grid__col-sm-4 grid__col-xs-12"> 178 <input type="checkbox" id="OptionsGroup_{{counter}}" class="dropdown-trigger" /> 179 <div class="dropdown dw-mod"> 180 <label class="dropdown__header dropdown__btn dw-mod" for="OptionsGroup_{{counter}}">{{name}}</label> 181 <div id="FacetOptions" class="dropdown__content dropdown__content--padding dw-mod"> 182 183 {{#ifCond template "===" "Number"}} 184 {{>Number}} 185 {{/ifCond}} 186 187 {{#ifCond template "===" "Range"}} 188 {{>Range}} 189 {{/ifCond}} 190 191 {{#FacetOptions}} 192 {{#ifCond template "===" "Checkboxes"}} 193 {{>Checkboxes}} 194 {{/ifCond}} 195 {{#ifCond template "===" "Weight"}} 196 {{>Weight}} 197 {{/ifCond}} 198 {{#ifCond template "===" "Tags"}} 199 {{>Tags}} 200 {{/ifCond}} 201 {{#ifCond template "===" "Colors"}} 202 {{>Colors}} 203 {{/ifCond}} 204 {{/FacetOptions}} 205 </div> 206 <label class="dropdown-trigger-off" for="OptionsGroup_{{counter}}"></label> 207 </div> 208 </div> 209 {{/FacetGroups}} 210 </div> 211 <label for="CheckFacetGroups" class="btn btn--primary btn--full dw-mod facet-selector more" style="margin-left: 14px; margin-right: 14px; width: calc(100% - 28px);">@Translate("Select filters")</label> 212 <label for="CheckFacetGroups" class="btn btn--primary btn--full dw-mod facet-selector less" style="margin-left: 14px; margin-right: 14px; width: calc(100% - 28px);">@Translate("Close filters")</label> 213 </div> 214 } 215 216 217 @if (Pageview.Area.Item["EcommerceFacetsViewMode"].ToString() == "left" && Pageview.Device.ToString() != "Mobile" && string.IsNullOrEmpty(searchQuery) && !isFavoriteList) 218 { 219 220 @*Code break - Filter*@ 221 222 <div class="grid__col-12 grid__col-md-3 filter-container"> 223 <div class="u-hidden-sm"> 224 <div class="grid__col-sm-12 grid__col--bleed pb-lg-5 p-0"> 225 <div class="filter-container__search typeahead u-color-inherit js-typeahead" data-page-size="10" id="TopProductSearch" data-search-feed-id="@productsSearchFeedId&feed=true&groupid=@groupID" data-result-page-id="@productsPageId" data-groups-page-id="@productGroupsPageId"> 226 <ul class="dropdown dropdown--absolute-position u-min-w220px js-handlebars-root js-typeahead-groups-content dw-mod" id="TopProductSearchGroupsContent" data-template="SearchGroupsTemplate" data-json-feed="/Default.aspx?ID=@productGroupsPageId&feedType=productGroups" data-init-onload="false" data-preloader="minimal"></ul> 227 <input type="text" class="typeahead-search-field u-no-margin js-typeahead-search-field w-100" placeholder="@Translate("Search")" value="@searchQuery"> 228 <ul class="dropdown dropdown--absolute-position u-min-w220px u-full-width js-handlebars-root js-typeahead-search-content u-full-width dw-mod" id="TopProductSearchContent" data-template="SearchContentTemplate" data-json-feed="/Default.aspx?ID=@productsSearchFeedId&feedType=productsOnly&feed=true" data-init-onload="false" data-preloader="minimal"></ul> 229 <i class="u-no-margin dw-mod js-typeahead-enter-btn fa fa-search search-icon"></i> 230 </div> 231 </div> 232 </div> 233 <input type="checkbox" id="CheckFacetGroups" class="facets-container-trigger" /> 234 <div class="facets-container dw-mod"> 235 236 <form class="facets-group js-facets-group js-custom-facet-number"> 237 <div class="facets-group__name">@Translate("Dimension1"," Dimension 1")</div> 238 <div class="js-facets-container"> 239 <div class="custom-control custom-control--number products__facet"> 240 <input type="number" class="js-custom-facet-number-input w-100" name="dimension1" value="@Dynamicweb.Context.Current.Request.QueryString.Get("dimension1")" placeholder="Dimension 1"> 241 <i class="search-icon fa fa-search facet-min-max__submit"></i> 242 </div> 243 </div> 244 <div class="facets-group__name">@Translate("Dimension2", "Dimension 2")</div> 245 <div class="js-facets-container"> 246 <div class="custom-control custom-control--number products__facet"> 247 <input type="number" class="js-custom-facet-number-input w-100" name="dimension2" value="@Dynamicweb.Context.Current.Request.QueryString.Get("dimension2")" placeholder="Dimension 2"> 248 <i class="search-icon fa fa-search facet-min-max__submit"></i> 249 </div> 250 </div> 251 </form> 252 253 {{#FacetGroups}} 254 <div class="facets-group js-facets-group"> 255 <div class="facets-group__name">{{name}}</div> 256 <div class="js-facets-container"> 257 258 {{#ifCond template "===" "Number"}} 259 {{>Number}} 260 {{/ifCond}} 261 262 {{#ifCond template "===" "Range"}} 263 {{>Range}} 264 {{/ifCond}} 265 266 {{#FacetOptions}} 267 {{#ifCond template "===" "Checkboxes"}} 268 {{>Checkboxes}} 269 {{/ifCond}} 270 {{#ifCond template "===" "Weight"}} 271 {{>Weight}} 272 {{/ifCond}} 273 {{#ifCond template "===" "Tags"}} 274 {{>Tags}} 275 {{/ifCond}} 276 {{#ifCond template "===" "Colors"}} 277 {{>Colors}} 278 {{/ifCond}} 279 {{/FacetOptions}} 280 </div> 281 282 <div class="js-facets-trigger"> 283 <span class="js-facets-more">@Translate("See more")</span> 284 <span class="js-facets-less">@Translate("See less")</span> 285 </div> 286 287 </div> 288 289 {{/FacetGroups}} 290 291 </div> 292 <label for="CheckFacetGroups" class="btn btn--primary btn--full dw-mod facet-selector more">@Translate("Select filters")</label> 293 <label for="CheckFacetGroups" class="btn btn--primary btn--full dw-mod facet-selector less">@Translate("Close filters")</label> 294 </div> 295 296 } 297 298 <div class="@(!string.IsNullOrEmpty(searchQuery) || isFavoriteList ? "grid__col-12 grid__col--bleed-x" : "grid__col-12 grid__col-md-9") pt-3"> 299 <div class="grid__cell"> 300 @if (!string.IsNullOrEmpty(searchQuery)) 301 { 302 <div class="u-pull--left"> 303 <span>@Translate("SearchTotalText") @GetString("Ecom:ProductList.PageProdCnt") @Translate("Results")</span> 304 </div> 305 } 306 307 @if (!isFavoriteList) 308 { 309 <div class="collection sort-collection float-left float-lg-right pr-0 p-lg-0 u-pull--right u-no-margin"> 310 @if (!hideSorting) 311 { 312 <p class="sort-collection__header u-inline-block u-margin-right">@Translate("Sort by")</p> 313 <input type="checkbox" id="ProductSort" class="dropdown-trigger" /> 314 <div class="dropdown u-margin-right u-inline-block dw-mod"> 315 <label class="dropdown__header dropdown__btn dropdown__btn--small dw-mod" for="ProductSort">{{selectedSort}}</label> 316 <div class="dropdown__content dw-mod"> 317 <div class="dropdown__item" onclick="HandlebarsBolt.UpdateContent('productList', '@feedFullUrl')">@Translate("Default")</div> 318 <div class="dropdown__item" onclick="HandlebarsBolt.UpdateContent('productList', '@feedFullUrl&Products&SortBy=Created&SortOrder=DESC')">@Translate("Newest")</div> 319 <div class="dropdown__item" onclick="HandlebarsBolt.UpdateContent('productList', '@feedFullUrl&Products&SortBy=@mostPopularProducts&SortOrder=DESC')">@Translate("Most bought products")</div> 320 </div> 321 <label class="dropdown-trigger-off" for="ProductSort"></label> 322 </div> 323 } 324 325 @if (listViewsCount > 1) 326 { 327 if (Converter.ToBoolean(Pageview.Area.Item["ProductItemContainer"])) 328 { 329 <button type="button" class="btn btn--tag btn--sm" onclick="HandlebarsBolt.UpdateTemplate('ProductsContainer', 'ProductItemContainer')"><i class="fa fa-th-list"></i></button> 330 } 331 332 if (Converter.ToBoolean(Pageview.Area.Item["ProductGridItemContainer"])) 333 { 334 <button type="button" class="btn btn--tag btn--sm" onclick="HandlebarsBolt.UpdateTemplate('ProductsContainer', 'ProductGridItemContainer')"><i class="fa fa-th"></i></button> 335 } 336 337 if (Converter.ToBoolean(Pageview.Area.Item["ProductDetailsItemContainer"])) 338 { 339 <button type="button" class="btn btn--tag btn--sm" onclick="HandlebarsBolt.UpdateTemplate('ProductsContainer', 'ProductDetailsItemContainer')"><i class="fa fa-list"></i></button> 340 } 341 } 342 343 @if (isFavoriteList) 344 { 345 <div class="u-pull--right"> 346 <button type="submit" class="btn btn--primary btn--sm dw-mod">@Translate("Buy all")</button> 347 </div> 348 } 349 350 </div> 351 } 352 353 <div class="grid"> 354 <div class="grid__col-12 mt-6 grid__col--bleed-y"> 355 <div class="collection u-no-margin" id="selectedFacets"> 356 @{ 357 bool dimension1Selected = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.QueryString.Get("dimensionminimum1")) || !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.QueryString.Get("dimensionmaximum1")); 358 bool dimension2Selected = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.QueryString.Get("dimensionminimum2")) || !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request.QueryString.Get("dimensionmaximum2")); 359 } 360 @if (dimension1Selected) 361 { 362 <button type="button" class="btn btn--tag js-custom-facet-clear" data-check="checked" value="Dimension 1" title="@Translate("Remove filter")"> 363 Dimension 1 <i class="icon icon-nz-close"></i> 364 </button> 365 } 366 @if (dimension2Selected) 367 { 368 <button type="button" class="btn btn--tag js-custom-facet-clear" data-check="checked" value="Dimension 2" title="@Translate("Remove filter")"> 369 Dimension 2 <i class="icon icon-nz-close"></i> 370 </button> 371 } 372 {{#FacetSelections}} 373 {{#ifCond template "===" "SelectedFilter"}} 374 {{>SelectedFilter}} 375 {{/ifCond}} 376 {{#ifCond template "===" "SelectedColorFilter"}} 377 {{>SelectedColorFilter}} 378 {{/ifCond}} 379 {{#ifCond template "===" "ResetFilters"}} 380 {{>ResetFilters}} 381 {{/ifCond}} 382 {{/FacetSelections}} 383 </div> 384 </div> 385 </div> 386 387 <div id="ProductsContainer" data-template="{{listTemplate}}" class="grid product-list dw-mod" data-save-cookie="true"> 388 {{#ProductsContainer}} 389 {{#ifCond template "===" "ProductItemContainer"}} 390 {{>ProductItemContainer}} 391 {{/ifCond}} 392 {{#ifCond template "===" "ProductGridItemContainer"}} 393 {{>ProductGridItemContainer}} 394 {{/ifCond}} 395 {{#ifCond template "===" "ProductDetailsItemContainer"}} 396 {{>ProductDetailsItemContainer}} 397 {{/ifCond}} 398 {{/ProductsContainer}} 399 </div> 400 401 <div class="grid"> 402 <div class="grid__col-12 grid__col--bleed-y"> 403 <button type="button" id="LoadMoreButton" class="btn btn--primary m-auto {{nextdisabled}} dw-mod" data-current="{{currentPage}}" data-page-size="{{pageSize}}" data-total="{{totalPages}}" data-container="ProductsContainer" data-feed-url="@feedFullUrl&groupid=@groupID{{loadMoreFeedParams}}" onclick="LoadMore.Next(this)" {{nextdisabled}}>@Translate("Load more") @Translate("Products")</button> 404 <button type="button" class="btn btn--clean js-scroll-btn mt-5" data-target=".js-target">@Translate("Return to top")</button> 405 </div> 406 @if (!string.IsNullOrWhiteSpace(categoryBottomDescription)) 407 { 408 <div class="grid__col-12 grid__col--bleed-y"> 409 @categoryBottomDescription 410 </div> 411 } 412 </div> 413 </div> 414 </div> 415 416 {{else}} 417 <div class="grid__col-12"> 418 <p class="grid__col--bleed">@Translate("Your search gave 0 results")</p> 419 <h2 class="h2 u-ta-center">@Translate("SearchHeadline")</h2> 420 <p class="u-ta-center">@Translate("SearchContent")</p> 421 </div> 422 {{/each}} 423 </script> 424 425 @*Partial templates*@ 426 <script id="Checkboxes" type="text/x-template"> 427 <div class="custom-control custom-checkbox products__facet js-facets-checkbox"> 428 <input type="checkbox" id="{{queryParameter}}-{{value}}" class="{{selected}} custom-control-input" onclick="Facets.UpdateFacets(this);" name="{{queryParameter}}" value="{{value}}" {{selected}} {{disabled}}> 429 <label class="custom-control-label {{disabled}}" for="{{queryParameter}}-{{value}}"></label> 430 <span class="ml-4 d-inline-block custom-control__label">{{label}}</span> 431 <span class="custom-control__count">({{count}})</span> 432 </div> 433 </script> 434 435 <script id="Number" type="text/x-template"> 436 <div class="custom-control custom-control--number products__facet"> 437 438 @{ 439 var getCurrentPageId = new Dynamicweb.Content.Page(); 440 var getFriendlyUrl = Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(getCurrentPageId.ParentPageId); 441 string producturl = getFriendlyUrl.ToString(); 442 } 443 444 <form id="{{queryParameter}}" class="js-custom-facet-number" action="@producturl" method="GET"> 445 <i class="u-no-margin dw-mod js-typeahead-enter-btn fa fa-search search-icon js-custom-facet-number-submit"></i> 446 <input type="text" class="custom-control__number js-custom-facet-number-input" name="{{queryParameter}}" placeholder="" /> 447 </form> 448 449 </div> 450 </script> 451 452 <script id="Range" type="text/x-template"> 453 <div class="custom-control--range products__facet"> 454 <input type="text" class="js-range-slider" name="{{queryParameter}}" value="" 455 data-type="double" 456 {{#FacetOptions}} 457 {{#if @@first}} 458 data-min="{{value}}" 459 {{/if}} 460 {{#if @@last}} 461 data-max="{{value}}" 462 {{/if}} 463 {{#if @@first}} 464 data-from="{{value}}" 465 {{/if}} 466 {{#if @@last}} 467 data-to="{{value}}" 468 {{/if}} 469 {{/FacetOptions}} /> 470 </div> 471 </script> 472 473 <script id="Weight" type="text/x-template"> 474 <div> 475 <label class="{{disabled}}"> 476 <input type="checkbox" class="{{selected}}" onclick="Facets.UpdateFacets(this);" name="{{queryParameter}}" value="{{value}}" {{selected}} {{disabled}}> 477 {{label}} {{weight}} <span class="u-color-light-gray u-pull--right">({{count}})</span> 478 </label> 479 </div> 480 </script> 481 482 <script id="Tags" type="text/x-template"> 483 <button type="button" class="btn btn--tag {{selected}} {{disabled}}" data-check="{{selected}}" onclick="Facets.UpdateFacets(this);" name="{{queryParameter}}" value="{{value}}" {{disabled}}> 484 {{label}} <span class="facets-group__counter">({{count}})</span> 485 </button> 486 </script> 487 488 <script id="Colors" type="text/x-template"> 489 <button type="button" class="btn btn--colorbox u-margin-right {{selected}} {{disabled}}" style="background-color: {{value}}" title="{{label}}" data-check="{{selected}}" onclick="Facets.UpdateFacets(this);" name="{{queryParameter}}" value="{{value}}" {{disabled}}></button> 490 </script> 491 492 <script id="SelectedFilter" type="text/x-template"> 493 <button type="button" class="btn btn--tag" data-check="checked" onclick="Facets.UpdateFacets(this);" name="{{queryParameter}}" value="{{value}}" title="@Translate("Remove filter")"> 494 {{group}}: {{label}} <i class="icon icon-nz-close"></i> 495 </button> 496 </script> 497 498 <script id="SelectedColorFilter" type="text/x-template"> 499 <button type="button" class="btn btn--tag" data-check="checked" onclick="Facets.UpdateFacets(this);" name="{{queryParameter}}" value="{{value}}" title="@Translate("Remove filter")"> 500 {{group}}: <div class="btn__colorbox" style="background-color: {{label}}"></div> <i class="icon icon-nz-close"></i> 501 </button> 502 </script> 503 504 <script id="ResetFilters" type="text/x-template"> 505 <button type="button" class="btn btn--tag" onclick="Facets.ResetFacets(this);"> 506 @Translate("Reset all filters") <i class="fa fa-rotate-left"></i> 507 </button> 508 </script> 509 510 511 512 513 514 @* Product list templates *@ 515 516 @* List view *@ 517 518 <script id="ProductItemContainer" type="text/x-template"> 519 {{#.}} 520 {{#Product}} 521 {{#if variantid}} 522 {{else}} 523 <article id="Product{{id}}" data-template="ProductItem" data-preloader="overlay" class="product-list__item product-list-item grid__col-12"> 524 {{>ProductItem}} 525 </article> 526 {{/if}} 527 {{/Product}} 528 {{/.}} 529 </script> 530 531 <script id="ProductItem" type="text/x-template"> 532 {{#.}} 533 <input type="hidden" name="ProductLoopCounter{{id}}" value="{{id}}" /> 534 <input type="hidden" name="ProductID{{id}}" value="{{productId}}" /> 535 <input type="hidden" value="{{variantid}}" name="VariantID{{id}}" id="Variant_{{id}}" /> 536 {{#if variantid}} 537 {{else}} 538 <div class="grid product-list__list-item grid__col-12 product-list-container dw-mod"> 539 <div class="grid__col-sm-2 grid__col-12 p-0 {{noImage}} dw-mod"> 540 <div class="stickers-container dw-mod"> 541 {{#Stickers}} 542 {{>Sticker}} 543 {{/Stickers}} 544 </div> 545 546 <div class="grid__cell product-list-img-container"> 547 <a href="{{link}}" onclick="Scroll.SavePosition(event)"><img class="grid__cell-img b-lazy" src="/Files/Images/placeholder.gif" data-src="/Admin/Public/GetImage.ashx?width=150&height=150&crop=5&Compression=75&DoNotUpscale=true&FillCanvas=true&image={{image}}" alt="{{name}}" /></a> 548 </div> 549 550 </div> 551 552 <div data-preview="@onlyPreview" class="grid__col-12 grid__col-sm-3 pb-0 pb-lg-4"> 553 <a class="" href="{{link}}"> 554 <div class="item-number dw-mod">@Translate("Product number") {{number}}</div> 555 <h3 class="product-list-item__name font-weight-light u-no-margin">{{name}}</h3> 556 <div class="product-list-item__description u-no-margin">{{{description}}}</div> 557 {{#if stockText}} 558 <div class="product-list-item__stock"> 559 <div class="stock-icon ml-0 {{stockState}}"></div> 560 <span>{{stockText}}</span> 561 </div> 562 {{/if}} 563 <span class="product-card__quantity-alert js-product-quantity-error-{{productId}} ">@Translate("Max stock level is reached")</span> 564 </a> 565 </div> 566 567 @if (!onlyPreview) 568 { 569 570 571 <div class="grid__col-12 grid__col-sm-3 product-list-item__center-text"> 572 @* 573 {{#Discount}} 574 <div class="price dw-mod">{{this.discountPrice}}</div> 575 {{/Discount}} 576 *@ 577 578 {{#each Discount}} 579 {{#if @@first}} 580 <div class="grid__cell"> 581 @Translate("ItemText") {{this.discountQuantity}} {{this.discountVismaUnitName}} 582 </div> 583 <div class="{{onSale}} dw-mod"> 584 {{this.unitPrice}} 585 </div> 586 {{/if}} 587 {{/each}} 588 589 <div class="product-list__list-item__price-actions dw-mod"> 590 <div class="before-price {{onSale}} dw-mod">{{discount}}</div> 591 </div> 592 593 @* IF SENTENCE FROM DISCOUNT LIST IN JSON FEED FILE (NZPRODUTLISTFEED.CSHTML) *@ 594 {{#if Discount.[1].discountFormatted}} 595 596 <div class="js-popup popup_productsrender_container"> 597 <a class="js-popup-trigger">@Translate("DiscountText")</a> 598 <div class="js-popup-modal popup_productsrender_modal"> 599 <div class="js-popout-close nz-icon icon-nz-close-circled"></div> 600 <ul class="grid__col-12 pt-5 p-0 d-flex flex-row flex-wrap"> 601 @* FOREACH DISCOUNT LOOP FROM JSON FEED *@ 602 {{#each Discount}} 603 {{#unless @@first}} 604 605 <li class="grid__col-lg-6 p-0 mb-0 grid__col-12 align-items-center align-items-xl-start">@Translate("UnitPriceText") {{this.discountQuantity}} {{this.discountVismaUnitName}}</li> 606 <li class="grid__col-lg-6 p-0 pb-3 grid__col-12 align-items-center align-items-xl-end">{{this.discountFormatted}}</li> 607 {{/unless}} 608 {{/each}} 609 610 </ul> 611 </div> 612 </div> 613 614 615 {{/if}} 616 </div> 617 618 619 @* Combinations div needed to handle variant options(used in script block with Variants.SetVariantOptionStatesForProductList function) and should not be deleted *@ 620 <div id="Combinations" data-product-id="{{productId}}" data-id="{{id}}" class="js-variants-wrap u-hidden"> 621 {{#VariantStockCombination}} 622 {{>VariantStockCombination}} 623 {{/VariantStockCombination}} 624 </div> 625 626 @*<div id="Variants{{id}}" data-template="VariantsTemplate" data-product-id="{{productId}}"> 627 {{#Variants}} 628 {{>VariantsTemplate}} 629 {{/Variants}} 630 </div> 631 632 <small id="helpText_{{id}}" class="help-text {{hideViewMore}} {{hideHelpText}}">@Translate("Please select variant!")</small> 633 *@ 634 635 <div class="grid__col-12 grid__col-sm-4 pb-0 pb-lg-4 d-inline-block text-right"> 636 <div class="d-inline-block product-card__quantity-container"> 637 638 <div class="product-card__quantity product-card__quantity--list"> 639 {{#ifCond hasVariants "!==" "disabled"}} 640 <span class="product-card__quantity-add js-product-quantity-add" data-icon-nz="chevron-up"></span> 641 <input class="product-card__quantity-input pointer-events js-quantity-input text-center" id="Quantity_{{productId}}" name="Quantity{{productId}}" type="number" data-id="{{productId}}" value="1" min="1" max="{{stock}}"> 642 <span class="product-card__quantity-subtract js-product-quantity-subtract" data-icon-nz="chevron-down"></span> 643 {{/ifCond}} 644 </div> 645 </div> 646 <div class="product-list__button-container d-inline-block"> 647 {{#ifCond Discount.[0].discount ">" 0 }} 648 {{#ifCond hasVariants "!==" "disabled"}} 649 <button type="button" id="CartButton_{{productId}}" class="btn btn--primary w-100 btn--condensed dw-mod {{hasVariants}} btn-search-addtocart" name="submit" onclick="Cart.AddToCart(event, '{{productId}}', document.getElementById('Quantity_{{productId}}').value, 'Unit_{{productId}}', 'Variant_{{productId}}');" {{hasVariants}}><span> @Translate("Add to cart")</span></button> 650 651 {{/ifCond}} 652 {{/ifCond}} 653 {{#ifCond Discount "===" "" }} 654 {{#ifCond hasVariants "!==" "disabled"}} 655 <div class="cfp-btn-container pt-4 pt-lg-0"> 656 <button type="button" id="CartButton_{{Id}}" class="btn btn-primary dw-mod js-scroll-btn d-inline-block px-5" name="submit" data-target=".js-target">@Translate("CallForPrice")</button> 657 </div> 658 {{/ifCond}} 659 {{/ifCond}} 660 {{#ifCond hasVariants "==" "disabled"}} 661 <a href="{{link}}" class="btn btn-secondary dw-mod js-scroll-btn d-inline-block px-5">@Translate("Select variant")</a> 662 {{/ifCond}} 663 664 <input type="checkbox" id="UnitOptions_{{productId}}" class="dropdown-trigger" /> 665 <div class="dropdown u-w110px u-w100px--xs {{hasUnits}} dw-mod"> 666 <label class="dropdown__header dropdown__btn dw-mod" for="UnitOptions_{{productId}}">{{unitName}}</label> 667 <div id="unitOptions" class="dropdown__content dw-mod"> 668 {{#unitOptions}} 669 {{>UnitOption}} 670 {{/unitOptions}} 671 </div> 672 <label class="dropdown-trigger-off" for="UnitOptions_{{productId}}"></label> 673 </div> 674 <input type="hidden" value="{{unitId}}" name="Unit{{productId}}" id="Unit_{{productId}}" /> 675 676 <div> 677 {{#ifCond hasVariants "!==" "disabled"}} 678 <div class="favorites w-100 {{hasVariants}} dw-mod" {{hasVariants}}> 679 {{#Favorite}} 680 {{>FavoriteTemplate}} 681 {{/Favorite}} 682 </div> 683 {{/ifCond}} 684 </div> 685 686 </div> 687 </div> 688 } 689 690 else 691 { 692 <div class="grid__col-12 grid__col-sm-6 align-items-center align-items-lg-end"> 693 <div class="grid__cell"> 694 <div class="grid__col-12 pb-0"> 695 <h5>@Translate("LoginText")</h5> 696 </div> 697 <div class="grid__col-12 pb-0"> 698 <label for="SignInModalTrigger" class="btn btn--primary u-no-margin sign-in-modal-trigger-button dw-mod" onclick="setTimeout(function () { document.getElementById('LoginUsername').focus() }, 10)">@Translate("Sign in")</label> 699 </div> 700 </div> 701 </div> 702 } 703 704 </div> 705 {{/if}} 706 {{/.}} 707 </script> 708 709 @* Grid view *@ 710 711 <script id="ProductGridItemContainer" type="text/x-template"> 712 {{#.}} 713 <div id="Product{{id}}" data-template="ProductGridItem" data-preloader="overlay" class="grid__col-lg-4 grid__col-md-4 grid__col-sm-4 grid__col-xs-6 product-list__list-item dw-mod"> 714 <div class="product-list__inner"> 715 {{#Product}} 716 {{>ProductGridItem}} 717 {{/Product}} 718 </div> 719 </div> 720 {{/.}} 721 </script> 722 723 <script id="ProductGridItem" type="text/x-template"> 724 {{#.}} 725 <input type="hidden" name="ProductLoopCounter{{id}}" value="{{id}}" /> 726 <input type="hidden" name="ProductID{{id}}" value="{{productId}}" /> 727 728 <div class="grid__cell product-list__grid-item__image dw-mod {{noImage}}"> 729 <div class="stickers-container dw-mod"> 730 {{#Stickers}} 731 {{>Sticker}} 732 {{/Stickers}} 733 </div> 734 <a href="{{link}}" onclick="Scroll.SavePosition(event)"> 735 <img class="grid__cell-img u-padding b-lazy" src="/Files/Images/placeholder.gif" data-src="/Admin/Public/GetImage.ashx?width=150&height=150&crop=5&Compression=75&DoNotUpscale=true&image={{image}}" alt="{{name}}" /> 736 </a> 737 <div class="favorites favorites--for-grid-view u-pull--right {{hasVariants}} dw-mod" {{hasVariants}}> 738 {{#Favorite}} 739 {{>FavoriteTemplate}} 740 {{/Favorite}} 741 </div> 742 </div> 743 744 <div class="grid__cell product-list__grid-item__price-info {{shortGridInfo}} dw-mod"> 745 <a href="{{link}}" onclick="Scroll.SavePosition(event)" title="{{name}}"> 746 <div class="item-number dw-mod">@Translate("Product number") {{number}}</div> 747 <h6 class="u-condensed-text">{{name}}</h6> 748 </a> 749 750 @if (!onlyPreview) 751 { 752 <div class="before-price {{onSale}} dw-mod">{{discount}}</div> 753 } 754 755 <input type="hidden" id="Quantity_{{id}}" name="Quantity{{id}}" value="1" min="1"> 756 <input type="hidden" value="{{unitId}}" name="Unit{{id}}" id="Unit_{{id}}" /> 757 <input type="hidden" value="{{variantid}}" name="VariantID{{id}}" id="Variant_{{id}}" /> 758 </div> 759 760 <div class="product-list__grid-item__footer dw-mod"> 761 <div class="u-ta-center"> 762 <a href="{{link}}" id="CartButton_{{id}}" class="btn btn--secondary btn--full u-no-margin dw-mod">@Translate("View")</a> 763 </div> 764 </div> 765 {{/.}} 766 </script> 767 768 @* Details view *@ 769 770 <script id="ProductDetailsItemContainer" type="text/x-template"> 771 {{#.}} 772 <div id="Product{{id}}" data-template="ProductDetailsItem" data-preloader="overlay" class="grid__col-md-12 product-list__details-item dw-mod" style="z-index: {{zIndex}}"> 773 {{#Product}} 774 {{>ProductDetailsItem}} 775 {{/Product}} 776 </div> 777 {{/.}} 778 </script> 779 780 <script id="ProductDetailsItem" type="text/x-template"> 781 {{#.}} 782 <input type="hidden" name="ProductLoopCounter{{id}}" value="{{id}}" /> 783 <input type="hidden" name="ProductID{{id}}" value="{{productId}}" /> 784 785 <div class="grid__cell"> 786 <div class="product-list__details-item__left dw-mod"> 787 <div class="lightbox u-hidden-xxs"> 788 <a href="{{link}}" onclick="Scroll.SavePosition(event)"> 789 <img class="lightbox__image {{noImage}}" src="/Admin/Public/GetImage.ashx?width=220&height=220&crop=5&Compression=75&image={{image}}" alt="{{name}}" /> 790 <div class="u-margin-right {{noImage}}"> 791 <img src="/Admin/Public/GetImage.ashx?width=40&height=35&crop=5&FillCanvas=true&Compression=75&image={{image}}" alt="{{name}}" /> 792 </div> 793 </a> 794 </div> 795 796 <div class="u-margin-right"> 797 <a href="{{link}}" onclick="Scroll.SavePosition(event)" title="{{name}}"><h6 class="u-no-margin">{{name}}</h6></a> 798 <div class="item-number item-number--compressed dw-mod"> 799 {{number}} 800 @if (!onlyPreview) 801 { 802 <span> 803 <span class="stock-icon {{stockState}} dw-mod" title="{{stockText}}"></span> {{stockText}}{{deliveryText}} 804 </span> 805 } 806 </div> 807 </div> 808 </div> 809 810 <div class="product-list__details-item__right dw-mod"> 811 @if (!onlyPreview) 812 { 813 <div class="grid__cell u-hidden-sm u-hidden-md u-hidden-lg"> 814 <div class="u-full-width u-ta-right"> 815 <div class="before-price {{onSale}} dw-mod">{{discount}}</div> 816 <div class="price price--condensed dw-mod">{{price}}</div> 817 </div> 818 </div> 819 } 820 821 <div class="grid__cell grid__cell--align-middle-right"> 822 <div class="u-pull--right u-margin-right"> 823 <input type="checkbox" id="UnitOptions_{{id}}" class="dropdown-trigger" /> 824 825 <div class="dropdown u-w120px {{hasUnits}} dw-mod"> 826 <label class="dropdown__header dropdown__btn dw-mod" for="UnitOptions_{{id}}">{{unitName}}</label> 827 <div id="unitOptions" class="dropdown__content dw-mod"> 828 {{#unitOptions}} 829 {{>UnitOption}} 830 {{/unitOptions}} 831 </div> 832 <label class="dropdown-trigger-off" for="UnitOptions_{{id}}"></label> 833 </div> 834 835 <input type="hidden" value="{{unitId}}" name="Unit{{id}}" id="Unit_{{id}}" /> 836 <input type="hidden" value="{{variantid}}" name="VariantID{{id}}" id="Variant_{{id}}" /> 837 </div> 838 839 <div class="favorites u-pull--right u-margin-right {{hasVariants}} dw-mod" {{hasVariants}}> 840 {{#Favorite}} 841 {{>FavoriteTemplate}} 842 {{/Favorite}} 843 </div> 844 845 @if (!onlyPreview) 846 { 847 <div class="u-pull--right u-margin-right u-w100px u-ta-right u-hidden-xs u-hidden-xxs"> 848 <div class="before-price {{onSale}} dw-mod">{{discount}}</div> 849 <div class="price price--condensed dw-mod">{{price}}</div> 850 </div> 851 852 <div class="u-pull--right {{hideBuyOptions}}"> 853 <input type="number" class="u-w80px u-no-margin u-margin-right" id="Quantity_{{id}}" name="Quantity{{id}}" value="1" min="1"> 854 </div> 855 856 <div class="u-pull--right {{hideBuyOptions}}"> 857 <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="fa fa-shopping-cart"></i></button> 858 </div> 859 860 } 861 862 <div class="u-pull--right {{hideViewMore}}"> 863 <a href="{{link}}" class="btn btn--secondary u-no-margin u-w130px dw-mod" onclick="Scroll.SavePosition(event)">@Translate("View")</a> 864 </div> 865 866 <div class="favorites favorites--lg u-hidden {{hasVariants}} u-hidden-xs u-hidden-xxs dw-mod" {{hasVariants}}> 867 {{#Favorite}} 868 {{>FavoriteListItem}} 869 {{/Favorite}} 870 </div> 871 872 </div> 873 </div> 874 <div class="grid__cell-footer stickers-container stickers-container--block dw-mod"> 875 {{#Stickers}} 876 {{>MiniSticker}} 877 {{/Stickers}} 878 </div> 879 </div> 880 {{/.}} 881 </script> 882 883 <script id="Sticker" type="text/x-template"> 884 <div class="stickers-container__tag {{className}} dw-mod">{{text}}</div> 885 </script> 886 887 <script id="MiniSticker" type="text/x-template"> 888 <div class="stickers-container__tag stickers-container__tag--micro {{className}} dw-mod">{{text}}</div> 889 </script> 890 891 @* Units templates *@ 892 893 <script id="UnitOption" type="text/x-template"> 894 <div class="dropdown__item dw-mod" onclick="HandlebarsBolt.UpdateContent('Product{{id}}', '{{link}}&feed=true&UnitID={{value}}&rid={{id}}')">{{name}}</div> 895 </script> 896 897 @* Variants templates *@ 898 899 <script id="VariantsTemplate" type="text/x-template"> 900 {{#.}} 901 <div> 902 <div class="u-bold">{{name}}</div> 903 <div id="VariantOptions{{id}}"> 904 {{#VariantOptions}} 905 {{>VariantOption}} 906 {{/VariantOptions}} 907 </div> 908 </div> 909 {{/.}} 910 </script> 911 912 <script id="VariantOption" type="text/x-template"> 913 <button type="button" id="{{id}}{{variantId}}" data-id="{{id}}" data-variant-id="{{variantId}}" data-product-id="{{productId}}" onclick="Variants.UpdateVariants(this)" class="btn btn--tag {{disabled}} {{selected}}" data-check="{{selected}}" {{disabled}}>{{name}}</button> 914 </script> 915 916 <script id="VariantOptionImage" type="text/x-template"> 917 <img src="/Admin/Public/GetImage.ashx?width=100&height=50&crop=5&Compression=75&image=/Images/{{image}}" title="{{name}}" id="{{productid}}{{id}}" data-variant-id="{{id}}" data-product-id="{{productid}}" onclick="Variants.UpdateVariants(this)" class="btn btn--tag {{disabled}} {{selected}}" data-check="{{selected}}" {{disabled}} /> 918 </script> 919 920 <script id="VariantCombinations" type="text/x-template"> 921 </script> 922 923 @* Favorites templates *@ 924 925 926 <script id="FavoriteTemplate" type="text/x-template"> 927 <div class="favorites-list u-ta-left w-100"> 928 <label for="FavoriteTrigger_{{id}}" class="btn mb-0 w-100 btn-secondary"><small class="x-small">@Translate("Add to list")</small></label> 929 <input type="checkbox" id="FavoriteTrigger_{{id}}" class="dropdown-trigger" /> 930 931 <div class="dropdown dropdown--absolute-position"> 932 <div class="dropdown__content dropdown__content--padding u-w220px dw-mod"> 933 <ul class="list list--clean dw-mod"> 934 {{#FavoriteLists}} 935 {{>FavoriteListItem}} 936 {{/FavoriteLists}} 937 </ul> 938 </div> 939 <label class="dropdown-trigger-off" for="FavoriteTrigger_{{id}}"></label> 940 </div> 941 942 </div> 943 </script> 944 945 <script id="FavoriteListItem" type="text/x-template"> 946 <li> 947 <a href="{{link}}" class="list__link u-no-underline dw-mod"><i class="{{favoriteIcon}}"></i> {{name}}</a> 948 </li> 949 </script> 950 951 <script> 952 document.addEventListener("DOMContentLoaded", function (event) { 953 Facets.Init("selectedFacets", "productList"); 954 955 Variants.SetProductFeedId('@productCatalogId'); 956 Variants.SetViewMode("productList"); 957 958 document.getElementById("productList").addEventListener('contentLoaded', function (e) { 959 //var variantsContainers = document.getElementsByClassName("js-variants-wrap"); 960 961 //for (var i = 0; i < variantsContainers.length; i++) { 962 // var variantsContainerElement = variantsContainers[i]; 963 // Variants.SetVariantOptionStatesForProductList(variantsContainerElement); 964 //} 965 966 if (e.srcElement.classList.contains("js-variants-wrap")) { 967 Variants.SetVariantOptionStatesForProductList(e.srcElement); 968 } 969 if (e.srcElement.id === "productList") { 970 Search.Init(); 971 } 972 973 App.RangeSlider.initialize(); 974 App.LoadMore.facets(); 975 App.RangeSlider.customNumberInput(); 976 }, false); 977 978 }); 979 980 </script> 981 } 982
Kontakt os
Har du spørgsmål til vores produkter, løsninger eller services? Eller søger du hjælp til beregninger og dimensioneringer? Vi står klar til at hjælpe. Udfyld formularen herunder, og vi kontakter dig hurtigst muligt.