Dagens gode deal
Exception in template (Designs\Lb\eCom/Productlist/ProductListInfinity.cshtml): System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
   at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
   at System.Collections.Generic.List`1.RemoveAt(Int32 index)
   at CompiledRazorTemplates.Dynamic.efbebaadc.Execute()
   at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context)
   at RazorEngine.Templating.TemplateService.Run(ITemplate template, DynamicViewBag viewBag)
   at RazorEngine.Templating.TemplateService.Parse(String razorTemplate, Object model, DynamicViewBag viewBag, String cacheName)
   at RazorEngine.Razor.Parse[T](String razorTemplate, T model, String cacheName)
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()
@inherits RazorTemplateBase<RazorTemplateModel<Template>> @using Dynamicweb.Rendering; @using System.Web; @helper CartTotal2MD(System.Collections.Generic.IEnumerable<Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>>.LoopItem> i, string EcomOrderPriceCurrencyCode, string EcomOrderPriceWithoutFeesPrice, double EcomOrderShippingFeePriceWithVATValue, string EcomOrderShippingFeePrice, string EcomOrderPricePrice, double TotalDiscountPrice) { try { <div class="row" style="border-bottom: 1px solid #00000012; padding-bottom: 15px; margin-top: 15px;"> <div class="col s8 span-left"> <span class="OrderLineLabel">Subtotal</span><br /> @(TotalDiscountPrice < 0 ? "<small class='sale'>inkl. rabat/gavekort på DKK " + TotalDiscountPrice + "</small>" : "") </div> <div class="col s4 span-right"> <span class="OrderLineLabel">@EcomOrderPriceCurrencyCode @EcomOrderPriceWithoutFeesPrice</span> </div> </div> if (EcomOrderShippingFeePriceWithVATValue > 0) { <div class="row"> <div class="col s8 span-left"> <span class="OrderLineLabel">Fragt</span><br /> </div> <div class="col s4 span-right"> <span class="OrderLineLabel">@EcomOrderPriceCurrencyCode @EcomOrderShippingFeePrice</span> </div> </div> } else { foreach (var item in i.Where(x => x.GetString("Ecom:Order:OrderLine.ProductName") == "Fri fragt")) { <div class="row @(item.GetString("Ecom:Order:OrderLine.IsProduct") == "true" ? "top-space-small" : "")"> <div class="col s6 span-left"> <span class="OrderLineLabel sale">@item.GetString("Ecom:Order:OrderLine.ProductName")</span><br /> </div> <div class="col s6 span-right"> <span class="OrderLineLabel sale">@EcomOrderPriceCurrencyCode @item.GetString("Ecom:Order:OrderLine.Price.Price")</span> </div> </div> } } <div class="row" style="border-bottom: 1px solid #00000012; border-top: 1px solid #00000012; padding-bottom: 15px; padding-top: 15px"> <div class="col s6 span-left"> <strong class="OrderLineLabel">Total</strong><br /> </div> <div class="col s6 span-right"> <strong class="OrderLineLabel">@EcomOrderPriceCurrencyCode @EcomOrderPricePrice</strong> </div> </div> } catch (Exception e) { Dynamicweb.Logging.LogManager.Current.GetLogger("CartTotal2MD/Error").Error(e.Message); } } @helper CartTotal(System.Collections.Generic.IEnumerable<Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>>.LoopItem> i, string EcomOrderPriceCurrencyCode, string EcomOrderPriceWithoutFeesPrice, double EcomOrderShippingFeePriceWithVATValue, string EcomOrderShippingFeePrice, string EcomOrderPricePrice) { <div class="row"> <div class="col-md-12"> @foreach (var item in i.Where(x => x.GetString("Ecom:Order:OrderLine.ProductName") != "Fri fragt")) { <div class="row @(item.GetString("Ecom:Order:OrderLine.IsProduct") == "true" ? "top-space-small" : "")"> <div class="col-xs-8 span-left"> <span class="OrderLineLabel @(item.GetString("Ecom:Order:OrderLine.IsProduct") == "true" ? "" : "sale")">@item.GetString("Ecom:Order:OrderLine.ProductName")</span><br /> </div> <div class="col-xs-4 span-right"> <span class="OrderLineLabel price @(item.GetString("Ecom:Order:OrderLine.IsProduct") == "true" ? "" : "sale")">@EcomOrderPriceCurrencyCode @item.GetString("Ecom:Order:OrderLine.Price.Price")</span> </div> </div> } <div class="row bottom-space-small" style="border-bottom: 1px solid #00000012; border-top: 1px solid #00000012; padding-bottom: 15px; padding-top: 15px; margin-top: 15px;"> <div class="col-xs-6 span-left"> <strong class="OrderLineLabel">Subtotal</strong><br /> </div> <div class="col-xs-6 span-right"> <strong class="OrderLineLabel">@EcomOrderPriceCurrencyCode @EcomOrderPriceWithoutFeesPrice</strong> </div> </div> @if (EcomOrderShippingFeePriceWithVATValue > 0) { <div class="row bottom-space-small" style="padding-bottom: 15px; padding-top: 15px"> <div class="col-xs-8 span-left"> <span class="OrderLineLabel">Fragt</span><br /> </div> <div class="col-xs-4 span-right"> <span class="OrderLineLabel">@EcomOrderPriceCurrencyCode @EcomOrderShippingFeePrice</span> </div> </div> } else { foreach (var item in i.Where(x => x.GetString("Ecom:Order:OrderLine.ProductName") == "Fri fragt")) { <div class="row @(item.GetString("Ecom:Order:OrderLine.IsProduct") == "true" ? "top-space-small" : "bottom-space-small")" style="padding-top: 15px; padding-bottom: 15px;"> <div class="col-xs-6 span-left"> <span class="OrderLineLabel sale">@item.GetString("Ecom:Order:OrderLine.ProductName")</span><br /> </div> <div class="col-xs-6 span-right"> <span class="OrderLineLabel sale">@EcomOrderPriceCurrencyCode @item.GetString("Ecom:Order:OrderLine.Price.Price")</span> </div> </div> } } <div id="cart-total" class="row bottom-space-small" style="border-bottom: 1px solid #00000012; border-top: 1px solid #00000012; padding-bottom: 15px; padding-top: 15px"> <div class="col-xs-6 span-left"> <strong class="OrderLineLabel">Total</strong><br /> </div> <div class="col-xs-6 span-right"> <strong class="OrderLineLabel">@EcomOrderPriceCurrencyCode @EcomOrderPricePrice</strong> </div> </div> </div> </div> } @helper CartTotalSummary(System.Collections.Generic.IEnumerable<Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>>.LoopItem> i, string EcomOrderPriceCurrencyCode, string EcomOrderPriceWithoutFeesPrice, double EcomOrderShippingFeePriceWithVATValue, string EcomOrderShippingFeePrice, string EcomOrderPricePrice) { <div class="row" style="border-bottom: 1px solid #00000012; border-top: 1px solid #00000012; padding-bottom: 15px; padding-top: 15px"> <div class="col-xs-6 span-left"> <strong class="OrderLineLabel">Total</strong><br /> </div> <div class="col-xs-6 span-right"> <strong class="OrderLineLabel">@EcomOrderPriceCurrencyCode @EcomOrderPricePrice</strong> </div> </div> } @helper Product(Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>>.LoopItem i, bool variantLink, string columns, string groupName, string notInStock, string addToBasketLabel) { @Product(i, variantLink, columns, groupName, notInStock, addToBasketLabel, false, true) } @helper Product(Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>>.LoopItem i, bool variantLink, string columns, string groupName, string notInStock, string addToBasketLabel, bool favorit, bool basketButton) { var image = Sojborg.Helpers.Helpers.GetListImagePath(i.GetString("Ecom:Product.Number").Trim(), "littlebugz", "_1", "jpg"); double max = 0; List<int> discountIds = new List<int>(); if (i.GetLoop("VariantCombinations").Any()) { max = i.GetLoop("VariantCombinations").Max(x => x.GetDouble("Ecom:Product.Discount.Price.PriceWithVAT.Value")); } <div class="@columns product-list-col-override"> <div class="product-list-wrapper"> <div class="product-list-image-wrapper"> <a href="@i.GetString("Ecom:Product.LinkGroup.Clean").Replace("1076","1036")"> <picture> <source data-srcset="/admin/public/getimage.ashx?image=@(image)&altFmImage_path=files/images/littlebugz/content/no-image.jpg&height=360&width=360&Crop=0" media="(max-width: 768px)" /> <source data-srcset="/admin/public/getimage.ashx?image=@(image)&altFmImage_path=files/images/littlebugz/content/no-image.jpg&height=360&width=360&Crop=0" /> <img alt="@i.GetValue("Ecom:Product.Name") @groupName" data-src="/admin/public/getimage.ashx?image=@image&altFmImage_path=files/images/littlebugz/content/no-image.jpg&height=360&width=360&Crop=0" class="lazyload" style="width: 100%" /> </picture> </a> <span style="display:none; position: absolute; top: 0px; right: 0px;"><i class="material-icons md-24">favorite</i></span> <div class="medium-sale"> @if (i.GetLoop("ProductDiscounts").Any()) { double maxDiscount = i.GetLoop("ProductDiscounts").Max(x => x.GetDouble("Ecom:Product.Discount.Amount.PriceWithVAT.Value")); var discount = i.GetLoop("ProductDiscounts").Where(x => x.GetDouble("Ecom:Product.Discount.Amount.PriceWithVAT.Value") == maxDiscount).First(); if (discount.GetString("Ecom:Product.Discount.Name").Contains("VolumeDiscount")) { @discount.GetString("Ecom:Product.Discount.Description") <br /> discountIds.Add(i.GetInteger("Ecom:Product.Discount.ID")); } else { @discount.GetString("Ecom:Product.Discount.PercentWithVAT")<span>%</span> <br /> discountIds.Add(i.GetInteger("Ecom:Product.Discount.ID")); } } @if (i.GetLoop("AllDiscounts").Any()) { if (i.GetLoop("AllDiscounts").Where(x => x.GetString("Ecom:AllDiscounts.Discount.Name").Contains("VolumeDiscount")).Any()) { foreach (var discount in i.GetLoop("AllDiscounts").Where(x => x.GetString("Ecom:AllDiscounts.Discount.Name").Contains("VolumeDiscount"))) { if (!discountIds.Contains(i.GetInteger("Ecom:AllDiscounts.Discount.ID"))) { @discount.GetString("Ecom:AllDiscounts.Discount.Description") <br /> } } } } </div> </div> <div class="product-list-info-wrapper"> <div class="product-list-info-name"> <h4>@i.GetValue("Ecom:Product.Name")</h4> </div> @{ if (!string.IsNullOrEmpty(i.GetString("Ecom:Product.CategoryField.Yarn.YarnQualityComposition.Value"))) { <div class="composition"> @i.GetString("Ecom:Product.CategoryField.Yarn.YarnQualityComposition.Value") </div> } else if (!string.IsNullOrEmpty(i.GetString("Ecom:Product.CategoryField.Yarn.Yarnlength.Value"))) { <div class="composition"> @i.GetString("Ecom:Product.CategoryField.Yarn.Yarnlength.Value") </div> } else if (!string.IsNullOrEmpty(i.GetString("Ecom:Product.CategoryField.Yarn.YarnBrand.Value"))) { <div class="composition"> @i.GetString("Ecom:Product.CategoryField.Yarn.YarnBrand.Value") </div> } else if (!string.IsNullOrEmpty(i.GetString("Ecom:Product.CategoryField.Book.BookLanguage.Value"))) { <div class="composition"> @i.GetString("Ecom:Product.CategoryField.Book.BookLanguage.Value") </div> } else if (!string.IsNullOrEmpty(i.GetString("Ecom:Product.CategoryField.YarnPackage.YarnPackageAuthor.Value"))) { <div class="composition"> @i.GetString("Ecom:Product.CategoryField.YarnPackage.YarnPackageAuthor.Value") </div> } else if (!string.IsNullOrEmpty(i.GetString("Ecom:Product.CategoryField.Clips.ClipsSize.Value"))) { <div class="composition"> @i.GetString("Ecom:Product.CategoryField.Clips.ClipsSize.Value") </div> } else { <div class="composition"> @i.GetString("Ecom:Product.Number") </div> } } <div style="padding: 5px 0px 15px 0px; min-height: 60px;"> @if (i.GetDouble("Ecom:Product.Discount.TotalAmount.PriceWithVAT.Value") > 0) { <div class="sale">@(max > i.GetDouble("Ecom:Product.Price.Price") ? "Fra " : string.Empty) @i.GetValue("Ecom:Product.Discount.Price.Price") @i.GetValue("Ecom:Product.Currency.Code")</div> <div> <del> @i.GetValue("Ecom:Product.Price.Price") @i.GetValue("Ecom:Product.Currency.Code") </del> </div> } @if (i.GetDouble("Ecom:Product.Discount.TotalAmount.PriceWithVAT.Value") <= 0) { <div> @(max > i.GetDouble("Ecom:Product.Price.Price") ? "Fra " : string.Empty) <span> @i.GetValue("Ecom:Product.Discount.Price.Price") @i.GetValue("Ecom:Product.Currency.Code") </span> </div> } </div> @if (basketButton) { if (i.GetLoop("VariantCombinations").Any()) { <a href="@i.GetString("Ecom:Product.LinkGroup.Clean").Replace("1076","1036")" class="btn btn-primary btn-sm"><i class="material-icons">local_mall</i>Vis produkt</a> } else { <button type="button" @(i.GetInteger("Ecom:Product.Stock") > 0 ? "" : "disabled") name="AddToBasketBtn" data-productid="@i.GetValue("Ecom:Product.ID")" data-variantid="@i.GetValue("Ecom:Product.VariantID")" class="AddToBasketBtn btn btn-primary btn-sm"><i class="material-icons">local_mall</i>@(i.GetInteger("Ecom:Product.Stock") > 0 ? addToBasketLabel : notInStock)</button> } } @if (favorit) { if (i.GetBoolean("Ecom:Product.IsProductInFavoriteList")) { <form method="post"> <input type='hidden' name='CCRemoveFromMyLists' value="@i.GetValue("Ecom:Product.ID")" /> <input type='hidden' name='CCRemoveFromListVariantID' value="@i.GetValue("Ecom:Product.VariantID")" /> <input type='hidden' name='CCRemoveFromListLanguageID' value="@i.GetValue("Ecom:Product.LanguageID")" /> <button class="btn btn-danger btn-add-to-cart-list" type="submit"> <i class="material-icons"> favorite </i> fjern </button> </form> } else { <form method="post"> <input type='hidden' name='CCAddToMyLists' value="@i.GetValue("Ecom:Product.ID")" /> <input type='hidden' name='CCAddToListVariantID' value="@i.GetValue("Ecom:Product.VariantID")" /> <input type='hidden' name='CCAddToListLanguageID' value="@i.GetValue("Ecom:Product.LanguageID")" /> <button class="btn btn-danger btn-add-to-cart-list" type="submit"> <i class="material-icons"> favorite_border </i> tilføj til favorit </button> </form> } } </div> </div> </div> } @using Dynamicweb.Rendering; @using System.Web; @{ string colxs = GetString("Ecom:Group:Field.colxs.Value"); string colsm = GetString("Ecom:Group:Field.colsm.Value"); string colmd = GetString("Ecom:Group:Field.colmd.Value"); string collg = GetString("Ecom:Group:Field.collg.Value"); string columns = "col-xs-" + (!string.IsNullOrEmpty(colxs) ? colxs : "6") + " col-sm-" + (!string.IsNullOrEmpty(colsm) ? colsm : "4") + " col-md-" + (!string.IsNullOrEmpty(colmd) ? colmd : "3") + " col-lg-" + (!string.IsNullOrEmpty(collg) ? collg : "2"); int showFacets = GetLoop("FacetGroups").Where(x => x.GetLoop("Facets").Where(y => y.GetString("Facet.RenderType") == "Select").Where(z => z.GetInteger("Facet.OptionResultTotalCount") > 0).Count() > 0).Count(); } <div class="container"> <section class="center"> <div class="row"> <div class="col-xs-12"> <div class="breadcrumb-wrapper"> <ul class="breadcrumb"> <li>DU ER HER</li> @RenderNavigation(new { Template = "Breadcrumb.xslt" }) </ul> </div> </div> </div> @{ foreach (var fg in GetLoop("FacetGroups")) { foreach (var f in fg.GetLoop("Facets").Where(x => x.GetString("Facet.RenderType") == "Tags")) { if (f.GetInteger("Facet.OptionResultTotalCount") > 0) { <div class="row"> <div class="col-xs-12"> @foreach (var fo in f.GetLoop("FacetOptions")) { @(fo.GetBoolean("FacetOption.Selected") ? "<h1>" + fo.GetString("FacetOption.Name") + "</h1>" : string.Empty) } </div> </div> } } } } </section> @if (showFacets > 0) { <section class="filters"> <form name="categorypicker" id="categorypicker" action="" method="get"> <div class="row"> @{ foreach (var fg in GetLoop("FacetGroups")) { foreach (var f in fg.GetLoop("Facets").Where(x => x.GetString("Facet.RenderType") == "Tags")) { if (f.GetInteger("Facet.OptionResultTotalCount") > 0) { <div class="col-xs-12"> <select id="selectcategorypicker" class="categorypicker selectpicker show-tick form-control" name="@f.GetString("Facet.QueryParameter")" data-style="btn-default btn-block large-box" data-title="@f.GetString("Facet.Name")"> <option style="display: none;"></option> @foreach (var fo in f.GetLoop("FacetOptions")) { <option data-content="<strong>@fo.GetString("FacetOption.Name")</strong>" @(fo.GetBoolean("FacetOption.Selected") ? "selected" : string.Empty) value="@fo.GetString("FacetOption.Name")" data-subtext="(@fo.GetString("FacetOption.Count"))">@fo.GetString("FacetOption.Name")</option> } </select> </div> } } } } </div> </form> <form name="filters" id="filters" action="" method="get"> <div class="row"> <div class="col-xs-12"> <div class="top-space-medium"> <button id="advfilters-btn" class="btn btn-primary btn-block" type="button" data-toggle="collapse" data-target="#collapseExample" aria-expanded="false" aria-controls="collapseExample"> <i class="material-icons">filter_list</i> Filtrer <span class="active-filter" style="font-weight:700;"></span> </button> <div class="collapse" id="collapseExample"> <div id="advfilters" class="top-space-small"> <div class="row"> @foreach (var fg in GetLoop("FacetGroups")) { foreach (var f in fg.GetLoop("Facets").Where(x => (x.GetString("Facet.RenderType") == "Select" || x.GetString("Facet.RenderType") == "Checkboxes"))) { if (f.GetInteger("Facet.OptionResultTotalCount") > 0) { <div class="col-xs-12 col-sm-4 col-md-3 col-lg-2"> <div class="form-group"> <label for="@f.GetString("Facet.Name")" style="font-size: 0.8em; font-weight: 600;">@f.GetString("Facet.Name")</label> <select class="filterpicker form-control chosen-select" name="@f.GetString("Facet.QueryParameter")" placeholder="@f.GetString("Facet.Name")" data-placeholder="@f.GetString("Facet.Name")" id="@f.GetString("Facet.Name")"> <option></option> @foreach (var fo in f.GetLoop("FacetOptions")) { if (fo.GetInteger("FacetOption.Count") > 0) { <option @(fo.GetBoolean("FacetOption.Selected") ? "selected" : string.Empty) @(fo.GetInteger("FacetOption.Count") == 0 ? "disabled" : "") value="@fo.GetString("FacetOption.Name")">@fo.GetString("FacetOption.Name")</option> } } </select> </div> </div> } else { } } } </div> </div> </div> </div> </div> </div> <div class="row top-space-small"> <div class="selected-filter-wrapper"> <div class="col-xs-12"> <div id="selectedfilters"></div> </div> </div> </div> </form> </section> } <div style="display: none" class="thenumber">@GetString("Ecom:ProductList.PageProdCnt")</div> <section> <div class="row"> <div class="col-xs-12"><div style="text-transform: uppercase; font-size: 18px; text-align: center;">Viser <span class="count"></span> produkter</div></div> </div> <div class="row top-space-small products"> @foreach (LoopItem i in GetLoop("Products")) { @Product(i, false, columns, GetString("Ecom:Group.Name"), Translate("NotInStock", "Ikke på lager"), Translate("AddToBasket", "Ned i posen"), false, true) } </div> </section> </div> <script> @{ List<string> mylist = new List<string>(); foreach (var item in GetLoop("Ecom:ProductList.Pages")) { mylist.Add("'"+item.GetString("Ecom:ProductList.Pages.Page.Url").Replace("1036", "1097")+"'"); } mylist.RemoveAt(0); var result = String.Join(", ", mylist.ToArray()); } var nextPenSlugs = [ @result ]; </script>

Søg

Populære søgninger

  • Whirl
  • sikkerhedsøjne
  • gavekort
  • Stone
  • junior
  • lemon
  • julesok
  • maler
  • Garnpakker
  • wash