HAGS Connect

Un bref bloc d'introduction à HAGS Connect.

Connexion à HAGS Connect
Ma collection de produits

Pour ajouter un produit, il suffit de cliquer sur Ajouter à ma collection sur n'importe quelle page de produit. Une fois que vous avez ajouté des produits à une collection, vous pouvez imprimer un catalogue de produits, télécharger des guides d'installation, des images et des fichiers DWG ou demander un devis.

Error executing template "Designs/Hags2024/eCom/Product/Product.cshtml"
System.Data.SqlClient.SqlException (0x80131904): A transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.) ---> System.ComponentModel.Win32Exception (0x80004005): An existing connection was forcibly closed by the remote host
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject stateObj, UInt32 error)
   at System.Data.SqlClient.TdsParserStateObject.ReadSniSyncOverAsync()
   at System.Data.SqlClient.TdsParserStateObject.TryReadNetworkPacket()
   at System.Data.SqlClient.TdsParserStateObject.TryPrepareBuffer()
   at System.Data.SqlClient.TdsParserStateObject.TryReadByte(Byte& value)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
   at System.Data.SqlClient.SqlDataReader.get_MetaData()
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
   at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
   at Dynamicweb.Data.Database.CreateDataReader(IDbCommand command, CommandBehavior behavior)
   at Dynamicweb.Data.Database.CreateDataReader(CommandBuilder commandBuilder, IDbConnection connection, IDbTransaction transaction, CommandBehavior behavior, Int32 commandTimeout)
   at Dynamicweb.Data.Database.CreateDataReader(CommandBuilder commandBuilder, IDbConnection connection, IDbTransaction transaction, Int32 commandTimeout)
   at Dynamicweb.Ecommerce.Products.ProductRepository.GetProductsBySql(CommandBuilder query, Boolean doRefactoring, Boolean bulkFill, Boolean useAssortments)
   at Dynamicweb.Ecommerce.Products.ProductRepository.GetProductsByNumber(String productNumber, String productLanguageId, Int32 limit)
   at Dynamicweb.Ecommerce.Products.ProductRepository.GetProductByNumber(String productNumber, String productLanguageId)
   at Dynamicweb.Ecommerce.Products.ProductService.GetProductByNumber(String productNumber, String productLanguageId)
   at HagsWeb.Library.Methods.ProductFilter.ProductFilter.GetRelatedProducts(String productNumber, String productVariant, String relatedproductGroupName, String lang)
   at CompiledRazorTemplates.Dynamic.RazorEngine_bbe132abb7eb40fe9abb686179fb6c3b.Execute() in B:\Projects\Hags_Dw915\Files\Templates\Designs\Hags2024\eCom\Product\Product.cshtml:line 261
   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()
ClientConnectionId:16eb38d9-788d-44c5-adf1-88008b2a123e
Error Number:10054,State:0,Class:20

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

Garanties

Découvrez ce pour quoi vous êtes couvert.

Guide d'entretien

Comment entretenir vos produits.

Couleur et options d'ancrage

Explorez vos options.

}