Online shop under maintenance

Online payments are temporarily unavailable – our Customer Support team is happy to take your order.

01506 894822 enquiries@oliver-seeds.co.uk

Error executing template "Designs/DLF/eCom/ProductCatalog/basic_ListView.cshtml"
System.ArgumentException: An item with the same key has already been added.
   at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at Dynamicweb.Ecommerce.Products.GroupRelation.GetGroupRelationsByParentId(String theParentId)
   at Dynamicweb.Ecommerce.Products.GroupService.GetSubgroups(Group group, Boolean showUnTranslated)
   at Dynamicweb.Ecommerce.Frontend.NavigationProviders.GroupNavigationProvider.MakeGroupTree(IEnumerable`1 groups, Page page, NavigationItem parentNode, Int32 thisLevel, Int32 maxLevel, Page productPage)
   at Dynamicweb.Ecommerce.Frontend.NavigationProviders.GroupNavigationProvider.MakeGroupTree(IEnumerable`1 groups, Page page, NavigationItem parentNode, Int32 thisLevel, Int32 maxLevel, Page productPage)
   at Dynamicweb.Ecommerce.Frontend.NavigationProviders.GroupNavigationProvider.MakeGroupTree(Page page, NavigationItem parentNode)
   at Dynamicweb.Ecommerce.Frontend.NavigationProviders.GroupNavigationProvider.Process(NavigationItem node)
   at Dynamicweb.Ecommerce.Frontend.NavigationProviders.GroupNavigationProvider.ProcessTree(RootNavigationItem rootNode, NavigationType navigationType)
   at Dynamicweb.Frontend.XmlNavigation.MakeXml(Int32 parentId, Int32 levelStart, Int32 levelStop, Expand expand, Int32 selectedAreaId)
   at Dynamicweb.Frontend.XmlNavigation.GetNavigationHtml(Int32 parentId, Int32 levelStart, Int32 levelStop, Expand expand, String name, String xsltPath, Int32 selectedAreaId, Boolean sitemapMode, NameValueCollection settings, NameValueCollection attributes, IncludeMode mode)
   at Dynamicweb.Frontend.XmlNavigation.GetNavigationHtml(NameValueCollection settings, NameValueCollection attributes)
   at CompiledRazorTemplates.Dynamic.RazorEngine_4d0be87731b14c899bcf8733d141f026.Execute() in C:\inetpub\solutions\DLF.MyDLF.Webshop\Live\Files\Templates\Designs\DLF\eCom\ProductCatalog\basic_ListView.cshtml:line 51
   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 @using Dynamicweb.Ecommerce 2 @using Dynamicweb.Rendering 3 @using Dynamicweb.Ecommerce.ProductCatalog 4 @using NORRIQ.Common8.Razor 5 @using DLF.MyDLF.Webshop.Web.CustomCode.AsyncProductList 6 @using DLF.MyDLF.Webshop.Web.CustomCode.AsyncProductList.Models 7 @using Dynamicweb.Frontend 8 @inherits ViewModelTemplate<ProductListViewModel> 9 @{ 10 var products = Model.PageSize; 11 12 } 13 @if (ProductPageFeedObserver.IsJsonFeed()) 14 { 15 var plp = new ProductListPage(Model); 16 @plp.ToJSON() 17 } 18 else 19 { 20 var pdpLink = NORRIQ.Common8.Razor.Navigation.GetUrlByNavigationTag("plp"); 21 var query = Dynamicweb.Context.Current.Request["productsearch"]; 22 var group = Dynamicweb.Context.Current.Request["GroupID"] != null 23 ? Services.ProductGroups.GetGroup(Dynamicweb.Context.Current.Request["GroupID"]) 24 : null; 25 var groupName = group != null ? group.Name : Pageview.CurrentParagraph.Header; 26 27 <productlist-basic-listview default-grid-class="basic_listview-grid" pdp-link="@pdpLink" inline-template> 28 <div class="basic_listview" v-bind:class="{'initialized': initialized }"> 29 30 <template v-if="!queryLoading || pagination"> 31 <aside class="basic_listview-sidebar"> 32 <b-collapse class="basic_listview-overlay" id="sidebar-overlay"></b-collapse> 33 <div class="sidebar-toggle"> 34 <button type="button" class="btn-toggle" v-b-toggle.sidebar-navigation.sidebar-overlay aria-label="@Translate(" Open sidebar")"> 35 <svg class="icon-left"> 36 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/dlf/icons/icons.svg#chevron-left"></use> 37 </svg> 38 <span>@Translate("Navigation")</span> 39 </button> 40 <button type="button" 41 class="btn-toggle" 42 v-b-toggle.sidebar-filter.sidebar-overlay 43 aria-label="@Translate(" Open filter")" 44 v-if="facetFilter.length > 0"> 45 <svg class="icon-left"> 46 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/dlf/icons/icons.svg#filter"></use> 47 </svg> 48 <span>@Translate("Filter")</span> 49 </button> 50 </div> 51 @RenderNavigation(new { Template = "basic_ListView.xslt", Expandmode = "all", StartLevel = 1, EndLevel = 3 }) 52 <basic-facet-filter :facet-filters="facetFilter" v-if="facetFilter.length > 0"></basic-facet-filter> 53 </aside> 54 <section class="basic_listview-content"> 55 <header class="basic_listview-header"> 56 <h1> 57 @if (query == null) 58 { 59 @groupName 60 } 61 else 62 { 63 @Translate("Searchresult") 64 } 65 </h1> 66 67 @if (query != null) 68 { 69 <span class="basic_listview-count"> 70 {{ productList.length }} @Translate("Searchresult for") <strong>@query</strong> @Translate("found") 71 </span> 72 } 73 else 74 { 75 76 <span class="basic_listview-count"> 77 {{ productList.length }} @Translate("products") 78 </span> 79 } 80 </header> 81 @if (query == null && !string.IsNullOrEmpty(group?.Description)) 82 { 83 <p>@group.Description</p> 84 } 85 <div class="basic_listview-controls"> 86 <a :href="comparisonSelection.length >= 2 ? ('/products?compare=' + SelectedCompareNumbers) : '#' " class="btn btn-dark btn-sm" v-bind:class="comparisonSelection.length >= 2 ? '' : 'disabled'"> 87 @Translate("Compare") ({{comparisonSelection.length}}) 88 </a> 89 <div class="form-group"> 90 <label for="selectedSort"> 91 @Translate("Sort products") 92 </label> 93 <select v-model="selectedSort" id="selectedSort" class="form-control form-control-sm"> 94 <option value="null" selected disabled hidden>Select Sort</option> 95 <option :value="{'sortColumn': 'Name', 'sortDirection': 'desc'}">@Translate("Name descending")</option> 96 <option :value="{'sortColumn': 'Name', 'sortDirection': 'asc'}">@Translate("Name ascending") </option> 97 </select> 98 </div> 99 </div> 100 <div v-bind:class="[plpGridClass]" id="plp"> 101 <div class="basic_listview-item" v-for="product in productList" v-bind:key="product.Product.id"> 102 <template v-if="product.Product"> 103 <article class="basic_listview-product" itemscope itemtype="https://schema.org/Product"> 104 <a :href="product.Product.Url" class="basic_listview-link" itemprop="url"> 105 <picture class="basic_listview-image"> 106 <source media="(max-width:767.98px)" :srcset="'/Admin/Public/GetImage.ashx?Width=360&amp;Height=360&amp;Compression=85&amp;Crop=5&amp;fillcanvas=true&amp;Image=' + getDefaultImageUrl(product)" /> 107 <source media="(max-width:991.98px)" :srcset="'/Admin/Public/GetImage.ashx?Width=300&amp;Height=300&amp;Compression=85&amp;Crop=5&amp;fillcanvas=true&amp;Image=' + getDefaultImageUrl(product)" /> 108 <img :src="'/Admin/Public/GetImage.ashx?Width=260&amp;Height=260&amp;Compression=85&amp;Crop=5&amp;fillcanvas=true&amp;Image=' + getDefaultImageUrl(product)" alt="Product Name" itemprop="image" class="img-fluid" /> 109 </picture> 110 <header class="basic_listview-specs"> 111 <h1 itemprop="name">{{product.Product.Name}}</h1> 112 <p class="basic_listview-sku" v-if="product.Product.AdditionalText !==''">{{product.Product.AdditionalText}}</p> 113 <p class="basic_listview-sku" itemprop="sku" data-caption="@Translate("Product Number")">{{product.Product.Number}}</p> 114 </header> 115 </a> 116 <footer class="basic_listview-foot"> 117 <async-price class-type="basic_listview" 118 :default-price-without-vat="product.Product.DefaultPrice.PriceWithoutVat" 119 :product-id="product.Product.Id" 120 :variant-id="product.Product.DefaultVariantId" 121 unit-of-measure="" 122 list-price="true" 123 :price-postfix="product.Product.AlternativeVariantCode" 124 :has-kg-base-unit="product.Product.HasKgBaseUnit"></async-price> 125 <div class="custom-control custom-checkbox basic_listview-compare--control"> 126 <input type="checkbox" 127 :value="product.Product.Number" 128 :id="product.Product.Number" 129 v-model="comparisonSelection" 130 @@click="CheckComparisionSelectionLength(product.Product.Number, $event)" 131 class="custom-control-input" /> 132 <label :for="product.Product.Number" 133 class="custom-control-label">@Translate("Add to comparision")</label> 134 </div> 135 @*<add-to-basket-button-only v-if="!product.Product.HasVariants" :product-id="product.Product.Id" variant-id="" unit-of-measure="" button-class="btn btn-primary" class="basic_listview-form"></add-to-basket-button-only>*@ 136 @*<a :href="product.Product.Url" v-if="product.Product.HasVariants" class="btn btn-primary"> 137 @Translate("See product") 138 </a>*@ 139 </footer> 140 </article> 141 </template> 142 </div> 143 </div> 144 @if (Model.TotalProductsCount > Model.PageSize) 145 { 146 <footer class="basic_listview-footer"> 147 <pagination v-if="pagination" :pagination="pagination"></pagination> 148 </footer> 149 } 150 </section> 151 </template> 152 <div class="basic_listview-loader" v-if="queryLoading && !pagination"> 153 <span class="spinner-xl-default"></span> 154 </div> 155 <div class="basic_listview-overlay" v-bind:class="queryLoading && pagination ? 'active' : ''"> 156 <span class="spinner-xl-light"></span> 157 </div> 158 </div> 159 </productlist-basic-listview> 160 } 161 162