ORDERS PLACED BEFORE 1PM WILL BE SHIPPED SAME WORKING DAY

ORDERS PLACED BEFORE 1PM WILL BE SHIPPED SAME WORKING DAY

Tel: +45 7050 5900
Mon - Fri
08:30-15:30
Exception in template (Designs\Outwell\eCom/Productlist/ProductListFacets.cshtml): System.Data.SqlClient.SqlException (0x80131904): Transaction (Process ID 73) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.SqlDataReader.TryHasMoreRows(Boolean& moreRows)
   at System.Data.SqlClient.SqlDataReader.TryReadInternal(Boolean setTimeout, Boolean& more)
   at System.Data.SqlClient.SqlDataReader.Read()
   at Dynamicweb.Ecommerce.Products.GroupRepository.HasProducts(Group group)
   at Dynamicweb.Ecommerce.Products.GroupService.HasProducts(Group group)
   at CompiledRazorTemplates.Dynamic.ebbebaaed.Execute()
   at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context) in c:\Users\abbottm\Documents\GitHub\RazorEngine\src\Core\RazorEngine.Core\Templating\TemplateBase.cs:line 126
   at RazorEngine.Templating.TemplateService.Run(ITemplate template, DynamicViewBag viewBag) in c:\Users\abbottm\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\abbottm\Documents\GitHub\RazorEngine\src\Core\RazorEngine.Core\Templating\TemplateService.cs:line 439
   at RazorEngine.Razor.Parse[T](String razorTemplate, T model, DynamicViewBag viewBag, String cacheName) in c:\Users\abbottm\Documents\GitHub\RazorEngine\src\Core\RazorEngine.Core\Razor.cs:line 290
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()
ClientConnectionId:ff917c89-f70a-43f9-86e2-539eee4459fa
Error Number:1205,State:51,Class:13
@using System @using System.Collections.Generic @using System.Globalization @using System.Linq @using System.Web @using Dynamicweb.Extensibility @using Dynamicweb.Frontend @using Dynamicweb.Ecommerce.Products @using Dynamicweb.Ecommerce.Common @using Dynamicweb.Ecommerce.Orders @using Dynamicweb.Indexing.Querying @using Dynamicweb.Content @using Dynamicweb.Analytics @using OaseOutdoors.Components.Shared.Modules.Ecom.ModelBuilders @using OaseOutdoors.Components.Shared.Modules.Ecom.Models @using OaseOutdoors.Services.EcomUrlService.Initialization @using OaseOutdoors.Services.UrlParserService.Initialization @using OaseOutdoors.Services.FacetService.Models @using OaseOutdoors.Services.GroupService.Initialization @using OaseOutdoors.Services.ImageService.Enums @using OaseOutdoors.Services.ImageService.Initialization @using OaseOutdoors.Services.ProductResourceService.Enums @using OaseOutdoors.Services.ProductResourceService.Initialization @using OaseOutdoors.Services.ProductService.Initialization @using OaseOutdoors.Services.StaticResourceService.Initialization @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> @{ var staticResourceService = ServiceLocator.Current.GetStaticResourceService(); var area = PageView.Current().Area; var areas = Dynamicweb.Services.Areas.GetAreas().Where(x => x.Active && x.Item["ShopPublished"] != null && (bool)x.Item["ShopPublished"] && x.Name.ToLower().Contains(area.Name.Split(':')[0].Trim().ToLower())).ToList(); var contextCart = Context.Cart; string groupId = (!string.IsNullOrEmpty(GetString("Ecom:Group.ID"))) ? GetString("Ecom:Group.ID") : (HttpContext.Current.Items["PrimaryGroupId"] != null && !string.IsNullOrEmpty(HttpContext.Current.Items["PrimaryGroupId"].ToString())) ? HttpContext.Current.Items["PrimaryGroupId"].ToString() : ""; var group = Group.GetGroupById(groupId); if (group == null) { return; } var productViewModelService = new ProductViewModelBuilder(); var groupViewModelService = new GroupViewModelBuilder(); if (group != null && group.ShopId != Pageview.Area.EcomShopId) { var groupContext = HttpContext.Current; groupContext.Response.RedirectPermanent(new Uri(groupContext.Request.Url.Scheme + "://" + groupContext.Request.Url.Host + groupContext.Request.RawUrl).GetLeftPart(UriPartial.Path) + "-404", true); } var groupService = ServiceLocator.Current.GetGroupService(); var groupViewModel = (group != null) ? groupViewModelService.GetViewModel(group) : null; var beginSection = "<div class=\"container\"><section class=\"product-container\">"; var endSection = "</section></div>"; var urlService = ServiceLocator.Current.GetEcomUrlService(); var urlParserService = ServiceLocator.Current.GetUrlParserService(); var valutaSelector = HttpContext.Current.Request.Cookies["currencySelector"]; GroupCollection subGroups = null; if (group != null && group.HasChildGroups && group.Subgroups.Count >= 1) { subGroups = group.Subgroups; } else if (group != null && group.ParentGroups.Count > 0) { subGroups = group.ParentGroups.FirstOrDefault().Subgroups; } int breadCrumbTotal = (groupViewModel != null) ? groupViewModel.Breadcrumb.Count : 0; int breadCrumbIndex = 1; var queryService = ServiceLocator.Current.GetInstance<IQueryService>(); var queryName = (HttpContext.Current.Items["SearchQueryName"] != null && !string.IsNullOrEmpty(HttpContext.Current.Items["SearchQueryName"].ToString())) ? HttpContext.Current.Items["SearchQueryName"].ToString() : "ProductsSortAndFilter"; var query = queryService.LoadQuery("Products", queryName + ".query"); var productService = ServiceLocator.Current.GetProductService(); var parameters = new Dictionary<string, object> { { "groupId", groupId } }; ////Price var heighestPriceProduct = productService.GetHighestOrLowest(query, parameters, Dynamicweb.Indexing.Querying.Sorting.SortDirection.Descending, "Price"); double heighestPrice = 0.0; var currencySymbol = ""; if (heighestPriceProduct != null) { heighestPrice = Math.Ceiling(heighestPriceProduct.Price.PriceWithVAT); currencySymbol = heighestPriceProduct.Price.Currency.Symbol; } var lowestPriceProduct = productService.GetHighestOrLowest(query, parameters, Dynamicweb.Indexing.Querying.Sorting.SortDirection.Ascending, "Price"); double lowestPrice = 0.0; if (lowestPriceProduct != null) { lowestPrice = Math.Floor(lowestPriceProduct.Price.PriceWithVAT); } var currentPriceQueryString = (!string.IsNullOrWhiteSpace(HttpContext.Current.Request.QueryString.Get("pricevat"))) ? HttpContext.Current.Request.QueryString.Get("pricevat") : HttpContext.Current.Request.QueryString.Get("pricevateur"); string[] currentPriceArray = { }; if (!string.IsNullOrWhiteSpace(currentPriceQueryString)) { currentPriceArray = currentPriceQueryString.Split(','); } var currentPriceLowValue = lowestPrice; var currentPriceHighValue = heighestPrice; if (currentPriceArray.Length == 2) { var currentPriceLowQuery = currentPriceArray.FirstOrDefault(); if (!string.IsNullOrWhiteSpace(currentPriceLowQuery)) { currentPriceLowValue = Convert.ToInt32(currentPriceLowQuery); } var currentPriceHighQuery = currentPriceArray.LastOrDefault(); if (!string.IsNullOrWhiteSpace(currentPriceHighQuery)) { currentPriceHighValue = Convert.ToInt32(currentPriceHighQuery); } } ////end price //Weight var heighestWeightProduct = productService.GetHighestOrLowest(query, parameters, Dynamicweb.Indexing.Querying.Sorting.SortDirection.Descending, "WeightNotAnalyzed"); double heighestWeight = 0.0; if (heighestWeightProduct != null) { heighestWeight = Math.Ceiling(heighestWeightProduct.Weight); } var lowestWeightProduct = productService.GetHighestOrLowest(query, parameters, Dynamicweb.Indexing.Querying.Sorting.SortDirection.Ascending, "WeightNotAnalyzed"); double lowestWeight = 0.0; if (lowestWeightProduct != null) { lowestWeight = Math.Floor(lowestWeightProduct.Weight); } var currentWeightQueryString = HttpContext.Current.Request.QueryString.Get("weight"); string[] currentWeightArray = { }; if (!string.IsNullOrWhiteSpace(currentWeightQueryString)) { currentWeightArray = currentWeightQueryString.Split(','); } var currentWeightLowValue = lowestWeight; var currentWeightHighValue = heighestWeight; if (currentWeightArray.Length == 2) { var currentWeightLowQuery = currentWeightArray.FirstOrDefault(); if (!string.IsNullOrWhiteSpace(currentWeightLowQuery)) { currentWeightLowValue = Convert.ToInt32(currentWeightLowQuery); } var currentWeightHighQuery = currentWeightArray.LastOrDefault(); if (!string.IsNullOrWhiteSpace(currentWeightHighQuery)) { currentWeightHighValue = Convert.ToInt32(currentWeightHighQuery); } } var inStockChecked = !string.IsNullOrWhiteSpace(HttpContext.Current.Request.QueryString.Get("inStock")) ? "checked" : ""; var zipTogetherChecked = !string.IsNullOrWhiteSpace(HttpContext.Current.Request.QueryString.Get("ZipTogether")) ? "checked" : ""; } @SnippetStart("canonical") @if (groupViewModel != null) { <link rel="canonical" href="@groupViewModel.Canonical" /> foreach (var hrefLang in groupViewModel.HrefLangs) { <link rel="alternate" hreflang="@hrefLang.HrefLang" href="@hrefLang.Href" /> } } @SnippetEnd("canonical") @SnippetStart("languageSelector") <ul> @foreach (var languageArea in areas) { var hrefLang = (groupViewModel != null) ? groupViewModel.HrefLangs.FirstOrDefault(x => x.HrefAreaId == languageArea.ID) : null; if (hrefLang == null || hrefLang.Href.ToLower().Contains("page-not-found")) { hrefLang = new HrefLangViewModel(); hrefLang.HrefName = languageArea.Item["ShopLanguageName"].ToString() ?? string.Empty; hrefLang.HrefLang = languageArea.CultureInfo.Name; hrefLang.Href = "/Default.aspx?areaid=" + languageArea.ID; hrefLang.HrefAreaId = languageArea.ID; } if (hrefLang != null && hrefLang.HrefLang != "x-default") { <li class="country-picker__item @(hrefLang.HrefAreaId == Pageview.AreaID ? "country-picker__item--current" : string.Empty)"> <a href="@hrefLang.Href"> <svg aria-hidden="true"> <use xlink:href="@staticResourceService.AddTimeStamp("/static/dist/svg/_bundle.svg")#arrow-right"></use> </svg> <span>@hrefLang.HrefName</span> </a> </li> } } </ul> @SnippetEnd("languageSelector") @if (groupViewModel != null && groupViewModel.Hero != null) { @RenderParagraphContent(groupViewModel.Hero.ID) } @helper SortingMarkup(GroupViewModel groupViewModel, String triggerId, Boolean initModule = true) { var rawUrl = Dynamicweb.Context.Current.Request.Url; var uri = new Uri(rawUrl.ToString()); // this gets all the query string key value pairs as a collection var newQueryString = HttpUtility.ParseQueryString(uri.Query); // this removes the key if exists newQueryString.Remove("sortby"); newQueryString.Remove("sortorder"); var baseUrl = uri.GetLeftPart(UriPartial.Path); baseUrl = newQueryString.Count > 0 ? String.Format("{0}?{1}", baseUrl, newQueryString) : baseUrl; baseUrl = baseUrl.Contains("?") ? baseUrl + "&" : baseUrl + "?"; <div class="sorting" @(initModule ? "data-module=\"sorting\"" : string.Empty)> <input id="product-list-sorting-@triggerId" type="checkbox" class="trigger"> <label for="product-list-sorting-@triggerId" class="sorting__button btn"> <span class="btn__icon"> <svg role="img"><use xlink:href="@groupViewModel.StaticResourceService.AddTimeStamp("/static/dist/svg/_bundle.svg")#sorting"></use></svg> </span> <span class="btn__text"> @Translate("Sorting", "Sorting"): @if (HttpContext.Current.Request.QueryString.Get("sortby") == "Price" && HttpContext.Current.Request.QueryString.Get("sortorder") == "asc") { @Translate("PriceLowToHigh", "Price - low to high") } else if (HttpContext.Current.Request.QueryString.Get("sortby") == "Price" && HttpContext.Current.Request.QueryString.Get("sortorder") == "desc") { @Translate("PriceHighToLow", "Price - high to low") } else if (HttpContext.Current.Request.QueryString.Get("sortby") == "ProductTitle") { @Translate("Alphabetical", "Alphabetical") } else if (HttpContext.Current.Request.QueryString.Get("sortby") != null && HttpContext.Current.Request.QueryString.Get("sortby").Split(',')[0] == "StockOrder") { @Translate("Stock", "Stock") } else if (HttpContext.Current.Request.QueryString.Get("sortby") != null && HttpContext.Current.Request.QueryString.Get("sortby").Split(',')[0] == "CustomField_Bestseller") { @Translate("Bestseller", "Bestseller") } else { @Translate("Standard", "Standard") } </span> </label> <div class="sorting__options"> <ul> <li> <a href="@(baseUrl)">@Translate("Standard", "Standard")</a> </li> <li> <a href="@(baseUrl)sortby=Price&sortorder=asc">@Translate("PriceLowToHigh", "Price - low to high")</a> </li> <li> <a href="@(baseUrl)sortby=Price&sortorder=desc">@Translate("PriceHighToLow", "Price - high to low")</a> </li> <li> <a href="@(baseUrl)sortby=ProductTitle&sortorder=asc">@Translate("Alphabetical", "Alphabetical")</a> </li> <li> <a href="@(baseUrl)sortby=StockOrder&sortorder=desc&sortby=DefaultSortering&sortorder=asc">@Translate("Stock", "Stock")</a> </li> <li> <a href="@(baseUrl)sortby=CustomField_Bestseller&sortorder=desc&sortby=DefaultSortering&sortorder=asc">@Translate("Bestseller", "Bestseller")</a> </li> </ul> </div> </div> } <section class="content content--breadcrumb container-ribbon"> <div class="container"> <ol class="breadcrumb" itemscope itemtype="https://schema.org/BreadcrumbList"> @foreach (var item in groupViewModel.Breadcrumb) { if (item == groupViewModel.Breadcrumb.LastOrDefault()) { <li class="breadcrumb__item @(item == groupViewModel.Breadcrumb.LastOrDefault() ? "breadcrumb__item--current" : "")" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"> <meta itemprop="item" href="@item.Link"> <a> <span itemprop="name"> @if (breadCrumbIndex == breadCrumbTotal - 1) { @* The second to last breadcrumb item is the only one visible on mobile devices and thus the only one with this SVG *@ <svg aria-hidden="true"><use xlink:href="@groupViewModel.StaticResourceService.AddTimeStamp("/static/dist/svg/_bundle.svg")#arrow-left"></use></svg> } @item.LinkTitle </span> </a> <meta itemprop="position" content="@breadCrumbIndex"> </li> } else { <li class="breadcrumb__item @(item == groupViewModel.Breadcrumb.LastOrDefault() ? "breadcrumb__item--current" : "")" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"> <a itemprop="item" href="@item.Link"> <span itemprop="name"> @if (breadCrumbIndex == breadCrumbTotal - 1) { @* The second to last breadcrumb item is the only one visible on mobile devices and thus the only one with this SVG *@ <svg aria-hidden="true"><use xlink:href="@groupViewModel.StaticResourceService.AddTimeStamp("/static/dist/svg/_bundle.svg")#arrow-left"></use></svg> } @item.LinkTitle </span> </a> <meta itemprop="position" content="@breadCrumbIndex"> </li> } breadCrumbIndex++; } </ol> </div> </section> @if (subGroups != null) { <section class="content content--subnavigation container-ribbon"> <div class="container"> <nav class="subnavigation"> <ul> @foreach (var subGroup in subGroups) { var productsCount = groupService.GetProductsCount(subGroup); <li class="subnavigation__item @(subGroup.Id == groupId ? "subnavigation__item--active" : "")"> <a href="@urlService.GetUrl(subGroup.IdUrlEncoded)"> @subGroup.Name @(productsCount == 0 ? "" : "(" + productsCount + ")") </a> </li> } </ul> </nav> </div> </section> } @if (group != null && group.HasProducts()) { int count = 0; int ribbonIndex = 0; <section class="content content--product-list-title container-ribbon"> <div class="container"> <button type="button" class="filters-toggle"> <div> <svg role="img"><use xlink:href="@groupViewModel.StaticResourceService.AddTimeStamp("/static/dist/svg/_bundle.svg")#filters"></use></svg> </div> <span>FILTER</span> </button> @SortingMarkup(groupViewModel, "1") <div> @if (groupViewModel.Hero != null) { <div class="only-mobile"><span class="h-1" style="color:#2a3075;font-size:2em;">@group.Name</span></div> <div class="only-desktop"><span class="h-1">@group.Name</span></div> } else { <h1><span class="h-1">@group.Name</span></h1> } </div> </div> </section> foreach (var facetGroup in GetLoop("FacetGroups")) { <section class="filter filter--hidden-on-mobile content content--product-list-filters container-ribbon" data-see-more="@Translate("SeeMore", "See more")" data-total-page-count="@GetString("Ecom:ProductList.TotalPages")" data-total-number="@GetString("Ecom:ProductList.PageProdCnt")" data-group-id="@group.Id" data-module="filter"> <form> <div class="container"> <div class="filter__container"> <div class="filter__icon-container"> <span class="filter__icon"> <svg role="img"><use xlink:href="@groupViewModel.StaticResourceService.AddTimeStamp("/static/dist/svg/_bundle.svg")#filters"></use></svg> </span> </div> <div class="filter__facets"> @foreach (var facet in facetGroup.GetLoop("Facets")) { var renderType = facet.GetString("Facet.RenderType"); var optionsCount = facet.GetInteger("Facet.OptionWithResultCount"); if (optionsCount < 1 || renderType == "Range" && optionsCount < 2) { continue; } var facetMinValue = 0; var facetMaxValue = 0; List<int> facetValues = new List<int>(); var facetOptions = facet.GetLoop("FacetOptions"); if (renderType == "Range") { foreach (var facetOption in facetOptions) { var facetValue = facetOption.GetString("FacetOption.Value").Trim(); if (isStringInt(facetValue) && int.Parse(facetValue) > 0) { facetValues.Add(int.Parse(facetValue)); } } facetMinValue = facetValues.Min(); facetMaxValue = facetValues.Max(); } string facetClass = "filter__facets-container"; if (facet.GetString("Facet.QueryParameter") == "color") { facetClass = "filter__facets-container filter__facets-container--large"; } var id = 0; var faceType = (renderType == "Range") ? "filter__facet-body--slider" : string.Empty; var queryParam = facet.GetString("Facet.QueryParameter"); if (renderType == "Range" && facetMinValue < facetMaxValue || renderType != "Range") { <div class="@facetClass" data-facet-name="@facet.GetString("Facet.Name")" data-facet-queryname="@facet.GetString("Facet.QueryParameter")"> <div class="filter__facet"> <div class="filter__facet-head"> <span class="btn"> <span class="btn__icon"> <svg role="img"> <use xlink:href="@groupViewModel.StaticResourceService.AddTimeStamp("/static/dist/svg/_bundle.svg")#arrow-right"></use> </svg> </span> <span class="btn__text">@Translate(facet.GetString("Facet.Name"), facet.GetString("Facet.Name"))</span> </span> </div> <div class="filter__facet-body @faceType"> @switch (renderType) { case "Checkboxes": foreach (var facetOption in facet.GetLoop("FacetOptions")) { <div class="filter__facet-seperator"> <input type="checkbox" @(facetOption.GetBoolean("FacetOption.Selected") ? "checked" : "") name="@facet.GetString("Facet.QueryParameter")" value="@facetOption.GetString("FacetOption.Value")" id="@facet.GetString("Facet.QueryParameter")@id" /> <label for="@facet.GetString("Facet.QueryParameter")@id"> @CultureInfo.InvariantCulture.TextInfo.ToTitleCase(facetOption.GetString("FacetOption.Label").Replace("xxx", " ").Replace("vw", "VW")) @if (facet.GetString("Facet.QueryParameter") == "width" || facet.GetString("Facet.QueryParameter") == "height") { <text>cm</text> } </label> </div> id++; } break; case "Range": if (facetValues.Count > 0) { string[] facetSelectedValues = { facetMinValue.ToString(), facetMaxValue.ToString() }; if (HttpContext.Current.Request.QueryString.Get(queryParam) != null) { facetSelectedValues = HttpContext.Current.Request.QueryString.Get(queryParam).Split(','); } var facetCurrentMinValue = facetSelectedValues[0]; var facetCurrentMaxValue = facetSelectedValues[1]; <div class="filter__range" id="range-filter-@queryParam" data-range-current-min="@facetCurrentMinValue" data-range-current-max="@facetCurrentMaxValue" data-range-min="@facetMinValue" data-range-max="@facetMaxValue" data-range-unit="@Translate(queryParam + "-unit", queryParam + "-unit")" data-range-name="@queryParam"> </div> <div class="range-filter__container"> <div class="range-filter-@queryParam-min"></div> <div class="range-filter-@queryParam-max"></div> </div> <input id="@queryParam-min" hidden name="@queryParam" type="text" value="@facetCurrentMinValue" /> <input id="@queryParam-max" hidden name="@queryParam" type="text" value="@facetCurrentMaxValue" /> } break; } </div> </div> </div> } <span style="display:none;" data-test-name="@facet.GetString("Facet.Name")" data-test-type="@renderType" data-test-count="@optionsCount"></span> } @*Weight*@ @if (lowestWeight < heighestWeight) { <div class="filter__facets-container filter__facets-container--large" data-facet-name="@Translate("weight", "Weight")" data-facet-queryname="weight"> <div class="filter__facet"> <div class="filter__facet-head"> <span class="btn"> <span class="btn__icon"> <svg role="img"> <use xlink:href="@groupViewModel.StaticResourceService.AddTimeStamp("/static/dist/svg/_bundle.svg")#arrow-right"></use> </svg> </span> <span class="btn__text">@Translate("weight", "Weight")</span> </span> </div> <div class="filter__facet-body filter__facet-body--slider"> <div class="filter__range" id="range-filter-weight" data-range-current-min="@currentWeightLowValue" data-range-current-max="@currentWeightHighValue" data-range-min="@lowestWeight" data-range-max="@heighestWeight" data-range-unit="kg" data-range-name="weight"></div> <div class="range-filter__container"> <div class="range-filter-weight-min"></div> <div class="range-filter-weight-max"></div> </div> <input id="weight-min" hidden name="weight" type="text" value="@currentWeightLowValue" /> <input id="weight-max" hidden name="weight" type="text" value="@currentWeightHighValue" /> </div> </div> </div> } @*Price*@ @if (lowestPrice < heighestPrice && (valutaSelector == null || Pageview.AreaID != 1)) { <div class="filter__facets-container filter__facets-container--large" data-facet-name="@Translate("price", "Price")" data-facet-queryname="pricevat"> <div class="filter__facet"> <div class="filter__facet-head"> <span class="btn"> <span class="btn__icon"> <svg role="img"> <use xlink:href="@groupViewModel.StaticResourceService.AddTimeStamp("/static/dist/svg/_bundle.svg")#arrow-right"></use> </svg> </span> <span class="btn__text">@Translate("price", "Price")</span> </span> </div> <div class="filter__facet-body filter__facet-body--slider"> <div class="filter__range" id="range-filter-pricevat" data-range-current-min="@currentPriceLowValue" data-range-current-max="@currentPriceHighValue" data-range-min="@lowestPrice" data-range-max="@heighestPrice" data-range-unit="@currencySymbol" data-range-name="pricevat"></div> <div class="range-filter__container"> <div class="range-filter-pricevat-min"></div> <div class="range-filter-pricevat-max"></div> </div> <input id="pricevat-min" hidden name="pricevat" type="text" value="@currentPriceLowValue" /> <input id="pricevat-max" hidden name="pricevat" type="text" value="@currentPriceHighValue" /> </div> </div> </div> } @if (valutaSelector != null && Pageview.AreaID == 1) { <div class="filter__facets-container filter__facets-container--large" data-facet-name="@Translate("price", "Price")" data-facet-queryname="pricevateur"> <div class="filter__facet"> <div class="filter__facet-head"> <span class="btn"> <span class="btn__icon"> <svg role="img"> <use xlink:href="@groupViewModel.StaticResourceService.AddTimeStamp("/static/dist/svg/_bundle.svg")#arrow-right"></use> </svg> </span> <span class="btn__text">@Translate("price", "Price")</span> </span> </div> <div class="filter__facet-body filter__facet-body--slider"> <div class="filter__range" id="range-filter-pricevateur" data-range-current-min="@currentPriceLowValue" data-range-current-max="@currentPriceHighValue" data-range-min="@lowestPrice" data-range-max="@heighestPrice" data-range-unit="@currencySymbol" data-range-name="pricevateur"></div> <div class="range-filter__container"> <div class="range-filter-pricevateur-min"></div> <div class="range-filter-pricevateur-max"></div> </div> <input id="pricevateur-min" hidden name="pricevateur" type="text" value="@currentPriceLowValue" /> <input id="pricevateur-max" hidden name="pricevateur" type="text" value="@currentPriceHighValue" /> </div> </div> </div> } @*end price*@ @foreach (var facet in facetGroup.GetLoop("Facets")) { var CurrentFacetName = facet.GetString("Facet.Name"); var hasZipTogetherProduct = 0; foreach (var product in GetLoop("Products")) { if(hasZipTogetherProduct == 1) { continue; } hasZipTogetherProduct = product.GetInteger("Ecom:Product:Field.ZipTogether"); } if (CurrentFacetName == "ZipTogether" && hasZipTogetherProduct > 0) { <div class="filter__facets-container" data-facet-name="Zip together" data-facet-queryname="ZipTogether"> <div class="filter__facet"> <div class="filter__facet-head"> <span class="btn"> <span class="btn__icon"> <svg role="img"> <use xlink:href="/static/dist/svg/_bundle.svg?ts=636712203520010628#arrow-right"></use> </svg> </span> <span class="btn__text"> @Translate("ZipTogether", "Zip together") </span> </span> </div> <div class="filter__facet-body"> <div class="filter__facet-seperator"> <input type="checkbox" name="ZipTogether" @zipTogetherChecked value="1" id="ZipTogether" /> <label for="ZipTogether"> @Translate("True", "True") </label> </div> </div> </div> </div> } } @*instock*@ <div class="filter__facets-container" data-facet-name="In Stock" data-facet-queryname="inStock"> <div class="filter__facet"> <div class="filter__facet-head"> <span class="btn"> <span class="btn__icon"> <svg role="img"> <use xlink:href="/static/dist/svg/_bundle.svg?ts=636712203520010628#arrow-right"></use> </svg> </span> <span class="btn__text"> @Translate("InStock", "In Stock") </span> </span> </div> <div class="filter__facet-body"> <div class="filter__facet-seperator"> <input type="checkbox" name="inStock" @inStockChecked value="true" id="inStock" /> <label for="inStock"> @Translate("True", "True") </label> </div> </div> </div> </div> @*end instock*@ </div> <div class="filter__filter-container"> <button type="button" class="filter__list-item filter__filter-reset filter__filter-reset--hidden"> <span>@Translate("FilterResetAll", "Reset all")</span> </button> <button class="btn btn--filled"> <span class="btn__text">@Translate("Filter", "Filter")</span> </button> </div> @SortingMarkup(groupViewModel, "2", false) </div> <div class="filter__list-container hidden"> <div class="filter__list"></div> <button type="button" class="filter__list-item filter__filter-reset"> <span> <svg role="img"> <use xmlns:xlink="https://www.w3.org/1999/xlink" xlink:href="/static/dist/svg/_bundle.svg#close"></use> </svg> </span> <span>@Translate("FilterResetAll", "Reset all")</span> </button> </div> </div> @if (!String.IsNullOrEmpty(HttpContext.Current.Request.QueryString.Get("sortby"))) { <input name="sortby" type="hidden" value="@HttpContext.Current.Request.QueryString.Get("sortby")"> } @if (!String.IsNullOrEmpty(HttpContext.Current.Request.QueryString.Get("sortorder"))) { <input name="sortorder" type="hidden" value="@HttpContext.Current.Request.QueryString.Get("sortorder")"> } </form> </section> } <section class="content content--body" data-module="product-list"> <div class="product-item-wrapper container-ribbon"> <div class="container"> <section class="product-container"> @foreach (var p in GetLoop("Products")) { if (groupViewModel.HeroProduct != null && p.GetString("Ecom:Product.ID") == groupViewModel.HeroProduct.Id) { // Skip if this is the chosen hero product continue; } if (groupViewModel.IsFiltered == false && count % 6 == 0 && count > 0) { if (count == 6 && groupViewModel.HeroProduct != null) { //Show hero @RenderHeroProduct(groupViewModel.HeroProduct, groupViewModel, true, area) } else if (count == 6 && groupViewModel.FeaturedRibbonIds.Count > ribbonIndex) { @endSection //Show embedded content @RenderParagraphContent(groupViewModel.FeaturedRibbonIds[ribbonIndex]) ribbonIndex++; @beginSection } else if (count > 0 && groupViewModel.FeaturedRibbonIds.Count > ribbonIndex) { @endSection //Show embedded content @RenderParagraphContent(groupViewModel.FeaturedRibbonIds[ribbonIndex]) ribbonIndex++; @beginSection } } count++; @RenderProduct(p, groupViewModel, false, area, contextCart) } @if (groupViewModel.IsFiltered == false && groupViewModel.FeaturedRibbonIds != null && groupViewModel.FeaturedRibbonIds.Count > ribbonIndex) { @endSection //Render any remaining ribbons on product page for (int i = ribbonIndex; i < groupViewModel.FeaturedRibbonIds.Count; i++) { @RenderParagraphContent(groupViewModel.FeaturedRibbonIds[i]) } @beginSection } </section> <div class="search-results__button"> <span class="btn"> <span class="btn__text">@Translate("LoadMore", "Load More")</span> </span> </div> </div> </div> @if (groupViewModel.SEOIds != null) { //Render any remaining ribbons on product page for (int i = 0; i < groupViewModel.SEOIds.Count; i++) { @RenderParagraphContent(groupViewModel.SEOIds[i]) } } </section> } @if (groupViewModel.HtmlPopup != null) { @RenderParagraphContent(groupViewModel.HtmlPopup.ID) } @helper RenderProduct(LoopItem product, GroupViewModel groupViewModel, bool isHero, Area area, Order contextCart) { var imageService = ServiceLocator.Current.GetImageService(); var productResourceService = ServiceLocator.Current.GetProductResourceService(); var productClass = isHero ? "product-item--hero" : "product-item--flex"; var productUrl = (HttpContext.Current.Items["PrimaryGroupId"] != null && !string.IsNullOrEmpty(HttpContext.Current.Items["PrimaryGroupId"].ToString()) && HttpContext.Current.Items["PrimaryGroupId"].ToString() == groupViewModel.Id) ? "/" + area.Item["SettingsShopId"] + "&GroupId=" + product.GetString("Ecom:Product.PrimaryOrFirstGroupID") + "&ProductId=" + product.GetString("Ecom:Product.ID") : groupViewModel.UrlService.GetUrl(groupViewModel.Id, product.GetString("Ecom:Product.ID")); <article itemscope itemtype="https://schema.org/Product" class="product-item @productClass"> @if (!string.IsNullOrWhiteSpace(product.GetString("Ecom:Product:Field.EnergyArrow")) && !string.IsNullOrWhiteSpace(@product.GetString("Ecom:Product:Field.Image401"))) { var energyArrowImagePath = productResourceService.Get(product.GetString("Ecom:Product:Field.EnergyArrow"), FileFormat.Jpeg); var energyArrowImage = imageService.Begin(energyArrowImagePath); var energyArrowImageSrc = energyArrowImage.SetHeight(64).SetCrop(CropType.KeepAspectRatio).SetCompression(80).GetCrop(); var Image079Path = productResourceService.Get(product.GetString("Ecom:Product:Field.Image079"), FileFormat.Jpeg); var Image079Image = imageService.Begin(Image079Path); var Image079Image2 = "/Admin/Public/GetImage.ashx?Image=/" + Image079Path + "&height=420&Crop=5&Compression=80"; Image079Image2.ToString().Replace("pdf", "jpg"); var datasheetLinkPath = productResourceService.Get(product.GetString("Ecom:Product:Field.Image401"), FileFormat.Pdf); var datasheetLink = imageService.Begin(datasheetLinkPath); <div class="energyarrow energyarrow-right" data-module="energyarrow"> <img src="@energyArrowImageSrc.ToString().Replace(".jpg", ".png")" class="@(Image079Image != null ? "energyarrow__show" : "")" alt=""> <div loading="lazy" class="energyarrow__info" style="height:420px;width:215px;"> <div class="energyarrow__info__close">x</div> @if (Image079Image != null) { <img loading="lazy" src="@Image079Image2" style="height:380px;">} </div> </div> <div class="datasheet_link datasheet_link-right"> <a href="@datasheetLinkPath" target="_blank">@Translate("Datasheet", "Datasheet")</a> </div> } <a itemprop="url" href="@productUrl"> <div class="product-item__header"> @if (!string.IsNullOrEmpty(product.GetString("Ecom:Product:Field.OutletcampingSplash"))) { var statustext = product.GetString("Ecom:Product:Field.OutletcampingSplash"); <div class="product-item__labelstatus"> @if (statustext.Length > 9) { <div class="product-item__labelstatus-2"> <span>@statustext</span> </div> } @if (statustext.Length == 9) { <div class="product-item__labelstatus-6"> <span>@statustext</span> </div> } @if (statustext.Length > 6 && statustext.Length <= 8) { <div class="product-item__labelstatus-3"> <span>@statustext</span> </div> } @if (statustext.Length >= 4 && statustext.Length <= 6) { <div class="product-item__labelstatus-4"> <span>@statustext</span> </div> } @if (statustext.Length < 4) { <div class="product-item__labelstatus-5"> <span>@statustext</span> </div> } </div> } @{ var imagePath = productResourceService.Get(product.GetString("Ecom:Product:Field.Image001"), FileFormat.Jpeg); var img = imageService.Begin(imagePath); var imgSrc = img.SetWidth(800).SetHeight(800).SetCrop(CropType.KeepAspectRatio).SetCompression(80).GetCrop(); var imgClass = ""; if (Pageview.Device == 0 && product.GetString("Ecom:Product:Field.Image062") != "") { var imageHoverPath = productResourceService.Get(product.GetString("Ecom:Product:Field.Image062"), FileFormat.Jpeg); var imgHover = imageService.Begin(imageHoverPath); var imgHoverSrc = imgHover.SetWidth(800).SetHeight(800).SetCrop(CropType.KeepAspectRatio).SetCompression(80).GetCrop(); imgClass = "orig"; <figure class="lazy hover" data-src-sm="@imgHoverSrc" data-alt="Outwell @product.GetString("Ecom:Product.Name")"> <noscript><img src="@imgHoverSrc" itemprop="image" content="@imgHoverSrc" alt="Outwell @product.GetString("Ecom:Product.Name")"></noscript> </figure> } } <figure class="lazy @imgClass" data-src-sm="@imgSrc" data-alt="Outwell @product.GetString("Ecom:Product.Name")"> <noscript><img src="@imgSrc" itemprop="image" content="@imgSrc" alt="Outwell @product.GetString("Ecom:Product.Name")"></noscript> </figure> <div class="product-item__collection"> @{ var collectionImagePath = productResourceService.Get(product.GetString("Ecom:Product:Field.CollectionLogo"), FileFormat.Jpeg); collectionImagePath = collectionImagePath.ToString().Replace(".jpg", ".png"); var collectionImg = imageService.Begin(collectionImagePath); var collectionImgSrc = collectionImg.SetWidth(800).SetHeight(800).SetCrop(CropType.KeepAspectRatio).SetCompression(80).GetCrop(); } @if (!string.IsNullOrEmpty(product.GetString("Ecom:Product:Field.CollectionLogo"))) { <figure class="lazy" data-src-sm="@collectionImgSrc" data-alt="Outwell @product.GetString("Ecom:Product.Name")"> <noscript><img src="@collectionImgSrc" itemprop="image" content="@collectionImgSrc" alt="Outwell @product.GetString("Ecom:Product.Name")"></noscript> </figure> } </div> @if (!string.IsNullOrEmpty(product.GetString("Ecom:Product:Field.LabelText"))) { var splashcolor = "#b3c500;"; if (!string.IsNullOrEmpty(product.GetString("Ecom:Product:Field.LabelColor"))) { splashcolor = product.GetString("Ecom:Product:Field.LabelColor"); } <div class="product-item__label" style="background:@splashcolor"> <p>@product.GetString("Ecom:Product:Field.LabelText")</p> </div> } </div> <div class="product-item__body"> <div class="product-item__headline"> <span class="h-2" itemprop="name">@product.GetString("Ecom:Product.Name")</span> </div> <meta itemprop="sku" content="@product.GetString("Ecom:Product.Number")" /> <meta itemprop="gtin" content="@product.GetString("Ecom:Product:Field.BarcodeColourBox")" /> <div itemprop="brand" itemtype="https://schema.org/Brand" itemscope> <meta itemprop="name" content="Outwell" /> </div> <div class="product-item__information" itemprop="description"> @{ var ProductDescription = ""; if (!string.IsNullOrEmpty(product.GetString("Ecom:Product.LongDescription"))) { ProductDescription = product.GetString("Ecom:Product.LongDescription"); } else { if (!string.IsNullOrEmpty(product.GetString("Ecom:Product.ShortDescription"))) { ProductDescription = product.GetString("Ecom:Product.ShortDescription"); } } if (!string.IsNullOrWhiteSpace(ProductDescription) && ProductDescription.Length > 80) { ProductDescription = ProductDescription.Substring(0, 80) + "..."; } } @ProductDescription </div> <div class="product-item__bulletpoints"> <ul> @if (!string.IsNullOrWhiteSpace(product.GetString("Ecom:Product:Field.Bullet1"))) { <li>@product.GetString("Ecom:Product:Field.Bullet1")</li> } @if (!string.IsNullOrWhiteSpace(product.GetString("Ecom:Product:Field.Feature1"))) { <li>@product.GetString("Ecom:Product:Field.Feature1")</li> } @if (!string.IsNullOrWhiteSpace(product.GetString("Ecom:Product:Field.Feature2"))) { <li>@product.GetString("Ecom:Product:Field.Feature2")</li> } @if (!string.IsNullOrWhiteSpace(product.GetString("Ecom:Product:Field.Feature3"))) { <li>@product.GetString("Ecom:Product:Field.Feature3")</li> } </ul> </div> @{ var productIsPreorder = false; var availableAgain = product.GetString("Ecom:Product:Field.AvailableAgain"); availableAgain = string.IsNullOrWhiteSpace(availableAgain) ? "1900-01-01" : availableAgain; DateTime availableAgainDateOut; if (DateTime.TryParse(Convert.ToDateTime(availableAgain).ToString(), out availableAgainDateOut)) { availableAgain = Convert.ToDateTime(availableAgain).ToString("dd/MM/yy"); string minDate = Convert.ToDateTime("1900-01-01").ToString("dd/MM/yy"); productIsPreorder = availableAgain.Equals(minDate) ? false : true; } } @if (product.GetDouble("Ecom:Product.Stock") > 0 && !productIsPreorder) { <div class="product__availability product__availability--instock"> @Translate("InStock", "In stock") </div> } else if (productIsPreorder) { <div class="product__availability product__availability--instock"> @Translate("Preorder", "Preorder") </div> } else { <div class="product__availability"> @Translate("SoldOut", "Sold out") </div> } <div class="product-item__RRPPrice" itemprop="offers" itemtype="https://schema.org/AggregateOffer" itemscope> @if (!string.IsNullOrEmpty(@product.GetString("Ecom:Product.Price.Price"))) { <span content="@product.GetString("Ecom:Product.Price.Currency.Symbol")"> @product.GetString("Ecom:Product.Price.Currency.Symbol") &nbsp; </span> <span content="@product.GetDouble("Ecom:Product.Price.PriceWithVAT.Value").ToString("F", new CultureInfo("en-GB"))"> @product.GetString("Ecom:Product.Price.Price") </span> if (@product.GetDouble("Ecom:Product.Price.PriceWithVAT.Value").ToString("F", new CultureInfo("en-GB")) != @product.GetDouble("Ecom:Product:Field.PriceBefore").ToString("F", new CultureInfo("en-GB"))) { <p>@Translate("RRP", "RRP") : @product.GetString("Ecom:Product.Price.Currency.Symbol") @product.GetString("Ecom:Product:Field.PriceBefore")</p> } <meta itemprop="lowPrice" content="@product.GetDouble("Ecom:Product.Price.PriceWithVAT.Value").ToString("F", new CultureInfo("en-GB"))" /> <meta itemprop="priceCurrency" content="@product.GetString("Ecom:Product.Price.Currency")" /> } </div> @{ var productId = product.GetString("Ecom:Product.ID"); var productName = product.GetString("Ecom:Product.Name"); var productNumber = product.GetString("Ecom:Product.Number"); var productCurrency = product.GetString("Ecom:Product.Currency"); var productUnformatedPrice = product.GetDouble("Ecom:Product.Price.PriceWithVAT.Value").ToString("F", new CultureInfo("en-GB")); var productVariants = product.GetString("Ecom:Product:Field.VariantNumbers.Value.Clean"); var productStock = product.GetDouble("Ecom:Product.Stock"); var productCartCmd = "CartCmd" + productId; var productKey = "Key" + productId; var productOrderContext = "OrderContext" + productId; var productRedirect = "Redirect" + productId; OrderLine productOrderLine = null; if (contextCart != null) { foreach (var orderline in contextCart.OrderLines) { if (orderline.ProductId == productId) { productOrderLine = orderline; } } } var productCartContext = ""; object cartContextObj = null; if (area.Item.TryGetValue("CartContext", ref cartContextObj)) { string cartContext = cartContextObj.ToString(); if (!string.IsNullOrWhiteSpace(cartContext)) { productCartContext = cartContext; } } if (productStock > 0 && string.IsNullOrEmpty(productVariants)) { <div class="product-item__quickbuy"> <div class="product__button"> <form method="get" data-id="@productId" data-number="@productNumber" data-name="@productName.Replace("\"", "\'")" data-quantity="1" data-price="@productUnformatedPrice" data-currency="@productCurrency" data-brand="@product.GetString("Ecom:Product:Field.BrandName")" data-url="@productUrl"> <input type="hidden" name="CartCmd" id="@productCartCmd" value="@(productOrderLine != null && string.IsNullOrEmpty(productVariants) ? "incorderline" : "add")" /> <input type="hidden" name="Key" id="@productKey" value="@(productOrderLine != null ? productOrderLine.Id : "")" @(productOrderLine != null && string.IsNullOrEmpty(productVariants) ? "" : "disabled") /> <input type="hidden" name="OrderContext" id="@productOrderContext" value="@productCartContext" /> <input type="hidden" name="Redirect" id="@productRedirect" value="/WebServices/MiniCart.ashx?productId=@productId&[email protected]" disabled /> <input class="form-control" autocomplete="off" type="text" name="name" placeholder="Your name here"> <input class="form-control" autocomplete="off" type="text" name="phone" placeholder="Your phone here"> <input class="form-control" autocomplete="off" type="text" name="email" placeholder="Your email here"> <button type="submit" class="btn btn--big @(!string.IsNullOrEmpty(productVariants) ? "btn--disabled" : "")" @(productStock > 0 ? "" : "disabled") data-added-msg="@(Translate("AddedToCart", "Added to cart"))"> <span class="btn__icon"> <img src="/static/dist/img/outwell/quickbuy-icon.png" alt="" /> </span> </button> </form> </div> </div> } } </div> </a> @if (isHero && groupViewModel.HeroImage != null) { <figure> <img src="@groupViewModel.HeroImage.SetWidth(800).SetHeight(400).SetCrop(CropType.KeepAspectRatio).SetCompression(80).GetCrop()" /> </figure> } <div class="product-item__favorite" data-module="cookiefavorite"> <svg class="heart" viewBox="-2 -2 35 35" data-product="@product.GetString("Ecom:Product.Number")"> <path class="heartfill" style="fill: #ffffff; stroke: #646464; stroke-width: 2px;" d="M23.6,0c-3.4,0-6.3,2.7-7.6,5.6C14.7,2.7,11.8,0,8.4,0C3.8,0,0,3.8,0,8.4c0,9.4,9.5,11.9,16,21.2 c6.1-9.3,16-12.1,16-21.2C32,3.8,28.2,0,23.6,0z" /> </svg> </div> </article> } @helper RenderHeroProduct(ProductViewModel productViewModel, GroupViewModel groupViewModel, bool isHero, Area area) { var productClass = isHero ? "product-item--hero" : "product-item--flex"; var productUrl = (HttpContext.Current.Items["PrimaryGroupId"] != null && !string.IsNullOrEmpty(HttpContext.Current.Items["PrimaryGroupId"].ToString()) && HttpContext.Current.Items["PrimaryGroupId"].ToString() == groupViewModel.Id) ? "/" + area.Item["SettingsShopId"] + "&GroupId=" + productViewModel.PrimaryGroupId + "&ProductId=" + productViewModel.Id : groupViewModel.UrlService.GetUrl(groupViewModel.Id, productViewModel.Id); <article itemscope itemtype="https://schema.org/Product" class="product-item @productClass"> <a itemprop="url" href="@productUrl"> <div class="product-item__header"> <figure> <img src="@productViewModel.MainImage.SetWidth(800).SetHeight(800).SetCrop(CropType.KeepAspectRatio).SetCompression(80).GetCrop()" itemprop="image" content="@productViewModel.MainImage.SetWidth(800).SetHeight(800).SetCrop(CropType.KeepAspectRatio).SetCompression(80).GetCrop()" alt=""> </figure> @if (!string.IsNullOrEmpty(productViewModel.OutletcampingSplash)) { <div class="product_splash_discount__right"> <div class="product_splash_discount__text"> <p> <span>%</span> </p> </div> </div> } @if (productViewModel.Image090 != null) { <div class="product-item__splash-image"> <img src="@productViewModel.Image090.SetWidth(200).SetCrop(CropType.KeepAspectRatio).SetCompression(80).GetCrop()" alt=""> </div> } @if (string.IsNullOrEmpty(productViewModel.OutletcampingSplash) && !string.IsNullOrEmpty(productViewModel.OverlayText) && !string.IsNullOrEmpty(productViewModel.OverlayColor)) { <div class="product-item__splash [email protected]"> <div class="product-item__splash-icon"> <svg role="img"><use xlink:href="@groupViewModel.StaticResourceService.AddTimeStamp("/static/dist/svg/_bundle.svg")#badge"></use></svg> </div> <div class="product-item__splash-text"> <p>@productViewModel.OverlayText</p> </div> </div> } @if (!string.IsNullOrEmpty(productViewModel.LabelText) && !string.IsNullOrEmpty(productViewModel.LabelColor)) { <div class="product-item__label" style="background: @productViewModel.LabelColor"> <p>@productViewModel.LabelText</p> </div> } <span class="product-item__icon"> <svg xmlns="https://www.w3.org/2000/svg" viewBox="-5544.012 -17926.258 390.012 31.609"> <path d="M84.073,1640.55s-4.707-4.8-8.058-8.031C73.4,1630,71.742,1630,70.611,1630h-317.1l0-3h-.008v-4.029l332.438-.015c1.117,0,2.756,0,5.341-2.49,3.312-3.194,7.966-7.94,7.966-7.94s1.663-1.82,2.638-1.781,1.5.538,2.745,1.781l7.941,7.94s1.788,2.49,6.359,2.49H143.5v3.572h.006V1630H103.982c-4.624,0-6.433,2.519-6.433,2.519l-8.032,8.031c-1.257,1.257-1.79,1.762-2.776,1.8h-.032C85.719,1642.351,84.073,1640.55,84.073,1640.55Z" transform="translate(-5297.509 -19536.999)" /> </svg> </span> </div> <div class="product-item__body"> <div class="product-item__headline"> <h1 itemprop="name">@productViewModel.Name</h1> </div> <div class="product-item__information" itemprop="description"> @if (!string.IsNullOrEmpty(productViewModel.LongDescription)) { @productViewModel.LongDescription } else { if (!string.IsNullOrEmpty(productViewModel.ShortDescription)) { @productViewModel.ShortDescription } } </div> @if (!string.IsNullOrEmpty(@productViewModel.Price)) { <div itemprop="offers" itemscope itemtype="https://schema.org/Offer" class="product-item__price"> <div class="price"><span itemprop="priceCurrency" content="@productViewModel.Currency">@productViewModel.CurrencySymbol</span> <span itemprop="price" content="@productViewModel.UnformatedPrice">@productViewModel.Price</span></div> @if (!string.IsNullOrEmpty(productViewModel.BeforePrice)) { <div class="if-discount"><span>@Translate("Before", "Used to be") @productViewModel.CurrencySymbol @productViewModel.BeforePrice</span></div> } </div> } <div class="product-item__button"> <span class="btn"> @if (Pageview.AreaID != 2) { <span class="btn__icon"> <svg role="img"> <use xlink:href="@groupViewModel.StaticResourceService.AddTimeStamp("/static/dist/svg/_bundle.svg")#cart"></use> </svg> </span> } <span class="btn__text">@Translate("SeeMore", "See more")</span> </span> </div> </div> </a> @if (isHero && groupViewModel.HeroImage != null) { <figure> <img src="@groupViewModel.HeroImage.SetWidth(800).SetHeight(400).SetCrop(CropType.KeepAspectRatio).SetCompression(80).GetCrop()" /> </figure> } </article> } @SnippetStart("jarvis") @{ var raptorArea = PageView.Current().Area; var settingsRaptorApiKey = PageView.Current().Area.Item["SettingsRaptorApiKey"]; } @if (settingsRaptorApiKey != null) { if (PageView.Current().Device == Dynamicweb.Frontend.Devices.DeviceType.Desktop && !string.IsNullOrEmpty(settingsRaptorApiKey.ToString())) { var jarvis = (HttpContext.Current.Request.Cookies["jarvis"] != null) ? HttpContext.Current.Request.Cookies["jarvis"].Value : "1"; var jarvisBoxStatus = (jarvis == "1") ? "jarvis--open" : string.Empty; var jarvisBtnStatus = (jarvis == "1") ? "" : "jarvis-btn--open"; var raptorAreaId = raptorArea.ID; var raptorBrandId = (raptorArea.Item["SettingsRaptorUserId"] != null) ? raptorArea.Item["SettingsRaptorUserId"].ToString() : string.Empty; var raptorCookieId = (HttpContext.Current.Request.Cookies[raptorBrandId + "rsa"] != null) ? HttpContext.Current.Request.Cookies[raptorBrandId + "rsa"].Value : ""; var raptorContent1 = groupViewModel.JarvisHistory; var raptorContent2 = groupViewModel.JarvisTopCategory; var settingsShopId = raptorArea.Item["SettingsShopId"].ToString(); var ecomPageId = urlParserService.GetPageId(settingsShopId); if (!string.IsNullOrEmpty(raptorCookieId)) { <div data-module="jarvis"> <div class="jarvis @jarvisBoxStatus"> <div class="jarvis__header"> <span class="your">@Translate("Your", "Your")</span> <span class="guide">@Translate("Guide", "Guide")</span> <span class="logo"></span> </div> <div class="jarvis__guide"> <button class="jarvis__close"><span class="round"><svg viewBox="0 0 100 100"><path d="M 10,50 L 60,100 L 70,90 L 30,50 L 70,10 L 60,0 Z" class="arrow"></path></svg></span> @Translate("Hide the wizard", "Hide the wizard")</button> <div class="jarvis__text"> <p> @Translate("The guide follows you around and finds new recommendations based on what you're looking at.", "The guide follows you around and finds new recommendations based on what you're looking at.") </p> </div> </div> <div id="GetTopViewedInCategory" class="jarvis__alternatives"> <section class="featured-products container-ribbon ribbon"> <h3>@Translate("Most seen in this category", "Most seen in this category")</h3> <div class="featured-products__container" data-url="/webservices/jarvis.ashx?areaId=@raptorAreaId&raptorFunction=GetTopViewedInCategory&raptorCategoryId=@groupId"> @foreach (var raptorProduct in raptorContent2) { var raptorProductView = productViewModelService.GetViewModel(raptorProduct); if (raptorProductView.MainImage != null) { raptorProductView.RaptorImage = raptorProductView.MainImage.SetWidth(500).SetHeight(300).SetCrop(CropType.KeepAspectRatio).SetCompression(50).GetCrop(); } raptorProductView.RaptorUrl = urlService.GetUrl(raptorProductView.GroupId, raptorProductView.Id, ecomPageId.GetValueOrDefault()); <article itemscope itemtype="https://schema.org/Product\" class="product-item"> <a itemprop="url" href="@raptorProductView.RaptorUrl" data-raptorrecommendation="productId:@raptorProductView.ProductNumber"> <div class="product-item__header"> <figure> <img src="@raptorProductView.RaptorImage" itemprop="image" content="OaseOutdoors.Services.ImageService.ImageService" alt="@raptorProductView.Name"> </figure> </div> <div class="product-item__body"> <div class="product-item__headline"> <h3 itemprop="name" class="h-1">@raptorProductView.Name</h3> </div> <div itemprop="offers" itemscope itemtype="https://schema.org/Offer" class="product-item__price"> <div class="price"><span itemprop=\"priceCurrency\" content="@raptorProductView.Currency">@raptorProductView.CurrencySymbol</span> <span itemprop="price" content="@raptorProductView.UnformatedPrice">@raptorProductView.Price</span></div> </div> </div> </a> </article> } </div> </section> </div> <div id="GetCookieHistory" class="jarvis__suggest"> <section class="featured-products container-ribbon ribbon"> <h3>@Translate("You have previously looked at", "You have previously looked at")</h3> <div class="featured-products__container" data-url="/webservices/jarvis.ashx?areaId=@raptorAreaId&raptorFunction=GetCookieHistory"> @foreach (var raptorProduct in raptorContent1) { var raptorProductView = productViewModelService.GetViewModel(raptorProduct); if (raptorProductView.MainImage != null) { raptorProductView.RaptorImage = raptorProductView.MainImage.SetWidth(500).SetHeight(300).SetCrop(CropType.KeepAspectRatio).SetCompression(50).GetCrop(); } raptorProductView.RaptorUrl = urlService.GetUrl(raptorProductView.GroupId, raptorProductView.Id, ecomPageId.GetValueOrDefault()); <article itemscope itemtype="https://schema.org/Product\" class="product-item"> <a itemprop="url" href="@raptorProductView.RaptorUrl" data-raptorrecommendation="productId:@raptorProductView.ProductNumber"> <div class="product-item__header"> <figure> <img src="@raptorProductView.RaptorImage" itemprop="image" content="OaseOutdoors.Services.ImageService.ImageService" alt="@raptorProductView.Name"> </figure> </div> <div class="product-item__body"> <div class="product-item__headline"> <h3 itemprop="name" class="h-1">@raptorProductView.Name</h3> </div> <div itemprop="offers" itemscope itemtype="https://schema.org/Offer" class="product-item__price"> <div class="price"><span itemprop=\"priceCurrency\" content="@raptorProductView.Currency">@raptorProductView.CurrencySymbol</span> <span itemprop="price" content="@raptorProductView.UnformatedPrice">@raptorProductView.Price</span></div> </div> </div> </a> </article> } </div> </section> </div> </div> <div class="jarvis-btn @jarvisBtnStatus"> <img src="/static/dist/img/jarvis/jarvis-small.png"> </div> </div> } } } @SnippetEnd("jarvis") @*relewise tag for tracking*@ <div class="relewise-category-page" data-relewise-id="@groupId" data-relewise-user="@VisitorCookie.Current.VisitorID" data-relewise-language="@Pageview.Area.Culture" data-relewise-currency="@Pageview.Area.EcomCurrencyId" data-relewise-dataid="@Pageview.Area.Item["RelewiseDataId"]" data-relewise-apikey="@Pageview.Area.Item["RelewiseApiKey"]" data-relewise-serverurl="@Pageview.Area.Item["RelewiseServerUrl"]"></div> @functions { public bool isStringInt(String s) { try { int.Parse(s); return true; } catch (FormatException ex) { return false; } } }
OSZAR »