Error executing template "Designs/Hags2024/eCom/Product/Product.cshtml" System.Xml.XmlException: There are multiple root elements. Line 1, position 43. at System.Xml.XmlTextReaderImpl.Throw(Exception e) at System.Xml.XmlTextReaderImpl.Throw(String res, String arg) at System.Xml.XmlTextReaderImpl.ParseDocumentContent() at System.Xml.XmlTextReaderImpl.Read() at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc) at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace) at System.Xml.XmlDocument.Load(XmlReader reader) at System.Xml.XmlDocument.LoadXml(String xml) at Dynamicweb.Modules.Properties.LoadProperty(String xml, Boolean merge) at Dynamicweb.Modules.Properties.GetParagraphModuleSettings(Int32 pageId, String paragraphModuleSystemName) at HagsWeb.Library.Utilities.DWUtilities.GetProductUrl(Product product, Int32 areaId) at HagsWeb.Library.Utilities.DWUtilities.GetProductSearchResultUrl(String SearchResultUrl, Boolean variantsOnly, String languageId, Int32 areaId) at CompiledRazorTemplates.Dynamic.RazorEngine_c752f30d271f42718dfc3466fe03e51a.Execute() in B:\Projects\Hags_Dw915\Files\Templates\Designs\Hags2024\eCom\Product\Product.cshtml:line 56 at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader) at RazorEngine.Templating.RazorEngineCore.RunTemplate(ICompiledTemplate template, TextWriter writer, Object model, DynamicViewBag viewBag) at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag) at RazorEngine.Templating.DynamicWrapperService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag) at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<RunCompile>b__0(TextWriter writer) at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter) at RazorEngine.Templating.RazorEngineServiceExtensions.RunCompile(IRazorEngineService service, String name, Type modelType, Object model, DynamicViewBag viewBag) at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template) at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template) at Dynamicweb.Rendering.Template.RenderRazorTemplate()
1 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 2 @using System; 3 @using System.Globalization; 4 @using System.Collections.Generic; 5 @using System.Linq; 6 @using System.Web.Optimization; 7 @using HagsWeb.Library.Services.FileSystemService; 8 @using HagsWeb.Library.Utilities; 9 @using System.Text.RegularExpressions; 10 @using System.Text; 11 12 13 @* scripts required by this template - this snippet is rendered in the head tag of base.cshtml *@ 14 15 @SnippetStart("productScripts") 16 @* expand this for re-design debugging *@ 17 @* Scripts.Render("~/bundle/ProductFilter") *@ 18 19 @{ 20 string designBaseUrl = GetString("Template:DesignBaseUrl"); 21 } 22 23 <!--script type="text/javascript" src="@(designBaseUrl)assets/js/functions/variant-filter.js"></script--> 24 <script type="text/javascript" src="@(designBaseUrl)assets/js/functions/product-create-pdf.js"></script> 25 <script type="text/javascript" src="@(designBaseUrl)assets/js/libraries/wheel-zoom/wheel-zoom.min.js"></script> 26 27 @SnippetEnd("productScripts") 28 29 @* for this page we don't want the header to be positioned over the content *@ 30 @*SnippetStart("headerClass")@("in-flow")@SnippetEnd("headerClass")*@ 31 32 @* all the product model query code - sets up the models and variables used in this template *@ 33 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 34 @using Dynamicweb.Content.Items; 35 @using Dynamicweb.Ecommerce.Products; 36 @using HagsWeb.Library.Methods.AssetManager; 37 @using HagsWeb.Library.BusinessObjects.UsersLists; 38 @using HagsWeb.Library.Methods.AssetSearch; 39 @using HagsWeb.Library.Methods.Page; 40 @using HagsWeb.Library.Methods.ProductImages; 41 @using HagsWeb.Library.Methods.ProductProperties; 42 @using HagsWeb.Library.Methods.ProductFilter; 43 @using HagsWeb.Library.Services.IPService; 44 @using HagsWeb.Library.State; 45 @{ 46 Dynamicweb.Frontend.PageView thisPage = Dynamicweb.Frontend.PageView.Current() ?? Dynamicweb.Frontend.PageView.Current(); 47 Item areaItem = Item.GetItemById("Website_Settings", thisPage.Area.Item.Id); 48 string pageUrl = GetGlobalValue("Global:Request.Scheme") + "://" + GetGlobalValue("Global:Request.Host") + thisPage.SearchFriendlyUrl; 49 string themeTag = HagsPages.GetThemeByNavigationTag(GetGlobalValue("Global:Page.Top.ID")); // gets the page ID at the top of the tree this page sits on. 50 var siteSection = HagsPages.GetSiteSection(thisPage.AreaID, thisPage.ID); 51 string salesPhoneNumber = areaItem["Telephone"].ToString(); 52 53 string productNumber = GetString("Ecom:Product.Number"); // The Product NUMBER 54 //int areaId = GetGlobalValue("Global:Area.ID"); 55 56 string canonicalProductUrl = GetGlobalValue("Global:Request.Scheme") + "://" + GetGlobalValue("Global:Request.Host") + HagsWeb.Library.Utilities.DWUtilities.GetProductSearchResultUrl("ProductNumber=" + productNumber, false, "LANG1", thisPage.AreaID); 57 canonicalProductUrl = "<link rel=\"canonical\" href=\"" + canonicalProductUrl + "\" />"; 58 //override the canonical tag added by hagspages 59 Pageview.Meta.AddTag("customCan", canonicalProductUrl); 60 Pageview.Meta.Title = GetString("Ecom:Product.Name") + " | HAGS"; 61 62 string currentCulture = GetGlobalValue("Global:Area.LongLang"); //en-GB, sv-SE 63 string currentCountry = currentCulture.Substring(currentCulture.Length - 2); // GB, SE 64 string currentlanguage = currentCulture.Substring(0, 2); // en, sv "de";// 65 string ipPriceAllowed = string.Empty; 66 67 if (thisPage.AreaID == 2 || thisPage.AreaID == 7) // Sweden and UK 68 { 69 ipPriceAllowed = IPCheck.CountryPriceAllowed(currentCountry); //ZZZ,Hags_GB,Hags_SE and Hags_, Anon_GB, Anon_SE network range checker(Web.config) 70 } 71 72 IEnumerable<ProductAsset> assets = AssetManager_Repository.GetAssets(productNumber, AssetType.All, true); 73 IEnumerable<ProductAsset> allImages = assets.Where(n => n.Index == AssetTypeEnum.ToFriendlyAssetName(AssetType.Images)).ToList(); 74 75 var imagesCount = assets.Select(n => n).Where(n => n.Index == AssetTypeEnum.ToFriendlyAssetName(AssetType.Images)).Count(); 76 var brochCount = assets.Select(n => n).Where(n => n.Index == AssetTypeEnum.ToFriendlyAssetName(AssetType.Brochures)).Count(); 77 78 // New sorting for Product Images, thumbs and hiResDownloads for Zoom Images 79 Tuple<SortedList<int, string[,]>, IEnumerable<ProductAsset>> mainProductImages = ProductImages.MarshallZoomImages(allImages, productNumber); 80 SortedList<int, string[,]> zoomList = mainProductImages.Item1; 81 IEnumerable<ProductAsset> hiResDownloads = mainProductImages.Item2; 82 83 84 // The users Product Collection in session 85 List<ProductCollectionItem> productCollectionItems = SessionManager.UsersMyProductCollection != null ? SessionManager.UsersMyProductCollection : new List<ProductCollectionItem>(); 86 bool isProductCollection = productCollectionItems.Any(n => n.ProductNumber == productNumber); 87 88 // users Product Collection 89 string collectionData = string.Format("CCAddToMyLists={0}&CCAddToListVariantID={1}&CCAreaID={2}&CCAddToListCulture={3}&CCAddToListLanguageID={4}#{5}", 90 GetString("Ecom:Product.Number"), GetString("Ecom:Product.VariantID"), GetGlobalValue("Global:Area.ID"), GetGlobalValue("Global:Area.LongLang"), @GetString("Ecom:Product.LanguageID"), siteSection); 91 92 93 // New Age Ranges. Some Template Tags dont work very well in upgraded DW version 9.7.2 94 List<string> ageRanges = new List<string>(); 95 if (!string.IsNullOrEmpty(GetString("Ecom:Product:Field.AgeRange"))) 96 { 97 ageRanges = ProductAgeRanges.GetAgeRanges(GetString("Ecom:Product:Field.AgeRange"), GetString("Ecom:Product.LanguageID")); 98 } 99 100 // New Product Functions. Some Template Tags dont work very well in upgraded DW version 9.7.2 101 List<ResultField> productFunctions = new List<ResultField>(); 102 if (!string.IsNullOrEmpty(GetString("Ecom:Product:Field.ProductFunctions"))) 103 { 104 productFunctions = ProductFieldValues.GetProductFieldOptions(GetString("Ecom:Product:Field.ProductFunctions"), "ProductFunctions", GetString("Ecom:Product.LanguageID")); 105 } 106 107 // For filtering the variants of this product 108 ResultSet colourOptions = new ResultSet(); 109 ResultSet materialOptions = new ResultSet(); 110 ResultSet anchoringOptions = new ResultSet(); 111 ResultSet optionOptions = new ResultSet(); 112 113 114 string selectedColourVariant = string.Empty; 115 string selectedAnchoringVariant = string.Empty; 116 string selectedAnchoringVariantId = string.Empty; 117 string selectedAnchoringIcon = string.Empty; 118 string selectedMaterialVariant = string.Empty; 119 string selectedOptionVariant = string.Empty; 120 //List<VariantOption> selectedProductOptions = new List<VariantOption>(); 121 122 123 124 if (GetInteger("Ecom:Product.VariantCount") > 0) 125 { 126 foreach (var variantGroup in GetLoop("VariantGroups").Where(n => n.GetString("Ecom:VariantGroup.ID") != "D")) // Remove All Date Variants 127 { 128 int optionsCount = variantGroup.GetLoop("VariantAvailableOptions").Count(); 129 130 if (optionsCount > 0) 131 { 132 if (!string.IsNullOrEmpty("Ecom:Product.SelectedVariantComboID")) // optionsCount == 1 133 { 134 foreach (var availableOption in variantGroup.GetLoop("VariantAvailableOptions")) 135 { 136 137 if (variantGroup.GetString("Ecom:VariantGroup.ID") == "S55") 138 { 139 colourOptions.Name = variantGroup.GetString("Ecom:VariantGroup.Name"); 140 141 if (availableOption.GetString("Ecom:VariantOption.Name") != "Not applicable") 142 { 143 144 colourOptions.Results.Add(new ResultField() { Name = availableOption.GetString("Ecom:VariantOption.Name"), Value = availableOption.GetString("Ecom:VariantOption.ID"), Sort = availableOption.GetInteger("Ecom:VariantOption.SortOrder"), Disabled = false }); 145 146 if (availableOption.GetBoolean("Ecom:VariantOption.Selected")) 147 { 148 selectedColourVariant = availableOption.GetString("Ecom:VariantOption.Name"); 149 } 150 } 151 } 152 if (variantGroup.GetString("Ecom:VariantGroup.ID") == "ATP1") 153 { 154 materialOptions.Name = variantGroup.GetString("Ecom:VariantGroup.Name"); 155 156 if (availableOption.GetString("Ecom:VariantOption.Name") != "Not applicable") 157 { 158 materialOptions.Results.Add(new ResultField() { Name = availableOption.GetString("Ecom:VariantOption.Name"), Value = availableOption.GetString("Ecom:VariantOption.ID"), Sort = availableOption.GetInteger("Ecom:VariantOption.SortOrder"), Disabled = false }); 159 160 if (availableOption.GetBoolean("Ecom:VariantOption.Selected")) 161 { 162 selectedMaterialVariant = availableOption.GetString("Ecom:VariantOption.Name"); 163 } 164 } 165 } 166 if (variantGroup.GetString("Ecom:VariantGroup.ID") == "ATP3") 167 { 168 anchoringOptions.Name = variantGroup.GetString("Ecom:VariantGroup.Name"); 169 170 if (availableOption.GetString("Ecom:VariantOption.Name") != "Not applicable") 171 { 172 anchoringOptions.Results.Add(new ResultField() { Name = availableOption.GetString("Ecom:VariantOption.Name"), Value = availableOption.GetString("Ecom:VariantOption.ID"), Sort = availableOption.GetInteger("Ecom:VariantOption.SortOrder"), Disabled = false }); 173 174 if (availableOption.GetBoolean("Ecom:VariantOption.Selected")) 175 { 176 selectedAnchoringVariant = availableOption.GetString("Ecom:VariantOption.Name"); 177 selectedAnchoringVariantId = availableOption.GetString("Ecom:VariantOption.ID"); 178 selectedAnchoringIcon = availableOption.GetString("Ecom:VariantOption.ID") + ".png"; 179 } 180 } 181 } 182 if (variantGroup.GetString("Ecom:VariantGroup.ID") == "ATP4") 183 { 184 optionOptions.Name = variantGroup.GetString("Ecom:VariantGroup.Name"); 185 186 if (availableOption.GetString("Ecom:VariantOption.Name") != "Not applicable") 187 { 188 optionOptions.Results.Add(new ResultField() { Name = availableOption.GetString("Ecom:VariantOption.Name"), Value = availableOption.GetString("Ecom:VariantOption.ID"), Sort = availableOption.GetInteger("Ecom:VariantOption.SortOrder"), Disabled = false }); 189 190 if (availableOption.GetBoolean("Ecom:VariantOption.Selected")) 191 { 192 selectedOptionVariant = availableOption.GetString("Ecom:VariantOption.Name"); 193 } 194 } 195 196 } 197 } 198 } 199 } 200 } 201 } 202 203 204 string assemblyInstructionsProductNumber = productNumber; 205 206 // Related Products are only assigned to Master Products, not Variant Products so we need the related Products from the Master to get the full list of 207 // Assembly Instructions 208 Product product = new ProductService().GetProductById(GetString("Ecom:Product.ID"), GetString("Ecom:Product.VariantID"), GetString("Ecom:Product.LanguageID")); 209 210 // Check if its a Master product. 211 if (!product.IsVariantMaster) 212 { 213 assemblyInstructionsProductNumber = new ProductService().GetProductsAndVariantsByProduct(product) 214 .FirstOrDefault<Product>(n => string.IsNullOrEmpty(n.VariantId)).Number; 215 } 216 217 // Check if its a Master product. 218 // Implementation of Variant Fallback overrides if no Variant is specified Original Product.cshtml is maintained in ProductV21TESTING.cshtml 219 220 //Tuple<string, string, string, string, string> optionsTuple; 221 string VariantId = string.Empty; 222 if (!string.IsNullOrEmpty(GetString("Ecom:Product.VariantID")) || !string.IsNullOrEmpty(GetString("Ecom:Product.ProductDefaultVariantComboId")) || !string.IsNullOrEmpty(GetString("Ecom:Product:Field.ProductVariantFallback"))) 223 { 224 VariantId = string.IsNullOrEmpty(GetString("Ecom:Product.VariantID")) ? GetString("Ecom:Product.ProductDefaultVariantComboId") : GetString("Ecom:Product.VariantID"); 225 226 // Implementation of Variant Fallback overrides if no Variant is specified Original Product.cshtml is maintained in ProductV21TESTING.cshtml 227 if (string.IsNullOrEmpty(VariantId)) 228 { 229 VariantId = GetString("Ecom:Product:Field.ProductVariantFallback"); 230 } 231 232 //optionsTuple = ProductFieldValues.GetProductOptions(VariantId, GetString("Ecom:Product.LanguageID")); 233 234 //selectedColourVariant = optionsTuple.Item1; 235 //selectedAnchoringVariant = optionsTuple.Item2; 236 //selectedMaterialVariant = optionsTuple.Item3; 237 //selectedOptionVariant = optionsTuple.Item4; 238 //selectedAnchoringIcon = optionsTuple.Item5; 239 //selectedProductOptions = optionsTuple.Item6; // used to filter related products by the variant values of this product 240 241 } 242 243 // Related Products and their Assembly Instructions 244 List<Product> relatedProducts = new List<Product>(); // Play Functions // Related products are now not required to be shown as a list of products. Gareth 17/02/2020 245 List<Product> relatedComponentProducts = new List<Product>(); 246 List<ProductAsset> relatedProductsAssemblyInstructions = new List<ProductAsset>(); 247 248 string variantOptions = selectedMaterialVariant + " " + selectedAnchoringVariant + " " + selectedOptionVariant + " " + selectedColourVariant; 249 250 if (GetInteger("Ecom:Product.RelatedCount") > 0) 251 { 252 // Play Functions // 253 if (GetLoop("ProductRelatedGroups").Where(n => n.GetString("Ecom:Product:RelatedGroup.Name") == "Product Modules") != null) 254 { 255 relatedProducts = ProductFilter.GetRelatedProducts(GetString("Ecom:Product.Number"), VariantId, "Product Modules", GetString("Ecom:Product.LanguageID")); 256 } 257 258 if (GetLoop("ProductRelatedGroups").Where(n => n.GetString("Ecom:Product:RelatedGroup.Name") == "Product Components") != null) 259 { 260 relatedComponentProducts = ProductFilter.GetRelatedProducts(assemblyInstructionsProductNumber, VariantId, "Product Components", GetString("Ecom:Product.LanguageID")); 261 //// Lookup Assembly Instructions Assets 262 foreach (Product relatedComponentProduct in relatedComponentProducts) 263 { 264 if (relatedComponentProduct != null) 265 { 266 List<ProductAsset> productAssemblyInstructions = AssetManager_Repository.GetAssets(relatedComponentProduct.Number, AssetType.AssemblyInstructions, true); 267 if (productAssemblyInstructions.Any()) 268 { 269 //List<ProductAsset> result = productAssemblyInstructions.Where(pa => !relatedProductsAssemblyInstructions.Any(pa2 => pa2.FileName == pa.FileName)).ToList(); 270 List<ProductAsset> result = productAssemblyInstructions 271 .Where(pa => !relatedProductsAssemblyInstructions.Any(pa2 => pa2.FileName.Substring(8, pa2.FileName.Length - 8) == pa.FileName.Substring(8, pa.FileName.Length - 8))).ToList(); 272 result.ForEach(n => n.RelatedProduct = productNumber); 273 relatedProductsAssemblyInstructions.AddRange(result); 274 } 275 } 276 } 277 } 278 } 279 } 280 281 @* these contain helpers for rendering futher down the page *@ 282 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 283 @using Dynamicweb.Rendering; 284 @using System; 285 @using System.Web; 286 @using System.Collections.Generic; 287 @using System.Linq; 288 @using Ionic.Zip; 289 @using System.IO; 290 @using System.Threading; 291 292 @helper GetButton(List<string> files, string sender, string productNumber) 293 { 294 var request = HttpContext.Current.Request.Form; 295 var response = HttpContext.Current.Response; 296 297 if (!string.IsNullOrEmpty(request["ProductNumber"])) 298 { 299 // Currently only used for Product Image download on results page - see also GetDownload.cshtml 300 // To do KOD extract this into a service in Library, also consider Hags\Application\Ajax\UsersProductCollection\UsersProductCollection.aspx.cs(398) 301 if ( files.Any() ) 302 { 303 try 304 { 305 var zipArchives = System.Web.HttpContext.Current.Server.MapPath("Files/System/UserDownloads/Zips"); 306 var transferFolder = System.Web.HttpContext.Current.Server.MapPath("Files/System/UserDownloads/Transfers"); 307 308 // empty the zipArchives folder of zips that are 30 mins old (if any) 309 var oldZips = new DirectoryInfo(zipArchives).EnumerateFiles().Where(f => f.CreationTime < DateTime.Now.AddMinutes(-30)).ToList(); 310 oldZips.ForEach(f => f.Delete()); 311 312 DirectoryInfo Folder = new DirectoryInfo(transferFolder); 313 // Occasionally some files are read only and cannot be deleted so change all files, remove readonly before the delete 314 Folder.EnumerateFiles().ToList().ForEach(file => file.Attributes = FileAttributes.Normal); 315 Directory.EnumerateFiles(transferFolder).ToList().ForEach(f => System.IO.File.Delete(f)); 316 317 // copy the selected files to the transferFolder and change from ReadOnly to try to prevent access to the path is denied error 318 files.ForEach(f => System.IO.File.Copy(f, Path.Combine(transferFolder, Path.GetFileName(f)), true)); 319 Folder.EnumerateFiles().ToList().ForEach(file => file.Attributes = FileAttributes.Normal); 320 321 // Set up our new zip folder 322 var downloadFileName = string.Format(request["ProductNumber"] +"_"+ request["ProductName"] +"_Bilder {0}.zip", DateTime.Now.ToString("dd-MM-yyyy-HH_mm_ss")); 323 // var downloadFileName = string.Format("Hags_Download_Pack-{0}.zip", DateTime.Now.ToString("dd-MM-yyyy-HH_mm_ss")); 324 325 //var zipLocationUrl = "Files/System/UserDownloads/Zips/" + downloadFileName; // Use this to return a link to the folder saved to disk 326 327 HttpContext.Current.Response.ContentType = "application/x-zip-compressed"; // Important - as is AppendHeader, not AddHeader 328 HttpContext.Current.Response.AppendHeader("Content-Disposition", "filename=" + downloadFileName); 329 330 using (var zip = new ZipFile()) 331 { 332 List<string> fileList = Directory.EnumerateFiles(transferFolder).ToList(); 333 //zip.AddDirectoryByName(subfolderName); 334 foreach (string file in fileList) 335 { 336 zip.AddFile(file, string.Empty); 337 } 338 339 // Save to the OutputStream 340 zip.Save(HttpContext.Current.Response.OutputStream); 341 // Or save the file to the file system using TransmitFile to stream the file without storing to memory 342 //zip.Save(zipArchives + "/" + downloadFileName); 343 } 344 345 // Transmit a file that was created on disk 346 //HttpContext.Current.Response.ContentType = "application/x-zip-compressed"; 347 //HttpContext.Current.Response.AppendHeader("Content-Disposition", "filename=" + downloadFileName); 348 //HttpContext.Current.Response.TransmitFile(zipArchives + "/" + downloadFileName); 349 350 351 352 } 353 catch (ZipException ze) 354 { 355 string message = ze + "ProductDownload/GetDownloadButton.cshtml ZipException download file error (" + sender + ") - Original File Count: " + files.Count() + "InnerEx: " + ze.InnerException + ""; 356 Dynamicweb.Logging.ILogger log = Dynamicweb.Logging.LogManager.Current.GetLogger("File Download Service"); 357 log.Info(message); 358 } 359 catch (System.IO.FileNotFoundException notFoundEx) 360 { 361 string message = notFoundEx + "../Templates/HagsModules/UsersAssetsSearch/ProductDownloads/GetDownloadButton.cshtml (" + sender + ") " + notFoundEx.Message + " - The File: " + notFoundEx.FileName +""; 362 Dynamicweb.Logging.ILogger log = Dynamicweb.Logging.LogManager.Current.GetLogger("File Download Service"); 363 log.Info(message); 364 } 365 catch (ThreadAbortException) 366 { 367 // A normal Thread abort after HttpContext.Current.Response.End(); we dont record it 368 } 369 catch (Exception ex) 370 { 371 string message = ex + "../Templates/HagsModules/UsersAssetsSearch/ProductDownloads/GetDownloadButton.cshtml (" + sender + ") " + ex.Message + " - The Inner Ex: " + ex.InnerException + ""; 372 Dynamicweb.Logging.ILogger log = Dynamicweb.Logging.LogManager.Current.GetLogger("File Download Service"); 373 log.Info(message); 374 } 375 finally 376 { 377 HttpContext.Current.Response.End(); 378 } 379 380 } 381 } 382 else 383 { 384 string buttonCaption = string.Empty; 385 if (sender == "Product") 386 { 387 buttonCaption = Translate("ImageDownloads", "Image Downloads"); 388 <button class="images-form btn btn--outline" role="button" 389 data-action-page="Product" 390 data-action-type="Button" 391 data-action-label="Image downloads" 392 data-action-value="@productNumber"> 393 @buttonCaption 394 </button> 395 } 396 if (sender == "AdvancedSearch") 397 { 398 buttonCaption = Translate("DownloadAll", "Download All"); 399 <button class="images-form btn btn--outline" role="button" data-action-type="" data-action-label=""> 400 @buttonCaption 401 </button> 402 } 403 404 405 } 406 } 407 408 409 410 @helper renderPageBreadcrumb(string thisUrl, string currentCulture, string productName, string variantOptions) { 411 412 string[] segments = Array.Empty<string>(); 413 Uri uri = new Uri(thisUrl); 414 if (uri.IsWellFormedOriginalString()) 415 { 416 segments = uri.Segments; 417 } 418 419 @* set up this so we can use it's title case method *@ 420 TextInfo thisTextInfo = new CultureInfo(currentCulture,false).TextInfo; 421 422 string first = segments.FirstOrDefault(); 423 string last = segments.LastOrDefault(); 424 425 if (!string.IsNullOrEmpty(productName)) 426 { 427 string stripSpaces = Regex.Replace(productName, @"\s+", " "); // some product names may have 2 or 3 spaces in them 428 productName = stripSpaces.Replace(" ", "-").ToLower(); 429 } 430 431 string concat = string.Empty; 432 433 StringBuilder sb = new StringBuilder(); 434 sb.Append("<ul class=\"product-nav product-nav--arrows\" role=\"list\">"); 435 436 437 foreach (var item in segments.Select((value,i)=>new{i,value})) 438 { 439 var index = item.i; 440 if (true) 441 { 442 string linkText = item.value.Replace("/",""); 443 concat += item.value; 444 445 if (segments.Length <= 2) // A shorthand URL like www.hags.com/hags-dragonfly or www.hags.de/hags-dragonfly 446 { 447 sb.Append("<li>" + thisTextInfo.ToTitleCase(linkText.Replace("-", " ")) + "</li>"); 448 } 449 // Request from the Product List with no Product Name 450 else if (item.value.Equals(last, StringComparison.CurrentCultureIgnoreCase) && string.IsNullOrEmpty(productName)) 451 { 452 sb.Append("<li><a href='" + concat.TrimEnd('/') + "' class=''> " + thisTextInfo.ToTitleCase(linkText.Replace("-", " ")) + "</a></li>"); 453 break; 454 } 455 // will be either the master product or the variant 456 else if (item.value.Equals(last, StringComparison.CurrentCultureIgnoreCase) && !item.value.Equals(productName, StringComparison.CurrentCultureIgnoreCase)) 457 { 458 linkText = variantOptions.Trim().Replace("Not applicable", "").ToLower(); 459 460 461 sb.Append("<li><a href='" + concat.TrimEnd('/') + "' class=''> " + thisTextInfo.ToTitleCase(linkText.Replace("-", " ")) + "</a></li>"); 462 } 463 else if (index == 2) 464 { 465 sb.Append("<li><a href='" + concat.TrimEnd('/') + "' class=''>Home</a></li>"); 466 } else if ( index > 2 ) { 467 sb.Append("<li><a href='" + concat.TrimEnd('/') + "' class=''>" + thisTextInfo.ToTitleCase(linkText.Replace("-", " ")) + "</a></li>"); 468 } 469 } 470 } 471 472 sb.Append("</ul>"); 473 474 @(sb.ToString()) 475 } 476 477 <article class="flow"> 478 479 <nav class="breadcrumb"> 480 <div class="wrapper"> 481 @renderPageBreadcrumb(pageUrl, GetGlobalValue("Global:Area.LongLang"), @GetString("Ecom:Product.Name"), variantOptions) 482 </div> 483 </nav> 484 485 486 <section class="product-header"> 487 488 <div class="wrapper flow"> 489 <h1>@GetString("Ecom:Product.Name")</h1> 490 @if (GetBoolean("Ecom:Product:Field.CentralStock")) 491 { 492 <p class="product-number">@productNumber-2</p> 493 } 494 else 495 { 496 <p class="product-number">@productNumber</p> 497 } 498 499 </div> 500 501 <div class="wrapper"> 502 503 <div class="fc-zoom"> 504 @*Zoom Product Images*@ 505 @if (zoomList.Count > 0) 506 507 { 508 <div class="fc-zoom__view"> 509 <div class="fc-zoom__target" id="zoom-target-1"> 510 @{ 511 var i = 0; 512 string resizeUrl = "/Admin/Public/GetImage.ashx?Image="; 513 string resizeOptions = "&Crop=0&Format=jpg&Height=350&Compression=75"; 514 } 515 @foreach (var zoomSet in zoomList) 516 { 517 string[,] imgSet = zoomSet.Value; 518 string imgId = string.Format("img_0{0}", zoomSet.Key); 519 string imageUrl = resizeUrl + imgSet[0, 2] + resizeOptions; 520 521 522 if (i == 0) 523 { 524 525 <img class="fc-zoom__img active" id="zoom-full-image-@i" src="@imgSet[0, 2]" data-zoom-image="@imgSet[0, 2]" alt="@GetString("Ecom:Product.Name")"> 526 } 527 else 528 { 529 <img class="fc-zoom__img" id="zoom-full-image-@i" src="@imgSet[0, 2]" data-zoom-image="@imgSet[0, 2]" alt="@GetString("Ecom:Product.Name")"> 530 } 531 i++; 532 } 533 </div> 534 535 <button class="fc-zoom__button fc-zoom__button--in reel-cards__btn" id="zoom-toggle"> 536 <span class="visually-hidden">Toggle Zoom</span> 537 <span class="fc-zoom__icon fc-zoom__icon--in"> 538 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 212 212" class="h24-icon h24-icon--bigger"><path fill="currentColor" fill-rule="evenodd" d="M106 6c55.193 0 100 44.807 100 100s-44.807 100-100 100S6 161.193 6 106 50.807 6 106 6Zm0 5.333c-26.124 0-49.792 10.603-66.928 27.74C21.936 56.207 11.333 79.875 11.333 106c0 26.124 10.603 49.792 27.74 66.928 17.135 17.136 40.803 27.739 66.927 27.739 26.124 0 49.792-10.603 66.928-27.74 17.136-17.135 27.739-40.803 27.739-66.927 0-26.124-10.603-49.792-27.74-66.928C155.793 21.936 132.125 11.333 106 11.333Zm14.215 100.332 38.614 38.615v-28.357a5 5 0 0 1 10 0v40c0 .389-.045.767-.128 1.13a5.002 5.002 0 0 1-4.93 4.163h-40a5 5 0 1 1 0-10h27.852l-38.48-38.48a5 5 0 0 1 7.072-7.071ZM89.738 43.201a5 5 0 1 1 0 10H61.885l38.48 38.48a5 5 0 0 1-7.072 7.07L54.68 60.138v28.357a5 5 0 1 1-10 0v-40c0-.389.045-.767.128-1.13a5.002 5.002 0 0 1 4.93-4.163h40Z"/></svg> 539 </span> 540 <span class="fc-zoom__icon fc-zoom__icon--out"> 541 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 212 212" class="h24-icon h24-icon--smaller"><path fill="currentColor" fill-rule="evenodd" d="M106 6c55.193 0 100 44.807 100 100s-44.807 100-100 100S6 161.193 6 106 50.807 6 106 6Zm0 5.333c-26.124 0-49.792 10.603-66.928 27.74C21.936 56.207 11.333 79.875 11.333 106c0 26.124 10.603 49.792 27.74 66.928 17.135 17.136 40.803 27.739 66.927 27.739 26.124 0 49.792-10.603 66.928-27.74 17.136-17.135 27.739-40.803 27.739-66.927 0-26.124-10.603-49.792-27.74-66.928C155.793 21.936 132.125 11.333 106 11.333Zm50.738 97.868a5 5 0 0 1 0 10h-27.853l38.48 38.48a5 5 0 1 1-7.072 7.07l-38.614-38.614v28.357a5 5 0 1 1-10 0v-40c0-.389.045-.767.128-1.13a5.002 5.002 0 0 1 4.93-4.163h40ZM53.215 45.665 91.829 84.28V55.923a5 5 0 1 1 10 0v40c0 .389-.045.767-.128 1.13a5.002 5.002 0 0 1-4.93 4.163h-40a5 5 0 0 1 0-10h27.852l-38.48-38.48a5 5 0 0 1 7.072-7.071Z"/></svg> 542 </span> 543 </button> 544 </div> 545 546 <div class="reel-thumbs fc-zoom__thumbs" id="zoom-gallery"> 547 548 <button 549 class="reel-cards__btn reel-cards__btn--prev" 550 data-action-page="Product" 551 data-action-type="Button" 552 data-action-label="Gallery prev" 553 data-action-value="@productNumber"> 554 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 212 212" class="h24-icon h24-icon--up"><path fill="currentColor" fill-rule="evenodd" d="M106 6c55.193 0 100 44.807 100 100s-44.807 100-100 100S6 161.193 6 106 50.807 6 106 6Zm0 5.333c-26.124 0-49.792 10.603-66.928 27.74C21.936 56.207 11.333 79.875 11.333 106c0 26.124 10.603 49.792 27.74 66.928 17.135 17.136 40.803 27.739 66.927 27.739 26.124 0 49.792-10.603 66.928-27.74 17.136-17.135 27.739-40.803 27.739-66.927 0-26.124-10.603-49.792-27.74-66.928C155.793 21.936 132.125 11.333 106 11.333Zm0 67.467c4.307 0 8.347 2.08 10.847 5.587l8.714 12.197.739 1.034 1.114 1.559.744 1.042 1.116 1.561.741 1.038 14.745 20.642c2.14 2.993 1.44 7.16-1.553 9.3-2.994 2.14-7.16 1.44-9.3-1.553L106 92.133l-27.907 39.074c-2.14 2.993-6.306 3.693-9.3 1.553-2.993-2.14-3.693-6.307-1.553-9.3l14.745-20.642.741-1.038 1.116-1.561.744-1.042 1.114-1.559.739-1.034 8.714-12.197A13.319 13.319 0 0 1 106 78.8Z"/></svg> 555 <span class="visually-hidden">@Translate("page_Previous", "Previous")</span> 556 </button> 557 558 <div class="reel-thumbs__viewport"> 559 560 <div class="fc-zoom__thumbs-list reel-thumbs__container"> 561 @{ i = 0; } 562 @foreach (var zoomSet in zoomList) 563 { 564 string[,] imgSet = zoomSet.Value; 565 string imgId = string.Format("img_0{0}", zoomSet.Key); 566 <div class="reel-thumbs__frame"> 567 <a class="fc-zoom__link" href="@imgSet[0, 1]" data-image-target="zoom-full-image-@i" data-image="" data-zoom-image="@imgSet[0, 2]"> 568 <img class="fc-zoom__thumb" src="@imgSet[0, 0]" alt="@GetString("Ecom:Product.Name")"> 569 </a> 570 </div> 571 i++; 572 573 } 574 </div> 575 576 </div> 577 578 <button 579 class="reel-cards__btn reel-cards__btn--next" 580 data-action-page="Product" 581 data-action-type="Button" 582 data-action-label="Gallery next" 583 data-action-value="@productNumber"> 584 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 212 212" class="h24-icon h24-icon--down"><path fill="currentColor" fill-rule="evenodd" d="M106 6c55.193 0 100 44.807 100 100s-44.807 100-100 100S6 161.193 6 106 50.807 6 106 6Zm0 5.333c-26.124 0-49.792 10.603-66.928 27.74C21.936 56.207 11.333 79.875 11.333 106c0 26.124 10.603 49.792 27.74 66.928 17.135 17.136 40.803 27.739 66.927 27.739 26.124 0 49.792-10.603 66.928-27.74 17.136-17.135 27.739-40.803 27.739-66.927 0-26.124-10.603-49.792-27.74-66.928C155.793 21.936 132.125 11.333 106 11.333Zm37.207 68.707c2.993 2.14 3.693 6.307 1.553 9.3l-14.745 20.642-.741 1.038-1.116 1.562-.744 1.041-10.567 14.79A13.319 13.319 0 0 1 106 134c-4.307 0-8.347-2.08-10.847-5.586l-10.567-14.79-.744-1.042-1.116-1.562-.741-1.038L67.24 89.34c-2.14-2.993-1.44-7.16 1.553-9.3 2.994-2.14 7.16-1.44 9.3 1.554L106 120.667l14.79-20.708.834-1.168 12.283-17.197c2.14-2.994 6.306-3.694 9.3-1.554Z"/></svg> 585 <span class="visually-hidden">@Translate("page_Next", "Next")</span> 586 </button> 587 588 589 590 </div> 591 } 592 </div> 593 594 595 </section> 596 597 598 <div class="page-intro wrapper"> 599 600 <div class="page-intro__copy flow"> 601 602 <div class="cluster"> 603 @* add to collection button *@ 604 @if (isProductCollection) 605 { 606 <button type="button" class="btn btn--outline print-hide" data-removeproductlist="@productNumber" data-addproductlist=""> 607 @Translate("RemoveFromCollection", "Remove from my Collection") 608 </button> 609 } 610 else 611 { 612 <button 613 type="button" 614 class="btn btn--outline print-hide" 615 data-removeproductlist="" 616 data-addproductlist="@collectionData" 617 data-action-page="Product" data-action-type="button" data-action-label="Add to collection" data-action-value="@productNumber"> 618 @Translate("AddToCollection", "Add to my collection") 619 </button> 620 } 621 622 @* download images button *@ 623 @if (hiResDownloads.Count() > 0) 624 { 625 List <string> fileList = new List<string>(); 626 foreach (var file in hiResDownloads) 627 { 628 fileList.Add(file.FullPath); 629 } 630 <form method="post" id="downloadImagesForm"> 631 <input type="hidden" name="ProductNumber" value="@productNumber" /> 632 <input type="hidden" name="ProductName" value="@GetString("Ecom:Product.Name")" /> 633 @GetButton(fileList, "Product", productNumber) 634 </form> 635 } 636 637 @* PDF Product sheet button *@ 638 @{ 639 string printShout = Translate("SaveOrPrint", "Save or Print your Product PDF "); 640 string productId = @GetString("Ecom:Product.ID"); 641 string productVariantId = @GetString("Ecom:Product.VariantID"); 642 } 643 <button type="button" id="productSheetButton" data-target="#CreateProductPdf" 644 name="productPublishing" data-productid="@productId" data-productnumber="@productNumber" 645 data-variantid="@productVariantId" data-open-modal="#CreateProductPdf" data-request="technicalsheet" data-shout="@printShout" 646 class="btn btn--outline" 647 data-action-page="Product" data-action-type="button" data-action-label="Create product PDF" data-action-value="@productNumber"> 648 @Translate("ProductSheet", "PDF Product Sheet") 649 </button> 650 651 652 </div> 653 654 @*if (!string.IsNullOrWhiteSpace(GetString("Ecom:Product.ShortDescription"))) 655 { 656 <p>@GetString("Ecom:Product.ShortDescription")</p> 657 } 658 *@ 659 660 @if (!string.IsNullOrWhiteSpace(GetString("Ecom:Product.LongDescription"))) 661 { 662 @* 663 string paragraph = GetString("Ecom:Product.LongDescription"); 664 string[] paragraphs = paragraph.Split(new[] { '.' }, StringSplitOptions.RemoveEmptyEntries); 665 foreach (var p in paragraphs) 666 { 667 <p>@p.Trim().</p> 668 } 669 *@ 670 <p>@GetString("Ecom:Product.LongDescription")</p> 671 672 } 673 674 <div class="cluster" title="@Translate(" Anchoring", "Anchoring"): @selectedAnchoringVariant"> 675 676 @if (GetBoolean("Ecom:Product:Field.CentralStock")) 677 { 678 <div class="product-icon" title="Leverans ex lager från Sverige"> 679 <img class="product-icon__icon" src="/Files/Images/Other/Playground box/Lorry.jpg" alt="Leverans ex lager från Sverige" /> 680 <p>@Translate("CentralStock", "Central Stock")</p> 681 </div> 682 } 683 684 @if (!string.IsNullOrWhiteSpace(selectedAnchoringIcon ?? selectedAnchoringVariant)) 685 { 686 687 <div class="product-icon"> 688 <img class="product-icon__icon" src="Files/Templates/Designs/HagsCore/res/img/icons/anchoring/@selectedAnchoringIcon" alt="@selectedAnchoringVariant" /> 689 @selectedAnchoringVariant 690 </div> 691 } 692 693 </div> 694 695 <p> 696 @(selectedMaterialVariant != "" ? selectedMaterialVariant + " - " : "") 697 @(selectedOptionVariant != "" ? selectedOptionVariant + " - " : "") 698 @(@selectedColourVariant != "" ? selectedColourVariant : "") 699 </p> 700 701 </div> 702 </div> 703 704 705 706 <section> 707 <div class="wrapper"> 708 709 <div class="center-copy"> 710 711 @{ 712 string[] badges = GetString("Ecom:Product:Field.EnvironmentalBadge.Value").Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries).ToArray(); 713 } 714 <div> 715 <ul class="badges"> 716 @foreach (var badge in badges) 717 { 718 string altText = ""; 719 720 if ( badge == "BVB8" ) { 721 altText = Translate("BVBGradeAccepted", "Assessed by Byggvarubedömningen, Grade: Accepted"); 722 } 723 724 if ( badge == "BVB7" ) { 725 altText = Translate("BVBGradeRecommended", "Assessed by Byggvarubedömningen, Grade: Recommended"); 726 } 727 728 if ( badge == "SH1" ) { 729 altText = Translate("SundaHusGradeB", "Assessed by SundaHus, Grade: B"); 730 } 731 732 if ( badge == "SH2" ) { 733 altText = Translate("SundaHusGradeA", "Assessed by SundaHus, Grade: A"); 734 } 735 <li class="badges__item"><img src="@(designBaseUrl)assets/img/badges/@(badge).png" alt="@altText" title="@altText" /></li> 736 } 737 </ul> 738 </div> 739 740 <div class="accordians"> 741 742 <section class="accordian"> 743 <div class="wrapper"> 744 745 <h3><button 746 id="accordian-spec" 747 aria-expanded="true" aria-controls="accordian-spec-panel" type="button" 748 class="accordian__button" 749 data-action-page="Product" 750 data-action-type="Text block expand" 751 data-action-label="Specifications" 752 data-action-value="@productNumber"> 753 @Translate("ProductSpecifications", "Product Specifications") 754 <span class="accordian__icon accordian__icon--close" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 212 212" class="h24-icon h24-icon--minus"><path fill="currentColor" fill-rule="evenodd" d="M106 6c55.193 0 100 44.807 100 100s-44.807 100-100 100S6 161.193 6 106 50.807 6 106 6Zm0 5.333c-26.124 0-49.792 10.603-66.928 27.74C21.936 56.207 11.333 79.875 11.333 106c0 26.124 10.603 49.792 27.74 66.928 17.135 17.136 40.803 27.739 66.927 27.739 26.124 0 49.792-10.603 66.928-27.74 17.136-17.135 27.739-40.803 27.739-66.927 0-26.124-10.603-49.792-27.74-66.928C155.793 21.936 132.125 11.333 106 11.333Zm28.772 87.504a6.5 6.5 0 0 1 6.5 6.5v1a6.5 6.5 0 0 1-6.5 6.5h-57a6.5 6.5 0 0 1-6.5-6.5v-1a6.5 6.5 0 0 1 6.5-6.5h57Z"/></svg></span> 755 <span class="accordian__icon accordian__icon--open" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 212 212" class="h24-icon h24-icon--plus"><path fill="currentColor" fill-rule="evenodd" d="M106 6c55.193 0 100 44.807 100 100s-44.807 100-100 100S6 161.193 6 106 50.807 6 106 6Zm0 5.333c-26.124 0-49.792 10.603-66.928 27.74C21.936 56.207 11.333 79.875 11.333 106c0 26.124 10.603 49.792 27.74 66.928 17.135 17.136 40.803 27.739 66.927 27.739 26.124 0 49.792-10.603 66.928-27.74 17.136-17.135 27.739-40.803 27.739-66.927 0-26.124-10.603-49.792-27.74-66.928C155.793 21.936 132.125 11.333 106 11.333Zm.772 59.504a6.5 6.5 0 0 1 6.5 6.5v21.5h21.5a6.5 6.5 0 0 1 6.5 6.5v1a6.5 6.5 0 0 1-6.5 6.5h-21.5v21.5a6.5 6.5 0 0 1-6.5 6.5h-1a6.5 6.5 0 0 1-6.5-6.5v-21.5h-21.5a6.5 6.5 0 0 1-6.5-6.5v-1a6.5 6.5 0 0 1 6.5-6.5h21.5v-21.5a6.5 6.5 0 0 1 6.5-6.5h1Z"/></svg></span> 756 </button> 757 </h3> 758 759 <div class="accordian__panel" id="accordian-spec-panel"> 760 <div class="accordian__content flow"> 761 762 @if (!String.IsNullOrWhiteSpace(@GetString("Ecom:Product:Field.IPEMA_Specification"))) 763 { 764 string ipemaData = GetString("Ecom:Product:Field.IPEMA_Specification"); 765 // Get IPEMA Product Specification data from a Field on the Product data from Jeeves 766 //System.Xml.Linq.XDocument dataXML = System.Xml.Linq.XDocument.Load(System.Web.HttpContext.Current.Server.MapPath("~/Files/Templates/eCom/Product/meterial_xml_out_putV2_Edit.xml")); 767 System.Xml.Linq.XDocument dataXML = System.Xml.Linq.XDocument.Parse(ipemaData); 768 769 if (dataXML != null) 770 { 771 @*<h1> @GetString("Ecom:Product.Name") </h1>*@ 772 @*<p>@dataXML</p>*@ 773 System.Globalization.NumberFormatInfo format = new System.Globalization.NumberFormatInfo(); 774 775 var details = from dat in dataXML.Descendants("Item") 776 select new 777 { 778 name = dat.Element("name").Value, 779 enValue = dat.Element("EN_value").Value, 780 astmValue = dat.Element("ASTM_value").Value, 781 csaValue = dat.Element("CSA_value").Value 782 }; 783 784 <table class="table"> 785 <thead> 786 <tr> 787 <th scope="col"></th> 788 <th scope="col">@Translate("Europe","Europe")<br>EN1176</th> 789 <th scope="col">@Translate("USA", "USA")<br>ASTM F1487</th> 790 <th scope="col">@Translate("Canada", "Canada")<br>CSA Z614</th> 791 </tr> 792 </thead> 793 794 <tbody> 795 @foreach (var item in details) 796 { 797 <tr> 798 <td>@item.name</td> 799 <td>@item.enValue</td> 800 <td>@item.astmValue</td> 801 <td>@item.csaValue</td> 802 </tr> 803 } 804 </tbody> 805 </table> 806 807 @*#table-IPEMA Product Spec*@ 808 } 809 810 } else { 811 <table class="table"> 812 <thead> 813 <tr> 814 <th scope="col"></th> 815 <th scope="col"></th> 816 </tr> 817 </thead> 818 <tbody> 819 820 @if (!String.IsNullOrWhiteSpace(GetString("Ecom:Product:Field.NumberOfChildren"))) 821 { 822 <tr> 823 <td>@GetString("Ecom:Product:Field.NumberOfChildren.Name")</td> 824 <td>@GetString("Ecom:Product:Field.NumberOfChildren.Value")</td> 825 </tr> 826 } 827 @if (!String.IsNullOrWhiteSpace(GetString("Ecom:Product:Field.AgeRange")) && ageRanges.Any()) 828 { 829 <tr> 830 <td>@GetString("Ecom:Product:Field.AgeRange.Name")</td> 831 <td>@string.Join(", ", ageRanges)</td> 832 </tr> 833 } 834 @if (GetDouble("Ecom:Product:Field.AssemblyTime.Value.Raw") > 0) 835 { 836 <tr> 837 <td>@GetString("Ecom:Product:Field.AssemblyTime.Name")</td> 838 <td>@GetDouble("Ecom:Product:Field.AssemblyTime.Value.Raw") @Translate("Hours", "hours")</td> 839 </tr> 840 } 841 @if (GetDouble("Ecom:Product:Field.Length.Value.Raw") > 0) 842 { 843 <tr> 844 <td>@GetString("Ecom:Product:Field.Length.Name").Replace(" (mm)", "")</td> 845 <td>@GetString("Ecom:Product:Field.Length.Value.Raw") mm</td> 846 </tr> 847 } 848 @if (GetDouble("Ecom:Product:Field.Width.Value.Raw") > 0) 849 { 850 <tr> 851 <td>@GetString("Ecom:Product:Field.Width.Name").Replace(" (mm)", "")</td> 852 <td>@GetString("Ecom:Product:Field.Width.Value.Raw") mm</td> 853 </tr> 854 } 855 @if (GetDouble("Ecom:Product:Field.Height.Value.Raw") > 0) 856 { 857 <tr> 858 <td>@GetString("Ecom:Product:Field.Height.Name").Replace(" (mm)", "")</td> 859 <td>@GetString("Ecom:Product:Field.Height.Value.Raw") mm</td> 860 </tr> 861 } 862 @if (GetDouble("Ecom:Product:Field.NetWeight.Value.Raw") > 0) 863 { 864 <tr> 865 <td>@GetString("Ecom:Product:Field.NetWeight.Name")</td> 866 <td>@GetString("Ecom:Product:Field.NetWeight.Value") kg</td> 867 </tr> 868 } 869 @if (GetDouble("Ecom:Product:Field.Volume.Value.Raw") > 0) 870 { 871 <tr> 872 <td>@GetString("Ecom:Product:Field.Volume.Name")</td> 873 <td>@GetString("Ecom:Product:Field.Volume.Value.Raw") m³</td> 874 </tr> 875 } 876 @if (GetDouble("Ecom:Product:Field.FallHeight.Value.Raw") > 0) 877 { 878 <tr> 879 <td>@GetString("Ecom:Product:Field.FallHeight.Name").Replace(" (mm)", "")</td> 880 <td>@GetString("Ecom:Product:Field.FallHeight.Value.Raw") mm</td> 881 </tr> 882 } 883 @if (GetDouble("Ecom:Product:Field.SafetyAreaWidth.Value.Raw") > 0) 884 { 885 <tr> 886 <td>@GetString("Ecom:Product:Field.SafetyAreaWidth.Name").Replace(" (mm)", "")</td> 887 <td>@GetString("Ecom:Product:Field.SafetyAreaWidth.Value.Raw") mm</td> 888 </tr> 889 } 890 @if (GetDouble("Ecom:Product:Field.SafetyAreaLength.Value.Raw") > 0) 891 { 892 <tr> 893 <td>@GetString("Ecom:Product:Field.SafetyAreaLength.Name").Replace(" (mm)", "")</td> 894 <td>@GetString("Ecom:Product:Field.SafetyAreaLength.Value.Raw") mm</td> 895 </tr> 896 } 897 @if (GetDouble("Ecom:Product:Field.SafetyArea.Value.Raw") > 0) 898 { 899 <tr> 900 <td>@GetString("Ecom:Product:Field.SafetyArea.Name")</td> 901 <td>@GetDouble("Ecom:Product:Field.SafetyArea.Value") m²</td> 902 </tr> 903 } 904 905 </tbody> 906 </table> 907 908 } 909 910 @*SafetyAreaDetails*@ 911 @if (GetDouble("Ecom:Product:Field.SafetyArea.Value") > 0 && thisPage.AreaID == 1) 912 { 913 string safetyAreaPage = DWUtilities.GetPageByNavigationTag("SafetyArea", thisPage.AreaID); 914 if (!string.IsNullOrEmpty(safetyAreaPage)) 915 { 916 <p><a href="@safetyAreaPage" class="print-hide">@Translate("ReadMoreSafetyArea", "Read more about safety areas")</a></p> 917 } 918 919 } 920 921 @*Anchoring from Variant*@ 922 @if (!string.IsNullOrEmpty(selectedAnchoringVariant)) 923 { 924 string anchoringPage = DWUtilities.GetPageByNavigationTag("AnchoringTypes", thisPage.AreaID) + "#" + GetGlobalValue("Global:HagsTheme"); 925 926 if (!string.IsNullOrEmpty(anchoringPage)) 927 { 928 <p><a href="@anchoringPage" class="btn btn--outline print-hide">@Translate("ReadMoreAnchoring", "Read more about anchoring")</a></p> 929 } 930 931 } 932 933 @*Guarantee Page for Sweden*@ 934 @if (thisPage.AreaID == 2) 935 { 936 <p><a href="/sv-se/om-hags/garantier" target="_blank" class="print-hide">Läs mer om produktgarantier</a></p> 937 } 938 </div> 939 </div> 940 </section> 941 @if (!string.IsNullOrWhiteSpace(GetString("Ecom:Product:Field.Material"))) 942 { 943 <section class="accordian"> 944 <div class="wrapper"> 945 946 <h3> 947 <button id="accordian-materials" aria-expanded="true" aria-controls="accordian-materials-panel" type="button" class="accordian__button" 948 data-action-page="Product" 949 data-action-type="Text block expand" 950 data-action-label="Materials" 951 data-action-value="@productNumber"> 952 @GetString("Ecom:Product:Field.Material.Name") 953 <span class="accordian__icon accordian__icon--close" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 212 212" class="h24-icon h24-icon--minus"><path fill="currentColor" fill-rule="evenodd" d="M106 6c55.193 0 100 44.807 100 100s-44.807 100-100 100S6 161.193 6 106 50.807 6 106 6Zm0 5.333c-26.124 0-49.792 10.603-66.928 27.74C21.936 56.207 11.333 79.875 11.333 106c0 26.124 10.603 49.792 27.74 66.928 17.135 17.136 40.803 27.739 66.927 27.739 26.124 0 49.792-10.603 66.928-27.74 17.136-17.135 27.739-40.803 27.739-66.927 0-26.124-10.603-49.792-27.74-66.928C155.793 21.936 132.125 11.333 106 11.333Zm28.772 87.504a6.5 6.5 0 0 1 6.5 6.5v1a6.5 6.5 0 0 1-6.5 6.5h-57a6.5 6.5 0 0 1-6.5-6.5v-1a6.5 6.5 0 0 1 6.5-6.5h57Z"/></svg></span> 954 <span class="accordian__icon accordian__icon--open" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 212 212" class="h24-icon h24-icon--plus"><path fill="currentColor" fill-rule="evenodd" d="M106 6c55.193 0 100 44.807 100 100s-44.807 100-100 100S6 161.193 6 106 50.807 6 106 6Zm0 5.333c-26.124 0-49.792 10.603-66.928 27.74C21.936 56.207 11.333 79.875 11.333 106c0 26.124 10.603 49.792 27.74 66.928 17.135 17.136 40.803 27.739 66.927 27.739 26.124 0 49.792-10.603 66.928-27.74 17.136-17.135 27.739-40.803 27.739-66.927 0-26.124-10.603-49.792-27.74-66.928C155.793 21.936 132.125 11.333 106 11.333Zm.772 59.504a6.5 6.5 0 0 1 6.5 6.5v21.5h21.5a6.5 6.5 0 0 1 6.5 6.5v1a6.5 6.5 0 0 1-6.5 6.5h-21.5v21.5a6.5 6.5 0 0 1-6.5 6.5h-1a6.5 6.5 0 0 1-6.5-6.5v-21.5h-21.5a6.5 6.5 0 0 1-6.5-6.5v-1a6.5 6.5 0 0 1 6.5-6.5h21.5v-21.5a6.5 6.5 0 0 1 6.5-6.5h1Z"/></svg></span> 955 </button> 956 </h3> 957 958 <div class="accordian__panel" id="accordian-materials-panel"> 959 <div class="accordian__content"> 960 961 @{ 962 963 string materialData = GetString("Ecom:Product:Field.Material");// Get Material data from a Field on the Product data from Jeeves (not implemented yet) GetString("Ecom:Product:Field.MaterialData"); 964 if (!string.IsNullOrEmpty(materialData)) 965 { 966 //System.Xml.Linq.XDocument dataXML = System.Xml.Linq.XDocument.Load(System.Web.HttpContext.Current.Server.MapPath("~/Files/Templates/eCom/Product/meterial_xml_out_put.xml")); 967 System.Xml.Linq.XDocument dataXML = System.Xml.Linq.XDocument.Parse(materialData); 968 969 if (dataXML != null) 970 { 971 System.Globalization.NumberFormatInfo format = new System.Globalization.NumberFormatInfo(); 972 //format.NumberGroupSeparator = ","; //for thousands 973 //format.NumberDecimalSeparator = "."; //the decimal seperator 974 975 var totalweight = Math.Round((from nd in dataXML.Descendants("kg") 976 select Double.Parse(nd.Value, format)).Sum(), 0).ToString(); 977 978 var totalpercent = Math.Round((from nd in dataXML.Descendants("percent") 979 select Double.Parse(nd.Value, format)).Sum(), 0).ToString(); 980 981 var details = from dat in dataXML.Descendants("Item") 982 select new 983 { 984 material = dat.Element("material").Value, 985 //weight = dat.Element("kg").Value,// string.Format("{0:0.00}", Double.Parse(dat.Element("kg").Value)), Occasionally throwing format errors 986 weight = Math.Round(Double.Parse(dat.Element("kg").Value, format), 1).ToString(),// string.Format("{0:0.00}", Double.Parse(dat.Element("kg").Value)), Occasionally throwing format errors 987 percent = Math.Round(Double.Parse(dat.Element("percent").Value, format), 1).ToString() // string.Format("{0:0.00}", Double.Parse(dat.Element("percent").Value)) 988 }; 989 990 <table class="table"> 991 <thead> 992 <tr> 993 <th scope="col">@GetString("Ecom:Product:Field.Material.Name")</th> 994 <th scope="col">kg</th> 995 <th scope="col">%</th> 996 </tr> 997 </thead> 998 999 <tbody> 1000 1001 @foreach (var item in details) 1002 { 1003 <tr> 1004 <td>@item.material</td> 1005 <td>@item.weight</td> 1006 <td>@item.percent</td> 1007 </tr> 1008 } 1009 1010 1011 1012 </tbody> 1013 1014 <tfoot> 1015 <tr> 1016 <td> </td> 1017 <td><strong>@totalweight kg</strong></td> 1018 <td><strong>@totalpercent%</strong></td> 1019 </tr> 1020 </tfoot> 1021 </table> <!--! #table-materials --> 1022 } 1023 } 1024 1025 } 1026 </div> 1027 </div> 1028 </div> 1029 </section> 1030 } 1031 @if (imagesCount + brochCount < assets.Count()) 1032 { 1033 1034 1035 } 1036 1037 @helper renderAccordianPanel(List<ProductAsset> assetList, string assetType, string translationTitle, string fallbackTitle, string extraContent = "", string productNumber = "" ) { 1038 1039 <section class="accordian print-hide"> 1040 <div class="wrapper"> 1041 <h3> 1042 <button id="accordian-downloads-@assetType" 1043 aria-expanded="true" aria-controls="accordian-panel-downloads-@assetType" type="button" class="accordian__button" 1044 data-action-page="Product" 1045 data-action-type="Text block expand" 1046 data-action-label="@translationTitle" 1047 data-action-value="@productNumber"> 1048 @Translate(translationTitle, fallbackTitle) 1049 <span class="accordian__icon accordian__icon--close" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 212 212" class="h24-icon h24-icon--minus"><path fill="currentColor" fill-rule="evenodd" d="M106 6c55.193 0 100 44.807 100 100s-44.807 100-100 100S6 161.193 6 106 50.807 6 106 6Zm0 5.333c-26.124 0-49.792 10.603-66.928 27.74C21.936 56.207 11.333 79.875 11.333 106c0 26.124 10.603 49.792 27.74 66.928 17.135 17.136 40.803 27.739 66.927 27.739 26.124 0 49.792-10.603 66.928-27.74 17.136-17.135 27.739-40.803 27.739-66.927 0-26.124-10.603-49.792-27.74-66.928C155.793 21.936 132.125 11.333 106 11.333Zm28.772 87.504a6.5 6.5 0 0 1 6.5 6.5v1a6.5 6.5 0 0 1-6.5 6.5h-57a6.5 6.5 0 0 1-6.5-6.5v-1a6.5 6.5 0 0 1 6.5-6.5h57Z"/></svg></span> 1050 <span class="accordian__icon accordian__icon--open" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 212 212" class="h24-icon h24-icon--plus"><path fill="currentColor" fill-rule="evenodd" d="M106 6c55.193 0 100 44.807 100 100s-44.807 100-100 100S6 161.193 6 106 50.807 6 106 6Zm0 5.333c-26.124 0-49.792 10.603-66.928 27.74C21.936 56.207 11.333 79.875 11.333 106c0 26.124 10.603 49.792 27.74 66.928 17.135 17.136 40.803 27.739 66.927 27.739 26.124 0 49.792-10.603 66.928-27.74 17.136-17.135 27.739-40.803 27.739-66.927 0-26.124-10.603-49.792-27.74-66.928C155.793 21.936 132.125 11.333 106 11.333Zm.772 59.504a6.5 6.5 0 0 1 6.5 6.5v21.5h21.5a6.5 6.5 0 0 1 6.5 6.5v1a6.5 6.5 0 0 1-6.5 6.5h-21.5v21.5a6.5 6.5 0 0 1-6.5 6.5h-1a6.5 6.5 0 0 1-6.5-6.5v-21.5h-21.5a6.5 6.5 0 0 1-6.5-6.5v-1a6.5 6.5 0 0 1 6.5-6.5h21.5v-21.5a6.5 6.5 0 0 1 6.5-6.5h1Z"/></svg></span> 1051 </button> 1052 </h3> 1053 1054 1055 <div class="accordian__panel" id="accordian-panel-downloads-@assetType"> 1056 <div class="accordian__content"> 1057 <ul class="downloads__list"> 1058 @foreach (ProductAsset asset in assetList) 1059 { 1060 1061 <li> 1062 <a href="@asset.uri" download="@asset.FileName"> 1063 <span>@asset.FileName</span> 1064 </a> 1065 </li> 1066 } 1067 </ul> 1068 1069 @extraContent 1070 </div> 1071 </div> 1072 1073 </div> 1074 </section> 1075 1076 } 1077 1078 @* Certificates *@ 1079 1080 @{ 1081 List<ProductAsset> certAssets = new List<ProductAsset>(); 1082 1083 if (thisPage.AreaID == 1) // For Global get all certificates 1084 { 1085 certAssets = assets.Where(n => n.Index == AssetTypeEnum.ToFriendlyAssetName(AssetType.Certificates)).ToList(); 1086 } 1087 else 1088 { 1089 certAssets = assets.Where(n => n.Index == AssetTypeEnum.ToFriendlyAssetName(AssetType.Certificates) && n.FileName.StartsWith(currentCountry + "_")).ToList(); 1090 } 1091 1092 if (certAssets.Count() == 0) // if none are found try to get EN certificates 1093 { 1094 certAssets = assets.Where(n => n.Index == AssetTypeEnum.ToFriendlyAssetName(AssetType.Certificates) && n.FileName.StartsWith("EN_")).ToList(); 1095 } 1096 if (certAssets.Count() == 0) // if none are found try to get GB certificates 1097 { 1098 certAssets = assets.Where(n => n.Index == AssetTypeEnum.ToFriendlyAssetName(AssetType.Certificates) && n.FileName.StartsWith("GB_")).ToList(); 1099 } 1100 } 1101 1102 1103 @if (certAssets.Count > 0) 1104 { 1105 @renderAccordianPanel(certAssets, "certificates", "Certificates", "Certificates","",productNumber) 1106 } 1107 1108 1109 @* Assembly Instructions *@ 1110 1111 @{ 1112 List<ProductAsset> assemblyAssets = new List<ProductAsset>(); 1113 assemblyAssets = assets.Where(n => n.Index == AssetTypeEnum.ToFriendlyAssetName(AssetType.AssemblyInstructions)).ToList(); 1114 } 1115 1116 @if (assemblyAssets.Count > 0) 1117 { 1118 string extraContent = "<button class=\"productDownloadButton download btn btn--outline\" name=\"download\" data-parent=\"Monteringsanvisningar\""; 1119 extraContent += " data-productnumber=\"" + productNumber + "\" data-productname=\"" + GetString("Ecom:Product.Name") +"\">"; 1120 extraContent += Translate("DownloadInstallationGuides", "Installation Guides") + "</button>"; 1121 1122 @renderAccordianPanel(assemblyAssets, "install-guides", "InstallationGuides", "Installation Guides", extraContent, productNumber) 1123 } 1124 1125 @{ 1126 // add relatedProductsAssemblyInstructions to product assemblyAssets and store to session. Used in UsersProductCollection.GetAssets for the product 1127 assemblyAssets.AddRange(relatedProductsAssemblyInstructions); 1128 SessionManager.SetSession(productNumber + "_" + AssetType.AssemblyInstructions.ToFriendlyAssetName(), new List<ProductAsset>(assemblyAssets)); 1129 } 1130 1131 @* Detailed Assembly Instructions *@ 1132 1133 @{ 1134 // add relatedProductsAssemblyInstructions to product assemblyAssets and store to session. Used in UsersProductCollection.GetAssets for the product 1135 assemblyAssets.AddRange(relatedProductsAssemblyInstructions); 1136 SessionManager.SetSession(productNumber + "_" + AssetType.AssemblyInstructions.ToFriendlyAssetName(), new List<ProductAsset>(assemblyAssets)); 1137 } 1138 1139 @if (relatedProductsAssemblyInstructions.Count > 0) 1140 { 1141 1142 @renderAccordianPanel(relatedProductsAssemblyInstructions, "detail-guides", "DetailedInstallationGuides", "Detailed Installation Guides","",productNumber) 1143 } 1144 1145 1146 @{ 1147 List<ProductAsset> inspAssets = new List<ProductAsset>(); 1148 //inspAssets = FileSystem.GetPdfFilesFromDirectoryBySiteCulture("/Files/System/ProductCollectionDownloads/InspectionMaintenance", "_" + currentlanguage.ToUpper()); 1149 inspAssets = FileSystem.GetAllPdfFilesFromDirectory("/Files/System/ProductCollectionDownloads/InspectionMaintenance"); 1150 } 1151 1152 @if (inspAssets != null && inspAssets.Count > 0) 1153 { 1154 @renderAccordianPanel(inspAssets, "insp-maintenance", "InspectionMaintenance", "Inspection & Maintenance","",productNumber) 1155 } 1156 else 1157 { 1158 <section class="accordian print-hide"> 1159 <div class="wrapper"> 1160 <h3> 1161 <button id="accordian-downloads-insp-maintenance" 1162 aria-expanded="true" aria-controls="accordian-panel-downloads-insp-maintenance" 1163 type="button" class="accordian__button" 1164 data-action-page="Product" 1165 data-action-type="Text block expand" 1166 data-action-label="InspectionMaintenance" 1167 data-action-value="@productNumber"> 1168 @Translate("InspectionMaintenance", "Inspection & Maintenance") 1169 <span class="accordian__icon accordian__icon--close" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 212 212" class="h24-icon h24-icon--minus"><path fill="currentColor" fill-rule="evenodd" d="M106 6c55.193 0 100 44.807 100 100s-44.807 100-100 100S6 161.193 6 106 50.807 6 106 6Zm0 5.333c-26.124 0-49.792 10.603-66.928 27.74C21.936 56.207 11.333 79.875 11.333 106c0 26.124 10.603 49.792 27.74 66.928 17.135 17.136 40.803 27.739 66.927 27.739 26.124 0 49.792-10.603 66.928-27.74 17.136-17.135 27.739-40.803 27.739-66.927 0-26.124-10.603-49.792-27.74-66.928C155.793 21.936 132.125 11.333 106 11.333Zm28.772 87.504a6.5 6.5 0 0 1 6.5 6.5v1a6.5 6.5 0 0 1-6.5 6.5h-57a6.5 6.5 0 0 1-6.5-6.5v-1a6.5 6.5 0 0 1 6.5-6.5h57Z"/></svg></span> 1170 <span class="accordian__icon accordian__icon--open" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 212 212" class="h24-icon h24-icon--plus"><path fill="currentColor" fill-rule="evenodd" d="M106 6c55.193 0 100 44.807 100 100s-44.807 100-100 100S6 161.193 6 106 50.807 6 106 6Zm0 5.333c-26.124 0-49.792 10.603-66.928 27.74C21.936 56.207 11.333 79.875 11.333 106c0 26.124 10.603 49.792 27.74 66.928 17.135 17.136 40.803 27.739 66.927 27.739 26.124 0 49.792-10.603 66.928-27.74 17.136-17.135 27.739-40.803 27.739-66.927 0-26.124-10.603-49.792-27.74-66.928C155.793 21.936 132.125 11.333 106 11.333Zm.772 59.504a6.5 6.5 0 0 1 6.5 6.5v21.5h21.5a6.5 6.5 0 0 1 6.5 6.5v1a6.5 6.5 0 0 1-6.5 6.5h-21.5v21.5a6.5 6.5 0 0 1-6.5 6.5h-1a6.5 6.5 0 0 1-6.5-6.5v-21.5h-21.5a6.5 6.5 0 0 1-6.5-6.5v-1a6.5 6.5 0 0 1 6.5-6.5h21.5v-21.5a6.5 6.5 0 0 1 6.5-6.5h1Z"/></svg></span> 1171 </button> 1172 </h3> 1173 1174 1175 <div class="accordian__panel" id="accordian-panel-downloads-insp-maintenance"> 1176 <div class="accordian__content"> 1177 <ul class="downloads__list"> 1178 <li> 1179 <a href="/Files/System/ProductCollectionDownloads/InspectionMaintenance/Playground Equipment I&M guide_EN.pdf" download="Playground Equipment I&M Guide"> 1180 <span>Playground Equipment I&M Guide</span> 1181 </a> 1182 </li> 1183 <li> 1184 <a href="/Files/System/ProductCollectionDownloads/InspectionMaintenance/Sports and fitness I&M guide_EN.pdf" download="Sports and Fitness I&M Guide"> 1185 <span>Sports and Fitness I&M Guide</span> 1186 </a> 1187 </li> 1188 </ul> 1189 </div> 1190 </div> 1191 1192 </div> 1193 </section> 1194 } 1195 1196 @{ 1197 List<ProductAsset> dwgAssets = new List<ProductAsset>(); 1198 dwgAssets = assets.Where(n => n.Index == AssetTypeEnum.ToFriendlyAssetName(AssetType.Drawings)).ToList(); 1199 } 1200 1201 @if (dwgAssets.Count > 0) 1202 { 1203 @renderAccordianPanel(dwgAssets, "dwgs", "DWGFiles", "DWG Files","",productNumber) 1204 } 1205 1206 1207 <section class="accordian print-hide"> 1208 <div class="wrapper"> 1209 <h3> 1210 <button id="accordian-downloads-general-info" 1211 aria-expanded="true" aria-controls="accordian-panel-downloads-general-info" 1212 type="button" class="accordian__button" 1213 data-action-page="Product" 1214 data-action-type="Text block expand" 1215 data-action-label="GeneralDownloads" 1216 data-action-value="@productNumber"> 1217 @Translate("GeneralInformation", "General Information") 1218 <span class="accordian__icon accordian__icon--close" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 212 212" class="h24-icon h24-icon--minus"><path fill="currentColor" fill-rule="evenodd" d="M106 6c55.193 0 100 44.807 100 100s-44.807 100-100 100S6 161.193 6 106 50.807 6 106 6Zm0 5.333c-26.124 0-49.792 10.603-66.928 27.74C21.936 56.207 11.333 79.875 11.333 106c0 26.124 10.603 49.792 27.74 66.928 17.135 17.136 40.803 27.739 66.927 27.739 26.124 0 49.792-10.603 66.928-27.74 17.136-17.135 27.739-40.803 27.739-66.927 0-26.124-10.603-49.792-27.74-66.928C155.793 21.936 132.125 11.333 106 11.333Zm28.772 87.504a6.5 6.5 0 0 1 6.5 6.5v1a6.5 6.5 0 0 1-6.5 6.5h-57a6.5 6.5 0 0 1-6.5-6.5v-1a6.5 6.5 0 0 1 6.5-6.5h57Z"/></svg></span> 1219 <span class="accordian__icon accordian__icon--open" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 212 212" class="h24-icon h24-icon--plus"><path fill="currentColor" fill-rule="evenodd" d="M106 6c55.193 0 100 44.807 100 100s-44.807 100-100 100S6 161.193 6 106 50.807 6 106 6Zm0 5.333c-26.124 0-49.792 10.603-66.928 27.74C21.936 56.207 11.333 79.875 11.333 106c0 26.124 10.603 49.792 27.74 66.928 17.135 17.136 40.803 27.739 66.927 27.739 26.124 0 49.792-10.603 66.928-27.74 17.136-17.135 27.739-40.803 27.739-66.927 0-26.124-10.603-49.792-27.74-66.928C155.793 21.936 132.125 11.333 106 11.333Zm.772 59.504a6.5 6.5 0 0 1 6.5 6.5v21.5h21.5a6.5 6.5 0 0 1 6.5 6.5v1a6.5 6.5 0 0 1-6.5 6.5h-21.5v21.5a6.5 6.5 0 0 1-6.5 6.5h-1a6.5 6.5 0 0 1-6.5-6.5v-21.5h-21.5a6.5 6.5 0 0 1-6.5-6.5v-1a6.5 6.5 0 0 1 6.5-6.5h21.5v-21.5a6.5 6.5 0 0 1 6.5-6.5h1Z"/></svg></span> 1220 </button> 1221 </h3> 1222 1223 1224 <div class="accordian__panel" id="accordian-panel-downloads-general-info"> 1225 1226 <div class="accordian__content"> 1227 1228 <ul class="downloads__list"> 1229 @*@if (thisPage.AreaID == 2) 1230 {*@ 1231 <li> 1232 <a href="Files/System/ProductCollectionDownloads/General Information/hags-general-info_SE.pdf" download="" target="_blank"> 1233 <span>@Translate("GeneralInformation", "General Information") (SE)</span> 1234 </a> 1235 </li> 1236 <li> 1237 <a href="Files/System/ProductCollectionDownloads/General Information/hags-technical-specs_SE.pdf" download="" target="_blank"> 1238 <span>@Translate("TechnicalInformation", "Technical Information") (SE)</span> 1239 </a> 1240 </li> 1241 @*} 1242 else 1243 {*@ 1244 <li> 1245 <a href="Files/System/ProductCollectionDownloads/General Information/hags-general-info_EN.pdf" download="" target="_blank"> 1246 <span>@Translate("GeneralInformation", "General Information") (EN)</span> 1247 </a> 1248 </li> 1249 <li> 1250 <a href="Files/System/ProductCollectionDownloads/General Information/hags-technical-specs_EN.pdf" download="" target="_blank"> 1251 <span>@Translate("TechnicalInformation", "Technical Information") (EN)</span> 1252 </a> 1253 </li> 1254 @*}*@ 1255 </ul> 1256 1257 </div> 1258 </div> 1259 1260 </div> 1261 </section> 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 <section class="accordian de"> 1274 <div class="wrapper"> 1275 <h3> 1276 <button id="accordian-materials" aria-expanded="true" aria-controls="accordian-materials-panel" type="button" class="accordian__button"> 1277 Tender Text Request Form 1278 <span class="accordian__icon accordian__icon--close" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 212 212" class="h24-icon h24-icon--minus"><path fill="currentColor" fill-rule="evenodd" d="M106 6c55.193 0 100 44.807 100 100s-44.807 100-100 100S6 161.193 6 106 50.807 6 106 6Zm0 5.333c-26.124 0-49.792 10.603-66.928 27.74C21.936 56.207 11.333 79.875 11.333 106c0 26.124 10.603 49.792 27.74 66.928 17.135 17.136 40.803 27.739 66.927 27.739 26.124 0 49.792-10.603 66.928-27.74 17.136-17.135 27.739-40.803 27.739-66.927 0-26.124-10.603-49.792-27.74-66.928C155.793 21.936 132.125 11.333 106 11.333Zm28.772 87.504a6.5 6.5 0 0 1 6.5 6.5v1a6.5 6.5 0 0 1-6.5 6.5h-57a6.5 6.5 0 0 1-6.5-6.5v-1a6.5 6.5 0 0 1 6.5-6.5h57Z"/></svg></span> 1279 <span class="accordian__icon accordian__icon--open" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 212 212" class="h24-icon h24-icon--plus"><path fill="currentColor" fill-rule="evenodd" d="M106 6c55.193 0 100 44.807 100 100s-44.807 100-100 100S6 161.193 6 106 50.807 6 106 6Zm0 5.333c-26.124 0-49.792 10.603-66.928 27.74C21.936 56.207 11.333 79.875 11.333 106c0 26.124 10.603 49.792 27.74 66.928 17.135 17.136 40.803 27.739 66.927 27.739 26.124 0 49.792-10.603 66.928-27.74 17.136-17.135 27.739-40.803 27.739-66.927 0-26.124-10.603-49.792-27.74-66.928C155.793 21.936 132.125 11.333 106 11.333Zm.772 59.504a6.5 6.5 0 0 1 6.5 6.5v21.5h21.5a6.5 6.5 0 0 1 6.5 6.5v1a6.5 6.5 0 0 1-6.5 6.5h-21.5v21.5a6.5 6.5 0 0 1-6.5 6.5h-1a6.5 6.5 0 0 1-6.5-6.5v-21.5h-21.5a6.5 6.5 0 0 1-6.5-6.5v-1a6.5 6.5 0 0 1 6.5-6.5h21.5v-21.5a6.5 6.5 0 0 1 6.5-6.5h1Z"/></svg></span> 1280 </button> 1281 </h3> 1282 <div class="accordian__panel" id="accordian-materials-panel"> 1283 <div class="accordian__content tender-request"> 1284 <form method="post" action="/de/contact/tender-text-thank-you" enctype="multipart/form-data" class="m-form-contact col-sm-8 col-sm-push-2" id="dw-form-48" onsubmit="s=function(e){e.elements['FormCH1_h'].value='a4157f9c59bad4b59c0d66f8b9308194';e.elements['_sys_to_email'].value='';e.setAttribute('action', '/Default.aspx?ID=20057&PID=139114');return true};return s(this);"> 1285 <input type="hidden" name="FormPID" value="139114"> 1286 <input type="hidden" name="FormID" value="48"> 1287 <input type="hidden" name="cmd" value="save"> 1288 <input type="hidden" name="_sys_to_email" value="info@hags.de" autocomplete="off"> 1289 <input type="hidden" name="FormCH1_h" value="" autocomplete="off"> 1290 <input type="hidden" name="FormCH1_f" value="64fcc853b5c7478097280b67d065e694" autocomplete="off"> 1291 <input type="hidden" name="FormCH1_s" value="c4c181d67b4102728a5096ecf8c1929c" autocomplete="off"> 1292 <input type="hidden" name="FormCH1_i" value="6aa5213c54c120933c90ee6f0b7dd4dc" autocomplete="off"> 1293 <input type="hidden" name="a4157f9c59bad4b59c0d66f8b9308194ts" value="E1WX2koSJVNXmGFR8goSJnCuchPB6aG0" style="display:none!important" autocomplete="off"> 1294 <input type="text" name="a4157f9c59bad4b59c0d66f8b9308194description" value="" style="display:none!important" autocomplete="off"> 1295 <input type="text" name="a4157f9c59bad4b59c0d66f8b9308194email" value="mrssmith@dynamicweb.com" style="display:none!important" autocomplete="off"> 1296 <table class="formtable"> 1297 <tbody> 1298 <tr class="labelRow" style="padding-bottom:12px;display:block;"> 1299 <td class="labelCell"> 1300 <p>Complete form form below to request the the relevant product tender text</p> 1301 </td> 1302 </tr> 1303 <tr class="labelRow"> 1304 <td class="labelCell"> 1305 <label for="ArticleNumber"><h6>Article Number: @productNumber</h6></label> 1306 </td> 1307 </tr> 1308 <tr class="labelRow"> 1309 <td class="labelCell"> 1310 <label for="FirstName">First Name </label> 1311 </td> 1312 </tr> 1313 <tr class="fieldRow"> 1314 <td> 1315 <input type="text" id="FirstName" name="FirstName" required="" /></td> 1316 </tr> 1317 <tr class="descriptionRow"> 1318 <td class="descriptionCell"><small></small></td> 1319 </tr> 1320 <tr class="labelRow"> 1321 <td class="labelCell"> 1322 <label for="LastName">Last Name </label> 1323 </td> 1324 </tr> 1325 <tr class="fieldRow"> 1326 <td><input type="text" id="LastName" name="LastName" required="" /></td> 1327 </tr> 1328 <tr class="descriptionRow"> 1329 <td class="descriptionCell"><small></small></td> 1330 </tr> 1331 <tr class="labelRow"> 1332 <td class="labelCell"> 1333 <label for="Email">Email </label> 1334 </td> 1335 </tr> 1336 <tr class="fieldRow"> 1337 <td><input type="email" id="Email" name="Email" required="" /></td> 1338 </tr> 1339 <tr class="descriptionRow"> 1340 <td class="descriptionCell"><small></small></td> 1341 </tr> 1342 <tr class="labelRow"> 1343 <td class="labelCell"> 1344 <label for="Company">Company </label> 1345 </td> 1346 </tr> 1347 <tr class="fieldRow"> 1348 <td><input type="text" id="Company" name="Company" required="" /></td> 1349 </tr> 1350 <tr class="descriptionRow"> 1351 <td class="descriptionCell"><small></small></td> 1352 </tr> 1353 <tr class="labelRow"> 1354 <td class="labelCell"> 1355 <label for="ArticleNumber">Article Number </label> 1356 </td> 1357 </tr> 1358 <tr class="fieldRow"> 1359 <td style="width:100%;display:block;"><input type="text" id="ArticleNumber" name="ArticleNumber" value="@productNumber" style="width:100%;display:block;"></td> 1360 </tr> 1361 <tr class="descriptionRow"> 1362 <td class="descriptionCell"><small></small></td> 1363 </tr> 1364 <tr class="fieldRow"> 1365 <td><input type="submit" id="SendRequest" name="SendRequest" value="Submit" class="submit" /></td> 1366 </tr> 1367 <tr class="descriptionRow"> 1368 <td class="descriptionCell"><small></small></td> 1369 </tr> 1370 </tbody> 1371 </table> 1372 <input type="hidden" name="SendRequest" value="Submit" /> 1373 </form> 1374 </div> 1375 </div> 1376 </div> 1377 </section> 1378 <section class="accordian de"> 1379 <div class="wrapper"> 1380 <h3> 1381 <button id="accordian-materials" aria-expanded="true" aria-controls="accordian-materials-panel" type="button" class="accordian__button"> 1382 Tender Text Request Alternative 1383 <span class="accordian__icon accordian__icon--close" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 212 212" class="h24-icon h24-icon--minus"><path fill="currentColor" fill-rule="evenodd" d="M106 6c55.193 0 100 44.807 100 100s-44.807 100-100 100S6 161.193 6 106 50.807 6 106 6Zm0 5.333c-26.124 0-49.792 10.603-66.928 27.74C21.936 56.207 11.333 79.875 11.333 106c0 26.124 10.603 49.792 27.74 66.928 17.135 17.136 40.803 27.739 66.927 27.739 26.124 0 49.792-10.603 66.928-27.74 17.136-17.135 27.739-40.803 27.739-66.927 0-26.124-10.603-49.792-27.74-66.928C155.793 21.936 132.125 11.333 106 11.333Zm28.772 87.504a6.5 6.5 0 0 1 6.5 6.5v1a6.5 6.5 0 0 1-6.5 6.5h-57a6.5 6.5 0 0 1-6.5-6.5v-1a6.5 6.5 0 0 1 6.5-6.5h57Z"/></svg></span> 1384 <span class="accordian__icon accordian__icon--open" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 212 212" class="h24-icon h24-icon--plus"><path fill="currentColor" fill-rule="evenodd" d="M106 6c55.193 0 100 44.807 100 100s-44.807 100-100 100S6 161.193 6 106 50.807 6 106 6Zm0 5.333c-26.124 0-49.792 10.603-66.928 27.74C21.936 56.207 11.333 79.875 11.333 106c0 26.124 10.603 49.792 27.74 66.928 17.135 17.136 40.803 27.739 66.927 27.739 26.124 0 49.792-10.603 66.928-27.74 17.136-17.135 27.739-40.803 27.739-66.927 0-26.124-10.603-49.792-27.74-66.928C155.793 21.936 132.125 11.333 106 11.333Zm.772 59.504a6.5 6.5 0 0 1 6.5 6.5v21.5h21.5a6.5 6.5 0 0 1 6.5 6.5v1a6.5 6.5 0 0 1-6.5 6.5h-21.5v21.5a6.5 6.5 0 0 1-6.5 6.5h-1a6.5 6.5 0 0 1-6.5-6.5v-21.5h-21.5a6.5 6.5 0 0 1-6.5-6.5v-1a6.5 6.5 0 0 1 6.5-6.5h21.5v-21.5a6.5 6.5 0 0 1 6.5-6.5h1Z"/></svg></span> 1385 </button> 1386 </h3> 1387 <div class="accordian__panel" id="accordian-materials-panel"> 1388 <div class="accordian__content tender-request"> 1389 <p>To request tender text for any product please complete the following <a href="/contact/tender-text-request-form">form</a>. Remember to make a note of all the relevant product numbers.</p> 1390 </div> 1391 </div> 1392 </div> 1393 </section> 1394 @*IncludeFile("partials/add-to-collection.cshtml")*@ 1395 </div> 1396 1397 </div> 1398 </div> 1399 </section> 1400 1401 <script type="text/javascript"> 1402 var __ss_noform = __ss_noform || []; 1403 __ss_noform.push(['baseURI', 'https://app-3QNUK2ISME.marketingautomation.services/webforms/receivePostback/MzawMLE0MzQ3BgA/']); 1404 __ss_noform.push(['endpoint', 'f1f4eefa-cc8e-4621-a197-e153223a10a6']); 1405 </script><script type="text/javascript" src="https://koi-3QNUK2ISME.marketingautomation.services/client/noform.js?ver=1.24" ></script> 1406 1407 <div class="center-copy contact"> 1408 1409 @if (!String.IsNullOrEmpty(salesPhoneNumber)) 1410 { 1411 string contactUsLink = DWUtilities.GetPageByNavigationTag("ContactUs", thisPage.AreaID); 1412 <p class="print-hide call-out"><span>@Translate("ContactUs", "Contact Us") <a href="@contactUsLink">@Translate("ContactForm", "Contact Form")</a></span></p> 1413 } 1414 </div> 1415 1416 1417 1418 <form id="product-hidden-fields"> 1419 <input type="hidden" id="productVariantId" value="@GetString("Ecom:Product.VariantID")"> 1420 <input type="hidden" id="productCollectionData" value="@collectionData"> 1421 </form> 1422 1423 1424 <section class="print-hide flow section-bg-light products-variants"> 1425 1426 @if (GetLoop("VariantCombinations").Count() > 0) 1427 { 1428 <div class="wrapper flow"> 1429 <h5>@Translate("ProductOptions", "Product Options") (<span id="resultCount">@GetLoop("VariantCombinations").Count()</span>)</h5> 1430 1431 1432 <form class="form-inline"> 1433 <div id="filter-variants" class="cluster"> 1434 1435 @if (anchoringOptions.Results.Count() > 0) 1436 { 1437 <div class="form-group"> 1438 <label for="anchoring" class="control-label">@Translate("Anchoring", "Anchoring")</label> 1439 <select class="form-control variant-filter" id="filter-anchoring" name="anchoring" 1440 data-action-page="product" data-action-type="Variant filter" 1441 data-action-label="Anchoring" data-action-value="@productNumber"> 1442 1443 @if (anchoringOptions.Results.Count() > 1) 1444 { 1445 <option value="any">@Translate("Any", "Any")</option> 1446 foreach (var anchor in anchoringOptions.Results.OrderBy(n => n.Sort)) 1447 { 1448 <option value="@anchor.Value">@anchor.Name</option> 1449 } 1450 } 1451 else 1452 { 1453 ResultField result = anchoringOptions.Results.FirstOrDefault(); 1454 <option value="any">@Translate("Any", "Any")</option> 1455 <option value="@result.Value">@result.Name</option> 1456 } 1457 1458 </select> 1459 </div> 1460 } 1461 1462 @if (colourOptions.Results.Count() > 0) 1463 { 1464 <div class="form-group"> 1465 <label for="colour" class="control-label">@Translate("Colour", "Colour")</label> 1466 <select class="form-control variant-filter" id="filter-colour" name="colour" 1467 data-action-page="product" data-action-type="Variant filter" 1468 data-action-label="Colour" data-action-value="@productNumber"> 1469 1470 @if (colourOptions.Results.Count() > 1) 1471 { 1472 <option value="any">@Translate("Any", "Any")</option> 1473 foreach (var colour in colourOptions.Results.OrderBy(n => n.Sort)) 1474 { 1475 <option value="@colour.Value">@colour.Name</option> 1476 } 1477 } 1478 else 1479 { 1480 ResultField result = colourOptions.Results.FirstOrDefault(); 1481 <option value="@result.Value">@result.Name</option> 1482 } 1483 </select> 1484 </div> 1485 } 1486 1487 @if (optionOptions.Results.Count() > 0) 1488 { 1489 <div class="form-group"> 1490 <label for="options" class="control-label">@Translate("ProductOptions", "Product Options")</label> 1491 <select class="form-control variant-filter" id="filter-options" name="options" 1492 data-action-page="product" data-action-type="Variant filter" 1493 data-action-label="Options" data-action-value="@productNumber"> 1494 1495 @if (optionOptions.Results.Count() > 1) 1496 { 1497 <option value="any">@Translate("Any", "Any")</option> 1498 foreach (var option in optionOptions.Results.OrderBy(n => n.Sort)) 1499 { 1500 <option value="@option.Value">@option.Name</option> 1501 } 1502 } 1503 else 1504 { 1505 ResultField result = optionOptions.Results.FirstOrDefault(); 1506 <option value="@result.Value">@result.Name</option> 1507 } 1508 </select> 1509 </div> 1510 } 1511 1512 </div> 1513 </form> 1514 1515 1516 </div> 1517 1518 <div class="wrapper"> 1519 <div class="grid" id="variants-list"> 1520 1521 @foreach (LoopItem variantCombinations in GetLoop("VariantCombinations")) 1522 { 1523 var colourOption = string.Empty; 1524 var optionOption = string.Empty; 1525 var anchorOption = string.Empty; 1526 var materialOption = string.Empty; 1527 var colourId = string.Empty; 1528 var optionId = string.Empty; 1529 var anchorId = string.Empty; 1530 var materialId = string.Empty; 1531 var selectedVariant = string.Empty; 1532 List<ProductAsset> productImages = AssetManager_Repository.GetAssets(variantCombinations.GetString("Ecom:VariantCombination.Product.Number"), AssetType.Images, false); 1533 ProductAsset image = productImages.Where(n => n.Index == AssetTypeEnum.ToFriendlyAssetName(AssetType.Images) && n.FileName.StartsWith("medium_")).FirstOrDefault(); 1534 1535 foreach (var group in GetLoop("VariantGroups").Where(n => n.GetString("Ecom:VariantGroup.ID") != "D")) 1536 { 1537 foreach (var availableOption in group.GetLoop("VariantAvailableOptions")) 1538 { 1539 if (group.GetString("Ecom:VariantGroup.ID") == "S55") 1540 { 1541 1542 if (variantCombinations.GetString("Ecom:VariantCombination.VariantID").Contains(availableOption.GetString("Ecom:VariantOption.ID")) && availableOption.GetString("Ecom:VariantOption.Name") != "Not applicable") 1543 { 1544 colourOption = availableOption.GetString("Ecom:VariantOption.Name"); 1545 colourId = availableOption.GetString("Ecom:VariantOption.ID"); 1546 } 1547 1548 } 1549 if (group.GetString("Ecom:VariantGroup.ID") == "ATP1") 1550 { 1551 if (variantCombinations.GetString("Ecom:VariantCombination.VariantID").Contains(availableOption.GetString("Ecom:VariantOption.ID")) && availableOption.GetString("Ecom:VariantOption.Name") != "Not applicable") 1552 { 1553 materialOption = availableOption.GetString("Ecom:VariantOption.Name"); 1554 materialId = availableOption.GetString("Ecom:VariantOption.ID"); 1555 } 1556 } 1557 if (group.GetString("Ecom:VariantGroup.ID") == "ATP3") 1558 { 1559 if (variantCombinations.GetString("Ecom:VariantCombination.VariantID").Contains(availableOption.GetString("Ecom:VariantOption.ID")) && availableOption.GetString("Ecom:VariantOption.Name") != "Not applicable") 1560 { 1561 anchorOption = availableOption.GetString("Ecom:VariantOption.Name"); 1562 anchorId = availableOption.GetString("Ecom:VariantOption.ID"); 1563 } 1564 } 1565 if (group.GetString("Ecom:VariantGroup.ID") == "ATP4") 1566 { 1567 if (variantCombinations.GetString("Ecom:VariantCombination.VariantID").Contains(availableOption.GetString("Ecom:VariantOption.ID")) && availableOption.GetString("Ecom:VariantOption.Name") != "Not applicable") 1568 { 1569 optionOption = availableOption.GetString("Ecom:VariantOption.Name"); 1570 optionId = availableOption.GetString("Ecom:VariantOption.ID"); 1571 } 1572 } 1573 if (variantCombinations.GetBoolean("Ecom:VariantCombination.Selected")) 1574 { 1575 selectedVariant = "selected-variant"; 1576 } 1577 } 1578 1579 } 1580 1581 <div class="product-card @selectedVariant" data-filter-colour="@colourId" data-filter-anchoring="@anchorId" data-filter-options="@optionId"> 1582 1583 <div class="product-card__img-silo"> 1584 @if (image != null && !String.IsNullOrEmpty(image.uri)) 1585 { 1586 <a href="@variantCombinations.GetString("Ecom:VariantCombination.Link.Clean")"><img src="@image.uri" class="product-card__img" /></a> 1587 } 1588 else 1589 { 1590 <img src="/Files/Templates/Designs/HagsCore/res/img/image-not-found.png" class="product-card__img" /> 1591 } 1592 </div> 1593 1594 1595 <div class="product-card__copy"> 1596 1597 @if (thisPage.AreaID == 7) /*UK*/ 1598 { 1599 string ukId = ProductFieldValues.GetUkProductNumber(variantCombinations.GetString("Ecom:VariantCombination.Product.Number"), thisPage.Area.EcomLanguageId); 1600 <h5 class="product-card__heading"><a href="@variantCombinations.GetString("Ecom:VariantCombination.Link.Clean")">@ukId.ToString()</a></h5> 1601 } 1602 else 1603 { 1604 <h5 class="product-card__heading"><a href="@variantCombinations.GetString("Ecom:VariantCombination.Link.Clean")">@variantCombinations.GetString("Ecom:VariantCombination.Product.Number")</a></h5> 1605 } 1606 1607 <p>@optionOption @colourOption - @anchorOption</p> 1608 1609 <!--<a class="" href="@variantCombinations.GetString("Ecom:VariantCombination.Link.Clean")" role="button">@Translate("ProductDetails", "Product Details")</a>--> 1610 </div> 1611 </div> 1612 1613 } 1614 </div> 1615 1616 <div class="m-message" style="display:none;padding-bottom:20px;padding-left:6px;"> 1617 <p style="font-size: 1.2em;color:red;"><b>@Translate("VariantFilterMessage", "There were no options available for selection.")</b></p> 1618 </div> 1619 </div> 1620 1621 } 1622 </section> 1623 1624 @* Play Functions*@ 1625 @if (relatedProducts.Any()) 1626 { 1627 int count = relatedProducts.Count(); 1628 @* set up this so we can use it's title case method *@ 1629 TextInfo thisTextInfo = new CultureInfo(currentCulture,false).TextInfo; 1630 <section class="related-products"> 1631 <div class="wrapper flow"> 1632 1633 <h5 class="m-panel-title">@Translate("PlayFunctions", "Play Functions")</h5> 1634 1635 1636 <div class="products-listing__grid"> 1637 @foreach (Product relatedProduct in relatedProducts) 1638 { 1639 List<ProductAsset> productImages = AssetManager_Repository.GetAssets(relatedProduct.Number, AssetType.Images, false); 1640 ProductAsset image = productImages.Where(n => n.Index == AssetTypeEnum.ToFriendlyAssetName(AssetType.Images) && n.FileName.StartsWith("medium_")).FirstOrDefault(); 1641 1642 <div class="product-card"> 1643 1644 <div class="product-card_img"> 1645 @if (image != null && !String.IsNullOrEmpty(image.uri)) 1646 { 1647 <a href=""><img src="@image.uri" class="img-responsive m-product-thumb" /></a> 1648 } 1649 else 1650 { 1651 <a href=""><img src="/Files/Templates/Designs/HagsCore/res/img/image-not-found.png" class="img-responsive m-product-thumb" /></a> 1652 } 1653 </div> 1654 <div class="product-card__copy"> 1655 <h5 class="m-theme-after-yellow m-theme-border-yellow product-card__heading">@thisTextInfo.ToTitleCase(relatedProduct.Name.ToLower())</h5> 1656 1657 @if (!string.IsNullOrWhiteSpace(relatedProduct.LongDescription)) 1658 { 1659 <div class="show-read-more" data-charlength="60" data-txtreadmore="@Translate("ReadMore","Read More")" data-txtreadless="@Translate("ReadLess","Read Less")">@relatedProduct.LongDescription</div> 1660 } 1661 </div> 1662 </div> 1663 } 1664 1665 </div> 1666 </div> 1667 </section> 1668 } 1669 1670 1671 1672 1673 1674 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 1675 @using System.Collections.Generic 1676 @using HagsWeb.Library.BusinessObjects.UsersLists 1677 1678 @{ 1679 Layout = null; 1680 } 1681 <dialog id="CreateProductPdf" class="modal modal--full"> 1682 1683 <div class="modal__body"> 1684 1685 <div class="modal__header"> 1686 1687 <div class="modal__close"> 1688 <button type="button" class="action-btn js-modal-close-target" data-target-id="CreateProductPdf"> 1689 <span class="visually-hidden">Close</span> 1690 <svg viewBox="0 0 212 212" xmlns="http://www.w3.org/2000/svg" class="h24-icon h24-icon--close"><path d="M100 0c55.193 0 100 44.807 100 100s-44.807 100-100 100S0 155.193 0 100 44.807 0 100 0Zm0 5.333c-26.124 0-49.792 10.603-66.928 27.74C15.936 50.207 5.333 73.875 5.333 100c0 26.124 10.603 49.792 27.74 66.928 17.135 17.136 40.803 27.739 66.927 27.739 26.124 0 49.792-10.603 66.928-27.74 17.136-17.135 27.739-40.803 27.739-66.927 0-26.124-10.603-49.792-27.74-66.928C149.793 15.936 126.125 5.333 100 5.333Zm25.105 78.865L110.17 99.664l15.466 14.935a6.5 6.5 0 0 1 .16 9.191l-.694.72a6.5 6.5 0 0 1-9.191.16l-15.466-14.935-14.935 15.466a6.5 6.5 0 0 1-9.191.16l-.72-.694a6.5 6.5 0 0 1-.16-9.191l14.935-15.466-15.466-14.935a6.5 6.5 0 0 1-.16-9.191l.694-.72a6.5 6.5 0 0 1 9.191-.16L100.1 89.939l14.935-15.466a6.5 6.5 0 0 1 9.191-.16l.72.694a6.5 6.5 0 0 1 .16 9.191Z" fill="currentColor" fill-rule="evenodd"/></svg> 1691 </button> 1692 </div> 1693 1694 1695 <h4 class="modal-title" id="CreateCatalogModalLabel"> 1696 @Translate("YourProductSheet", "Your Product Sheet") 1697 </h4> 1698 1699 </div> 1700 1701 <div class="modal__main"> 1702 1703 <div id="div_CreateCatalog" class="modal__product-pdf"> 1704 1705 <div id="pdfwaiting" style="display:block;text-align:center"> 1706 <span id="CreateProductPdfLabel" style="display: inline-block;margin: 10px 10px 0 0;padding: 5px 10px"></span> 1707 <img src="Files/Templates/Designs/HagsCore/res/img/loader/ajax-loader.gif" style="margin:auto;display:block;" /> 1708 </div> 1709 1710 <div id="productPdfViewerloader" class="modal__embed-silo"> 1711 </div> 1712 1713 <div id="CreatePdfMessage"></div> 1714 </div> 1715 1716 1717 </div> 1718 1719 <div class="modal__footer"> 1720 1721 <div class="m-search-advanced-buttons cluster cluster--dialog"> 1722 <a href="" class="btn btn--outline" id="pdfPrintSheet" target="_blank" type="button">@Translate("Print", "Print")</a> 1723 <a href="" class="btn btn--outline" id="pdfDownloadSheet" download type="button">@Translate("Download", "Download")</a> 1724 <button class="btn btn--outline js-modal-close-target" data-target-id="CreateProductPdf" type="button">@Translate("Close", "Close")</button> 1725 </div> 1726 1727 </div> 1728 1729 </div> 1730 1731 </dialog> 1732 @*ProductPdfHelper(productCollectionItems, GetString("Ecom:Product.LanguageID"))*@ 1733 1734
Warranties
Find out what you are covered for.
Maintenance guide
How to look after your products.
Color & Anchoring Options
Explore your options.