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

UniMini

A complete range of play equipment with modular dimensions and heights adapted for small children. UniMini is packed with play opportunities to inspire growing minds and offer exercise for growing bodies. The UniMini range is naturally attractive to the under 5 age range. UniMini complements natural surroundings and can be constructed virtually anywhere. We have a wide range of ready-made standard units, for every scale and budget, and exciting themed units to bring imaginations alive.

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