HAGS Connect

    Krátký blok úvodních informací o službě HAGS Connect.

    HAGS Connect Přihlášení
    Moje kolekce produktů

    Chcete-li přidat produkt, klikněte na tlačítko Přidat do mé sbírky na libovolné stránce produktu. Po přidání produktů do kolekce si budete moci vytisknout katalog produktů, stáhnout instalační příručky, obrázky a soubory DWG nebo požádat o cenovou nabídku.

      Error executing template "Designs/Hags2024/eCom/Product/Product.cshtml"
      System.ComponentModel.Win32Exception (0x80004005): Multiple connections to a server or shared resource by the same user, using more than one user name, are not allowed. Disconnect all previous connections to the server or shared resource and try again
         at HagsWeb.Library.Services.FileSystemService.FindFile.Win32Error(Int32 errorCode)
         at HagsWeb.Library.Services.FileSystemService.FindFile.FindFileEx(FileFoundEventArgs args, Int32 slength)
         at HagsWeb.Library.Services.FileSystemService.FindFile.Find()
         at HagsWeb.Library.Methods.AssetManager.AssetManager_Repository.GetDirectoryStructure(String directory, String directorySource)
         at HagsWeb.Library.Methods.AssetManager.AssetManager_Repository.GetAssets(String productId, AssetType assetType, Boolean cacheResult)
         at CompiledRazorTemplates.Dynamic.RazorEngine_b3d5be8281164b789de82660ed32b115.Execute() in B:\Projects\Hags_Dw915\Files\Templates\Designs\Hags2024\eCom\Product\Product.cshtml:line 267
         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 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?v=1.5"></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 @* canonical debug code *@ 479 @* 480 481 IncludeFile("../includes/product-canonical-debug.cshtml") 482 483 @if ( System.Web.HttpContext.Current.Request["dc"] == "yes" ) 484 { 485 string currentResult = HagsWeb.Library.Utilities.DWUtilities.GetProductSearchResultUrl("ProductNumber=" + productNumber, false, "LANG1", thisPage.AreaID); 486 int areaId = thisPage.AreaID; 487 @debugCanonical(currentResult, productNumber, areaId) 488 } 489 490 *@ 491 492 493 <article class="flow"> 494 495 <nav class="breadcrumb"> 496 <div class="wrapper"> 497 @renderPageBreadcrumb(pageUrl, GetGlobalValue("Global:Area.LongLang"), @GetString("Ecom:Product.Name"), variantOptions) 498 </div> 499 </nav> 500 501 502 <section class="product-header"> 503 504 <div class="wrapper flow"> 505 <h1>@GetString("Ecom:Product.Name")</h1> 506 @using System.Web; 507 @using System.Globalization; 508 509 @{ 510 bool centralStock = GetBoolean("Ecom:Product:Field.CentralStock"); 511 bool swedishStock = GetBoolean("Ecom:Product:Field.SwedishStock"); 512 string ipAddress = HttpContext.Current.Request.ServerVariables["remote_addr"]; 513 string weglotLang = System.Web.HttpContext.Current.Request.Headers["weglot-language"]; 514 string productNumberDisplay = productNumber; 515 string formattedCurrency = GetInteger("Ecom:Product.DBPrice").ToString("C", new CultureInfo("sv-SE")); 516 } 517 @if ( weglotLang == "se" || weglotLang == "da" ) 518 { 519 if ( swedishStock ) 520 { 521 productNumberDisplay = productNumber + "-1"; 522 } 523 } 524 else 525 { 526 if (centralStock) 527 { 528 productNumberDisplay = productNumberDisplay + "-2"; 529 } 530 } 531 532 533 <p class="product-number">@productNumberDisplay</p> 534 535 @* 536 <!-- central: @centralStock swedish: @swedishStock --> 537 <!-- Integer DB price: @GetInteger("Ecom:Product.DBPrice") --> 538 <!-- String Price Formatted: @GetString("Ecom:Product.Price.PriceFormatted") --> 539 <!-- String Price: @GetString("Ecom:Product.Price") --> 540 <!-- IP address: @ipAddress --> 541 <!-- Weglot language: @weglotLang --> 542 <!-- formatted currency: @formattedCurrency --> 543 *@ 544 545 </div> 546 547 <div class="wrapper"> 548 549 <div class="fc-zoom"> 550 @*Zoom Product Images*@ 551 @if (zoomList.Count > 0) 552 553 { 554 <div class="fc-zoom__view"> 555 <div class="fc-zoom__target" id="zoom-target-1"> 556 @{ 557 var i = 0; 558 string resizeUrl = "/Admin/Public/GetImage.ashx?Image="; 559 string resizeOptions = "&Crop=0&Format=jpg&Height=350&Compression=75"; 560 } 561 @foreach (var zoomSet in zoomList) 562 { 563 string[,] imgSet = zoomSet.Value; 564 string imgId = string.Format("img_0{0}", zoomSet.Key); 565 string imageUrl = resizeUrl + imgSet[0, 2] + resizeOptions; 566 567 568 if (i == 0) 569 { 570 571 <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")"> 572 } 573 else 574 { 575 <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")"> 576 } 577 i++; 578 } 579 </div> 580 581 <button class="fc-zoom__button fc-zoom__button--in reel-cards__btn" id="zoom-toggle"> 582 <span class="visually-hidden">Toggle Zoom</span> 583 <span class="fc-zoom__icon fc-zoom__icon--in"> 584 <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> 585 </span> 586 <span class="fc-zoom__icon fc-zoom__icon--out"> 587 <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> 588 </span> 589 </button> 590 </div> 591 592 <div class="reel-thumbs fc-zoom__thumbs" id="zoom-gallery"> 593 594 <button 595 class="reel-cards__btn reel-cards__btn--prev" 596 data-action-page="Product" 597 data-action-type="Button" 598 data-action-label="Gallery prev" 599 data-action-value="@productNumber"> 600 <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> 601 <span class="visually-hidden">@Translate("page_Previous", "Previous")</span> 602 </button> 603 604 <div class="reel-thumbs__viewport"> 605 606 <div class="fc-zoom__thumbs-list reel-thumbs__container"> 607 @{ i = 0; } 608 @foreach (var zoomSet in zoomList) 609 { 610 string[,] imgSet = zoomSet.Value; 611 string imgId = string.Format("img_0{0}", zoomSet.Key); 612 <div class="reel-thumbs__frame"> 613 <a class="fc-zoom__link" href="@imgSet[0, 1]" data-image-target="zoom-full-image-@i" data-image="" data-zoom-image="@imgSet[0, 2]"> 614 <img class="fc-zoom__thumb" src="@imgSet[0, 0]" alt="@GetString("Ecom:Product.Name")"> 615 </a> 616 </div> 617 i++; 618 619 } 620 </div> 621 622 </div> 623 624 <button 625 class="reel-cards__btn reel-cards__btn--next" 626 data-action-page="Product" 627 data-action-type="Button" 628 data-action-label="Gallery next" 629 data-action-value="@productNumber"> 630 <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> 631 <span class="visually-hidden">@Translate("page_Next", "Next")</span> 632 </button> 633 634 635 636 </div> 637 } 638 </div> 639 640 641 </section> 642 643 644 <div class="page-intro wrapper"> 645 646 <div class="page-intro__copy flow"> 647 648 <div class="cluster"> 649 @* add to collection button *@ 650 @if (isProductCollection) 651 { 652 <button type="button" class="btn btn--outline print-hide" data-removeproductlist="@productNumber" data-addproductlist=""> 653 @Translate("RemoveFromCollection", "Remove from my Collection") 654 </button> 655 } 656 else 657 { 658 <button 659 type="button" 660 class="btn btn--outline print-hide" 661 data-removeproductlist="" 662 data-addproductlist="@collectionData" 663 data-action-page="Product" data-action-type="button" data-action-label="Add to collection" data-action-value="@productNumber"> 664 @Translate("AddToCollection", "Add to my collection") 665 </button> 666 } 667 668 @* download images button *@ 669 @if (hiResDownloads.Count() > 0) 670 { 671 List <string> fileList = new List<string>(); 672 foreach (var file in hiResDownloads) 673 { 674 fileList.Add(file.FullPath); 675 } 676 <form method="post" id="downloadImagesForm"> 677 <input type="hidden" name="ProductNumber" value="@productNumber" /> 678 <input type="hidden" name="ProductName" value="@GetString("Ecom:Product.Name")" /> 679 @GetButton(fileList, "Product", productNumber) 680 </form> 681 } 682 683 @* PDF Product sheet button *@ 684 @{ 685 string printShout = Translate("SaveOrPrint", "Save or Print your Product PDF "); 686 string productId = @GetString("Ecom:Product.ID"); 687 string productVariantId = @GetString("Ecom:Product.VariantID"); 688 } 689 <button type="button" id="productSheetButton" data-target="#CreateProductPdf" 690 name="productPublishing" data-productid="@productId" data-productnumber="@productNumber" 691 data-variantid="@productVariantId" data-open-modal="#CreateProductPdf" data-request="technicalsheet" data-shout="@printShout" 692 class="btn btn--outline" 693 data-action-page="Product" data-action-type="button" data-action-label="Create product PDF" data-action-value="@productNumber"> 694 @Translate("ProductSheet", "PDF Product Sheet") 695 </button> 696 697 698 </div> 699 700 @*if (!string.IsNullOrWhiteSpace(GetString("Ecom:Product.ShortDescription"))) 701 { 702 <p>@GetString("Ecom:Product.ShortDescription")</p> 703 } 704 *@ 705 706 @if (!string.IsNullOrWhiteSpace(GetString("Ecom:Product.LongDescription"))) 707 { 708 @* 709 string paragraph = GetString("Ecom:Product.LongDescription"); 710 string[] paragraphs = paragraph.Split(new[] { '.' }, StringSplitOptions.RemoveEmptyEntries); 711 foreach (var p in paragraphs) 712 { 713 <p>@p.Trim().</p> 714 } 715 *@ 716 <p>@GetString("Ecom:Product.LongDescription")</p> 717 718 } 719 720 <div class="cluster" title="@Translate(" Anchoring", "Anchoring"): @selectedAnchoringVariant"> 721 722 @if ( GetBoolean("Ecom:Product:Field.CentralStock") && (weglotLang != "se" && weglotLang != "da") ) 723 { 724 <div class="product-icon" title="Leverans ex lager från Sverige"> 725 <img class="product-icon__icon" src="/Files/Images/Other/Playground box/Lorry.jpg" alt="Leverans ex lager från Sverige" /> 726 <p>Fast Delivery</p> 727 </div> 728 } 729 730 @if ( (weglotLang == "se" || weglotLang == "da") && swedishStock ) 731 { 732 <div class="product-icon" title="Leverans ex lager från Sverige"> 733 <img class="product-icon__icon" src="/Files/Images/Other/Playground box/Lorry.jpg" alt="Leverans ex lager från Sverige" /> 734 <p>Fast Delivery</p> 735 </div> 736 } 737 738 739 740 @if (!string.IsNullOrWhiteSpace(selectedAnchoringIcon ?? selectedAnchoringVariant)) 741 { 742 743 <div class="product-icon"> 744 <img class="product-icon__icon" src="Files/Templates/Designs/HagsCore/res/img/icons/anchoring/@selectedAnchoringIcon" alt="@selectedAnchoringVariant" /> 745 @selectedAnchoringVariant 746 </div> 747 } 748 749 </div> 750 751 <p> 752 @(selectedMaterialVariant != "" ? selectedMaterialVariant + " - " : "") 753 @(selectedOptionVariant != "" ? selectedOptionVariant + " - " : "") 754 @(@selectedColourVariant != "" ? selectedColourVariant : "") 755 </p> 756 757 @using System.Web; 758 @using System.Globalization; 759 @using System.IO; 760 @using System.Linq; 761 @using System.Net; 762 @using System.Configuration; 763 764 @{ 765 //string ipAddress = HttpContext.Current.Request.ServerVariables["remote_addr"]; 766 //string weglotLang = System.Web.HttpContext.Current.Request.Headers["weglot-language"]; 767 //string formattedCurrency = GetInteger("Ecom:Product.DBPrice").ToString("C", new CultureInfo("sv-SE")); 768 bool showPrice = false; 769 string ipCountryCode = ""; 770 771 if ( (weglotLang == "se") ) 772 { 773 string ipLookupKey = ConfigurationManager.AppSettings["ExtremeIpLookupApiKey"].ToString(); 774 string ipLookupUrl = "http://extreme-ip-lookup.com/json/" + ipAddress + "?key=" + ipLookupKey; 775 string ipLookupError = ""; 776 777 778 HttpWebRequest ipLookupRequest = (HttpWebRequest)WebRequest.Create(ipLookupUrl); 779 ipLookupRequest.Method = "GET"; // Set method to GET 780 ipLookupRequest.ContentType = "application/json"; 781 782 try 783 { 784 // Get the response from the API 785 using (HttpWebResponse ipLookupResponse = (HttpWebResponse)ipLookupRequest.GetResponse()) 786 { 787 // Check if the response is OK 788 if (ipLookupResponse.StatusCode == HttpStatusCode.OK) 789 { 790 // Read the response stream 791 using (StreamReader reader = new StreamReader(ipLookupResponse.GetResponseStream())) 792 { 793 // Parse the JSON response 794 string jsonResponse = reader.ReadToEnd(); 795 796 // Parse JSON using JObject (from Newtonsoft.Json.Linq) 797 Newtonsoft.Json.Linq.JObject jsonObject = Newtonsoft.Json.Linq.JObject.Parse(jsonResponse); 798 799 // Extract a specific value (assuming the JSON has a field named "desiredField") 800 ipCountryCode = (string)jsonObject["countryCode"]; 801 ipCountryCode = ipCountryCode.ToLower(); 802 } 803 } 804 } 805 } 806 807 catch (Exception ex) 808 { 809 // Handle any errors 810 //set default to au 811 ipCountryCode = ""; 812 ipLookupError = ex.Message; 813 } 814 815 if ( ipCountryCode == "se" ) { 816 showPrice = true; 817 } 818 } 819 820 } 821 822 <!--p style="color: #999;">Country-Site: @weglotLang IP-Country: @ipCountryCode</p--> 823 824 @if ( showPrice ) { 825 826 <p> 827 <span class="ts-3">@formattedCurrency</span> <span>(Excluding VAT)</span> 828 </p> 829 830 } 831 832 @* 833 <!-- IP address: @ipAddress --> 834 <!-- Weglot language: @weglotLang --> 835 <!-- formatted currency: @formattedCurrency --> 836 *@ 837 838 </div> 839 </div> 840 841 842 843 <section> 844 <div class="wrapper"> 845 846 <div class="center-copy"> 847 848 @{ 849 string[] badges = GetString("Ecom:Product:Field.EnvironmentalBadge.Value").Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries).ToArray(); 850 } 851 <div> 852 <ul class="badges"> 853 @foreach (var badge in badges) 854 { 855 string altText = ""; 856 857 if (badge == "NSEL") 858 { 859 altText = Translate("CertifiedNordicSwan", "Certified by Nordic Swan"); 860 } 861 862 if ( badge == "BVB8" ) { 863 altText = Translate("BVBGradeAccepted", "Assessed by Byggvarubedömningen, Grade: Accepted"); 864 } 865 866 if ( badge == "BVB7" ) { 867 altText = Translate("BVBGradeRecommended", "Assessed by Byggvarubedömningen, Grade: Recommended"); 868 } 869 870 if ( badge == "SH1" ) { 871 altText = Translate("SundaHusGradeB", "Assessed by SundaHus, Grade: B"); 872 } 873 874 if ( badge == "SH2" ) { 875 altText = Translate("SundaHusGradeA", "Assessed by SundaHus, Grade: A"); 876 } 877 <li class="badges__item"><img src="@(designBaseUrl)assets/img/badges/@(badge).png" alt="@altText" title="@altText" /></li> 878 } 879 </ul> 880 </div> 881 882 <div class="accordians"> 883 @if (!string.IsNullOrEmpty(GetString("Ecom:Product:Field.PlayValues"))) 884 { 885 string[] playValues = GetString("Ecom:Product:Field.PlayValues.Value").Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries).ToArray(); 886 887 var playCategories = new Dictionary<string,List<string>>{}; 888 889 890 var playMap = new Dictionary<string, (string, string)> 891 { 892 { "50",("Spinning and Rolling","Physical") }, 893 { "51",("Sliding","Physical") }, 894 { "52",("Swinging / Rocking","Physical") }, 895 { "53",("Climbing","Physical") }, 896 { "54",("Crawling","Physical") }, 897 { "55",("Balancing","Physical") }, 898 { "56",("Jumping / Bouncing","Physical") }, 899 { "57",("Walking and running","Physical") }, 900 { "58",("Hanging<br/>(from the arms)","Physical") }, 901 { "59",("Pointing and touching","Physical") }, 902 { "60",("Cooperating","Social") }, 903 { "61",("Sharing","Social") }, 904 { "62",("Communicating","Social") }, 905 { "63",("Turn-taking","Social") }, 906 { "64",("Competing","Social") }, 907 { "65",("Playing with mathematical concepts","Cognitive") }, 908 { "66",("Playing with literacy concepts","Cognitive") }, 909 { "67",("Problem solving","Cognitive") }, 910 { "68",("Concentrating","Cognitive") }, 911 { "69",("Remembering","Cognitive") }, 912 { "70",("Planning / Tactics","Cognitive") }, 913 { "71",("Growing / Planting","Creative") }, 914 { "72",("Painting / Drawing / Mark Making","Creative") }, 915 { "73",("Building / Arranging","Creative") }, 916 { "74",("Sound making","Creative") }, 917 { "75",("Imagining / Storytelling","Creative") } 918 }; 919 920 @* Add the values to the play categories *@ 921 922 foreach (var value in playValues) 923 { 924 string playCategoryName = playMap.ContainsKey(value) ? playMap[value].Item2 : "unknown"; 925 if (!playCategories.ContainsKey(playCategoryName)) 926 { 927 playCategories[playCategoryName] = new List<string>(); 928 } 929 playCategories[playCategoryName].Add(value); 930 } 931 932 <section class="accordian"> 933 <div class="wrapper"> 934 <h3> 935 <button id="accordian-spec" aria-expanded="true" aria-controls="accordian-spec-panel" type="button" class="accordian__button" data-action-page="Product" data-action-type="Text block expand" data-action-label="Experiences" data-action-value="@productNumber">Play Experiences<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><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></button> 936 </h3> 937 <div class="accordian__panel" id="accordian-spec-panel"> 938 <div class="accordian__content flow"> 939 @* Play Value Icons *@ 940 941 @* now loop through the category keys - building a list for each key *@ 942 943 @foreach (var playCategory in playCategories ) 944 { 945 <h6>@playCategory.Key</h6> 946 <ul class="badges"> 947 @foreach (var value in playCategory.Value) 948 { 949 string playTitle = playMap.ContainsKey(value) ? playMap[value].Item1 : "Unknown"; 950 string valueImg = value + ".svg"; 951 <li class="badges__item badges__item--text"> 952 <img src="@(designBaseUrl)icons/play-values-icons/@valueImg" alt="@playTitle" title="@playTitle" /> 953 <span>@playTitle</span> 954 </li> 955 } 956 </ul> 957 } 958 959 960 </div> 961 </div> 962 </section> 963 } 964 965 <section class="accordian"> 966 <div class="wrapper"> 967 968 <h3><button 969 id="accordian-spec" 970 aria-expanded="true" aria-controls="accordian-spec-panel" type="button" 971 class="accordian__button" 972 data-action-page="Product" 973 data-action-type="Text block expand" 974 data-action-label="Specifications" 975 data-action-value="@productNumber"> 976 @Translate("ProductSpecifications", "Product Specifications") 977 <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> 978 <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> 979 </button> 980 </h3> 981 982 <div class="accordian__panel" id="accordian-spec-panel"> 983 <div class="accordian__content flow"> 984 985 @if (!String.IsNullOrWhiteSpace(@GetString("Ecom:Product:Field.IPEMA_Specification"))) 986 { 987 string ipemaData = GetString("Ecom:Product:Field.IPEMA_Specification"); 988 // Get IPEMA Product Specification data from a Field on the Product data from Jeeves 989 //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")); 990 System.Xml.Linq.XDocument dataXML = System.Xml.Linq.XDocument.Parse(ipemaData); 991 992 if (dataXML != null) 993 { 994 @*<h1> @GetString("Ecom:Product.Name") </h1>*@ 995 @*<p>@dataXML</p>*@ 996 System.Globalization.NumberFormatInfo format = new System.Globalization.NumberFormatInfo(); 997 998 var details = from dat in dataXML.Descendants("Item") 999 select new 1000 { 1001 name = dat.Element("name").Value, 1002 enValue = dat.Element("EN_value").Value, 1003 astmValue = dat.Element("ASTM_value").Value, 1004 csaValue = dat.Element("CSA_value").Value 1005 }; 1006 1007 <table class="table"> 1008 <thead> 1009 <tr> 1010 <th scope="col"></th> 1011 <th scope="col">@Translate("Europe","Europe")<br>EN1176</th> 1012 <th scope="col">@Translate("USA", "USA")<br>ASTM F1487</th> 1013 <th scope="col">@Translate("Canada", "Canada")<br>CSA Z614</th> 1014 </tr> 1015 </thead> 1016 1017 <tbody> 1018 @foreach (var item in details) 1019 { 1020 <tr> 1021 <td>@item.name</td> 1022 <td>@item.enValue</td> 1023 <td>@item.astmValue</td> 1024 <td>@item.csaValue</td> 1025 </tr> 1026 } 1027 </tbody> 1028 </table> 1029 1030 @*#table-IPEMA Product Spec*@ 1031 } 1032 1033 } else { 1034 <table class="table"> 1035 <thead> 1036 <tr> 1037 <th scope="col"></th> 1038 <th scope="col"></th> 1039 </tr> 1040 </thead> 1041 <tbody> 1042 1043 @if (!String.IsNullOrWhiteSpace(GetString("Ecom:Product:Field.NumberOfChildren"))) 1044 { 1045 <tr> 1046 <td>@GetString("Ecom:Product:Field.NumberOfChildren.Name")</td> 1047 <td>@GetString("Ecom:Product:Field.NumberOfChildren.Value")</td> 1048 </tr> 1049 } 1050 @if (!String.IsNullOrWhiteSpace(GetString("Ecom:Product:Field.AgeRange")) && ageRanges.Any()) 1051 { 1052 <tr> 1053 <td>@GetString("Ecom:Product:Field.AgeRange.Name")</td> 1054 <td>@string.Join(", ", ageRanges)</td> 1055 </tr> 1056 } 1057 @if (GetDouble("Ecom:Product:Field.AssemblyTime.Value.Raw") > 0) 1058 { 1059 <tr> 1060 <td>@GetString("Ecom:Product:Field.AssemblyTime.Name")</td> 1061 <td>@GetDouble("Ecom:Product:Field.AssemblyTime.Value.Raw") @Translate("Hours", "hours")</td> 1062 </tr> 1063 } 1064 @if (GetDouble("Ecom:Product:Field.Length.Value.Raw") > 0) 1065 { 1066 <tr> 1067 <td>@GetString("Ecom:Product:Field.Length.Name").Replace(" (mm)", "")</td> 1068 <td>@GetString("Ecom:Product:Field.Length.Value.Raw") mm</td> 1069 </tr> 1070 } 1071 @if (GetDouble("Ecom:Product:Field.Width.Value.Raw") > 0) 1072 { 1073 <tr> 1074 <td>@GetString("Ecom:Product:Field.Width.Name").Replace(" (mm)", "")</td> 1075 <td>@GetString("Ecom:Product:Field.Width.Value.Raw") mm</td> 1076 </tr> 1077 } 1078 @if (GetDouble("Ecom:Product:Field.Height.Value.Raw") > 0) 1079 { 1080 <tr> 1081 <td>@GetString("Ecom:Product:Field.Height.Name").Replace(" (mm)", "")</td> 1082 <td>@GetString("Ecom:Product:Field.Height.Value.Raw") mm</td> 1083 </tr> 1084 } 1085 @if (GetDouble("Ecom:Product:Field.NetWeight.Value.Raw") > 0) 1086 { 1087 <tr> 1088 <td>@GetString("Ecom:Product:Field.NetWeight.Name")</td> 1089 <td>@GetString("Ecom:Product:Field.NetWeight.Value") kg</td> 1090 </tr> 1091 } 1092 @if (GetDouble("Ecom:Product:Field.Volume.Value.Raw") > 0) 1093 { 1094 <tr> 1095 <td>@GetString("Ecom:Product:Field.Volume.Name")</td> 1096 <td>@GetString("Ecom:Product:Field.Volume.Value.Raw") m&#179;</td> 1097 </tr> 1098 } 1099 @if (GetDouble("Ecom:Product:Field.FallHeight.Value.Raw") > 0) 1100 { 1101 <tr> 1102 <td>@GetString("Ecom:Product:Field.FallHeight.Name").Replace(" (mm)", "")</td> 1103 <td>@GetString("Ecom:Product:Field.FallHeight.Value.Raw") mm</td> 1104 </tr> 1105 } 1106 @if (GetDouble("Ecom:Product:Field.SafetyAreaWidth.Value.Raw") > 0) 1107 { 1108 <tr> 1109 <td>@GetString("Ecom:Product:Field.SafetyAreaWidth.Name").Replace(" (mm)", "")</td> 1110 <td>@GetString("Ecom:Product:Field.SafetyAreaWidth.Value.Raw") mm</td> 1111 </tr> 1112 } 1113 @if (GetDouble("Ecom:Product:Field.SafetyAreaLength.Value.Raw") > 0) 1114 { 1115 <tr> 1116 <td>@GetString("Ecom:Product:Field.SafetyAreaLength.Name").Replace(" (mm)", "")</td> 1117 <td>@GetString("Ecom:Product:Field.SafetyAreaLength.Value.Raw") mm</td> 1118 </tr> 1119 } 1120 @if (GetDouble("Ecom:Product:Field.SafetyArea.Value.Raw") > 0) 1121 { 1122 <tr> 1123 <td>@GetString("Ecom:Product:Field.SafetyArea.Name")</td> 1124 <td>@GetDouble("Ecom:Product:Field.SafetyArea.Value") m&#178;</td> 1125 </tr> 1126 } 1127 1128 </tbody> 1129 </table> 1130 1131 } 1132 1133 @*SafetyAreaDetails*@ 1134 @if (GetDouble("Ecom:Product:Field.SafetyArea.Value") > 0 && thisPage.AreaID == 1) 1135 { 1136 string safetyAreaPage = DWUtilities.GetPageByNavigationTag("SafetyArea", thisPage.AreaID); 1137 if (!string.IsNullOrEmpty(safetyAreaPage)) 1138 { 1139 <p><a href="@safetyAreaPage" class="print-hide">@Translate("ReadMoreSafetyArea", "Read more about safety areas")</a></p> 1140 } 1141 1142 } 1143 1144 @*Anchoring from Variant*@ 1145 @if (!string.IsNullOrEmpty(selectedAnchoringVariant)) 1146 { 1147 string anchoringPage = DWUtilities.GetPageByNavigationTag("AnchoringTypes", thisPage.AreaID) + "#" + GetGlobalValue("Global:HagsTheme"); 1148 1149 if (!string.IsNullOrEmpty(anchoringPage)) 1150 { 1151 <p><a href="@anchoringPage" class="btn btn--outline print-hide">@Translate("ReadMoreAnchoring", "Read more about anchoring")</a></p> 1152 } 1153 1154 } 1155 1156 @*Guarantee Page for Sweden*@ 1157 @if (thisPage.AreaID == 2) 1158 { 1159 <p><a href="/sv-se/om-hags/garantier" target="_blank" class="print-hide">Läs mer om produktgarantier</a></p> 1160 } 1161 </div> 1162 </div> 1163 </section> 1164 @if (!string.IsNullOrWhiteSpace(GetString("Ecom:Product:Field.Material"))) 1165 { 1166 <section class="accordian"> 1167 <div class="wrapper"> 1168 1169 <h3> 1170 <button id="accordian-materials" aria-expanded="true" aria-controls="accordian-materials-panel" type="button" class="accordian__button" 1171 data-action-page="Product" 1172 data-action-type="Text block expand" 1173 data-action-label="Materials" 1174 data-action-value="@productNumber"> 1175 @GetString("Ecom:Product:Field.Material.Name") 1176 <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> 1177 <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> 1178 </button> 1179 </h3> 1180 1181 <div class="accordian__panel" id="accordian-materials-panel"> 1182 <div class="accordian__content"> 1183 1184 @{ 1185 1186 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"); 1187 if (!string.IsNullOrEmpty(materialData)) 1188 { 1189 //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")); 1190 System.Xml.Linq.XDocument dataXML = System.Xml.Linq.XDocument.Parse(materialData); 1191 1192 if (dataXML != null) 1193 { 1194 System.Globalization.NumberFormatInfo format = new System.Globalization.NumberFormatInfo(); 1195 //format.NumberGroupSeparator = ","; //for thousands 1196 //format.NumberDecimalSeparator = "."; //the decimal seperator 1197 1198 var totalweight = Math.Round((from nd in dataXML.Descendants("kg") 1199 select Double.Parse(nd.Value, format)).Sum(), 0).ToString(); 1200 1201 var totalpercent = Math.Round((from nd in dataXML.Descendants("percent") 1202 select Double.Parse(nd.Value, format)).Sum(), 0).ToString(); 1203 1204 var details = from dat in dataXML.Descendants("Item") 1205 select new 1206 { 1207 material = dat.Element("material").Value, 1208 //weight = dat.Element("kg").Value,// string.Format("{0:0.00}", Double.Parse(dat.Element("kg").Value)), Occasionally throwing format errors 1209 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 1210 percent = Math.Round(Double.Parse(dat.Element("percent").Value, format), 1).ToString() // string.Format("{0:0.00}", Double.Parse(dat.Element("percent").Value)) 1211 }; 1212 1213 <table class="table"> 1214 <thead> 1215 <tr> 1216 <th scope="col">@GetString("Ecom:Product:Field.Material.Name")</th> 1217 <th scope="col">kg</th> 1218 <th scope="col">&#37;</th> 1219 </tr> 1220 </thead> 1221 1222 <tbody> 1223 1224 @foreach (var item in details) 1225 { 1226 <tr> 1227 <td>@item.material</td> 1228 <td>@item.weight</td> 1229 <td>@item.percent</td> 1230 </tr> 1231 } 1232 1233 1234 1235 </tbody> 1236 1237 <tfoot> 1238 <tr> 1239 <td>&nbsp;</td> 1240 <td><strong>@totalweight kg</strong></td> 1241 <td><strong>@totalpercent&#37;</strong></td> 1242 </tr> 1243 </tfoot> 1244 </table> <!--! #table-materials --> 1245 } 1246 } 1247 1248 } 1249 </div> 1250 </div> 1251 </div> 1252 </section> 1253 } 1254 @if (imagesCount + brochCount < assets.Count()) 1255 { 1256 1257 1258 } 1259 1260 @helper renderAccordianPanel(List<ProductAsset> assetList, string assetType, string translationTitle, string fallbackTitle, string extraContent = "", string productNumber = "") 1261 { 1262 1263 <section class="accordian print-hide"> 1264 <div class="wrapper"> 1265 <h3> 1266 <button id="accordian-downloads-@assetType" 1267 aria-expanded="true" aria-controls="accordian-panel-downloads-@assetType" type="button" class="accordian__button" 1268 data-action-page="Product" 1269 data-action-type="Text block expand" 1270 data-action-label="@translationTitle" 1271 data-action-value="@productNumber"> 1272 @Translate(translationTitle, fallbackTitle) 1273 <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> 1274 <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> 1275 </button> 1276 </h3> 1277 1278 1279 <div class="accordian__panel" id="accordian-panel-downloads-@assetType"> 1280 <div class="accordian__content"> 1281 <ul class="downloads__list"> 1282 @foreach (ProductAsset asset in assetList) 1283 { 1284 <li> 1285 <a href="@asset.uri" download="@asset.FileName"> 1286 <span>@asset.FileName</span> 1287 </a> 1288 </li> 1289 } 1290 </ul> 1291 1292 @extraContent 1293 </div> 1294 </div> 1295 1296 </div> 1297 </section> 1298 1299 } 1300 1301 @* Certificates *@ 1302 1303 @{ 1304 1305 List<ProductAsset> certAssets = assets.Where(n => n.Index == AssetTypeEnum.ToFriendlyAssetName(AssetType.Certificates)).ToList(); 1306 1307 // Test if we have a filename like "GB_UniMini_1_A-F_1137_Cert_T�V". If so move it to the top of the subset so it shows first in the list. 1308 int index = certAssets.FindIndex(n => n.FileName.Contains("_Cert_T")); 1309 if(index > -1) 1310 { 1311 ProductAsset aTuv = certAssets[index]; 1312 certAssets[index] = certAssets[0]; 1313 certAssets[0] = aTuv; 1314 } 1315 } 1316 1317 @if (certAssets.Count > 0) 1318 { 1319 @renderAccordianPanel(certAssets, "certificates", "Certificates", "Certificates", "", productNumber) 1320 } 1321 1322 @* Assembly Instructions *@ 1323 1324 @{ 1325 List<ProductAsset> assemblyAssets = new List<ProductAsset>(); 1326 assemblyAssets = assets.Where(n => n.Index == AssetTypeEnum.ToFriendlyAssetName(AssetType.AssemblyInstructions)).ToList(); 1327 } 1328 1329 @if (assemblyAssets.Count > 0) 1330 { 1331 string extraContent = "<button class=\"productDownloadButton download btn btn--outline\" name=\"download\" data-parent=\"Monteringsanvisningar\""; 1332 extraContent += " data-productnumber=\"" + productNumber + "\" data-productname=\"" + GetString("Ecom:Product.Name") + "\">"; 1333 extraContent += Translate("DownloadInstallationGuides", "Installation Guides") + "</button>"; 1334 1335 @renderAccordianPanel(assemblyAssets, "install-guides", "InstallationGuides", "Installation Guides", extraContent, productNumber) 1336 } 1337 1338 @{ 1339 // add relatedProductsAssemblyInstructions to product assemblyAssets and store to session. Used in UsersProductCollection.GetAssets for the product 1340 assemblyAssets.AddRange(relatedProductsAssemblyInstructions); 1341 SessionManager.SetSession(productNumber + "_" + AssetType.AssemblyInstructions.ToFriendlyAssetName(), new List<ProductAsset>(assemblyAssets)); 1342 } 1343 1344 @* Detailed Assembly Instructions *@ 1345 1346 @{ 1347 // add relatedProductsAssemblyInstructions to product assemblyAssets and store to session. Used in UsersProductCollection.GetAssets for the product 1348 assemblyAssets.AddRange(relatedProductsAssemblyInstructions); 1349 SessionManager.SetSession(productNumber + "_" + AssetType.AssemblyInstructions.ToFriendlyAssetName(), new List<ProductAsset>(assemblyAssets)); 1350 } 1351 1352 @if (relatedProductsAssemblyInstructions.Count > 0) 1353 { 1354 1355 @renderAccordianPanel(relatedProductsAssemblyInstructions, "detail-guides", "DetailedInstallationGuides", "Detailed Installation Guides", "", productNumber) 1356 } 1357 1358 1359 @{ 1360 List<ProductAsset> inspAssets = new List<ProductAsset>(); 1361 //inspAssets = FileSystem.GetPdfFilesFromDirectoryBySiteCulture("/Files/System/ProductCollectionDownloads/InspectionMaintenance", "_" + currentlanguage.ToUpper()); 1362 inspAssets = FileSystem.GetAllPdfFilesFromDirectory("/Files/System/ProductCollectionDownloads/InspectionMaintenance"); 1363 } 1364 1365 @if (inspAssets != null && inspAssets.Count > 0) 1366 { 1367 @renderAccordianPanel(inspAssets, "insp-maintenance", "InspectionMaintenance", "Inspection & Maintenance", "", productNumber) 1368 } 1369 else 1370 { 1371 <section class="accordian print-hide"> 1372 <div class="wrapper"> 1373 <h3> 1374 <button id="accordian-downloads-insp-maintenance" 1375 aria-expanded="true" aria-controls="accordian-panel-downloads-insp-maintenance" 1376 type="button" class="accordian__button" 1377 data-action-page="Product" 1378 data-action-type="Text block expand" 1379 data-action-label="InspectionMaintenance" 1380 data-action-value="@productNumber"> 1381 @Translate("InspectionMaintenance", "Inspection & Maintenance") 1382 <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> 1383 <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> 1384 </button> 1385 </h3> 1386 1387 1388 <div class="accordian__panel" id="accordian-panel-downloads-insp-maintenance"> 1389 <div class="accordian__content"> 1390 <ul class="downloads__list"> 1391 <li> 1392 <a href="/Files/System/ProductCollectionDownloads/InspectionMaintenance/Playground Equipment I&M guide_EN.pdf" download="Playground Equipment I&M Guide"> 1393 <span>Playground Equipment I&M Guide</span> 1394 </a> 1395 </li> 1396 <li> 1397 <a href="/Files/System/ProductCollectionDownloads/InspectionMaintenance/Sports and fitness I&M guide_EN.pdf" download="Sports and Fitness I&M Guide"> 1398 <span>Sports and Fitness I&M Guide</span> 1399 </a> 1400 </li> 1401 </ul> 1402 </div> 1403 </div> 1404 1405 </div> 1406 </section> 1407 } 1408 1409 @{ 1410 List<ProductAsset> dwgAssets = new List<ProductAsset>(); 1411 dwgAssets = assets.Where(n => n.Index == AssetTypeEnum.ToFriendlyAssetName(AssetType.Drawings)).ToList(); 1412 } 1413 1414 @if (dwgAssets.Count > 0) 1415 { 1416 @renderAccordianPanel(dwgAssets, "dwgs", "DWGFiles", "DWG Files", "", productNumber) 1417 } 1418 1419 1420 <section class="accordian print-hide"> 1421 <div class="wrapper"> 1422 <h3> 1423 <button id="accordian-downloads-general-info" 1424 aria-expanded="true" aria-controls="accordian-panel-downloads-general-info" 1425 type="button" class="accordian__button" 1426 data-action-page="Product" 1427 data-action-type="Text block expand" 1428 data-action-label="GeneralDownloads" 1429 data-action-value="@productNumber"> 1430 @Translate("GeneralInformation", "General Information") 1431 <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> 1432 <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> 1433 </button> 1434 </h3> 1435 1436 1437 <div class="accordian__panel" id="accordian-panel-downloads-general-info"> 1438 1439 <div class="accordian__content"> 1440 1441 <ul class="downloads__list"> 1442 @*@if (thisPage.AreaID == 2) 1443 {*@ 1444 <li> 1445 <a href="Files/System/ProductCollectionDownloads/General Information/hags-general-info_SE.pdf" download="" target="_blank"> 1446 <span>@Translate("GeneralInformation", "General Information") (SE)</span> 1447 </a> 1448 </li> 1449 <li> 1450 <a href="Files/System/ProductCollectionDownloads/General Information/hags-technical-specs_SE.pdf" download="" target="_blank"> 1451 <span>@Translate("TechnicalInformation", "Technical Information") (SE)</span> 1452 </a> 1453 </li> 1454 @*} 1455 else 1456 {*@ 1457 <li> 1458 <a href="Files/System/ProductCollectionDownloads/General Information/hags-general-info_EN.pdf" download="" target="_blank"> 1459 <span>@Translate("GeneralInformation", "General Information") (EN)</span> 1460 </a> 1461 </li> 1462 <li> 1463 <a href="Files/System/ProductCollectionDownloads/General Information/hags-technical-specs_EN.pdf" download="" target="_blank"> 1464 <span>@Translate("TechnicalInformation", "Technical Information") (EN)</span> 1465 </a> 1466 </li> 1467 @*}*@ 1468 </ul> 1469 1470 </div> 1471 </div> 1472 1473 </div> 1474 </section> 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 <section class="accordian de"> 1487 <div class="wrapper"> 1488 <h3> 1489 <button id="accordian-materials" aria-expanded="true" aria-controls="accordian-materials-panel" type="button" class="accordian__button"> 1490 Tender Text Request Form 1491 <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> 1492 <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> 1493 </button> 1494 </h3> 1495 <div class="accordian__panel" id="accordian-materials-panel"> 1496 <div class="accordian__content tender-request" style="padding-top: 16px;"> 1497 <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='0e3ca2f4f76893915d0d24ec4bc71d08';e.elements['_sys_to_email'].value='';e.setAttribute('action', '/Default.aspx?ID=20062&amp;PID=139268');return true};return s(this);"> 1498 <input type="hidden" name="FormPID" value="139268"> 1499 <input type="hidden" name="FormID" value="48"> 1500 <input type="hidden" name="cmd" value="save"> 1501 <input type="hidden" name="_sys_to_email" value="info@hags.de" autocomplete="off"> 1502 <input type="hidden" name="FormCH1_h" value="" autocomplete="off"> 1503 <input type="hidden" name="FormCH1_f" value="64fcc853b5c7478097280b67d065e694" autocomplete="off"> 1504 <input type="hidden" name="FormCH1_s" value="ac65472af0eb2581e97b947e60408928" autocomplete="off"> 1505 <input type="hidden" name="FormCH1_i" value="3a190d1966f97696309b9461697e097b" autocomplete="off"> 1506 <input type="hidden" name="0e3ca2f4f76893915d0d24ec4bc71d08ts" value="wBhHOlLaouZU87nvwuTxWu29X6MBr7WK" style="display:none!important" autocomplete="off"> 1507 <input type="text" name="0e3ca2f4f76893915d0d24ec4bc71d08description" value="" style="display:none!important" autocomplete="off"> 1508 <input type="text" name="0e3ca2f4f76893915d0d24ec4bc71d08email" value="mrssmith@dynamicweb.com" style="display:none!important" autocomplete="off"> 1509 <table class="formtable"> 1510 <tbody> 1511 <tr class="labelRow" style="padding-bottom:12px;display:block;"> 1512 <td class="labelCell"> 1513 <p>Complete form form below to request the the relevant product tender text</p> 1514 </td> 1515 </tr> 1516 <tr class="labelRow"> 1517 <td class="labelCell"> 1518 <label for="ArticleNumber"><h6>Article Number: @productNumber</h6></label> 1519 </td> 1520 </tr> 1521 <tr class="labelRow"> 1522 <td class="labelCell"> 1523 <label for="FirstName">First Name </label> 1524 </td> 1525 </tr> 1526 <tr class="fieldRow"> 1527 <td> 1528 <input type="text" id="FirstName" name="FirstName" required="" /></td> 1529 </tr> 1530 <tr class="descriptionRow"> 1531 <td class="descriptionCell"><small></small></td> 1532 </tr> 1533 <tr class="labelRow"> 1534 <td class="labelCell"> 1535 <label for="LastName">Last Name </label> 1536 </td> 1537 </tr> 1538 <tr class="fieldRow"> 1539 <td><input type="text" id="LastName" name="LastName" required="" /></td> 1540 </tr> 1541 <tr class="descriptionRow"> 1542 <td class="descriptionCell"><small></small></td> 1543 </tr> 1544 <tr class="labelRow"> 1545 <td class="labelCell"> 1546 <label for="Email">Email </label> 1547 </td> 1548 </tr> 1549 <tr class="fieldRow"> 1550 <td><input type="email" id="Email" name="Email" required="" /></td> 1551 </tr> 1552 <tr class="descriptionRow"> 1553 <td class="descriptionCell"><small></small></td> 1554 </tr> 1555 <tr class="labelRow"> 1556 <td class="labelCell"> 1557 <label for="Company">Company </label> 1558 </td> 1559 </tr> 1560 <tr class="fieldRow"> 1561 <td><input type="text" id="Company" name="Company" required="" /></td> 1562 </tr> 1563 <tr class="descriptionRow"> 1564 <td class="descriptionCell"><small></small></td> 1565 </tr> 1566 <tr class="labelRow"> 1567 <td class="labelCell"> 1568 <label for="Adress">Adress </label> 1569 </td> 1570 </tr> 1571 <tr class="fieldRow"> 1572 <td><input type="text" id="Adress" name="Adress" required="" /></td> 1573 </tr> 1574 <tr class="descriptionRow"> 1575 <td class="descriptionCell"><small></small></td> 1576 </tr> 1577 <tr class="labelRow"> 1578 <td class="labelCell"> 1579 <label for="Postcode">Postcode</label> 1580 </td> 1581 </tr> 1582 <tr class="fieldRow"> 1583 <td><input type="text" id="Postcode" name="Postcode" required="" /></td> 1584 </tr> 1585 <tr class="descriptionRow"> 1586 <td class="descriptionCell"><small></small></td> 1587 </tr> 1588 <tr class="labelRow"> 1589 <td class="labelCell"> 1590 <label for="ArticleNumber">Article Number </label> 1591 </td> 1592 </tr> 1593 <tr class="fieldRow"> 1594 <td style="width:100%;display:block;"><input type="text" id="ArticleNumber" name="ArticleNumber" value="@productNumber" style="width:100%;display:block;"></td> 1595 </tr> 1596 <tr class="descriptionRow"> 1597 <td class="descriptionCell"><small></small></td> 1598 </tr> 1599 <tr class="fieldRow"> 1600 <td><input type="submit" id="SendRequest" name="SendRequest" value="Submit" class="submit" /></td> 1601 </tr> 1602 <tr class="descriptionRow"> 1603 <td class="descriptionCell"><small></small></td> 1604 </tr> 1605 </tbody> 1606 </table> 1607 <input type="hidden" name="SendRequest" value="Submit" /> 1608 </form> 1609 </div> 1610 </div> 1611 </div> 1612 </section> 1613 @*IncludeFile("partials/add-to-collection.cshtml")*@ 1614 </div> 1615 1616 </div> 1617 </div> 1618 </section> 1619 1620 <script type="text/javascript"> 1621 var __ss_noform = __ss_noform || []; 1622 __ss_noform.push(['baseURI', 'https://app-3QNUK2ISME.marketingautomation.services/webforms/receivePostback/MzawMLE0MzQ3BgA/']); 1623 __ss_noform.push(['endpoint', 'f1f4eefa-cc8e-4621-a197-e153223a10a6']); 1624 </script><script type="text/javascript" src="https://koi-3QNUK2ISME.marketingautomation.services/client/noform.js?ver=1.24" ></script> 1625 1626 <div class="center-copy contact"> 1627 1628 @if (!String.IsNullOrEmpty(salesPhoneNumber)) 1629 { 1630 string contactUsLink = DWUtilities.GetPageByNavigationTag("ContactUs", thisPage.AreaID); 1631 <p class="print-hide call-out"><span>@Translate("ContactUs", "Contact Us") <a href="@contactUsLink">@Translate("ContactForm", "Contact Form")</a></span></p> 1632 } 1633 </div> 1634 1635 1636 1637 <form id="product-hidden-fields"> 1638 <input type="hidden" id="productVariantId" value="@GetString("Ecom:Product.VariantID")"> 1639 <input type="hidden" id="productCollectionData" value="@collectionData"> 1640 </form> 1641 1642 1643 <section class="print-hide flow section-bg-light products-variants"> 1644 1645 @if (GetLoop("VariantCombinations").Count() > 0) 1646 { 1647 <div class="wrapper flow"> 1648 <h5>@Translate("ProductOptions", "Product Options") (<span id="resultCount">@GetLoop("VariantCombinations").Count()</span>)</h5> 1649 1650 1651 <form class="form-inline"> 1652 <div id="filter-variants" class="cluster"> 1653 1654 @if (anchoringOptions.Results.Count() > 0) 1655 { 1656 <div class="form-group"> 1657 <label for="anchoring" class="control-label">@Translate("Anchoring", "Anchoring")</label> 1658 <select class="form-control variant-filter" id="filter-anchoring" name="anchoring" 1659 data-action-page="product" data-action-type="Variant filter" 1660 data-action-label="Anchoring" data-action-value="@productNumber"> 1661 1662 @if (anchoringOptions.Results.Count() > 1) 1663 { 1664 <option value="any">@Translate("Any", "Any")</option> 1665 foreach (var anchor in anchoringOptions.Results.OrderBy(n => n.Sort)) 1666 { 1667 <option value="@anchor.Value">@anchor.Name</option> 1668 } 1669 } 1670 else 1671 { 1672 ResultField result = anchoringOptions.Results.FirstOrDefault(); 1673 <option value="any">@Translate("Any", "Any")</option> 1674 <option value="@result.Value">@result.Name</option> 1675 } 1676 1677 </select> 1678 </div> 1679 } 1680 1681 @if (colourOptions.Results.Count() > 0) 1682 { 1683 <div class="form-group"> 1684 <label for="colour" class="control-label">@Translate("Colour", "Colour")</label> 1685 <select class="form-control variant-filter" id="filter-colour" name="colour" 1686 data-action-page="product" data-action-type="Variant filter" 1687 data-action-label="Colour" data-action-value="@productNumber"> 1688 1689 @if (colourOptions.Results.Count() > 1) 1690 { 1691 <option value="any">@Translate("Any", "Any")</option> 1692 foreach (var colour in colourOptions.Results.OrderBy(n => n.Sort)) 1693 { 1694 <option value="@colour.Value">@colour.Name</option> 1695 } 1696 } 1697 else 1698 { 1699 ResultField result = colourOptions.Results.FirstOrDefault(); 1700 <option value="@result.Value">@result.Name</option> 1701 } 1702 </select> 1703 </div> 1704 } 1705 1706 @if (optionOptions.Results.Count() > 0) 1707 { 1708 <div class="form-group"> 1709 <label for="options" class="control-label">@Translate("ProductOptions", "Product Options")</label> 1710 <select class="form-control variant-filter" id="filter-options" name="options" 1711 data-action-page="product" data-action-type="Variant filter" 1712 data-action-label="Options" data-action-value="@productNumber"> 1713 1714 @if (optionOptions.Results.Count() > 1) 1715 { 1716 <option value="any">@Translate("Any", "Any")</option> 1717 foreach (var option in optionOptions.Results.OrderBy(n => n.Sort)) 1718 { 1719 <option value="@option.Value">@option.Name</option> 1720 } 1721 } 1722 else 1723 { 1724 ResultField result = optionOptions.Results.FirstOrDefault(); 1725 <option value="@result.Value">@result.Name</option> 1726 } 1727 </select> 1728 </div> 1729 } 1730 1731 </div> 1732 </form> 1733 1734 1735 </div> 1736 1737 <div class="wrapper"> 1738 <div class="grid" id="variants-list"> 1739 1740 @foreach (LoopItem variantCombinations in GetLoop("VariantCombinations")) 1741 { 1742 var colourOption = string.Empty; 1743 var optionOption = string.Empty; 1744 var anchorOption = string.Empty; 1745 var materialOption = string.Empty; 1746 var colourId = string.Empty; 1747 var optionId = string.Empty; 1748 var anchorId = string.Empty; 1749 var materialId = string.Empty; 1750 var selectedVariant = string.Empty; 1751 List<ProductAsset> productImages = AssetManager_Repository.GetAssets(variantCombinations.GetString("Ecom:VariantCombination.Product.Number"), AssetType.Images, false); 1752 ProductAsset image = productImages.Where(n => n.Index == AssetTypeEnum.ToFriendlyAssetName(AssetType.Images) && n.FileName.StartsWith("medium_")).FirstOrDefault(); 1753 1754 foreach (var group in GetLoop("VariantGroups").Where(n => n.GetString("Ecom:VariantGroup.ID") != "D")) 1755 { 1756 foreach (var availableOption in group.GetLoop("VariantAvailableOptions")) 1757 { 1758 if (group.GetString("Ecom:VariantGroup.ID") == "S55") 1759 { 1760 1761 if (variantCombinations.GetString("Ecom:VariantCombination.VariantID").Contains(availableOption.GetString("Ecom:VariantOption.ID")) && availableOption.GetString("Ecom:VariantOption.Name") != "Not applicable") 1762 { 1763 colourOption = availableOption.GetString("Ecom:VariantOption.Name"); 1764 colourId = availableOption.GetString("Ecom:VariantOption.ID"); 1765 } 1766 1767 } 1768 if (group.GetString("Ecom:VariantGroup.ID") == "ATP1") 1769 { 1770 if (variantCombinations.GetString("Ecom:VariantCombination.VariantID").Contains(availableOption.GetString("Ecom:VariantOption.ID")) && availableOption.GetString("Ecom:VariantOption.Name") != "Not applicable") 1771 { 1772 materialOption = availableOption.GetString("Ecom:VariantOption.Name"); 1773 materialId = availableOption.GetString("Ecom:VariantOption.ID"); 1774 } 1775 } 1776 if (group.GetString("Ecom:VariantGroup.ID") == "ATP3") 1777 { 1778 if (variantCombinations.GetString("Ecom:VariantCombination.VariantID").Contains(availableOption.GetString("Ecom:VariantOption.ID")) && availableOption.GetString("Ecom:VariantOption.Name") != "Not applicable") 1779 { 1780 anchorOption = availableOption.GetString("Ecom:VariantOption.Name"); 1781 anchorId = availableOption.GetString("Ecom:VariantOption.ID"); 1782 } 1783 } 1784 if (group.GetString("Ecom:VariantGroup.ID") == "ATP4") 1785 { 1786 if (variantCombinations.GetString("Ecom:VariantCombination.VariantID").Contains(availableOption.GetString("Ecom:VariantOption.ID")) && availableOption.GetString("Ecom:VariantOption.Name") != "Not applicable") 1787 { 1788 optionOption = availableOption.GetString("Ecom:VariantOption.Name"); 1789 optionId = availableOption.GetString("Ecom:VariantOption.ID"); 1790 } 1791 } 1792 if (variantCombinations.GetBoolean("Ecom:VariantCombination.Selected")) 1793 { 1794 selectedVariant = "selected-variant"; 1795 } 1796 } 1797 1798 } 1799 1800 <div class="product-card @selectedVariant" data-filter-colour="@colourId" data-filter-anchoring="@anchorId" data-filter-options="@optionId"> 1801 1802 <div class="product-card__img-silo"> 1803 @if (image != null && !String.IsNullOrEmpty(image.uri)) 1804 { 1805 <a href="@variantCombinations.GetString("Ecom:VariantCombination.Link.Clean")"><img src="@image.uri" class="product-card__img" /></a> 1806 } 1807 else 1808 { 1809 <img src="/Files/Templates/Designs/HagsCore/res/img/image-not-found.png" class="product-card__img" /> 1810 } 1811 </div> 1812 1813 1814 <div class="product-card__copy"> 1815 1816 @if (thisPage.AreaID == 7) /*UK*/ 1817 { 1818 string ukId = ProductFieldValues.GetUkProductNumber(variantCombinations.GetString("Ecom:VariantCombination.Product.Number"), thisPage.Area.EcomLanguageId); 1819 <h5 class="product-card__heading"><a href="@variantCombinations.GetString("Ecom:VariantCombination.Link.Clean")">@ukId.ToString()</a></h5> 1820 } 1821 else 1822 { 1823 <h5 class="product-card__heading"><a href="@variantCombinations.GetString("Ecom:VariantCombination.Link.Clean")">@variantCombinations.GetString("Ecom:VariantCombination.Product.Number")</a></h5> 1824 } 1825 1826 <p>@optionOption @colourOption - @anchorOption</p> 1827 1828 <!--<a class="" href="@variantCombinations.GetString("Ecom:VariantCombination.Link.Clean")" role="button">@Translate("ProductDetails", "Product Details")</a>--> 1829 </div> 1830 </div> 1831 1832 } 1833 </div> 1834 1835 <div class="m-message" style="display:none;padding-bottom:20px;padding-left:6px;"> 1836 <p style="font-size: 1.2em;color:red;"><b>@Translate("VariantFilterMessage", "There were no options available for selection.")</b></p> 1837 </div> 1838 </div> 1839 1840 } 1841 </section> 1842 1843 @*IncludeFile("partials/related-products.cshtml")*@ 1844 1845 1846 1847 1848 1849 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 1850 @using System.Collections.Generic 1851 @using HagsWeb.Library.BusinessObjects.UsersLists 1852 1853 @{ 1854 Layout = null; 1855 } 1856 <dialog id="CreateProductPdf" class="modal modal--full"> 1857 1858 <div class="modal__body"> 1859 1860 <div class="modal__header"> 1861 1862 <div class="modal__close"> 1863 <button type="button" class="action-btn js-modal-close-target" data-target-id="CreateProductPdf"> 1864 <span class="visually-hidden">Close</span> 1865 <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> 1866 </button> 1867 </div> 1868 1869 1870 <h4 class="modal-title" id="CreateCatalogModalLabel"> 1871 @Translate("YourProductSheet", "Your Product Sheet") 1872 </h4> 1873 1874 </div> 1875 1876 <div class="modal__main"> 1877 1878 <div id="div_CreateCatalog" class="modal__product-pdf"> 1879 1880 <div id="pdfwaiting" style="display:block;text-align:center"> 1881 <span id="CreateProductPdfLabel" style="display: inline-block;margin: 10px 10px 0 0;padding: 5px 10px"></span> 1882 <img src="Files/Templates/Designs/HagsCore/res/img/loader/ajax-loader.gif" style="margin:auto;display:block;" /> 1883 </div> 1884 1885 <div id="productPdfViewerloader" class="modal__embed-silo"> 1886 </div> 1887 1888 <div id="CreatePdfMessage"></div> 1889 </div> 1890 1891 1892 </div> 1893 1894 <div class="modal__footer"> 1895 1896 <div class="m-search-advanced-buttons cluster cluster--dialog"> 1897 <a href="" class="btn btn--outline" id="pdfPrintSheet" target="_blank" type="button">@Translate("Print", "Print")</a> 1898 <a href="" class="btn btn--outline" id="pdfDownloadSheet" download type="button">@Translate("Download", "Download")</a> 1899 <button class="btn btn--outline js-modal-close-target" data-target-id="CreateProductPdf" type="button">@Translate("Close", "Close")</button> 1900 </div> 1901 1902 </div> 1903 1904 </div> 1905 1906 </dialog> 1907 @*ProductPdfHelper(productCollectionItems, GetString("Ecom:Product.LanguageID"))*@ 1908 1909

      Záruky

      Zjistěte, co se na vás vztahuje.

      Průvodce údržbou

      Jak se starat o své výrobky.

      Možnosti barev a ukotvení

      Prozkoumejte své možnosti.

      }