Glasparken i Limmared
I juni 2019 invigdes en ny aktivitetspark i Limmared - Glasparken
2019-08-20 15:02:00
Mer informationSockerlekan i Staffanstorp
Sockerlekan i Staffanstorp. Tillgänglig lekplats med tema Sockerbruk-jordbruksindustri.
2019-06-13 10:08:00
Mer informationVasaparken i Uppsala
En fin och välplanerad,riktigt bra tillgänglighetsanpassad park.
2018-07-12 09:17:00
Mer informationError executing template "Designs/HagsCore/eCom/Product/Product.cshtml" System.IndexOutOfRangeException: Index was outside the bounds of the array. at CompiledRazorTemplates.Dynamic.RazorEngine_250808a086194b2d9404ff24bda36305.Execute() in B:\Hags_Live_B\Files\Templates\Designs\HagsCore\eCom\Product\Product.cshtml:line 880 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; 3 @using System.Collections.Generic; 4 @using System.Linq; 5 @using System.Web.Optimization; 6 @using Dynamicweb.Content.Items; 7 @using Dynamicweb.Ecommerce.Products; 8 @using HagsWeb.Library.Methods.AssetManager; 9 @using HagsWeb.Library.BusinessObjects.UsersLists; 10 @using HagsWeb.Library.Methods.AssetSearch; 11 @using HagsWeb.Library.Methods.Page; 12 @using HagsWeb.Library.Methods.ProductImages; 13 @using HagsWeb.Library.Methods.ProductProperties; 14 @using HagsWeb.Library.Methods.ProductFilter; 15 @using HagsWeb.Library.Services.IPService; 16 @using HagsWeb.Library.Services.FileSystemService; 17 @using HagsWeb.Library.Utilities; 18 @using HagsWeb.Library.State; 19 20 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 21 @using Dynamicweb.Rendering; 22 @using System; 23 @using System.Web; 24 @using System.Collections.Generic; 25 @using System.Linq; 26 @using Ionic.Zip; 27 @using System.IO; 28 @using System.Threading; 29 30 31 @helper GetButton(List<string> files, string sender) 32 { 33 var request = HttpContext.Current.Request.Form; 34 var response = HttpContext.Current.Response; 35 36 if (!string.IsNullOrEmpty(request["DownloadImages"])) 37 { 38 // Currently only used for Product Image download on results page - see also GetDownload.cshtml 39 // To do KOD extract this into a service in Library, also consider Hags\Application\Ajax\UsersProductCollection\UsersProductCollection.aspx.cs(398) 40 if (files.Any()) 41 { 42 try 43 { 44 45 var zipArchives = System.Web.HttpContext.Current.Server.MapPath("Files/System/UserDownloads/Zips"); 46 var transferFolder = System.Web.HttpContext.Current.Server.MapPath("Files/System/UserDownloads/Transfers"); 47 48 // empty the zipArchives folder of zips that are 30 mins old (if any) 49 var oldZips = new DirectoryInfo(zipArchives).EnumerateFiles() 50 .Where(f => f.CreationTime < DateTime.Now.AddMinutes(-30)) 51 .ToList(); 52 oldZips.ForEach(f => f.Delete()); 53 54 DirectoryInfo Folder = new DirectoryInfo(transferFolder); 55 // Occasionally some files are read only and cannot be deleted so change all files, remove readonly before the delete 56 Folder.EnumerateFiles().ToList().ForEach(file => file.Attributes = FileAttributes.Normal); 57 Directory.EnumerateFiles(transferFolder).ToList().ForEach(f => System.IO.File.Delete(f)); 58 59 // copy the selected files to the transferFolder and change from ReadOnly to try to prevent access to the path is denied error 60 files.ForEach(f => System.IO.File.Copy(f, Path.Combine(transferFolder, Path.GetFileName(f)), true)); 61 Folder.EnumerateFiles().ToList().ForEach(file => file.Attributes = FileAttributes.Normal); 62 63 // Set up our new zip folder 64 var downloadFileName = string.Format("Hags_Download_Pack-{0}.zip", DateTime.Now.ToString("dd-MM-yyyy-HH_mm_ss")); 65 66 //var zipLocationUrl = "Files/System/UserDownloads/Zips/" + downloadFileName; // Use this to return a link to the folder saved to disk 67 68 HttpContext.Current.Response.ContentType = "application/x-zip-compressed"; // Important - as is AppendHeader, not AddHeader 69 HttpContext.Current.Response.AppendHeader("Content-Disposition", "filename=" + downloadFileName); 70 71 using (var zip = new ZipFile()) 72 { 73 List<string> fileList = Directory.EnumerateFiles(transferFolder).ToList(); 74 //zip.AddDirectoryByName(subfolderName); 75 foreach (string file in fileList) 76 { 77 zip.AddFile(file, string.Empty); 78 } 79 80 // Save to the OutputStream 81 zip.Save(HttpContext.Current.Response.OutputStream); 82 // Or save the file to the file system using TransmitFile to stream the file without storing to memory 83 //zip.Save(zipArchives + "/" + downloadFileName); 84 } 85 86 // Transmit a file that was created on disk 87 //HttpContext.Current.Response.ContentType = "application/x-zip-compressed"; 88 //HttpContext.Current.Response.AppendHeader("Content-Disposition", "filename=" + downloadFileName); 89 //HttpContext.Current.Response.TransmitFile(zipArchives + "/" + downloadFileName); 90 91 92 93 } 94 catch (ZipException ze) 95 { 96 string message = ze + "ProductDownload/GetDownloadButton.cshtml ZipException download file error (" + sender + ") - Original File Count: " + files.Count() + "InnerEx: " + ze.InnerException + ""; 97 Dynamicweb.Logging.ILogger log = Dynamicweb.Logging.LogManager.Current.GetLogger("File Download Service"); 98 log.Info(message); 99 } 100 catch (System.IO.FileNotFoundException notFoundEx) 101 { 102 string message = notFoundEx + "../Templates/HagsModules/UsersAssetsSearch/ProductDownloads/GetDownloadButton.cshtml (" + sender + ") " + notFoundEx.Message + " - The File: " + notFoundEx.FileName +""; 103 Dynamicweb.Logging.ILogger log = Dynamicweb.Logging.LogManager.Current.GetLogger("File Download Service"); 104 log.Info(message); 105 } 106 catch (ThreadAbortException) 107 { 108 // A normal Thread abort after HttpContext.Current.Response.End(); we dont record it 109 } 110 catch (Exception ex) 111 { 112 string message = ex + "../Templates/HagsModules/UsersAssetsSearch/ProductDownloads/GetDownloadButton.cshtml (" + sender + ") " + ex.Message + " - The Inner Ex: " + ex.InnerException + ""; 113 Dynamicweb.Logging.ILogger log = Dynamicweb.Logging.LogManager.Current.GetLogger("File Download Service"); 114 log.Info(message); 115 } 116 finally 117 { 118 HttpContext.Current.Response.End(); 119 } 120 121 } 122 } 123 else 124 { 125 string buttonCaption = string.Empty; 126 if (sender == "Product") 127 { 128 buttonCaption = Translate("ImageDownloads", "Image Downloads"); 129 } 130 if (sender == "AdvancedSearch") 131 { 132 buttonCaption = Translate("DownloadAll", "Download All"); 133 } 134 135 <a class="m-btn-xs-more download btn btn-default btn-xs text-uppercase" 136 onclick="$('#downloadImagesForm').submit(); return false;" role="button"> 137 @buttonCaption 138 </a> 139 } 140 } 141 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 142 @using System.Collections.Generic 143 @using HagsWeb.Library.BusinessObjects.UsersLists 144 145 @{ 146 Layout = null; 147 } 148 149 @helper ProductPdfHelper(List<ProductCollectionItem> catalogueCollectionItems, string LanguageId) 150 { 151 <!--Files\Templates\HagsModules\UsersAssetsSearch\ProductDownloads\PdfProductSheet.cshtml--> 152 @*the bootstrap modal background/backdrop misbehaves in some browsers covering the modal completly so turn it off data-background="false"*@ 153 <div id="CreatePdf" class="modal fade in" data-background="false" tabindex="-1" role="dialog" aria-labelledby="CreateCatalogModalLabel" aria-hidden="true"> 154 <div class="modal-backdrop fade in" data-backdrop="static" style="z-index:180;"></div> 155 <div class="modal-dialog" style="width: 850px"> 156 <div class="m-form-contact-modal modal-content"> 157 <div class="modal-header"> 158 <button type="button" class="close blue-close icon-remove" data-dismiss="modal"></button> 159 <button type="button" class="close" data-dismiss="modal"> 160 <span aria-hidden="true">x</span> 161 <span class="sr-only">Close</span> 162 </button> 163 <h4 class="modal-title" id="CreateCatalogModalLabel"> 164 @Translate("YourProductSheet", "Your Product Sheet") 165 </h4> 166 </div> 167 168 <div id="frm_ProductSheet"> 169 <div class="row2"> 170 <div id="" class="tab-content"> 171 @*<div id="cat-custom" class="tab-pane fade in active">*@ 172 <div id="cat-custom"> 173 <div class="l-page"> 174 <div class="container-fluid"> 175 <div class="col-ms-12 col-sm-12" style="margin-top: 5px;"> 176 177 @*<div class="col-ms-6 col-sm-6">*@ 178 <div class="row2"> 179 <div id="loader" style="display:block;text-align:center"> 180 <span id="CreateProductPdfLabel" style="display: inline-block;margin: 10px 10px 0 0;padding: 5px 10px"></span> 181 <img src="Files/Templates/Designs/HagsCore/res/img/loader/ajax-loader.gif" style="margin:auto;display:block;" /> 182 </div> 183 184 185 186 187 <div id="productPdfViewerloader" class="hide"> 188 189 <embed id="embedPdfViewer" style="margin:0px 7px 0px 7px;" src="" type="application/pdf" width="886" height="600" /> 190 <iframe id="iframePdfViewer" style="margin:0px 7px 0px 7px; border:none;" src="" type="application/pdf" width="886" height="600"></iframe> 191 192 </div> 193 194 195 196 197 198 @*<div id="productPdfViewer"> 199 <object id="pdfObjectViewer" style="display: none;" data="" type="application/pdf" width="100%" height="600" /> 200 <embed id="pdfViewer" style="display: none;" src="" type="application/pdf" /> 201 <iframe src="" id="pdfIframeViewer" width="100%" height="600" type="application/pdf" style="display:none;" /> 202 </div>*@ 203 </div> 204 @*</div>*@ 205 </div> 206 </div> <!--container - fluid--> 207 </div> 208 </div> 209 </div> 210 </div> 211 212 <div id="CreatePdfMessage"></div> 213 214 </div> 215 216 <div class="modal-footer" id="main-footer"> 217 218 <div class="m-search-advanced-buttons text-center"> 219 220 @*<button class="m-btn-search btn btn-default text-uppercase" name="createemail" type="button" role="button">Email Catalogue</button>*@ 221 222 <button class="m-btn-search btn btn-default text-uppercase" data-dismiss="modal" type="button">@Translate("Cancel", "Cancel")</button> 223 <a href="" class="m-btn-search btn btn-default text-uppercase disabled" id="pdfPrintSheet" target="_blank" type="button">@Translate("Print", "Print")</a> 224 <a href="" class="m-btn-search btn btn-default text-uppercase disabled" id="pdfDownloadSheet" download type="button">@Translate("Download", "Download")</a> 225 226 </div> 227 228 </div> 229 230 </div> 231 </div> 232 233 </div> 234 235 } 236 237 238 @{ 239 Dynamicweb.Frontend.PageView thisPage = Dynamicweb.Frontend.PageView.Current() ?? Dynamicweb.Frontend.PageView.Current(); 240 Item areaItem = Item.GetItemById("Website_Settings", thisPage.Area.Item.Id); 241 string pageUrl = GetGlobalValue("Global:Request.Scheme") + "://" + GetGlobalValue("Global:Request.Host") + thisPage.SearchFriendlyUrl; 242 var siteSection = HagsPages.GetSiteSection(thisPage.AreaID, thisPage.ID); 243 string salesPhoneNumber = areaItem["Telephone"].ToString(); 244 245 string productNumber = GetString("Ecom:Product.Number"); // The Product NUMBER 246 247 string currentCulture = GetGlobalValue("Global:Area.LongLang"); //en-GB, sv-SE 248 string currentCountry = currentCulture.Substring(currentCulture.Length - 2); // GB, SE 249 string currentlanguage = currentCulture.Substring(0, 2); // en, sv "de";// 250 string ipPriceAllowed = string.Empty; 251 252 if (thisPage.AreaID == 2 || thisPage.AreaID == 7) // Sweden and UK 253 { 254 ipPriceAllowed = IPCheck.CountryPriceAllowed(currentCountry); //ZZZ,Hags_GB,Hags_SE and Hags_, Anon_GB, Anon_SE network range checker(Web.config) 255 } 256 257 IEnumerable<ProductAsset> assets = AssetManager_Repository.GetAssets(productNumber, AssetType.All, true); 258 IEnumerable<ProductAsset> allImages = assets.Where(n => n.Index == AssetTypeEnum.ToFriendlyAssetName(AssetType.Images)); 259 260 // New sorting for Product Images, thumbs and hiResDownloads for Zoom Images 261 Tuple<SortedList<int, string[,]>, IEnumerable<ProductAsset>> mainProductImages = ProductImages.MarshallZoomImages(allImages, productNumber); 262 SortedList<int,string[,]> zoomList = mainProductImages.Item1; 263 IEnumerable<ProductAsset> hiResDownloads = mainProductImages.Item2; 264 265 266 // The users Product Collection in session 267 List<ProductCollectionItem> productCollectionItems = SessionManager.UsersMyProductCollection != null ? SessionManager.UsersMyProductCollection : new List<ProductCollectionItem>(); 268 bool isProductCollection = productCollectionItems.Any(n => n.ProductNumber == productNumber); 269 270 // users Product Collection 271 string collectionData = string.Empty; 272 273 if (!String.IsNullOrWhiteSpace(GetGlobalValue("Global:Extranet.Name"))) 274 { 275 // not used even if logged-in collectionData = GetString("Ecom:Product.AddToList"); // only available if logged-in 276 } 277 else 278 { 279 collectionData = string.Format("CCAddToMyLists={0}&CCAddToListVariantID={1}&CCAreaID={2}&CCAddToListCulture={3}&CCAddToListLanguageID={4}#{5}", 280 GetString("Ecom:Product.Number"), GetString("Ecom:Product.VariantID"), GetGlobalValue("Global:Area.ID"), GetGlobalValue("Global:Area.LongLang"), @GetString("Ecom:Product.LanguageID"), siteSection); 281 } 282 283 // New Age Ranges. Some Template Tags dont work very well in upgraded DW version 9.7.2 284 List<string> ageRanges = new List<string>(); 285 if (!string.IsNullOrEmpty(GetString("Ecom:Product:Field.AgeRange"))) 286 { 287 ageRanges = ProductAgeRanges.GetAgeRanges(GetString("Ecom:Product:Field.AgeRange"), GetString("Ecom:Product.LanguageID")); 288 } 289 290 // For filtering the variants of this product 291 ResultSet colourOptions = new ResultSet(); 292 ResultSet materialOptions = new ResultSet(); 293 ResultSet anchoringOptions = new ResultSet(); 294 ResultSet optionOptions = new ResultSet(); 295 296 297 string selectedColourVariant = string.Empty; 298 string selectedAnchoringVariant = string.Empty; 299 string selectedAnchoringIcon = string.Empty; 300 string selectedMaterialVariant = string.Empty; 301 string selectedOptionVariant = string.Empty; 302 Product prod = new ProductService().GetProductById(GetString("Ecom:Product.ID"), GetString("Ecom:Product.VariantID"), GetString("Ecom:Product.LanguageID")); 303 304 305 306 if (GetInteger("Ecom:Product.VariantCount") > 0) 307 { 308 foreach (var variantGroup in GetLoop("VariantGroups").Where(n => n.GetString("Ecom:VariantGroup.ID") != "D")) // Remove All Date Variants 309 { 310 int optionsCount = variantGroup.GetLoop("VariantAvailableOptions").Count(); 311 312 if (optionsCount > 0) 313 { 314 if (!string.IsNullOrEmpty("Ecom:Product.SelectedVariantComboID")) // optionsCount == 1 315 { 316 foreach (var availableOption in variantGroup.GetLoop("VariantAvailableOptions")) 317 { 318 319 if (variantGroup.GetString("Ecom:VariantGroup.ID") == "S55") 320 { 321 colourOptions.Name = variantGroup.GetString("Ecom:VariantGroup.Name"); 322 323 if (availableOption.GetString("Ecom:VariantOption.Name") != "Not applicable") 324 { 325 326 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 }); 327 328 if (availableOption.GetBoolean("Ecom:VariantOption.Selected")) 329 { 330 selectedColourVariant = availableOption.GetString("Ecom:VariantOption.Name"); 331 } 332 } 333 } 334 if (variantGroup.GetString("Ecom:VariantGroup.ID") == "ATP1") 335 { 336 materialOptions.Name = variantGroup.GetString("Ecom:VariantGroup.Name"); 337 338 if (availableOption.GetString("Ecom:VariantOption.Name") != "Not applicable") 339 { 340 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 }); 341 342 if (availableOption.GetBoolean("Ecom:VariantOption.Selected")) 343 { 344 selectedMaterialVariant = availableOption.GetString("Ecom:VariantOption.Name"); 345 } 346 } 347 } 348 if (variantGroup.GetString("Ecom:VariantGroup.ID") == "ATP3") 349 { 350 anchoringOptions.Name = variantGroup.GetString("Ecom:VariantGroup.Name"); 351 352 if (availableOption.GetString("Ecom:VariantOption.Name") != "Not applicable") 353 { 354 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 }); 355 356 if (availableOption.GetBoolean("Ecom:VariantOption.Selected")) 357 { 358 selectedAnchoringVariant = availableOption.GetString("Ecom:VariantOption.Name"); 359 selectedAnchoringIcon = availableOption.GetString("Ecom:VariantOption.ID") + ".png"; 360 } 361 } 362 } 363 if (variantGroup.GetString("Ecom:VariantGroup.ID") == "ATP4") 364 { 365 optionOptions.Name = variantGroup.GetString("Ecom:VariantGroup.Name"); 366 367 if (availableOption.GetString("Ecom:VariantOption.Name") != "Not applicable") 368 { 369 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 }); 370 371 if (availableOption.GetBoolean("Ecom:VariantOption.Selected")) 372 { 373 selectedOptionVariant = availableOption.GetString("Ecom:VariantOption.Name"); 374 } 375 } 376 377 } 378 } 379 } 380 } 381 } 382 } 383 384 385 string assemblyInstructionsProductNumber = productNumber; 386 387 // Related Products are only assigned to Master Products, not Variant Products so we need the related Products from the Master to get the full list of 388 // Assembly Instructions 389 if (!prod.IsVariantMaster) 390 { 391 assemblyInstructionsProductNumber = new ProductService().GetProductsAndVariantsByProduct(prod) 392 .FirstOrDefault<Product>(n => string.IsNullOrEmpty(n.VariantId)).Number; 393 } 394 395 // Check if its a Master product. 396 // Implementation of Variant Fallback overrides if no Variant is specified Original Product.cshtml is maintained in ProductV21TESTING.cshtml 397 398 Tuple<string, string, string, string, string> optionsTuple; 399 if (!string.IsNullOrEmpty(GetString("Ecom:Product.VariantID")) || !string.IsNullOrEmpty(GetString("Ecom:Product:Field.ProductVariantFallback"))) 400 { 401 string VariantId = string.IsNullOrEmpty(GetString("Ecom:Product.VariantID")) ? GetString("Ecom:Product:Field.ProductVariantFallback") : GetString("Ecom:Product.VariantID"); 402 optionsTuple = ProductFieldValues.GetProductOptions(VariantId, GetString("Ecom:Product.LanguageID")); 403 404 selectedColourVariant = optionsTuple.Item1; 405 selectedAnchoringVariant = optionsTuple.Item2; 406 selectedMaterialVariant = optionsTuple.Item3; 407 selectedOptionVariant = optionsTuple.Item4; 408 selectedAnchoringIcon = optionsTuple.Item5; 409 410 } 411 412 // Related Products and their Assembly Instructions 413 List<Product> relatedProducts = new List<Product>(); // Play Functions // Related products are now not required to be shown as a list of products. Gareth 17/02/2020 414 List<Product> relatedComponentProducts = new List<Product>(); 415 List<ProductAsset> relatedProductsAssemblyInstructions = new List<ProductAsset>(); 416 417 string variantOptions = selectedMaterialVariant + " " + selectedAnchoringVariant + " " + selectedOptionVariant + " " + selectedColourVariant; 418 419 if (GetInteger("Ecom:Product.RelatedCount") > 0) 420 { 421 // Play Functions // 422 if (GetLoop("ProductRelatedGroups").Where(n => n.GetString("Ecom:Product:RelatedGroup.Name") == "Product Modules") != null) 423 { 424 relatedProducts = ProductFilter.GetRelatedProducts(GetString("Ecom:Product.Number"), "Product Modules", GetString("Ecom:Product.LanguageID")); 425 } 426 427 if (GetLoop("ProductRelatedGroups").Where(n => n.GetString("Ecom:Product:RelatedGroup.Name") == "Product Components") != null) 428 { 429 relatedComponentProducts = ProductFilter.GetRelatedProducts(assemblyInstructionsProductNumber, "Product Components", GetString("Ecom:Product.LanguageID")); 430 //// Lookup Assembly Instructions Assets 431 foreach (Product product in relatedComponentProducts) 432 { 433 if (product != null) 434 { 435 List<ProductAsset> productAssemblyInstructions = AssetManager_Repository.GetAssets(product.Number, AssetType.AssemblyInstructions, false); 436 if (productAssemblyInstructions.Any()) 437 { 438 List<ProductAsset> result = productAssemblyInstructions.Where(pa => !relatedProductsAssemblyInstructions.Any(pa2 => pa2.FileName == pa.FileName)).ToList(); 439 //List<ProductAsset> result = productAssemblyInstructions; 440 relatedProductsAssemblyInstructions.AddRange(result); 441 } 442 } 443 } 444 } 445 } 446 447 // Find the Paraent top Group 448 449 Enum enumProductType = DWUtilities.GetTopGroupForProduct(prod.Groups.ToList()); 450 451 // Testing for Brand Banner Image 452 ProductFieldValue productBrand = prod.ProductFieldValues.GetProductFieldValue("Brand"); 453 string bannerImage = string.Empty; 454 FieldOption brandFieldOption = new FieldOption(); 455 456 457 if (productBrand != null) 458 { 459 brandFieldOption = FieldOption.GetOptionsByFieldId(productBrand.ProductField.Id).FirstOrDefault(n => n.Value == productBrand.Value.ToString()); 460 if (brandFieldOption != null) 461 { 462 bannerImage = "/Files/Templates/HagsModules/HagsPDFTemplates/Original/BrochureImages/" + brandFieldOption.Name + "_Banner.jpg"; 463 } 464 else if (enumProductType != null) 465 { 466 bannerImage = "/Files/Templates/HagsModules/HagsPDFTemplates/Original/BrochureImages/" + enumProductType.ToString() + "_Banner.jpg"; 467 } 468 else 469 { 470 bannerImage = "/Files/Templates/HagsModules/HagsPDFTemplates/Original/BrochureImages/Hags_Banner.jpg"; 471 } 472 473 } 474 } 475 476 477 <!--Templates/Designs/HagsCore/eCom/Product/Product.cshtml--> 478 479 @Scripts.Render("~/bundle/ProductFilter") 480 <script src='https://cdnjs.cloudflare.com/ajax/libs/elevatezoom/3.0.8/jquery.elevatezoom.min.js'></script> 481 482 @ProductPdfHelper(productCollectionItems, GetString("Ecom:Product.LanguageID")) 483 484 <input type="hidden" id="productVariantId" value="@GetString("Ecom:Product.VariantID")"> 485 486 <div class="m-heading m-theme-background-yellow m-theme-color-white breadcrumb product"> 487 <div class="l-page"> 488 <div class="container-fluid"> 489 @{ 490 string breadcrumb = HagsPages.GetThisPageNavigation(pageUrl, GetGlobalValue("Global:Area.LongLang"), variantOptions); // " "; // 491 } 492 <div class="m-menu-primary breadcrumb"> 493 <nav class="text-centre text-uppercase"> 494 @breadcrumb 495 </nav> 496 </div> 497 498 </div> <!-- container-fluid --> 499 </div> <!-- l-page --> 500 </div> <!-- m-heading --> 501 <div class="l-page"> 502 <div class="container-fluid"> 503 @*<p>@ipPriceAllowed || ShopID = @GetString("Ecom:Product.DefaultShopID")</p>*@ 504 @*<p> Product? @GetString("Ecom:Product.ID") || @GetString("Ecom:Product.Number")</p>*@ 505 @*<p> isVariantMaster? @prod.IsVariantMaster</p> 506 <p> Variant? @GetString("Ecom:Product.VariantID") </p> 507 <p> FallbackVariant? @GetString("Ecom:Product:Field.ProductVariantFallback") </p> 508 <p>Material(@selectedMaterialVariant) || Option(@selectedOptionVariant)<br /> 509 Colour(@selectedColourVariant) – 510 Anchoring(@selectedAnchoringVariant) </p>*@ 511 @*<p> Variant Options? @variantOptions || @prod.VariantId</p>*@ 512 @*<p> Age Range? @GetString("Ecom:Product:Field.AgeRange")</p>*@ 513 @*<p>@GetString("Ecom:Product:Field.Brand.Name"): @(brandFieldOption != null ? brandFieldOption.Name : "Value is Null") || @GetString("Ecom:Product:Field.Brand.Value") || @(enumProductType != null ? enumProductType.ToString() : "ProductType Enum is Null") || @bannerImage</p>*@ 514 515 <div class="row"> 516 517 <div class="col-sm-5"> 518 519 <h1>@GetString("Ecom:Product.Name")</h1> 520 521 @if (!string.IsNullOrWhiteSpace(GetString("Ecom:Product.ShortDescription"))) 522 { 523 <p>@GetString("Ecom:Product.ShortDescription")</p> 524 } 525 526 @if (!string.IsNullOrWhiteSpace(GetString("Ecom:Product.LongDescription"))) 527 { 528 <p>@GetString("Ecom:Product.LongDescription")</p> 529 } 530 531 <div style="display:block;float:left;margin-right:24px;"> 532 @if (thisPage.AreaID == 7) /*UK*/ 533 { 534 @*if (!string.IsNullOrEmpty(GetString("Ecom:Product:Field.UKProductNumber"))) 535 { 536 <h3 id="displayproductnumber">@GetString("Ecom:Product:Field.UKProductNumber")</h3> 537 } 538 else 539 { 540 <h3 id="displayproductnumber">@GetString("Ecom:Product.Number")</h3> 541 }*@ 542 } 543 else if (thisPage.AreaID == 2 && GetBoolean("Ecom:Product:Field.SwedishStock")) 544 { 545 //Display the Swedish stock Product Number and display the Swedish Flag 546 <div style="float:left;display:block;"> 547 <h3 id="displayproductnumber"> 548 @productNumber-1 549 </h3> 550 </div> 551 <div style="float:left;display:block;margin-top:6px;margin-left:16px;" data-toggle="tooltip" data-placement="top" title="Leverans ex lager från Sverige"> 552 <img src="/Admin/Images/Flags/flag_se.png" alt="Leverans ex lager från Sverige" style="display:block;float:left;width:24px;" /><p style="display:block;float:left; margin-left:6px;margin-top:4px;">Snabb Leverans</p> 553 </div> 554 } 555 else 556 { 557 <h3 id="displayproductnumber">@productNumber</h3> 558 } 559 </div> 560 561 @if (!string.IsNullOrWhiteSpace(selectedAnchoringIcon ?? selectedAnchoringVariant)) 562 { 563 <div style="display:block;float:left;overflow:auto;margin-left:0px;width:100%" data-toggle="tooltip" data-placement="top" title="@Translate(" Anchoring", "Anchoring" ): @selectedAnchoringVariant"> 564 @*Display the correct icon*@ 565 @if (!string.IsNullOrEmpty(selectedAnchoringIcon)) 566 { 567 <img src="Files/Templates/Designs/HagsCore/res/img/icons/anchoring/@selectedAnchoringIcon" alt="@selectedAnchoringVariant" style="display:block;float:left;" /> 568 } 569 570 <p style="display: block; float: left; margin-left: 12px; margin-bottom: 0px;"> 571 @selectedMaterialVariant @selectedOptionVariant<br /> 572 @selectedColourVariant – @selectedAnchoringVariant 573 574 </p> 575 </div> 576 } 577 578 @if (GetInteger("Ecom:Product:Field.SafetyAreaLength.Value.Raw") > 0 && GetInteger("Ecom:Product:Field.SafetyAreaWidth.Value.Raw") > 0) 579 { 580 <div class="col-sm-6" style="display:block;float:left;width:100%;margin-top:12px;padding-left:0px;margin-bottom:16px;" data-toggle="tooltip" data-placement="top" title="@GetString(" Ecom:Product:Field.SafetyAreaWidth.Name") x @GetString("Ecom:Product:Field.SafetyAreaLength.Name")"> 581 <img src="Files/Templates/Designs/HagsCore/res/img/icons/whtstar.png" alt="s" style="display:block;float:left;" /> 582 <p style="display:block;float:left;margin-left:12px;margin-top:3px;margin-bottom:0px;width:auto;">@GetInteger("Ecom:Product:Field.SafetyAreaWidth.Value.Raw") x @GetInteger("Ecom:Product:Field.SafetyAreaLength.Value.Raw")</p> 583 </div> 584 } 585 586 <div class="m-decal-container" style="width:100%;display:block;float:left;"> 587 588 @* ageRanges *@ 589 <div class="m-decal"> 590 <ul class="list-inline"> 591 592 @if (!String.IsNullOrWhiteSpace(GetString("Ecom:Product:Field.AgeRange")) && ageRanges.Any()) 593 { 594 foreach (var range in ageRanges) 595 { 596 if (range.Trim() != "-") 597 { 598 <li class="decal"> 599 <div class="decal-header" data-toggle="tooltip" data-placement="top" title="@GetString(" Ecom:Product:Field.AgeRange.Name") @range"> 600 <img src="Files/Templates/Designs/HagsCore/res/img/decals/agerange.png" alt="@GetString(" Ecom:Product:Field.AgeRange.Name") @range" /> 601 <span class="decalvalue">@range</span> 602 </div> 603 </li> 604 } 605 } 606 } 607 608 @if (GetDouble("Ecom:Product:Field.AssemblyTime.Value.Raw") > 0) 609 { 610 <li class="decal"> 611 <div class="decal-header" data-toggle="tooltip" data-placement="top" title="@GetString(" Ecom:Product:Field.AssemblyTime.Name") @Math.Ceiling(GetDouble("Ecom:Product:Field.AssemblyTime.Value.Raw")) hrs"> 612 613 <img src="Files/Templates/Designs/HagsCore/res/img/decals/time.png" alt="@GetString(" Ecom:Product:Field.AssemblyTime.Name") @Math.Ceiling(GetDouble("Ecom:Product:Field.AssemblyTime.Value.Raw")) hrs" /> 614 615 <span class="decalvalue">@Math.Ceiling(GetDouble("Ecom:Product:Field.AssemblyTime.Value.Raw"))</span> 616 617 </div> 618 </li> 619 } 620 621 @if (GetDouble("Ecom:Product:Field.FallHeight.Value.Raw") > 0) 622 { 623 <li class="decal"> 624 <div class="decal-header" data-toggle="tooltip" data-placement="top" title="@GetString(" Ecom:Product:Field.FallHeight.Name") @GetString("Ecom:Product:Field.FallHeight.Value.Raw")"> 625 626 <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")" /> 627 628 <span class="decalvalue">@GetString("Ecom:Product:Field.FallHeight.Value.Raw")</span> 629 630 </div> 631 </li> 632 } 633 634 @if (GetDouble("Ecom:Product:Field.SafetyArea.Value.Raw") > 0) 635 { 636 <li class="decal"> 637 <div class="decal-header" data-toggle="tooltip" data-placement="top" title="@GetString(" Ecom:Product:Field.SafetyArea.Name") @GetDouble("Ecom:Product:Field.SafetyArea.Value")m²"> 638 639 <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²" /> 640 641 <span class="decalvalue">@GetDouble("Ecom:Product:Field.SafetyArea.Value")</span> 642 643 </div> 644 </li> 645 } 646 647 @if (GetBoolean("Ecom:Product:Field.InclusivePlay.Value") && thisPage.AreaID == 2) 648 { 649 <li class="decal"> 650 <div class="decal-header" data-toggle="tooltip" data-placement="top" title="Inclusive Play"> 651 652 <img src="Files/Templates/Designs/HagsCore/res/img/decals/play-for-all-small.png" alt="Inclusive Play" /> 653 654 </div> 655 </li> 656 } 657 658 </ul> 659 </div> <!-- m-decals --> 660 </div> <!-- m-decals-container --> 661 @*Only UK and Sweden have Pricing at the moment*@ 662 @if (thisPage.AreaID == 2 && (ipPriceAllowed.Contains(currentCountry) || ipPriceAllowed.Contains("Hags_"))) /*Sweden - would like no ,00 in dwFormattedPrice and a message if there is no price*/ 663 { 664 string krPrice = GetInteger("Ecom:Product.DBPrice") == 0 ? Translate("RequestAQuote", "Kontakta oss") : GetString("Ecom:Product.Price.PriceFormatted").Replace(",00", ""); 665 <div style="clear:both;"><p><strong>@Translate("Price", "Price"): @krPrice</strong></p></div> 666 } 667 668 @if (thisPage.AreaID == 7) /*UK*/ 669 { 670 if (!string.IsNullOrEmpty(GetString("Ecom:Product:Field.UKProductNumber"))) 671 { 672 <p><strong>@Translate("ProductNumber", "Product Number"):</strong> @GetValue("Ecom:Product:Field.UKProductNumber")</p> 673 } 674 675 @* GL 15/02/2021 now remove all pricing for the UK (Also check pdf templates)*@ 676 @*if (ipPriceAllowed.Contains(currentCountry) || ipPriceAllowed.Contains("Hags_")) 677 { 678 string ukPrice = (GetDouble("Ecom:Product:Field.UKProductPrice") == 0) ? "On Application" : "£" + string.Format(new System.Globalization.CultureInfo("en-GB", false), "{0:c}", GetValue("Ecom:Product:Field.UKProductPrice")); 679 <div style="clear:both;"><p><strong>@Translate("Price", "Price"): @ukPrice </strong></p></div> 680 }*@ 681 682 } 683 684 <div class="col-sm-12 panel-group" style="display:block;float:left;width:100%;margin-top:18px;" id="accordion" role="tablist" aria-multiselectable="false"> 685 <div class="panel panel-default"> 686 <div class="panel-heading" role="tab" id="headingOne"> 687 <h4 class="m-panel-title panel-title"> 688 <a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseOne" aria-expanded="true" aria-controls="collapseOne" class=""> 689 @Translate("ProductSpecifications", "Product Specifications") 690 </a> 691 </h4> 692 </div> 693 <div id="collapseOne" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingOne" aria-expanded="true"> 694 <div class="panel-body"> 695 <div id="product-left"> 696 <div class="padding"> 697 698 <div id="product-list-information" class="box-padding"> 699 700 <ul> 701 702 @if (!String.IsNullOrWhiteSpace(GetString("Ecom:Product:Field.AgeRange")) && ageRanges.Any()) 703 { 704 <li><span><strong>@GetString("Ecom:Product:Field.AgeRange.Name"):</strong></span> <span>@string.Join(", ", ageRanges)</span></li> 705 } 706 @if (GetDouble("Ecom:Product:Field.AssemblyTime.Value.Raw") > 0) 707 { 708 <li><span><strong>@GetString("Ecom:Product:Field.AssemblyTime.Name"):</strong></span> <span>@Math.Ceiling(GetDouble("Ecom:Product:Field.AssemblyTime.Value.Raw")) @Translate("Hours", "hours")</span></li> 709 } 710 @if (GetDouble("Ecom:Product:Field.Length.Value.Raw") > 0) 711 { 712 <li><span><strong>@GetString("Ecom:Product:Field.Length.Name"):</strong></span> <span>@GetString("Ecom:Product:Field.Length.Value.Raw") mm</span></li> 713 } 714 @if (GetDouble("Ecom:Product:Field.Width.Value.Raw") > 0) 715 { 716 <li><span><strong>@GetString("Ecom:Product:Field.Width.Name"):</strong></span> <span>@GetString("Ecom:Product:Field.Width.Value.Raw") mm</span></li> 717 } 718 @if (GetDouble("Ecom:Product:Field.Height.Value.Raw") > 0) 719 { 720 <li><span><strong>@GetString("Ecom:Product:Field.Height.Name"):</strong></span> <span>@GetString("Ecom:Product:Field.Height.Value.Raw") mm</span></li> 721 } 722 @if (GetDouble("Ecom:Product:Field.NetWeight.Value.Raw") > 0) 723 { 724 <li><span><strong>@GetString("Ecom:Product:Field.NetWeight.Name"):</strong></span> <span>@GetString("Ecom:Product:Field.NetWeight.Value") kg</span></li> 725 } 726 @if (GetDouble("Ecom:Product:Field.Volume.Value.Raw") > 0) 727 { 728 <li><span><strong>@GetString("Ecom:Product:Field.Volume.Name"):</strong></span> <span>@GetString("Ecom:Product:Field.Volume.Value.Raw") m³</span></li> 729 } 730 @if (GetDouble("Ecom:Product:Field.FallHeight.Value.Raw") > 0) 731 { 732 <li><span><strong>@GetString("Ecom:Product:Field.FallHeight.Name"):</strong></span> <span>@GetString("Ecom:Product:Field.FallHeight.Value.Raw") mm</span></li> 733 } 734 @if (GetDouble("Ecom:Product:Field.SafetyAreaWidth.Value.Raw") > 0) 735 { 736 <li><span><strong>@GetString("Ecom:Product:Field.SafetyAreaWidth.Name"):</strong></span> <span>@GetString("Ecom:Product:Field.SafetyAreaWidth.Value.Raw") mm</span></li> 737 } 738 @if (GetDouble("Ecom:Product:Field.SafetyAreaLength.Value.Raw") > 0) 739 { 740 <li><span><strong>@GetString("Ecom:Product:Field.SafetyAreaLength.Name"):</strong></span> <span>@GetString("Ecom:Product:Field.SafetyAreaLength.Value.Raw") mm</span></li> 741 } 742 @if (GetDouble("Ecom:Product:Field.SafetyArea.Value.Raw") > 0) 743 { 744 <li><span><strong>@GetString("Ecom:Product:Field.SafetyArea.Name"):</strong></span> <span>@GetDouble("Ecom:Product:Field.SafetyArea.Value") m²</span></li> 745 } 746 747 </ul> 748 749 @*Anchoring from Variant*@ 750 @if (!string.IsNullOrEmpty(selectedAnchoringVariant)) 751 { 752 string anchoringPage = DWUtilities.GetPageByNavigationTag("AnchoringTypes", thisPage.AreaID); 753 754 if (!string.IsNullOrEmpty(anchoringPage)) 755 { 756 <a href="@anchoringPage" class="print-hide">@Translate("ReadMoreAnchoring", "Read more about anchoring")</a> 757 } 758 759 } 760 761 </div> 762 763 </div> <!--! .padding --> 764 </div> 765 </div> 766 </div> 767 </div> 768 769 @if (!string.IsNullOrWhiteSpace(GetString("Ecom:Product:Field.Material"))) 770 { 771 <div class="panel panel-default"> 772 <div class="panel-heading" role="tab" id="headingTwo"> 773 <h4 class="m-panel-title panel-title"> 774 <a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseTwo" aria-expanded="true" aria-controls="collapseTwo" class="collapsed"> 775 @GetString("Ecom:Product:Field.Material.Name") 776 </a> 777 </h4> 778 </div> 779 <div id="collapseTwo" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingTwo" aria-expanded="true"> 780 <div class="panel-body"> 781 <div id="product-left"> 782 <div class="padding"> 783 784 785 <p> </p> 786 @{ 787 788 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"); 789 if (!string.IsNullOrEmpty(materialData)) 790 { 791 //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")); 792 System.Xml.Linq.XDocument dataXML = System.Xml.Linq.XDocument.Parse(materialData); 793 794 if (dataXML != null) 795 { 796 System.Globalization.NumberFormatInfo format = new System.Globalization.NumberFormatInfo(); 797 //format.NumberGroupSeparator = ","; //for thousands 798 //format.NumberDecimalSeparator = "."; //the decimal seperator 799 800 var totalweight = Math.Round((from nd in dataXML.Descendants("kg") 801 select Double.Parse(nd.Value, format)).Sum(), 0).ToString(); 802 803 var totalpercent = Math.Round((from nd in dataXML.Descendants("percent") 804 select Double.Parse(nd.Value, format)).Sum(), 0).ToString(); 805 806 var details = from dat in dataXML.Descendants("Item") 807 select new 808 { 809 material = dat.Element("material").Value, 810 //weight = dat.Element("kg").Value,// string.Format("{0:0.00}", Double.Parse(dat.Element("kg").Value)), Occasionally throwing format errors 811 weight = Math.Round(Double.Parse(dat.Element("kg").Value, format), 1).ToString(),// string.Format("{0:0.00}", Double.Parse(dat.Element("kg").Value)), Occasionally throwing format errors 812 percent = Math.Round(Double.Parse(dat.Element("percent").Value, format), 1).ToString() // string.Format("{0:0.00}", Double.Parse(dat.Element("percent").Value)) 813 }; 814 815 <table class="table"> 816 <thead> 817 <tr> 818 <th>@GetString("Ecom:Product:Field.Material.Name")</th> 819 <th>kg</th> 820 <th>%</th> 821 </tr> 822 </thead> 823 824 <tbody> 825 826 @foreach (var item in details) 827 { 828 <tr> 829 <td>@item.material</td> 830 <td>@item.weight</td> 831 <td>@item.percent</td> 832 </tr> 833 } 834 835 836 837 </tbody> 838 839 <tfoot> 840 <tr> 841 <td> </td> 842 <td><strong>@totalweight kg</strong></td> 843 <td><strong>@totalpercent%</strong></td> 844 </tr> 845 </tfoot> 846 </table> <!--! #table-materials --> 847 } 848 } 849 850 } 851 852 </div> <!--! .padding --> 853 </div> 854 </div> 855 </div> 856 </div> 857 858 } 859 860 </div> 861 862 </div> 863 864 <div class="col-sm-7"> 865 866 @*Zoom Product Images*@ 867 868 @if (zoomList.Count > 0) 869 { 870 871 string[,] imageSet = new string[0, 0]; 872 if (zoomList.Count > 1) 873 { 874 var firstZoomSet = zoomList.FirstOrDefault(); 875 876 if (firstZoomSet.Key == 1) 877 { 878 imageSet = firstZoomSet.Value; 879 } 880 } 881 882 <img id="img_01" src="@imageSet[0, 1]" data-zoom-image="@imageSet[0, 2]" class="active" style="width: 100%;" alt="@GetString("Ecom:Product.Name")"/> 883 884 <div class="m-product-gallery-sync slider-nav print-hide" id="productgallery_01" style="padding: 10px 0px 10px 0px;"> 885 886 @foreach (var zoomSet in zoomList) 887 { 888 var imgSet = zoomSet.Value; 889 var imgId = string.Format("img_0{0}", zoomSet.Key); 890 891 <a href="#" data-image="@imgSet[0, 1]" data-zoom-image="@imgSet[0, 2]"> 892 <img id="@imgId" src="@imgSet[0, 0]" alt="@GetString("Ecom:Product.Name")"/> 893 </a> 894 } 895 896 897 </div> 898 } 899 900 901 <style type="text/css"> 902 /*Note: Don't forget to put the class name you set on the default gallery image so it shows active from the start.*/ 903 /*set a border on the images to prevent shifting*/ 904 905 #productgallery_01 img { 906 } 907 908 /*Change the colour of the thumbnail image border*/ 909 .activeZoom img { 910 border: 2px solid; 911 border-color: rgb(245, 192, 24) !important; 912 } 913 </style> 914 915 <script type="text/javascript"> 916 917 //initiate the plugin on the single first image and pass the id of the div containing gallery images 918 $("#img_01").elevateZoom({ 919 gallery: 'productgallery_01', 920 zoomType: 'lens', 921 lensShape: 'square', 922 lensSize: 230, 923 lensBorder: '1', 924 containLensZoom: true, 925 lensOpacity: '0.1', 926 borderColour: '#F5C018', 927 //tint: true, 928 //tintColour: '#F5C018', 929 cursor: 'zoom-in', 930 galleryActiveClass: 'activeZoom', 931 responsive: true, 932 easing: true, 933 loadingIcon: '/Files/Templates/Designs/HagsCore/res/img/loader/ajax-loader.gif' 934 }); 935 936 </script> 937 938 939 940 <div> 941 942 <ul class="m-btn-menu-secondary print-hide"> 943 @{ 944 var imagesCount = assets.Select(n => n).Where(n => n.Index == AssetTypeEnum.ToFriendlyAssetName(AssetType.Images)).Count(); 945 var brochCount = assets.Select(n => n).Where(n => n.Index == AssetTypeEnum.ToFriendlyAssetName(AssetType.Brochures)).Count(); 946 } 947 948 @if (imagesCount + brochCount < assets.Count()) 949 { 950 <li> 951 <a class="m-btn-xs-more download btn btn-default btn-xs text-uppercase" href="#collapseThree" 952 role="button" 953 data-toggle="collapse" 954 data-parent="#productdownload" 955 id="productDownloadButton" 956 aria-controls="collapseThree">@Translate("ProductDownloads", "Product Downloads")</a> 957 </li> 958 } 959 960 @{ 961 if (hiResDownloads.Count() > 0) 962 { 963 List 964 <string> 965 fileList = new List<string> 966 (); 967 foreach (var file in hiResDownloads) 968 { 969 fileList.Add(file.FullPath); 970 } 971 972 <li> 973 <form method="post" id="downloadImagesForm"> 974 <input type="hidden" name="DownloadImages" value="@productNumber"/> 975 @GetButton(fileList, "Product") 976 </form> 977 978 </li> 979 } 980 } 981 982 @{ 983 string printShout = Translate("SaveOrPrint", "Save or Print your Product PDF "); 984 } 985 986 <li> 987 988 <a class="m-btn-xs-more download btn btn-default btn-xs text-uppercase" href="" 989 role="button" id="productSheetButton" data-target="#CreatePdf" name="catalogPublishing" data-productid="@GetString(" Ecom:Product.ID")" data-productnumber="@productNumber" data-variantid="@GetString(" Ecom:Product.VariantID")" data-toggle="modal" data-request="technicalsheet" data-shout="@printShout">@Translate("ProductSheet", "PDF Product Sheet")</a> 990 991 <ul class="dropdown-menu" role="menu" style="position: relative; width: 100%; clear: both; margin-left: 0px; margin-top: 0px;"> 992 <li> 993 <a href="" 994 data-target="#CreatePdf" 995 name="catalogPublishing" 996 data-productid="@GetString(" Ecom:Product.ID")" 997 data-productnumber="@productNumber" 998 data-variantid="@GetString(" Ecom:Product.VariantID")" 999 data-toggle="modal" 1000 data-request="productsheet" 1001 data-shout="@printShout">@Translate("ProductSheet", "Product Sheet")</a> 1002 </li> 1003 <li> 1004 <a href="" 1005 data-target="#CreatePdf" 1006 name="catalogPublishing" 1007 data-productid="@GetString(" Ecom:Product.ID")" 1008 data-productnumber="@productNumber" 1009 data-variantid="@GetString(" Ecom:Product.VariantID")" 1010 data-toggle="modal" 1011 data-request="technicalsheet" 1012 data-shout="@printShout">@Translate("TechnicalSheet", "Technical Sheet")</a> 1013 </li> 1014 </ul> 1015 1016 </li> 1017 1018 @*<li> 1019 <a class="m-btn-xs-more download btn btn-default btn-xs text-uppercase" data-toggle="modal" data-target="#CreateCatalog" name="catalogPublishing" role="button" data-parent="#catalogue">Create Catalogue</a> 1020 </li>*@ 1021 @*<li> 1022 <a class="m-btn-xs-more download btn btn-default btn-xs text-uppercase" href="" 1023 role="button" 1024 data-toggle="collapse" 1025 data-parent="#productdownload" 1026 id="productSheetButtonz" 1027 aria-controls="collapseFour" onclick="javascript:window.print();">@Translate("ProductSheet", "Product Sheet") (Print)</a> 1028 </li>*@ 1029 1030 @*<li>Check this again do we add a master with default Variant combinatiions to my product collection?? button is hidden.</li>*@ 1031 @*<li>@GetString("Ecom:Product.SelectedVariantComboName")||Variant Group Link: @GetString("Ecom:Product.VariantLinkGroup") |**| @GetLoop("VariantCombinations").Count()</li>*@ 1032 1033 @*<li>@prod.Id||@GetString("Ecom:Product.LanguageID") || @GetString("Ecom:Product.Number") || @prod.IsVariantMaster</li>*@ 1034 @*<li>Product Number: @GetString("Ecom:Product.Number") || Product Variant ID: ( @GetString("Ecom:Product.VariantID") ) || Variant Combinations Count: @GetLoop("VariantCombinations").Count() ZZ Product Variant Count: @GetInteger("Ecom:Product.VariantCount")</li>*@ 1035 1036 1037 @*@if (!string.IsNullOrEmpty(GetString("Ecom:Product.VariantID")) || GetLoop("VariantCombinations").Count() == 1) 1038 {*@ 1039 @*display the button if we have the appropriate script loaded (advanced-search-min.js)*@ 1040 @*<li>@GetString("Ecom:Product.VariantID") || @GetLoop("VariantCombinations").Count()</li>*@ 1041 1042 <li id="btnMyProductCollection"> 1043 1044 @if (isProductCollection) 1045 { 1046 <a class="m-btn-xs-more add 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> 1047 } 1048 else 1049 { 1050 <a class="m-btn-xs-more add 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> 1051 } 1052 1053 </li> 1054 @*}*@ 1055 1056 1057 @*only works if logged-in 1058 <li><a href="@GetString(" Ecom:Product.AddToList")">Add To List Do something else</a></li>*@ 1059 1060 @*@if (GetBoolean("Ecom:CatalogPublishing.UseCatalogPublishing")) 1061 { 1062 <li class="show" style="clear: both; width: 100%;padding-bottom:5px; text-align: right;"> 1063 <a href="/default.aspx?id=@GetString(" Ecom:Product:Page.ID")&productid=@GetString("Ecom:Product.ID")&CatalogPublishingcmd =addtocatalog">Add to catalog</a> 1064 </li> 1065 } 1066 1067 @if (GetBoolean("Ecom:CatalogPublishing.UseCatalogPublishing")) 1068 { 1069 <li class="show" style="clear: both; width: 100%;padding-bottom:5px; text-align: right;"> 1070 <a href="/default.aspx?CatalogPublishingcmd=preview">Catalog Publishing</a> 1071 </li> 1072 }*@ 1073 </ul> 1074 1075 </div> 1076 1077 <div class="panel-group" id="productdownload" role="tablist" aria-multiselectable="false"> 1078 1079 <div id="collapseThree" class="panel-collapse collapse" role="tabpanel" aria-labelledby="productDownloadButton" aria-expanded="true" style="height: 0px;"> 1080 1081 <div class="panel panel-default panel-body print-hide"> 1082 1083 @{ 1084 List<ProductAsset> 1085 certAssets = new List<ProductAsset> 1086 (); 1087 if (thisPage.AreaID == 1) 1088 { 1089 certAssets = assets.Where(n => n.Index == AssetTypeEnum.ToFriendlyAssetName(AssetType.Certificates)).ToList(); 1090 } 1091 else 1092 { 1093 certAssets = assets.Where(n => n.Index == AssetTypeEnum.ToFriendlyAssetName(AssetType.Certificates) && n.FileName.StartsWith(currentCountry + "_")).ToList(); 1094 } 1095 1096 if (certAssets.Count() == 0) // if none are found try to get GB certificates 1097 { 1098 certAssets = assets.Where(n => n.Index == AssetTypeEnum.ToFriendlyAssetName(AssetType.Certificates) && n.FileName.StartsWith("EN_")).ToList(); 1099 } 1100 } 1101 1102 @if (certAssets.Count > 0) 1103 { 1104 <h5>@Translate("Certificates", "Certificates")</h5> 1105 <ul> 1106 @foreach (ProductAsset cert in certAssets) 1107 { 1108 1109 <li> 1110 <a href="@cert.uri" download="@cert.FileName"> 1111 <span><img src="Files/Templates/Designs/HagsCore/res/img/icons/downloads/pdf_small.gif"/></span><span>@cert.FileName</span> 1112 </a> 1113 </li> 1114 } 1115 </ul> 1116 } 1117 1118 1119 @{ 1120 List<ProductAsset> 1121 assemblyAssets = new List<ProductAsset> 1122 (); 1123 assemblyAssets = assets.Where(n => n.Index == AssetTypeEnum.ToFriendlyAssetName(AssetType.AssemblyInstructions)).ToList(); 1124 } 1125 1126 @if (assemblyAssets.Count > 0) 1127 { 1128 <h5>@Translate("InstallationGuides", "Installation Guides")</h5> 1129 <ul> 1130 @foreach (ProductAsset assemblyInstns in assemblyAssets) 1131 { 1132 <li> 1133 <a href="@assemblyInstns.uri" download="@assemblyInstns.FileName"> 1134 <span><img src="Files/Templates/Designs/HagsCore/res/img/icons/downloads/pdf_small.gif"/></span><span>@assemblyInstns.FileName</span> 1135 </a> 1136 </li> 1137 } 1138 </ul> 1139 } 1140 1141 @if (relatedProductsAssemblyInstructions.Count > 0) 1142 { 1143 <h5>@Translate("DetailedInstallationGuides", "Detailed Installation Guides")</h5> 1144 <ul class="list-column list-inline"> 1145 @foreach (ProductAsset assemblyInstns in relatedProductsAssemblyInstructions) 1146 { 1147 <li> 1148 <a href="@assemblyInstns.uri" download="@assemblyInstns.FileName"> 1149 <span><img src="Files/Templates/Designs/HagsCore/res/img/icons/downloads/pdf_small.gif"/></span><span>@assemblyInstns.FileName</span> 1150 </a> 1151 </li> 1152 } 1153 </ul> 1154 } 1155 1156 @{ 1157 List<ProductAsset> 1158 inspAssets = new List<ProductAsset> 1159 (); 1160 inspAssets = FileSystem.GetPdfFilesFromDirectoryBySiteCulture("/Files/System/ProductCollectionDownloads/InspectionMaintenance", "_" + currentlanguage.ToUpper()); 1161 } 1162 1163 @if (inspAssets != null && inspAssets.Count > 0) 1164 { 1165 <h5>@Translate("InspectionMaintenance", "Inspection & Maintenance")</h5> 1166 1167 <ul> 1168 @foreach (ProductAsset pdf in inspAssets) 1169 { 1170 <li> 1171 <a href="@pdf.uri" download="@pdf.FileName"> 1172 <span><img src="Files/Templates/Designs/HagsCore/res/img/icons/downloads/pdf_small.gif"/></span><span>@pdf.FileName</span> 1173 </a> 1174 </li> 1175 } 1176 </ul> 1177 } 1178 else 1179 { 1180 <h5>@Translate("InspectionMaintenance", "Inspection & Maintenance")</h5> 1181 1182 <ul> 1183 <li> 1184 <a href="/Files/System/ProductCollectionDownloads/InspectionMaintenance/Playground Equipment I&M guide_EN.pdf" download="Playground Equipment I&M Guide"> 1185 <span><img src="Files/Templates/Designs/HagsCore/res/img/icons/downloads/pdf_small.gif"/></span><span>Playground Equipment I&M Guide</span> 1186 </a> 1187 </li> 1188 <li> 1189 <a href="/Files/System/ProductCollectionDownloads/InspectionMaintenance/Sports and fitness I&M guide_EN.pdf" download="Sports and Fitness I&M Guide"> 1190 <span><img src="Files/Templates/Designs/HagsCore/res/img/icons/downloads/pdf_small.gif"/></span><span>Sports and Fitness I&M Guide</span> 1191 </a> 1192 </li> 1193 </ul> 1194 1195 } 1196 1197 1198 @{ 1199 List<ProductAsset> 1200 dwgAssets = new List<ProductAsset> 1201 (); 1202 dwgAssets = assets.Where(n => n.Index == AssetTypeEnum.ToFriendlyAssetName(AssetType.Drawings)).ToList(); 1203 } 1204 1205 @if (dwgAssets.Count > 0) 1206 { 1207 <h5>@Translate("DWGFiles", "DWG Files")</h5> 1208 <ul> 1209 @foreach (ProductAsset dwg in dwgAssets) 1210 { 1211 <li> 1212 <a href="@dwg.uri" download="@dwg.FileName"> 1213 <span><img src="Files/Templates/Designs/HagsCore/res/img/icons/downloads/dwg_small.gif"/></span><span>@dwg.FileName</span> 1214 </a> 1215 </li> 1216 } 1217 </ul> 1218 } 1219 1220 <h5>@Translate("GeneralInformation", "General Information")</h5> 1221 <ul> 1222 @if (thisPage.AreaID == 2) 1223 { 1224 <li><a href="Files/System/ProductCollectionDownloads/General Information/hags-general-info_SE.pdf" download="" target="_blank"><span><img src="Files/Templates/Designs/HagsCore/res/img/icons/downloads/pdf_small.gif"></span><span>@Translate("GeneralInformation", "General Information")</span></a></li> 1225 <li><a href="Files/System/ProductCollectionDownloads/General Information/hags-technical-specs_SE.pdf" download="" target="_blank"><span><img src="Files/Templates/Designs/HagsCore/res/img/icons/downloads/pdf_small.gif"></span><span>@Translate("TechnicalInformation", "Technical Information")</span></a></li> 1226 } 1227 else 1228 { 1229 <li><a href="Files/System/ProductCollectionDownloads/General Information/hags-general-info_EN.pdf" download="" target="_blank"><span><img src="Files/Templates/Designs/HagsCore/res/img/icons/downloads/pdf_small.gif"></span><span>@Translate("GeneralInformation", "General Information")</span></a></li> 1230 <li><a href="Files/System/ProductCollectionDownloads/General Information/hags-technical-specs_EN.pdf" download="" target="_blank"><span><img src="Files/Templates/Designs/HagsCore/res/img/icons/downloads/pdf_small.gif"></span><span>@Translate("TechnicalInformation", "Technical Information")</span></a></li> 1231 } 1232 1233 </ul> 1234 </div> 1235 1236 </div> 1237 1238 <div id="collapseFour" class="panel-collapse collapse" role="tabpanel" aria-labelledby="productSheetButton" aria-expanded="true" style="height: 0px;"> 1239 1240 <div class="panel-body print-hide"> 1241 <p>Printed</p> 1242 </div> 1243 1244 </div> 1245 1246 </div> 1247 <div id="product-collection-instructions" class="product-collection-instructions"> 1248 <img src="/Files/Templates/Designs/HagsCore/res/img/buttons/basket.jpg"/><h4>@Translate("AddToCollection", "Add to my collection")?</h4> 1249 <p>@Translate("product-collection-instructions-copy", "Simply click on ‘Add to my collection’ and the product will added to the basket located in the site header. Once you have added products to a collection you will be able to print out a product catalogue, download installation guides, images and DWG files or request a quote - all based on the products you’ve added.")</p> 1250 </div> 1251 @if (!String.IsNullOrEmpty(salesPhoneNumber)) 1252 { 1253 string contactUsLink = DWUtilities.GetPageByNavigationTag("ContactUs", thisPage.AreaID); 1254 <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> 1255 } 1256 1257 1258 </div> 1259 </div> <!-- row --> 1260 </div> <!-- container-fluid --> 1261 </div> 1262 1263 @*Product Options*@ 1264 @if (GetLoop("VariantCombinations").Count() > 0) 1265 { 1266 <div class="m-sort m-theme-background-lightgrey product-options print-hide"> 1267 <div class="l-page"> 1268 <div class="container-fluid"> 1269 <div class="row"> 1270 <div> 1271 <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> 1272 </div> 1273 <form class="form-inline"> 1274 <div id="filter-variants"> 1275 1276 @if (anchoringOptions.Results.Count() > 0) 1277 { 1278 <div class="form-container"> 1279 <div class="form-group"> 1280 <label for="anchoring" class="control-label">@Translate("Anchoring", "Anchoring")</label> 1281 <select class="form-control valid third" id="filter-anchoring" name="anchoring"> 1282 1283 @if (anchoringOptions.Results.Count() > 1) 1284 { 1285 <option value="0">@Translate("Any", "Any")</option> 1286 foreach (var anchor in anchoringOptions.Results.OrderBy(n => n.Sort)) 1287 { 1288 <option value="@anchor.Value">@anchor.Name</option> 1289 } 1290 } 1291 else 1292 { 1293 ResultField result = anchoringOptions.Results.FirstOrDefault(); 1294 <option value="@result.Value">@result.Name</option> 1295 } 1296 1297 </select> 1298 </div> 1299 1300 </div> 1301 } 1302 1303 @if (colourOptions.Results.Count() > 0) 1304 { 1305 <div class="form-container"> 1306 1307 <div class="form-group"> 1308 <label for="colour" class="control-label">@Translate("Colour", "Colour")</label> 1309 <select class="form-control valid first" id="filter-colour" name="colour"> 1310 1311 @if (colourOptions.Results.Count() > 1) 1312 { 1313 <option value="0">@Translate("Any", "Any")</option> 1314 foreach (var colour in colourOptions.Results.OrderBy(n => n.Sort)) 1315 { 1316 <option value="@colour.Value">@colour.Name</option> 1317 } 1318 } 1319 else 1320 { 1321 ResultField result = colourOptions.Results.FirstOrDefault(); 1322 <option value="@result.Value">@result.Name</option> 1323 } 1324 1325 1326 1327 </select> 1328 </div> 1329 1330 </div> 1331 } 1332 1333 @if (optionOptions.Results.Count() > 0) 1334 { 1335 <div class="form-container"> 1336 1337 <div class="form-group"> 1338 <label for="options" class="control-label">@Translate("ProductOptions", "Product Options")</label> 1339 <select class="form-control valid" id="filter-options" name="options"> 1340 1341 @if (optionOptions.Results.Count() > 1) 1342 { 1343 <option value="0">@Translate("Any", "Any")</option> 1344 foreach (var option in optionOptions.Results.OrderBy(n => n.Sort)) 1345 { 1346 <option value="@option.Value">@option.Name</option> 1347 } 1348 } 1349 else 1350 { 1351 ResultField result = optionOptions.Results.FirstOrDefault(); 1352 <option value="@result.Value">@result.Name</option> 1353 } 1354 </select> 1355 </div> 1356 1357 </div> 1358 } 1359 1360 </div> 1361 </form> 1362 </div> 1363 </div> 1364 </div> 1365 </div> 1366 1367 1368 <div class="l-page print-hide"> 1369 <div class="box-slider-filter-content" id="filter-variants-slider-content"> 1370 1371 @foreach (LoopItem variantCombinations in GetLoop("VariantCombinations")) 1372 { 1373 var colourOption = string.Empty; 1374 var optionOption = string.Empty; 1375 var anchorOption = string.Empty; 1376 var materialOption = string.Empty; 1377 var colourId = string.Empty; 1378 var optionId = string.Empty; 1379 var anchorId = string.Empty; 1380 var materialId = string.Empty; 1381 var selectedVariant = string.Empty; 1382 List<ProductAsset> productImages = AssetManager_Repository.GetAssets(variantCombinations.GetString("Ecom:VariantCombination.Product.Number"), AssetType.Images, false); 1383 ProductAsset image = productImages.Where(n => n.Index == AssetTypeEnum.ToFriendlyAssetName(AssetType.Images) && n.FileName.StartsWith("big_") || n.FileName.StartsWith("big_Color_")).FirstOrDefault(); 1384 1385 foreach (var group in GetLoop("VariantGroups").Where(n => n.GetString("Ecom:VariantGroup.ID") != "D")) 1386 { 1387 foreach (var availableOption in group.GetLoop("VariantAvailableOptions")) 1388 { 1389 1390 if (group.GetString("Ecom:VariantGroup.ID") == "S55") 1391 { 1392 1393 if (variantCombinations.GetString("Ecom:VariantCombination.VariantID").Contains(availableOption.GetString("Ecom:VariantOption.ID")) && availableOption.GetString("Ecom:VariantOption.Name") != "Not applicable") 1394 { 1395 colourOption = availableOption.GetString("Ecom:VariantOption.Name"); 1396 colourId = availableOption.GetString("Ecom:VariantOption.ID"); 1397 } 1398 1399 } 1400 if (group.GetString("Ecom:VariantGroup.ID") == "ATP1") 1401 { 1402 if (variantCombinations.GetString("Ecom:VariantCombination.VariantID").Contains(availableOption.GetString("Ecom:VariantOption.ID")) && availableOption.GetString("Ecom:VariantOption.Name") != "Not applicable") 1403 { 1404 materialOption = availableOption.GetString("Ecom:VariantOption.Name"); 1405 materialId = availableOption.GetString("Ecom:VariantOption.ID"); 1406 } 1407 } 1408 if (group.GetString("Ecom:VariantGroup.ID") == "ATP3") 1409 { 1410 if (variantCombinations.GetString("Ecom:VariantCombination.VariantID").Contains(availableOption.GetString("Ecom:VariantOption.ID")) && availableOption.GetString("Ecom:VariantOption.Name") != "Not applicable") 1411 { 1412 anchorOption = availableOption.GetString("Ecom:VariantOption.Name"); 1413 anchorId = availableOption.GetString("Ecom:VariantOption.ID"); 1414 } 1415 } 1416 if (group.GetString("Ecom:VariantGroup.ID") == "ATP4") 1417 { 1418 if (variantCombinations.GetString("Ecom:VariantCombination.VariantID").Contains(availableOption.GetString("Ecom:VariantOption.ID")) && availableOption.GetString("Ecom:VariantOption.Name") != "Not applicable") 1419 { 1420 optionOption = availableOption.GetString("Ecom:VariantOption.Name"); 1421 optionId = availableOption.GetString("Ecom:VariantOption.ID"); 1422 } 1423 } 1424 if (variantCombinations.GetBoolean("Ecom:VariantCombination.Selected")) 1425 { 1426 selectedVariant = "selected-variant"; 1427 } 1428 } 1429 1430 } 1431 1432 <div class="m-attractor @selectedVariant" style="margin-bottom: 4em;"> 1433 1434 <div class="m-attractor-visual" style="height:180px;"> 1435 @if (image != null && !String.IsNullOrEmpty(image.uri)) 1436 { 1437 <a href="@variantCombinations.GetString("Ecom:VariantCombination.Link.Clean")"><img src="@image.uri" class="img-responsive m-product-thumb" /></a> 1438 } 1439 else 1440 { 1441 <img src="/Files/Templates/Designs/HagsCore/res/img/image-not-found.png" class="img-responsive m-product-thumb" /> 1442 } 1443 </div> 1444 1445 <input type="hidden" name="prop-colour" value="@colourId" /> 1446 <input type="hidden" name="prop-anchoring" value="@anchorId" /> 1447 <input type="hidden" name="prop-option" value="@optionId" /> 1448 1449 <div class="m-attractor-info m-attractor-info-product"> 1450 1451 1452 @if (thisPage.AreaID == 7) /*UK*/ 1453 { 1454 string ukId = ProductFieldValues.GetUkProductNumber(variantCombinations.GetString("Ecom:VariantCombination.Product.Number"), thisPage.Area.EcomLanguageId); 1455 <h3 class="m-theme-after-yellow m-theme-border-yellow"><a href="@variantCombinations.GetString("Ecom:VariantCombination.Link.Clean")">@ukId.ToString()</a></h3> 1456 } 1457 else 1458 { 1459 <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> 1460 } 1461 1462 <div class="m-attractor-info m-attractor-info-product"> 1463 <p>@optionOption<br /> @colourOption - @anchorOption</p> 1464 </div> 1465 <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> 1466 </div> 1467 </div> 1468 1469 } 1470 </div> 1471 1472 <div class="m-message" style="display:none;padding-bottom:20px;padding-left:6px;"> 1473 <p style="font-size: 1.2em;color:red;"><b>@Translate("VariantFilterMessage", "There were no options available for selection.")</b></p> 1474 </div> 1475 </div> 1476 } 1477 1478 @* Play Functions*@ 1479 @if (relatedProducts.Any()) 1480 { 1481 int count = relatedProducts.Count(); 1482 <div class="m-heading m-theme-background-lightgrey print-hide"> 1483 <div class="l-page"> 1484 <div class="container-fluid"> 1485 <h4 class="m-panel-title">@Translate("PlayFunctions", "Play Functions")</h4> 1486 </div> <!-- container-fluid --> 1487 </div> <!-- l-page --> 1488 </div> 1489 1490 <div class="l-page play-functions print-hide" style="margin-bottom: 3em;"> 1491 <div class="box-slider-content" id="related-products-slider-content"> 1492 1493 @foreach (Product product in relatedProducts) 1494 { 1495 List<ProductAsset> productImages = AssetManager_Repository.GetAssets(product.Number, AssetType.Images, false); 1496 ProductAsset image = productImages.Where(n => n.Index == AssetTypeEnum.ToFriendlyAssetName(AssetType.Images) && n.FileName.StartsWith("big_") || n.FileName.StartsWith("big_Color_")).FirstOrDefault(); 1497 1498 <div class="l-group-content col-xs-12 col-ms-4 col-sm-2 modules"> 1499 <div class="m-attractor"> 1500 <div class="m-attractor-visual"> 1501 @if (image != null && !String.IsNullOrEmpty(image.uri)) 1502 { 1503 <img src="@image.uri" class="img-responsive m-product-thumb" /> 1504 } 1505 else 1506 { 1507 <img src="/Files/Templates/Designs/HagsCore/res/img/image-not-found.png" class="img-responsive m-product-thumb" /> 1508 } 1509 </div> 1510 <div class="m-attractor-info m-attractor-info-product"> 1511 <h3 class="m-theme-after-yellow m-theme-border-yellow">@product.Name</h3> 1512 </div> <!-- attractor-info --> 1513 </div> <!-- attractor --> 1514 </div> 1515 } 1516 1517 </div> <!-- box-slider-content --> 1518 </div><!-- l-page --> 1519 } 1520 1521 @*Related Component Products*@ 1522 @*@if (relatedComponentProducts.Any()) 1523 { 1524 int count = relatedComponentProducts.Count(); 1525 <div class="m-heading m-theme-background-lightgrey print-hide"> 1526 <div class="l-page"> 1527 <div class="container-fluid"> 1528 <h4 class="m-panel-title">@Translate("RelatedProducts", "Related Products")</h4> 1529 </div> <!-- container-fluid --> 1530 </div> <!-- l-page --> 1531 </div> 1532 1533 <div class="l-page play-functions print-hide" style="margin-bottom: 3em;"> 1534 <div class="box-slider-content" id="related-products-slider-content"> 1535 1536 @foreach (Product product in relatedComponentProducts) 1537 { 1538 List<ProductAsset> productImages = AssetManager_Repository.GetAssets(product.Number, AssetType.Images, false); 1539 ProductAsset image = productImages.Where(n => n.Index == AssetTypeEnum.ToFriendlyAssetName(AssetType.Images) && n.FileName.StartsWith("big_") || n.FileName.StartsWith("big_Color_")).FirstOrDefault(); 1540 1541 <div class="l-group-content col-xs-12 col-ms-4 col-sm-2 modules"> 1542 <div class="m-attractor"> 1543 <div class="m-attractor-visual"> 1544 @if (image != null && !String.IsNullOrEmpty(image.uri)) 1545 { 1546 <img src="@image.uri" class="img-responsive m-product-thumb" /> 1547 } 1548 else 1549 { 1550 <img src="/Files/Templates/Designs/HagsCore/res/img/image-not-found.png" class="img-responsive m-product-thumb" /> 1551 } 1552 </div> 1553 <div class="m-attractor-info m-attractor-info-product"> 1554 <h3 class="m-theme-after-yellow m-theme-border-yellow">@product.Name</h3> 1555 </div> <!-- attractor-info --> 1556 </div> <!-- attractor --> 1557 </div> 1558 } 1559 1560 </div> <!-- box-slider-content --> 1561 </div><!-- l-page --> 1562 }*@ 1563 1564 1565