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

Inclusive Playground in the Lake District Wins Award, UK

Due to its inclusive features, this play area has been accredited with a Bronze award by PiPA (Play Inclusive Play Areas).

1/15/2020 12:48:00 PM

Case Study Details

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

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