Search Advanced Close

To find product downloads simply click on one of the options above and then use the search form displayed to find all the documents associated with your search.

 

Search Advanced Close

To add products to your collection, simply search for products, click 'product details' and from the product page select 'add to my collection'. This can be found either within the product options panel or below the product image.

Search Advanced Close

Play for all at El Prat de Llobregat, Barcelona

HAGS has chosen a selection of inclusive and accessible playground equipment that will cater for a large number of users and for children with different abilities.

12/10/2019 2:43:00 PM

Case Study Details

Nature Inspired Inclusive Playground, Australia

The new nature-based playground at the Bundaberg Botanic Gardens in Australia has won the State Award for Best Playscape Award (under $500,000) in the Park and Leisure Australia Awards of Excellence program. This now progresses through the national award finals to be decided in October 2019.

6/14/2019 11:38:00 AM

Case Study Details

Sports Area for Solvang School, Denmark

The Solvang School in Denmark wanted to maximise their outdoor space by providing their students an area for sporting activity, where students can play multiple games at the same time.

5/30/2019 12:51:00 PM

Case Study Details

Get more inspiration from other installations all around the world

View All Case Studies
Search Advanced Close
Error executing template "Designs/HagsCore/eCom/Product/Product.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
   at CompiledRazorTemplates.Dynamic.RazorEngine_a33e0321a6214252bc1686e05f94a166.Execute() in C:\Projects\Hags_Dw9\Files\Templates\Designs\HagsCore\eCom\Product\Product.cshtml:line 216
   at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader)
   at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.b__0(TextWriter writer)
   at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()

1 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 2 @using System; 3 @using System.Collections.Generic; 4 @using System.Linq; 5 @using System.Web.Optimization; 6 @using System.Collections.Generic; 7 @using Dynamicweb.Content.Items; 8 @using Dynamicweb.Ecommerce.Products; 9 @using Dynamicweb.Ecommerce.Variants; 10 @using HagsCustomModules; 11 @using HagsWeb.Library.Methods.AssetManager; 12 @using HagsWeb.Library.Methods.ProductFilter; 13 @using HagsWeb.Library.BusinessObjects.UsersLists; 14 @using HagsWeb.Library.Methods.AssetSearch; 15 @using HagsWeb.Library.Utilities; 16 @using HagsWeb.Library.State; 17 18 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 19 @using Dynamicweb.Rendering; 20 @using System; 21 @using System.Web; 22 @using System.Collections.Generic; 23 @using System.Linq; 24 @using Ionic.Zip; 25 @using System.IO; 26 @using System.Threading; 27 28 29 @helper GetButton(List<string> files, string sender) 30 { 31 var request = HttpContext.Current.Request.Form; 32 var response = HttpContext.Current.Response; 33 34 if (!string.IsNullOrEmpty(request["DownloadImages"])) 35 { 36 // Currently only used for Product Image download on results page - see also GetDownload.cshtml 37 // To do KOD extract this into a service in Library, also consider Hags\Application\Ajax\UsersProductCollection\UsersProductCollection.aspx.cs(398) 38 if (files.Any()) 39 { 40 try 41 { 42 43 var zipArchives = System.Web.HttpContext.Current.Server.MapPath("Files/System/UserDownloads/Zips"); 44 var transferFolder = System.Web.HttpContext.Current.Server.MapPath("Files/System/UserDownloads/Transfers"); 45 46 // empty the zipArchives folder of zips that are 30 mins old (if any) 47 var oldZips = new DirectoryInfo(zipArchives).EnumerateFiles() 48 .Where(f => f.CreationTime < DateTime.Now.AddMinutes(-30)) 49 .ToList(); 50 oldZips.ForEach(f => f.Delete()); 51 52 DirectoryInfo Folder = new DirectoryInfo(transferFolder); 53 // Occasionally some files are read only and cannot be deleted so change all files, remove readonly before the delete 54 Folder.EnumerateFiles().ToList().ForEach(file => file.Attributes = FileAttributes.Normal); 55 Directory.EnumerateFiles(transferFolder).ToList().ForEach(f => System.IO.File.Delete(f)); 56 57 // copy the selected files to the transferFolder and change from ReadOnly to try to prevent access to the path is denied error 58 files.ForEach(f => System.IO.File.Copy(f, Path.Combine(transferFolder, Path.GetFileName(f)), true)); 59 Folder.EnumerateFiles().ToList().ForEach(file => file.Attributes = FileAttributes.Normal); 60 61 // Set up our new zip folder 62 var downloadFileName = string.Format("Hags_Download_Pack-{0}.zip", DateTime.Now.ToString("dd-MM-yyyy-HH_mm_ss")); 63 64 //var zipLocationUrl = "Files/System/UserDownloads/Zips/" + downloadFileName; // Use this to return a link to the folder saved to disk 65 66 HttpContext.Current.Response.ContentType = "application/x-zip-compressed"; // Important - as is AppendHeader, not AddHeader 67 HttpContext.Current.Response.AppendHeader("Content-Disposition", "filename=" + downloadFileName); 68 69 using (var zip = new ZipFile()) 70 { 71 List<string> fileList = Directory.EnumerateFiles(transferFolder).ToList(); 72 //zip.AddDirectoryByName(subfolderName); 73 foreach (string file in fileList) 74 { 75 zip.AddFile(file, string.Empty); 76 } 77 78 // Save to the OutputStream 79 zip.Save(HttpContext.Current.Response.OutputStream); 80 // Or save the file to the file system using TransmitFile to stream the file without storing to memory 81 //zip.Save(zipArchives + "/" + downloadFileName); 82 } 83 84 // Transmit a file that was created on disk 85 //HttpContext.Current.Response.ContentType = "application/x-zip-compressed"; 86 //HttpContext.Current.Response.AppendHeader("Content-Disposition", "filename=" + downloadFileName); 87 //HttpContext.Current.Response.TransmitFile(zipArchives + "/" + downloadFileName); 88 89 90 91 } 92 catch (ZipException ze) 93 { 94 string message = ze + "ProductDownload/GetDownloadButton.cshtml ZipException download file error (" + sender + ") - Original File Count: " + files.Count() + "InnerEx: " + ze.InnerException + ""; 95 Dynamicweb.Logging.ILogger log = Dynamicweb.Logging.LogManager.Current.GetLogger("File Download Service"); 96 log.Info(message); 97 } 98 catch (System.IO.FileNotFoundException notFoundEx) 99 { 100 string message = notFoundEx + "../Templates/HagsModules/UsersAssetsSearch/ProductDownloads/GetDownloadButton.cshtml (" + sender + ") " + notFoundEx.Message + " - The File: " + notFoundEx.FileName +""; 101 Dynamicweb.Logging.ILogger log = Dynamicweb.Logging.LogManager.Current.GetLogger("File Download Service"); 102 log.Info(message); 103 } 104 catch (ThreadAbortException) 105 { 106 // A normal Thread abort after HttpContext.Current.Response.End(); we dont record it 107 } 108 catch (Exception ex) 109 { 110 string message = ex + "../Templates/HagsModules/UsersAssetsSearch/ProductDownloads/GetDownloadButton.cshtml (" + sender + ") " + ex.Message + " - The Inner Ex: " + ex.InnerException + ""; 111 Dynamicweb.Logging.ILogger log = Dynamicweb.Logging.LogManager.Current.GetLogger("File Download Service"); 112 log.Info(message); 113 } 114 finally 115 { 116 HttpContext.Current.Response.End(); 117 } 118 119 } 120 } 121 else 122 { 123 string buttonCaption = string.Empty; 124 if (sender == "Product") 125 { 126 buttonCaption = Translate("ImageDownloads", "Image Downloads"); 127 } 128 if (sender == "AdvancedSearch") 129 { 130 buttonCaption = Translate("DownloadAll", "Download All"); 131 } 132 133 <a class="m-btn-xs-more btn btn-default btn-xs text-uppercase" 134 onclick="$('#downloadImagesForm').submit(); return false;" role="button"> 135 @buttonCaption 136 </a> 137 } 138 } 139 140 @{ 141 Dynamicweb.Frontend.PageView thisPage = Dynamicweb.Frontend.PageView.Current() ?? Dynamicweb.Frontend.PageView.Current(); 142 Item areaItem = Item.GetItemById("Website_Settings", thisPage.Area.Item.Id); 143 string pageUrl = thisPage.SearchFriendlyUrl; 144 var siteSection = HagsWeb.Library.Methods.Page.HagsPages.GetSiteSection(thisPage.AreaID, thisPage.ID); 145 string salesPhoneNumber = areaItem["Telephone"].ToString(); 146 147 string productNumber = GetString("Ecom:Product.Number"); // The Product NUMBER 148 149 string currentCulture = GetGlobalValue("Global:Area.LongLang"); //en-GB, sv-SE 150 string currentCountry = currentCulture.Substring(currentCulture.Length - 2); // GB, SE 151 string currentlanguage = currentCulture.Substring(0, 2); // en, sv "de";// 152 string ipPriceAllowed = string.Empty; 153 154 if (thisPage.AreaID == 2 || thisPage.AreaID == 7) // Sweden and UK 155 { 156 ipPriceAllowed = HagsWeb.Library.Services.IPService.IPCheck.CountryPriceAllowed(currentCountry); //ZZZ,Hags_GB,Hags_SE and Hags_, Anon_GB, Anon_SE network range checker(Web.config) 157 } 158 159 IEnumerable<ProductAsset> assets = AssetManager_Repository.GetAssets(productNumber, AssetType.All, true); 160 IEnumerable<ProductAsset> allImages = assets.Where(n => n.Index == AssetTypeEnum.ToFriendlyAssetName(AssetType.Images)); 161 162 // New sorting for carouselImages, thumbs and hiResDownloads 163 Tuple<IEnumerable<ProductAsset>, IEnumerable<ProductAsset>, IEnumerable<ProductAsset>> tuple = HagsWeb.Library.Methods.ProductImages.ProductImages.MarshallImages(allImages, productNumber); 164 IEnumerable<ProductAsset> carouselImages = tuple.Item1; 165 IEnumerable<ProductAsset> thumbs = tuple.Item2; 166 IEnumerable<ProductAsset> hiResDownloads = tuple.Item3; 167 168 // The users Product Collection in session 169 List<ProductCollectionItem> productCollectionItems = SessionManager.UsersMyProductCollection != null ? SessionManager.UsersMyProductCollection : new List<ProductCollectionItem>(); 170 bool isProductCollection = productCollectionItems.Any(n => n.ProductNumber == productNumber); 171 172 // users Product Collection 173 string collectionData = string.Empty; 174 175 if (!String.IsNullOrWhiteSpace(GetGlobalValue("Global:Extranet.Name"))) 176 { 177 // not used even if logged-in collectionData = GetString("Ecom:Product.AddToList"); // only available if logged-in 178 } 179 else 180 { 181 collectionData = string.Format("CCAddToMyLists={0}&CCAddToListVariantID={1}&CCAreaID={2}&CCAddToListCulture={3}&CCAddToListLanguageID={4}#{5}", 182 GetString("Ecom:Product.Number"), GetString("Ecom:Product.VariantID"), GetGlobalValue("Global:Area.ID"), GetGlobalValue("Global:Area.LongLang"), @GetString("Ecom:Product.LanguageID"), siteSection); 183 } 184 185 // New Age Ranges. Some Template Tags dont work very well in upgraded DW version 9.7.2 186 List<string> ageRanges = HagsWeb.Library.Methods.ProductProperties.ProductAgeRanges.GetAgeRanges(GetString("Ecom:Product:Field.AgeRange"), GetString("Ecom:Product.LanguageID")); 187 188 //List<string> ageRangesB = new List<string>(); 189 //foreach (var age in GetLoop("AgeRange.Options")) 190 //{ 191 // if (age.GetBoolean("AgeRange.Option.IsSelected")) 192 // { 193 // ageRangesB.Add(age.GetString("AgeRange.Option.Name").Replace("+", "_")); 194 // } 195 //} 196 197 // For filtering the variants of this product 198 ResultSet colourOptions = new ResultSet(); 199 ResultSet materialOptions = new ResultSet(); 200 ResultSet anchoringOptions = new ResultSet(); 201 ResultSet optionOptions = new ResultSet(); 202 203 204 string selectedColourVariant = string.Empty; 205 string selectedAnchoringVariant = string.Empty; 206 string selectedAnchoringIcon = string.Empty; 207 string selectedMaterialVariant = string.Empty; 208 string selectedOptionVariant = string.Empty; 209 Product prod = new ProductService().GetProductById(GetString("Ecom:Product.ID"), GetString("Ecom:Product.VariantID"), GetString("Ecom:Product.LanguageID")); 210 string assemblyInstructionsProductNumber = productNumber; 211 212 // 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 213 // Assembly Instructions 214 if (!prod.IsVariantMaster) 215 { 216 assemblyInstructionsProductNumber = new ProductService().GetProductsAndVariantsByProduct(prod) 217 .FirstOrDefault<Product>(n => n.IsVariantMaster == true).Number; 218 } 219 220 if (GetInteger("Ecom:Product.VariantCount") > 0) 221 { 222 foreach (var variantGroup in GetLoop("VariantGroups").Where(n => n.GetString("Ecom:VariantGroup.ID") != "D")) // Remove All Date Variants 223 { 224 int optionsCount = variantGroup.GetLoop("VariantAvailableOptions").Count(); 225 226 if (optionsCount > 0) 227 { 228 if (!string.IsNullOrEmpty("Ecom:Product.SelectedVariantComboID")) // optionsCount == 1 229 { 230 foreach (var availableOption in variantGroup.GetLoop("VariantAvailableOptions")) 231 { 232 233 if (variantGroup.GetString("Ecom:VariantGroup.ID") == "S55") 234 { 235 colourOptions.Name = variantGroup.GetString("Ecom:VariantGroup.Name"); 236 237 if (availableOption.GetString("Ecom:VariantOption.Name") != "Not applicable") 238 { 239 240 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 }); 241 242 if (availableOption.GetBoolean("Ecom:VariantOption.Selected")) 243 { 244 selectedColourVariant = availableOption.GetString("Ecom:VariantOption.Name"); 245 } 246 } 247 } 248 if (variantGroup.GetString("Ecom:VariantGroup.ID") == "ATP1") 249 { 250 materialOptions.Name = variantGroup.GetString("Ecom:VariantGroup.Name"); 251 252 if (availableOption.GetString("Ecom:VariantOption.Name") != "Not applicable") 253 { 254 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 }); 255 256 if (availableOption.GetBoolean("Ecom:VariantOption.Selected")) 257 { 258 selectedMaterialVariant = availableOption.GetString("Ecom:VariantOption.Name"); 259 } 260 } 261 } 262 if (variantGroup.GetString("Ecom:VariantGroup.ID") == "ATP3") 263 { 264 anchoringOptions.Name = variantGroup.GetString("Ecom:VariantGroup.Name"); 265 266 if (availableOption.GetString("Ecom:VariantOption.Name") != "Not applicable") 267 { 268 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 }); 269 270 if (availableOption.GetBoolean("Ecom:VariantOption.Selected")) 271 { 272 selectedAnchoringVariant = availableOption.GetString("Ecom:VariantOption.Name"); 273 selectedAnchoringIcon = availableOption.GetString("Ecom:VariantOption.ID") + ".png"; 274 } 275 } 276 } 277 if (variantGroup.GetString("Ecom:VariantGroup.ID") == "ATP4") 278 { 279 optionOptions.Name = variantGroup.GetString("Ecom:VariantGroup.Name"); 280 281 if (availableOption.GetString("Ecom:VariantOption.Name") != "Not applicable") 282 { 283 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 }); 284 285 if (availableOption.GetBoolean("Ecom:VariantOption.Selected")) 286 { 287 selectedOptionVariant = availableOption.GetString("Ecom:VariantOption.Name"); 288 } 289 } 290 291 } 292 } 293 } 294 } 295 } 296 } 297 298 // Related Products and their Assembly Instructions 299 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 300 List<Product> relatedComponentProducts = new List<Product>(); 301 List<ProductAsset> relatedProductsAssemblyInstructions = new List<ProductAsset>(); 302 303 if (GetInteger("Ecom:Product.RelatedCount") > 0) 304 { 305 // Play Functions // 306 if (GetLoop("ProductRelatedGroups").Where(n => n.GetString("Ecom:Product:RelatedGroup.Name") == "Product Modules") != null) 307 { 308 relatedProducts = HagsWeb.Library.Methods.ProductFilter.ProductFilter.GetRelatedProducts(GetString("Ecom:Product.Number"), "Product Modules", GetString("Ecom:Product.LanguageID")); 309 } 310 311 if (GetLoop("ProductRelatedGroups").Where(n => n.GetString("Ecom:Product:RelatedGroup.Name") == "Product Components") != null) 312 { 313 relatedComponentProducts = HagsWeb.Library.Methods.ProductFilter.ProductFilter.GetRelatedProducts(assemblyInstructionsProductNumber, "Product Components", GetString("Ecom:Product.LanguageID")); 314 //// Lookup Assembly Instructions Assets 315 foreach (Product product in relatedComponentProducts) 316 { 317 if (product != null) 318 { 319 List<ProductAsset> productAssemblyInstructions = AssetManager_Repository.GetAssets(product.Number, AssetType.AssemblyInstructions, false); 320 if (productAssemblyInstructions.Any()) 321 { 322 List<ProductAsset> result = productAssemblyInstructions.Where(pa => !relatedProductsAssemblyInstructions.Any(pa2 => pa2.FileName == pa.FileName)).ToList(); 323 //List<ProductAsset> result = productAssemblyInstructions; 324 relatedProductsAssemblyInstructions.AddRange(result); 325 } 326 } 327 } 328 } 329 } 330 } 331 332 333 <!--Templates/Designs/HagsCore/eCom/Product/Product.cshtml--> 334 335 @Scripts.Render("~/bundle/ProductFilter") 336 337 <input type="hidden" id="productVariantId" value="@GetString("Ecom:Product.VariantID")"> 338 339 <div class="m-heading m-theme-background-yellow m-theme-color-white breadcrumb product"> 340 <div class="l-page"> 341 <div class="container-fluid"> 342 @{ 343 string breadcrumb = HagsWeb.Library.Methods.Page.HagsPages.GetThisPageNavigation(pageUrl, GetGlobalValue("Global:Area.LongLang")); 344 } 345 <div class="m-menu-primary breadcrumb"> 346 <nav class="text-centre text-uppercase"> 347 @breadcrumb 348 </nav> 349 </div> 350 351 </div> <!-- container-fluid --> 352 </div> <!-- l-page --> 353 </div> <!-- m-heading --> 354 355 <div class="l-page"> 356 <div class="container-fluid"> 357 @*<p>@ipPriceAllowed || ShopID = @GetString("Ecom:Product.DefaultShopID")</p>*@ 358 @*<p> Variant?@GetString("Ecom:Product.VariantID")</p>*@ 359 @*<p> Age Range? @GetString("Ecom:Product:Field.AgeRange")</p>*@ 360 <div class="row"> 361 <div class="col-sm-7" style="float:right;"> 362 <div class="m-product-gallery-visual-print"> 363 @foreach (ProductAsset image in carouselImages) 364 { 365 <p style="text-align:center !important;"><img src="@image.uri" class="img-responsive" alt="Masthead image" /></p> 366 } 367 </div> <!-- m-product-gallery-visual --> 368 </div> 369 370 <div class="col-sm-5"> 371 372 <h1>@GetString("Ecom:Product.Name")</h1> 373 374 @if (!string.IsNullOrWhiteSpace(GetString("Ecom:Product.ShortDescription"))) 375 { 376 <p>@GetString("Ecom:Product.ShortDescription")</p> 377 } 378 379 @if (!string.IsNullOrWhiteSpace(GetString("Ecom:Product.LongDescription"))) 380 { 381 <p>@GetString("Ecom:Product.LongDescription")</p> 382 } 383 384 <div> 385 @if (thisPage.AreaID == 7) /*UK*/ 386 { 387 @*if (!string.IsNullOrEmpty(GetString("Ecom:Product:Field.UKProductNumber"))) 388 { 389 <h3 id="displayproductnumber">@GetString("Ecom:Product:Field.UKProductNumber")</h3> 390 } 391 else 392 { 393 <h3 id="displayproductnumber">@GetString("Ecom:Product.Number")</h3> 394 }*@ 395 } 396 else if (thisPage.AreaID == 2 && GetBoolean("Ecom:Product:Field.SwedishStock")) 397 { 398 // KOD Display the Swedish stock Product Number and display the Swedish Flag 399 <div style="float:left;display:block;"> 400 <h3 id="displayproductnumber"> 401 @productNumber-1 402 </h3> 403 </div> 404 <div style="float:left;display:block;margin-top:22px;margin-left:16px;" data-toggle="tooltip" data-placement="top" title="Leverans ex lager från Sverige"> 405 <img src="/Admin/Images/Flags/flag_se.png" alt="Leverans ex lager från Sverige" style="display:block;float:left;width:24px;" /><p style="display:block;float:left; margin-left:6px;margin-top:4px;">Svenskt lager</p> 406 </div> 407 } 408 else 409 { 410 <h3 id="displayproductnumber">@productNumber</h3> 411 } 412 </div> 413 414 @*Check if its a Master product*@ 415 416 @if (!string.IsNullOrWhiteSpace(selectedColourVariant ?? selectedAnchoringVariant ?? selectedMaterialVariant ?? selectedOptionVariant)) 417 { 418 <div class="col-sm-12" style="display:block;float:left;width:100%;overflow:auto;" data-toggle="tooltip" data-placement="top" title="@Translate("Anchoring", "Anchoring"): @selectedAnchoringVariant"> 419 420 @*Display the correct icon*@ 421 @if (!string.IsNullOrEmpty(selectedAnchoringIcon)) 422 { 423 <img src="Files/Templates/Designs/HagsCore/res/img/icons/anchoring/@selectedAnchoringIcon" alt="@selectedAnchoringVariant" style="display:block;float:left;" /> 424 } 425 <p style="display:block;float:left; margin-left:12px">@selectedOptionVariant<br />@selectedColourVariant &ndash; @selectedAnchoringVariant</p> 426 </div> 427 } 428 429 @*Only UK and Sweden have Pricing at the moment*@ 430 @if (thisPage.AreaID == 2 && (ipPriceAllowed.Contains(currentCountry) || ipPriceAllowed.Contains("Hags_"))) /*Sweden - would like no ,00 in dwFormattedPrice and a message if there is no price*/ 431 { 432 string krPrice = GetInteger("Ecom:Product.DBPrice") == 0 ? Translate("RequestAQuote", "Kontakta oss") : GetString("Ecom:Product.Price.PriceFormatted").Replace(",00", ""); 433 <div style="clear:both;"><p><strong>@Translate("Price", "Price"): @krPrice</strong></p></div> 434 } 435 436 @if (thisPage.AreaID == 7) /*UK*/ 437 { 438 if (!string.IsNullOrEmpty(GetString("Ecom:Product:Field.UKProductNumber"))) 439 { 440 <p><strong>@Translate("ProductNumber", "Product Number"):</strong> @GetValue("Ecom:Product:Field.UKProductNumber")</p> 441 } 442 443 if (ipPriceAllowed.Contains(currentCountry) || ipPriceAllowed.Contains("Hags_")) 444 { 445 string ukPrice = (GetDouble("Ecom:Product:Field.UKProductPrice") == 0) ? "On Application" : "&pound;" + string.Format(new System.Globalization.CultureInfo("en-GB", false), "{0:c}", GetValue("Ecom:Product:Field.UKProductPrice")); 446 <div style="clear:both;"><p><strong>@Translate("Price", "Price"): @ukPrice</strong></p></div> 447 } 448 449 } 450 451 @if (GetInteger("Ecom:Product:Field.SafetyAreaLength.Value.Raw") > 0 && GetInteger("Ecom:Product:Field.SafetyAreaWidth.Value.Raw") > 0) 452 { 453 <div class="col-sm-6" style="display:block;float:left;width:100%;margin-top:5px;" data-toggle="tooltip" data-placement="top" title="@GetString("Ecom:Product:Field.SafetyAreaWidth.Name") x @GetString("Ecom:Product:Field.SafetyAreaLength.Name")"> 454 <img src="Files/Templates/Designs/HagsCore/res/img/icons/whtstar.png" alt="s" style="display:block;float:left;" /> 455 <p style="display:block;float:left; margin-left:12px;margin-top:3px;">@GetInteger("Ecom:Product:Field.SafetyAreaWidth.Value.Raw") x @GetInteger("Ecom:Product:Field.SafetyAreaLength.Value.Raw")</p> 456 </div> 457 } 458 459 460 <div class="col-sm-12 panel-group" style="display:block;float:left;width:100%;margin-top:18px;" id="accordion" role="tablist" aria-multiselectable="false"> 461 <div class="panel panel-default"> 462 <div class="panel-heading" role="tab" id="headingOne"> 463 <h4 class="m-panel-title panel-title"> 464 <a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseOne" aria-expanded="true" aria-controls="collapseOne" class=""> 465 @Translate("ProductSpecifications", "Product Specifications") 466 </a> 467 </h4> 468 </div> 469 <div id="collapseOne" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingOne" aria-expanded="true"> 470 <div class="panel-body"> 471 <div id="product-left"> 472 <div class="padding"> 473 474 <div id="product-list-information" class="box-padding"> 475 476 <ul> 477 478 @if (!String.IsNullOrWhiteSpace(GetString("Ecom:Product:Field.AgeRange")) && ageRanges.Any()) 479 { 480 <li><span><strong>@GetString("Ecom:Product:Field.AgeRange.Name"):</strong></span> <span>@string.Join(", ", ageRanges)</span></li> 481 } 482 @if (GetDouble("Ecom:Product:Field.AssemblyTime.Value.Raw") > 0) 483 { 484 <li><span><strong>@GetString("Ecom:Product:Field.AssemblyTime.Name"):</strong></span> <span>@Math.Ceiling(GetDouble("Ecom:Product:Field.AssemblyTime.Value.Raw")) @Translate("Hours", "hours")</span></li> 485 } 486 @if (GetDouble("Ecom:Product:Field.Length.Value.Raw") > 0) 487 { 488 <li><span><strong>@GetString("Ecom:Product:Field.Length.Name"):</strong></span> <span>@GetString("Ecom:Product:Field.Length.Value.Raw") mm</span></li> 489 } 490 @if (GetDouble("Ecom:Product:Field.Width.Value.Raw") > 0) 491 { 492 <li><span><strong>@GetString("Ecom:Product:Field.Width.Name"):</strong></span> <span>@GetString("Ecom:Product:Field.Width.Value.Raw") mm</span></li> 493 } 494 @if (GetDouble("Ecom:Product:Field.Height.Value.Raw") > 0) 495 { 496 <li><span><strong>@GetString("Ecom:Product:Field.Height.Name"):</strong></span> <span>@GetString("Ecom:Product:Field.Height.Value.Raw") mm</span></li> 497 } 498 @if (GetDouble("Ecom:Product:Field.NetWeight.Value.Raw") > 0) 499 { 500 <li><span><strong>@GetString("Ecom:Product:Field.NetWeight.Name"):</strong></span> <span>@GetString("Ecom:Product:Field.NetWeight.Value") kg</span></li> 501 } 502 @if (GetDouble("Ecom:Product:Field.Volume.Value.Raw") > 0) 503 { 504 <li><span><strong>@GetString("Ecom:Product:Field.Volume.Name"):</strong></span> <span>@GetString("Ecom:Product:Field.Volume.Value.Raw") m&#179;</span></li> 505 } 506 @if (GetDouble("Ecom:Product:Field.FallHeight.Value.Raw") > 0) 507 { 508 <li><span><strong>@GetString("Ecom:Product:Field.FallHeight.Name"):</strong></span> <span>@GetString("Ecom:Product:Field.FallHeight.Value.Raw") mm</span></li> 509 } 510 @if (GetDouble("Ecom:Product:Field.SafetyAreaWidth.Value.Raw") > 0) 511 { 512 <li><span><strong>@GetString("Ecom:Product:Field.SafetyAreaWidth.Name"):</strong></span> <span>@GetString("Ecom:Product:Field.SafetyAreaWidth.Value.Raw") mm</span></li> 513 } 514 @if (GetDouble("Ecom:Product:Field.SafetyAreaLength.Value.Raw") > 0) 515 { 516 <li><span><strong>@GetString("Ecom:Product:Field.SafetyAreaLength.Name"):</strong></span> <span>@GetString("Ecom:Product:Field.SafetyAreaLength.Value.Raw") mm</span></li> 517 } 518 @if (GetDouble("Ecom:Product:Field.SafetyArea.Value.Raw") > 0) 519 { 520 <li><span><strong>@GetString("Ecom:Product:Field.SafetyArea.Name"):</strong></span> <span>@GetDouble("Ecom:Product:Field.SafetyArea.Value") m&#178;</span></li> 521 } 522 523 </ul> 524 525 @*Anchoring from Variant*@ 526 @if (!string.IsNullOrEmpty(selectedAnchoringVariant)) 527 { 528 string anchoringPage = HagsWeb.Library.Utilities.DWUtilities.GetPageByNavigationTag("AnchoringTypes", thisPage.AreaID); 529 530 if (!string.IsNullOrEmpty(anchoringPage)) 531 { 532 <a href="@anchoringPage" class="print-hide">@Translate("ReadMoreAnchoring", "Read more about anchoring")</a> 533 } 534 535 } 536 537 </div> 538 539 </div> <!--! .padding --> 540 </div> 541 </div> 542 </div> 543 </div> 544 545 @if (!string.IsNullOrWhiteSpace(GetString("Ecom:Product:Field.Material"))) 546 { 547 <div class="panel panel-default"> 548 <div class="panel-heading" role="tab" id="headingTwo"> 549 <h4 class="m-panel-title panel-title"> 550 <a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseTwo" aria-expanded="true" aria-controls="collapseTwo" class="collapsed"> 551 @GetString("Ecom:Product:Field.Material.Name") 552 </a> 553 </h4> 554 </div> 555 <div id="collapseTwo" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingTwo" aria-expanded="true"> 556 <div class="panel-body"> 557 <div id="product-left"> 558 <div class="padding"> 559 560 561 <p>&nbsp;</p> 562 @{ 563 564 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"); 565 if (!string.IsNullOrEmpty(materialData)) 566 { 567 //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")); 568 System.Xml.Linq.XDocument dataXML = System.Xml.Linq.XDocument.Parse(materialData); 569 570 if (dataXML != null) 571 { 572 System.Globalization.NumberFormatInfo format = new System.Globalization.NumberFormatInfo(); 573 //format.NumberGroupSeparator = ","; //for thousands 574 //format.NumberDecimalSeparator = "."; //the decimal seperator 575 576 var totalweight = Math.Round((from nd in dataXML.Descendants("kg") 577 select Double.Parse(nd.Value, format)).Sum(), 0).ToString(); 578 579 var totalpercent = Math.Round((from nd in dataXML.Descendants("percent") 580 select Double.Parse(nd.Value, format)).Sum(), 0).ToString(); 581 582 var details = from dat in dataXML.Descendants("Item") 583 select new 584 { 585 material = dat.Element("material").Value, 586 //weight = dat.Element("kg").Value,// string.Format("{0:0.00}", Double.Parse(dat.Element("kg").Value)), Occasionally throwing format errors 587 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 588 percent = Math.Round(Double.Parse(dat.Element("percent").Value, format), 1).ToString() // string.Format("{0:0.00}", Double.Parse(dat.Element("percent").Value)) 589 }; 590 591 <table class="table"> 592 <thead> 593 <tr> 594 <th>@GetString("Ecom:Product:Field.Material.Name")</th> 595 <th>kg</th> 596 <th>&#37;</th> 597 </tr> 598 </thead> 599 600 <tbody> 601 602 @foreach (var item in details) 603 { 604 <tr> 605 <td>@item.material</td> 606 <td>@item.weight</td> 607 <td>@item.percent</td> 608 </tr> 609 } 610 611 612 613 </tbody> 614 615 <tfoot> 616 <tr> 617 <td>&nbsp;</td> 618 <td><strong>@totalweight kg</strong></td> 619 <td><strong>@totalpercent&#37;</strong></td> 620 </tr> 621 </tfoot> 622 </table> <!--! #table-materials --> 623 } 624 } 625 626 } 627 628 </div> <!--! .padding --> 629 </div> 630 </div> 631 </div> 632 </div> 633 634 } 635 636 </div> 637 638 </div> 639 640 <div class="col-sm-7"> 641 642 <div class="m-product-gallery-visual print-hide" style="margin-top: 30px;display:block;float:left;width:100%;"> 643 <ul> 644 @foreach (ProductAsset image in carouselImages) 645 { 646 <li style="text-align:left !important;"><img src="@image.uri" class="img-responsive" alt="Masthead image" style="width:auto;margin: 0 auto 0 auto;" /></li> 647 } 648 </ul> 649 </div> <!-- m-product-gallery-visual --> 650 651 <div class="m-decal-container"> 652 653 @* ageRanges KOD *@ 654 <div class="m-decal"> 655 <ul class="list-inline"> 656 657 @if (!String.IsNullOrWhiteSpace(GetString("Ecom:Product:Field.AgeRange")) && ageRanges.Any()) 658 { 659 foreach (var range in ageRanges) 660 { 661 <li class="decal"> 662 <div class="decal-header" data-toggle="tooltip" data-placement="top" title="@GetString("Ecom:Product:Field.AgeRange.Name") @range"> 663 <img src="Files/Templates/Designs/HagsCore/res/img/decals/agerange.png" alt="@GetString("Ecom:Product:Field.AgeRange.Name") @range" /> 664 <span class="decalvalue">@range</span> 665 </div> 666 </li> 667 } 668 } 669 670 @if (GetDouble("Ecom:Product:Field.AssemblyTime.Value.Raw") > 0) 671 { 672 <li class="decal"> 673 <div class="decal-header" data-toggle="tooltip" data-placement="top" title="@GetString("Ecom:Product:Field.AssemblyTime.Name") @Math.Ceiling(GetDouble("Ecom:Product:Field.AssemblyTime.Value.Raw")) hrs"> 674 675 <img src="Files/Templates/Designs/HagsCore/res/img/decals/time.png" alt="@GetString("Ecom:Product:Field.AssemblyTime.Name") @Math.Ceiling(GetDouble("Ecom:Product:Field.AssemblyTime.Value.Raw")) hrs" /> 676 677 <span class="decalvalue">@Math.Ceiling(GetDouble("Ecom:Product:Field.AssemblyTime.Value.Raw"))</span> 678 679 </div> 680 </li> 681 } 682 683 @if (GetDouble("Ecom:Product:Field.FallHeight.Value.Raw") > 0) 684 { 685 <li class="decal"> 686 <div class="decal-header" data-toggle="tooltip" data-placement="top" title="@GetString("Ecom:Product:Field.FallHeight.Name") @GetString("Ecom:Product:Field.FallHeight.Value.Raw")"> 687 688 <img src="Files/Templates/Designs/HagsCore/res/img/decals/fall.png" alt="@GetString("Ecom:Product:Field.FallHeight.Name") @GetString("Ecom:Product:Field.FallHeight.Value.Raw")" /> 689 690 <span class="decalvalue">@GetString("Ecom:Product:Field.FallHeight.Value.Raw")</span> 691 692 </div> 693 </li> 694 } 695 696 @if (GetDouble("Ecom:Product:Field.SafetyArea.Value.Raw") > 0) 697 { 698 <li class="decal"> 699 <div class="decal-header" data-toggle="tooltip" data-placement="top" title="@GetString("Ecom:Product:Field.SafetyArea.Name") @GetDouble("Ecom:Product:Field.SafetyArea.Value")m&#178;"> 700 701 <img src="Files/Templates/Designs/HagsCore/res/img/decals/area.png" alt="@GetString("Ecom:Product:Field.SafetyArea.Name") @GetDouble("Ecom:Product:Field.SafetyArea.Value")m&#178;" /> 702 703 <span class="decalvalue">@GetDouble("Ecom:Product:Field.SafetyArea.Value")</span> 704 705 </div> 706 </li> 707 } 708 </ul> 709 </div> <!-- m-decals --> 710 711 </div> <!-- m-decals-container --> 712 713 @if (thumbs.Count() > 0) 714 { 715 <div class="m-product-gallery-sync slider-nav print-hide"> 716 717 <ul class="list-inline thumbnails"> 718 @foreach (ProductAsset thumb in thumbs) 719 { 720 721 if (thumb != null) 722 { 723 <li><img src="@thumb.uri" class="thumbnail img-responsive" alt="Masthead image" /></li> 724 } 725 726 727 @*if (!string.IsNullOrEmpty(thumb.uri)) 728 { 729 <li><img src="@thumb.uri" class="thumbnail img-responsive" alt="Masthead image" /></li> 730 }*@ 731 } 732 @*<li class="slick-slide slick-active" data-slick-index="0" aria-hidden="false" tabindex="-1" role="option" aria-describedby="slick-slide20" style=""><img src="Assets/8048383/Bilder/thumb_8048383.jpg" class="thumbnail img-responsive" alt="Masthead image"></li> 733 <li class="slick-slide slick-active" data-slick-index="1" aria-hidden="false" tabindex="-1" role="option" aria-describedby="slick-slide21"><img src="Assets/8048383/Bilder/thumb_8048383_2_8048383_Abbax_2.jpg" class="thumbnail img-responsive" alt="Masthead image"></li> 734 <li class="slick-slide slick-active" data-slick-index="2" aria-hidden="false" tabindex="-1" role="option" aria-describedby="slick-slide22"><img src="Assets/8048383/Bilder/thumb_8048383_Side.jpg" class="thumbnail img-responsive" alt="Masthead image"></li> 735 <li class="slick-slide slick-current slick-active" data-slick-index="3" aria-hidden="false" tabindex="-1" role="option" aria-describedby="slick-slide23"><img src="Assets/8048383/Bilder/thumb_8048383_Top.jpg" class="thumbnail img-responsive" alt="Masthead image"></li>*@ 736 737 </ul> 738 </div> 739 } 740 741 742 <div> 743 744 <ul class="m-btn-menu-secondary print-hide"> 745 @{ 746 var imagesCount = assets.Select(n => n).Where(n => n.Index == AssetTypeEnum.ToFriendlyAssetName(AssetType.Images)).Count(); 747 var brochCount = assets.Select(n => n).Where(n => n.Index == AssetTypeEnum.ToFriendlyAssetName(AssetType.Brochures)).Count(); 748 } 749 750 @if (imagesCount + brochCount < assets.Count()) 751 { 752 <li> 753 <a class="m-btn-xs-more btn btn-default btn-xs text-uppercase" href="#collapseThree" 754 role="button" 755 data-toggle="collapse" 756 data-parent="#productdownload" 757 id="productDownloadButton" 758 aria-controls="collapseThree">@Translate("ProductDownloads", "Product Downloads")</a> 759 </li> 760 } 761 762 @{ 763 if (hiResDownloads.Count() > 0) 764 { 765 List<string> fileList = new List<string>(); 766 foreach (var file in hiResDownloads) 767 { 768 fileList.Add(file.FullPath); 769 } 770 771 <li> 772 <form method="post" id="downloadImagesForm"> 773 <input type="hidden" name="DownloadImages" value="@productNumber" /> 774 @GetButton(fileList, "Product") 775 </form> 776 777 </li> 778 } 779 } 780 781 782 <li> 783 <a class="m-btn-xs-more btn btn-default btn-xs text-uppercase" href="" 784 role="button" 785 data-toggle="collapse" 786 data-parent="#productdownload" 787 id="productSheetButton" 788 aria-controls="collapseFour" onclick="javascript:window.print();">@Translate("ProductSheet", "Product Sheet")</a> 789 </li> 790 791 @*<li>Check this again do we add a master with default Variant combinatiions to my product collection?? button is hidden.</li>*@ 792 @*<li>@GetString("Ecom:Product.SelectedVariantComboName")||Variant Group Link: @GetString("Ecom:Product.VariantLinkGroup") |**| @GetLoop("VariantCombinations").Count()</li>*@ 793 794 @*<li>@prod.Id||@GetString("Ecom:Product.LanguageID") || @GetString("Ecom:Product.Number") || @prod.IsVariantMaster</li>*@ 795 @*<li>Product Number: @GetString("Ecom:Product.Number") || Product Variant ID: ( @GetString("Ecom:Product.VariantID") ) || Variant Combinations Count: @GetLoop("VariantCombinations").Count() ZZ Product Variant Count: @GetInteger("Ecom:Product.VariantCount")</li>*@ 796 797 798 @if (!string.IsNullOrEmpty(GetString("Ecom:Product.VariantID")) || GetLoop("VariantCombinations").Count() == 1) 799 { 800 //display the button if we have the appropriate script loaded (advanced-search-min.js) 801 @*<li>@GetString("Ecom:Product.VariantID") || @GetLoop("VariantCombinations").Count()</li>*@ 802 803 <li id="btnMyProductCollection" style="margin-top: 8px;"> 804 805 @if (isProductCollection) 806 { 807 <a class="m-btn-xs-more btn btn-default btn-xs text-uppercase print-hide" href="" role="button" data-removeproductlist="@GetString("Ecom:Product.Number")" data-addproductlist=""><span>@Translate("RemoveFromCollection", "Remove from my Collection")</span></a> 808 } 809 else 810 { 811 <a class="m-btn-xs-more btn btn-default btn-xs text-uppercase print-hide" href="" role="button" data-removeproductlist="" data-addproductlist="@collectionData"><span>@Translate("AddToCollection", "Add to my collection")</span></a> 812 } 813 814 </li> 815 } 816 817 818 @*only works if logged-in 819 <li><a href="@GetString("Ecom:Product.AddToList")">Add To List Do something else</a></li>*@ 820 821 @*@if (GetBoolean("Ecom:CatalogPublishing.UseCatalogPublishing")) 822 { 823 <li class="show" style="clear: both; width: 100%;padding-bottom:5px; text-align: right;"> 824 <a href="/default.aspx?id=@GetString("Ecom:Product:Page.ID")&amp;productid=@GetString("Ecom:Product.ID")&amp;CatalogPublishingcmd=addtocatalog">Add to catalog</a> 825 </li> 826 } 827 828 @if (GetBoolean("Ecom:CatalogPublishing.UseCatalogPublishing")) 829 { 830 <li class="show" style="clear: both; width: 100%;padding-bottom:5px; text-align: right;"> 831 <a href="/default.aspx?CatalogPublishingcmd=preview">Catalog Publishing</a> 832 </li> 833 }*@ 834 </ul> 835 836 </div> 837 838 <div class="panel-group" id="productdownload" role="tablist" aria-multiselectable="false"> 839 840 <div id="collapseThree" class="panel-collapse collapse" role="tabpanel" aria-labelledby="productDownloadButton" aria-expanded="true" style="height: 0px;"> 841 842 <div class="panel panel-default panel-body print-hide"> 843 844 @{ 845 List<ProductAsset> certAssets = new List<ProductAsset>(); 846 if (thisPage.AreaID == 1) 847 { 848 certAssets = assets.Where(n => n.Index == AssetTypeEnum.ToFriendlyAssetName(AssetType.Certificates)).ToList(); 849 } 850 else 851 { 852 certAssets = assets.Where(n => n.Index == AssetTypeEnum.ToFriendlyAssetName(AssetType.Certificates) && n.FileName.StartsWith(currentCountry + "_")).ToList(); 853 } 854 855 if (certAssets.Count() == 0) // if none are found try to get GB certificates 856 { 857 certAssets = assets.Where(n => n.Index == AssetTypeEnum.ToFriendlyAssetName(AssetType.Certificates) && n.FileName.StartsWith("GB_")).ToList(); 858 } 859 } 860 861 @if (certAssets.Count > 0) 862 { 863 <h5>@Translate("Certificates", "Certificates")</h5> 864 <ul> 865 @foreach (ProductAsset cert in certAssets) 866 { 867 868 <li> 869 <a href="@cert.uri" download="@cert.FileName"> 870 <span><img src="Files/Templates/Designs/HagsCore/res/img/icons/downloads/pdf_small.gif" /></span><span>@cert.FileName</span> 871 </a> 872 </li> 873 } 874 </ul> 875 } 876 877 878 @{ 879 List<ProductAsset> assemblyAssets = new List<ProductAsset>(); 880 assemblyAssets = assets.Where(n => n.Index == AssetTypeEnum.ToFriendlyAssetName(AssetType.AssemblyInstructions)).ToList(); 881 } 882 883 @if (assemblyAssets.Count > 0) 884 { 885 <h5>@Translate("InstallationGuides", "Installation Guides")</h5> 886 <ul> 887 @foreach (ProductAsset assemblyInstns in assemblyAssets) 888 { 889 <li> 890 <a href="@assemblyInstns.uri" download="@assemblyInstns.FileName"> 891 <span><img src="Files/Templates/Designs/HagsCore/res/img/icons/downloads/pdf_small.gif" /></span><span>@assemblyInstns.FileName</span> 892 </a> 893 </li> 894 } 895 </ul> 896 } 897 898 @if (relatedProductsAssemblyInstructions.Count > 0) 899 { 900 <h5>@Translate("DetailedInstallationGuides", "Detailed Installation Guides")</h5> 901 <ul class="list-column list-inline"> 902 @foreach (ProductAsset assemblyInstns in relatedProductsAssemblyInstructions) 903 { 904 <li> 905 <a href="@assemblyInstns.uri" download="@assemblyInstns.FileName"> 906 <span><img src="Files/Templates/Designs/HagsCore/res/img/icons/downloads/pdf_small.gif" /></span><span>@assemblyInstns.FileName</span> 907 </a> 908 </li> 909 } 910 </ul> 911 } 912 913 @{ 914 List<ProductAsset> inspAssets = new List<ProductAsset>(); 915 inspAssets = HagsWeb.Library.Services.FileSystemService.FileSystem.GetPdfFilesFromDirectoryBySiteCulture("/Files/System/ProductCollectionDownloads/InspectionMaintenance", "_" + currentlanguage.ToUpper()); 916 } 917 918 @if (inspAssets != null && inspAssets.Count > 0) 919 { 920 <h5>@Translate("InspectionMaintenance","Inspection & Maintenance")</h5> 921 922 <ul> 923 @foreach (ProductAsset pdf in inspAssets) 924 { 925 <li> 926 <a href="@pdf.uri" download="@pdf.FileName"> 927 <span><img src="Files/Templates/Designs/HagsCore/res/img/icons/downloads/pdf_small.gif" /></span><span>@pdf.FileName</span> 928 </a> 929 </li> 930 } 931 </ul> 932 } 933 else 934 { 935 <h5>@Translate("InspectionMaintenance", "Inspection & Maintenance")</h5> 936 937 <ul> 938 <li> 939 <a href="/Files/System/ProductCollectionDownloads/InspectionMaintenance/Playground Equipment I&M guide_EN.pdf" download="Playground Equipment I&M Guide"> 940 <span><img src="Files/Templates/Designs/HagsCore/res/img/icons/downloads/pdf_small.gif" /></span><span>Playground Equipment I&M Guide</span> 941 </a> 942 </li> 943 <li> 944 <a href="/Files/System/ProductCollectionDownloads/InspectionMaintenance/Sports and fitness I&M guide_EN" download="Sports and Fitness I&M Guide"> 945 <span><img src="Files/Templates/Designs/HagsCore/res/img/icons/downloads/pdf_small.gif" /></span><span>Sports and Fitness I&M Guide</span> 946 </a> 947 </li> 948 </ul> 949 950 } 951 952 953 @{ 954 List<ProductAsset> dwgAssets = new List<ProductAsset>(); 955 dwgAssets = assets.Where(n => n.Index == AssetTypeEnum.ToFriendlyAssetName(AssetType.Drawings)).ToList(); 956 } 957 958 @if (dwgAssets.Count > 0) 959 { 960 <h5>@Translate("DWGFiles", "DWG Files")</h5> 961 <ul> 962 @foreach (ProductAsset dwg in dwgAssets) 963 { 964 <li> 965 <a href="@dwg.uri" download="@dwg.FileName"> 966 <span><img src="Files/Templates/Designs/HagsCore/res/img/icons/downloads/dwg_small.gif" /></span><span>@dwg.FileName</span> 967 </a> 968 </li> 969 } 970 </ul> 971 } 972 973 <h5>@Translate("GeneralInformation", "General Information")</h5> 974 <ul> 975 @if (thisPage.AreaID == 2) 976 { 977 <li><a href="Files/System/ProductCollectionDownloads/General Information/hags-general-info_SE.pdf" download="" target="_blank"><span><img src="Files/Templates/Designs/HagsCore/res/img/icons/downloads/pdf_small.gif"></span><span>@Translate("GeneralInformation", "General Information")</span></a></li> 978 <li><a href="Files/System/ProductCollectionDownloads/General Information/hags-technical-specs_SE.pdf" download="" target="_blank"><span><img src="Files/Templates/Designs/HagsCore/res/img/icons/downloads/pdf_small.gif"></span><span>@Translate("TechnicalInformation", "Technical Information")</span></a></li> 979 } 980 else 981 { 982 <li><a href="Files/System/ProductCollectionDownloads/General Information/hags-general-info_EN.pdf" download="" target="_blank"><span><img src="Files/Templates/Designs/HagsCore/res/img/icons/downloads/pdf_small.gif"></span><span>@Translate("GeneralInformation", "General Information")</span></a></li> 983 <li><a href="Files/System/ProductCollectionDownloads/General Information/hags-technical-specs_EN.pdf" download="" target="_blank"><span><img src="Files/Templates/Designs/HagsCore/res/img/icons/downloads/pdf_small.gif"></span><span>@Translate("TechnicalInformation", "Technical Information")</span></a></li> 984 } 985 986 </ul> 987 </div> 988 989 </div> 990 991 <div id="collapseFour" class="panel-collapse collapse" role="tabpanel" aria-labelledby="productSheetButton" aria-expanded="true" style="height: 0px;"> 992 993 <div class="panel-body print-hide"> 994 <p>Printed</p> 995 </div> 996 997 </div> 998 999 </div> 1000 1001 @if (!String.IsNullOrEmpty(salesPhoneNumber)) 1002 { 1003 string contactUsLink = DWUtilities.GetPageByNavigationTag("ContactUs", thisPage.AreaID); 1004 <p class="m-cta-call print-hide"><span>@Translate("CallOurSalesTeamOn", "Call a member of our team on") <a href="#"><strong>@salesPhoneNumber</strong></a> @Translate("OrUseOur", "or use our") <a href="@contactUsLink">@Translate("ContactForm", "Contact Form")</a></span></p> 1005 } 1006 1007 1008 </div> 1009 </div> <!-- row --> 1010 </div> <!-- container-fluid --> 1011 </div> 1012 1013 @*Product Options*@ 1014 @if (GetLoop("VariantCombinations").Count() > 0) 1015 { 1016 <div class="m-sort m-theme-background-lightgrey product-options print-hide"> 1017 <div class="l-page"> 1018 <div class="container-fluid"> 1019 <div class="row"> 1020 <div> 1021 <h4 class="m-panel-title panel-title" style="padding-right:12px;padding-bottom:12px;width:auto;display:block;float:left;">@Translate("ProductOptions", "Product Options") (<span id="resultCount">@GetLoop("VariantCombinations").Count()</span>)</h4> 1022 </div> 1023 <form class="form-inline"> 1024 <div id="filter-variants"> 1025 1026 @if (anchoringOptions.Results.Count() > 0) 1027 { 1028 <div class="form-container"> 1029 <div class="form-group"> 1030 <label for="anchoring" class="control-label">@Translate("Anchoring", "Anchoring")</label> 1031 <select class="form-control valid third" id="filter-anchoring" name="anchoring"> 1032 1033 @if (anchoringOptions.Results.Count() > 1) 1034 { 1035 <option value="0">@Translate("Any", "Any")</option> 1036 foreach (var anchor in anchoringOptions.Results.OrderBy(n => n.Sort)) 1037 { 1038 <option value="@anchor.Value">@anchor.Name</option> 1039 } 1040 } 1041 else 1042 { 1043 ResultField result = anchoringOptions.Results.FirstOrDefault(); 1044 <option value="@result.Value">@result.Name</option> 1045 } 1046 1047 </select> 1048 </div> 1049 1050 </div> 1051 } 1052 1053 @if (colourOptions.Results.Count() > 0) 1054 { 1055 <div class="form-container"> 1056 1057 <div class="form-group"> 1058 <label for="colour" class="control-label">@Translate("Colour", "Colour")</label> 1059 <select class="form-control valid first" id="filter-colour" name="colour"> 1060 1061 @if (colourOptions.Results.Count() > 1) 1062 { 1063 <option value="0">@Translate("Any", "Any")</option> 1064 foreach (var colour in colourOptions.Results.OrderBy(n => n.Sort)) 1065 { 1066 <option value="@colour.Value">@colour.Name</option> 1067 } 1068 } 1069 else 1070 { 1071 ResultField result = colourOptions.Results.FirstOrDefault(); 1072 <option value="@result.Value">@result.Name</option> 1073 } 1074 1075 1076 1077 </select> 1078 </div> 1079 1080 </div> 1081 } 1082 1083 @if (optionOptions.Results.Count() > 0) 1084 { 1085 <div class="form-container"> 1086 1087 <div class="form-group"> 1088 <label for="options" class="control-label">@Translate("ProductOptions", "Product Options")</label> 1089 <select class="form-control valid" id="filter-options" name="options"> 1090 1091 @if (optionOptions.Results.Count() > 1) 1092 { 1093 <option value="0">@Translate("Any", "Any")</option> 1094 foreach (var option in optionOptions.Results.OrderBy(n => n.Sort)) 1095 { 1096 <option value="@option.Value">@option.Name</option> 1097 } 1098 } 1099 else 1100 { 1101 ResultField result = optionOptions.Results.FirstOrDefault(); 1102 <option value="@result.Value">@result.Name</option> 1103 } 1104 </select> 1105 </div> 1106 1107 </div> 1108 } 1109 1110 </div> 1111 </form> 1112 </div> 1113 </div> 1114 </div> 1115 </div> 1116 1117 1118 <div class="l-page print-hide"> 1119 <div class="box-slider-filter-content" id="filter-variants-slider-content"> 1120 1121 @foreach (LoopItem variantCombinations in GetLoop("VariantCombinations")) 1122 { 1123 var colourOption = string.Empty; 1124 var optionOption = string.Empty; 1125 var anchorOption = string.Empty; 1126 var materialOption = string.Empty; 1127 var colourId = string.Empty; 1128 var optionId = string.Empty; 1129 var anchorId = string.Empty; 1130 var materialId = string.Empty; 1131 var selectedVariant = string.Empty; 1132 List<ProductAsset> productImages = AssetManager_Repository.GetAssets(variantCombinations.GetString("Ecom:VariantCombination.Product.Number"), AssetType.Images, false); 1133 ProductAsset image = productImages.Where(n => n.Index == AssetTypeEnum.ToFriendlyAssetName(AssetType.Images) && n.FileName.StartsWith("big_") || n.FileName.StartsWith("big_Color_")).FirstOrDefault(); 1134 1135 foreach (var group in GetLoop("VariantGroups").Where(n => n.GetString("Ecom:VariantGroup.ID") != "D")) 1136 { 1137 foreach (var availableOption in group.GetLoop("VariantAvailableOptions")) 1138 { 1139 1140 if (group.GetString("Ecom:VariantGroup.ID") == "S55") 1141 { 1142 1143 if (variantCombinations.GetString("Ecom:VariantCombination.VariantID").Contains(availableOption.GetString("Ecom:VariantOption.ID")) && availableOption.GetString("Ecom:VariantOption.Name") != "Not applicable") 1144 { 1145 colourOption = availableOption.GetString("Ecom:VariantOption.Name"); 1146 colourId = availableOption.GetString("Ecom:VariantOption.ID"); 1147 } 1148 1149 } 1150 if (group.GetString("Ecom:VariantGroup.ID") == "ATP1") 1151 { 1152 if (variantCombinations.GetString("Ecom:VariantCombination.VariantID").Contains(availableOption.GetString("Ecom:VariantOption.ID")) && availableOption.GetString("Ecom:VariantOption.Name") != "Not applicable") 1153 { 1154 materialOption = availableOption.GetString("Ecom:VariantOption.Name"); 1155 materialId = availableOption.GetString("Ecom:VariantOption.ID"); 1156 } 1157 } 1158 if (group.GetString("Ecom:VariantGroup.ID") == "ATP3") 1159 { 1160 if (variantCombinations.GetString("Ecom:VariantCombination.VariantID").Contains(availableOption.GetString("Ecom:VariantOption.ID")) && availableOption.GetString("Ecom:VariantOption.Name") != "Not applicable") 1161 { 1162 anchorOption = availableOption.GetString("Ecom:VariantOption.Name"); 1163 anchorId = availableOption.GetString("Ecom:VariantOption.ID"); 1164 } 1165 } 1166 if (group.GetString("Ecom:VariantGroup.ID") == "ATP4") 1167 { 1168 if (variantCombinations.GetString("Ecom:VariantCombination.VariantID").Contains(availableOption.GetString("Ecom:VariantOption.ID")) && availableOption.GetString("Ecom:VariantOption.Name") != "Not applicable") 1169 { 1170 optionOption = availableOption.GetString("Ecom:VariantOption.Name"); 1171 optionId = availableOption.GetString("Ecom:VariantOption.ID"); 1172 } 1173 } 1174 if (variantCombinations.GetBoolean("Ecom:VariantCombination.Selected")) 1175 { 1176 selectedVariant = "selected-variant"; 1177 } 1178 } 1179 1180 } 1181 1182 <div class="m-attractor @selectedVariant" style="margin-bottom: 4em;"> 1183 1184 <div class="m-attractor-visual" style="height:180px;"> 1185 @if (image != null && !String.IsNullOrEmpty(image.uri)) 1186 { 1187 <a href="@variantCombinations.GetString("Ecom:VariantCombination.Link.Clean")"><img src="@image.uri" class="img-responsive m-product-thumb" /></a> 1188 } 1189 else 1190 { 1191 <img src="/Files/Templates/Designs/HagsCore/res/img/image-not-found.png" class="img-responsive m-product-thumb" /> 1192 } 1193 </div> 1194 1195 <input type="hidden" name="prop-colour" value="@colourId" /> 1196 <input type="hidden" name="prop-anchoring" value="@anchorId" /> 1197 <input type="hidden" name="prop-option" value="@optionId" /> 1198 1199 <div class="m-attractor-info m-attractor-info-product"> 1200 1201 1202 @if (thisPage.AreaID == 7) /*UK*/ 1203 { 1204 string ukId = HagsWeb.Library.Methods.ProductProperties.ProductFieldValues.GetUkProductNumber(variantCombinations.GetString("Ecom:VariantCombination.Product.Number"), thisPage.Area.EcomLanguageId); 1205 <h3 class="m-theme-after-yellow m-theme-border-yellow"><a href="@variantCombinations.GetString("Ecom:VariantCombination.Link.Clean")">@ukId.ToString()</a></h3> 1206 } 1207 else 1208 { 1209 <h3 class="m-theme-after-yellow m-theme-border-yellow"><a href="@variantCombinations.GetString("Ecom:VariantCombination.Link.Clean")">@variantCombinations.GetString("Ecom:VariantCombination.Product.Number")</a></h3> 1210 } 1211 1212 <div class="m-attractor-info m-attractor-info-product"> 1213 <p>@optionOption<br /> @colourOption - @anchorOption</p> 1214 </div> 1215 <a class="m-btn-xs-more btn btn-default btn-xs text-uppercase" href="@variantCombinations.GetString("Ecom:VariantCombination.Link.Clean")" role="button">@Translate("ProductDetails", "Product Details")</a> 1216 </div> 1217 </div> 1218 1219 } 1220 </div> 1221 1222 <div class="m-message" style="display:none;padding-bottom:20px;padding-left:6px;"> 1223 <p style="font-size: 1.2em;color:red;"><b>@Translate("VariantFilterMessage", "There were no options available for selection.")</b></p> 1224 </div> 1225 </div> 1226 } 1227 1228 @* Play Functions*@ 1229 @if (relatedProducts.Any()) 1230 { 1231 int count = relatedProducts.Count(); 1232 <div class="m-heading m-theme-background-lightgrey print-hide"> 1233 <div class="l-page"> 1234 <div class="container-fluid"> 1235 <h4 class="m-panel-title">@Translate("PlayFunctions", "Play Functions")</h4> 1236 </div> <!-- container-fluid --> 1237 </div> <!-- l-page --> 1238 </div> 1239 1240 <div class="l-page play-functions print-hide" style="margin-bottom: 3em;"> 1241 <div class="box-slider-content" id="related-products-slider-content"> 1242 1243 @foreach (Product product in relatedProducts) 1244 { 1245 List<ProductAsset> productImages = AssetManager_Repository.GetAssets(product.Number, AssetType.Images, false); 1246 ProductAsset image = productImages.Where(n => n.Index == AssetTypeEnum.ToFriendlyAssetName(AssetType.Images) && n.FileName.StartsWith("big_") || n.FileName.StartsWith("big_Color_")).FirstOrDefault(); 1247 1248 <div class="l-group-content col-xs-12 col-ms-4 col-sm-2 modules"> 1249 <div class="m-attractor"> 1250 <div class="m-attractor-visual"> 1251 @if (image != null && !String.IsNullOrEmpty(image.uri)) 1252 { 1253 <img src="@image.uri" class="img-responsive m-product-thumb" /> 1254 } 1255 else 1256 { 1257 <img src="/Files/Templates/Designs/HagsCore/res/img/image-not-found.png" class="img-responsive m-product-thumb" /> 1258 } 1259 </div> 1260 <div class="m-attractor-info m-attractor-info-product"> 1261 <h3 class="m-theme-after-yellow m-theme-border-yellow">@product.Name</h3> 1262 </div> <!-- attractor-info --> 1263 </div> <!-- attractor --> 1264 </div> 1265 } 1266 1267 </div> <!-- box-slider-content --> 1268 </div><!-- l-page --> 1269 } 1270 1271 @*Related Component Products*@ 1272 @*@if (relatedComponentProducts.Any()) 1273 { 1274 int count = relatedComponentProducts.Count(); 1275 <div class="m-heading m-theme-background-lightgrey print-hide"> 1276 <div class="l-page"> 1277 <div class="container-fluid"> 1278 <h4 class="m-panel-title">@Translate("RelatedProducts", "Related Products")</h4> 1279 </div> <!-- container-fluid --> 1280 </div> <!-- l-page --> 1281 </div> 1282 1283 <div class="l-page play-functions print-hide" style="margin-bottom: 3em;"> 1284 <div class="box-slider-content" id="related-products-slider-content"> 1285 1286 @foreach (Product product in relatedComponentProducts) 1287 { 1288 List<ProductAsset> productImages = AssetManager_Repository.GetAssets(product.Number, AssetType.Images, false); 1289 ProductAsset image = productImages.Where(n => n.Index == AssetTypeEnum.ToFriendlyAssetName(AssetType.Images) && n.FileName.StartsWith("big_") || n.FileName.StartsWith("big_Color_")).FirstOrDefault(); 1290 1291 <div class="l-group-content col-xs-12 col-ms-4 col-sm-2 modules"> 1292 <div class="m-attractor"> 1293 <div class="m-attractor-visual"> 1294 @if (image != null && !String.IsNullOrEmpty(image.uri)) 1295 { 1296 <img src="@image.uri" class="img-responsive m-product-thumb" /> 1297 } 1298 else 1299 { 1300 <img src="/Files/Templates/Designs/HagsCore/res/img/image-not-found.png" class="img-responsive m-product-thumb" /> 1301 } 1302 </div> 1303 <div class="m-attractor-info m-attractor-info-product"> 1304 <h3 class="m-theme-after-yellow m-theme-border-yellow">@product.Name</h3> 1305 </div> <!-- attractor-info --> 1306 </div> <!-- attractor --> 1307 </div> 1308 } 1309 1310 </div> <!-- box-slider-content --> 1311 </div><!-- l-page --> 1312 }*@