BESTELLEN SIE VOR 13 UHR UND WIR WERDEN HEUTE ABSENDEN (WERKTAGE)

BESTELLEN SIE VOR 13 UHR UND WIR WERDEN HEUTE ABSENDEN (WERKTAGE)

MENU
0
Exception in template (Designs\Outwell\eCom/Product/Product.cshtml): System.Data.SqlClient.SqlException (0x80131904): Transaction (Process ID 64) 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.ProductRepository.GetBySql(String query, Boolean doRefactoring, Boolean bulkFill, Boolean useAssortments)
   at Dynamicweb.Ecommerce.Products.Product.GetProductsBySql(String query)
   at OaseOutdoors.Components.Shared.Modules.Ecom.ModelBuilders.ProductViewModelBuilder.GetViewModel(Product entity) in C:\projects\oase\src\Components\Shared\Modules\eCom\ModelBuilders\ProductViewModelBuilder.cs:line 425
   at CompiledRazorTemplates.Dynamic.afdcbbadcaeca.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:7db165ef-4fbf-4665-b8e2-792a18728954
Error Number:1205,State:51,Class:13
@inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> @using System @using System.Globalization @using System.Collections @using System.Collections.Generic @using System.Linq @using System.Web @using System.Web.Script.Serialization @using System.Net @using Dynamicweb.Ecommerce.Products @using Dynamicweb.Extensibility @using Dynamicweb.Frontend @using Dynamicweb.Content @using Dynamicweb.Data @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.ImageService.Enums @using OaseOutdoors.Services.StaticResourceService.Initialization @using OaseOutdoors.Services.UrlParserService.Initialization; @using OaseOutdoors.Services.UrlParserService.Interfaces; @{ var headStaticResourceService = ServiceLocator.Current.GetStaticResourceService(); string productId = GetString("Ecom:Product.ID"); string productNumber = GetString("Ecom:Product.Number"); string variantId = GetString("Ecom:Product.VariantID"); string languageId = GetString("Ecom:Product.LanguageID"); string groupId = GetString("Ecom:Group.ID"); var product = Product.GetProductById(productId, variantId, languageId); var viewModelService = new ProductViewModelBuilder(); var viewModel = viewModelService.GetViewModel(product); var staticResourceService = ServiceLocator.Current.GetStaticResourceService(); var urlService = ServiceLocator.Current.GetEcomUrlService(); var urlParserService = ServiceLocator.Current.GetUrlParserService(); int breadCrumbTotal = viewModel.Breadcrumb.Count; int breadCrumbIndex = 1; var valutaSelector = HttpContext.Current.Request.Cookies["currencySelector"]; 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 group = (Group.GetGroupById(groupId)) ?? Group.GetGroupById(viewModel.GroupId); string specBlackList = Pageview.Area.Item["ProductSpecBlacklist"] != null ? Pageview.Area.Item["ProductSpecBlacklist"].ToString() : ""; //Pageview.Page.MetaTitle = viewModel.PageTitle; //Pageview.Page.Description = viewModel.PageMetaDescription; //Pageview.Page.MetaCanonical = viewModel.PageCanonical; // PageLog OasePageLog.SetPageLog(productNumber); } @SnippetStart("canonical") <link rel="canonical" href="@viewModel.Canonical" /> @foreach (var hrefLang in viewModel.HrefLangs) { if (!hrefLang.Href.ToLower().Contains("page-not-found")) { <link rel="alternate" hreflang="@hrefLang.HrefLang" href="@hrefLang.Href" /> } } @SnippetEnd("canonical") @SnippetStart("languageSelector") <ul> @foreach (var languageArea in areas) { var hrefLang = viewModel.HrefLangs.FirstOrDefault(x => x.HrefAreaId == languageArea.ID); 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.HrefAreaId == 5) { hrefLang.Href = "https://www.outwell.com/da-dk"; } if (hrefLang.HrefAreaId == 6) { hrefLang.Href = "https://www.outwell.com/de-de"; } if (hrefLang.HrefAreaId == 2) { hrefLang.Href = "https://www.outwell.com/fr-fr"; } if (hrefLang.HrefAreaId == 3) { hrefLang.Href = "https://www.outwell.com/nl-nl"; } if (hrefLang.HrefAreaId == 4) { hrefLang.Href = "https://www.outwell.com/sv-se"; } if (hrefLang.HrefAreaId == 31) { hrefLang.Href = "https://www.outwell.com/en-gb-1"; } if (hrefLang.HrefAreaId == 1) { hrefLang.Href = "https://www.outwell.com/en-gb"; } } 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") <section class="content content--breadcrumb container-ribbon"> <div class="container"> <ol class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList"> @foreach (var item in viewModel.Breadcrumb) { <li class="breadcrumb__item @(item == viewModel.Breadcrumb.LastOrDefault() ? "breadcrumb__item--current" : "")" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"> @if (item == viewModel.Breadcrumb.LastOrDefault()) { <a itemprop="item"> <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="@staticResourceService.AddTimeStamp("/static/dist/svg/_bundle.svg")#arrow-left"></use></svg> } @item.LinkTitle </span> </a> } else { <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="@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> <section class="content content--body"> @* OVERLAY IMAGES Er ikke med i det godkendte design, og er derfor udkommenteret her Skal de med igen, skal vi lige vide, hvor og hvordan @if (viewModel.OverlayImages.Count > 0) { <ul> @foreach (var image in viewModel.OverlayImages) { <li><img src="@image" width="100"/></li> } </ul> } *@ <section class="container-fluid"> <article class="container product" itemscope itemtype="http://schema.org/Product" data-module="product"> <div class="mobile-slider"> @if (!string.IsNullOrEmpty(viewModel.OutletcampingSplash)) { var statustext = viewModel.OutletcampingSplash; <div class="product-item__labelstatusRibbon" style="margin-top:0px;z-index:10000;"> @if (statustext.Length > 9) { <div class="product-item__labelstatus-2Ribbon"> <span>@statustext</span> </div> } @if (statustext.Length == 9) { <div class="product-item__labelstatus-6Ribbon"> <span>@statustext</span> </div> } @if (statustext.Length >= 7 && statustext.Length <= 8) { <div class="product-item__labelstatus-3Ribbon"> <span>@statustext</span> </div> } @if (statustext.Length >= 4 && statustext.Length <= 6) { <div class="product-item__labelstatus-4Ribbon"> <span>@statustext</span> </div> } @if (statustext.Length < 4) { <div class="product-item__labelstatus-5Ribbon"> <span>@statustext</span> </div> } </div> } @if (!string.IsNullOrEmpty(viewModel.CollectionLogo)) { <div class="product_collectionlogo"> <img src="@viewModel.CollectionLogo.Replace("jpg", "png")" alt=""> </div> } @if (!string.IsNullOrWhiteSpace(viewModel.LabelText)) { <div style="top:211px;position:absolute;z-index:10000;"> <div class="product-item__label"> <p>@viewModel.LabelText</p> </div> </div> } <div class="MagicSlideshow video-container" data-options="preload: false;selectors: bottom; bulletsPreview: none; caption: false;"> <img fetchpriority="high" src="@viewModel.MainImage.SetWidth(1230).SetCrop(CropType.KeepAspectRatio).SetCompression(80).SetImageFormat(ImageFormat.Jpg).GetCrop()" alt="Outwell @viewModel.Name" /> @if (viewModel.FeatureVideos.Any()) { foreach (var featureVideo in viewModel.FeatureVideos) { <iframe src="@featureVideo.VideoUrl?rel=0&amp;showinfo=0&amp;controls=0" frameborder="0" allowfullscreen></iframe> } } @if (viewModel.ProductImages.Count > 0) { foreach (var image in viewModel.ProductImages) { <img data-image="@image.SetWidth(1230).SetCrop(CropType.KeepAspectRatio).SetCompression(80).SetImageFormat(ImageFormat.Jpg).GetCrop()" alt="Outwell @viewModel.Name" /> } } </div> @if (!string.IsNullOrEmpty(viewModel.Award001)) { var awardurl = viewModel.Award001; <div class="product_splash_award"> <img data-image="@viewModel.Award001.Replace("jpg", "png")" alt=""> </div> } </div> <div class="product__essentials"> <div class="product__images"> <div class="product__images-options product__images-options--scrolled"> <button class="product__images-button product__images-button--previous"><svg aria-hidden="true"><use xlink:href="@staticResourceService.AddTimeStamp("/static/dist/svg/_bundle.svg")#arrow-up"></use></svg></button> <div class="product__images-options-items"> <div> <div class="product__images-option"> <div class="lazy" data-src-xxs="@viewModel.MainImage.SetWidth(69).SetHeight(69).SetCrop(CropType.KeepAspectRatio).SetImageFormat(ImageFormat.Jpg).SetCompression(80).GetCrop()" alt="Outwell @viewModel.Name"></div> </div> @if (viewModel.FeatureVideos.Any()) { foreach (var featureVideo in viewModel.FeatureVideos) { <div class="product__images-option product__images-option--video"> <div class="lazy" data-src-xxs="@featureVideo.ImageUrl"></div> <div> <svg aria-hidden="true"><use xlink:href="@staticResourceService.AddTimeStamp("/static/dist/svg/_bundle.svg")#youtube-play"></use></svg> </div> </div> } } @if (viewModel.ProductImages.Count > 0) { foreach (var image in viewModel.ProductImages) { <div class="product__images-option"> <div class="lazy" data-src-xxs="@image.SetWidth(69).SetHeight(69).SetCrop(CropType.KeepAspectRatio).SetImageFormat(ImageFormat.Jpg).SetCompression(80).GetCrop()" alt="Outwell @viewModel.Name"></div> </div> } } </div> </div> <button class="product__images-button product__images-button--next product__images-button--hidden" disabled><svg aria-hidden="true"><use xlink:href="@staticResourceService.AddTimeStamp("/static/dist/svg/_bundle.svg")#arrow-down"></use></svg></button> </div> <div class="product__images-showcase"> <div class="product__image" data-src-xxs="@viewModel.MainImage.SetHeight(300).SetCrop(CropType.KeepAspectRatio).SetCompression(80).SetImageFormat(ImageFormat.Jpg).GetCrop()" data-src-sm="@viewModel.MainImage.SetHeight(640).SetCrop(CropType.KeepAspectRatio).SetCompression(80).SetImageFormat(ImageFormat.Jpg).GetCrop()" data-src-md="@viewModel.MainImage.SetWidth(630).SetCrop(CropType.KeepAspectRatio).SetCompression(80).SetImageFormat(ImageFormat.Jpg).GetCrop()" data-src-lg="@viewModel.MainImage.SetWidth(728).SetCrop(CropType.KeepAspectRatio).SetCompression(80).SetImageFormat(ImageFormat.Jpg).GetCrop()" data-gallery="@viewModel.MainImage.SetWidth(1230).SetCrop(CropType.KeepAspectRatio).SetCompression(80).SetImageFormat(ImageFormat.Jpg).GetCrop()"> </div> @if (viewModel.FeatureVideos.Any()) { foreach (var featureVideo in viewModel.FeatureVideos) { <div class="product__image product__image--video"> <div class="video-container"> <iframe src="@featureVideo.VideoUrl?rel=0&amp;showinfo=0&amp;controls=0" frameborder="0" allowfullscreen></iframe> </div> </div> } } @if (viewModel.ProductImages.Count > 0) { foreach (var image in viewModel.ProductImages) { <div class="product__image" data-src-xxs="@image.SetHeight(300).SetCrop(CropType.KeepAspectRatio).SetCompression(80).SetImageFormat(ImageFormat.Jpg).GetCrop()" data-src-sm="@image.SetHeight(640).SetCrop(CropType.KeepAspectRatio).SetCompression(80).SetImageFormat(ImageFormat.Jpg).GetCrop()" data-src-md="@image.SetWidth(630).SetCrop(CropType.KeepAspectRatio).SetCompression(80).SetImageFormat(ImageFormat.Jpg).GetCrop()" data-src-lg="@image.SetWidth(728).SetCrop(CropType.KeepAspectRatio).SetCompression(80).SetImageFormat(ImageFormat.Jpg).GetCrop()" data-gallery="@image.SetWidth(1230).SetCrop(CropType.KeepAspectRatio).SetCompression(80).SetImageFormat(ImageFormat.Jpg).GetCrop()"> </div> } } </div> @if (!string.IsNullOrEmpty(viewModel.OutletcampingSplash)) { var statustext = viewModel.OutletcampingSplash; <div class="product-item__labelstatusRibbon" style="margin-top:0px;margin-left:90px;"> @if (statustext.Length > 9) { <div class="product-item__labelstatus-2Ribbon"> <span>@statustext</span> </div> } @if (statustext.Length == 9) { <div class="product-item__labelstatus-6Ribbon"> <span>@statustext</span> </div> } @if (statustext.Length >= 7 && statustext.Length <= 8) { <div class="product-item__labelstatus-3Ribbon"> <span>@statustext</span> </div> } @if (statustext.Length >= 4 && statustext.Length <= 6) { <div class="product-item__labelstatus-4Ribbon"> <span>@statustext</span> </div> } @if (statustext.Length < 4) { <div class="product-item__labelstatus-5Ribbon"> <span>@statustext</span> </div> } </div> } @if (!string.IsNullOrEmpty(viewModel.CollectionLogo)) { <div class="product_collectionlogo"> <img src="@viewModel.CollectionLogo.Replace("jpg", "png")" alt=""> </div> } @if (!string.IsNullOrEmpty(viewModel.Award001)) { var awardurl = viewModel.Award001; <div class="product_splash_award"> <img src="@viewModel.Award001.Replace("jpg", "png")" alt=""> </div> } @if (viewModel.Image090 != null) { <div class="product__splash-image"> <img src="@viewModel.Image090.SetWidth(200).SetCrop(CropType.KeepAspectRatio).SetCompression(80).GetCrop()" alt=""> </div> } @if (!string.IsNullOrWhiteSpace(viewModel.LabelText)) { <div class="product__label"> <div style="background: #98b19f"></div> <p>@viewModel.LabelText</p> </div> } </div> <div class="product__info"> <div class="product__info-top"> @if (!string.IsNullOrWhiteSpace(@viewModel.Name)) { <h1 class="product__name" itemprop="name">@viewModel.Name</h1> } @if (!string.IsNullOrWhiteSpace(@viewModel.ShortDescription)) { <div class="product__description"> @viewModel.ShortDescription </div> } <link itemprop="brand" content="Outwell" /> <link itemprop="image" href="@viewModel.MainImage.SetHeight(600).SetCrop(CropType.KeepAspectRatio).SetCompression(80).GetCrop()" /> <div class="product__price" itemprop="offers" itemscope itemtype="http://schema.org/Offer"> <span itemprop="priceCurrency" content="@viewModel.Currency">@viewModel.CurrencySymbol</span> <span itemprop="price" content="@viewModel.UnformatedPrice">@viewModel.Price</span> <link itemprop="availability" href="@(viewModel.Stock > 0 ? "http://schema.org/InStock" : "http://schema.org/OutOfStock")"> <link itemprop="url" href="@Pageview.SearchFriendlyUrl" /> @if (!string.IsNullOrWhiteSpace(viewModel.EnergyArrow) && !string.IsNullOrWhiteSpace(viewModel.Image401)) { <div class="energyarrow" data-module="energyarrow"> <img src="@viewModel.EnergyArrow" class="@(viewModel.Image079 != null ? "energyarrow__show" : "")" alt="Energy"> <div class="energyarrow__info"> <div class="energyarrow__info__close">x</div> @if (viewModel.Image079 != null) { <img src="@viewModel.Image079.SetWidth(300).SetCrop(CropType.KeepAspectRatio).SetCompression(80).GetCrop()" alt=""> } </div> </div> <div class="datasheet_link"> <a href="@viewModel.Image401" target="_blank">@Translate("Datasheet", "Datasheet")</a> </div> } </div> @if (!string.IsNullOrWhiteSpace(@viewModel.BeforePrice)) { <div class="product__old-price"> @Translate("Before", "Used to be") @viewModel.CurrencySymbol @viewModel.BeforePrice </div> } </div> <div class="product__info-bottom"> @{ var productVariants = GetString("Ecom:Product:Field.VariantNumbers.Value.Clean"); var productVariantOutOfStock = false; if (productVariants != null && !string.IsNullOrEmpty(productVariants)) { <div class="product__variants"> @Translate("Choose variant", "Choose variant"): <ul class="product__variants-list"> @foreach (var productVariant in productVariants.Split(';')) { if(productVariant.Split(':').Length > 2) { if(productVariantOutOfStock == false) { productVariantOutOfStock = productVariant.Split(':')[2] == "0" ? true : false; } <li class="product__variants-item" data-variantid="@productVariant.Split(':')[0]" data-stockcount="@productVariant.Split(':')[2]"> @productVariant.Split(':')[1] </li> } else { if (productVariant.Split(':')[1] != " ") { <li class="product__variants-item" data-variantid="@productVariant.Split(':')[0]"> @productVariant.Split(':')[1] </li> } } } </ul> </div> } if(productVariantOutOfStock) { <div class="product__soldout__box"> <div class="product__soldout"> <p class="product__soldout-title">@Translate("Sorry, this product is sold out.", "Sorry, this product is sold out.")</p> <div class="product__soldout-button"> <a href="@Pageview.Area.Item["SettingsDealersPage"]&DealersProductNumber=@viewModel.ProductNumber&DealersLanguageId=@languageId" class="btn"> <span class="btn__icon"> <svg aria-hidden="true"><use xlink:href="/static/dist/svg/_bundle.svg?ts=636555677940000000#arrow-right"></use></svg> </span> <span class="btn__text">@Translate("Find dealer", "Find dealer")</span> </a> </div> <div class="product__getnotified-box" data-area="@area.ID" data-product="@productNumber"> <a class="btn product__getnotified-button"> <span class="btn__icon"> <svg aria-hidden="true"><use xlink:href="/static/dist/svg/_bundle.svg?ts=636555677940000000#arrow-right"></use></svg> </span> <span class="btn__text">@Translate("Get notified when back in stock", "Get notified when back in stock")</span> </a> <div class="product__getnotified-form hidden"> <div class="product__getnotified-header">@Translate("Get notified when back in stock", "Get notified when back in stock")</div> <div class="product__getnotified-text">@Translate("Get an instant notification via email when this item becomes available.", "Get an instant notification via email when this item becomes available.")</div> <label class="product__getnotified-input"><input type="text" class="product__getnotified-email" placeholder="@Translate("Enter your e-mail address here", "Enter your e-mail address here")" /></label> <label class="product__getnotified-checkbox"> <input type="checkbox" class="product__getnotified-consent trigger" /> <span class="product__getnotified-text">@Translate("Subscribe to our Newsletter and get latest news", "Subscribe to our Newsletter and get latest news")</span> </label> <a class="btn product__getnotified-send"> <span class="btn__icon"> <svg aria-hidden="true"><use xlink:href="/static/dist/svg/_bundle.svg?ts=636555677940000000#arrow-right"></use></svg> </span> <span class="btn__text">@Translate("Click to get notified", "Click to get notified")</span> </a> <div class="product__getnotified-text">@Translate("While entering your email will not hold an item for you, it will allow us to notify you when it becomes available again!", "While entering your email will not hold an item for you, it will allow us to notify you when it becomes available again!")</div> </div> <div class="product__getnotified-thanks hidden"> <div class="product__getnotified-header">@Translate("Get notified when back in stock", "Get notified when back in stock")</div> <div class="product__getnotified-text">@Translate("Thank you, you will get notified when back in stock.", "Thank you, you will get notified when back in stock.")</div> </div> </div> <span class="product__soldout-icon"> <svg role="img"><use xlink:href="/static/dist/svg/_bundle.svg?ts=636555677940000000#outwell-symbol"></use></svg> </span> </div> </div> } } @if (!string.IsNullOrWhiteSpace(viewModel.CheckoutPageLink) && !string.IsNullOrWhiteSpace(viewModel.CartContext)) { if (valutaSelector == null || Pageview.AreaID != 1) { if (viewModel.Stock > 0) { <div class="product__button"> <form method="get" data-id="@viewModel.Id" data-number="@viewModel.ProductNumber" data-name="@viewModel.Name.Replace("\"", "\'")" data-quantity="1" data-price="@viewModel.UnformatedPrice" data-currency="@viewModel.Currency" data-brand="@GetString("Ecom:Product:Field.BrandName")"> <input type="hidden" name="CartCmd" id="CartCmd" value="@(viewModel.OrderLine != null && string.IsNullOrEmpty(productVariants) ? "incorderline" : "add")" /> <input type="hidden" name="Key" id="Key" value="@(viewModel.OrderLine != null ? viewModel.OrderLine.Id : "")" @(viewModel.OrderLine != null && string.IsNullOrEmpty(productVariants) ? "" : "disabled") /> <input type="hidden" name="OrderContext" id="OrderContext" value="@viewModel.CartContext" /> @*<input type="hidden" name="ProductID" id="ProductID" value="@viewModel.Id" />*@ <input type="hidden" name="Redirect" id="Redirect" value="/WebServices/MiniCart.ashx?productId=@viewModel.Id&areaId=@Pageview.AreaID" disabled /> <button type="submit" class="btn btn--big @(!string.IsNullOrEmpty(productVariants) ? "btn--disabled" : "")" @(viewModel.Stock > 0 ? "" : "disabled") data-added-msg="@(Translate("AddedToCart", "Added to cart"))"> <span class="btn__icon"> <svg aria-hidden="true"><use xlink:href="/static/dist/svg/_bundle.svg#cart"></use></svg> </span> <span class="btn__text">@Translate("AddToCart", "Add to cart")</span> </button> </form> </div> <div class="product__availability product__availability--instock"> @Translate("InStock", "In stock"): </div> } else { <div class="product__soldout__box"> <div class="product__soldout"> <p class="product__soldout-title">@Translate("Sorry, this product is sold out.", "Sorry, this product is sold out.")</p> @if (!string.IsNullOrEmpty(@viewModel.AvailableAgain)) { <p class="product__soldout-date">@Translate("In stock again", "In stock again"): @viewModel.AvailableAgain</p> } <div class="product__soldout-button"> <a href="@Pageview.Area.Item["SettingsDealersPage"]&DealersProductNumber=@viewModel.ProductNumber&DealersLanguageId=@languageId" class="btn"> <span class="btn__icon"> <svg aria-hidden="true"><use xlink:href="/static/dist/svg/_bundle.svg?ts=636555677940000000#arrow-right"></use></svg> </span> <span class="btn__text">@Translate("Find dealer", "Find dealer")</span> </a> </div> <div class="product__getnotified-box" data-area="@area.ID" data-product="@productNumber"> <a class="btn product__getnotified-button"> <span class="btn__icon"> <svg aria-hidden="true"><use xlink:href="/static/dist/svg/_bundle.svg?ts=636555677940000000#arrow-right"></use></svg> </span> <span class="btn__text">@Translate("Get notified when back in stock", "Get notified when back in stock")</span> </a> <div class="product__getnotified-form hidden"> <div class="product__getnotified-header">@Translate("Get notified when back in stock", "Get notified when back in stock")</div> <div class="product__getnotified-text">@Translate("Get an instant notification via email when this item becomes available.", "Get an instant notification via email when this item becomes available.")</div> <label class="product__getnotified-input"><input type="text" class="product__getnotified-email" placeholder="@Translate("Enter your e-mail address here", "Enter your e-mail address here")" /></label> <label class="product__getnotified-checkbox"> <input type="checkbox" class="product__getnotified-consent trigger" /> <span class="product__getnotified-text">@Translate("Subscribe to our Newsletter and get latest news", "Subscribe to our Newsletter and get latest news")</span> </label> <a class="btn product__getnotified-send"> <span class="btn__icon"> <svg aria-hidden="true"><use xlink:href="/static/dist/svg/_bundle.svg?ts=636555677940000000#arrow-right"></use></svg> </span> <span class="btn__text">@Translate("Click to get notified", "Click to get notified")</span> </a> <div class="product__getnotified-text">@Translate("While entering your email will not hold an item for you, it will allow us to notify you when it becomes available again!", "While entering your email will not hold an item for you, it will allow us to notify you when it becomes available again!")</div> </div> <div class="product__getnotified-thanks hidden"> <div class="product__getnotified-header">@Translate("Get notified when back in stock", "Get notified when back in stock")</div> <div class="product__getnotified-text">@Translate("Thank you, you will get notified when back in stock.", "Thank you, you will get notified when back in stock.")</div> </div> </div> @if (!string.IsNullOrEmpty(@viewModel.AvailableAgain)) { <div class="product__preorder"> <form method="get" data-id="@viewModel.Id" data-number="@viewModel.ProductNumber" data-name="@viewModel.Name.Replace("\"", "\'")" data-quantity="1" data-price="@viewModel.UnformatedPrice" data-currency="@viewModel.Currency" data-brand="@GetString("Ecom:Product:Field.BrandName")"> <input type="hidden" name="CartCmd" id="CartCmd" value="@(viewModel.OrderLine != null && string.IsNullOrEmpty(productVariants) ? "incorderline" : "add")" /> <input type="hidden" name="Key" id="Key" value="@(viewModel.OrderLine != null ? viewModel.OrderLine.Id : "")" @(viewModel.OrderLine != null && string.IsNullOrEmpty(productVariants) ? "" : "disabled") /> <input type="hidden" name="OrderContext" id="OrderContext" value="@viewModel.CartContext" /> @*<input type="hidden" name="ProductID" id="ProductID" value="@viewModel.Id" />*@ @*<input type="hidden" name="Redirect" id="Redirect" value="/WebServices/MiniCart.ashx?productId=@viewModel.Id&areaId=@Pageview.AreaID" disabled />*@ <button type="submit" class="btn" data-added-msg="@(Translate("AddedToCart", "Added to cart"))"> <span class="btn__icon"> <svg aria-hidden="true"><use xlink:href="/static/dist/svg/_bundle.svg#cart"></use></svg> </span> <span class="btn__text">@Translate("Preorder this item", "Preorder this item")</span> </button> </form> <div class="product__preorder__result" style="display:none;"> <p></p> <p class="product__preorder__text"> @Translate("Preorder success text", "You have now added this item to the basket. We will ship your order as soon as we get the item in stock. Before sending we will send you a payment link. Please continue shopping or check out") </p> <p class="product__preorder__notice"> @Translate("Preorder success notice", "Please notice: In case that the order will be delayed we will inform you asap") </p> </div> </div> } <span class="product__soldout-icon"> <svg role="img"><use xlink:href="/static/dist/svg/_bundle.svg?ts=636555677940000000#outwell-symbol"></use></svg> </span> </div> @if (viewModel.AlternativeProducts.Count > 0) { <div class="product__soldout"> <p class="product__soldout-text">@Translate("Please see these alternatives.", "Please see these alternatives.")</p> <span class="product__soldout-icon"> <svg role="img"><use xlink:href="/static/dist/svg/_bundle.svg?ts=636555677940000000#outwell-symbol"></use></svg> </span> </div> <div class="product__alternatives"> <ul> @foreach (var item in viewModel.AlternativeProducts) { var alternativeProduct = viewModelService.GetViewModel(item); if (!(@alternativeProduct.Name).Contains("Outwell")) { <li class="product-item"> <article> <a href="@urlService.GetUrl(alternativeProduct.GroupId, alternativeProduct.Id)"> <div class="product-item__header"> <div class="product-item__headline"> <h3>@alternativeProduct.Name</h3> </div> <figure class="product-item__image"> <img src="@alternativeProduct.MainImage.SetWidth(500).SetHeight(300).SetCrop(CropType.KeepAspectRatio).SetCompression(50).GetCrop()" content="@alternativeProduct.MainImage"> </figure> <div class="product-item__price"> <div class="price"><span>@alternativeProduct.CurrencySymbol</span> <span>@alternativeProduct.Price</span></div> </div> </div> </a> </article> </li> } } </ul> </div> } </div> <div class="product__button"> <form method="get"> <input type="hidden" name="CartCmd" id="CartCmd" value="@(viewModel.OrderLine != null ? "incorderline" : "add")" /> <input type="hidden" name="Key" id="Key" value="@(viewModel.OrderLine != null ? viewModel.OrderLine.Id : "")" @(viewModel.OrderLine != null ? "" : "disabled") /> <input type="hidden" name="OrderContext" id="OrderContext" value="@viewModel.CartContext" /> <input type="hidden" name="Redirect" id="Redirect" value="/WebServices/MiniCart.ashx?productId=@viewModel.Id&areaId=@Pageview.AreaID" disabled /> <button type="submit" class="btn btn--big btn--greyed @(!string.IsNullOrEmpty(productVariants) ? "btn--disabled" : "")" data-added-msg="@(Translate("AddedToCart", "Added to cart"))"> <span class="btn__icon"> <svg aria-hidden="true"><use xlink:href="/static/dist/svg/_bundle.svg#cart"></use></svg> </span> <span class="btn__text">@Translate("AddToCart", "Add to cart")</span> </button> </form> </div> } } } @if (viewModel.AssortmentsOnDisplay.Count > 0) { <div class="product__assortments-button"> <a class="btn"> <span class="btn__icon"> <svg aria-hidden="true"><use xlink:href="/static/dist/svg/_bundle.svg?ts=636555677940000000#arrow-right"></use></svg> </span> <span class="btn__text">@Translate("See tents on display", "See tents on display")</span> </a> </div> <div class="product__assortments__box"> <div class="product__assortments"> <span class="product__assortments-text">@Translate("See this item on display here", "See this item on display here"):</span> <span class="product__assortments-icon"> <svg role="img"><use xlink:href="/static/dist/svg/_bundle.svg?ts=636555677940000000#outwell-symbol"></use></svg> </span> </div> <ul> @foreach (var assortment in viewModel.AssortmentsOnDisplay) { <li class="product-item"> <p><b>@assortment.Name</b></p> <p>@assortment.Address.Trim()</p> @if (!string.IsNullOrEmpty(assortment.Address2.Trim())) { <p>@assortment.Address2.Trim()</p> } <p>@assortment.Zip.Trim() @assortment.City.Trim()</p> <p>@Translate("Phone"): @assortment.Phone.Trim()</p> </li> } </ul> </div> } <dl class="product__bullet-points"> @if (viewModel.Stock > 0 && !string.IsNullOrWhiteSpace(viewModel.CheckoutPageLink) && !string.IsNullOrWhiteSpace(viewModel.CartContext)) { if (@PageView.Current().AreaID == 31) { <dt>@Translate("FreeShippingEU", "Free shipping")</dt> } else { <dt>@Translate("FreeShipping", "Free shipping")</dt> } <dd>@Translate("ShippingTime", "Ships within 3-5 days")</dd> } <dt>@Translate("Find dealers", "Find dealers")</dt> <dd><a href="@Pageview.Area.Item["SettingsDealersPage"]&DealersProductNumber=@viewModel.ProductNumber&DealersLanguageId=@languageId">@Translate("Available in these stores", "Available in these stores")</a></dd> <dt>@Translate("NeedHelp", "Need help?")</dt> <dd><a href="@viewModel.CustomerServiceLink">@viewModel.CustomerServiceLinkTitle</a></dd> <dt>@Translate("WarrentyTeaser", "")</dt> <dd>@Translate("WarrentyLink", "")</dd> </dl> </div> </div> </div> <section class="product__details"> <h2>@Translate("Details", "Details")</h2> <div class="product__details-list"> <div class="product__details-options"> <div class="product__details-options-line"></div> @if (viewModel.DimensionImages.Count > 0) { <div class="product__details-option"> <button class="product__details-option--btn"> <svg aria-hidden="true"><use xlink:href="@staticResourceService.AddTimeStamp("/static/dist/svg/_bundle.svg")#arrow-right"></use></svg> <span>@Translate("Layout", "Layout")</span> </button> <div class="product__details-item-placeholder"><div></div></div> </div> } @if (viewModel.Features.Count > 0 || viewModel.TemperatureImages.Count > 0) { <div class="product__details-option"> <button class="product__details-option--btn"> <svg aria-hidden="true"><use xlink:href="@staticResourceService.AddTimeStamp("/static/dist/svg/_bundle.svg")#arrow-right"></use></svg> <span>@Translate("Specifications", "Specifications")</span> </button> <div class="product__details-item-placeholder"><div></div></div> </div> } @if (!string.IsNullOrWhiteSpace(@viewModel.LongDescription)) { <div class="product__details-option"> <button class="product__details-option--btn"> <svg aria-hidden="true"><use xlink:href="@staticResourceService.AddTimeStamp("/static/dist/svg/_bundle.svg")#arrow-right"></use></svg> <span>@Translate("Description", "Description")</span> </button> <div class="product__details-item-placeholder"><div></div></div> </div> } @if (!string.IsNullOrWhiteSpace(@viewModel.Video360)) { <div class="product__details-option"> <button class="product__details-option--btn"> <svg aria-hidden="true"><use xlink:href="@staticResourceService.AddTimeStamp("/static/dist/svg/_bundle.svg")#arrow-right"></use></svg> <span>@Translate("360 Degree Video", "360 Degree Video")</span> </button> <div class="product__details-item-placeholder"><div></div></div> </div> } @if (!string.IsNullOrWhiteSpace(@viewModel.CareText) || !string.IsNullOrWhiteSpace(@viewModel.CareVideoUrl) || !string.IsNullOrWhiteSpace(@viewModel.CareVideo) || !string.IsNullOrWhiteSpace(@viewModel.CareFile) || !string.IsNullOrWhiteSpace(@viewModel.CareFileDescription) || !string.IsNullOrWhiteSpace(@viewModel.Image082) ) { <div class="product__details-option"> <button class="product__details-option--btn"> <svg aria-hidden="true"><use xlink:href="@staticResourceService.AddTimeStamp("/static/dist/svg/_bundle.svg")#arrow-right"></use></svg> <span>@Translate("Care", "Care")</span> </button> <div class="product__details-item-placeholder"><div></div></div> </div> } @if (viewModel.PitchingImages.Count > 0 || !string.IsNullOrWhiteSpace(@viewModel.PitchingVideo) || !string.IsNullOrWhiteSpace(@viewModel.PitchingVideo2) || !string.IsNullOrWhiteSpace(@viewModel.PitchingVideo3) || !string.IsNullOrWhiteSpace(@viewModel.PitchingText)) { <div class="product__details-option"> <button class="product__details-option--btn"> <svg aria-hidden="true"><use xlink:href="@staticResourceService.AddTimeStamp("/static/dist/svg/_bundle.svg")#arrow-right"></use></svg> <span>@Translate("Pitching", "Pitching")</span> </button> <div class="product__details-item-placeholder"><div></div></div> </div> } @if (viewModel.Icons.Count > 0) { <div class="product__details-option"> <button class="product__details-option--btn"> <svg aria-hidden="true"><use xlink:href="@staticResourceService.AddTimeStamp("/static/dist/svg/_bundle.svg")#arrow-right"></use></svg> <span>@Translate("DetailIcons", "Detail icons")</span> </button> <div class="product__details-item-placeholder"><div></div></div> </div> } @if (viewModel.FeatureList.Count > 0) { <div class="product__details-option"> <button class="product__details-option--btn"> <svg aria-hidden="true"><use xlink:href="@staticResourceService.AddTimeStamp("/static/dist/svg/_bundle.svg")#arrow-right"></use></svg> <span>@Translate("FeatureList", "Feature list")</span> </button> <div class="product__details-item-placeholder"><div></div></div> </div> } @*optional extra tab*@ @if (viewModel.RelatedProductsCount > 0) { <div class="product__details-option only-desktop"> <button class="product__details-option--btn"> <svg aria-hidden="true"><use xlink:href="@staticResourceService.AddTimeStamp("/static/dist/svg/_bundle.svg")#arrow-right"></use></svg> <span>@Translate("Related products", "Related products")</span> </button> <div class="product__details-item-placeholder"><div></div></div> </div> } @*end optional extra tab*@ </div> <div class="product__details-items"> @if (viewModel.DimensionImages.Count > 0) { <div class="product__details-item"> <div class="product__details-images"> <article> @foreach (var image in viewModel.DimensionImages) { <div class="lazy" data-src-xxs="@image.SetWidth(470*2).SetCrop(CropType.KeepAspectRatio).SetCompression(80).SetImageFormat(ImageFormat.Jpg).GetCrop()" alt="Outwell @viewModel.Name" data-src-sm="@image.SetWidth(348*2).SetCrop(CropType.KeepAspectRatio).SetCompression(80).SetImageFormat(ImageFormat.Jpg).GetCrop()" alt="Outwell @viewModel.Name" data-src-md="@image.SetWidth(287*2).SetCrop(CropType.KeepAspectRatio).SetCompression(80).SetImageFormat(ImageFormat.Jpg).GetCrop()" alt="Outwell @viewModel.Name" data-src-lg="@image.SetWidth(370*2).SetCrop(CropType.KeepAspectRatio).SetCompression(80).SetImageFormat(ImageFormat.Jpg).GetCrop()" alt="Outwell @viewModel.Name" data-gallery="@image.SetWidth(1230).SetCrop(CropType.KeepAspectRatio).SetCompression(80).SetImageFormat(ImageFormat.Jpg).GetCrop()" alt="Outwell @viewModel.Name"> </div> } </article> </div> </div> } @if (viewModel.Features.Count > 0 || viewModel.TemperatureImages.Count > 0) { <div class="product__details-item"> <div class="product__details-specifications"> <article> @if (viewModel.Features.Count > 0) { List<string> featureBlacklist = new List<string>(); foreach (var item in specBlackList.Split(',')) { featureBlacklist.Add(item.Trim()); } <dl> @foreach (LoopItem feature in GetLoop("CustomFieldValues")) { var systemName = feature.GetString("Product.CustomField.System"); var specName = feature.GetString("Product.CustomField.Name"); var specValue = feature.GetString("Product.CustomField.Value"); foreach (var featureBlacklistItem in featureBlacklist) { if (featureBlacklist.Any(_ => systemName.StartsWith(_, StringComparison.InvariantCultureIgnoreCase))) { continue; } if (!string.IsNullOrWhiteSpace(specValue) && !string.IsNullOrWhiteSpace(specName)) { <dt> @specName: </dt> <dd>@specValue</dd> } break; } } @if (!string.IsNullOrWhiteSpace(@viewModel.ProductNumber)) { <dt> @Translate("ProductNumber", "Product Number"): </dt> <dd>@viewModel.ProductNumber</dd> } </dl> } @if (viewModel.TemperatureImages.Count > 0) { <div class="temprature"> <div class="temprature__info-box"> <span class="temprature__info-close">×</span> <dl> @foreach (LoopItem feature in GetLoop("CustomFieldValues")) { var systemName = feature.GetString("Product.CustomField.System"); var specName = feature.GetString("Product.CustomField.Name"); var specValue = feature.GetString("Product.CustomField.Value"); if (systemName == "TempTcomfortwoman" || systemName == "TempTlimitman" || systemName == "TempTextreme") { <dt> @specName: </dt> <dd>@specValue °</dd> } } </dl> <a class="btn btn--filled" href="@Translate("ProductTempInfoUrl", "/")"> <span class="btn__icon"> <svg aria-hidden="true"><use xlink:href="@staticResourceService.AddTimeStamp("/static/dist/svg/_bundle.svg")#arrow-right"></use></svg> </span> <span class="btn__text">@Translate("ProductTempInfoUrlCaption", "Read more")</span> </a> </div> <ul class="temprature-images"> @foreach (var image in viewModel.TemperatureImages) { <li> <img src="@image.SetWidth(200).SetCrop(CropType.KeepAspectRatio).SetCompression(80).GetCrop()" /> <div class="temprature__info"> <svg aria-hidden="true"><use xlink:href="@staticResourceService.AddTimeStamp("/static/dist/svg/_bundle.svg")#info-circle"></use></svg></div> </li> } </ul> </div> } </article> </div> </div> } @if (!string.IsNullOrWhiteSpace(@viewModel.LongDescription)) { <div class="product__details-item"> <div class="product__details-description text" itemprop="description"> <article> <div class="text__body"> <div class="text__body-left"> @viewModel.LongDescription </div> </div> </article> </div> </div> } @if (!string.IsNullOrWhiteSpace(@viewModel.Video360)) { <div class="product__details-item"> <div class="product__details-maintenance"> <article> <div class="video-container"> <iframe src="@viewModel.Video360?rel=0&amp;showinfo=0&amp;controls=0" frameborder="0"></iframe> </div> </article> </div> </div> } @if (!string.IsNullOrWhiteSpace(@viewModel.CareText) || !string.IsNullOrWhiteSpace(@viewModel.CareVideoUrl) || !string.IsNullOrWhiteSpace(@viewModel.CareVideo) || !string.IsNullOrWhiteSpace(@viewModel.CareFile) || !string.IsNullOrWhiteSpace(@viewModel.CareFileDescription) || !string.IsNullOrWhiteSpace(@viewModel.Image082) ) { <div class="product__details-item"> <div class="product__details-maintenance"> <article> @if (!string.IsNullOrWhiteSpace(@viewModel.CareText)) { <div class="text__body">@viewModel.CareText</div> } @if (!string.IsNullOrWhiteSpace(@viewModel.CareVideo)) { <div class="margin-top-10px"> <div class="video-container"> <iframe src="@viewModel.CareVideo?rel=0&amp;showinfo=0&amp;controls=0" frameborder="0" allowfullscreen></iframe> </div> </div> } @if (!string.IsNullOrWhiteSpace(@viewModel.CareVideoUrl)) { <div class="margin-top-10px"> <div class="video-container"> <iframe src="@viewModel.CareVideoUrl?rel=0&amp;showinfo=0&amp;controls=0" frameborder="0" allowfullscreen></iframe> </div> </div> } <div> <ul> @if (!string.IsNullOrWhiteSpace(@viewModel.CareFile)) { <li> <a href="@viewModel.CareFile" target="_blank"> <svg aria-hidden="true"> <use xlink:href="@staticResourceService.AddTimeStamp("/static/dist/svg/_bundle.svg")#file-pdf"></use> </svg> @(string.IsNullOrWhiteSpace(viewModel.CareFileDescription) ? Translate("CareFileText", "Care label - PDF") : viewModel.CareFileDescription) </a> </li> } @if (!string.IsNullOrWhiteSpace(@viewModel.Image082)) { <li> <a href="@viewModel.Image082" target="_blank"> <svg aria-hidden="true"> <use xlink:href="@staticResourceService.AddTimeStamp("/static/dist/svg/_bundle.svg")#file-pdf"></use> </svg> @(string.IsNullOrWhiteSpace(viewModel.CareFileDescription) ? Translate("CareFileText2", "Care label - PDF") : viewModel.CareFileDescription) </a> </li> } </ul> </div> </article> </div> </div> } @if (viewModel.PitchingImages.Count > 0 || !string.IsNullOrWhiteSpace(@viewModel.PitchingVideo) || !string.IsNullOrWhiteSpace(@viewModel.PitchingVideo2) || !string.IsNullOrWhiteSpace(@viewModel.PitchingVideo3) || !string.IsNullOrWhiteSpace(@viewModel.PitchingText)) { <div class="product__details-item"> <div class="product__details-maintenance"> <article> @if (!string.IsNullOrWhiteSpace(@viewModel.PitchingVideo)) { <div> <div class="video-container"> <iframe src="@viewModel.PitchingVideo?rel=0&amp;showinfo=0&amp;controls=0" frameborder="0" allowfullscreen></iframe> </div> </div> } @if (!string.IsNullOrWhiteSpace(@viewModel.PitchingVideo2)) { <div class="margin-top-10px"> <div class="video-container"> <iframe src="@viewModel.PitchingVideo2?rel=0&amp;showinfo=0&amp;controls=0" frameborder="0" allowfullscreen></iframe> </div> </div> } @if (!string.IsNullOrWhiteSpace(@viewModel.PitchingVideo3)) { <div class="margin-top-10px"> <div class="video-container"> <iframe src="@viewModel.PitchingVideo3?rel=0&amp;showinfo=0&amp;controls=0" frameborder="0" allowfullscreen></iframe> </div> </div> } <div> <ul> @if (viewModel.PitchingImages.Count > 0) { foreach (var image in viewModel.PitchingImages) { <li> <a href="@image" target="_blank"> <svg aria-hidden="true"> <use xlink:href="@staticResourceService.AddTimeStamp("/static/dist/svg/_bundle.svg")#file-pdf"></use> </svg>@Translate("PitchingFileText", "Pitching Instruction - PDF") </a> </li> } } </ul> </div> @if (!string.IsNullOrWhiteSpace(@viewModel.PitchingText)) { <div>@viewModel.PitchingText</div>} </article> </div> </div> } @if (viewModel.Icons.Count > 0) { <div class="product__details-item"> <div class="product__details-icons product__icons-options"> <article class="product__icons-options-items"> @foreach (var icon in viewModel.Icons) { var iconIndex = 0; <section> <header> <div> <img src="@icon.Image.SetWidth(60).SetHeight(60).SetCrop(CropType.KeepAspectRatio).SetCompression(80).GetCrop()" alt="@icon.Headline"> </div> <span class="h-1"> @icon.Headline <span class="product__icons-option" data-index="@iconIndex">i</span> </span> </header> @icon.BodyText </section> iconIndex++; } </article> @if (!string.IsNullOrEmpty(GetString("Ecom:Product:Field.Icon1Slide.Value.Clean"))) { <div class="product__icons-showcase"> @for (var i = 1; i <= 20; i++) { var iconSlide = GetString("Ecom:Product:Field.Icon" + i + "Slide.Value.Clean"); if (!string.IsNullOrEmpty(iconSlide)) { var iconSlideImage = "/Admin/Public/GetImage.ashx?Image=/Files/Images/Productimages/" + iconSlide + ".jpg&Crop=5&Compression=80"; <div class="product__image product__icon-slide-image lazy-loaded" data-src-XXS="@iconSlideImage&Width=728" alt="" data-gallery="@iconSlideImage&Width=1230"> </div> } } </div> <div class="product__icons-showcase--mobile"> @for (var i = 1; i <= 20; i++) { var iconSlide = GetString("Ecom:Product:Field.Icon" + i + "Slide.Value.Clean"); if (!string.IsNullOrEmpty(iconSlide)) { var iconSlideImage = "/Admin/Public/GetImage.ashx?Image=/Files/Images/Productimages/" + iconSlide + ".jpg&Crop=5&Compression=80"; <div class="product__image product__icon-slide-image lazy-loaded" data-src-XXS="@iconSlideImage&Width=728" alt="" data-gallery="@iconSlideImage&Width=1230"> </div> } } </div> } </div> </div> } @if (viewModel.FeatureList.Count > 0) { <div class="product__details-item"> <div class="product__details-points"> <article> @foreach (var featureText in viewModel.FeatureList) { <section> <div><svg aria-hidden="true"><use xlink:href="@staticResourceService.AddTimeStamp("/static/dist/svg/_bundle.svg")#checkmark"></use></svg></div> @featureText </section> } </article> </div> </div> } @*optional extra tab*@ @if (viewModel.RelatedProductsCount > 0) { <div class="product__details-item only-desktop"> <div class="product__details-points related-item-tab"> <article> @{int count = 0;} @foreach (var item in viewModel.RelatedProducts) { if (count > 10) { break; } var relatedProduct = viewModelService.GetViewModel(item); <div class="product-item product-item-tab"> <a style="text-decoration:none;" href="@urlService.GetUrl(relatedProduct.GroupId, relatedProduct.Id)"> <div class="product-item__header"> @if (!string.IsNullOrEmpty(relatedProduct.OutletcampingSplash)) { var statustext = relatedProduct.OutletcampingSplash; <div class="product-item__labelstatusRibbon" style=" margin-top: 48px; margin-left: 1px;"> @if (statustext.Length > 9) { <div class="product-item__labelstatus-2Ribbon"> <span>@statustext</span> </div> } @if (statustext.Length == 9) { <div class="product-item__labelstatus-6Ribbon"> <span>@statustext</span> </div> } @if (statustext.Length >= 7 && statustext.Length <= 8) { <div class="product-item__labelstatus-3Ribbon"> <span>@statustext</span> </div> } @if (statustext.Length >= 4 && statustext.Length <= 6) { <div class="product-item__labelstatus-4Ribbon"> <span>@statustext</span> </div> } @if (statustext.Length < 4) { <div class="product-item__labelstatus-5Ribbon"> <span>@statustext</span> </div> } </div> } <figure> <div class="lazy" data-src-xxs="@relatedProduct.MainImage.SetWidth(400).SetHeight(240).SetCrop(CropType.KeepAspectRatio).SetCompression(50).GetCrop()" content="@relatedProduct.MainImage" alt="@relatedProduct.Name"></div> </figure> @if (relatedProduct.Image090 != null) { <div class="product-item__splash-image"> <img src="@relatedProduct.Image090.SetWidth(200).SetCrop(CropType.KeepAspectRatio).SetCompression(80).GetCrop()" alt="@relatedProduct.Name"> </div> } @if (!string.IsNullOrEmpty(relatedProduct.LabelText) && !string.IsNullOrEmpty(relatedProduct.LabelColor)) { <div class="product-item__label"> <p>@relatedProduct.LabelText</p> </div> } </div> <div class="product-item__body"> <div class="product-item__headline"> @if (!string.IsNullOrEmpty(relatedProduct.Name)) { <h4 style="height:50px;overflow:auto;margin-top:10px;" itemprop="name">@relatedProduct.Name</h4> } </div> <div class="product-item__bulletpoints"> <ul class=""> @if (!string.IsNullOrWhiteSpace(relatedProduct.Bullet1)) { <li>@relatedProduct.Bullet1</li> <li>@relatedProduct.Bullet2</li> <li>@relatedProduct.Bullet3</li> } @if (!string.IsNullOrWhiteSpace(relatedProduct.PackSize)) { <li>@Translate("Pack size", "Pack size"): @relatedProduct.PackSize</li> } @if (!string.IsNullOrWhiteSpace(relatedProduct.Weightsale)) { <li>@Translate("Weight", "Weight"): @relatedProduct.Weightsale</li> } </ul> </div> <div class="product-item__RRPPrice"> @if (!string.IsNullOrEmpty(relatedProduct.Price)) { <span itemprop="priceCurrency" content="@relatedProduct.CurrencySymbol"> @relatedProduct.CurrencySymbol &nbsp; </span> <span itemprop="price" content="@relatedProduct.UnformatedPrice"> @relatedProduct.Price </span> } else { @Translate("SeeMore", "See more") } </div> </div> </a> </div> count++; } </article> </div> </div> } @*end optional extra tab*@ </div> </div> </section> </article> <div class="container"> @if (viewModel.RelatedProductsCount > 0) { <section class="featured-products featured-products-related container-ribbon ribbon" data-module="featured-products"> <div class="container"> <h3>@Translate("Related products", "Related products")</h3> <div class="featured-products__container"> @foreach (var item in viewModel.RelatedProducts) { var relatedProduct = viewModelService.GetViewModel(item); <article class="product-item"> <a href="@urlService.GetUrl(relatedProduct.GroupId, relatedProduct.Id)"> <div class="product-item__header"> @if (!string.IsNullOrEmpty(relatedProduct.OutletcampingSplash)) { var statustext = relatedProduct.OutletcampingSplash; <div class="product-item__labelstatusRibbon"> @if (statustext.Length > 9) { <div class="product-item__labelstatus-2Ribbon"> <span>@statustext</span> </div> } @if (statustext.Length == 9) { <div class="product-item__labelstatus-6Ribbon"> <span>@statustext</span> </div> } @if (statustext.Length >= 7 && statustext.Length <= 8) { <div class="product-item__labelstatus-3Ribbon"> <span>@statustext</span> </div> } @if (statustext.Length >= 4 && statustext.Length <= 6) { <div class="product-item__labelstatus-4Ribbon"> <span>@statustext</span> </div> } @if (statustext.Length < 4) { <div class="product-item__labelstatus-5Ribbon"> <span>@statustext</span> </div> } </div> } <figure> <div class="lazy" data-src-xxs="@relatedProduct.MainImage.SetWidth(500).SetHeight(300).SetCrop(CropType.KeepAspectRatio).SetCompression(50).GetCrop()" content="@relatedProduct.MainImage" alt=""></div> </figure> @if (!string.IsNullOrEmpty(relatedProduct.LabelText)) { <div class="product-item__label"> <p>@relatedProduct.LabelText</p> </div> } </div> <div class="product-item__body"> <div class="product-item__headline"> @if (!string.IsNullOrEmpty(relatedProduct.Name)) { <h4>@relatedProduct.Name</h4> } </div> <div class="product-item__information"> @{ var ProductDescription = ""; if (!string.IsNullOrEmpty(relatedProduct.LongDescription)) { ProductDescription = relatedProduct.LongDescription; } if (!string.IsNullOrWhiteSpace(ProductDescription) && ProductDescription.Length > 80) { ProductDescription = ProductDescription.Substring(0, 80) + "..."; } } @ProductDescription </div> <div class="product-item__bulletpoints"> <ul> @if (!string.IsNullOrWhiteSpace(relatedProduct.Bullet1)) { <li>@relatedProduct.Bullet1</li> <li>@relatedProduct.Bullet2</li> <li>@relatedProduct.Bullet3</li> } @if (!string.IsNullOrWhiteSpace(relatedProduct.PackSize)) { <li>@Translate("Pack size", "Pack size"): @relatedProduct.PackSize</li> } @if (!string.IsNullOrWhiteSpace(relatedProduct.Weightsale)) { <li>@Translate("Weight", "Weight"): @relatedProduct.Weightsale</li> } </ul> </div> <div class="product-item__RRPPrice"> <span> @if (!string.IsNullOrEmpty(relatedProduct.Price)) { <span itemprop="priceCurrency" content="@relatedProduct.CurrencySymbol"> @relatedProduct.CurrencySymbol &nbsp; </span> <span itemprop="price" content="@relatedProduct.UnformatedPrice"> @relatedProduct.Price </span> } else { @Translate("SeeMore", "See more") } </span> </div> </div> </a> <div class="product-item__favorite" data-module="cookiefavorite"> <svg class="heart" viewBox="0 0 32 29.6" data-product="@relatedProduct.ProductNumber"> <path class="heartfill" style="fill:#9DAF9E" 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> } </div> </div> </section> } </div> @{ // also bought products var alsoBoughtProducts = new List<Product>(); var alsoBoughtEcomLanguageId = area.EcomLanguageId; var alsoBoughtEcomShopId = area.EcomShopId; var alsoBoughtProductService = new ProductService(); var alsoBoughtFeedUrl = "http://dino.outwell.com/dino/ow/alsobought/" + viewModel.ProductNumber + "?return=12"; if (!string.IsNullOrEmpty(alsoBoughtFeedUrl)) { try { var url = urlParserService.FormatRaptorUrl(alsoBoughtFeedUrl); var data = (new WebClient()).DownloadString(url); JavaScriptSerializer raptorJson = new JavaScriptSerializer(); var alsoBoughtJsonProducts = raptorJson.Deserialize<ArrayList>(data); var alsoBoughtProductNumbers = new List<string>(); if (alsoBoughtJsonProducts.Count > 0) { foreach (Dictionary<string, object> alsoBoughtProductNumber in alsoBoughtJsonProducts) { string pId = "0"; if (alsoBoughtProductNumber.ContainsKey("ProductID")) { pId = alsoBoughtProductNumber["ProductID"].ToString(); } else if (alsoBoughtProductNumber.ContainsKey("RecommendedId")) { pId = alsoBoughtProductNumber["RecommendedId"].ToString(); } alsoBoughtProductNumbers.Add(pId); } if (alsoBoughtProductNumbers.Count > 0) { var alsoBoughtProductIds = new List<string>(); var alsoBoughtProductsCB = CommandBuilder.Create("SELECT ProductId FROM EcomProducts WHERE ProductNumber IN ('" + string.Join("','", alsoBoughtProductNumbers) + "') AND ProductLanguageId = {0} AND ProductDefaultShopId = {1}", alsoBoughtEcomLanguageId, alsoBoughtEcomShopId ); using (var reader = Database.CreateDataReader(alsoBoughtProductsCB)) { while (reader.Read()) { alsoBoughtProductIds.Add(reader["ProductId"].ToString()); } reader.Close(); reader.Dispose(); } if (alsoBoughtProductIds.Count > 0) { var alsoBoughtDwProducts = alsoBoughtProductService.GetByProductIDs(alsoBoughtProductIds.ToArray(), false, alsoBoughtEcomLanguageId, false, false); if (alsoBoughtDwProducts != null) { foreach (var alsoBoughtProductNumber in alsoBoughtProductNumbers) { var alsoBoughtFoundProduct = alsoBoughtDwProducts.Where(x => x.Number == alsoBoughtProductNumber).FirstOrDefault(); if (alsoBoughtFoundProduct != null) { alsoBoughtProducts.Add(alsoBoughtFoundProduct); } } } } } } } catch (Exception ex) { } } if (alsoBoughtProducts.Count > 0) { <div class="container"> <section class="featured-products featured-products-related container-ribbon ribbon" data-module="featured-products"> <div class="container"> <h3>@Translate("Also bought products", "Also bought products")</h3> <div class="featured-products__container"> @foreach (var item in alsoBoughtProducts) { var relatedProduct = viewModelService.GetViewModel(item); <article class="product-item"> <a href="@urlService.GetUrl(relatedProduct.GroupId, relatedProduct.Id)"> <div class="product-item__header"> @if (!string.IsNullOrEmpty(relatedProduct.OutletcampingSplash)) { var statustext = relatedProduct.OutletcampingSplash; <div class="product-item__labelstatusRibbon"> @if (statustext.Length > 9) { <div class="product-item__labelstatus-2Ribbon"> <span>@statustext</span> </div> } @if (statustext.Length == 9) { <div class="product-item__labelstatus-6Ribbon"> <span>@statustext</span> </div> } @if (statustext.Length >= 7 && statustext.Length <= 8) { <div class="product-item__labelstatus-3Ribbon"> <span>@statustext</span> </div> } @if (statustext.Length >= 4 && statustext.Length <= 6) { <div class="product-item__labelstatus-4Ribbon"> <span>@statustext</span> </div> } @if (statustext.Length < 4) { <div class="product-item__labelstatus-5Ribbon"> <span>@statustext</span> </div> } </div> } <figure> <div class="lazy" data-src-xxs="@relatedProduct.MainImage.SetWidth(500).SetHeight(300).SetCrop(CropType.KeepAspectRatio).SetCompression(50).GetCrop()" content="@relatedProduct.MainImage" alt=""></div> </figure> @if (!string.IsNullOrEmpty(relatedProduct.LabelText)) { <div class="product-item__label"> <p>@relatedProduct.LabelText</p> </div> } </div> <div class="product-item__body"> <div class="product-item__headline"> @if (!string.IsNullOrEmpty(relatedProduct.Name)) { <h4>@relatedProduct.Name</h4> } </div> <div class="product-item__information"> @{ var ProductDescription = ""; if (!string.IsNullOrEmpty(relatedProduct.LongDescription)) { ProductDescription = relatedProduct.LongDescription; } if (!string.IsNullOrWhiteSpace(ProductDescription) && ProductDescription.Length > 80) { ProductDescription = ProductDescription.Substring(0, 80) + "..."; } } @ProductDescription </div> <div class="product-item__bulletpoints"> <ul> @if (!string.IsNullOrWhiteSpace(relatedProduct.Bullet1)) { <li>@relatedProduct.Bullet1</li> <li>@relatedProduct.Bullet2</li> <li>@relatedProduct.Bullet3</li> } @if (!string.IsNullOrWhiteSpace(relatedProduct.PackSize)) { <li>@Translate("Pack size", "Pack size"): @relatedProduct.PackSize</li> } @if (!string.IsNullOrWhiteSpace(relatedProduct.Weightsale)) { <li>@Translate("Weight", "Weight"): @relatedProduct.Weightsale</li> } </ul> </div> <div class="product-item__RRPPrice"> <span> @if (!string.IsNullOrEmpty(relatedProduct.Price)) { <span itemprop="priceCurrency" content="@relatedProduct.CurrencySymbol"> @relatedProduct.CurrencySymbol &nbsp; </span> <span itemprop="price" content="@relatedProduct.UnformatedPrice"> @relatedProduct.Price </span> } else { @Translate("SeeMore", "See more") } </span> </div> </div> </a> <div class="product-item__favorite" data-module="cookiefavorite"> <svg class="heart" viewBox="0 0 32 29.6" data-product="@relatedProduct.ProductNumber"> <path class="heartfill" style="fill:#9DAF9E" 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> } </div> </div> </section> </div> } } </section> @foreach (var paragraphId in viewModel.RibbonIds) { @RenderParagraphContent(paragraphId) } @* FOR DEBUGGING ONLY @foreach (var fieldValue in viewModel.ProductFieldValues) { <div>@fieldValue.ProductField.Name<text>: </text>@fieldValue.Value.ToString()</div> } *@ </section> @SnippetStart("jarvis") @{ 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 = area.ID; var raptorBrandId = (area.Item["SettingsRaptorUserId"] != null) ? area.Item["SettingsRaptorUserId"].ToString() : string.Empty; var raptorCookieId = (HttpContext.Current.Request.Cookies[raptorBrandId + "rsa"] != null) ? HttpContext.Current.Request.Cookies[raptorBrandId + "rsa"].Value : ""; var raptorContent1 = GetJarvisContent("GetCookieHistory", "", area); var raptorContent2 = GetJarvisContent("GetSimilarItems", viewModel.ProductNumber, area); var settingsShopId = area.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="GetSimilarItems" class="jarvis__alternatives"> <section class="featured-products container-ribbon ribbon"> <h3>@Translate("Similar items", "Similar items")</h3> <div class="featured-products__container" data-url="/webservices/jarvis.ashx?areaId=@raptorAreaId&raptorFunction=GetSimilarItems&raptorProductId=@productNumber"> @foreach (var raptorProduct in raptorContent2) { var raptorProductView = viewModelService.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 class="product-item"> <a href="@raptorProductView.RaptorUrl" data-raptorrecommendation="productId:@raptorProductView.ProductNumber"> <div class="product-item__header"> <figure> <img src="@raptorProductView.RaptorImage" content="OaseOutdoors.Services.ImageService.ImageService" alt="@raptorProductView.Name"> </figure> </div> <div class="product-item__body"> <div class="product-item__headline"> <h3 class="h-1">@raptorProductView.Name</h3> </div> <div class="product-item__price"> <div class="price"><span content="@raptorProductView.Currency">@raptorProductView.CurrencySymbol</span> <span 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 = viewModelService.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 class="product-item"> <a href="@raptorProductView.RaptorUrl" data-raptorrecommendation="productId:@raptorProductView.ProductNumber"> <div class="product-item__header"> <figure> <img src="@raptorProductView.RaptorImage" content="OaseOutdoors.Services.ImageService.ImageService" alt="@raptorProductView.Name"> </figure> </div> <div class="product-item__body"> <div class="product-item__headline"> <h3 class="h-1">@raptorProductView.Name</h3> </div> <div class="product-item__price"> <div class="price"><span content="@raptorProductView.Currency">@raptorProductView.CurrencySymbol</span> <span 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") <!-- Google Tracking Code --> @if (headStaticResourceService.IsProduction) { var googleEcommerceId = Pageview.Area.Item["SettingsGoogleEcommerceId"]; var googleProductIds = viewModel.Id; <script> if(typeof gtag !== 'undefined') { gtag('event', 'page_view', { 'send_to': '@googleEcommerceId', 'ecomm_pagetype': 'product', 'ecomm_prodid': '@googleProductIds', 'ecomm_totalvalue': '@viewModel.UnformatedPrice' }); gtag('event', 'view_item', { "items": [ { 'id': '@viewModel.Id', 'name': '@viewModel.Name', 'brand': '@GetString("Ecom:Product:Field.BrandName")', 'quantity': 1, 'price': '@viewModel.UnformatedPrice' } ] }); } </script> } <!-- Google Tracking Code Ends --> <!-- Facebook Tracking Code --> @if (headStaticResourceService.IsProduction) { <script> if (typeof fbq !== 'undefined') { fbq('track', 'ViewContent', { content_name: '@viewModel.Name', content_ids: ['@viewModel.ProductNumber'], content_type: 'product', value: @viewModel.UnformatedPrice, currency: '@viewModel.Currency', contents: [ { id: '@viewModel.ProductNumber', quantity: 1, item_price: @viewModel.UnformatedPrice } ] }); } </script> } <!-- Facebook Tracking Code --> @functions { private List<Product> GetJarvisContent(string function = "", string productId = "", Area area = null) { List<Product> raptorProductsCollection = new List<Product>(); var context = HttpContext.Current; var raptorBrandId = (area.Item["SettingsRaptorUserId"] != null) ? area.Item["SettingsRaptorUserId"].ToString() : string.Empty; var raptorApiKey = area.Item["SettingsRaptorApiKey"]; var raptorCookie = context.Request.Cookies[raptorBrandId + "rsa"]; if (raptorCookie != null && raptorApiKey != null) { if (!string.IsNullOrEmpty(raptorCookie.Value) && !string.IsNullOrEmpty(raptorApiKey.ToString())) { var raptorCookieId = raptorCookie.Value; var raptorFunction = function; var raptorProductId = (!string.IsNullOrEmpty(productId)) ? "&ProductId=" + productId : ""; var raptorUrl = ""; var raptorNumberOfItems = 12; var raptorMinPrice = 0; switch (raptorFunction) { case "GetSimilarItems": raptorUrl = "https://api.raptorsmartadvisor.com/v1/" + raptorBrandId + "/GetSimilarItems/" + raptorNumberOfItems + "/" + raptorApiKey + "?CookieId=" + raptorCookieId + raptorProductId; break; default: raptorUrl = "https://api.raptorsmartadvisor.com/v1/" + raptorBrandId + "/GetCookieHistory/" + raptorNumberOfItems + "/" + raptorApiKey + "?UserIdentifier=" + raptorCookieId + raptorProductId; break; } if (!string.IsNullOrEmpty(raptorUrl)) { try { var raptorData = (new WebClient()).DownloadString(raptorUrl); JavaScriptSerializer raptorJson = new JavaScriptSerializer(); List<string> raptorProductsList = new List<string>(); var raptorJsonProducts = raptorJson.Deserialize<ArrayList>(raptorData); if (raptorJsonProducts.Count > 0) { var n = 1; List<string> raptorJsonProductsList = new List<string>(); foreach (Dictionary<string, object> raptorJsonProduct in raptorJsonProducts) { var typeId = "ProductId"; if (raptorJsonProduct.ContainsKey("RecommendedId")) { typeId = "RecommendedId"; } raptorJsonProductsList.Add(raptorJsonProduct[typeId].ToString()); } var raptorProducts = Product.GetProductsBySql(string.Format("SELECT * FROM EcomProducts WHERE ProductNumber in ({0}) AND ProductLanguageId = '{1}' AND ProductActive = 'True' AND ProductDefaultShopId = 'SHOP1'", string.Join(",", raptorJsonProductsList), area.EcomLanguageId)); foreach (var raptorProductNumber in raptorJsonProductsList) { var raptorProduct = raptorProducts.FirstOrDefault(x => x.Number == raptorProductNumber); if (raptorProduct != null) { if (n <= raptorNumberOfItems && raptorProduct.Price.Price >= raptorMinPrice && raptorProduct.DefaultGroup != null && (raptorProduct.Stock > 0 && raptorFunction != "GetCookieHistory" || raptorFunction == "GetCookieHistory")) { raptorProductsCollection.Add(raptorProduct); n++; } } } } } catch { } } } } return raptorProductsCollection; } }