Search Advanced Close

Um Produktinformationen zum Herunterladen zu finden, klicken Sie auf eine der oben stehenden Optionen und verwenden die Suchfelder, um sich die relevanten Dokumente anzeigen zu lassen.

 

Search Advanced Close

Sie haben keine Produkte in Ihrer Merkliste

Search Advanced Close

Kingsland Primary School, Vereinigtes Königreich

Die Kingsland Primary School ist eine hervorragend bewertete SEN-Schule in Wakefield, Yorkshire, die Kinder mit einer Reihe von Lernbehinderungen versorgt. Sie baten HAGS, Spielbereiche für jeden ihrer beiden Standorte zu entwerfen und zu bauen.

22.01.2019 15:42:00

Weiterlesen

Spielplatz mit Baumhaus-Thema, Schweden

Einer fantastische inklusive Spielplatz in der Stadt Uppsala, Schweden, mit einer individuell angepasste UniPlay Spielanlage im Baumhaus-Design.

03.12.2018 17:27:00

Weiterlesen

UniMini, Husum

-

30.11.2018 17:10:00

Weiterlesen

Get more inspiration from other installations all around the world

Alle Referenzprojekte ansehen
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 HagsWeb.Library.Methods.ProductFilter.ProductFilter.GetRelatedProducts(String productNumber, String relatedproductGroupName)
   at CompiledRazorTemplates.Dynamic.RazorEngine_b4ee9f2bd14b4622b28ca6a368f64d3f.Execute() in C:\Projects\Hags_Dw9\Files\Templates\Designs\HagsCore\eCom\Product\Product.cshtml:line 294
   at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader)
   at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.b__0(TextWriter writer)
   at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()

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