SPRING-BIG, FOR DRAWER

Products
Exception in template (Designs\CRS\eCom/Product/Product.cshtml): System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
   at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
   at System.Collections.Generic.Dictionary`2.Enumerator.MoveNext()
   at Dynamicweb.Modules.Searching.Rules.Parser.UnescapeStrings(String s)
   at Dynamicweb.Modules.Searching.Rules.Parser.GetValue(String value)
   at Dynamicweb.Modules.Searching.Rules.Parser.ParseSimpleExpression(String expression)
   at Dynamicweb.Modules.Searching.Rules.Parser.Parse(String input)
   at Dynamicweb.Modules.ItemPublisher.FilterHelper.ToXml(String filter)
   at Dynamicweb.Modules.ItemPublisher.Frontend.GetContentBySettings(String settings)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at Dynamicweb.Extensibility.AddInManager.InvokeFunction(Object instance, String FunctionName, Object[] Params)
   at Dynamicweb.Rendering.RazorTemplateBase`1.RenderItemList(Object settings)
   at CompiledRazorTemplates.Dynamic.caaeebde.Execute()
   at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context)
   at RazorEngine.Razor.Parse[T](String razorTemplate, T model, String cacheName)
   at Dynamicweb.Rendering.Template.Output()
@inherits RazorTemplateBase<RazorTemplateModel<Template>> @using Dynamicweb.Rendering; @using System; @using System.IO; @using System.Web; @using System.Text; @using System.Collections.Generic; @using System.Text.RegularExpressions; @using DynamicwebNA.eCommerce.LiveIntegration; @using Dynamicweb.eCommerce.LiveIntegration; @{ Dynamicweb.eCommerce.LiveIntegration.ContextPriceLimiter.DisableLiveRetrieval(); var productLazyLoadingCollector = new ProductLazyLoadingCollector(); } @inherits RazorTemplateBase<RazorTemplateModel<Template>> @using Dynamicweb.Rendering; @using System.Web; @using System.Text; @using System.Linq; @using System.Web.Helpers; @using Dynamicweb.Modules.Common.CustomFields @using Dynamicweb.Modules.UserManagement @{ bool isProductPage = System.Web.HttpContext.Current.Request.QueryString["productid"] != null ? true : false; User permissionUser = User.GetCurrentUser(); bool primaryUser_PreventOrdering = false; bool secondaryUser_PreventOrdering = false; bool primaryUser_NoPricingOrOrdering = false; bool secondaryUser_NoPricingOrOrdering = false; string NoPricingOrOrderingPrimaryUser = "", NoPricingOrOrderingSecondaryUser = "", PreventOrderingPrimaryUser = "", PreventOrderingSecondaryUser = ""; if (permissionUser != null) { NoPricingOrOrderingPrimaryUser = permissionUser.CustomFieldValues.Find(g => g.CustomField.SystemName == "AccessUser_NoPricingOrOrdering").Value.ToString(); PreventOrderingPrimaryUser = permissionUser.CustomFieldValues.Find(g => g.CustomField.SystemName == "AccessUser_PreventOrdering").Value.ToString(); if (!string.IsNullOrEmpty(NoPricingOrOrderingPrimaryUser)) { primaryUser_NoPricingOrOrdering = Convert.ToBoolean(NoPricingOrOrderingPrimaryUser); } if (!string.IsNullOrEmpty(PreventOrderingPrimaryUser)) { primaryUser_PreventOrdering = Convert.ToBoolean(PreventOrderingPrimaryUser); } } if (Pageview.User.SecondaryUserID != null) { User secondaryPermissionUser = User.GetUserByID(Int32.Parse(Pageview.User.SecondaryUserID.ToString())); NoPricingOrOrderingSecondaryUser = secondaryPermissionUser.CustomFieldValues.Find(g => g.CustomField.SystemName == "AccessUser_NoPricingOrOrdering").Value.ToString(); PreventOrderingSecondaryUser = secondaryPermissionUser.CustomFieldValues.Find(g => g.CustomField.SystemName == "AccessUser_PreventOrdering").Value.ToString(); if (!string.IsNullOrEmpty(NoPricingOrOrderingSecondaryUser)) { secondaryUser_NoPricingOrOrdering = Convert.ToBoolean(NoPricingOrOrderingSecondaryUser); } if (!string.IsNullOrEmpty(PreventOrderingSecondaryUser)) { secondaryUser_PreventOrdering = Convert.ToBoolean(PreventOrderingSecondaryUser); } } bool canOrder = !Pageview.User.LoggedIn || primaryUser_NoPricingOrOrdering || secondaryUser_NoPricingOrOrdering || primaryUser_PreventOrdering || secondaryUser_PreventOrdering ? false : true; bool canSeePrices = !Pageview.User.LoggedIn || primaryUser_NoPricingOrOrdering || secondaryUser_NoPricingOrOrdering ? false : true; } @* //just for debugging <div style="display:none"> <p>canOrder = @canOrder</p> <p>canSeePrices = @canSeePrices</p> <p>primaryUser_NoPricingOrOrdering = @primaryUser_NoPricingOrOrdering</p> <p>primaryUser_PreventOrdering = @primaryUser_PreventOrdering</p> <p>secondaryUser_NoPricingOrOrdering = @secondaryUser_NoPricingOrOrdering</p>//true <p>secondaryUser_PreventOrdering = @secondaryUser_PreventOrdering - @PreventOrderingSecondaryUser</p>//true </div> *@ @{ string designName = GetString("Template:DesignBaseUrl").Replace("/Files/Templates/Designs/", "").Replace("/", ""); }@functions{ public static string GetImage(string sourceString, int imageWidth, int imageHeight, int imageWidthTablet = 0, int imageHeightTablet = 0, int imageWidthMobile = 0, int imageHeightMobile = 0, string imageFormat = "png", int imageCompression = 0, int imageCrop = 5, string background = "", string designName = "CRS") { Dynamicweb.Frontend.PageView currentPageview = Dynamicweb.Frontend.PageView.Current(); background ="#ffffff"; string currDevice = currentPageview.Device.ToString(), alternativeImage = currentPageview.Area.Item["NoImage"] != null ? currentPageview.Area.Item["NoImage"].ToString() : "/Files/Templates/Designs/"+ designName + "/images/alternativeImage.jpg", widthString = "", heightString = "", //getImageFormat = "&amp;Format=jpg", getImageFormat = "&amp;Format="+ imageFormat, getImageCompression = imageCompression != 0 ? "&amp;Compression=" + imageCompression : "", bgColor = !string.IsNullOrEmpty(background) ? "&amp;background=" + background : ""; int getImageWidth = imageWidth != 0 ? imageWidth : 0, getImageHeight = imageHeight != 0 ? imageHeight : 0; if (currDevice == Dynamicweb.Frontend.PageView.DeviceType.Tablet.ToString()) { getImageWidth = imageWidthTablet != 0 ? imageWidthTablet : getImageWidth; getImageHeight = imageHeightTablet != 0 ? imageHeightTablet : getImageHeight; } else if (currDevice == Dynamicweb.Frontend.PageView.DeviceType.Mobile.ToString()) { getImageWidth = imageWidthMobile != 0 ? imageWidthMobile : getImageWidth; getImageHeight = imageHeightMobile != 0 ? imageHeightMobile : getImageHeight; } if (getImageWidth != 0) { widthString = "&amp;Width=" + getImageWidth; } if (getImageHeight != 0) { heightString = "&amp;Height=" + getImageHeight; } string output = "/Admin/Public/GetImage.ashx?Image=" + sourceString + widthString + heightString + "&amp;altFmImage_path=" + alternativeImage + getImageFormat + getImageCompression + "&amp;Crop=" + imageCrop + bgColor; return output; } public static string CleanString(string dirtyString) { //return new String(dirtyString.Where(Char.IsLetterOrDigit).ToArray()); string removeChars = " ?&^$#@!()+-,:;<>’\'-_*"; string result = dirtyString; foreach (char c in removeChars) { result = result.Replace(c.ToString(), " "); } result.Replace(" "," "); return result; } } @* getImageFormat = imageFormat != "jpg" ? "&amp;Format=" + imageFormat : "", *@ @inherits RazorTemplateBase<RazorTemplateModel<Template>> @using Dynamicweb.Rendering; @functions{ private string GetImagePathUrl(string small, string medium, string large, string pattern) { string imagePath; if (!string.IsNullOrEmpty(small)) imagePath = small; else if (!string.IsNullOrEmpty(medium)) imagePath = medium; else if (!string.IsNullOrEmpty(large)) imagePath = large; else imagePath = pattern; return imagePath; } } @{ int hasVariants = GetInteger("Ecom:Product.VariantCount"); Dynamicweb.Content.Items.Item areaItem = Pageview.Area.Item; bool isLoggedIn = Pageview.User.LoggedIn, isFrontEnd = Dynamicweb.ExecutingContext.IsFrontEnd(), showQuantity = areaItem["ShowQuantityField"].ToString() == "True" ? true : false, productIsFavorite = GetBoolean("Ecom:Product.IsProductInFavoriteList"), isClearance = GetBoolean("Ecom:Product:Field.Product_IsClearance"), isDiscontinued = GetBoolean("Ecom:Product:Field.Product_IsDiscontinued"), isUsed = GetBoolean("Ecom:Product:Field.Product_IsUsed"), isPart = GetBoolean("Ecom:Product:Field.Product_IsPart"), isXLTD = GetBoolean("Ecom:Product:Field.Product_IsXLTD.Value.Clean"), noBackOrder = GetBoolean("Ecom:Product:Field.ProductDisallowBackOrdering.Value.Clean"), isConnectionLive = true; string rootId = isPart ? "118" : "28"; string currentPageId = Pageview.Page.ID.ToString(), variantDefaultId = GetString("Ecom:Product.DefaultVariantComboID"), variantCurrentId = GetString("Ecom:Product.VariantID"), variantId = (!string.IsNullOrEmpty(variantCurrentId)) ? variantCurrentId : variantDefaultId, titleKey = "title", title = "", imageKey = "image", fileKey = "file", image = "", unavailableText = "Pricing is currently unavailable, please check back soon", productId = GetString("Ecom:Product.ID"), ProductReferenceId = GetString("Ecom:Product:Field.ProductReferenceId"), productLanguage = GetString("Ecom:Product.LanguageID"), productName = GetString("Ecom:Product.Name"), productNumber = Regex.Replace(GetString("Ecom:Product.Number"), "-PARENT$", "", RegexOptions.IgnoreCase), imagesFolder = "/Files/Images/ProductImages/", //imagePattern = imagesFolder + productId + ".png", imagePattern = imagesFolder + ProductReferenceId + ".png", @* imagePattern = imagesFolder + ProductReferenceId + ".png", *@ //pattern = productId + "*.png", pattern = ProductReferenceId + "*.png", productImage = GetImagePathUrl(GetString("Ecom:Product.ImageSmall.Clean"), GetString("Ecom:Product.ImageMedium.Clean"), GetString("Ecom:Product.ImageLarge.Clean"), imagePattern), productGetImage = GetImage(productImage, 0, 600), productGetImageZoom = GetImage(productImage, 0, 1200,0,0,0,0,"jpg"), productCurrency = GetString("Ecom:Product.Price.Currency.Symbol"), productIntro = GetString("Ecom:Product.ShortDescription"), productDescription = GetString("Ecom:Product.LongDescription"), pointPrice = GetString("Ecom:Product.PointPrice"), productDetails = GetString("Ecom:Product:Field.Details.Value.Clean"), productWarranty = GetString("Ecom:Product:Field.Warranty.Value.Clean"), productPrice = GetString("Ecom:Product.Price"), productPriceRaw = GetString("Ecom:Product.Price.Price"), productRemoveFromList = "/Default.aspx?Id="+currentPageId+ "&amp;ProductID=" + productId +"&amp;CCRemoveFromMyLists="+productId+"&amp;CCRemoveFromListVariantID="+variantId+"&amp;CCRemoveFromListLanguageID="+productLanguage, productAddToList = "/Default.aspx?Id="+currentPageId+ "&amp;ProductID=" + productId +"&amp;CCAddToMyLists="+productId+"&amp;CCAddToListVariantID="+variantId+"&amp;CCAddToListLanguageID="+productLanguage, favoriteUrl = productIsFavorite ? productRemoveFromList : productAddToList, // Filter for downloads item downloadsFilter = "Products contains 'p_"+productId+",' or Products contains 'p_"+productId+":' or Products ends with 'p_"+productId+"'"; bool HideStockInfo = GetBoolean("Ecom:Product:Field.HideStockInfo"); List<LoopItem> loopVariantGroups = GetLoop("VariantGroups"), loopBOMProducts = GetLoop("BOMConfigurators"), loopProdPrices = GetLoop("Product.Prices"), loopDetails = GetLoop("Details"), recommendedSubstitutions = null, relatedProducts = null, optionsAccessories = null; @* List<LoopItem> loopVariantCombinations = null; *@ if (isLoggedIn && TemplatesHelper.IsWebServiceConnectionAvailable() != null){ isConnectionLive = TemplatesHelper.IsWebServiceConnectionAvailable(); } //isConnectionLive = true; @* isLoggedIn = true; *@ if(GetLoop("ProductRelatedGroups").Count > 0){ foreach (LoopItem group in GetLoop("ProductRelatedGroups")){ if(group.GetString("Ecom:Product:RelatedGroup.GroupID") == "RELGRP2"){ recommendedSubstitutions = group.GetLoop("RelatedProducts"); } if(group.GetString("Ecom:Product:RelatedGroup.GroupID") == "RELGRP1"){ relatedProducts = group.GetLoop("RelatedProducts"); } if(group.GetString("Ecom:Product:RelatedGroup.GroupID") == "RELGRP3"){ optionsAccessories = group.GetLoop("RelatedProducts"); } } } List<Dictionary<string, string>> documentsList = GetDocumentFiles("/Files/" + designName+"/Documents/" + ProductReferenceId + "/"); List<Dictionary<string, string>> softwareList = GetDocumentFiles("/Files/" + designName+"/Software/" + ProductReferenceId + "/"); List<Dictionary<string, string>> marketingList = GetDocumentFiles("/Files/" + designName+"/Marketing/" + ProductReferenceId + "/"); List<Dictionary<string, string>> bulletinsList = GetDocumentFiles("/Files/" + designName+"/Bulletins/" + ProductReferenceId + "/"); List<Dictionary<string, string>> imagesList = new List<Dictionary<string, string>>(); string folderPath = Path.GetDirectoryName(HttpContext.Current.Server.MapPath("/Files/Images/ProductImages/" + ProductReferenceId + ".png")); int productStock = noBackOrder ? GetInteger("Ecom:Product.AvailableAmount") : 99999; //stock status related int productActualStock = GetInteger("Ecom:Product.Stock"); string stockStatus = GetInteger("Ecom:Product.Stock") > 0 ? "fa-circle" : "fa-close"; string stockColor = "red"; //GetString("Ecom:Product:Stock.DeliveryUnit") string stockText = Translate("stockStatusUnavailable","Out of stock"); //GetString("Ecom:Product:Stock.Text") if (productActualStock > 26 ){ stockColor = "green"; stockText = Translate("stockStatusAvailable","In stock"); } else if (productActualStock >0) { stockColor = "yellow"; stockText = Translate("stockStatusLow","Low stock"); } if (Directory.Exists(folderPath)) { string temp = @"\"; foreach (string file in Directory.GetFiles(folderPath, pattern)) { Dictionary<string, string> dct_image = new Dictionary<string, string>(); image = "/Files/Images/ProductImages/" + file.Substring((file.LastIndexOf(@temp) + 1), (file.Length - file.LastIndexOf(@temp) - 1)); string metafield = "title"; var metadata = Dynamicweb.Content.Files.Metadata.EditorFactory.GetMetadataForFile(image); title = metadata != null ? metadata.GetValue(metafield).ToString() : productName; dct_image.Add(titleKey, title); dct_image.Add(imageKey, image); imagesList.Add(dct_image); } } // Possible files and "fontawesom" icons Dictionary<string, string> iconFiles = new Dictionary<string, string>(); iconFiles.Add("pdf", "fa-file-pdf-o"); iconFiles.Add("jpg", "fa-picture-o"); iconFiles.Add("png", "fa-picture-o"); iconFiles.Add("zip", "fa-file-archive-o"); iconFiles.Add("rar", "fa-file-archive-o"); } @{ if(!isConnectionLive){ <div class="col-md-12 attention-wrapper"><p class="bg-warning alert attention">@Translate("pricingUnavailable","Pricing is currently unavailable, please check back soon")</p></div> } } <div style="display:none"> <p>StockDeliveryText - @GetString("Ecom:Product:Stock.DeliveryText")</p> <p>Stock - @GetInteger("Ecom:Product.Stock")</p> <p>StockDeliveryUnit - @GetString("Ecom:Product:Stock.DeliveryUnit")</p> <p>StockText - @GetString("Ecom:Product:Stock.Text")</p> </div> <div id="product-container" data-pageId="@currentPageId" data-root-id="@rootId" data-productId="@productId" data-variantId="@variantId" data-group-id='@GetString("Ecom:Group.ID")' data-errorCombination1='@Translate("combinationNotAvailable","Combination not available")' data-webservicekey='@Dynamicweb.eCommerce.LiveIntegration.ProductLazyLoadingService.GenerateWebServiceUserKey()' > @if (isLoggedIn) { if (!canOrder || !isConnectionLive) { if (!canSeePrices) { //user cannot order but can see prices. We display layout without add to cart <article id="product-description" class="col-xs-12 noPadding"> @* Sidebar Start *@ <div class="col-xs-12 col-sm-3 noPaddingLeft"> <div id="product-navigation" > <div class="productDetailsBox "> <h3>PRODUCT DETAILS</h3> </div> <ul class=""> <li class=""> <a class="anchor_9" href="#optionsAccessories">Options &amp; Accessories</a> </li> <li class=""> <a class="anchor_11" href="#relatedProducts">Related products</a> </li> <li class="activeItem"> <a class="anchor_2" href="#product-information">Product Information</a> </li> <li class=""> <a class="anchor_1" href="#specifications">Specifications</a> </li> @if(isLoggedIn){ <li class=""> <a class="anchor_9" href="#replacementParts">Replacement Parts</a> </li> <li class=""> <a class="anchor_3" href="#documents">Documents</a> </li> <li class=""> <a class="anchor_10" href="#software">Software</a> </li> <li class=""> <a class="anchor_2" href="#marketing">Marketing</a> </li> <li class=""> <a class="anchor_3" href="#bulletins">Bulletins</a> </li> <li class=""> <a class="anchor_2" href="#videoZone">Video</a> </li> <li class=""> <a class="anchor_3" href="#faqsZone">FAQ &lsquo;s</a> </li> } @RenderSnippet("faqLink") </ul> </div> </div> @* Sidebar End *@ <div id="product-details" class="col-xs-9 noPadding"> <div id="product-info-wrapper" class="col-sm-6 col-xs-12"> <h2 class="product-title padding-bottom">@productName</h2> <div class="tags"> @if(isClearance){ <div class="item red"> <span>Clearance</span> </div> } @if(isDiscontinued){ <div class="item blue"> <span>Discontinued</span> </div> } </div> <div class="col-xs-12 noPadding"> @if(!string.IsNullOrEmpty(productIntro)){ <div class="col-xs-12 noPadding productIntroduction">@productIntro</div> } <p>@Translate("item", "Item #"): <span id="product__number">@productNumber</span></p> </div> @if(isLoggedIn && canSeePrices && !isDiscontinued){ if(isConnectionLive){ <div class="product-price inlineBlock" data-product-price='@productPrice'> @productPrice </div> <div id="price-table"> <table> <thead> <tr> <th>Price</th> <th>@productPrice</th> </tr> </thead> <tbody> <tr> <td>Qty 5-10</td> <td>$10.00</td> </tr> <tr> <td>Qty10+</td> <td>$5.00</td> </tr> </tbody> </table> </div> }else{ <div class="inlineBlock" data-product-price='@productPrice'> @unavailableText </div> } } @if ((!isDiscontinued) && (loopVariantGroups.Count == 0)) { if (isLoggedIn && !isUsed && productStock >= 1) { <div class="order-now"> <form name="addToCart" class="add-to-cart form-fields" action="@Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(@currentPageId)" method="post" data-outofstock='@Translate("outOfStock", "Out of stock")'> <input type="hidden" name="cartcmd" value="add"/> <input type="hidden" name="productID" value="@productId"/> <input type="hidden" name="variantID" id="variantID" value="@variantId" /> <div id="variantsContainer" class="col-xs-12 noPadding hidden2"> @if (loopVariantGroups.Count > 0) { foreach (LoopItem variantGroup in loopVariantGroups) { string variantGroupName = variantGroup.GetString("Ecom:VariantGroup.Name"); string variantGroupId = variantGroup.GetString("Ecom:VariantGroup.ID"); List<LoopItem> loopAvailableOptions = variantGroup.GetLoop("VariantAvailableOptions"); if (loopAvailableOptions.Count > 0) { <fieldset class="col-sm-12 col-xs-12 noPadding"> <label class="text-left" for="@variantGroupId">@variantGroupName</label> <select class="full-width-input" name="@(variantGroupId)_options" id="@variantGroupId"> @foreach (LoopItem option in loopAvailableOptions) { string optionId = option.GetString("Ecom:VariantOption.ID"); string optionName = option.GetString("Ecom:VariantOption.Name"); bool optionSelected = option.GetBoolean("Ecom:VariantOption.Selected"); <option value="@optionId" @((optionSelected) ? "selected" : "") >@optionName</option> } </select> </fieldset> } } } </div> @if(!HideStockInfo) { <div id="stockStatus" class="col-xs-12 noPadding"><i class="fa @stockStatus @stockColor"></i> @stockText</div> } @* <div id="stockStatus" class="col-xs-12 noPadding"><i class="fa @stockStatus @stockColor"></i> @stockText</div> *@ @if(canOrder) { <div class="col-xs-12 grayBox"> <div class="highlight-content text-right"> <fieldset class="quantity-container" style="vertical-align: middle; margin: 0px;"> <label for="quantity">@Translate("quantity", "Quantity")</label> <input data-stocktranslate='@Translate("currentStock", "The current stock is")' class="hidden quantityInput" data-stock='9999' min="1" maxlength="5" id="quantity" name="quantity" type="number" value="1"/> <select data-width="35%" name="quantitySelect"> @for (int num = 1; (num < 10) && num <= productStock; num++) { <option value="@num">@num</option> } @if (productStock >= 10) { <option value="10+">10+</option> } </select> @* <input id="quantity" name="quantity" data-stock="99999" type="number" value="1" style="margin: 0; vertical-align: middle; max-width: 4em; text-align: right; margin-right: 0.5em;" /> *@ </fieldset> <a class="btn btn-bg" id="addToCartSubmit"> <i class="fa fa-shopping-cart"></i> <span data-add='@Translate("addToCart", "Add to cart")' data-added='@Translate("added", "Added")'>@Translate("addToCart", "Add to Cart")</span> </a> @if (GetBoolean("Ecom:Product.CanBuyForPoints")) { <a class="btn btn-bg" id="addToCartPointsSubmit"> <i class="fa fa-shopping-cart"></i> <span data-add='@Translate("addWithPoints", "Add with points")' data-added='@Translate("added", "Added")'>@Translate("addWithPoints", "Add with points")</span> </a> } </div> </div> <input class="hidden" type="submit" value='@Translate("addToCart", "Add to Cart")' /> } </form> </div> } } else { if (isDiscontinued){ <div class="order-now"> <p>@Translate("partsOnly", "Parts only")</p> </div> } } <div class="col-xs-12 noPadding"> <div class="shareIcons"> <span>@Translate("share", "Share")</span> <ul> <li> <a class="fa-facebook fa" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=@(Pageview.GlobalTags.GetTagByName("Global:Request.Scheme").Value.ToString())://@(Pageview.GlobalTags.GetTagByName("Global:Request.Host").Value.ToString())@(Pageview.GlobalTags.GetTagByName("Global:Pageview.Url").Value.ToString())"><span>@Translate("shareFacebook", "Share facebook")</span></a> </li> <li> <a class="fa-twitter fa" target="_blank" href="https://twitter.com/home?status=@(Pageview.GlobalTags.GetTagByName("Global:Request.Scheme").Value.ToString())://@(Pageview.GlobalTags.GetTagByName("Global:Request.Host").Value.ToString())@(Pageview.GlobalTags.GetTagByName("Global:Pageview.Url").Value.ToString())"><span>@Translate("shareTwitter", "Share twitter")</span></a> </li> <li> <a class="fa-linkedin fa" target="_blank" href="https://www.linkedin.com/shareArticle?mini=true&url=@(Pageview.GlobalTags.GetTagByName("Global:Request.Scheme").Value.ToString())://@(Pageview.GlobalTags.GetTagByName("Global:Request.Host").Value.ToString())@(Pageview.GlobalTags.GetTagByName("Global:Pageview.Url").Value.ToString())&title=@productName&summary=@productIntro&source="><span>@Translate("shareLinkedin", "Share linkedin")</span></a> </li> </ul> </div> </div> @RenderSnippet("RecommendedSubstitutions") </div> @* Product Images Start *@ <div id="product-images" class="col-sm-6 col-xs-12 noPadding"> <div id="product-lg-image" class="col-xs-12 noPaddingLeft"> <figure class="text-center"> <img class="img-responsive" src="@productGetImage" alt="@CleanString(productName)" title="@CleanString(productName)" data-zoom="@productGetImageZoom" /> <div class="hidden" id="videoContainer"> <a id="playPause" href="#"><i class="fa fa-play"></i></a> <video id="video" width="100%" src=""> Your browser does not support the video tag. </video> </div> </figure> </div> @if(imagesList.Count() > 0) { <div class="col-xs-12"> <div id="imgThumbs" class="col-xs-12 noPaddingLeft"> <ul> @foreach (System.Collections.Generic.Dictionary<String, String> imageStr in imagesList) { bool isAnImage = imageStr["image"].ToString().Contains(".png"); string getimageImg = GetImage(imageStr["image"].ToString(), 0, 105), getimageDataImg = isAnImage ? GetImage(imageStr["image"].ToString(), 600, 600) : imageStr["image"].ToString(), getimageDataImgBig = isAnImage ? GetImage(imageStr["image"].ToString(), 1200, 1200, 0, 0, 0, 0, "jpg") : imageStr["image"].ToString(), liClass = imagesList.IndexOf(imageStr) == 0 ? "active" : ""; <li data-type='@imageStr["image"].ToString().Substring(imageStr["image"].ToString().LastIndexOf('/') + 1).Replace(productNumber, "").Replace(".jpg","").Replace(".mp4","")' class="@liClass"> @if(isAnImage) { <img data-image="@getimageDataImg" data-image-big="@getimageDataImgBig" class="img-responsive" src="@getimageImg" title="@CleanString(imageStr["title"])" alt="@CleanString(imageStr["title"])" /> } else { <video data-image="@getimageDataImg" width="100%" src="@getimageDataImg">Your browser does not support the video tag.</video> } </li> } </ul> </div> </div> } </div> @* Product Images End *@ </div> @* Product Sections Start *@ <div class="product-sections col-sm-offset-3 col-sm-9 col-xs-12 noPadding"> <div class="col-xs-12"> <div class="row"> @if((!isDiscontinued) && (loopVariantGroups.Count > 0)) { var iteration = 1; <section class="order-now order-now-configuration grayBox col-xs-12"> <h3 style="padding: 0px; margin: 0px; border: none; background-color: transparent; line-height: 2; border-bottom: 1px solid #000; margin-bottom: 0.5em;">Configuration</h3> <form name="addToCart" class="add-to-cart form-fields" action="@Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(@currentPageId)" method="post" data-outofstock='@Translate("outOfStock", "Out of stock")'> <input type="hidden" name="cartcmd" value="add"/> <input type="hidden" name="productID" value="@productId"/> <input type="hidden" name="variantID" id="variantID" value="@variantId" /> <div class="row"> <div id="variantsContainer" class="col-xs-6"></div> <div id="partsContainer" class="col-xs-6"> @foreach(LoopItem BOMProducts in loopBOMProducts){ string BOMName = BOMProducts.GetString("Ecom:Product.Configurator.Name"); string BOMId = BOMProducts.GetString("Ecom:Product.Configurator.ID"); <fieldset class="col-sm-12 col-xs-12 noPadding"> <label class="text-left" for="@BOMId">@BOMName</label> <select class="variant full-width-input" name="@(BOMId)" id="@BOMId" bom-value=""> @foreach(LoopItem BOMItem in BOMProducts.GetLoop("ConfiguratorProducts")) { string optionId = BOMItem.GetString("Ecom:Product.ID"); string optionVariantId = null; string optionNumber = BOMItem.GetString("Ecom:Product.Number"); string optionName = BOMItem.GetString("Ecom:Product.Name"); string optionPrice = BOMItem.GetString("Ecom:Product.ActualPrice"); productLazyLoadingCollector.AddProduct(optionId, optionVariantId, optionNumber); <option value="@optionId" data-option-price='@optionPrice'>@optionName</option> } </select> </fieldset> } </div> </div> @if (isLoggedIn && canOrder) { <div class="highlight-content text-center"> @* @if(showQuantity && productStock > 0) { *@ <fieldset class="quantity-container"> <label for="quantity">@Translate("quantity","Quantity")</label> <input data-stocktranslate='@Translate("currentStock","The current stock is")' class="hidden quantityInput" data-stock='9999' maxlength="5" id="quantity" name="quantity" type="number" value="1"/> <select data-width="50%" name="quantitySelect"> @for(int num=1; (num < 10) && num <= productStock; num++){ <option value="@num">@num</option> } @if(productStock >= 10) { <option value="10+">10+</option> } </select> @* <input id="quantity" class="quantity" data-stock="99999" name="quantity" type="number" value="1"/> *@ </fieldset> @* } *@ <a class="btn btn-bg" id="addToCartSubmit"> <i class="fa fa-shopping-cart"></i> <span data-add='@Translate("addToCart", "Add to cart")' data-added='@Translate("added", "Added")'>@Translate("addToCart", "Add to Cart")</span> </a> @if(GetBoolean("Ecom:Product.CanBuyForPoints")) { <a class="btn btn-bg" id="addToCartPointsSubmit"> <i class="fa fa-shopping-cart"></i> <span data-add='@Translate("addWithPoints", "Add with points")' data-added='@Translate("added", "Added")'>@Translate("addWithPoints", "Add with points")</span> </a> } </div> } <input class="hidden" type="submit" value='@Translate("addToCart", "Add to Cart")' /> </form> </section> } </div> </div> @RenderSnippet("OptionsAccessories") @RenderSnippet("RelatedProducts") @if (!string.IsNullOrEmpty(productDescription)) { <section id="product-information" class="col-xs-12 noPadding"> <h3>Product information</h3> <div class="col-xs-12 product-information"> @productDescription </div> </section> } @if (!string.IsNullOrEmpty(productDetails)) { <section id="specifications" class="col-xs-12 noPadding"> <h3>Specifications</h3> <div class="col-xs-12 product-specifications"> @productDetails </div> </section> } @if(isLoggedIn){ @RenderSnippet("replacementParts") if (documentsList.Any() || loopDetails.Any()) { <section id="documents" class="col-xs-12 noPadding"> <h3>Documents</h3> <div class="col-xs-12" id="productDdownloads_tab"> <ul> @if (documentsList.Any()) { @*Product related files*@ foreach (System.Collections.Generic.Dictionary<String, String> fileStr in documentsList) { string file = fileStr["file"]; var metadata = Dynamicweb.Content.Files.Metadata.EditorFactory.GetMetadataForFile(file); string temp = @".", metafield = "title", fileName = file.Substring((file.LastIndexOf("/") + 1), (file.Length - file.LastIndexOf("/") - 1)), fileTitle = metadata != null && metadata.GetValue(metafield).ToString() != "" ? metadata.GetValue(metafield).ToString() : fileName, substringFile = file.Substring((file.LastIndexOf(temp) + 1), (file.Length - file.LastIndexOf(temp) - 1)), icon = iconFiles.ContainsKey(substringFile) ? iconFiles[substringFile] : "fa-file-pdf-o"; if (substringFile != "xml") { <li> <a class="downloadFile" href="@file"><i class='fa @icon'></i> @fileTitle</a> </li> } } } @if (loopDetails.Any()) { @*Shared files*@ foreach (LoopItem detail in loopDetails.Where(x => x.GetString("Ecom:Product:Detail.Image.Clean").StartsWith("/Files/CRS/_Shared/Documents/"))) { string file = detail.GetString("Ecom:Product:Detail.Image.Clean"); var metadata = Dynamicweb.Content.Files.Metadata.EditorFactory.GetMetadataForFile(file); string temp = @".", metafield = "title", fileTitle = metadata != null ? metadata.GetValue(metafield).ToString() : Translate("download", "Download"), substringFile = file.Substring((file.LastIndexOf(temp) + 1), (file.Length - file.LastIndexOf(temp) - 1)), icon = iconFiles.ContainsKey(substringFile) ? iconFiles[substringFile] : "fa-file-pdf-o"; <li> <a class="downloadFile" href="@file"><i class='fa @icon'></i> @fileTitle</a> </li> } } </ul> </div> </section> } if (softwareList.Any() || loopDetails.Any()) { <section id="software" class="col-xs-12 noPadding"> <h3>Software gggg</h3> <div class="col-xs-12" id="productDdownloads_tab"> <ul> @if (softwareList.Any()) { @*Product related files*@ foreach (System.Collections.Generic.Dictionary<String, String> fileStr in softwareList) { string file = fileStr["file"]; var metadata = Dynamicweb.Content.Files.Metadata.EditorFactory.GetMetadataForFile(file); string temp = @".", metafield = "title", fileName = file.Substring((file.LastIndexOf("/") + 1), (file.Length - file.LastIndexOf("/") - 1)), fileTitle = metadata != null && metadata.GetValue(metafield).ToString() != "" ? metadata.GetValue(metafield).ToString() : fileName, substringFile = file.Substring((file.LastIndexOf(temp) + 1), (file.Length - file.LastIndexOf(temp) - 1)), icon = iconFiles.ContainsKey(substringFile) ? iconFiles[substringFile] : "fa-file-pdf-o"; if (substringFile != "xml") { <li> <a class="downloadFile" href="@file"><i class='fa @icon'></i> @fileTitle</a> </li> } } } @if (loopDetails.Any()) { @*Shared files*@ foreach (LoopItem detail in loopDetails.Where(x => x.GetString("Ecom:Product:Detail.Image.Clean").StartsWith("/Files/CRS/_Shared/Software/"))) { string file = detail.GetString("Ecom:Product:Detail.Image.Clean"); var metadata = Dynamicweb.Content.Files.Metadata.EditorFactory.GetMetadataForFile(file); string temp = @".", metafield = "title", fileTitle = metadata != null ? metadata.GetValue(metafield).ToString() : Translate("download", "Download"), substringFile = file.Substring((file.LastIndexOf(temp) + 1), (file.Length - file.LastIndexOf(temp) - 1)), icon = iconFiles.ContainsKey(substringFile) ? iconFiles[substringFile] : "fa-file-pdf-o"; <li> <a class="downloadFile" href="@file"><i class='fa @icon'></i> @fileTitle</a> </li> } } </ul> </div> </section> } if(marketingList.Any() || loopDetails.Any()) { <section id="marketing" class="col-xs-12 noPadding"> <h3>Marketing</h3> <div class="col-xs-12" id="productDdownloads_tab"> <ul> @if (marketingList.Any()) { @*Product related files*@ foreach (System.Collections.Generic.Dictionary<String, String> fileStr in marketingList) { string file = fileStr["file"]; var metadata = Dynamicweb.Content.Files.Metadata.EditorFactory.GetMetadataForFile(file); string temp = @".", metafield = "title", fileName = file.Substring((file.LastIndexOf("/") + 1), (file.Length - file.LastIndexOf("/") - 1)), fileTitle = metadata != null && metadata.GetValue(metafield).ToString() != "" ? metadata.GetValue(metafield).ToString() : fileName, substringFile = file.Substring((file.LastIndexOf(temp) + 1), (file.Length - file.LastIndexOf(temp) - 1)), icon = iconFiles.ContainsKey(substringFile) ? iconFiles[substringFile] : "fa-file-pdf-o"; if (substringFile != "xml") { <li> <a class="downloadFile" href="@file"><i class='fa @icon'></i> @fileTitle</a> </li> } } } @if (loopDetails.Any()) { foreach (LoopItem detail in loopDetails.Where(x => x.GetString("Ecom:Product:Detail.Image.Clean").StartsWith("/Files/CRS/_Shared/Marketing/"))) { string file = detail.GetString("Ecom:Product:Detail.Image.Clean"); var metadata = Dynamicweb.Content.Files.Metadata.EditorFactory.GetMetadataForFile(file); string temp = @".", metafield = "title", fileTitle = metadata != null ? metadata.GetValue(metafield).ToString() : Translate("download", "Download"), substringFile = file.Substring((file.LastIndexOf(temp) + 1), (file.Length - file.LastIndexOf(temp) - 1)), icon = iconFiles.ContainsKey(substringFile) ? iconFiles[substringFile] : "fa-file-pdf-o"; <li> <a class="downloadFile" href="@file"><i class='fa @icon'></i> @fileTitle</a> </li> } } </ul> </div> </section> } if (loopDetails.Any() || bulletinsList.Any()) { <section id="bulletins" class="col-xs-12 noPadding"> <h3>Bulletins</h3> <div class="col-xs-12" id="productDdownloads_tab"> <ul> @if (bulletinsList.Any()) { @*Product related files*@ foreach (System.Collections.Generic.Dictionary<String, String> fileStr in bulletinsList) { string file = fileStr["file"]; var metadata = Dynamicweb.Content.Files.Metadata.EditorFactory.GetMetadataForFile(file); string temp = @".", metafield = "title", fileName = file.Substring((file.LastIndexOf("/") + 1), (file.Length - file.LastIndexOf("/") - 1)), fileTitle = metadata != null && metadata.GetValue(metafield).ToString() != "" ? metadata.GetValue(metafield).ToString() : fileName, substringFile = file.Substring((file.LastIndexOf(temp) + 1), (file.Length - file.LastIndexOf(temp) - 1)), icon = iconFiles.ContainsKey(substringFile) ? iconFiles[substringFile] : "fa-file-pdf-o"; if (substringFile != "xml") { <li> <a class="downloadFile" href="@file"><i class='fa @icon'></i> @fileTitle</a> </li> } } } @if (loopDetails.Any()) { foreach (LoopItem detail in loopDetails.Where(x => x.GetString("Ecom:Product:Detail.Image.Clean").StartsWith("/Files/CRS/_Shared/Bulletins/"))) { string file = detail.GetString("Ecom:Product:Detail.Image.Clean"); var metadata = Dynamicweb.Content.Files.Metadata.EditorFactory.GetMetadataForFile(file); string temp = @".", metafield = "title", fileTitle = metadata != null ? metadata.GetValue(metafield).ToString() : Translate("download", "Download"), substringFile = file.Substring((file.LastIndexOf(temp) + 1), (file.Length - file.LastIndexOf(temp) - 1)), icon = iconFiles.ContainsKey(substringFile) ? iconFiles[substringFile] : "fa-file-pdf-o"; <li> <a class="downloadFile" href="@file"><i class='fa @icon'></i> @fileTitle</a> </li> } } </ul> </div> </section> } } @RenderSnippet("videoList") @RenderSnippet("faqs") </div> @* Product Sections End *@ @SnippetStart("RecommendedSubstitutions") @if (recommendedSubstitutions != null && recommendedSubstitutions.Count > 0) { <div class="col-xs-12 noPadding relatedContainer"> <h4 class="productTitles">@Translate("recommendedSubstitutions", "Recommended Substitutions")</h4> <ul class="relatedList-bkp"> @foreach (LoopItem productItem in recommendedSubstitutions) { string relatedProductId = productItem.GetString("Ecom:Product.ID"), relatedProductName = productItem.GetString("Ecom:Product.Name"), relatedProductNumber = productItem.GetString("Ecom:Product.Number"), relatedProductLink = productItem.GetString("Ecom:Product.PrimaryOrCurrentPageID") != Pageview.Page.ID.ToString() ? "/Default.aspx?ID=" + productItem.GetString("Ecom:Product.PrimaryOrCurrentPageID") + "&ProductID=" + productItem.GetString("Ecom:Product.ID") : "/Default.aspx?ID=" + Pageview.Page.ID.ToString() + "&ProductID=" + productItem.GetString("Ecom:Product.ID"); <li class=""> <h5><a href="@relatedProductLink">@relatedProductName (@relatedProductNumber)</a></h5> </li> } </ul> </div> } @SnippetEnd("RecommendedSubstitutions") @SnippetStart("RelatedProducts") @if (relatedProducts != null && relatedProducts.Count > 0) { <section id="relatedProducts" class="col-xs-12 noPadding"> <div class="col-xs-12 noPadding relatedProducts"> <h3>@Translate("relatedProducts", "Related Products")</h3> <div class="col-xs-12"> <ul class="slick-related relatedList row"> @foreach (LoopItem productItem in relatedProducts) { string relatedProductId = productItem.GetString("Ecom:Product.ID"), relatedProductName = productItem.GetString("Ecom:Product.Name"), relatedProductNumber = productItem.GetString("Ecom:Product.Number"), relatedProductLink = productItem.GetString("Ecom:Product.PrimaryOrCurrentPageID") != Pageview.Page.ID.ToString() ? "/Default.aspx?ID=" + productItem.GetString("Ecom:Product.PrimaryOrCurrentPageID") + "&ProductID=" + productItem.GetString("Ecom:Product.ID") : "/Default.aspx?ID=" + Pageview.Page.ID.ToString() + "&ProductID=" + productItem.GetString("Ecom:Product.ID"), relatedImage = (!string.IsNullOrEmpty(productItem.GetString("Ecom:Product.ImageSmall.Clean"))) ? productItem.GetString("Ecom:Product.ImageSmall.Clean") : "/Files/Files/" + designName + "/Products/Images/" + relatedProductNumber + ".jpg"; <li class="item col-md-3 col-sm-4 col-xs-12"> <figure> <a href="@relatedProductLink"> <img src="@GetImage(relatedImage, 300, 0, 0, 0, 0, 0, "jpg")" alt="@relatedProductName" title="@relatedProductName" class="img-responsive" /> </a> </figure> <h3><a href="@relatedProductLink">@relatedProductName</a></h3> </li> } </ul> </div> </div> </section> } @SnippetEnd("RelatedProducts") @SnippetStart("OptionsAccessories") @if (optionsAccessories != null && optionsAccessories.Count > 0) { <section id="optionsAccessories" class="col-xs-12 noPadding"> <div class="col-xs-12 noPadding relatedProducts"> <h3>@Translate("optionsAccessories", "Options & Accessories")</h3> <div class="col-xs-12"> <table width="100%" class="table-product-list"> @if (isLoggedIn) { <colgroup> <col style="width: 20%"> <col style="width: 20%"> <col style="width: 30%"> <col style="width: 15%"> <col style="max-width:30px;"> <col style="width: 7.5%"> </colgroup> <thead> <tr> <th></th> <th>Product Number</th> <th>Description</th> </tr> </thead> } else { <colgroup> <col style="width: 20%"> <col style="width: 20%"> <col style="width: 45%"> <col style="max-width:30px;"> <col style="width: 7.5%"> </colgroup> <thead> <tr> <th></th> <th>Product Number</th> <th>Description</th> </tr> </thead> } <tbody ref="update-option-table" data-load-list="@productId" data-logged-in="@isLoggedIn"> <tr> <td colspan="6" align="center"> <i class="fa fa-spinner fa-spin fa-3x fa-fw"></i> <span class="sr-only">Loading...</span> </td> </tr> </tbody> </table> </div> <div class="col-xs-12 action"> <button type="button" ref="more-options" data-id="@productId" class="btn btn-bg">@Translate("More", "More")</button> </div> </div> </section> } @SnippetEnd("OptionsAccessories") @SnippetStart("faqs") @{string str_filter = "Products contains '" + productId + "'";} @RenderItemList(new { ItemType = "Faqs", ListSourceType = "Page", ListSourcePage = 64, ItemFieldsList = "*", ListTemplate = "ItemPublisher/List/ProductFaqs.cshtml", ListPageSize = 500, IncludeParagraphItems = "True", ListOrderBy = "Question", Filter = @str_filter }) @SnippetEnd("faqs") @SnippetStart("videoList") @{var video_filter = "Products contains '" + productId + "'"; } @RenderItemList(new { ItemType = "VideoGallery", ListSourceType = "Page", ListSourcePage = 153, ItemFieldsList = "*", ListTemplate = "ItemPublisher/List/ProductGallery.cshtml", ListPageSize = 20, IncludeParagraphItems = "True", ListOrderBy = "Title", Filter = @video_filter }) @SnippetEnd("videoList") @SnippetStart("replacementParts") @{var blowout_filter = "Products_Associated contains '" + productId + "'"; } @RenderItemList(new { ItemType = "Blowout_Diagram", ListSourceType = "Page", ListSourcePage = 154, ItemFieldsList = "*", ListTemplate = "ItemPublisher/List/ProductBlowoutDiagrams_noOrder.cshtml", ListPageSize = 20, IncludeParagraphItems = "True", ListOrderBy = "Serial_Number_Start", Filter = @blowout_filter }) @SnippetEnd("replacementParts") @* <!-- Related --> @if(GetLoop("ProductRelatedGroups").Count > 0){ <div class="col-xs-12 noPadding" id="relatedContainer"> @foreach (LoopItem group in GetLoop("ProductRelatedGroups")){ List<LoopItem> relatedProducts = group.GetLoop("RelatedProducts"); if(relatedProducts.Count > 0){ <div class="col-xs-12 noPadding relatedContainer"> <h2 class="productTitles">@group.GetString("Ecom:Product:RelatedGroup.Name") @group.GetString("Ecom:Product:RelatedGroup.GroupID")</h2> <ul class="relatedList row"> @foreach (LoopItem productItem in relatedProducts){ string relatedProductId = productItem.GetString("Ecom:Product.ID"), relatedProductName = productItem.GetString("Ecom:Product.Name"), relatedProductNumber = productItem.GetString("Ecom:Product.Number"), relatedProductLink = productItem.GetString("Ecom:Product.PrimaryOrCurrentPageID") != Pageview.Page.ID.ToString() ? "/Default.aspx?ID=" + productItem.GetString("Ecom:Product.PrimaryOrCurrentPageID") + "&ProductID=" + productItem.GetString("Ecom:Product.ID") : "/Default.aspx?ID=" + Pageview.Page.ID.ToString() + "&ProductID=" + productItem.GetString("Ecom:Product.ID"), relatedImage = (!string.IsNullOrEmpty(productItem.GetString("Ecom:Product.ImageSmall.Clean"))) ? productItem.GetString("Ecom:Product.ImageSmall.Clean") : "/Files/Files/"+designName+"/Products/Images/" + relatedProductNumber + ".jpg"; <li class="col-md-3 col-sm-4 col-xs-12"> <figure> <a href="@relatedProductLink"> <img src="@GetImage(relatedImage, 300, 0, 0, 0, 0, 0, "jpg")" alt="@relatedProductName" title="@relatedProductName" class="img-responsive" /> </a> </figure> <h3><a href="@relatedProductLink">@relatedProductName</a></h3> </li> } </ul> </div> } } </div> } *@ </article> } else { <article id="product-description" class="col-xs-12 noPadding"> @* Sidebar Start *@ <div class="col-xs-12 col-sm-3 noPaddingLeft"> <div id="product-navigation" > <div class="productDetailsBox "> <h3>PRODUCT DETAILS</h3> </div> <ul class=""> <li class=""> <a class="anchor_9" href="#optionsAccessories">Options &amp; Accessories</a> </li> <li class=""> <a class="anchor_11" href="#relatedProducts">Related products</a> </li> <li class="activeItem"> <a class="anchor_2" href="#product-information">Product Information</a> </li> <li class=""> <a class="anchor_1" href="#specifications">Specifications</a> </li> @if(isLoggedIn){ <li class=""> <a class="anchor_9" href="#replacementParts">Replacement Parts</a> </li> <li class=""> <a class="anchor_3" href="#documents">Documents</a> </li> <li class=""> <a class="anchor_10" href="#software">Software</a> </li> <li class=""> <a class="anchor_2" href="#marketing">Marketing</a> </li> <li class=""> <a class="anchor_3" href="#bulletins">Bulletins</a> </li> <li class=""> <a class="anchor_2" href="#videoZone">Video</a> </li> <li class=""> <a class="anchor_3" href="#faqsZone">FAQ &lsquo;s</a> </li> } @RenderSnippet("faqLink") </ul> </div> </div> @* Sidebar End *@ <div id="product-details" class="col-xs-9 noPadding"> <div id="product-info-wrapper" class="col-sm-6 col-xs-12"> <h2 class="product-title padding-bottom">@productName</h2> <div class="tags"> @if(isClearance){ <div class="item red"> <span>Clearance</span> </div> } @if(isDiscontinued){ <div class="item blue"> <span>Discontinued</span> </div> } </div> <div class="col-xs-12 noPadding"> @if(!string.IsNullOrEmpty(productIntro)){ <div class="col-xs-12 noPadding productIntroduction">@productIntro</div> } <p>@Translate("item", "Item #"): <span id="product__number">@productNumber</span></p> </div> @if(isLoggedIn && canSeePrices && !isDiscontinued){ if(isConnectionLive){ <div class="product-price inlineBlock" data-product-price='@productPrice'> @productPrice </div> <div id="price-table"> <table> <thead> <tr> <th>Price</th> <th>@productPrice</th> </tr> </thead> <tbody> <tr> <td>Qty 5-10</td> <td>$10.00</td> </tr> <tr> <td>Qty10+</td> <td>$5.00</td> </tr> </tbody> </table> </div> }else{ <div class="inlineBlock" data-product-price='@productPrice'> @unavailableText </div> } } @if ((!isDiscontinued) && (loopVariantGroups.Count == 0)) { if (isLoggedIn && !isUsed && productStock >= 1) { <div class="order-now"> <form name="addToCart" class="add-to-cart form-fields" action="@Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(@currentPageId)" method="post" data-outofstock='@Translate("outOfStock", "Out of stock")'> <input type="hidden" name="cartcmd" value="add"/> <input type="hidden" name="productID" value="@productId"/> <input type="hidden" name="variantID" id="variantID" value="@variantId" /> <div id="variantsContainer" class="col-xs-12 noPadding hidden2"> @if (loopVariantGroups.Count > 0) { foreach (LoopItem variantGroup in loopVariantGroups) { string variantGroupName = variantGroup.GetString("Ecom:VariantGroup.Name"); string variantGroupId = variantGroup.GetString("Ecom:VariantGroup.ID"); List<LoopItem> loopAvailableOptions = variantGroup.GetLoop("VariantAvailableOptions"); if (loopAvailableOptions.Count > 0) { <fieldset class="col-sm-12 col-xs-12 noPadding"> <label class="text-left" for="@variantGroupId">@variantGroupName</label> <select class="full-width-input" name="@(variantGroupId)_options" id="@variantGroupId"> @foreach (LoopItem option in loopAvailableOptions) { string optionId = option.GetString("Ecom:VariantOption.ID"); string optionName = option.GetString("Ecom:VariantOption.Name"); bool optionSelected = option.GetBoolean("Ecom:VariantOption.Selected"); <option value="@optionId" @((optionSelected) ? "selected" : "") >@optionName</option> } </select> </fieldset> } } } </div> @if(!HideStockInfo) { <div id="stockStatus" class="col-xs-12 noPadding"><i class="fa @stockStatus @stockColor"></i> @stockText</div> } @*<div id="stockStatus" class="col-xs-12 noPadding"><i class="fa @stockStatus @stockColor"></i> @stockText</div> *@ @if(canOrder && isConnectionLive) { <div class="col-xs-12 grayBox"> <div class="highlight-content text-right"> <fieldset class="quantity-container" style="vertical-align: middle; margin: 0px;"> <label for="quantity">@Translate("quantity", "Quantity")</label> <input data-stocktranslate='@Translate("currentStock", "The current stock is")' class="hidden quantityInput" data-stock='9999' min="1" maxlength="5" id="quantity" name="quantity" type="number" value="1"/> <select data-width="35%" name="quantitySelect"> @for (int num = 1; (num < 10) && num <= productStock; num++) { <option value="@num">@num</option> } @if (productStock >= 10) { <option value="10+">10+</option> } </select> @* <input id="quantity" name="quantity" data-stock="99999" type="number" value="1" style="margin: 0; vertical-align: middle; max-width: 4em; text-align: right; margin-right: 0.5em;" /> *@ </fieldset> <a class="btn btn-bg" id="addToCartSubmit"> <i class="fa fa-shopping-cart"></i> <span data-add='@Translate("addToCart", "Add to cart")' data-added='@Translate("added", "Added")'>@Translate("addToCart", "Add to Cart")</span> </a> @if (GetBoolean("Ecom:Product.CanBuyForPoints")) { <a class="btn btn-bg" id="addToCartPointsSubmit"> <i class="fa fa-shopping-cart"></i> <span data-add='@Translate("addWithPoints", "Add with points")' data-added='@Translate("added", "Added")'>@Translate("addWithPoints", "Add with points")</span> </a> } </div> </div> <input class="hidden" type="submit" value='@Translate("addToCart", "Add to Cart")' /> } </form> </div> } } else { if (isDiscontinued){ <div class="order-now"> <p>@Translate("partsOnly", "Parts only")</p> </div> } } <div class="col-xs-12 noPadding"> <div class="shareIcons"> <span>@Translate("share", "Share")</span> <ul> <li> <a class="fa-facebook fa" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=@(Pageview.GlobalTags.GetTagByName("Global:Request.Scheme").Value.ToString())://@(Pageview.GlobalTags.GetTagByName("Global:Request.Host").Value.ToString())@(Pageview.GlobalTags.GetTagByName("Global:Pageview.Url").Value.ToString())"><span>@Translate("shareFacebook", "Share facebook")</span></a> </li> <li> <a class="fa-twitter fa" target="_blank" href="https://twitter.com/home?status=@(Pageview.GlobalTags.GetTagByName("Global:Request.Scheme").Value.ToString())://@(Pageview.GlobalTags.GetTagByName("Global:Request.Host").Value.ToString())@(Pageview.GlobalTags.GetTagByName("Global:Pageview.Url").Value.ToString())"><span>@Translate("shareTwitter", "Share twitter")</span></a> </li> <li> <a class="fa-linkedin fa" target="_blank" href="https://www.linkedin.com/shareArticle?mini=true&url=@(Pageview.GlobalTags.GetTagByName("Global:Request.Scheme").Value.ToString())://@(Pageview.GlobalTags.GetTagByName("Global:Request.Host").Value.ToString())@(Pageview.GlobalTags.GetTagByName("Global:Pageview.Url").Value.ToString())&title=@productName&summary=@productIntro&source="><span>@Translate("shareLinkedin", "Share linkedin")</span></a> </li> </ul> </div> </div> @RenderSnippet("RecommendedSubstitutions") </div> @* Product Images Start *@ <div id="product-images" class="col-sm-6 col-xs-12 noPadding"> <div id="product-lg-image" class="col-xs-12 noPaddingLeft"> <figure class="text-center"> <img class="img-responsive" src="@productGetImage" alt="@CleanString(productName)" title="@CleanString(productName)" data-zoom="@productGetImageZoom" /> <div class="hidden" id="videoContainer"> <a id="playPause" href="#"><i class="fa fa-play"></i></a> <video id="video" width="100%" src=""> Your browser does not support the video tag. </video> </div> </figure> </div> @if(imagesList.Count() > 0) { <div class="col-xs-12"> <div id="imgThumbs" class="col-xs-12 noPaddingLeft"> <ul> @foreach (System.Collections.Generic.Dictionary<String, String> imageStr in imagesList) { bool isAnImage = imageStr["image"].ToString().Contains(".png"); string getimageImg = GetImage(imageStr["image"].ToString(), 0, 105), getimageDataImg = isAnImage ? GetImage(imageStr["image"].ToString(), 600, 600) : imageStr["image"].ToString(), getimageDataImgBig = isAnImage ? GetImage(imageStr["image"].ToString(), 1200, 1200, 0, 0, 0, 0, "jpg") : imageStr["image"].ToString(), liClass = imagesList.IndexOf(imageStr) == 0 ? "active" : ""; <li data-type='@imageStr["image"].ToString().Substring(imageStr["image"].ToString().LastIndexOf('/') + 1).Replace(productNumber, "").Replace(".jpg","").Replace(".mp4","")' class="@liClass"> @if(isAnImage) { <img data-image="@getimageDataImg" data-image-big="@getimageDataImgBig" class="img-responsive" src="@getimageImg" title="@CleanString(imageStr["title"])" alt="@CleanString(imageStr["title"])" /> } else { <video data-image="@getimageDataImg" width="100%" src="@getimageDataImg">Your browser does not support the video tag.</video> } </li> } </ul> </div> </div> } </div> @* Product Images End *@ </div> @* Product Sections Start *@ <div class="product-sections col-sm-offset-3 col-sm-9 col-xs-12 noPadding"> <div class="col-xs-12"> <div class="row"> @if((!isDiscontinued) && (loopVariantGroups.Count > 0)) { var iteration = 1; <section class="order-now order-now-configuration grayBox col-xs-12"> <h3 style="padding: 0px; margin: 0px; border: none; background-color: transparent; line-height: 2; border-bottom: 1px solid #000; margin-bottom: 0.5em;">Configuration</h3> <form name="addToCart" class="add-to-cart form-fields" action="@Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(@currentPageId)" method="post" data-outofstock='@Translate("outOfStock", "Out of stock")'> <input type="hidden" name="cartcmd" value="add"/> <input type="hidden" name="productID" value="@productId"/> <input type="hidden" name="variantID" id="variantID" value="@variantId" /> <div class="row"> <div id="variantsContainer" class="col-xs-6"> @foreach(LoopItem variantGroup in loopVariantGroups){ string variantGroupName = variantGroup.GetString("Ecom:VariantGroup.Name"); string variantGroupId = variantGroup.GetString("Ecom:VariantGroup.ID"); List<LoopItem> loopAvailableOptions = variantGroup.GetLoop("VariantAvailableOptions"); if(loopAvailableOptions.Count > 0){ <fieldset class="col-sm-12 col-xs-12 noPadding"> <label class="text-left" for="@variantGroupId">@variantGroupName</label> <select class="full-width-input" name='@(iteration == 1 ? "VARGRP1" : variantGroupId)_options' id='@(iteration == 1 ? "VARGRP1" : variantGroupId)' ref="VARGRP@(iteration)" data-ignore-select='@(iteration == (loopVariantGroups.Count) ? true : false)'> @foreach(LoopItem option in loopAvailableOptions){ string optionId = option.GetString("Ecom:VariantOption.ID"); string optionName = option.GetString("Ecom:VariantOption.Name"); bool optionSelected = option.GetBoolean("Ecom:VariantOption.Selected"); <option value="@optionId">@optionName</option> } </select> </fieldset> iteration++; } } </div> <div id="partsContainer" class="col-xs-6"> @foreach(LoopItem BOMProducts in loopBOMProducts){ string BOMName = BOMProducts.GetString("Ecom:Product.Configurator.Name"); string BOMId = BOMProducts.GetString("Ecom:Product.Configurator.ID"); <fieldset class="col-sm-12 col-xs-12 noPadding"> <label class="text-left" for="@BOMId">@BOMName</label> <select class="variant full-width-input" name="@(BOMId)" id="@BOMId" bom-value=""> @* <option value="" selected data-option-price="$0.00">@Translate("Select an option","Select an option")</option> *@ @foreach(LoopItem BOMItem in BOMProducts.GetLoop("ConfiguratorProducts")) { string optionId = BOMItem.GetString("Ecom:Product.ID"); string optionVariantId = null; string optionNumber = BOMItem.GetString("Ecom:Product.Number"); string optionName = BOMItem.GetString("Ecom:Product.Name"); string optionPrice = BOMItem.GetString("Ecom:Product.ActualPrice"); productLazyLoadingCollector.AddProduct(optionId, optionVariantId, optionNumber); <option value="@optionId" data-option-price='@optionPrice'>@optionName</option> } </select> </fieldset> } </div> </div> @if (isLoggedIn && canOrder && isConnectionLive) { <div class="highlight-content text-center"> @* @if(showQuantity && productStock > 0) { *@ <fieldset class="quantity-container"> <label for="quantity">@Translate("quantity","Quantity")</label> <input data-stocktranslate='@Translate("currentStock","The current stock is")' class="hidden quantityInput" data-stock='9999' maxlength="5" id="quantity" name="quantity" type="number" value="1"/> <select data-width="50%" name="quantitySelect"> @for(int num=1; (num < 10) && num <= productStock; num++){ <option value="@num">@num</option> } @if(productStock >= 10) { <option value="10+">10+</option> } </select> @* <input id="quantity" class="quantity" data-stock="99999" name="quantity" type="number" value="1"/> *@ </fieldset> @* } *@ <a class="btn btn-bg" id="addToCartSubmit"> <i class="fa fa-shopping-cart"></i> <span data-add='@Translate("addToCart", "Add to cart")' data-added='@Translate("added", "Added")'>@Translate("addToCart", "Add to Cart")</span> </a> @if(GetBoolean("Ecom:Product.CanBuyForPoints")) { <a class="btn btn-bg" id="addToCartPointsSubmit"> <i class="fa fa-shopping-cart"></i> <span data-add='@Translate("addWithPoints", "Add with points")' data-added='@Translate("added", "Added")'>@Translate("addWithPoints", "Add with points")</span> </a> } </div> } <input class="hidden" type="submit" value='@Translate("addToCart", "Add to Cart")' /> </form> </section> } </div> </div> @RenderSnippet("OptionsAccessories") @RenderSnippet("RelatedProducts") @if (!string.IsNullOrEmpty(productDescription)) { <section id="product-information" class="col-xs-12 noPadding"> <h3>Product information</h3> <div class="col-xs-12 product-information"> @productDescription </div> </section> } @if (!string.IsNullOrEmpty(productDetails)) { <section id="specifications" class="col-xs-12 noPadding"> <h3>Specifications</h3> <div class="col-xs-12 product-specifications"> @productDetails </div> </section> } @if(isLoggedIn){ @RenderSnippet("replacementParts") if (documentsList.Any() || loopDetails.Any()) { <section id="documents" class="col-xs-12 noPadding"> <h3>Documents</h3> <div class="col-xs-12" id="productDdownloads_tab"> <ul> @if (documentsList.Any()) { @*Product related files*@ foreach (System.Collections.Generic.Dictionary<String, String> fileStr in documentsList) { string file = fileStr["file"]; var metadata = Dynamicweb.Content.Files.Metadata.EditorFactory.GetMetadataForFile(file); string temp = @".", metafield = "title", fileName = file.Substring((file.LastIndexOf("/") + 1), (file.Length - file.LastIndexOf("/") - 1)), fileTitle = metadata != null && metadata.GetValue(metafield).ToString() != "" ? metadata.GetValue(metafield).ToString() : fileName, substringFile = file.Substring((file.LastIndexOf(temp) + 1), (file.Length - file.LastIndexOf(temp) - 1)), icon = iconFiles.ContainsKey(substringFile) ? iconFiles[substringFile] : "fa-file-pdf-o"; if (substringFile != "xml") { <li> <a class="downloadFile" href="@file"><i class='fa @icon'></i> @fileTitle</a> </li> } } } @if (loopDetails.Any()) { @*Shared files*@ foreach (LoopItem detail in loopDetails.Where(x => x.GetString("Ecom:Product:Detail.Image.Clean").StartsWith("/Files/CRS/_Shared/Documents/"))) { string file = detail.GetString("Ecom:Product:Detail.Image.Clean"); var metadata = Dynamicweb.Content.Files.Metadata.EditorFactory.GetMetadataForFile(file); string temp = @".", metafield = "title", fileName = file.Substring((file.LastIndexOf("/") + 1), (file.Length - file.LastIndexOf("/") - 1)), fileTitle = metadata != null ? metadata.GetValue(metafield).ToString() : fileName, substringFile = file.Substring((file.LastIndexOf(temp) + 1), (file.Length - file.LastIndexOf(temp) - 1)), icon = iconFiles.ContainsKey(substringFile) ? iconFiles[substringFile] : "fa-file-pdf-o"; <li> <a class="downloadFile" href="@file"><i class='fa @icon'></i> @fileTitle</a> </li> } } </ul> </div> </section> } if (softwareList.Any() || loopDetails.Any()) { <section id="software" class="col-xs-12 noPadding"> <h3>Software</h3> <div class="col-xs-12" id="productDdownloads_tab"> <ul> @if (softwareList.Any()) { @*Product related files*@ foreach (System.Collections.Generic.Dictionary<String, String> fileStr in softwareList) { string file = fileStr["file"]; var metadata = Dynamicweb.Content.Files.Metadata.EditorFactory.GetMetadataForFile(file); string temp = @".", metafield = "title", fileName = file.Substring((file.LastIndexOf("/") + 1), (file.Length - file.LastIndexOf("/") - 1)), fileTitle = metadata != null && metadata.GetValue(metafield).ToString() != "" ? metadata.GetValue(metafield).ToString() : fileName, substringFile = file.Substring((file.LastIndexOf(temp) + 1), (file.Length - file.LastIndexOf(temp) - 1)), icon = iconFiles.ContainsKey(substringFile) ? iconFiles[substringFile] : "fa-file-pdf-o"; if (substringFile != "xml") { <li> <a class="downloadFile" href="@file"><i class='fa @icon'></i> @fileTitle</a> </li> } } } @if (loopDetails.Any()) { @*Shared files*@ foreach (LoopItem detail in loopDetails.Where(x => x.GetString("Ecom:Product:Detail.Image.Clean").StartsWith("/Files/CRS/_Shared/Software/"))) { string file = detail.GetString("Ecom:Product:Detail.Image.Clean"); var metadata = Dynamicweb.Content.Files.Metadata.EditorFactory.GetMetadataForFile(file); string temp = @".", metafield = "title", fileName = file.Substring((file.LastIndexOf("/") + 1), (file.Length - file.LastIndexOf("/") - 1)), substringFile = file.Substring((file.LastIndexOf(temp) + 1), (file.Length - file.LastIndexOf(temp) - 1)), icon = iconFiles.ContainsKey(substringFile) ? iconFiles[substringFile] : "fa-file-pdf-o", fileTitle = metadata != null ? metadata.GetValue(metafield).ToString() : fileName; <li> <a class="downloadFile" href="@file"><i class='fa @icon'></i> @fileTitle</a> </li> } } </ul> </div> </section> } if(marketingList.Any() || loopDetails.Any()) { <section id="marketing" class="col-xs-12 noPadding"> <h3>Marketing</h3> <div class="col-xs-12" id="productDdownloads_tab"> <ul> @if (marketingList.Any()) { @*Product related files*@ foreach (System.Collections.Generic.Dictionary<String, String> fileStr in marketingList) { string file = fileStr["file"]; var metadata = Dynamicweb.Content.Files.Metadata.EditorFactory.GetMetadataForFile(file); string temp = @".", metafield = "title", fileName = file.Substring((file.LastIndexOf("/") + 1), (file.Length - file.LastIndexOf("/") - 1)), fileTitle = metadata != null && metadata.GetValue(metafield).ToString() != "" ? metadata.GetValue(metafield).ToString() : fileName, substringFile = file.Substring((file.LastIndexOf(temp) + 1), (file.Length - file.LastIndexOf(temp) - 1)), icon = iconFiles.ContainsKey(substringFile) ? iconFiles[substringFile] : "fa-file-pdf-o"; if (substringFile != "xml") { <li> <a class="downloadFile" href="@file"><i class='fa @icon'></i> @fileTitle</a> </li> } } } @if (loopDetails.Any()) { foreach (LoopItem detail in loopDetails.Where(x => x.GetString("Ecom:Product:Detail.Image.Clean").StartsWith("/Files/CRS/_Shared/_Shared/Marketing/"))) { string file = detail.GetString("Ecom:Product:Detail.Image.Clean"); var metadata = Dynamicweb.Content.Files.Metadata.EditorFactory.GetMetadataForFile(file); string temp = @".", metafield = "title", fileName = file.Substring((file.LastIndexOf("/") + 1), (file.Length - file.LastIndexOf("/") - 1)), fileTitle = metadata != null ? metadata.GetValue(metafield).ToString() : fileName, substringFile = file.Substring((file.LastIndexOf(temp) + 1), (file.Length - file.LastIndexOf(temp) - 1)), icon = iconFiles.ContainsKey(substringFile) ? iconFiles[substringFile] : "fa-file-pdf-o"; <li> <a class="downloadFile" href="@file"><i class='fa @icon'></i> @fileTitle</a> </li> } } </ul> </div> </section> } if (loopDetails.Any() || bulletinsList.Any()) { <section id="bulletins" class="col-xs-12 noPadding"> <h3>Bulletins</h3> <div class="col-xs-12" id="productDdownloads_tab"> <ul> @if (bulletinsList.Any()) { @*Product related files*@ foreach (System.Collections.Generic.Dictionary<String, String> fileStr in bulletinsList) { string file = fileStr["file"]; var metadata = Dynamicweb.Content.Files.Metadata.EditorFactory.GetMetadataForFile(file); string temp = @".", metafield = "title", fileName = file.Substring((file.LastIndexOf("/") + 1), (file.Length - file.LastIndexOf("/") - 1)), fileTitle = metadata != null && metadata.GetValue(metafield).ToString() != "" ? metadata.GetValue(metafield).ToString() : fileName, substringFile = file.Substring((file.LastIndexOf(temp) + 1), (file.Length - file.LastIndexOf(temp) - 1)), icon = iconFiles.ContainsKey(substringFile) ? iconFiles[substringFile] : "fa-file-pdf-o"; if (substringFile != "xml") { <li> <a class="downloadFile" href="@file"><i class='fa @icon'></i> @fileTitle</a> </li> } } } @if (loopDetails.Any()) { foreach (LoopItem detail in loopDetails.Where(x => x.GetString("Ecom:Product:Detail.Image.Clean").StartsWith("/Files/CRS/_Shared/Bulletins/"))) { string file = detail.GetString("Ecom:Product:Detail.Image.Clean"); var metadata = Dynamicweb.Content.Files.Metadata.EditorFactory.GetMetadataForFile(file); string temp = @".", metafield = "title", fileName = file.Substring((file.LastIndexOf("/") + 1), (file.Length - file.LastIndexOf("/") - 1)), fileTitle = metadata != null ? metadata.GetValue(metafield).ToString() : fileName, substringFile = file.Substring((file.LastIndexOf(temp) + 1), (file.Length - file.LastIndexOf(temp) - 1)), icon = iconFiles.ContainsKey(substringFile) ? iconFiles[substringFile] : "fa-file-pdf-o"; <li> <a class="downloadFile" href="@file"><i class='fa @icon'></i> @fileTitle</a> </li> } } </ul> </div> </section> } } @RenderSnippet("videoList") @RenderSnippet("faqs") </div> @* Product Sections End *@ @SnippetStart("RecommendedSubstitutions") @if (recommendedSubstitutions != null && recommendedSubstitutions.Count > 0) { <div class="col-xs-12 noPadding relatedContainer"> <h4 class="productTitles">@Translate("recommendedSubstitutions", "Recommended Substitutions")</h4> <ul class="relatedList-bkp"> @foreach (LoopItem productItem in recommendedSubstitutions) { string relatedProductId = productItem.GetString("Ecom:Product.ID"), relatedProductName = productItem.GetString("Ecom:Product.Name"), relatedProductNumber = productItem.GetString("Ecom:Product.Number"), relatedProductLink = productItem.GetString("Ecom:Product.PrimaryOrCurrentPageID") != Pageview.Page.ID.ToString() ? "/Default.aspx?ID=" + productItem.GetString("Ecom:Product.PrimaryOrCurrentPageID") + "&ProductID=" + productItem.GetString("Ecom:Product.ID") : "/Default.aspx?ID=" + Pageview.Page.ID.ToString() + "&ProductID=" + productItem.GetString("Ecom:Product.ID"); <li class=""> <h5><a href="@relatedProductLink">@relatedProductName (@relatedProductNumber)</a></h5> </li> } </ul> </div> } @SnippetEnd("RecommendedSubstitutions") @SnippetStart("RelatedProducts") @if (relatedProducts != null && relatedProducts.Count > 0) { <section id="relatedProducts" class="col-xs-12 noPadding"> <div class="col-xs-12 noPadding relatedProducts"> <h3>@Translate("relatedProducts", "Related Products")</h3> <div class="col-xs-12"> <ul class="slick-related relatedList row"> @foreach (LoopItem productItem in relatedProducts) { string relatedProductId = productItem.GetString("Ecom:Product.ID"), relatedProductName = productItem.GetString("Ecom:Product.Name"), relatedProductNumber = productItem.GetString("Ecom:Product.Number"), relatedProductLink = productItem.GetString("Ecom:Product.PrimaryOrCurrentPageID") != Pageview.Page.ID.ToString() ? "/Default.aspx?ID=" + productItem.GetString("Ecom:Product.PrimaryOrCurrentPageID") + "&ProductID=" + productItem.GetString("Ecom:Product.ID") : "/Default.aspx?ID=" + Pageview.Page.ID.ToString() + "&ProductID=" + productItem.GetString("Ecom:Product.ID"), relatedImage = (!string.IsNullOrEmpty(productItem.GetString("Ecom:Product.ImageSmall.Clean"))) ? productItem.GetString("Ecom:Product.ImageSmall.Clean") : "/Files/Files/" + designName + "/Products/Images/" + relatedProductNumber + ".jpg"; <li class="item col-md-3 col-sm-4 col-xs-12"> <figure> <a href="@relatedProductLink"> <img src="@GetImage(relatedImage, 300, 0, 0, 0, 0, 0, "jpg")" alt="@relatedProductName" title="@relatedProductName" class="img-responsive" /> </a> </figure> <h3><a href="@relatedProductLink">@relatedProductName</a></h3> </li> } </ul> </div> </div> </section> } @SnippetEnd("RelatedProducts") @SnippetStart("OptionsAccessories") @if (optionsAccessories != null && optionsAccessories.Count > 0) { <section id="optionsAccessories" class="col-xs-12 noPadding"> <div class="col-xs-12 noPadding relatedProducts"> <h3>@Translate("optionsAccessories", "Options & Accessories")</h3> <div class="col-xs-12"> <table width="100%" class="table-product-list"> <colgroup> <col style="width: 20%"> <col style="width: 20%"> <col style="width: 60%"> </colgroup> <thead> <tr> <th></th> <th>Product Number</th> <th>Description</th> </tr> </thead> <tbody ref="update-option-table" data-load-list="@productId" data-logged-in="@isLoggedIn"> <tr> <td colspan="3" align="center"> <i class="fa fa-spinner fa-spin fa-3x fa-fw"></i> <span class="sr-only">Loading...</span> </td> </tr> </tbody> </table> </div> <div class="col-xs-12 action"> <button type="button" ref="more-options" data-id="@productId" class="btn btn-bg">@Translate("More", "More")</button> </div> </div> </section> } @SnippetEnd("OptionsAccessories") @SnippetStart("faqs") @{string str_filter = "Products contains '" + productId + "'";} @RenderItemList(new { ItemType = "Faqs", ListSourceType = "Page", ListSourcePage = 64, ItemFieldsList = "*", ListTemplate = "ItemPublisher/List/ProductFaqs.cshtml", ListPageSize = 500, IncludeParagraphItems = "True", ListOrderBy = "Question", Filter = @str_filter }) @SnippetEnd("faqs") @SnippetStart("videoList") @{var video_filter = "Products contains '" + productId + "'"; } @RenderItemList(new { ItemType = "VideoGallery", ListSourceType = "Page", ListSourcePage = 153, ItemFieldsList = "*", ListTemplate = "ItemPublisher/List/ProductGallery.cshtml", ListPageSize = 20, IncludeParagraphItems = "True", ListOrderBy = "Title", Filter = @video_filter }) @SnippetEnd("videoList") @SnippetStart("replacementParts") @{var blowout_filter = "Products_Associated contains '" + productId + "'"; } @RenderItemList(new { ItemType = "Blowout_Diagram", ListSourceType = "Page", ListSourcePage = 154, ItemFieldsList = "*", ListTemplate = "ItemPublisher/List/ProductBlowoutDiagrams_noOrder.cshtml", ListPageSize = 20, IncludeParagraphItems = "True", ListOrderBy = "Serial_Number_Start", Filter = @blowout_filter }) @SnippetEnd("replacementParts") </article> } } else { //user can't see prices <article id="product-description" class="col-xs-12 noPadding"> @* Sidebar Start *@ <div class="col-xs-12 col-sm-3 noPaddingLeft"> <div id="product-navigation" > <div class="productDetailsBox "> <h3>PRODUCT DETAILS</h3> </div> <ul class=""> <li class=""> <a class="anchor_9" href="#optionsAccessories">Options &amp; Accessories</a> </li> <li class=""> <a class="anchor_11" href="#relatedProducts">Related products</a> </li> <li class="activeItem"> <a class="anchor_2" href="#product-information">Product Information</a> </li> <li class=""> <a class="anchor_1" href="#specifications">Specifications</a> </li> @if(isLoggedIn){ <li class=""> <a class="anchor_9" href="#replacementParts">Replacement Parts</a> </li> <li class=""> <a class="anchor_3" href="#documents">Documents</a> </li> <li class=""> <a class="anchor_10" href="#software">Software</a> </li> <li class=""> <a class="anchor_2" href="#marketing">Marketing</a> </li> <li class=""> <a class="anchor_3" href="#bulletins">Bulletins</a> </li> <li class=""> <a class="anchor_2" href="#videoZone">Video</a> </li> <li class=""> <a class="anchor_3" href="#faqsZone">FAQ &lsquo;s</a> </li> } @RenderSnippet("faqLink") </ul> </div> </div> @* Sidebar End *@ <div id="product-details" class="col-sm-9 col-xs-12 noPadding"> <div id="product-info-wrapper" class="col-sm-6 col-xs-12"> <h2 class="product-title padding-bottom">@productName</h2> <div class="tags"> @if(isClearance){ <div class="item red"> <span>Clearance</span> </div> } @if(isDiscontinued){ <div class="item blue"> <span>Discontinued</span> </div> } </div> <div class="col-xs-12 noPadding"> @if(!string.IsNullOrEmpty(productIntro)){ <div class="col-xs-12 noPadding productIntroduction">@productIntro</div> } <p>@Translate("item", "Item #"): <span id="product__number">@productNumber</span></p> </div> @if(isLoggedIn && canSeePrices && !isDiscontinued){ if(isConnectionLive){ <div class="product-price inlineBlock" data-product-price='@productPriceRaw'> <i style="color: blue" id="loadingPrice" class="fa fa-spinner fa-spin fa-fw"></i> @* @productCurrency<span ref="product-price-raw">@productPriceRaw</span> *@ <div style="font-size: inherit" id="showPrice" class="hidden">@productCurrency<span ref="product-price-raw"></span></div> </div> <div id="price-table"> <table id="price-table-info"> </table> </div> }else{ <div class="inlineBlock" data-product-price='@productPriceRaw'> @unavailableText </div> } } @if ((!isDiscontinued) && (loopVariantGroups.Count == 0)) { if (isLoggedIn && productStock >= 1) { //removed condition to check if the product is used && !isUsed string optionId = GetString("Ecom:Product.ID"); string optionNumber = GetString("Ecom:Product.Number"); productLazyLoadingCollector.AddProduct(optionId, "", optionNumber); <div class="order-now"> <form name="addToCart" class="add-to-cart form-fields" action="@Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(@currentPageId)" method="post" data-outofstock='@Translate("outOfStock", "Out of stock")'> <input type="hidden" name="cartcmd" value="add"/> <input type="hidden" name="productID" value="@productId"/> <input type="hidden" name="variantID" id="variantID" value="@variantId" /> @if(!HideStockInfo) { <div id="stockStatus" class="col-xs-12 noPadding"><i class="fa @stockStatus @stockColor"></i> @stockText</div> } @*<div id="stockStatus" class="col-xs-12 noPadding"><i class="fa @stockStatus @stockColor"></i> @stockText</div> *@ @if(canOrder) { <div class="col-xs-12 grayBox"> <div class="highlight-content text-right"> <fieldset class="quantity-container" style="vertical-align: middle; margin: 0px;"> <label for="quantity">@Translate("quantity", "Quantity")</label> <input data-stocktranslate='@Translate("currentStock", "The current stock is")' class="hidden quantityInput" data-stock='@productStock' min="1" maxlength="5" id="quantity" name="quantity" type="number" value="1"/> <select data-width="35%" name="quantitySelect"> @for (int num = 1; (num < 10) && num <= productStock; num++) { <option value="@num">@num</option> } @if (productStock >= 10) { <option value="10+">10+</option> } </select> @* <input id="quantity" name="quantity" data-stock="99999" type="number" value="1" style="margin: 0; vertical-align: middle; max-width: 4em; text-align: right; margin-right: 0.5em;" /> *@ </fieldset> <a class="btn btn-bg" id="addToCartSubmit"> <i class="fa fa-shopping-cart"></i> <span data-add='@Translate("addToCart", "Add to cart")' data-added='@Translate("added", "Added")'>@Translate("addToCart", "Add to Cart")</span> </a> @if (GetBoolean("Ecom:Product.CanBuyForPoints")) { <a class="btn btn-bg" id="addToCartPointsSubmit"> <i class="fa fa-shopping-cart"></i> <span data-add='@Translate("addWithPoints", "Add with points")' data-added='@Translate("added", "Added")'>@Translate("addWithPoints", "Add with points")</span> </a> } </div> </div> <input class="hidden" type="submit" value='@Translate("addToCart", "Add to Cart")' /> } </form> </div> } } else { if (isDiscontinued){ <div class="order-now"> <p>@Translate("partsOnly", "Parts only")</p> </div> } } <div class="col-xs-12 noPadding"> <div class="shareIcons"> <span>@Translate("share", "Share")</span> <ul> <li> <a class="fa-facebook fa" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=@(Pageview.GlobalTags.GetTagByName("Global:Request.Scheme").Value.ToString())://@(Pageview.GlobalTags.GetTagByName("Global:Request.Host").Value.ToString())@(Pageview.GlobalTags.GetTagByName("Global:Pageview.Url").Value.ToString())"><span>@Translate("shareFacebook", "Share facebook")</span></a> </li> <li> <a class="fa-twitter fa" target="_blank" href="https://twitter.com/home?status=@(Pageview.GlobalTags.GetTagByName("Global:Request.Scheme").Value.ToString())://@(Pageview.GlobalTags.GetTagByName("Global:Request.Host").Value.ToString())@(Pageview.GlobalTags.GetTagByName("Global:Pageview.Url").Value.ToString())"><span>@Translate("shareTwitter", "Share twitter")</span></a> </li> <li> <a class="fa-linkedin fa" target="_blank" href="https://www.linkedin.com/shareArticle?mini=true&url=@(Pageview.GlobalTags.GetTagByName("Global:Request.Scheme").Value.ToString())://@(Pageview.GlobalTags.GetTagByName("Global:Request.Host").Value.ToString())@(Pageview.GlobalTags.GetTagByName("Global:Pageview.Url").Value.ToString())&summary=@productIntro&source="><span>@Translate("shareLinkedin", "Share linkedin")</span></a> </li> </ul> </div> </div> @RenderSnippet("RecommendedSubstitutions") </div> @* Product Images Start *@ <div id="product-images" class="col-sm-6 col-xs-12 noPaddingRight"> <div id="product-lg-image" class="col-xs-12 noPaddingLeft"> <figure class="text-center"> <img class="img-responsive" src="@productGetImage" alt="@CleanString(productName)" title="@CleanString(productName)" data-zoom="@productGetImageZoom" /> <div class="hidden" id="videoContainer"> <a id="playPause" href="#"><i class="fa fa-play"></i></a> <video id="video" width="100%" src=""> Your browser does not support the video tag. </video> </div> </figure> </div> @if(imagesList.Count() > 0) { <div class="col-xs-12"> <div id="imgThumbs" class="col-xs-12 noPaddingLeft"> <ul> @foreach (System.Collections.Generic.Dictionary<String, String> imageStr in imagesList) { bool isAnImage = imageStr["image"].ToString().Contains(".png"); string getimageImg = GetImage(imageStr["image"].ToString(), 0, 105), getimageDataImg = isAnImage ? GetImage(imageStr["image"].ToString(), 600, 600) : imageStr["image"].ToString(), getimageDataImgBig = isAnImage ? GetImage(imageStr["image"].ToString(), 1200, 1200, 0, 0, 0, 0, "jpg") : imageStr["image"].ToString(), liClass = imagesList.IndexOf(imageStr) == 0 ? "active" : ""; <li data-type='@imageStr["image"].ToString().Substring(imageStr["image"].ToString().LastIndexOf('/') + 1).Replace(productNumber, "").Replace(".jpg","").Replace(".mp4","")' class="@liClass"> @if(isAnImage) { <img data-image="@getimageDataImg" data-image-big="@getimageDataImgBig" class="img-responsive" src="@getimageImg" title="@CleanString(imageStr["title"])" alt="@CleanString(imageStr["title"])" /> } else { <video data-image="@getimageDataImg" width="100%" src="@getimageDataImg">Your browser does not support the video tag.</video> } </li> } </ul> </div> </div> } </div> @* Product Images End *@ </div> @* Product Sections Start *@ <div class="product-sections col-sm-offset-3 col-sm-9 col-xs-12 noPadding"> <div class="col-xs-12"> <div class="row"> @if((!isDiscontinued) && (loopVariantGroups.Count > 0)) { var iteration = 1; <section class="order-now order-now-configuration grayBox col-xs-12"> <h3 style="padding: 0px; margin: 0px; border: none; background-color: transparent; line-height: 2; border-bottom: 1px solid #000; margin-bottom: 0.5em;">Configuration</h3> <form name="addToCart" class="add-to-cart form-fields" action="@Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(@currentPageId)" method="post" data-outofstock='@Translate("outOfStock", "Out of stock")'> <input type="hidden" name="cartcmd" value="add"/> <input type="hidden" name="productID" value="@productId"/> <input type="hidden" name="variantID" id="variantID" value="@variantId" /> <div class="row"> <div class = "col-xs-6" id="variantsContainer"> <i style="color: blue; margin-left: 40%" id="variantsContainerLoader" class="fa fa-spinner fa-spin fa-3x fa-fw"></i> </div> <div id="partsContainer" class="col-xs-6"> @foreach(LoopItem BOMProducts in loopBOMProducts){ string BOMName = BOMProducts.GetString("Ecom:Product.Configurator.Name"); string BOMId = BOMProducts.GetString("Ecom:Product.Configurator.ID"); <fieldset class="col-sm-12 col-xs-12 noPadding"> <label class="text-left" for="@BOMId">@BOMName</label> <select class="variant full-width-input" name="@(BOMId)" id="@BOMId" bom-value=""> @* <option value="" selected data-option-price="$0.00">@Translate("Select an option","Select an option")</option> *@ @foreach(LoopItem BOMItem in BOMProducts.GetLoop("ConfiguratorProducts")) { string optionId = BOMItem.GetString("Ecom:Product.ID"); string optionVariantId = null; string optionNumber = BOMItem.GetString("Ecom:Product.Number"); string optionName = BOMItem.GetString("Ecom:Product.Name"); string optionPrice = BOMItem.GetString("Ecom:Product.ActualPrice"); productLazyLoadingCollector.AddProduct(optionId, optionVariantId, optionNumber); <option value="@optionId" data-option-price='@optionPrice'>@optionName</option> } </select> </fieldset> } </div> </div> @if (isLoggedIn && canOrder) { <div class="highlight-content text-center"> @* @if(showQuantity && productStock > 0) { *@ <fieldset class="quantity-container"> <label for="quantity">@Translate("quantity","Quantity")</label> <input data-stocktranslate='@Translate("currentStock","The current stock is")' class="hidden quantityInput" data-stock='@productStock' maxlength="5" id="quantity" name="quantity" type="number" value="1"/> <select data-width="50%" name="quantitySelect"> @for(int num=1; (num < 10) && num <= productStock; num++){ <option value="@num">@num</option> } @if(productStock >= 10) { <option value="10+">10+</option> } </select> @* <input id="quantity" class="quantity" data-stock="99999" name="quantity" type="number" value="1"/> *@ </fieldset> @* } *@ <a class="btn btn-bg" id="addToCartSubmit"> <i class="fa fa-shopping-cart"></i> <span data-add='@Translate("addToCart", "Add to cart")' data-added='@Translate("added", "Added")'>@Translate("addToCart", "Add to Cart")</span> </a> @if(GetBoolean("Ecom:Product.CanBuyForPoints")) { <a class="btn btn-bg" id="addToCartPointsSubmit"> <i class="fa fa-shopping-cart"></i> <span data-add='@Translate("addWithPoints", "Add with points")' data-added='@Translate("added", "Added")'>@Translate("addWithPoints", "Add with points")</span> </a> } </div> } <input class="hidden" type="submit" value='@Translate("addToCart", "Add to Cart")' /> </form> </section> } </div> </div> @RenderSnippet("OptionsAccessories") @RenderSnippet("RelatedProducts") @if (!string.IsNullOrEmpty(productDescription)) { <section id="product-information" class="col-xs-12 noPadding"> <h3>Product information</h3> <div class="col-xs-12 product-information"> @productDescription </div> </section> } @if (!string.IsNullOrEmpty(productDetails)) { <section id="specifications" class="col-xs-12 noPadding"> <h3>Specifications</h3> <div class="col-xs-12 product-specifications"> @productDetails </div> </section> } @if(isLoggedIn){ @RenderSnippet("replacementParts") if (documentsList.Any() || loopDetails.Any()) { <section id="documents" class="col-xs-12 noPadding"> <h3>Documents</h3> <div class="col-xs-12" id="productDdownloads_tab"> <ul> @if (documentsList.Any()) { @*Product related files*@ foreach (System.Collections.Generic.Dictionary<String, String> fileStr in documentsList) { string file = fileStr["file"]; var metadata = Dynamicweb.Content.Files.Metadata.EditorFactory.GetMetadataForFile(file); string temp = @".", metafield = "title", fileName = file.Substring((file.LastIndexOf("/") + 1), (file.Length - file.LastIndexOf("/") - 1)), fileTitle = metadata != null && metadata.GetValue(metafield).ToString() != "" ? metadata.GetValue(metafield).ToString() : fileName, substringFile = file.Substring((file.LastIndexOf(temp) + 1), (file.Length - file.LastIndexOf(temp) - 1)), icon = iconFiles.ContainsKey(substringFile) ? iconFiles[substringFile] : "fa-file-pdf-o"; if (substringFile != "xml") { <li> <a class="downloadFile" href="@file"><i class='fa @icon'></i> @fileTitle</a> </li> } } } @if (loopDetails.Any()) { @*Shared files*@ foreach (LoopItem detail in loopDetails.Where(x => x.GetString("Ecom:Product:Detail.Image.Clean").StartsWith("/Files/CRS/_Shared/Documents/"))) { string file = detail.GetString("Ecom:Product:Detail.Image.Clean"); var metadata = Dynamicweb.Content.Files.Metadata.EditorFactory.GetMetadataForFile(file); string temp = @".", metafield = "title", fileName = file.Substring((file.LastIndexOf("/") + 1), (file.Length - file.LastIndexOf("/") - 1)), substringFile = file.Substring((file.LastIndexOf(temp) + 1), (file.Length - file.LastIndexOf(temp) - 1)), icon = iconFiles.ContainsKey(substringFile) ? iconFiles[substringFile] : "fa-file-pdf-o", fileTitle = metadata != null ? metadata.GetValue(metafield).ToString() : fileName; <li> <a class="downloadFile" href="@file"><i class='fa @icon'></i> @fileTitle</a> </li> } } </ul> </div> </section> } if (softwareList.Any() || loopDetails.Any()) { <section id="software" class="col-xs-12 noPadding"> <h3>Software</h3> <div class="col-xs-12" id="productDdownloads_tab"> <ul> @if (softwareList.Any()) { @*Product related files*@ foreach (System.Collections.Generic.Dictionary<String, String> fileStr in softwareList) { string file = fileStr["file"]; var metadata = Dynamicweb.Content.Files.Metadata.EditorFactory.GetMetadataForFile(file); string temp = @".", metafield = "title", fileName = file.Substring((file.LastIndexOf("/") + 1), (file.Length - file.LastIndexOf("/") - 1)), fileTitle = metadata != null && metadata.GetValue(metafield).ToString() != "" ? metadata.GetValue(metafield).ToString() : fileName, substringFile = file.Substring((file.LastIndexOf(temp) + 1), (file.Length - file.LastIndexOf(temp) - 1)), icon = iconFiles.ContainsKey(substringFile) ? iconFiles[substringFile] : "fa-file-pdf-o"; if (substringFile != "xml") { <li> <a class="downloadFile" href="@file"><i class='fa @icon'></i> @fileTitle</a> </li> } } } @if (loopDetails.Any()) { @*Shared files*@ foreach (LoopItem detail in loopDetails.Where(x => x.GetString("Ecom:Product:Detail.Image.Clean").StartsWith("/Files/CRS/_Shared/Software/"))) { string file = detail.GetString("Ecom:Product:Detail.Image.Clean"); var metadata = Dynamicweb.Content.Files.Metadata.EditorFactory.GetMetadataForFile(file); string temp = @".", metafield = "title", fileName = file.Substring((file.LastIndexOf("/") + 1), (file.Length - file.LastIndexOf("/") - 1)), substringFile = file.Substring((file.LastIndexOf(temp) + 1), (file.Length - file.LastIndexOf(temp) - 1)), icon = iconFiles.ContainsKey(substringFile) ? iconFiles[substringFile] : "fa-file-pdf-o", fileTitle = metadata != null ? metadata.GetValue(metafield).ToString() : fileName; <li> <a class="downloadFile" href="@file"><i class='fa @icon'></i> @fileTitle</a> </li> } } </ul> </div> </section> } if(marketingList.Any() || loopDetails.Any()) { <section id="marketing" class="col-xs-12 noPadding"> <h3>Marketing</h3> <div class="col-xs-12" id="productDdownloads_tab"> <ul> @if (marketingList.Any()) { @*Product related files*@ foreach (System.Collections.Generic.Dictionary<String, String> fileStr in marketingList) { string file = fileStr["file"]; var metadata = Dynamicweb.Content.Files.Metadata.EditorFactory.GetMetadataForFile(file); string temp = @".", metafield = "title", fileName = file.Substring((file.LastIndexOf("/") + 1), (file.Length - file.LastIndexOf("/") - 1)), fileTitle = metadata != null && metadata.GetValue(metafield).ToString() != "" ? metadata.GetValue(metafield).ToString() : fileName, substringFile = file.Substring((file.LastIndexOf(temp) + 1), (file.Length - file.LastIndexOf(temp) - 1)), icon = iconFiles.ContainsKey(substringFile) ? iconFiles[substringFile] : "fa-file-pdf-o"; if (substringFile != "xml") { <li> <a class="downloadFile" href="@file"><i class='fa @icon'></i> @fileTitle</a> </li> } } } @if (loopDetails.Any()) { foreach (LoopItem detail in loopDetails.Where(x => x.GetString("Ecom:Product:Detail.Image.Clean").StartsWith("/Files/CRS/_Shared/Marketing/"))) { string file = detail.GetString("Ecom:Product:Detail.Image.Clean"); var metadata = Dynamicweb.Content.Files.Metadata.EditorFactory.GetMetadataForFile(file); string temp = @".", metafield = "title", fileName = file.Substring((file.LastIndexOf("/") + 1), (file.Length - file.LastIndexOf("/") - 1)), substringFile = file.Substring((file.LastIndexOf(temp) + 1), (file.Length - file.LastIndexOf(temp) - 1)), icon = iconFiles.ContainsKey(substringFile) ? iconFiles[substringFile] : "fa-file-pdf-o", fileTitle = metadata != null ? metadata.GetValue(metafield).ToString() : fileName; <li> <a class="downloadFile" href="@file"><i class='fa @icon'></i> @fileTitle</a> </li> } } </ul> </div> </section> } if (loopDetails.Any() || bulletinsList.Any()) { <section id="bulletins" class="col-xs-12 noPadding"> <h3>Bulletins</h3> <div class="col-xs-12" id="productDdownloads_tab"> <ul> @if (bulletinsList.Any()) { @*Product related files*@ foreach (System.Collections.Generic.Dictionary<String, String> fileStr in bulletinsList) { string file = fileStr["file"]; var metadata = Dynamicweb.Content.Files.Metadata.EditorFactory.GetMetadataForFile(file); string temp = @".", metafield = "title", fileName = file.Substring((file.LastIndexOf("/") + 1), (file.Length - file.LastIndexOf("/") - 1)), fileTitle = metadata != null && metadata.GetValue(metafield).ToString() != "" ? metadata.GetValue(metafield).ToString() : fileName, substringFile = file.Substring((file.LastIndexOf(temp) + 1), (file.Length - file.LastIndexOf(temp) - 1)), icon = iconFiles.ContainsKey(substringFile) ? iconFiles[substringFile] : "fa-file-pdf-o"; if (substringFile != "xml") { <li> <a class="downloadFile" href="@file"><i class='fa @icon'></i> @fileTitle</a> </li> } } } @if (loopDetails.Any()) { foreach (LoopItem detail in loopDetails.Where(x => x.GetString("Ecom:Product:Detail.Image.Clean").StartsWith("/Files/CRS/_Shared/Bulletins/"))) { string file = detail.GetString("Ecom:Product:Detail.Image.Clean"); var metadata = Dynamicweb.Content.Files.Metadata.EditorFactory.GetMetadataForFile(file); string temp = @".", metafield = "title", fileName = file.Substring((file.LastIndexOf("/") + 1), (file.Length - file.LastIndexOf("/") - 1)), substringFile = file.Substring((file.LastIndexOf(temp) + 1), (file.Length - file.LastIndexOf(temp) - 1)), icon = iconFiles.ContainsKey(substringFile) ? iconFiles[substringFile] : "fa-file-pdf-o", fileTitle = metadata != null ? metadata.GetValue(metafield).ToString() : fileName; <li> <a class="downloadFile" href="@file"><i class='fa @icon'></i> @fileTitle</a> </li> } } </ul> </div> </section> } } @RenderSnippet("videoList") @RenderSnippet("faqs") </div> @* Product Sections End *@ @SnippetStart("RecommendedSubstitutions") @if (recommendedSubstitutions != null && recommendedSubstitutions.Count > 0) { <div class="col-xs-12 noPadding relatedContainer"> <h4 class="productTitles">@Translate("recommendedSubstitutions", "Recommended Substitutions")</h4> <ul class="relatedList-bkp"> @foreach (LoopItem productItem in recommendedSubstitutions) { string relatedProductId = productItem.GetString("Ecom:Product.ID"), relatedProductName = productItem.GetString("Ecom:Product.Name"), relatedProductNumber = productItem.GetString("Ecom:Product.Number"), relatedProductLink = productItem.GetString("Ecom:Product.PrimaryOrCurrentPageID") != Pageview.Page.ID.ToString() ? "/Default.aspx?ID=" + productItem.GetString("Ecom:Product.PrimaryOrCurrentPageID") + "&ProductID=" + productItem.GetString("Ecom:Product.ID") : "/Default.aspx?ID=" + Pageview.Page.ID.ToString() + "&ProductID=" + productItem.GetString("Ecom:Product.ID"); <li class=""> <h5><a href="@relatedProductLink">@relatedProductName (@relatedProductNumber)</a></h5> </li> } </ul> </div> } @SnippetEnd("RecommendedSubstitutions") @SnippetStart("RelatedProducts") @if (relatedProducts != null && relatedProducts.Count > 0) { <section id="relatedProducts" class="col-xs-12 noPadding"> <div class="col-xs-12 noPadding relatedProducts"> <h3>@Translate("relatedProducts", "Related Products")</h3> <div class="col-xs-12"> <ul class="slick-related relatedList row"> @foreach (LoopItem productItem in relatedProducts) { string relatedProductId = productItem.GetString("Ecom:Product.ID"), relatedProductName = productItem.GetString("Ecom:Product.Name"), relatedProductNumber = productItem.GetString("Ecom:Product.Number"), relatedProductLink = productItem.GetString("Ecom:Product.PrimaryOrCurrentPageID") != Pageview.Page.ID.ToString() ? "/Default.aspx?ID=" + productItem.GetString("Ecom:Product.PrimaryOrCurrentPageID") + "&ProductID=" + productItem.GetString("Ecom:Product.ID") : "/Default.aspx?ID=" + Pageview.Page.ID.ToString() + "&ProductID=" + productItem.GetString("Ecom:Product.ID"), relatedImage = (!string.IsNullOrEmpty(productItem.GetString("Ecom:Product.ImageSmall.Clean"))) ? productItem.GetString("Ecom:Product.ImageSmall.Clean") : "/Files/Files/" + designName + "/Products/Images/" + relatedProductNumber + ".jpg"; <li class="item col-md-3 col-sm-4 col-xs-12"> <figure> <a href="@relatedProductLink"> <img src="@GetImage(relatedImage, 300, 0, 0, 0, 0, 0, "jpg")" alt="@relatedProductName" title="@relatedProductName" class="img-responsive" /> </a> </figure> <h3><a href="@relatedProductLink">@relatedProductName</a></h3> </li> } </ul> </div> </div> </section> } @SnippetEnd("RelatedProducts") @SnippetStart("OptionsAccessories") @if (optionsAccessories != null && optionsAccessories.Count > 0) { <section id="optionsAccessories" class="col-xs-12 noPadding"> <div class="col-xs-12 noPadding relatedProducts"> <h3>@Translate("optionsAccessories", "Options & Accessories")</h3> <div class="col-xs-12"> <table width="100%" class="table-product-list"> @if (isLoggedIn) { <colgroup> <col style="width: 20%"> <col style="width: 20%"> <col style="width: 30%"> <col style="width: 15%"> <col style="max-width:30px;"> <col style="width: 7.5%"> </colgroup> <thead> <tr> <th></th> <th>Product Number</th> <th>Description</th> <th>Price</th> <th>Qty</th> <th></th> </tr> </thead> } else { <colgroup> <col style="width: 20%"> <col style="width: 20%"> <col style="width: 45%"> <col style="max-width:30px;"> <col style="width: 7.5%"> </colgroup> <thead> <tr> <th></th> <th>Product Number</th> <th>Description</th> <th>Qty</th> <th></th> </tr> </thead> } <tbody ref="update-option-table" data-load-list="@productId" data-logged-in="@isLoggedIn"> <tr> <td colspan="6" align="center"> <i class="fa fa-spinner fa-spin fa-3x fa-fw"></i> <span class="sr-only">Loading...</span> </td> </tr> </tbody> </table> </div> <div class="col-xs-12 action"> <button type="button" ref="more-options" data-id="@productId" class="btn btn-bg">@Translate("More", "More")</button> </div> </div> </section> } @SnippetEnd("OptionsAccessories") @SnippetStart("faqs") @{string str_filter = "Products contains '" + productId + "'";} @RenderItemList(new { ItemType = "Faqs", ListSourceType = "Page", ListSourcePage = 306, ItemFieldsList = "*", ListTemplate = "ItemPublisher/List/ProductFaqs.cshtml", ListPageSize = 500, IncludeParagraphItems = "True", ListOrderBy = "Question", Filter = @str_filter }) @SnippetEnd("faqs") @SnippetStart("videoList") @{var video_filter = "Products contains '" + productId + "'"; } @RenderItemList(new { ItemType = "VideoGallery", ListSourceType = "Page", ListSourcePage = 153, ItemFieldsList = "*", ListTemplate = "ItemPublisher/List/ProductGallery.cshtml", ListPageSize = 20, IncludeParagraphItems = "True", ListOrderBy = "Title", Filter = @video_filter }) @SnippetEnd("videoList") @SnippetStart("replacementParts") @{var blowout_filter = "Products_Associated contains '" + productId + "'"; } @RenderItemList(new { ItemType = "Blowout_Diagram", ListSourceType = "Page", ListSourcePage = 154, ItemFieldsList = "*", ListTemplate = "ItemPublisher/List/ProductBlowoutDiagrams.cshtml", ListPageSize = 20, IncludeParagraphItems = "True", ListOrderBy = "Serial_Number_Start", Filter = @blowout_filter }) @SnippetEnd("replacementParts") @* <!-- Related --> @if(GetLoop("ProductRelatedGroups").Count > 0){ <div class="col-xs-12 noPadding" id="relatedContainer"> @foreach (LoopItem group in GetLoop("ProductRelatedGroups")){ List<LoopItem> relatedProducts = group.GetLoop("RelatedProducts"); if(relatedProducts.Count > 0){ <div class="col-xs-12 noPadding relatedContainer"> <h2 class="productTitles">@group.GetString("Ecom:Product:RelatedGroup.Name") @group.GetString("Ecom:Product:RelatedGroup.GroupID")</h2> <ul class="relatedList row"> @foreach (LoopItem productItem in relatedProducts){ string relatedProductId = productItem.GetString("Ecom:Product.ID"), relatedProductName = productItem.GetString("Ecom:Product.Name"), relatedProductNumber = productItem.GetString("Ecom:Product.Number"), relatedProductLink = productItem.GetString("Ecom:Product.PrimaryOrCurrentPageID") != Pageview.Page.ID.ToString() ? "/Default.aspx?ID=" + productItem.GetString("Ecom:Product.PrimaryOrCurrentPageID") + "&ProductID=" + productItem.GetString("Ecom:Product.ID") : "/Default.aspx?ID=" + Pageview.Page.ID.ToString() + "&ProductID=" + productItem.GetString("Ecom:Product.ID"), relatedImage = (!string.IsNullOrEmpty(productItem.GetString("Ecom:Product.ImageSmall.Clean"))) ? productItem.GetString("Ecom:Product.ImageSmall.Clean") : "/Files/Files/"+designName+"/Products/Images/" + relatedProductNumber + ".jpg"; <li class="col-md-3 col-sm-4 col-xs-12"> <figure> <a href="@relatedProductLink"> <img src="@GetImage(relatedImage, 300, 0, 0, 0, 0, 0, "jpg")" alt="@relatedProductName" title="@relatedProductName" class="img-responsive" /> </a> </figure> <h3><a href="@relatedProductLink">@relatedProductName</a></h3> </li> } </ul> </div> } } </div> } *@ </article> } } else { //User is not authenticated. We display guest layout <article id="product-description" class="col-xs-12 noPadding"> @* Sidebar Start *@ <div class="col-xs-12 col-sm-3 noPaddingLeft"> <div id="product-navigation" > <div class="productDetailsBox "> <h3>PRODUCT DETAILS</h3> </div> <ul class=""> <li class=""> <a class="anchor_9" href="#optionsAccessories">Options &amp; Accessories</a> </li> <li class=""> <a class="anchor_11" href="#relatedProducts">Related products</a> </li> <li class="activeItem"> <a class="anchor_2" href="#product-information">Product Information</a> </li> <li class=""> <a class="anchor_1" href="#specifications">Specifications</a> </li> @if(isLoggedIn){ <li class=""> <a class="anchor_9" href="#replacementParts">Replacement Parts</a> </li> <li class=""> <a class="anchor_3" href="#documents">Documents</a> </li> <li class=""> <a class="anchor_10" href="#software">Software</a> </li> <li class=""> <a class="anchor_2" href="#marketing">Marketing</a> </li> <li class=""> <a class="anchor_3" href="#bulletins">Bulletins</a> </li> <li class=""> <a class="anchor_2" href="#videoZone">Video</a> </li> <li class=""> <a class="anchor_3" href="#faqsZone">FAQ &lsquo;s</a> </li> } @RenderSnippet("faqLink") </ul> </div> </div> @* Sidebar End *@ <div id="product-details" class="col-xs-9 noPadding"> <div id="product-info-wrapper" class="col-sm-6 col-xs-12"> <h2 class="product-title padding-bottom">@productName</h2> <div class="tags"> @if(isClearance){ <div class="item red"> <span>Clearance</span> </div> } @if(isDiscontinued){ <div class="item blue"> <span>Discontinued</span> </div> } </div> <div class="col-xs-12 noPadding"> @if(!string.IsNullOrEmpty(productIntro)){ <div class="col-xs-12 noPadding productIntroduction">@productIntro</div> } <p>@Translate("item", "Item #"): <span id="product__number">@productNumber</span></p> </div> @if(isLoggedIn && canSeePrices && !isDiscontinued){ if(isConnectionLive){ <div class="product-price inlineBlock" data-product-price='@productPrice'> @productPrice </div> <div id="price-table"> <table> <thead> <tr> <th>Price</th> <th>@productPrice</th> </tr> </thead> <tbody> <tr> <td>Qty 5-10</td> <td>$10.00</td> </tr> <tr> <td>Qty10+</td> <td>$5.00</td> </tr> </tbody> </table> </div> }else{ <div class="inlineBlock" data-product-price='@productPrice'> @unavailableText </div> } } @if ((!isDiscontinued) && (loopVariantGroups.Count == 0)) { if (isLoggedIn && !isUsed && productStock >= 1) { <div class="order-now"> <form name="addToCart" class="add-to-cart form-fields" action="@Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(@currentPageId)" method="post" data-outofstock='@Translate("outOfStock", "Out of stock")'> <input type="hidden" name="cartcmd" value="add"/> <input type="hidden" name="productID" value="@productId"/> <input type="hidden" name="variantID" id="variantID" value="@variantId" /> <div id="variantsContainer" class="col-xs-12 noPadding hidden2"> @if (loopVariantGroups.Count > 0) { foreach (LoopItem variantGroup in loopVariantGroups) { string variantGroupName = variantGroup.GetString("Ecom:VariantGroup.Name"); string variantGroupId = variantGroup.GetString("Ecom:VariantGroup.ID"); List<LoopItem> loopAvailableOptions = variantGroup.GetLoop("VariantAvailableOptions"); if (loopAvailableOptions.Count > 0) { <fieldset class="col-sm-12 col-xs-12 noPadding"> <label class="text-left" for="@variantGroupId">@variantGroupName</label> <select class="full-width-input" name="@(variantGroupId)_options" id="@variantGroupId"> @foreach (LoopItem option in loopAvailableOptions) { string optionId = option.GetString("Ecom:VariantOption.ID"); string optionName = option.GetString("Ecom:VariantOption.Name"); bool optionSelected = option.GetBoolean("Ecom:VariantOption.Selected"); <option value="@optionId" @((optionSelected) ? "selected" : "") >@optionName</option> } </select> </fieldset> } } } </div> @if(!HideStockInfo) { <div id="stockStatus" class="col-xs-12 noPadding"><i class="fa @stockStatus @stockColor"></i> @stockText</div> } @* <div id="stockStatus" class="col-xs-12 noPadding"><i class="fa @stockStatus @stockColor"></i> @stockText</div> *@ @if(canOrder) { <div class="col-xs-12 grayBox"> <div class="highlight-content text-right"> <fieldset class="quantity-container" style="vertical-align: middle; margin: 0px;"> <label for="quantity">@Translate("quantity", "Quantity")</label> <input data-stocktranslate='@Translate("currentStock", "The current stock is")' class="hidden quantityInput" data-stock='9999' min="1" maxlength="5" id="quantity" name="quantity" type="number" value="1"/> <select data-width="35%" name="quantitySelect"> @for (int num = 1; (num < 10) && num <= productStock; num++) { <option value="@num">@num</option> } @if (productStock >= 10) { <option value="10+">10+</option> } </select> @* <input id="quantity" name="quantity" data-stock="99999" type="number" value="1" style="margin: 0; vertical-align: middle; max-width: 4em; text-align: right; margin-right: 0.5em;" /> *@ </fieldset> <a class="btn btn-bg" id="addToCartSubmit"> <i class="fa fa-shopping-cart"></i> <span data-add='@Translate("addToCart", "Add to cart")' data-added='@Translate("added", "Added")'>@Translate("addToCart", "Add to Cart")</span> </a> @if (GetBoolean("Ecom:Product.CanBuyForPoints")) { <a class="btn btn-bg" id="addToCartPointsSubmit"> <i class="fa fa-shopping-cart"></i> <span data-add='@Translate("addWithPoints", "Add with points")' data-added='@Translate("added", "Added")'>@Translate("addWithPoints", "Add with points")</span> </a> } </div> </div> <input class="hidden" type="submit" value='@Translate("addToCart", "Add to Cart")' /> } </form> </div> } } else { if (isDiscontinued){ <div class="order-now"> <p>@Translate("partsOnly", "Parts only")</p> </div> } } <div class="col-xs-12 noPadding"> <div class="shareIcons"> <span>@Translate("share", "Share")</span> <ul> <li> <a class="fa-facebook fa" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=@(Pageview.GlobalTags.GetTagByName("Global:Request.Scheme").Value.ToString())://@(Pageview.GlobalTags.GetTagByName("Global:Request.Host").Value.ToString())@(Pageview.GlobalTags.GetTagByName("Global:Pageview.Url").Value.ToString())"><span>@Translate("shareFacebook", "Share facebook")</span></a> </li> <li> <a class="fa-twitter fa" target="_blank" href="https://twitter.com/home?status=@(Pageview.GlobalTags.GetTagByName("Global:Request.Scheme").Value.ToString())://@(Pageview.GlobalTags.GetTagByName("Global:Request.Host").Value.ToString())@(Pageview.GlobalTags.GetTagByName("Global:Pageview.Url").Value.ToString())"><span>@Translate("shareTwitter", "Share twitter")</span></a> </li> <li> <a class="fa-linkedin fa" target="_blank" href="https://www.linkedin.com/shareArticle?mini=true&url=@(Pageview.GlobalTags.GetTagByName("Global:Request.Scheme").Value.ToString())://@(Pageview.GlobalTags.GetTagByName("Global:Request.Host").Value.ToString())@(Pageview.GlobalTags.GetTagByName("Global:Pageview.Url").Value.ToString())&title=@productName&summary=@productIntro&source="><span>@Translate("shareLinkedin", "Share linkedin")</span></a> </li> </ul> </div> </div> @RenderSnippet("RecommendedSubstitutions") </div> @* Product Images Start *@ <div id="product-images" class="col-sm-6 col-xs-12 noPadding"> <div id="product-lg-image" class="col-xs-12 noPaddingLeft"> <figure class="text-center"> <img class="img-responsive" src="@productGetImage" alt="@CleanString(productName)" title="@CleanString(productName)" data-zoom="@productGetImageZoom" /> <div class="hidden" id="videoContainer"> <a id="playPause" href="#"><i class="fa fa-play"></i></a> <video id="video" width="100%" src=""> Your browser does not support the video tag. </video> </div> </figure> </div> @if(imagesList.Count() > 0) { <div class="col-xs-12"> <div id="imgThumbs" class="col-xs-12 noPaddingLeft"> <ul> @foreach (System.Collections.Generic.Dictionary<String, String> imageStr in imagesList) { bool isAnImage = imageStr["image"].ToString().Contains(".png"); string getimageImg = GetImage(imageStr["image"].ToString(), 0, 105), getimageDataImg = isAnImage ? GetImage(imageStr["image"].ToString(), 600, 600) : imageStr["image"].ToString(), getimageDataImgBig = isAnImage ? GetImage(imageStr["image"].ToString(), 1200, 1200, 0, 0, 0, 0, "jpg") : imageStr["image"].ToString(), liClass = imagesList.IndexOf(imageStr) == 0 ? "active" : ""; <li data-type='@imageStr["image"].ToString().Substring(imageStr["image"].ToString().LastIndexOf('/') + 1).Replace(productNumber, "").Replace(".jpg","").Replace(".mp4","")' class="@liClass"> @if(isAnImage) { <img data-image="@getimageDataImg" data-image-big="@getimageDataImgBig" class="img-responsive" src="@getimageImg" title="@CleanString(imageStr["title"])" alt="@CleanString(imageStr["title"])" /> } else { <video data-image="@getimageDataImg" width="100%" src="@getimageDataImg">Your browser does not support the video tag.</video> } </li> } </ul> </div> </div> } </div> @* Product Images End *@ </div> @* Product Sections Start *@ <div class="product-sections col-sm-offset-3 col-sm-9 col-xs-12 noPadding"> <div class="col-xs-12"> <div class="row"> @if((!isDiscontinued) && (loopVariantGroups.Count > 0)) { var iteration = 1; <section class="order-now order-now-configuration grayBox col-xs-12"> <h3 style="padding: 0px; margin: 0px; border: none; background-color: transparent; line-height: 2; border-bottom: 1px solid #000; margin-bottom: 0.5em;">Configuration</h3> <form name="addToCart" class="add-to-cart form-fields" action="@Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(@currentPageId)" method="post" data-outofstock='@Translate("outOfStock", "Out of stock")'> <input type="hidden" name="cartcmd" value="add"/> <input type="hidden" name="productID" value="@productId"/> <input type="hidden" name="variantID" id="variantID" value="@variantId" /> <div class="row"> <div id="variantsContainer" class="col-xs-6"></div> <div id="partsContainer" class="col-xs-6"> @foreach(LoopItem BOMProducts in loopBOMProducts){ string BOMName = BOMProducts.GetString("Ecom:Product.Configurator.Name"); string BOMId = BOMProducts.GetString("Ecom:Product.Configurator.ID"); <fieldset class="col-sm-12 col-xs-12 noPadding"> <label class="text-left" for="@BOMId">@BOMName</label> <select class="variant full-width-input" name="@(BOMId)" id="@BOMId" bom-value=""> @foreach(LoopItem BOMItem in BOMProducts.GetLoop("ConfiguratorProducts")) { string optionId = BOMItem.GetString("Ecom:Product.ID"); string optionVariantId = null; string optionNumber = BOMItem.GetString("Ecom:Product.Number"); string optionName = BOMItem.GetString("Ecom:Product.Name"); string optionPrice = BOMItem.GetString("Ecom:Product.ActualPrice"); productLazyLoadingCollector.AddProduct(optionId, optionVariantId, optionNumber); <option value="@optionId" data-option-price='@optionPrice'>@optionName</option> } </select> </fieldset> } </div> </div> @if (isLoggedIn && canOrder) { <div class="highlight-content text-center"> @* @if(showQuantity && productStock > 0) { *@ <fieldset class="quantity-container"> <label for="quantity">@Translate("quantity","Quantity")</label> <input data-stocktranslate='@Translate("currentStock","The current stock is")' class="hidden quantityInput" data-stock='9999' maxlength="5" id="quantity" name="quantity" type="number" value="1"/> <select data-width="50%" name="quantitySelect"> @for(int num=1; (num < 10) && num <= productStock; num++){ <option value="@num">@num</option> } @if(productStock >= 10) { <option value="10+">10+</option> } </select> @* <input id="quantity" class="quantity" data-stock="99999" name="quantity" type="number" value="1"/> *@ </fieldset> @* } *@ <a class="btn btn-bg" id="addToCartSubmit"> <i class="fa fa-shopping-cart"></i> <span data-add='@Translate("addToCart", "Add to cart")' data-added='@Translate("added", "Added")'>@Translate("addToCart", "Add to Cart")</span> </a> @if(GetBoolean("Ecom:Product.CanBuyForPoints")) { <a class="btn btn-bg" id="addToCartPointsSubmit"> <i class="fa fa-shopping-cart"></i> <span data-add='@Translate("addWithPoints", "Add with points")' data-added='@Translate("added", "Added")'>@Translate("addWithPoints", "Add with points")</span> </a> } </div> } <input class="hidden" type="submit" value='@Translate("addToCart", "Add to Cart")' /> </form> </section> } </div> </div> @RenderSnippet("OptionsAccessories") @RenderSnippet("RelatedProducts") @if (!string.IsNullOrEmpty(productDescription)) { <section id="product-information" class="col-xs-12 noPadding"> <h3>Product information</h3> <div class="col-xs-12 product-information"> @productDescription </div> </section> } @if (!string.IsNullOrEmpty(productDetails)) { <section id="specifications" class="col-xs-12 noPadding"> <h3>Specifications</h3> <div class="col-xs-12 product-specifications"> @productDetails </div> </section> } @if(isLoggedIn){ @RenderSnippet("replacementParts") if (documentsList.Any() || loopDetails.Any()) { <section id="documents" class="col-xs-12 noPadding"> <h3>Documents</h3> <div class="col-xs-12" id="productDdownloads_tab"> <ul> @if (documentsList.Any()) { @*Product related files*@ foreach (System.Collections.Generic.Dictionary<String, String> fileStr in documentsList) { string file = fileStr["file"]; var metadata = Dynamicweb.Content.Files.Metadata.EditorFactory.GetMetadataForFile(file); string temp = @".", metafield = "title", fileName = file.Substring((file.LastIndexOf("/") + 1), (file.Length - file.LastIndexOf("/") - 1)), fileTitle = metadata != null && metadata.GetValue(metafield).ToString() != "" ? metadata.GetValue(metafield).ToString() : fileName, substringFile = file.Substring((file.LastIndexOf(temp) + 1), (file.Length - file.LastIndexOf(temp) - 1)), icon = iconFiles.ContainsKey(substringFile) ? iconFiles[substringFile] : "fa-file-pdf-o"; if (substringFile != "xml") { <li> <a class="downloadFile" href="@file"><i class='fa @icon'></i> @fileTitle</a> </li> } } } @if (loopDetails.Any()) { @*Shared files*@ foreach (LoopItem detail in loopDetails.Where(x => x.GetString("Ecom:Product:Detail.Image.Clean").StartsWith("/Files/CRS/_Shared/Documents/"))) { string file = detail.GetString("Ecom:Product:Detail.Image.Clean"); var metadata = Dynamicweb.Content.Files.Metadata.EditorFactory.GetMetadataForFile(file); string temp = @".", metafield = "title", fileTitle = metadata != null ? metadata.GetValue(metafield).ToString() : Translate("download", "Download"), substringFile = file.Substring((file.LastIndexOf(temp) + 1), (file.Length - file.LastIndexOf(temp) - 1)), icon = iconFiles.ContainsKey(substringFile) ? iconFiles[substringFile] : "fa-file-pdf-o"; <li> <a class="downloadFile" href="@file"><i class='fa @icon'></i> @fileTitle</a> </li> } } </ul> </div> </section> } if (softwareList.Any() || loopDetails.Any()) { <section id="software" class="col-xs-12 noPadding"> <h3>Software gggg</h3> <div class="col-xs-12" id="productDdownloads_tab"> <ul> @if (softwareList.Any()) { @*Product related files*@ foreach (System.Collections.Generic.Dictionary<String, String> fileStr in softwareList) { string file = fileStr["file"]; var metadata = Dynamicweb.Content.Files.Metadata.EditorFactory.GetMetadataForFile(file); string temp = @".", metafield = "title", fileName = file.Substring((file.LastIndexOf("/") + 1), (file.Length - file.LastIndexOf("/") - 1)), fileTitle = metadata != null && metadata.GetValue(metafield).ToString() != "" ? metadata.GetValue(metafield).ToString() : fileName, substringFile = file.Substring((file.LastIndexOf(temp) + 1), (file.Length - file.LastIndexOf(temp) - 1)), icon = iconFiles.ContainsKey(substringFile) ? iconFiles[substringFile] : "fa-file-pdf-o"; if (substringFile != "xml") { <li> <a class="downloadFile" href="@file"><i class='fa @icon'></i> @fileTitle</a> </li> } } } @if (loopDetails.Any()) { @*Shared files*@ foreach (LoopItem detail in loopDetails.Where(x => x.GetString("Ecom:Product:Detail.Image.Clean").StartsWith("/Files/CRS/_Shared/Software/"))) { string file = detail.GetString("Ecom:Product:Detail.Image.Clean"); var metadata = Dynamicweb.Content.Files.Metadata.EditorFactory.GetMetadataForFile(file); string temp = @".", metafield = "title", fileTitle = metadata != null ? metadata.GetValue(metafield).ToString() : Translate("download", "Download"), substringFile = file.Substring((file.LastIndexOf(temp) + 1), (file.Length - file.LastIndexOf(temp) - 1)), icon = iconFiles.ContainsKey(substringFile) ? iconFiles[substringFile] : "fa-file-pdf-o"; <li> <a class="downloadFile" href="@file"><i class='fa @icon'></i> @fileTitle</a> </li> } } </ul> </div> </section> } if(marketingList.Any() || loopDetails.Any()) { <section id="marketing" class="col-xs-12 noPadding"> <h3>Marketing</h3> <div class="col-xs-12" id="productDdownloads_tab"> <ul> @if (marketingList.Any()) { @*Product related files*@ foreach (System.Collections.Generic.Dictionary<String, String> fileStr in marketingList) { string file = fileStr["file"]; var metadata = Dynamicweb.Content.Files.Metadata.EditorFactory.GetMetadataForFile(file); string temp = @".", metafield = "title", fileName = file.Substring((file.LastIndexOf("/") + 1), (file.Length - file.LastIndexOf("/") - 1)), fileTitle = metadata != null && metadata.GetValue(metafield).ToString() != "" ? metadata.GetValue(metafield).ToString() : fileName, substringFile = file.Substring((file.LastIndexOf(temp) + 1), (file.Length - file.LastIndexOf(temp) - 1)), icon = iconFiles.ContainsKey(substringFile) ? iconFiles[substringFile] : "fa-file-pdf-o"; if (substringFile != "xml") { <li> <a class="downloadFile" href="@file"><i class='fa @icon'></i> @fileTitle</a> </li> } } } @if (loopDetails.Any()) { foreach (LoopItem detail in loopDetails.Where(x => x.GetString("Ecom:Product:Detail.Image.Clean").StartsWith("/Files/CRS/_Shared/Marketing/"))) { string file = detail.GetString("Ecom:Product:Detail.Image.Clean"); var metadata = Dynamicweb.Content.Files.Metadata.EditorFactory.GetMetadataForFile(file); string temp = @".", metafield = "title", fileTitle = metadata != null ? metadata.GetValue(metafield).ToString() : Translate("download", "Download"), substringFile = file.Substring((file.LastIndexOf(temp) + 1), (file.Length - file.LastIndexOf(temp) - 1)), icon = iconFiles.ContainsKey(substringFile) ? iconFiles[substringFile] : "fa-file-pdf-o"; <li> <a class="downloadFile" href="@file"><i class='fa @icon'></i> @fileTitle</a> </li> } } </ul> </div> </section> } if (loopDetails.Any() || bulletinsList.Any()) { <section id="bulletins" class="col-xs-12 noPadding"> <h3>Bulletins</h3> <div class="col-xs-12" id="productDdownloads_tab"> <ul> @if (bulletinsList.Any()) { @*Product related files*@ foreach (System.Collections.Generic.Dictionary<String, String> fileStr in bulletinsList) { string file = fileStr["file"]; var metadata = Dynamicweb.Content.Files.Metadata.EditorFactory.GetMetadataForFile(file); string temp = @".", metafield = "title", fileName = file.Substring((file.LastIndexOf("/") + 1), (file.Length - file.LastIndexOf("/") - 1)), fileTitle = metadata != null && metadata.GetValue(metafield).ToString() != "" ? metadata.GetValue(metafield).ToString() : fileName, substringFile = file.Substring((file.LastIndexOf(temp) + 1), (file.Length - file.LastIndexOf(temp) - 1)), icon = iconFiles.ContainsKey(substringFile) ? iconFiles[substringFile] : "fa-file-pdf-o"; if (substringFile != "xml") { <li> <a class="downloadFile" href="@file"><i class='fa @icon'></i> @fileTitle</a> </li> } } } @if (loopDetails.Any()) { foreach (LoopItem detail in loopDetails.Where(x => x.GetString("Ecom:Product:Detail.Image.Clean").StartsWith("/Files/CRS/_Shared/Bulletins/"))) { string file = detail.GetString("Ecom:Product:Detail.Image.Clean"); var metadata = Dynamicweb.Content.Files.Metadata.EditorFactory.GetMetadataForFile(file); string temp = @".", metafield = "title", fileTitle = metadata != null ? metadata.GetValue(metafield).ToString() : Translate("download", "Download"), substringFile = file.Substring((file.LastIndexOf(temp) + 1), (file.Length - file.LastIndexOf(temp) - 1)), icon = iconFiles.ContainsKey(substringFile) ? iconFiles[substringFile] : "fa-file-pdf-o"; <li> <a class="downloadFile" href="@file"><i class='fa @icon'></i> @fileTitle</a> </li> } } </ul> </div> </section> } } @RenderSnippet("videoList") @RenderSnippet("faqs") </div> @* Product Sections End *@ @SnippetStart("RecommendedSubstitutions") @if (recommendedSubstitutions != null && recommendedSubstitutions.Count > 0) { <div class="col-xs-12 noPadding relatedContainer"> <h4 class="productTitles">@Translate("recommendedSubstitutions", "Recommended Substitutions")</h4> <ul class="relatedList-bkp"> @foreach (LoopItem productItem in recommendedSubstitutions) { string relatedProductId = productItem.GetString("Ecom:Product.ID"), relatedProductName = productItem.GetString("Ecom:Product.Name"), relatedProductNumber = productItem.GetString("Ecom:Product.Number"), relatedProductLink = productItem.GetString("Ecom:Product.PrimaryOrCurrentPageID") != Pageview.Page.ID.ToString() ? "/Default.aspx?ID=" + productItem.GetString("Ecom:Product.PrimaryOrCurrentPageID") + "&ProductID=" + productItem.GetString("Ecom:Product.ID") : "/Default.aspx?ID=" + Pageview.Page.ID.ToString() + "&ProductID=" + productItem.GetString("Ecom:Product.ID"); <li class=""> <h5><a href="@relatedProductLink">@relatedProductName (@relatedProductNumber)</a></h5> </li> } </ul> </div> } @SnippetEnd("RecommendedSubstitutions") @SnippetStart("RelatedProducts") @if (relatedProducts != null && relatedProducts.Count > 0) { <section id="relatedProducts" class="col-xs-12 noPadding"> <div class="col-xs-12 noPadding relatedProducts"> <h3>@Translate("relatedProducts", "Related Products")</h3> <div class="col-xs-12"> <ul class="slick-related relatedList row"> @foreach (LoopItem productItem in relatedProducts) { string relatedProductId = productItem.GetString("Ecom:Product.ID"), relatedProductName = productItem.GetString("Ecom:Product.Name"), relatedProductNumber = productItem.GetString("Ecom:Product.Number"), relatedProductLink = productItem.GetString("Ecom:Product.PrimaryOrCurrentPageID") != Pageview.Page.ID.ToString() ? "/Default.aspx?ID=" + productItem.GetString("Ecom:Product.PrimaryOrCurrentPageID") + "&ProductID=" + productItem.GetString("Ecom:Product.ID") : "/Default.aspx?ID=" + Pageview.Page.ID.ToString() + "&ProductID=" + productItem.GetString("Ecom:Product.ID"), relatedImage = (!string.IsNullOrEmpty(productItem.GetString("Ecom:Product.ImageSmall.Clean"))) ? productItem.GetString("Ecom:Product.ImageSmall.Clean") : "/Files/Files/" + designName + "/Products/Images/" + relatedProductNumber + ".jpg"; <li class="item col-md-3 col-sm-4 col-xs-12"> <figure> <a href="@relatedProductLink"> <img src="@GetImage(relatedImage, 300, 0, 0, 0, 0, 0, "jpg")" alt="@relatedProductName" title="@relatedProductName" class="img-responsive" /> </a> </figure> <h3><a href="@relatedProductLink">@relatedProductName</a></h3> </li> } </ul> </div> </div> </section> } @SnippetEnd("RelatedProducts") @SnippetStart("OptionsAccessories") @if (optionsAccessories != null && optionsAccessories.Count > 0) { <section id="optionsAccessories" class="col-xs-12 noPadding"> <div class="col-xs-12 noPadding relatedProducts"> <h3>@Translate("optionsAccessories", "Options & Accessories")</h3> <div class="col-xs-12"> <table width="100%" class="table-product-list"> @if (isLoggedIn) { <colgroup> <col style="width: 20%"> <col style="width: 20%"> <col style="width: 30%"> <col style="width: 15%"> <col style="max-width:30px;"> <col style="width: 7.5%"> </colgroup> <thead> <tr> <th></th> <th>Product Number</th> <th>Description</th> </tr> </thead> } else { <colgroup> <col style="width: 20%"> <col style="width: 20%"> <col style="width: 45%"> <col style="max-width:30px;"> <col style="width: 7.5%"> </colgroup> <thead> <tr> <th></th> <th>Product Number</th> <th>Description</th> </tr> </thead> } <tbody ref="update-option-table" data-load-list="@productId" data-logged-in="@isLoggedIn"> <tr> <td colspan="6" align="center"> <i class="fa fa-spinner fa-spin fa-3x fa-fw"></i> <span class="sr-only">Loading...</span> </td> </tr> </tbody> </table> </div> <div class="col-xs-12 action"> <button type="button" ref="more-options" data-id="@productId" class="btn btn-bg">@Translate("More", "More")</button> </div> </div> </section> } @SnippetEnd("OptionsAccessories") @SnippetStart("faqs") @{string str_filter = "Products contains '" + productId + "'";} @RenderItemList(new { ItemType = "Faqs", ListSourceType = "Page", ListSourcePage = 64, ItemFieldsList = "*", ListTemplate = "ItemPublisher/List/ProductFaqs.cshtml", ListPageSize = 500, IncludeParagraphItems = "True", ListOrderBy = "Question", Filter = @str_filter }) @SnippetEnd("faqs") @SnippetStart("videoList") @{var video_filter = "Products contains '" + productId + "'"; } @RenderItemList(new { ItemType = "VideoGallery", ListSourceType = "Page", ListSourcePage = 153, ItemFieldsList = "*", ListTemplate = "ItemPublisher/List/ProductGallery.cshtml", ListPageSize = 20, IncludeParagraphItems = "True", ListOrderBy = "Title", Filter = @video_filter }) @SnippetEnd("videoList") @SnippetStart("replacementParts") @{var blowout_filter = "Products_Associated contains '" + productId + "'"; } @RenderItemList(new { ItemType = "Blowout_Diagram", ListSourceType = "Page", ListSourcePage = 154, ItemFieldsList = "*", ListTemplate = "ItemPublisher/List/ProductBlowoutDiagrams_noOrder.cshtml", ListPageSize = 20, IncludeParagraphItems = "True", ListOrderBy = "Serial_Number_Start", Filter = @blowout_filter }) @SnippetEnd("replacementParts") @* <!-- Related --> @if(GetLoop("ProductRelatedGroups").Count > 0){ <div class="col-xs-12 noPadding" id="relatedContainer"> @foreach (LoopItem group in GetLoop("ProductRelatedGroups")){ List<LoopItem> relatedProducts = group.GetLoop("RelatedProducts"); if(relatedProducts.Count > 0){ <div class="col-xs-12 noPadding relatedContainer"> <h2 class="productTitles">@group.GetString("Ecom:Product:RelatedGroup.Name") @group.GetString("Ecom:Product:RelatedGroup.GroupID")</h2> <ul class="relatedList row"> @foreach (LoopItem productItem in relatedProducts){ string relatedProductId = productItem.GetString("Ecom:Product.ID"), relatedProductName = productItem.GetString("Ecom:Product.Name"), relatedProductNumber = productItem.GetString("Ecom:Product.Number"), relatedProductLink = productItem.GetString("Ecom:Product.PrimaryOrCurrentPageID") != Pageview.Page.ID.ToString() ? "/Default.aspx?ID=" + productItem.GetString("Ecom:Product.PrimaryOrCurrentPageID") + "&ProductID=" + productItem.GetString("Ecom:Product.ID") : "/Default.aspx?ID=" + Pageview.Page.ID.ToString() + "&ProductID=" + productItem.GetString("Ecom:Product.ID"), relatedImage = (!string.IsNullOrEmpty(productItem.GetString("Ecom:Product.ImageSmall.Clean"))) ? productItem.GetString("Ecom:Product.ImageSmall.Clean") : "/Files/Files/"+designName+"/Products/Images/" + relatedProductNumber + ".jpg"; <li class="col-md-3 col-sm-4 col-xs-12"> <figure> <a href="@relatedProductLink"> <img src="@GetImage(relatedImage, 300, 0, 0, 0, 0, 0, "jpg")" alt="@relatedProductName" title="@relatedProductName" class="img-responsive" /> </a> </figure> <h3><a href="@relatedProductLink">@relatedProductName</a></h3> </li> } </ul> </div> } } </div> } *@ </article> } </div> @SnippetStart("OGMeta") <meta property="og:title" content='@productName' /> <meta property="og:image" content='@Pageview.GlobalTags.GetTagByName("Global:Request.Scheme").Value.ToString()://@Pageview.GlobalTags.GetTagByName("Global:Request.Host").Value.ToString()@productGetImage' /> <meta property="og:site_name" content='@areaItem["CompanyName"]' /> <meta property="og:url" content='@Pageview.GlobalTags.GetTagByName("Global:Request.Scheme").Value.ToString()://@Pageview.GlobalTags.GetTagByName("Global:Request.Host").Value.ToString()@Pageview.GlobalTags.GetTagByName("Global:Pageview.Url").Value.ToString()' /> <meta property="og:description" content='@StripHtml(productIntro)' /> <meta property="og:type" content="article" /> <meta property="og:locale" content='@Pageview.GlobalTags.GetTagByName("Global:Area.LongLang").Value.ToString().Replace("-", "_")' /> @SnippetEnd("OGMeta") @SnippetStart("jsOnLoad") @SnippetEnd("jsOnLoad") @functions { public static string StripHtml(string source) { return Regex.Replace(source, "<.*?>", string.Empty); } public static List<Dictionary<string, string>> GetDocumentFiles(string folderPath) { List<Dictionary<string, string>> documentsList = new List<Dictionary<string, string>>(); string documentFolderPath = Path.GetDirectoryName(HttpContext.Current.Server.MapPath(folderPath)); string documentsPattern = "*", titleKey = "title", fileKey = "file", title = "", documentFile = "", documentName = ""; if (Directory.Exists(documentFolderPath)) { string temp = @"\"; foreach (string file in Directory.GetFiles(documentFolderPath, documentsPattern)) { Dictionary<string, string> dct_file = new Dictionary<string, string>(); documentName = file.Substring((file.LastIndexOf(@temp) + 1), (file.Length - file.LastIndexOf(@temp) - 1)); documentFile = folderPath + file.Substring((file.LastIndexOf(@temp) + 1), (file.Length - file.LastIndexOf(@temp) - 1)); string metafield = "title"; var metadata = Dynamicweb.Content.Files.Metadata.EditorFactory.GetMetadataForFile(documentFile); title = metadata != null ? metadata.GetValue(metafield).ToString() : documentName; dct_file.Add(titleKey, title); dct_file.Add(fileKey, documentFile); documentsList.Add(dct_file); } } return documentsList; } } @{ string productLazyLoadingJson = productLazyLoadingCollector.SerializeProducts(); } <script> var productLazyLoadingJsonRaw = @productLazyLoadingJson; onLoadProductDetailModified(productLazyLoadingJsonRaw); </script>
RSPA USA Award RSPA Canada award 2023 VAE