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_1034248304c34ec495d4dffd94753976.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/Product") 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 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 587 percent = Math.Round(Double.Parse(dat.Element("percent").Value, format), 1).ToString() // string.Format("{0:0.00}", Double.Parse(dat.Element("percent").Value)) 588 }; 589 590 <table class="table"> 591 <thead> 592 <tr> 593 <th>@GetString("Ecom:Product:Field.Material.Name")</th> 594 <th>kg</th> 595 <th>&#37;</th> 596 </tr> 597 </thead> 598 599 <tbody> 600 601 @foreach (var item in details) 602 { 603 <tr> 604 <td>@item.material</td> 605 <td>@item.weight</td> 606 <td>@item.percent</td> 607 </tr> 608 } 609 610 611 612 </tbody> 613 614 <tfoot> 615 <tr> 616 <td>&nbsp;</td> 617 <td><strong>@totalweight kg</strong></td> 618 <td><strong>@totalpercent&#37;</strong></td> 619 </tr> 620 </tfoot> 621 </table> <!--! #table-materials --> 622 } 623 } 624 625 } 626 627 </div> <!--! .padding --> 628 </div> 629 </div> 630 </div> 631 </div> 632 633 } 634 635 </div> 636 637 </div> 638 639 <div class="col-sm-7"> 640 641 <div class="m-product-gallery-visual print-hide" style="margin-top: 30px;display:block;float:left;width:100%;"> 642 <ul> 643 @foreach (ProductAsset image in carouselImages) 644 { 645 <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> 646 } 647 </ul> 648 </div> <!-- m-product-gallery-visual --> 649 650 <div class="m-decal-container"> 651 652 @* ageRanges KOD *@ 653 <div class="m-decal"> 654 <ul class="list-inline"> 655 656 @if (!String.IsNullOrWhiteSpace(GetString("Ecom:Product:Field.AgeRange")) && ageRanges.Any()) 657 { 658 foreach (var range in ageRanges) 659 { 660 <li class="decal"> 661 <div class="decal-header" data-toggle="tooltip" data-placement="top" title="@GetString("Ecom:Product:Field.AgeRange.Name") @range"> 662 <img src="Files/Templates/Designs/HagsCore/res/img/decals/agerange.png" alt="@GetString("Ecom:Product:Field.AgeRange.Name") @range" /> 663 <span class="decalvalue">@range</span> 664 </div> 665 </li> 666 } 667 } 668 669 @if (GetDouble("Ecom:Product:Field.AssemblyTime.Value.Raw") > 0) 670 { 671 <li class="decal"> 672 <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"> 673 674 <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" /> 675 676 <span class="decalvalue">@Math.Ceiling(GetDouble("Ecom:Product:Field.AssemblyTime.Value.Raw"))</span> 677 678 </div> 679 </li> 680 } 681 682 @if (GetDouble("Ecom:Product:Field.FallHeight.Value.Raw") > 0) 683 { 684 <li class="decal"> 685 <div class="decal-header" data-toggle="tooltip" data-placement="top" title="@GetString("Ecom:Product:Field.FallHeight.Name") @GetString("Ecom:Product:Field.FallHeight.Value.Raw")"> 686 687 <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")" /> 688 689 <span class="decalvalue">@GetString("Ecom:Product:Field.FallHeight.Value.Raw")</span> 690 691 </div> 692 </li> 693 } 694 695 @if (GetDouble("Ecom:Product:Field.SafetyArea.Value.Raw") > 0) 696 { 697 <li class="decal"> 698 <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;"> 699 700 <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;" /> 701 702 <span class="decalvalue">@GetDouble("Ecom:Product:Field.SafetyArea.Value")</span> 703 704 </div> 705 </li> 706 } 707 </ul> 708 </div> <!-- m-decals --> 709 710 </div> <!-- m-decals-container --> 711 712 @if (thumbs.Count() > 0) 713 { 714 <div class="m-product-gallery-sync slider-nav print-hide"> 715 716 <ul class="list-inline thumbnails"> 717 @foreach (ProductAsset thumb in thumbs) 718 { 719 720 if (thumb != null) 721 { 722 <li><img src="@thumb.uri" class="thumbnail img-responsive" alt="Masthead image" /></li> 723 } 724 725 726 @*if (!string.IsNullOrEmpty(thumb.uri)) 727 { 728 <li><img src="@thumb.uri" class="thumbnail img-responsive" alt="Masthead image" /></li> 729 }*@ 730 } 731 @*<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> 732 <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> 733 <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> 734 <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>*@ 735 736 </ul> 737 </div> 738 } 739 740 741 <div> 742 743 <ul class="m-btn-menu-secondary print-hide"> 744 @{ 745 var imagesCount = assets.Select(n => n).Where(n => n.Index == AssetTypeEnum.ToFriendlyAssetName(AssetType.Images)).Count(); 746 var brochCount = assets.Select(n => n).Where(n => n.Index == AssetTypeEnum.ToFriendlyAssetName(AssetType.Brochures)).Count(); 747 } 748 749 @if (imagesCount + brochCount < assets.Count()) 750 { 751 <li> 752 <a class="m-btn-xs-more btn btn-default btn-xs text-uppercase" href="#collapseThree" 753 role="button" 754 data-toggle="collapse" 755 data-parent="#productdownload" 756 id="productDownloadButton" 757 aria-controls="collapseThree">@Translate("ProductDownloads", "Product Downloads")</a> 758 </li> 759 } 760 761 @{ 762 if (hiResDownloads.Count() > 0) 763 { 764 List<string> fileList = new List<string>(); 765 foreach (var file in hiResDownloads) 766 { 767 fileList.Add(file.FullPath); 768 } 769 770 <li> 771 <form method="post" id="downloadImagesForm"> 772 <input type="hidden" name="DownloadImages" value="@productNumber" /> 773 @GetButton(fileList, "Product") 774 </form> 775 776 </li> 777 } 778 } 779 780 781 <li> 782 <a class="m-btn-xs-more btn btn-default btn-xs text-uppercase" href="" 783 role="button" 784 data-toggle="collapse" 785 data-parent="#productdownload" 786 id="productSheetButton" 787 aria-controls="collapseFour" onclick="javascript:window.print();">@Translate("ProductSheet", "Product Sheet")</a> 788 </li> 789 790 @*<li>Check this again do we add a master with default Variant combinatiions to my product collection?? button is hidden.</li>*@ 791 @*<li>@GetString("Ecom:Product.SelectedVariantComboName")||Variant Group Link: @GetString("Ecom:Product.VariantLinkGroup") |**| @GetLoop("VariantCombinations").Count()</li>*@ 792 793 @*<li>@prod.Id||@GetString("Ecom:Product.LanguageID") || @GetString("Ecom:Product.Number") || @prod.IsVariantMaster</li>*@ 794 @*<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>*@ 795 796 797 @if (!string.IsNullOrEmpty(GetString("Ecom:Product.VariantID")) || GetLoop("VariantCombinations").Count() == 1) 798 { 799 //display the button if we have the appropriate script loaded (advanced-search-min.js) 800 @*<li>@GetString("Ecom:Product.VariantID") || @GetLoop("VariantCombinations").Count()</li>*@ 801 802 <li id="btnMyProductCollection" style="margin-top: 8px;"> 803 804 @if (isProductCollection) 805 { 806 <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> 807 } 808 else 809 { 810 <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> 811 } 812 813 </li> 814 } 815 816 817 @*only works if logged-in 818 <li><a href="@GetString("Ecom:Product.AddToList")">Add To List Do something else</a></li>*@ 819 820 @*@if (GetBoolean("Ecom:CatalogPublishing.UseCatalogPublishing")) 821 { 822 <li class="show" style="clear: both; width: 100%;padding-bottom:5px; text-align: right;"> 823 <a href="/default.aspx?id=@GetString("Ecom:Product:Page.ID")&amp;productid=@GetString("Ecom:Product.ID")&amp;CatalogPublishingcmd=addtocatalog">Add to catalog</a> 824 </li> 825 } 826 827 @if (GetBoolean("Ecom:CatalogPublishing.UseCatalogPublishing")) 828 { 829 <li class="show" style="clear: both; width: 100%;padding-bottom:5px; text-align: right;"> 830 <a href="/default.aspx?CatalogPublishingcmd=preview">Catalog Publishing</a> 831 </li> 832 }*@ 833 </ul> 834 835 </div> 836 837 <div class="panel-group" id="productdownload" role="tablist" aria-multiselectable="false"> 838 839 <div id="collapseThree" class="panel-collapse collapse" role="tabpanel" aria-labelledby="productDownloadButton" aria-expanded="true" style="height: 0px;"> 840 841 <div class="panel panel-default panel-body print-hide"> 842 843 @{ 844 List<ProductAsset> certAssets = new List<ProductAsset>(); 845 if (thisPage.AreaID == 1) 846 { 847 certAssets = assets.Where(n => n.Index == AssetTypeEnum.ToFriendlyAssetName(AssetType.Certificates)).ToList(); 848 } 849 else 850 { 851 certAssets = assets.Where(n => n.Index == AssetTypeEnum.ToFriendlyAssetName(AssetType.Certificates) && n.FileName.StartsWith(currentCountry + "_")).ToList(); 852 } 853 854 if (certAssets.Count() == 0) // if none are found try to get GB certificates 855 { 856 certAssets = assets.Where(n => n.Index == AssetTypeEnum.ToFriendlyAssetName(AssetType.Certificates) && n.FileName.StartsWith("GB_")).ToList(); 857 } 858 } 859 860 @if (certAssets.Count > 0) 861 { 862 <h5>@Translate("Certificates", "Certificates")</h5> 863 <ul> 864 @foreach (ProductAsset cert in certAssets) 865 { 866 867 <li> 868 <a href="@cert.uri" download="@cert.FileName"> 869 <span><img src="Files/Templates/Designs/HagsCore/res/img/icons/downloads/pdf_small.gif" /></span><span>@cert.FileName</span> 870 </a> 871 </li> 872 } 873 </ul> 874 } 875 876 877 @{ 878 List<ProductAsset> assemblyAssets = new List<ProductAsset>(); 879 assemblyAssets = assets.Where(n => n.Index == AssetTypeEnum.ToFriendlyAssetName(AssetType.AssemblyInstructions)).ToList(); 880 } 881 882 @if (assemblyAssets.Count > 0) 883 { 884 <h5>@Translate("InstallationGuides", "Installation Guides")</h5> 885 <ul> 886 @foreach (ProductAsset assemblyInstns in assemblyAssets) 887 { 888 <li> 889 <a href="@assemblyInstns.uri" download="@assemblyInstns.FileName"> 890 <span><img src="Files/Templates/Designs/HagsCore/res/img/icons/downloads/pdf_small.gif" /></span><span>@assemblyInstns.FileName</span> 891 </a> 892 </li> 893 } 894 </ul> 895 } 896 897 @if (relatedProductsAssemblyInstructions.Count > 0) 898 { 899 <h5>@Translate("DetailedInstallationGuides", "Detailed Installation Guides")</h5> 900 <ul class="list-column list-inline"> 901 @foreach (ProductAsset assemblyInstns in relatedProductsAssemblyInstructions) 902 { 903 <li> 904 <a href="@assemblyInstns.uri" download="@assemblyInstns.FileName"> 905 <span><img src="Files/Templates/Designs/HagsCore/res/img/icons/downloads/pdf_small.gif" /></span><span>@assemblyInstns.FileName</span> 906 </a> 907 </li> 908 } 909 </ul> 910 } 911 912 @{ 913 List<ProductAsset> dwgAssets = new List<ProductAsset>(); 914 dwgAssets = assets.Where(n => n.Index == AssetTypeEnum.ToFriendlyAssetName(AssetType.Drawings)).ToList(); 915 } 916 917 @if (dwgAssets.Count > 0) 918 { 919 <h5>@Translate("DWGFiles", "DWG Files")</h5> 920 <ul> 921 @foreach (ProductAsset dwg in dwgAssets) 922 { 923 <li> 924 <a href="@dwg.uri" download="@dwg.FileName"> 925 <span><img src="Files/Templates/Designs/HagsCore/res/img/icons/downloads/dwg_small.gif" /></span><span>@dwg.FileName</span> 926 </a> 927 </li> 928 } 929 </ul> 930 } 931 932 <h5>@Translate("GeneralInformation", "General Information")</h5> 933 <ul> 934 @if (thisPage.AreaID == 2) 935 { 936 <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> 937 <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> 938 } 939 else 940 { 941 <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> 942 <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> 943 } 944 945 </ul> 946 </div> 947 948 </div> 949 950 <div id="collapseFour" class="panel-collapse collapse" role="tabpanel" aria-labelledby="productSheetButton" aria-expanded="true" style="height: 0px;"> 951 952 <div class="panel-body print-hide"> 953 <p>Printed</p> 954 </div> 955 956 </div> 957 958 </div> 959 960 @if (!String.IsNullOrEmpty(salesPhoneNumber)) 961 { 962 string contactUsLink = DWUtilities.GetPageByNavigationTag("ContactUs", thisPage.AreaID); 963 <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> 964 } 965 966 967 </div> 968 </div> <!-- row --> 969 </div> <!-- container-fluid --> 970 </div> 971 972 @*Product Options*@ 973 @if (GetLoop("VariantCombinations").Count() > 0) 974 { 975 <div class="m-sort m-theme-background-lightgrey product-options print-hide"> 976 <div class="l-page"> 977 <div class="container-fluid"> 978 <div class="row"> 979 <div> 980 <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> 981 </div> 982 <form class="form-inline"> 983 <div id="filter-variants"> 984 985 @if (anchoringOptions.Results.Count() > 0) 986 { 987 <div class="form-container"> 988 <div class="form-group"> 989 <label for="anchoring" class="control-label">@Translate("Anchoring", "Anchoring")</label> 990 <select class="form-control valid third" id="filter-anchoring" name="anchoring"> 991 992 @if (anchoringOptions.Results.Count() > 1) 993 { 994 <option value="0">@Translate("Any", "Any")</option> 995 foreach (var anchor in anchoringOptions.Results.OrderBy(n => n.Sort)) 996 { 997 <option value="@anchor.Value">@anchor.Name</option> 998 } 999 } 1000 else 1001 { 1002 ResultField result = anchoringOptions.Results.FirstOrDefault(); 1003 <option value="@result.Value">@result.Name</option> 1004 } 1005 1006 </select> 1007 </div> 1008 1009 </div> 1010 } 1011 1012 @if (colourOptions.Results.Count() > 0) 1013 { 1014 <div class="form-container"> 1015 1016 <div class="form-group"> 1017 <label for="colour" class="control-label">@Translate("Colour", "Colour")</label> 1018 <select class="form-control valid first" id="filter-colour" name="colour"> 1019 1020 @if (colourOptions.Results.Count() > 1) 1021 { 1022 <option value="0">@Translate("Any", "Any")</option> 1023 foreach (var colour in colourOptions.Results.OrderBy(n => n.Sort)) 1024 { 1025 <option value="@colour.Value">@colour.Name</option> 1026 } 1027 } 1028 else 1029 { 1030 ResultField result = colourOptions.Results.FirstOrDefault(); 1031 <option value="@result.Value">@result.Name</option> 1032 } 1033 1034 1035 1036 </select> 1037 </div> 1038 1039 </div> 1040 } 1041 1042 @if (optionOptions.Results.Count() > 0) 1043 { 1044 <div class="form-container"> 1045 1046 <div class="form-group"> 1047 <label for="options" class="control-label">@Translate("ProductOptions", "Product Options")</label> 1048 <select class="form-control valid" id="filter-options" name="options"> 1049 1050 @if (optionOptions.Results.Count() > 1) 1051 { 1052 <option value="0">@Translate("Any", "Any")</option> 1053 foreach (var option in optionOptions.Results.OrderBy(n => n.Sort)) 1054 { 1055 <option value="@option.Value">@option.Name</option> 1056 } 1057 } 1058 else 1059 { 1060 ResultField result = optionOptions.Results.FirstOrDefault(); 1061 <option value="@result.Value">@result.Name</option> 1062 } 1063 </select> 1064 </div> 1065 1066 </div> 1067 } 1068 1069 </div> 1070 </form> 1071 </div> 1072 </div> 1073 </div> 1074 </div> 1075 1076 1077 <div class="l-page print-hide"> 1078 <div class="box-slider-filter-content" id="filter-variants-slider-content"> 1079 1080 @foreach (LoopItem variantCombinations in GetLoop("VariantCombinations")) 1081 { 1082 var colourOption = string.Empty; 1083 var optionOption = string.Empty; 1084 var anchorOption = string.Empty; 1085 var materialOption = string.Empty; 1086 var colourId = string.Empty; 1087 var optionId = string.Empty; 1088 var anchorId = string.Empty; 1089 var materialId = string.Empty; 1090 var selectedVariant = string.Empty; 1091 List<ProductAsset> productImages = AssetManager_Repository.GetAssets(variantCombinations.GetString("Ecom:VariantCombination.Product.Number"), AssetType.Images, false); 1092 ProductAsset image = productImages.Where(n => n.Index == AssetTypeEnum.ToFriendlyAssetName(AssetType.Images) && n.FileName.StartsWith("big_") || n.FileName.StartsWith("big_Color_")).FirstOrDefault(); 1093 1094 foreach (var group in GetLoop("VariantGroups").Where(n => n.GetString("Ecom:VariantGroup.ID") != "D")) 1095 { 1096 foreach (var availableOption in group.GetLoop("VariantAvailableOptions")) 1097 { 1098 1099 if (group.GetString("Ecom:VariantGroup.ID") == "S55") 1100 { 1101 1102 if (variantCombinations.GetString("Ecom:VariantCombination.VariantID").Contains(availableOption.GetString("Ecom:VariantOption.ID")) && availableOption.GetString("Ecom:VariantOption.Name") != "Not applicable") 1103 { 1104 colourOption = availableOption.GetString("Ecom:VariantOption.Name"); 1105 colourId = availableOption.GetString("Ecom:VariantOption.ID"); 1106 } 1107 1108 } 1109 if (group.GetString("Ecom:VariantGroup.ID") == "ATP1") 1110 { 1111 if (variantCombinations.GetString("Ecom:VariantCombination.VariantID").Contains(availableOption.GetString("Ecom:VariantOption.ID")) && availableOption.GetString("Ecom:VariantOption.Name") != "Not applicable") 1112 { 1113 materialOption = availableOption.GetString("Ecom:VariantOption.Name"); 1114 materialId = availableOption.GetString("Ecom:VariantOption.ID"); 1115 } 1116 } 1117 if (group.GetString("Ecom:VariantGroup.ID") == "ATP3") 1118 { 1119 if (variantCombinations.GetString("Ecom:VariantCombination.VariantID").Contains(availableOption.GetString("Ecom:VariantOption.ID")) && availableOption.GetString("Ecom:VariantOption.Name") != "Not applicable") 1120 { 1121 anchorOption = availableOption.GetString("Ecom:VariantOption.Name"); 1122 anchorId = availableOption.GetString("Ecom:VariantOption.ID"); 1123 } 1124 } 1125 if (group.GetString("Ecom:VariantGroup.ID") == "ATP4") 1126 { 1127 if (variantCombinations.GetString("Ecom:VariantCombination.VariantID").Contains(availableOption.GetString("Ecom:VariantOption.ID")) && availableOption.GetString("Ecom:VariantOption.Name") != "Not applicable") 1128 { 1129 optionOption = availableOption.GetString("Ecom:VariantOption.Name"); 1130 optionId = availableOption.GetString("Ecom:VariantOption.ID"); 1131 } 1132 } 1133 if (variantCombinations.GetBoolean("Ecom:VariantCombination.Selected")) 1134 { 1135 selectedVariant = "selected-variant"; 1136 } 1137 } 1138 1139 } 1140 1141 <div class="m-attractor @selectedVariant" style="margin-bottom: 4em;"> 1142 1143 <div class="m-attractor-visual" style="height:180px;"> 1144 @if (image != null && !String.IsNullOrEmpty(image.uri)) 1145 { 1146 <a href="@variantCombinations.GetString("Ecom:VariantCombination.Link.Clean")"><img src="@image.uri" class="img-responsive m-product-thumb" /></a> 1147 } 1148 else 1149 { 1150 <img src="/Files/Templates/Designs/HagsCore/res/img/image-not-found.png" class="img-responsive m-product-thumb" /> 1151 } 1152 </div> 1153 1154 <input type="hidden" name="prop-colour" value="@colourId" /> 1155 <input type="hidden" name="prop-anchoring" value="@anchorId" /> 1156 <input type="hidden" name="prop-option" value="@optionId" /> 1157 1158 <div class="m-attractor-info m-attractor-info-product"> 1159 1160 1161 @if (thisPage.AreaID == 7) /*UK*/ 1162 { 1163 string ukId = HagsWeb.Library.Methods.ProductProperties.ProductFieldValues.GetUkProductNumber(variantCombinations.GetString("Ecom:VariantCombination.Product.Number"), thisPage.Area.EcomLanguageId); 1164 <h3 class="m-theme-after-yellow m-theme-border-yellow"><a href="@variantCombinations.GetString("Ecom:VariantCombination.Link.Clean")">@ukId.ToString()</a></h3> 1165 } 1166 else 1167 { 1168 <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> 1169 } 1170 1171 <div class="m-attractor-info m-attractor-info-product"> 1172 <p>@optionOption<br /> @colourOption - @anchorOption</p> 1173 </div> 1174 <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> 1175 </div> 1176 </div> 1177 1178 } 1179 </div> 1180 1181 <div class="m-message" style="display:none;padding-bottom:20px;padding-left:6px;"> 1182 <p style="font-size: 1.2em;color:red;"><b>@Translate("VariantFilterMessage", "There were no options available for selection.")</b></p> 1183 </div> 1184 </div> 1185 } 1186 1187 @* Play Functions*@ 1188 @if (relatedProducts.Any()) 1189 { 1190 int count = relatedProducts.Count(); 1191 <div class="m-heading m-theme-background-lightgrey print-hide"> 1192 <div class="l-page"> 1193 <div class="container-fluid"> 1194 <h4 class="m-panel-title">@Translate("PlayFunctions", "Play Functions")</h4> 1195 </div> <!-- container-fluid --> 1196 </div> <!-- l-page --> 1197 </div> 1198 1199 <div class="l-page play-functions print-hide" style="margin-bottom: 3em;"> 1200 <div class="box-slider-content" id="related-products-slider-content"> 1201 1202 @foreach (Product product in relatedProducts) 1203 { 1204 List<ProductAsset> productImages = AssetManager_Repository.GetAssets(product.Number, AssetType.Images, false); 1205 ProductAsset image = productImages.Where(n => n.Index == AssetTypeEnum.ToFriendlyAssetName(AssetType.Images) && n.FileName.StartsWith("big_") || n.FileName.StartsWith("big_Color_")).FirstOrDefault(); 1206 1207 <div class="l-group-content col-xs-12 col-ms-4 col-sm-2 modules"> 1208 <div class="m-attractor"> 1209 <div class="m-attractor-visual"> 1210 @if (image != null && !String.IsNullOrEmpty(image.uri)) 1211 { 1212 <img src="@image.uri" class="img-responsive m-product-thumb" /> 1213 } 1214 else 1215 { 1216 <img src="/Files/Templates/Designs/HagsCore/res/img/image-not-found.png" class="img-responsive m-product-thumb" /> 1217 } 1218 </div> 1219 <div class="m-attractor-info m-attractor-info-product"> 1220 <h3 class="m-theme-after-yellow m-theme-border-yellow">@product.Name</h3> 1221 </div> <!-- attractor-info --> 1222 </div> <!-- attractor --> 1223 </div> 1224 } 1225 1226 </div> <!-- box-slider-content --> 1227 </div><!-- l-page --> 1228 } 1229 1230 @*Related Component Products*@ 1231 @*@if (relatedComponentProducts.Any()) 1232 { 1233 int count = relatedComponentProducts.Count(); 1234 <div class="m-heading m-theme-background-lightgrey print-hide"> 1235 <div class="l-page"> 1236 <div class="container-fluid"> 1237 <h4 class="m-panel-title">@Translate("RelatedProducts", "Related Products")</h4> 1238 </div> <!-- container-fluid --> 1239 </div> <!-- l-page --> 1240 </div> 1241 1242 <div class="l-page play-functions print-hide" style="margin-bottom: 3em;"> 1243 <div class="box-slider-content" id="related-products-slider-content"> 1244 1245 @foreach (Product product in relatedComponentProducts) 1246 { 1247 List<ProductAsset> productImages = AssetManager_Repository.GetAssets(product.Number, AssetType.Images, false); 1248 ProductAsset image = productImages.Where(n => n.Index == AssetTypeEnum.ToFriendlyAssetName(AssetType.Images) && n.FileName.StartsWith("big_") || n.FileName.StartsWith("big_Color_")).FirstOrDefault(); 1249 1250 <div class="l-group-content col-xs-12 col-ms-4 col-sm-2 modules"> 1251 <div class="m-attractor"> 1252 <div class="m-attractor-visual"> 1253 @if (image != null && !String.IsNullOrEmpty(image.uri)) 1254 { 1255 <img src="@image.uri" class="img-responsive m-product-thumb" /> 1256 } 1257 else 1258 { 1259 <img src="/Files/Templates/Designs/HagsCore/res/img/image-not-found.png" class="img-responsive m-product-thumb" /> 1260 } 1261 </div> 1262 <div class="m-attractor-info m-attractor-info-product"> 1263 <h3 class="m-theme-after-yellow m-theme-border-yellow">@product.Name</h3> 1264 </div> <!-- attractor-info --> 1265 </div> <!-- attractor --> 1266 </div> 1267 } 1268 1269 </div> <!-- box-slider-content --> 1270 </div><!-- l-page --> 1271 }*@ 1272 1273 1274