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