Exception in template (Designs\StandardWebshop\eCom/Productlist/ProductList.cshtml): System.NullReferenceException: Object reference not set to an instance of an object.
   at Dynamicweb.eCommerce.Products.Group.get_AllGroupsByLanguageID(String languageID)
   at Dynamicweb.eCommerce.Products.Group.get_Subgroups()
   at Dynamicweb.Frontend.NavigationProviders.GroupNavigationProvider.MakeGroupTree(GroupCollection groups, NavigationItem parentNode, Int32 thisLevel, Int32 maxLevel, Page productPage, IDictionary`2 groupsProductCounts)
   at Dynamicweb.Frontend.NavigationProviders.GroupNavigationProvider.MakeGroupTree(GroupCollection groups, NavigationItem parentNode, Int32 thisLevel, Int32 maxLevel, Page productPage, IDictionary`2 groupsProductCounts)
   at Dynamicweb.Frontend.NavigationProviders.GroupNavigationProvider.MakeGroupTree(GroupCollection groups, NavigationItem parentNode, Int32 thisLevel, Int32 maxLevel, Page productPage, IDictionary`2 groupsProductCounts)
   at Dynamicweb.Frontend.NavigationProviders.GroupNavigationProvider.MakeGroupTree(Page page, NavigationItem parentNode, Boolean applyStartAndEndLevelToNavigation)
   at Dynamicweb.Frontend.NavigationProviders.GroupNavigationProvider.Process(NavigationItem node, Boolean applyStartAndEndLevelToNavigation)
   at Dynamicweb.Frontend.NavigationProviders.GroupNavigationProvider.ProcessTree(RootNavigationItem rootNode, NavigationType navigationType)
   at Dynamicweb.Frontend.XmlNavigation.XML(Int32 ParentID, Int32 StartLevel, Int32 StopLevel, Expand expand, Int32 areaID)
   at Dynamicweb.Frontend.XmlNavigation.GetNavigationHtml(Int32 ParentID, Int32 StartLevel, Int32 StopLevel, Expand ExpandMode, String NavigationName, String XsltPath, Int32 AreaID, Boolean SitemapMode, NameValueCollection settings, NameValueCollection attributes, IncludeMode mode)
   at Dynamicweb.Frontend.XmlNavigation.GetNavigationHtml(NameValueCollection settings, NameValueCollection attributes)
   at CompiledRazorTemplates.Dynamic.daafdccafbeefae.Execute()
   at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context) in c:\Users\Matthew\Documents\GitHub\RazorEngine\src\Core\RazorEngine.Core\Templating\TemplateBase.cs:line 126
   at RazorEngine.Templating.TemplateService.Run(ITemplate template, DynamicViewBag viewBag) in c:\Users\Matthew\Documents\GitHub\RazorEngine\src\Core\RazorEngine.Core\Templating\TemplateService.cs:line 608
   at RazorEngine.Templating.TemplateService.Parse(String razorTemplate, Object model, DynamicViewBag viewBag, String cacheName) in c:\Users\Matthew\Documents\GitHub\RazorEngine\src\Core\RazorEngine.Core\Templating\TemplateService.cs:line 439
   at RazorEngine.Razor.Parse[T](String razorTemplate, T model, String cacheName) in c:\Users\Matthew\Documents\GitHub\RazorEngine\src\Core\RazorEngine.Core\Razor.cs:line 276
   at Dynamicweb.Rendering.Template.Output()
@using System.Web @using NORRIQ.Universal.Extensions @using NORRIQ.Common8.Context @using System.Web.Mvc.Html @using Newtonsoft.Json @using NORRIQ.Common8.Ecom @using NORRIQ.Common8.Factory @using diesella.webshop.CustomCode.Razor @using NORRIQ.Common8.Razor; @using Dynamicweb.eCommerce.Common; @using NLWI.Platforms.Dynamicweb8.Specs; @using NORRIQ.FavoriteList.Models @using NORRIQ.FavoriteList.Services @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> @{ var Columns = "col-xs-6 col-sm-4 col-md-4"; var mode = ObjectFactory.GetInstance<TemporarilySettings>().GetAndUpdate("listmode") ?? "" + ObjectFactory.GetInstance<AreaItemSettings>().GetCurrentAreaValue<string>("ProductlistMode") + ""; var SortBy = GetString("Ecom:ProductList.SortBy"); var SortOrder = GetString("Ecom:ProductList.SortOrder"); var ProductCurrency = Context.Currency.Symbol; var XPIData = ObjectFactory.GetInstance<NORRIQ.Common8.Context.AreaItemSettings>().GetCurrentAreaValue<string>("XPIData"); var query = HttpContext.Current.Request["EcomQuery"]; var AddNoIndex = !string.IsNullOrEmpty(HttpContext.Current.Request["PageNum"]); var isFavoriteList = (System.Web.HttpContext.Current.Request["favoriteMode"] ?? string.Empty).Equals("true", StringComparison.InvariantCultureIgnoreCase); } @if (AddNoIndex) { @SnippetStart("AddNoIndex") <meta name="robots" content="noindex" /> @SnippetEnd("AddNoIndex") } <aside class="col-xs-12 col-sm-12 col-md-3" data-content="sidebar"> <nav id="desktop-menu"> @if (HttpContext.Current.Request["groupid"] != null) { @RenderNavigation(new { Template = "submenu-ecom-inpath.xslt", Expandmode = "all", StartLevel = 1, EndLevel = 2 }) } else { @RenderNavigation(new { Template = "submenu-ecom.xslt", Expandmode = "all", StartLevel = 1, EndLevel = 3 }) } </nav> </aside> <section class="col-xs-12 col-sm-12 col-md-9"> <header class="productlist-header clearfix"> <h1 class="title-styled"> @if (!String.IsNullOrEmpty(GetString("Ecom:Group.Name"))) { @GetString("Ecom:Group.Name") } else { @GetGlobalValue("Global:Page.Name") } @if (!String.IsNullOrEmpty(GetString("Ecom:ProductList:Search.Query"))) { <small> (@GetString("Ecom:ProductList:Search.Query")) </small> } </h1> @if (!String.IsNullOrEmpty(GetString("Ecom:Group.Description"))) { <div class="productlist-description"> @GetString("Ecom:Group.Description") </div> } @* If active shows featured products before produclist @RenderSnippet("FeaturedProduct") *@ @if (GetLoop("Products").Any()) { <div id="desktop-facet" data-content="facets"> @using System.Web @using NORRIQ.Universal.Extensions @using NORRIQ.Common8.Context @using System.Web.Mvc.Html @using Newtonsoft.Json @using NORRIQ.Common8.Ecom @using NORRIQ.Common8.Factory @using NORRIQ.FavoriteList.Models @using NORRIQ.FavoriteList.Services @using diesella.webshop.CustomCode.Razor @using NORRIQ.Common8.Razor; @using Dynamicweb.eCommerce.Common; @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> @if (GetLoop("FacetGroups").Any()) { <form id="filter-form" method="get" action="/Default.aspx"> @{ } <input type='hidden' name='ID' value='@Pageview.Page.ID' /> @if (!String.IsNullOrEmpty(GetString("Ecom:ProductList:Page.GroupID"))) { <input type='hidden' name='GroupID' value='@GetString("Ecom:ProductList:Page.GroupID")' /> } @if (HttpContext.Current.Request["ecomquery"] != null) { <input type="hidden" name="ecomquery" value="@HttpContext.Current.Request["ecomquery"]" /> } @foreach (LoopItem groups in GetLoop("FacetGroups")) { if (groups.GetLoop("Facets").Any()) { <ul class="nav nav-pills nav-filter"> @foreach (LoopItem facets in groups.GetLoop("Facets")) { if (facets.GetLoop("FacetOptions").Any()) { var useBrackets = facets.GetLoop("FacetOptions").Where(o => o.GetString("FacetOption.Value").IndexOf(',') > -1).Any(); <li class="dropdown" id="@facets.GetString("Facet.QueryParameter")" role="presentation"> <a role="button" href="javascript:void()" class="dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <span>@facets.GetString("Facet.Name")</span> <i class="icon-angle-down" aria-hidden="true"></i> </a> <div class="dropdown-menu dropdown-keep-open dropdown-filter" aria-labelledby="@facets.GetString("Facet.QueryParameter")"> <span class="chevron"></span> <div class="dropdown-inner"> <div class="dropdown-selects"> @foreach (LoopItem option in facets.GetLoop("FacetOptions")) { var value = option.GetString("FacetOption.Value").Replace("\"", "&quot;"); <div class="checkbox"> <label for="@facets.GetString("Facet.QueryParameter")@option.GetString("FacetOptions.LoopCounter")"> <input type="checkbox" id="@facets.GetString("Facet.QueryParameter")@option.GetString("FacetOptions.LoopCounter")" name="@facets.GetString("Facet.QueryParameter")" value="@(useBrackets ? "[" + value + "]" : value)" @(option.GetBoolean("FacetOption.Selected") ? " checked=\"checked\" " : "") /> @option.GetString("FacetOption.Label") (@option.GetString("FacetOption.Count")) </label> </div> } </div> <button class="btn btn-default btn-block btn-raised"> <i class="icon-spinner icon-pulse" aria-hidden="true" style="display: none;"></i> @Translate("Anvend", "Anvend") </button> </div> </div> </li> } } </ul> } } <div class="clearfix"></div> </form> <script append="true"> require(['jquery', 'shared/norriq.searchfilter/norriq.searchfilter'], function ($, Filter) { var filter = new Filter(); filter.init({ $filterForm: $('#filter-form'), $filterGroups: $('.filter-group, .js-select-filter'), $filterSlider: $('.filter-slider'), $selectedFilters: $('.filter-active-option') }); }); </script> } @if (GetLoop("FacetGroups").Any() && HttpContext.Current.Request["groupid"] != null) { @SnippetStart("FacetHead") <li class="filter-tabs-item hidden-sm" role="tab" id="heading-filter"> <a class="collapsed" role="button" data-toggle="collapse" data-parent="#filterTabs" data-target="#responsive-filter" aria-expanded="false" aria-controls="responsive-filter"> <i class="icon-filter" aria-hidden="true"></i> @Translate("Filter", "Filter") </a> </li> @SnippetEnd("FacetHead") @SnippetStart("FacetBody") <div class="panel"> <div id="responsive-filter" class="filter-collapse collapse" role="tabpanel" aria-labelledby="heading-filter"></div> </div> @SnippetEnd("FacetBody") } </div> <text>@{ var PageID = (String.IsNullOrEmpty(GetString("Ecom:ProductList:Page.ID")) ? "" : "/Default.aspx?ID=" + GetString("Ecom:ProductList:Page.ID")); var GroupID = (String.IsNullOrEmpty(GetString("Ecom:ProductList:Page.GroupID")) ? "" : "&amp;GroupID=" + GetString("Ecom:ProductList:Page.GroupID")); } @foreach (LoopItem groups in GetLoop("FacetGroups")) { if (groups.GetLoop("Facets").Any()) { if (groups.GetLoop("Facets").Where(fo => fo.GetLoop("FacetOptions").Where(op => op.GetBoolean("FacetOption.Selected")).Any()).Any()) { <div class="facets-selected"> <div class="facets-col-left"> <span class="filter-active-label"><i class="icon-filter" aria-hidden="true"></i> @Translate("Filter", "Filter")</span> </div> <div class="facets-col-right"> <a href="@PageID@GroupID" class="filter-reset"> <i class="icon-close" aria-hidden="true"></i> @Translate("Clear filter", "Nulstil filtre") </a> </div> <div class="facets-col-center"> @foreach (LoopItem selected in groups.GetLoop("Facets")) { foreach (LoopItem active in selected.GetLoop("FacetOptions")) { if (active.GetBoolean("FacetOption.Selected")) { <a href="javascript:void(0)" class="filter-active-option" data-filter-name="@selected.GetString("Facet.Name")" data-filter-type="option" data-filter-option="@selected.GetString("Facet.QueryParameter")@active.GetString("FacetOptions.LoopCounter")"> <span class="option-label">@selected.GetString("Facet.Name"):</span> <span class="option-title">@active.GetString("FacetOption.Label")</span> <i class="icon-close" aria-hidden="true"></i> </a> } } } </div> </div> } } }</text> <div class="row"> <div class="col-xs-12 col-sm-7"> <div class="productlist-header-info"> <span class="productlist-header-quantity"> @GetString("Ecom:ProductList.PageProdCnt") @Translate("Products", "Products") </span> <span class="productlist-header-vat"> @Translate("Prices without VAT", "Prices without VAT") </span> </div> </div> <div class="col-xs-12 col-sm-5" data-align="right"> @*<div class="form-inline form-sort" data-float="left"> <label for="sortProducts"> @Translate("label_sort_products", "Sorter") </label> <select class="form-control form-control-sort" id="sortProducts"> <option value="@(HttpContext.Current.Request.Url.SetQuery("SortBy", "Name").SetQuery("SortOrder", "ASC").PathAndQuery)" @(SortBy == "Name" && SortOrder == "ASC" ? "selected" : "")> @Translate("Name ascending", "Name A to Z") </option> <option value="@(HttpContext.Current.Request.Url.SetQuery("SortBy", "Name").SetQuery("SortOrder", "DESC").PathAndQuery)" @(SortBy == "Name" && SortOrder == "DESC" ? "selected" : "")> @Translate("Name descending", "Name Z to A") </option> </select> </div>*@ <div class="btn-group" role="group" aria-label="Toggle view"> <a class="btn @(mode == "table" ? "btn-grid active" : "btn-grid")" href="@(HttpContext.Current.Request.Url.SetQuery("listmode", "table").PathAndQuery)"> <i class="icon-list" aria-hidden="true"></i> <span class="sr-only">@Translate("Table", "Tabel")</span> </a> <a class="btn @(mode == "grid" ? "btn-grid active" : "btn-grid")" href="@(HttpContext.Current.Request.Url.SetQuery("listmode", "grid").PathAndQuery)"> <i class="icon-grid" aria-hidden="true"></i> <span class="sr-only">@Translate("Grid", "Grid")</span> </a> </div> </div> </div> } </header> @if (GetLoop("Products").Any()) { if (mode == "grid") { <div class="productlist-grid-flex"> @foreach (var product in GetLoop("Products")) { var link = product.GetString("NIQ:ProductUrl"); var buy = "/default.aspx?ID=" + Navigation.GetPageIdByNavigationTag("ecom") + "&amp;productid=" + product.GetString("Ecom:Product.ID") + "&amp;cartcmd=add"; var symbols = product.GetValue("NIQ:Symbols") as List<NLWI.Platforms.Dynamicweb8.Symbols.Models.ProductSymbol> ?? new List<NLWI.Platforms.Dynamicweb8.Symbols.Models.ProductSymbol>(); var area = GetGlobalValue("Global:Area.Lang"); var media = NORRIQ.EcomMedia.Frontend.GetProductMedia(product); // Favortitelist var availableFavoriteLists = (List<NORRIQ.FavoriteList.Models.FavoriteItemList>)product.GetValue("NIQ:FavoriteListsAvailable"); var favoriteListsWithProduct = (List<NORRIQ.FavoriteList.Models.FavoriteItemList>)product.GetValue("NIQ:FavoritListsWithProduct"); var isFavorite = favoriteListsWithProduct.Any(); var listId = availableFavoriteLists.Any() ? availableFavoriteLists.First().Id : 0; var addFav = Translate("label_make_favorite", "Føj til favoritter"); var delFav = Translate("label_remove_favorite", "Fjern fra favoritter"); var ProductSpecs = product.GetProductSpecifications(); var Image = ProductSpecs.GetAllByKey("Image").Any() ? "/Files/Images/XPI/" + ProductSpecs.GetByKey("Image").Value: media.GetFirstImage().Url; @* These lines are required because lazy load's its data. If the Currency key is never found in the template, the GetJsonPriceKey() extension method will not have access to the value. product.GetString("Ecom:Product.Currency.Code") *@ <div class="@Columns async-price js-favProduct" data-product-display="flex" data-product-key='@(Pageview.User.LoggedIn ? product.GetJsonPriceKey() : "")' data-product-retail-price='@(Pageview.User.LoggedIn ? product.GetJsonRetailPrice() : "")'> <div itemscope itemtype="http://schema.org/Product" class="productlist-grid-product"> @if (ProductSpecs.GetAllByKey("Highlight").Select(s => s.GetReferenceSpecification()).Any()) { <span class="productlist-grid-highlights"> @foreach (var hh in ProductSpecs.GetAllByKey("Highlight").Select(s => s.GetReferenceSpecification())) { var hightilghtId = "productlist-grid-highlight " + hh.GetByKey("Id").Value; var hightilightText = hh.GetByKey("Label").Value; <span class="@hightilghtId"> @hightilightText </span> } </span> } <a class="productlist-grid-image" href="@link" itemprop="url"> <img src="/Admin/Public/GetImage.ashx?Width=200&amp;Height=200&amp;Crop=5&amp;Compression=80&amp;Image=@Image" class="img-responsive" alt="@product.GetString("Ecom:Product.Name")" itemprop="image" /> </a> <div class="productlist-grid-caption"> <a href="@link" class="productlist-grid-name" itemprop="name"> @product.GetString("Ecom:Product.Name") </a> </div> <div class="productlist-grid-info"> <span class="productlist-grid-number"> @Translate("Product Number", "Product Number") <span itemprop="sku">@product.GetString("Ecom:Product.Number")</span> </span> @if (Pageview.User.LoggedIn) { <span class="productlist-grid-stock"> <span class="async-price-stock" itemprop="availability" href="http://schema.org/InStock"> <span class="icon-async icon-pulse"></span> </span> </span> } </div> <div class="productlist-grid-footer"> @if (Pageview.User.LoggedIn) { <div class="productlist-grid-price-info"> <div class="productlist-grid-price"> <span class="productlist-grid-price-price async-price-total" itemprop="price"></span> </div> </div> } <div class="productlist-grid-buying"> @if (product.GetLoop("VariantGroups").Any()) { <a href="@link" class="btn btn-buy"> <span class="product-added-text">@Translate("Buy", "Buy")</span> </a> } else { <form class="form" id="prodform_@product.GetString("Ecom:Product:Page.ID")" name="prodform_@product.GetString("Ecom:Product:Page.ID")" method="post" action="/Default.aspx?ID=@GetGlobalValue("Global:Page.ID")"> @product.GetString("Ecom:Product.Form.Clean") <input type="hidden" name="OrderContext" id="OrderContext" value="@(Pageview.User.LoggedIn ? "B2B" : "QUOTE")" /> <button role="button" type="submit" class="btn btn-action btn-raised"> @if (Pageview.User.LoggedIn) { <i class="icon-minicart"></i><text>&nbsp;</text><span class="product-added-text">@Translate("Add to cart", "Add to cart")</span> } else { @Translate("Request Price", "Request Price") } </button> </form> } </div> </div> @*@if (!product.GetLoop("VariantGroups").Any()) { <div class="productlist-grid-buttons"> <a href="javascript:void(0)" class="js-favorite-toggle productlist-grid-favorite" data-favorite-list-id="@listId" data-is-favorite="@(isFavorite ? "true" : "false")" data-product-id="@(product.GetString("Ecom:Product.ID"))" data-product-language-id="@(product.GetString("Ecom:Product.LanguageID"))" data-product-variant-id="@(product.GetString("Ecom:Product.VariantID"))"> @if (isFavorite) { <span class="icon-favorite-added"></span> } else { <span class="icon-favorite"></span> } </a> </div> }*@ </div> </div> } </div> } else { <text>@using System.Globalization @using System.Web.Mvc.Html @using Dynamicweb.NewsLetterV3 @using NORRIQ.EcomMedia @using NORRIQ.FavoriteList.Models @using diesella.webshop.CustomCode.Razor @using NORRIQ.Common8.Razor; @using NORRIQ.Common8.Factory @using Dynamicweb.eCommerce.Common; @using diesella.webshop.CustomCode.ViewModels.Variants; @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> @{ var addToCartMode = ObjectFactory.GetInstance<NORRIQ.Common8.Context.AreaItemSettings>().GetCurrentAreaValue<string>("AddToCartMode"); } <table class="table table-block productlist-table js-product-table"> <thead> <tr> <th class="productlist-table-product" colspan="2"> @Translate("Product", "Product") </th> <th class="productlist-table-number" nowrap> @Translate("Product Number", "Product Number") </th> @if (Pageview.User.LoggedIn) { <th class="productlist-table-stock" nowrap> @Translate("Stock", "Stock") </th> <th class="productlist-table-favorite"> <i class="icon-favorite-added" aria-hidden="true"></i><span class="sr-only">@Translate("Favorite", "Favorite")</span> </th> <th class="productlist-table-price"> @Translate("Price", "Price") </th> } <th class="productlist-table-quantity"> @Translate("Quantity", "Quantity") </th> </tr> </thead> <tbody> @foreach (var product in GetLoop("Products")) { var LoopCounter = product.GetInteger("Ecom:Product.LoopCounter") - 1; var media = NORRIQ.EcomMedia.Frontend.GetProductMedia(product); var symbols = product.GetValue("NIQ:Symbols") as List<NLWI.Platforms.Dynamicweb8.Symbols.Models.ProductSymbol> ?? new List<NLWI.Platforms.Dynamicweb8.Symbols.Models.ProductSymbol>(); var link = product.GetString("NIQ:ProductUrl"); var area = GetGlobalValue("Global:Area.Lang"); var availableFavoriteLists = (List<NORRIQ.FavoriteList.Models.FavoriteItemList>)product.GetValue("NIQ:FavoriteListsAvailable"); var favoriteListsWithProduct = (List<NORRIQ.FavoriteList.Models.FavoriteItemList>)product.GetValue("NIQ:FavoritListsWithProduct"); var isFavorite = favoriteListsWithProduct.Any(); var listId = availableFavoriteLists.Any() ? availableFavoriteLists.First().Id : 0; var ProductSpecs = product.GetProductSpecifications(); var Image = ProductSpecs.GetAllByKey("Image").Any() ? "/Files/Images/XPI/" + ProductSpecs.GetByKey("Image").Value : media.GetFirstImage().Url; var variants = product.GetLoop("VariantGroups").GetVariants(); var CartContext = Pageview.User.LoggedIn ? "B2B" : "QUOTE"; // In IBH, the Product Number can be used as a unique product identifier. var currentProductNumber = product.GetString("Ecom:Product.Number"); // All variant products and their associated variant groups/options. var variantProducts = product.GetLoop("VariantCombinations").GetVariantProducts(variants, currentProductNumber); var productsDictionary = VariantViewModelBuilder.GetProductsInDimensionOrder(variants, variantProducts); var selectedVariant = VariantViewModelBuilder.GetSelectedOrEmpty(variantProducts); // Selects the "Highlights" from the specifications. Highlights are ListOfValues. // This variable contains the "Id" of the highlight, meaning it should never change. var highlights = ProductSpecs.GetAllByKey("Highlight").Select(s => s.GetReferenceSpecification().GetByKey("Id").Value); @* These lines are required because lazy load's its data. product.GetString("Ecom:VariantGroup.Label") product.GetString("Ecom:VariantGroup.Name") product.GetLoop("VariantAvailableOptions") product.GetString("Ecom:VariantOption.ID") product.GetString("Ecom:VariantOption.Name") If the Currency key is never found in the template, the GetJsonPriceKey() extension method will not have access to the value. product.GetString("Ecom:Product.Currency.Code") *@ <tr itemscope itemtype="http://schema.org/Product" class="async-price js-favProduct" data-product-key='@(Pageview.User.LoggedIn ? product.GetJsonPriceKey() : "")' data-product-retail-price='@(Pageview.User.LoggedIn ? product.GetJsonRetailPrice() : "")'> <td class="productlist-table-thumb"> <a href="@link" itemprop="url"> <img src="/Admin/Public/GetImage.ashx?Width=60&amp;Height=60&amp;Crop=5&amp;Compression=80&amp;Image=@Image" class="img-responsive" alt="@product.GetString("Ecom:Product.Name")" itemprop="name"/> </a> </td> <td class="productlist-table-product"> <a href="@link" tabindex="0" class="productlist-table-name" itemprop="name"> @product.GetString("Ecom:Product.Name") </a> <span class="clearfix"></span> @foreach (var hh in ProductSpecs.GetAllByKey("Highlight").Select(s => s.GetReferenceSpecification())) { var hightilghtId = "productlist-table-highlight " + hh.GetByKey("Id").Value; var hightilightText = hh.GetByKey("Label").Value; <span class="@hightilghtId"> @hightilightText </span> } </td> <td class="productlist-table-number" itemid="sku" data-label="@Translate("Product No", "Product No")" nowrap> @product.GetString("Ecom:Product.Number") </td> @if (Pageview.User.LoggedIn) { <td class="productlist-table-stock async-price-stock" itemprop="availability" href="http://schema.org/InStock" data-label="@Translate("Stock", "Stock")" nowrap> <i class="icon-async icon-pulse"></i> </td> <td class="productlist-table-favorite" data-label="@Translate("Favorite", "Favorite")"> <a href="javascript:void(0)" class="js-favorite-toggle" data-favorite-list-id="@listId" data-is-favorite="@(isFavorite ? "true" : "false")" data-product-id="@(product.GetString("Ecom:Product.ID"))" data-product-language-id="@(product.GetString("Ecom:Product.LanguageID"))" data-product-variant-id="@(product.GetString("Ecom:Product.VariantID"))"> @if (isFavorite) { <i class="icon-favorite-added" aria-hidden="true"></i> <span class="productlist-list-label sr-only">@Translate("Remove favorite", "Remove favorite")</span> } else { <i class="icon-favorite" aria-hidden="true"></i> <span class="productlist-list-label sr-only">@Translate("Make favorite", "Make favorite")</span> } </a> </td> <td class="productlist-table-price async-price-total" itemprop="price" data-label="@Translate("Price", "Price")" nowrap> <i class="icon-async icon-pulse" aria-hidden="true"></i> </td> } @if (product.GetLoop("VariantGroups").Any()) { <td class="productlist-table-variant"> <a href="@link" class="btn btn-buy"><i class="icon-minicart" aria-hidden="true"></i> <span class="sr-only">@Translate("Buy", "Buy")</span></a> </td> } else { <td class="productlist-table-quantity" data-label="@Translate("Quantity", "Quantity")" data-user-type="@(Pageview.User.LoggedIn ? "b2b" : "quote")"> <form class="form" id="prodform_@product.GetString("Ecom:Product:Page.ID")" name="prodform_@product.GetString("Ecom:Product:Page.ID")" method="post" action="@GetGlobalValue("Global:Pageview.Url.Raw")"> @product.GetString("Ecom:Product.Form.Clean") <input type="hidden" name="OrderContext" id="OrderContext" value="@CartContext" /> <label class="sr-only">@Translate("productlist_label_qty", "Antal")</label> <input name="Quantity@(LoopCounter)" id="Quantity@(LoopCounter)" value="@(Pageview.User.LoggedIn ? product.GetInteger("NIQ:BasketQuantity") : 1)" type="tel" onclick="this.focus(); this.select();" class="form-control qty-input" autocomplete="off" data-trigger="focus" data-rule-number="true" data-rule-min="1" data-tabindex="@(LoopCounter)" data-product-autoid="@(product.GetInteger("NIQ:ProductAutoId"))" /> @if (Pageview.User.LoggedIn) { <span class="btn-add btn-raised js-qty-input-user-feedback"> @if (product.GetInteger("NIQ:BasketQuantity") > 0) { <i class="icon-added"></i> } else { <i class="icon-minicart"></i> } </span> } else { <button class="btn btn-buy btn-raised" type="submit"> @Translate("Request Price", "Request Price") </button> } </form> @*<input type="tel" class="form-control qty-input text-center" onclick="this.focus(); this.select();" name="Quantity@(LoopCounter)" id="Quantity@(LoopCounter)" value="@(product.GetInteger("NIQ:BasketQuantity"))" data-product-autoid="@(product.GetInteger("NIQ:ProductAutoId"))" data-tabindex="@(LoopCounter)" data-trigger="manual" /> <span class="productlist-table-added btn btn-buy qty-input-user-feedback" data-product-autoid="@(product.GetInteger("NIQ:ProductAutoId"))"> @if (product.GetInteger("NIQ:BasketQuantity") > 0) { <i class="icon-added"></i> } else { <i class="icon-minicart"></i> } </span>*@ </td> } </tr> } </tbody> </table></text> } <text>@{ // Pagination var paginationCurrentPage = GetInteger("Ecom:ProductList.CurrentPage"); var paginationTotalPages = GetInteger("Ecom:ProductList.TotalPages"); var prev = GetString("Ecom:ProductList.PrevPage.Clean"); var next = GetString("Ecom:ProductList.NextPage.Clean"); } @if (paginationTotalPages > 1) { <nav class="productlist-pagination"> <ul class="pagination"> <li class="@(paginationCurrentPage > 1 ? "" : "disabled")"> <a href="@(paginationCurrentPage > 1 ? prev : "javascript:void()")" aria-label="Previous"> <i aria-hidden="true" class="icon-chevron-left"></i> </a> </li> @foreach (var pagination in GetLoop("Ecom:ProductList.Pages5")) { <li class="@(pagination.GetBoolean("Ecom:ProductList.Pages5.Page.IsCurrent") ? "active" : "")"> <a href="@(pagination.GetString("Ecom:ProductList.Pages5.Page.UrlHtmlEncoded"))"> @pagination.GetString("Ecom:ProductList.Pages5.Page.Number") </a> </li> } <li class="@(paginationTotalPages > paginationCurrentPage ? "" : "disabled")"> <a href="@(paginationTotalPages > paginationCurrentPage ? next : "javascript:void()")" aria-label="Next"> <i aria-hidden="true" class="icon-chevron-right"></i> </a> </li> </ul> </nav> }</text> } </section> @if (Pageview.User.LoggedIn) { <script append="true"> require(['standardwebshop/areas/ecom/product-list'], function (productList) { productList.init({ asyncTemplate: $('#async-price'), productSort: $('#sortProducts') }); }); require(['standardwebshop/areas/ecom/favoritelist'], function (favoriteList) { favoriteList.init({ isFavoriteMode: @isFavoriteList.ToString().ToLower(), $productParent: $('.js-favProduct') }); }); </script> <script id="async-price" type="text/x-jsrender"> <div data-target=".async-price-unit"> {{if NetUnitPrice.PriceWithoutVat != UnitPrice.PriceWithoutVat}} @Translate("price_retail_price", "Retail price") {{>UnitPrice.PriceWithoutVat.formatMoney(2,',','.')}} @Context.Currency.Symbol {{/if}} </div> <div data-target=".async-price-stock"> {{if Inventory >= 1 }} <i class="icon-stock icon-green" title="{{>Inventory}}"></i> <span class="stock-label-text">@Translate("label_in_stock", "På lager")</span> @*{{else Inventory == 1}} <i class="icon-stock icon-yellow" title="{{>Inventory}}"></i> <span class="stock-label-text">@Translate("label_few_in_stock", "Få på lager")</span>*@ {{else}} <i class="icon-stock icon-red" title="0"></i> <span class="stock-label-text">@Translate("label_not_in_stock", "Out of stock")</span> {{/if}} </div> <div data-target=".async-price-total"> @Translate("price_total_price", "") {{>NetUnitPrice.PriceWithoutVat.formatMoney(2,',','.')}} @Context.Currency.Symbol {{if error != null }} <i class="icon-warning" title="@Translate("lwi_showing_retail_prices", "There was a technical problem so your specific price could not be calculated. The price you see is retail price.")"></i> {{/if}} </div> </script> <script type="text/x-jsrender" id="autoaddfeedbackloading"> <i class="icon-async icon-pulse"></i> </script> <script type="text/x-jsrender" id="autoaddfeedbacksuccess"> <i class="icon-added" title="@Translate("autoadd_added_to_basket", "Produktet blev tilføjet til kurven.")"></i> </script> <script type="text/x-jsrender" id="autoaddfeedbackdefault"> <i class="icon-minicart"></i> </script> <script type="text/x-jsrender" id="autoaddfeedbackerror"> {{if error == "badinput"}} <i class="icon-warning" title="@Translate("auto_add_bad_input", "Det indtastede var ikke et tal.")"></i> {{else error == "servererror"}} <i class="icon-warning" title="@Translate("auto_add_server_error", "Der skete en serverfejl, din kurv er ikke opdateret.")"></i> {{else}} <i class="icon-warning"></i> {{/if}} </script> } else { <script append="true"> require(['standardwebshop/areas/ecom/product-list'], function (productList) { productList.init({ productSort: $('#sortProducts') }); }); </script> } @if (!string.IsNullOrEmpty(query)) { <script> var results = @GetLoop("Products").Count; var postfix = results > 0 ? "ProductsFound" : "Empty"; var category = "EcomSearch - " + postfix; // Datalayer originates from GTM if (typeof variable !== 'undefined') dataLayer.push({ 'event': 'EcomSearch', 'eventCategory': category, 'eventAction': '@query', 'eventLabel': results }); </script> }

We use cookies to understand how you use our website and to improve your experience. This includes personalizing content and advertising. By continuing to use our site, you accept our use of cookies and our revised Privacy Policy.
To learn more, click here.