Search Advanced Close

Para encontrar descargas de productos simplemente haga clic en una de las opciones anteriores y luego use el formulario de búsqueda para encontrar todos los documentos asociados con su búsqueda.

 

Search Advanced Close

Para añadir productos a su colección, simplemente busque el producto, haga clic en ‘detalles del producto’ y en la página del producto seleccione ‘agregar a mi colección’. Esto se encuentra ya sea entre las opciones del producto o debajo de la imagen del producto.

Search Advanced Close

Parque Costa i Llobera, Alcúdia

Este parque situado en Alcúdia, tiene una particularidad: combina una pista arena, una zona de balancines, una zona Unimini y como novedad una zona PlayCubes.

14/05/2019 10:45:00

Detalles del proyecto

Escuela de Primaria Kingsland, Castleford

Kingsland Primary School es una escuela SEN con calificación sobresaliente en Castleford, Inglaterra, que atiende a niños con una variedad de discapacidades de aprendizaje. Le pidieron a HAGS que diseñara y construyera áreas de juego para cada uno de sus dos sitios.

22/01/2019 15:42:00

Detalles del proyecto

Zona de juegos más grande de toda la República Checa

El nuevo parque infantil en Ostrava se ha convertido en el más grande del país, con grandes estructuras UniMini y UniPlay hechas a medida, además cuenta con equipos de gimnasia al aire libre.

21/01/2019 11:14:00

Detalles del proyecto

Get more inspiration from other installations all around the world

Ver todos los proyectos
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_94f698c30e4b4131a2d129353ff2fb3e.Execute() in C:\Projects\Hags_Dw9\Files\Templates\Designs\HagsCore\eCom\Product\Product.cshtml:line 214
   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 212 if (!prod.IsVariantMaster) 213 { 214 assemblyInstructionsProductNumber = new ProductService().GetProductsAndVariantsByProduct(prod).FirstOrDefault<Product>(n => n.IsVariantMaster == true).Number; 215 } 216 217 if (GetInteger("Ecom:Product.VariantCount") > 0) 218 { 219 foreach (var variantGroup in GetLoop("VariantGroups").Where(n => n.GetString("Ecom:VariantGroup.ID") != "D")) // Remove All Date Variants 220 { 221 int optionsCount = variantGroup.GetLoop("VariantAvailableOptions").Count(); 222 223 if (optionsCount > 0) 224 { 225 if (!string.IsNullOrEmpty("Ecom:Product.SelectedVariantComboID")) // optionsCount == 1 226 { 227 foreach (var availableOption in variantGroup.GetLoop("VariantAvailableOptions")) 228 { 229 230 if (variantGroup.GetString("Ecom:VariantGroup.ID") == "S55") 231 { 232 colourOptions.Name = variantGroup.GetString("Ecom:VariantGroup.Name"); 233 234 if (availableOption.GetString("Ecom:VariantOption.Name") != "Not applicable") 235 { 236 237 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 }); 238 239 if (availableOption.GetBoolean("Ecom:VariantOption.Selected")) 240 { 241 selectedColourVariant = availableOption.GetString("Ecom:VariantOption.Name"); 242 } 243 } 244 } 245 if (variantGroup.GetString("Ecom:VariantGroup.ID") == "ATP1") 246 { 247 materialOptions.Name = variantGroup.GetString("Ecom:VariantGroup.Name"); 248 249 if (availableOption.GetString("Ecom:VariantOption.Name") != "Not applicable") 250 { 251 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 }); 252 253 if (availableOption.GetBoolean("Ecom:VariantOption.Selected")) 254 { 255 selectedMaterialVariant = availableOption.GetString("Ecom:VariantOption.Name"); 256 } 257 } 258 } 259 if (variantGroup.GetString("Ecom:VariantGroup.ID") == "ATP3") 260 { 261 anchoringOptions.Name = variantGroup.GetString("Ecom:VariantGroup.Name"); 262 263 if (availableOption.GetString("Ecom:VariantOption.Name") != "Not applicable") 264 { 265 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 }); 266 267 if (availableOption.GetBoolean("Ecom:VariantOption.Selected")) 268 { 269 selectedAnchoringVariant = availableOption.GetString("Ecom:VariantOption.Name"); 270 selectedAnchoringIcon = availableOption.GetString("Ecom:VariantOption.ID") + ".png"; 271 } 272 } 273 } 274 if (variantGroup.GetString("Ecom:VariantGroup.ID") == "ATP4") 275 { 276 optionOptions.Name = variantGroup.GetString("Ecom:VariantGroup.Name"); 277 278 if (availableOption.GetString("Ecom:VariantOption.Name") != "Not applicable") 279 { 280 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 }); 281 282 if (availableOption.GetBoolean("Ecom:VariantOption.Selected")) 283 { 284 selectedOptionVariant = availableOption.GetString("Ecom:VariantOption.Name"); 285 } 286 } 287 288 } 289 } 290 } 291 } 292 } 293 } 294 295 // Related Products and their Assembly Instructions 296 List<Product> relatedProducts = new List<Product>(); 297 List<Product> relatedComponentProducts = new List<Product>(); 298 List<ProductAsset> relatedProductsAssemblyInstructions = new List<ProductAsset>(); 299 300 if (GetInteger("Ecom:Product.RelatedCount") > 0) 301 { 302 if (GetLoop("ProductRelatedGroups").Where(n => n.GetString("Ecom:Product:RelatedGroup.Name") == "Product Modules") != null) 303 { 304 relatedProducts = HagsWeb.Library.Methods.ProductFilter.ProductFilter.GetRelatedProducts(GetString("Ecom:Product.Number"), "Product Modules", GetString("Ecom:Product.LanguageID")); 305 } 306 307 if (GetLoop("ProductRelatedGroups").Where(n => n.GetString("Ecom:Product:RelatedGroup.Name") == "Product Components") != null) 308 { 309 relatedComponentProducts = HagsWeb.Library.Methods.ProductFilter.ProductFilter.GetRelatedProducts(assemblyInstructionsProductNumber, "Product Components", GetString("Ecom:Product.LanguageID")); 310 //// Lookup Assembly Instructions Assets 311 foreach (Product product in relatedComponentProducts) 312 { 313 if (product != null) 314 { 315 List<ProductAsset> productAssemblyInstructions = AssetManager_Repository.GetAssets(product.Number, AssetType.AssemblyInstructions, false); 316 if (productAssemblyInstructions.Any()) 317 { 318 List<ProductAsset> result = productAssemblyInstructions.Where(pa => !relatedProductsAssemblyInstructions.Any(pa2 => pa2.FileName == pa.FileName)).ToList(); 319 //List<ProductAsset> result = productAssemblyInstructions; 320 relatedProductsAssemblyInstructions.AddRange(result); 321 } 322 } 323 } 324 } 325 } 326 } 327 328 329 <!--Templates/Designs/HagsCore/eCom/Product/Product.cshtml--> 330 331 @Scripts.Render("~/bundle/ProductFilter") 332 333 <input type="hidden" id="productVariantId" value="@GetString("Ecom:Product.VariantID")"> 334 335 <div class="m-heading m-theme-background-yellow m-theme-color-white breadcrumb product"> 336 <div class="l-page"> 337 <div class="container-fluid"> 338 @{ 339 string breadcrumb = HagsWeb.Library.Methods.Page.HagsPages.GetThisPageNavigation(pageUrl, GetGlobalValue("Global:Area.LongLang")); 340 } 341 <div class="m-menu-primary breadcrumb"> 342 <nav class="text-centre text-uppercase"> 343 @breadcrumb 344 </nav> 345 </div> 346 347 </div> <!-- container-fluid --> 348 </div> <!-- l-page --> 349 </div> <!-- m-heading --> 350 351 <div class="l-page"> 352 <div class="container-fluid"> 353 @*<p>@ipPriceAllowed || ShopID = @GetString("Ecom:Product.DefaultShopID")</p>*@ 354 @*<p> Variant?@GetString("Ecom:Product.VariantID")</p>*@ 355 @*<p> Age Range? @GetString("Ecom:Product:Field.AgeRange")</p>*@ 356 <div class="row"> 357 <div class="col-sm-7" style="float:right;"> 358 <div class="m-product-gallery-visual-print"> 359 @foreach (ProductAsset image in carouselImages) 360 { 361 <p style="text-align:center !important;"><img src="@image.uri" class="img-responsive" alt="Masthead image" /></p> 362 } 363 </div> <!-- m-product-gallery-visual --> 364 </div> 365 366 <div class="col-sm-5"> 367 368 <h1>@GetString("Ecom:Product.Name")</h1> 369 370 @if (!string.IsNullOrWhiteSpace(GetString("Ecom:Product.ShortDescription"))) 371 { 372 <p>@GetString("Ecom:Product.ShortDescription")</p> 373 } 374 375 @if (!string.IsNullOrWhiteSpace(GetString("Ecom:Product.LongDescription"))) 376 { 377 <p>@GetString("Ecom:Product.LongDescription")</p> 378 } 379 380 <div> 381 @if (thisPage.AreaID == 7) /*UK*/ 382 { 383 @*if (!string.IsNullOrEmpty(GetString("Ecom:Product:Field.UKProductNumber"))) 384 { 385 <h3 id="displayproductnumber">@GetString("Ecom:Product:Field.UKProductNumber")</h3> 386 } 387 else 388 { 389 <h3 id="displayproductnumber">@GetString("Ecom:Product.Number")</h3> 390 }*@ 391 } 392 else if (thisPage.AreaID == 2 && GetBoolean("Ecom:Product:Field.SwedishStock")) 393 { 394 // KOD Display the Swedish stock Product Number and display the Swedish Flag 395 <div style="float:left;display:block;"> 396 <h3 id="displayproductnumber"> 397 @productNumber-1 398 </h3> 399 </div> 400 <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"> 401 <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> 402 </div> 403 } 404 else 405 { 406 <h3 id="displayproductnumber">@productNumber</h3> 407 } 408 </div> 409 410 @*Check if its a Master product*@ 411 412 @if (!string.IsNullOrWhiteSpace(selectedColourVariant ?? selectedAnchoringVariant ?? selectedMaterialVariant ?? selectedOptionVariant)) 413 { 414 <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"> 415 416 @*Display the correct icon*@ 417 @if (!string.IsNullOrEmpty(selectedAnchoringIcon)) 418 { 419 <img src="Files/Templates/Designs/HagsCore/res/img/icons/anchoring/@selectedAnchoringIcon" alt="@selectedAnchoringVariant" style="display:block;float:left;" /> 420 } 421 <p style="display:block;float:left; margin-left:12px">@selectedOptionVariant<br />@selectedColourVariant &ndash; @selectedAnchoringVariant</p> 422 </div> 423 } 424 425 @*Only UK and Sweden have Pricing at the moment*@ 426 @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*/ 427 { 428 string krPrice = GetInteger("Ecom:Product.DBPrice") == 0 ? Translate("RequestAQuote", "Kontakta oss") : GetString("Ecom:Product.Price.PriceFormatted").Replace(",00", ""); 429 <div style="clear:both;"><p><strong>@Translate("Price", "Price"): @krPrice</strong></p></div> 430 } 431 432 @if (thisPage.AreaID == 7) /*UK*/ 433 { 434 if (!string.IsNullOrEmpty(GetString("Ecom:Product:Field.UKProductNumber"))) 435 { 436 <p><strong>@Translate("ProductNumber", "Product Number"):</strong> @GetValue("Ecom:Product:Field.UKProductNumber")</p> 437 } 438 439 if (ipPriceAllowed.Contains(currentCountry) || ipPriceAllowed.Contains("Hags_")) 440 { 441 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")); 442 <div style="clear:both;"><p><strong>@Translate("Price", "Price"): @ukPrice</strong></p></div> 443 } 444 445 } 446 447 @if (GetInteger("Ecom:Product:Field.SafetyAreaLength.Value.Raw") > 0 && GetInteger("Ecom:Product:Field.SafetyAreaWidth.Value.Raw") > 0) 448 { 449 <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")"> 450 <img src="Files/Templates/Designs/HagsCore/res/img/icons/whtstar.png" alt="s" style="display:block;float:left;" /> 451 <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> 452 </div> 453 } 454 455 456 <div class="col-sm-12 panel-group" style="display:block;float:left;width:100%;margin-top:18px;" id="accordion" role="tablist" aria-multiselectable="false"> 457 <div class="panel panel-default"> 458 <div class="panel-heading" role="tab" id="headingOne"> 459 <h4 class="m-panel-title panel-title"> 460 <a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseOne" aria-expanded="true" aria-controls="collapseOne" class=""> 461 @Translate("ProductSpecifications", "Product Specifications") 462 </a> 463 </h4> 464 </div> 465 <div id="collapseOne" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingOne" aria-expanded="true"> 466 <div class="panel-body"> 467 <div id="product-left"> 468 <div class="padding"> 469 470 <div id="product-list-information" class="box-padding"> 471 472 <ul> 473 474 @if (!String.IsNullOrWhiteSpace(GetString("Ecom:Product:Field.AgeRange")) && ageRanges.Any()) 475 { 476 <li><span><strong>@GetString("Ecom:Product:Field.AgeRange.Name"):</strong></span> <span>@string.Join(", ", ageRanges)</span></li> 477 } 478 @if (GetDouble("Ecom:Product:Field.AssemblyTime.Value.Raw") > 0) 479 { 480 <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> 481 } 482 @if (GetDouble("Ecom:Product:Field.Length.Value.Raw") > 0) 483 { 484 <li><span><strong>@GetString("Ecom:Product:Field.Length.Name"):</strong></span> <span>@GetString("Ecom:Product:Field.Length.Value.Raw") mm</span></li> 485 } 486 @if (GetDouble("Ecom:Product:Field.Width.Value.Raw") > 0) 487 { 488 <li><span><strong>@GetString("Ecom:Product:Field.Width.Name"):</strong></span> <span>@GetString("Ecom:Product:Field.Width.Value.Raw") mm</span></li> 489 } 490 @if (GetDouble("Ecom:Product:Field.Height.Value.Raw") > 0) 491 { 492 <li><span><strong>@GetString("Ecom:Product:Field.Height.Name"):</strong></span> <span>@GetString("Ecom:Product:Field.Height.Value.Raw") mm</span></li> 493 } 494 @if (GetDouble("Ecom:Product:Field.NetWeight.Value.Raw") > 0) 495 { 496 <li><span><strong>@GetString("Ecom:Product:Field.NetWeight.Name"):</strong></span> <span>@GetString("Ecom:Product:Field.NetWeight.Value") kg</span></li> 497 } 498 @if (GetDouble("Ecom:Product:Field.Volume.Value.Raw") > 0) 499 { 500 <li><span><strong>@GetString("Ecom:Product:Field.Volume.Name"):</strong></span> <span>@GetString("Ecom:Product:Field.Volume.Value.Raw") m&#179;</span></li> 501 } 502 @if (GetDouble("Ecom:Product:Field.FallHeight.Value.Raw") > 0) 503 { 504 <li><span><strong>@GetString("Ecom:Product:Field.FallHeight.Name"):</strong></span> <span>@GetString("Ecom:Product:Field.FallHeight.Value.Raw") mm</span></li> 505 } 506 @if (GetDouble("Ecom:Product:Field.SafetyAreaWidth.Value.Raw") > 0) 507 { 508 <li><span><strong>@GetString("Ecom:Product:Field.SafetyAreaWidth.Name"):</strong></span> <span>@GetString("Ecom:Product:Field.SafetyAreaWidth.Value.Raw") mm</span></li> 509 } 510 @if (GetDouble("Ecom:Product:Field.SafetyAreaLength.Value.Raw") > 0) 511 { 512 <li><span><strong>@GetString("Ecom:Product:Field.SafetyAreaLength.Name"):</strong></span> <span>@GetString("Ecom:Product:Field.SafetyAreaLength.Value.Raw") mm</span></li> 513 } 514 @if (GetDouble("Ecom:Product:Field.SafetyArea.Value.Raw") > 0) 515 { 516 <li><span><strong>@GetString("Ecom:Product:Field.SafetyArea.Name"):</strong></span> <span>@GetDouble("Ecom:Product:Field.SafetyArea.Value") m&#178;</span></li> 517 } 518 519 </ul> 520 521 @*Anchoring from Variant*@ 522 @if (!string.IsNullOrEmpty(selectedAnchoringVariant)) 523 { 524 string anchoringPage = HagsWeb.Library.Utilities.DWUtilities.GetPageByNavigationTag("AnchoringTypes", thisPage.AreaID); 525 526 if (!string.IsNullOrEmpty(anchoringPage)) 527 { 528 <a href="@anchoringPage" class="print-hide">@Translate("ReadMoreAnchoring", "Read more about anchoring")</a> 529 } 530 531 } 532 533 </div> 534 535 </div> <!--! .padding --> 536 </div> 537 </div> 538 </div> 539 </div> 540 541 @if (!string.IsNullOrWhiteSpace(GetString("Ecom:Product:Field.Material"))) 542 { 543 <div class="panel panel-default"> 544 <div class="panel-heading" role="tab" id="headingTwo"> 545 <h4 class="m-panel-title panel-title"> 546 <a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseTwo" aria-expanded="true" aria-controls="collapseTwo" class="collapsed"> 547 @GetString("Ecom:Product:Field.Material.Name") 548 </a> 549 </h4> 550 </div> 551 <div id="collapseTwo" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingTwo" aria-expanded="true"> 552 <div class="panel-body"> 553 <div id="product-left"> 554 <div class="padding"> 555 556 557 <p>&nbsp;</p> 558 @{ 559 560 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"); 561 if (!string.IsNullOrEmpty(materialData)) 562 { 563 //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")); 564 System.Xml.Linq.XDocument dataXML = System.Xml.Linq.XDocument.Parse(materialData); 565 566 if (dataXML != null) 567 { 568 System.Globalization.NumberFormatInfo format = new System.Globalization.NumberFormatInfo(); 569 format.NumberGroupSeparator = ","; //for thousands 570 format.NumberDecimalSeparator = "."; //the decimal seperator 571 572 var totalweight = Math.Round((from nd in dataXML.Descendants("kg") 573 select Double.Parse(nd.Value, format)).Sum(), 0).ToString(); 574 575 var totalpercent = Math.Round((from nd in dataXML.Descendants("percent") 576 select Double.Parse(nd.Value, format)).Sum(), 0).ToString(); 577 578 var details = from dat in dataXML.Descendants("Item") 579 select new 580 { 581 material = dat.Element("material").Value, 582 weight = dat.Element("kg").Value,// string.Format("{0:0.00}", Double.Parse(dat.Element("kg").Value)), Occasionally throwing format errors 583 percent = dat.Element("percent").Value // string.Format("{0:0.00}", Double.Parse(dat.Element("percent").Value)) 584 }; 585 586 <table class="table"> 587 <thead> 588 <tr> 589 <th>@GetString("Ecom:Product:Field.Material.Name")</th> 590 <th>kg</th> 591 <th>&#37;</th> 592 </tr> 593 </thead> 594 595 <tbody> 596 597 @foreach (var item in details) 598 { 599 <tr> 600 <td>@item.material</td> 601 <td>@item.weight</td> 602 <td>@item.percent</td> 603 </tr> 604 } 605 606 607 608 </tbody> 609 610 <tfoot> 611 <tr> 612 <td>&nbsp;</td> 613 <td><strong>@totalweight kg</strong></td> 614 <td><strong>@totalpercent&#37;</strong></td> 615 </tr> 616 </tfoot> 617 </table> <!--! #table-materials --> 618 } 619 } 620 621 } 622 623 </div> <!--! .padding --> 624 </div> 625 </div> 626 </div> 627 </div> 628 629 } 630 631 </div> 632 633 </div> 634 635 <div class="col-sm-7"> 636 637 <div class="m-product-gallery-visual print-hide" style="margin-top: 30px;display:block;float:left;width:100%;"> 638 <ul> 639 @foreach (ProductAsset image in carouselImages) 640 { 641 <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> 642 } 643 </ul> 644 </div> <!-- m-product-gallery-visual --> 645 646 <div class="m-decal-container"> 647 648 @* ageRanges KOD *@ 649 <div class="m-decal"> 650 <ul class="list-inline"> 651 652 @if (!String.IsNullOrWhiteSpace(GetString("Ecom:Product:Field.AgeRange")) && ageRanges.Any()) 653 { 654 foreach (var range in ageRanges) 655 { 656 <li class="decal"> 657 <div class="decal-header" data-toggle="tooltip" data-placement="top" title="@GetString("Ecom:Product:Field.AgeRange.Name") @range"> 658 <img src="Files/Templates/Designs/HagsCore/res/img/decals/agerange.png" alt="@GetString("Ecom:Product:Field.AgeRange.Name") @range" /> 659 <span class="decalvalue">@range</span> 660 </div> 661 </li> 662 } 663 } 664 665 @if (GetDouble("Ecom:Product:Field.AssemblyTime.Value.Raw") > 0) 666 { 667 <li class="decal"> 668 <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"> 669 670 <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" /> 671 672 <span class="decalvalue">@Math.Ceiling(GetDouble("Ecom:Product:Field.AssemblyTime.Value.Raw"))</span> 673 674 </div> 675 </li> 676 } 677 678 @if (GetDouble("Ecom:Product:Field.FallHeight.Value.Raw") > 0) 679 { 680 <li class="decal"> 681 <div class="decal-header" data-toggle="tooltip" data-placement="top" title="@GetString("Ecom:Product:Field.FallHeight.Name") @GetString("Ecom:Product:Field.FallHeight.Value.Raw")"> 682 683 <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")" /> 684 685 <span class="decalvalue">@GetString("Ecom:Product:Field.FallHeight.Value.Raw")</span> 686 687 </div> 688 </li> 689 } 690 691 @if (GetDouble("Ecom:Product:Field.SafetyArea.Value.Raw") > 0) 692 { 693 <li class="decal"> 694 <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;"> 695 696 <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;" /> 697 698 <span class="decalvalue">@GetDouble("Ecom:Product:Field.SafetyArea.Value")</span> 699 700 </div> 701 </li> 702 } 703 </ul> 704 </div> <!-- m-decals --> 705 706 </div> <!-- m-decals-container --> 707 708 @if (thumbs.Count() > 0) 709 { 710 <div class="m-product-gallery-sync slider-nav print-hide"> 711 712 <ul class="list-inline thumbnails"> 713 @foreach (ProductAsset thumb in thumbs) 714 { 715 716 if (thumb != null) 717 { 718 <li><img src="@thumb.uri" class="thumbnail img-responsive" alt="Masthead image" /></li> 719 } 720 721 722 @*if (!string.IsNullOrEmpty(thumb.uri)) 723 { 724 <li><img src="@thumb.uri" class="thumbnail img-responsive" alt="Masthead image" /></li> 725 }*@ 726 } 727 @*<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> 728 <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> 729 <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> 730 <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>*@ 731 732 </ul> 733 </div> 734 } 735 736 737 <div> 738 739 <ul class="m-btn-menu-secondary print-hide"> 740 @{ 741 var imagesCount = assets.Select(n => n).Where(n => n.Index == AssetTypeEnum.ToFriendlyAssetName(AssetType.Images)).Count(); 742 var brochCount = assets.Select(n => n).Where(n => n.Index == AssetTypeEnum.ToFriendlyAssetName(AssetType.Brochures)).Count(); 743 } 744 745 @if (imagesCount + brochCount < assets.Count()) 746 { 747 <li> 748 <a class="m-btn-xs-more btn btn-default btn-xs text-uppercase" href="#collapseThree" 749 role="button" 750 data-toggle="collapse" 751 data-parent="#productdownload" 752 id="productDownloadButton" 753 aria-controls="collapseThree">@Translate("ProductDownloads", "Product Downloads")</a> 754 </li> 755 } 756 757 @{ 758 if (hiResDownloads.Count() > 0) 759 { 760 List<string> fileList = new List<string>(); 761 foreach (var file in hiResDownloads) 762 { 763 fileList.Add(file.FullPath); 764 } 765 766 <li> 767 <form method="post" id="downloadImagesForm"> 768 <input type="hidden" name="DownloadImages" value="@productNumber" /> 769 @GetButton(fileList, "Product") 770 </form> 771 772 </li> 773 } 774 } 775 776 777 <li> 778 <a class="m-btn-xs-more btn btn-default btn-xs text-uppercase" href="" 779 role="button" 780 data-toggle="collapse" 781 data-parent="#productdownload" 782 id="productSheetButton" 783 aria-controls="collapseFour" onclick="javascript:window.print();">@Translate("ProductSheet", "Product Sheet")</a> 784 </li> 785 786 @*<li>Check this again do we add a master with default Variant combinatiions to my product collection?? button is hidden.</li>*@ 787 @*<li>@GetString("Ecom:Product.SelectedVariantComboName")||Variant Group Link: @GetString("Ecom:Product.VariantLinkGroup") |**| @GetLoop("VariantCombinations").Count()</li>*@ 788 789 @*<li>@prod.Id||@GetString("Ecom:Product.LanguageID") || @GetString("Ecom:Product.Number") || @prod.IsVariantMaster</li>*@ 790 @*<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>*@ 791 792 793 @if (!string.IsNullOrEmpty(GetString("Ecom:Product.VariantID")) || GetLoop("VariantCombinations").Count() == 1) 794 { 795 //display the button if we have the appropriate script loaded (advanced-search-min.js) 796 @*<li>@GetString("Ecom:Product.VariantID") || @GetLoop("VariantCombinations").Count()</li>*@ 797 798 <li id="btnMyProductCollection" style="margin-top: 8px;"> 799 800 @if (isProductCollection) 801 { 802 <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> 803 } 804 else 805 { 806 <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> 807 } 808 809 </li> 810 } 811 812 813 @*only works if logged-in 814 <li><a href="@GetString("Ecom:Product.AddToList")">Add To List Do something else</a></li>*@ 815 816 @*@if (GetBoolean("Ecom:CatalogPublishing.UseCatalogPublishing")) 817 { 818 <li class="show" style="clear: both; width: 100%;padding-bottom:5px; text-align: right;"> 819 <a href="/default.aspx?id=@GetString("Ecom:Product:Page.ID")&amp;productid=@GetString("Ecom:Product.ID")&amp;CatalogPublishingcmd=addtocatalog">Add to catalog</a> 820 </li> 821 } 822 823 @if (GetBoolean("Ecom:CatalogPublishing.UseCatalogPublishing")) 824 { 825 <li class="show" style="clear: both; width: 100%;padding-bottom:5px; text-align: right;"> 826 <a href="/default.aspx?CatalogPublishingcmd=preview">Catalog Publishing</a> 827 </li> 828 }*@ 829 </ul> 830 831 </div> 832 833 <div class="panel-group" id="productdownload" role="tablist" aria-multiselectable="false"> 834 835 <div id="collapseThree" class="panel-collapse collapse" role="tabpanel" aria-labelledby="productDownloadButton" aria-expanded="true" style="height: 0px;"> 836 837 <div class="panel panel-default panel-body print-hide"> 838 839 @{ 840 List<ProductAsset> certAssets = new List<ProductAsset>(); 841 if (thisPage.AreaID == 1) 842 { 843 certAssets = assets.Where(n => n.Index == AssetTypeEnum.ToFriendlyAssetName(AssetType.Certificates)).ToList(); 844 } 845 else 846 { 847 certAssets = assets.Where(n => n.Index == AssetTypeEnum.ToFriendlyAssetName(AssetType.Certificates) && n.FileName.StartsWith(currentCountry + "_")).ToList(); 848 } 849 850 if (certAssets.Count() == 0) // if none are found try to get GB certificates 851 { 852 certAssets = assets.Where(n => n.Index == AssetTypeEnum.ToFriendlyAssetName(AssetType.Certificates) && n.FileName.StartsWith("GB_")).ToList(); 853 } 854 } 855 856 @if (certAssets.Count > 0) 857 { 858 <h5>@Translate("Certificates", "Certificates")</h5> 859 <ul> 860 @foreach (ProductAsset cert in certAssets) 861 { 862 863 <li> 864 <a href="@cert.uri" download="@cert.FileName"> 865 <span><img src="Files/Templates/Designs/HagsCore/res/img/icons/downloads/pdf_small.gif" /></span><span>@cert.FileName</span> 866 </a> 867 </li> 868 } 869 </ul> 870 } 871 872 873 @{ 874 List<ProductAsset> assemblyAssets = new List<ProductAsset>(); 875 assemblyAssets = assets.Where(n => n.Index == AssetTypeEnum.ToFriendlyAssetName(AssetType.AssemblyInstructions)).ToList(); 876 } 877 878 @if (assemblyAssets.Count > 0) 879 { 880 <h5>@Translate("InstallationGuides", "Installation Guides")</h5> 881 <ul> 882 @foreach (ProductAsset assemblyInstns in assemblyAssets) 883 { 884 <li> 885 <a href="@assemblyInstns.uri" download="@assemblyInstns.FileName"> 886 <span><img src="Files/Templates/Designs/HagsCore/res/img/icons/downloads/pdf_small.gif" /></span><span>@assemblyInstns.FileName</span> 887 </a> 888 </li> 889 } 890 </ul> 891 } 892 893 @if (relatedProductsAssemblyInstructions.Count > 0) 894 { 895 <h5>@Translate("DetailedInstallationGuides", "Detailed Installation Guides")</h5> 896 <ul class="list-column list-inline"> 897 @foreach (ProductAsset assemblyInstns in relatedProductsAssemblyInstructions) 898 { 899 <li> 900 <a href="@assemblyInstns.uri" download="@assemblyInstns.FileName"> 901 <span><img src="Files/Templates/Designs/HagsCore/res/img/icons/downloads/pdf_small.gif" /></span><span>@assemblyInstns.FileName</span> 902 </a> 903 </li> 904 } 905 </ul> 906 } 907 908 @{ 909 List<ProductAsset> dwgAssets = new List<ProductAsset>(); 910 dwgAssets = assets.Where(n => n.Index == AssetTypeEnum.ToFriendlyAssetName(AssetType.Drawings)).ToList(); 911 } 912 913 @if (dwgAssets.Count > 0) 914 { 915 <h5>@Translate("DWGFiles", "DWG Files")</h5> 916 <ul> 917 @foreach (ProductAsset dwg in dwgAssets) 918 { 919 <li> 920 <a href="@dwg.uri" download="@dwg.FileName"> 921 <span><img src="Files/Templates/Designs/HagsCore/res/img/icons/downloads/dwg_small.gif" /></span><span>@dwg.FileName</span> 922 </a> 923 </li> 924 } 925 </ul> 926 } 927 928 <h5>@Translate("GeneralInformation", "General Information")</h5> 929 <ul> 930 @if (thisPage.AreaID == 2) 931 { 932 <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> 933 <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> 934 } 935 else 936 { 937 <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> 938 <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> 939 } 940 941 </ul> 942 </div> 943 944 </div> 945 946 <div id="collapseFour" class="panel-collapse collapse" role="tabpanel" aria-labelledby="productSheetButton" aria-expanded="true" style="height: 0px;"> 947 948 <div class="panel-body print-hide"> 949 <p>Printed</p> 950 </div> 951 952 </div> 953 954 </div> 955 956 @if (!String.IsNullOrEmpty(salesPhoneNumber)) 957 { 958 string contactUsLink = DWUtilities.GetPageByNavigationTag("ContactUs", thisPage.AreaID); 959 <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> 960 } 961 962 963 </div> 964 </div> <!-- row --> 965 </div> <!-- container-fluid --> 966 </div> 967 968 @*Product Options*@ 969 @if (GetLoop("VariantCombinations").Count() > 0) 970 { 971 <div class="m-sort m-theme-background-lightgrey product-options print-hide"> 972 <div class="l-page"> 973 <div class="container-fluid"> 974 <div class="row"> 975 <div> 976 <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> 977 </div> 978 <form class="form-inline"> 979 <div id="filter-variants"> 980 981 @if (anchoringOptions.Results.Count() > 0) 982 { 983 <div class="form-container"> 984 <div class="form-group"> 985 <label for="anchoring" class="control-label">@Translate("Anchoring", "Anchoring")</label> 986 <select class="form-control valid third" id="filter-anchoring" name="anchoring"> 987 988 @if (anchoringOptions.Results.Count() > 1) 989 { 990 <option value="0">@Translate("Any", "Any")</option> 991 foreach (var anchor in anchoringOptions.Results.OrderBy(n => n.Sort)) 992 { 993 <option value="@anchor.Value">@anchor.Name</option> 994 } 995 } 996 else 997 { 998 ResultField result = anchoringOptions.Results.FirstOrDefault(); 999 <option value="@result.Value">@result.Name</option> 1000 } 1001 1002 </select> 1003 </div> 1004 1005 </div> 1006 } 1007 1008 @if (colourOptions.Results.Count() > 0) 1009 { 1010 <div class="form-container"> 1011 1012 <div class="form-group"> 1013 <label for="colour" class="control-label">@Translate("Colour", "Colour")</label> 1014 <select class="form-control valid first" id="filter-colour" name="colour"> 1015 1016 @if (colourOptions.Results.Count() > 1) 1017 { 1018 <option value="0">@Translate("Any", "Any")</option> 1019 foreach (var colour in colourOptions.Results.OrderBy(n => n.Sort)) 1020 { 1021 <option value="@colour.Value">@colour.Name</option> 1022 } 1023 } 1024 else 1025 { 1026 ResultField result = colourOptions.Results.FirstOrDefault(); 1027 <option value="@result.Value">@result.Name</option> 1028 } 1029 1030 1031 1032 </select> 1033 </div> 1034 1035 </div> 1036 } 1037 1038 @if (optionOptions.Results.Count() > 0) 1039 { 1040 <div class="form-container"> 1041 1042 <div class="form-group"> 1043 <label for="options" class="control-label">@Translate("ProductOptions", "Product Options")</label> 1044 <select class="form-control valid" id="filter-options" name="options"> 1045 1046 @if (optionOptions.Results.Count() > 1) 1047 { 1048 <option value="0">@Translate("Any", "Any")</option> 1049 foreach (var option in optionOptions.Results.OrderBy(n => n.Sort)) 1050 { 1051 <option value="@option.Value">@option.Name</option> 1052 } 1053 } 1054 else 1055 { 1056 ResultField result = optionOptions.Results.FirstOrDefault(); 1057 <option value="@result.Value">@result.Name</option> 1058 } 1059 </select> 1060 </div> 1061 1062 </div> 1063 } 1064 1065 </div> 1066 </form> 1067 </div> 1068 </div> 1069 </div> 1070 </div> 1071 1072 1073 <div class="l-page print-hide"> 1074 <div class="box-slider-filter-content" id="filter-variants-slider-content"> 1075 1076 @foreach (LoopItem variantCombinations in GetLoop("VariantCombinations")) 1077 { 1078 var colourOption = string.Empty; 1079 var optionOption = string.Empty; 1080 var anchorOption = string.Empty; 1081 var materialOption = string.Empty; 1082 var colourId = string.Empty; 1083 var optionId = string.Empty; 1084 var anchorId = string.Empty; 1085 var materialId = string.Empty; 1086 var selectedVariant = string.Empty; 1087 List<ProductAsset> productImages = AssetManager_Repository.GetAssets(variantCombinations.GetString("Ecom:VariantCombination.Product.Number"), AssetType.Images, false); 1088 ProductAsset image = productImages.Where(n => n.Index == AssetTypeEnum.ToFriendlyAssetName(AssetType.Images) && n.FileName.StartsWith("big_") || n.FileName.StartsWith("big_Color_")).FirstOrDefault(); 1089 1090 foreach (var group in GetLoop("VariantGroups").Where(n => n.GetString("Ecom:VariantGroup.ID") != "D")) 1091 { 1092 foreach (var availableOption in group.GetLoop("VariantAvailableOptions")) 1093 { 1094 1095 if (group.GetString("Ecom:VariantGroup.ID") == "S55") 1096 { 1097 1098 if (variantCombinations.GetString("Ecom:VariantCombination.VariantID").Contains(availableOption.GetString("Ecom:VariantOption.ID")) && availableOption.GetString("Ecom:VariantOption.Name") != "Not applicable") 1099 { 1100 colourOption = availableOption.GetString("Ecom:VariantOption.Name"); 1101 colourId = availableOption.GetString("Ecom:VariantOption.ID"); 1102 } 1103 1104 } 1105 if (group.GetString("Ecom:VariantGroup.ID") == "ATP1") 1106 { 1107 if (variantCombinations.GetString("Ecom:VariantCombination.VariantID").Contains(availableOption.GetString("Ecom:VariantOption.ID")) && availableOption.GetString("Ecom:VariantOption.Name") != "Not applicable") 1108 { 1109 materialOption = availableOption.GetString("Ecom:VariantOption.Name"); 1110 materialId = availableOption.GetString("Ecom:VariantOption.ID"); 1111 } 1112 } 1113 if (group.GetString("Ecom:VariantGroup.ID") == "ATP3") 1114 { 1115 if (variantCombinations.GetString("Ecom:VariantCombination.VariantID").Contains(availableOption.GetString("Ecom:VariantOption.ID")) && availableOption.GetString("Ecom:VariantOption.Name") != "Not applicable") 1116 { 1117 anchorOption = availableOption.GetString("Ecom:VariantOption.Name"); 1118 anchorId = availableOption.GetString("Ecom:VariantOption.ID"); 1119 } 1120 } 1121 if (group.GetString("Ecom:VariantGroup.ID") == "ATP4") 1122 { 1123 if (variantCombinations.GetString("Ecom:VariantCombination.VariantID").Contains(availableOption.GetString("Ecom:VariantOption.ID")) && availableOption.GetString("Ecom:VariantOption.Name") != "Not applicable") 1124 { 1125 optionOption = availableOption.GetString("Ecom:VariantOption.Name"); 1126 optionId = availableOption.GetString("Ecom:VariantOption.ID"); 1127 } 1128 } 1129 if (variantCombinations.GetBoolean("Ecom:VariantCombination.Selected")) 1130 { 1131 selectedVariant = "selected-variant"; 1132 } 1133 } 1134 1135 } 1136 1137 <div class="m-attractor @selectedVariant" style="margin-bottom: 4em;"> 1138 1139 <div class="m-attractor-visual" style="height:180px;"> 1140 @if (image != null && !String.IsNullOrEmpty(image.uri)) 1141 { 1142 <a href="@variantCombinations.GetString("Ecom:VariantCombination.Link.Clean")"><img src="@image.uri" class="img-responsive m-product-thumb" /></a> 1143 } 1144 else 1145 { 1146 <img src="/Files/Templates/Designs/HagsCore/res/img/image-not-found.png" class="img-responsive m-product-thumb" /> 1147 } 1148 </div> 1149 1150 <input type="hidden" name="prop-colour" value="@colourId" /> 1151 <input type="hidden" name="prop-anchoring" value="@anchorId" /> 1152 <input type="hidden" name="prop-option" value="@optionId" /> 1153 1154 <div class="m-attractor-info m-attractor-info-product"> 1155 1156 1157 @if (thisPage.AreaID == 7) /*UK*/ 1158 { 1159 string ukId = HagsWeb.Library.Methods.ProductProperties.ProductFieldValues.GetUkProductNumber(variantCombinations.GetString("Ecom:VariantCombination.Product.Number"), thisPage.Area.EcomLanguageId); 1160 <h3 class="m-theme-after-yellow m-theme-border-yellow"><a href="@variantCombinations.GetString("Ecom:VariantCombination.Link.Clean")">@ukId.ToString()</a></h3> 1161 } 1162 else 1163 { 1164 <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> 1165 } 1166 1167 <div class="m-attractor-info m-attractor-info-product"> 1168 <p>@optionOption<br /> @colourOption - @anchorOption</p> 1169 </div> 1170 <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> 1171 </div> 1172 </div> 1173 1174 } 1175 </div> 1176 1177 <div class="m-message" style="display:none;padding-bottom:20px;padding-left:6px;"> 1178 <p style="font-size: 1.2em;color:red;"><b>@Translate("VariantFilterMessage", "There were no options available for selection.")</b></p> 1179 </div> 1180 </div> 1181 } 1182 1183 @* Play Functions*@ 1184 @if (relatedProducts.Any()) 1185 { 1186 int count = relatedProducts.Count(); 1187 <div class="m-heading m-theme-background-lightgrey print-hide"> 1188 <div class="l-page"> 1189 <div class="container-fluid"> 1190 <h4 class="m-panel-title">@Translate("PlayFunctions", "Play Functions")</h4> 1191 </div> <!-- container-fluid --> 1192 </div> <!-- l-page --> 1193 </div> 1194 1195 <div class="l-page play-functions print-hide" style="margin-bottom: 3em;"> 1196 <div class="box-slider-content" id="related-products-slider-content"> 1197 1198 @foreach (Product product in relatedProducts) 1199 { 1200 List<ProductAsset> productImages = AssetManager_Repository.GetAssets(product.Number, AssetType.Images, false); 1201 ProductAsset image = productImages.Where(n => n.Index == AssetTypeEnum.ToFriendlyAssetName(AssetType.Images) && n.FileName.StartsWith("big_") || n.FileName.StartsWith("big_Color_")).FirstOrDefault(); 1202 1203 <div class="l-group-content col-xs-12 col-ms-4 col-sm-2 modules"> 1204 <div class="m-attractor"> 1205 <div class="m-attractor-visual"> 1206 @if (image != null && !String.IsNullOrEmpty(image.uri)) 1207 { 1208 <img src="@image.uri" class="img-responsive m-product-thumb" /> 1209 } 1210 else 1211 { 1212 <img src="/Files/Templates/Designs/HagsCore/res/img/image-not-found.png" class="img-responsive m-product-thumb" /> 1213 } 1214 </div> 1215 <div class="m-attractor-info m-attractor-info-product"> 1216 <h3 class="m-theme-after-yellow m-theme-border-yellow">@product.Name</h3> 1217 </div> <!-- attractor-info --> 1218 </div> <!-- attractor --> 1219 </div> 1220 } 1221 1222 </div> <!-- box-slider-content --> 1223 </div><!-- l-page --> 1224 } 1225 1226 @*Related Products*@ 1227 @if (relatedComponentProducts.Any()) 1228 { 1229 int count = relatedComponentProducts.Count(); 1230 <div class="m-heading m-theme-background-lightgrey print-hide"> 1231 <div class="l-page"> 1232 <div class="container-fluid"> 1233 <h4 class="m-panel-title">@Translate("RelatedProducts", "Related Products")</h4> 1234 </div> <!-- container-fluid --> 1235 </div> <!-- l-page --> 1236 </div> 1237 1238 <div class="l-page play-functions print-hide" style="margin-bottom: 3em;"> 1239 <div class="box-slider-content" id="related-products-slider-content"> 1240 1241 @foreach (Product product in relatedComponentProducts) 1242 { 1243 List<ProductAsset> productImages = AssetManager_Repository.GetAssets(product.Number, AssetType.Images, false); 1244 ProductAsset image = productImages.Where(n => n.Index == AssetTypeEnum.ToFriendlyAssetName(AssetType.Images) && n.FileName.StartsWith("big_") || n.FileName.StartsWith("big_Color_")).FirstOrDefault(); 1245 1246 <div class="l-group-content col-xs-12 col-ms-4 col-sm-2 modules"> 1247 <div class="m-attractor"> 1248 <div class="m-attractor-visual"> 1249 @if (image != null && !String.IsNullOrEmpty(image.uri)) 1250 { 1251 <img src="@image.uri" class="img-responsive m-product-thumb" /> 1252 } 1253 else 1254 { 1255 <img src="/Files/Templates/Designs/HagsCore/res/img/image-not-found.png" class="img-responsive m-product-thumb" /> 1256 } 1257 </div> 1258 <div class="m-attractor-info m-attractor-info-product"> 1259 <h3 class="m-theme-after-yellow m-theme-border-yellow">@product.Name</h3> 1260 </div> <!-- attractor-info --> 1261 </div> <!-- attractor --> 1262 </div> 1263 } 1264 1265 </div> <!-- box-slider-content --> 1266 </div><!-- l-page --> 1267 } 1268 1269 1270