scanner icon
custom icon
Too fast(ener) to follow
custom icon
15,000 items available from stock
custom icon
Your partner in fastening technology
Error executing template "Designs/Hoenderdaal/eCom/ProductCatalog/ProductDetail.cshtml"
System.IO.IOException: The process cannot access the file 'C:\home\site\wwwroot\Files\Templates\Designs\Hoenderdaal\Translations.xml' because it is being used by another process.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
   at Dynamicweb.Rendering.Translation.Source.WriteDocument(XmlDocument document)
   at Dynamicweb.Rendering.Translation.Source.Save()
   at Dynamicweb.Rendering.Translation.Source.UpdateTranslationSource(Source source, IEnumerable`1 newKeys, String designName, IEnumerable`1 cultures)
   at Dynamicweb.Rendering.Template.TranslateText(String text, String defaultValue, String cultureName)
   at Dynamicweb.Rendering.TemplateBase`1.Translate(String text, String defaultValue)
   at CompiledRazorTemplates.Dynamic.RazorEngine_bd013c0e4b374c94be0378be7f99be9d.Execute() in C:\home\site\wwwroot\Files\Templates\Designs\Hoenderdaal\eCom\ProductCatalog\ProductDetail.cshtml:line 800
   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.<RunCompile>b__0(TextWriter writer)
   at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
   at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template)
   at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template)
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()

1 @using Dynamicweb.Content 2 @using Dynamicweb.Rendering 3 @using Dynamicweb.Ecommerce.ProductCatalog 4 @using Hoenderdaal.Application.CustomCode.EqualityComparers 5 @using Hoenderdaal.Repository.Helpers 6 @using Hoenderdaal.Models.Constants 7 @inherits ViewModelTemplate<ProductViewModel> 8 9 @functions { 10 11 private static string SpecsTable(Hoenderdaal.Models.ViewModels.SpecificationsViewModel specificationsModel) 12 { 13 if (!specificationsModel.Specifications.Any()) return string.Empty; 14 var result = new System.Text.StringBuilder(); 15 result.AppendLine($"<h3>{specificationsModel.Title}</h3>"); 16 result.AppendLine("<table class=\"specs-table product-detail__table\">"); 17 foreach (var spec in specificationsModel.Specifications) 18 { 19 var label = spec.Label; 20 label = label.Replace("behandeling", "<wbr>behandeling"); // hack for mobile display of "oppervlaktebehandeling" which makes table wider than 100% 21 result.AppendLine($"<tr><td class=\"product-detail__table__label\">{label}:</td><td class=\"product-detail__table__value\">{spec.Value}</td></tr>"); 22 } 23 result.Append("</table>"); 24 return result.ToString(); 25 } 26 } 27 28 @{ 29 var groupId = Dynamicweb.Context.Current.Request["GroupID"]; 30 var groupIdQueryParameter = string.IsNullOrEmpty(groupId) 31 ? string.Empty 32 : "&amp;GroupID=" + Dynamicweb.Context.Current.Request["GroupID"]; 33 var productLink = "/Default.aspx?ID=" + Pageview.Page.ID + groupIdQueryParameter + "&amp;ProductID=" + Model.Id; 34 var ecomLanguageId = Dynamicweb.Frontend.PageView.Current().Area.EcomLanguageId; 35 var language = Pageview.GlobalTags.GetTagByName("Global:Area.Lang").Value; 36 37 var currentParagaph = Dynamicweb.Frontend.PageView.Current().CurrentParagraph; 38 var paragraphId = string.Format("ProductList_{0}", currentParagaph.ID); 39 var userIsLoggedIn = Hoenderdaal.Repository.Helpers.LoginHelper.CurrentUserIsLoggedIn(); 40 var moneyCulture = System.Globalization.CultureInfo.InvariantCulture; 41 var hidePrices = Hoenderdaal.Repository.Helpers.EcomHelper.HidePrices(); 42 43 var product = Dynamicweb.Ecommerce.Services.Products.GetProductById(Model.Id, Model.VariantId, ecomLanguageId); 44 var masterProduct = Dynamicweb.Ecommerce.Services.Products.GetProductById(Model.Id, "", ecomLanguageId); 45 46 var baseUrl = "/Files/Templates/Designs/" + Pageview.Layout.Design.Folder.Name.TrimEnd('/'); 47 48 var productName = masterProduct.Name; 49 var productNumber = Model.Number; 50 var productCustomerNumber = Hoenderdaal.Repository.Helpers.EcomHelper.GetProductNumber(Model.Number); 51 var productPrice = Model.Price.PriceWithoutVat; 52 53 var productImages = EcomHelper.GetProductImageDetails(product, masterProduct); 54 55 int.TryParse(Hoenderdaal.Repository.Helpers.AreaHelper.GetAreaItemStringValueBySystemName("AlternativeProductsGroupId", Dynamicweb.Frontend.PageView.Current().AreaID)?.Trim(), out int alternativeProductsGroupId); 56 57 var icons = EcomHelper.GetProductImageDetails(product, masterProduct, new List<StringConstants.AssetCollections.AssetCollectionId>() 58 { 59 StringConstants.AssetCollections.AssetCollectionId.QualityMark, 60 StringConstants.AssetCollections.AssetCollectionId.ApplicationShot, 61 StringConstants.AssetCollections.AssetCollectionId.Drive, 62 StringConstants.AssetCollections.AssetCollectionId.MaterialType 63 }); 64 var hasIcons = icons.Any(); 65 66 var productDownloads = EcomHelper.GetProductImageDetails(product, masterProduct, new List<StringConstants.AssetCollections.AssetCollectionId>() 67 { 68 StringConstants.AssetCollections.AssetCollectionId.DeclarationOfPerformance, 69 StringConstants.AssetCollections.AssetCollectionId.TechnicalSpecificationSheet, 70 StringConstants.AssetCollections.AssetCollectionId.Catalog, 71 StringConstants.AssetCollections.AssetCollectionId.Flyer 72 }); 73 74 var hasSpecs = false; 75 var articleSpecifications = Hoenderdaal.Repository.Helpers.EcomHelper.GetSpecifications(Dynamicweb.Frontend.PageView.Current().AreaID, Model, Hoenderdaal.Models.Enumerations.DisplayGroup.ProductInformation); 76 77 // The helper's EAN lookup also includes shipping-unit GTINs; display the selected product's EAN instead. 78 var eanLabel = TranslationHelper.Translate("AUTOGEN_Spec_GTIN", Pageview.AreaID, "EAN/GTIN"); 79 articleSpecifications.Specifications.RemoveAll(spec => spec.Id == "" && spec.Label == eanLabel); 80 if (!string.IsNullOrWhiteSpace(product.EAN)) 81 { 82 articleSpecifications.Specifications.Add(new Hoenderdaal.Models.ViewModels.SpecificationViewModel 83 { 84 Id = "", 85 Label = eanLabel, 86 Value = product.EAN, 87 Position = articleSpecifications.Specifications.Any() ? articleSpecifications.Specifications.Max(spec => spec.Position) + 1 : 0 88 }); 89 } 90 91 if (articleSpecifications.Specifications.Any()) 92 { 93 hasSpecs = true; 94 } 95 var technicalSpecifications = Hoenderdaal.Repository.Helpers.EcomHelper.GetSpecifications(Dynamicweb.Frontend.PageView.Current().AreaID, Model, Hoenderdaal.Models.Enumerations.DisplayGroup.TechnicalInformation); 96 if (technicalSpecifications.Specifications.Any()) 97 { 98 hasSpecs = true; 99 } 100 var applicationFeatures = Hoenderdaal.Repository.Helpers.EcomHelper.GetSpecifications(Dynamicweb.Frontend.PageView.Current().AreaID, Model, Hoenderdaal.Models.Enumerations.DisplayGroup.ApplicationFeatures); 101 if (applicationFeatures.Specifications.Any()) 102 { 103 hasSpecs = true; 104 } 105 var logisticInformation = Hoenderdaal.Repository.Helpers.EcomHelper.GetSpecifications(Dynamicweb.Frontend.PageView.Current().AreaID, Model, Hoenderdaal.Models.Enumerations.DisplayGroup.LogisticInformation); 106 if (logisticInformation.Specifications.Any()) 107 { 108 hasSpecs = true; 109 } 110 111 var showAlternatives = false; 112 List<Dynamicweb.Ecommerce.Products.Product> alternatives = null; 113 114 var productDescription = product.LongDescription; 115 if (string.IsNullOrWhiteSpace(productDescription)) 116 { 117 productDescription = masterProduct.LongDescription; 118 } 119 120 var productVideos = EcomHelper.GetProductDetailsVideos(masterProduct.Details); 121 var hasVideos = productVideos != null && productVideos.Any(); 122 123 var productFaqs = Hoenderdaal.Repository.Helpers.EcomHelper.GetFaqsForProductGroup(Dynamicweb.Frontend.PageView.Current().AreaID, groupId); 124 var hasFaqs = productFaqs != null && productFaqs.Any(); 125 126 var technicalInfo = Hoenderdaal.Repository.Helpers.EcomHelper.GetTechnicalInfoForProductGroup(Dynamicweb.Frontend.PageView.Current().AreaID, groupId); 127 128 List<string> materials = EcomHelper.GetProductField<List<string>>(Model, StringConstants.ProductFields.Material); 129 if (materials?.Any() ?? false) 130 { 131 var technicalInfoByProperyValues = Hoenderdaal.Repository.Helpers.EcomHelper.GetFaqParagraphsByProperty(Dynamicweb.Frontend.PageView.Current().AreaID, materials, faq => faq.Materials, StringConstants.NavigationTags.PAGE_TechnicalInfo); 132 if (technicalInfoByProperyValues != null) 133 { 134 if (technicalInfo == null) 135 { 136 technicalInfo = new List<Paragraph>(); 137 } 138 technicalInfo = technicalInfo.Union(technicalInfoByProperyValues, new CustomGenericComparer<Paragraph>((p, p1) => p.ID == p1.ID)).OrderBy(f => f.Sort); 139 } 140 141 var faqInfoByProperyValues = Hoenderdaal.Repository.Helpers.EcomHelper.GetFaqParagraphsByProperty(Dynamicweb.Frontend.PageView.Current().AreaID, materials, faq => faq.Materials); 142 143 if (faqInfoByProperyValues != null) 144 { 145 if (productFaqs == null) 146 { 147 productFaqs = new List<Paragraph>(); 148 } 149 productFaqs = productFaqs.Union(faqInfoByProperyValues, new CustomGenericComparer<Paragraph>((p, p1) => p.ID == p1.ID)).OrderBy(f => f.Sort); 150 } 151 152 } 153 154 List<string> surfaceTreatments = EcomHelper.GetProductField<List<string>>(Model, StringConstants.ProductFields.SurfaceTreatment); 155 if (surfaceTreatments?.Any() ?? false) 156 { 157 var technicalInfoByProperyValues = Hoenderdaal.Repository.Helpers.EcomHelper.GetFaqParagraphsByProperty(Dynamicweb.Frontend.PageView.Current().AreaID, surfaceTreatments, faq => faq.SurfaceTreatments, StringConstants.NavigationTags.PAGE_TechnicalInfo); 158 if (technicalInfoByProperyValues != null) 159 { 160 if (technicalInfo == null) 161 { 162 technicalInfo = new List<Paragraph>(); 163 } 164 technicalInfo = technicalInfo.Union(technicalInfoByProperyValues, new CustomGenericComparer<Paragraph>((p, p1) => p.ID == p1.ID)).OrderBy(f => f.Sort); 165 } 166 167 var faqInfoByProperyValues = Hoenderdaal.Repository.Helpers.EcomHelper.GetFaqParagraphsByProperty(Dynamicweb.Frontend.PageView.Current().AreaID, surfaceTreatments, faq => faq.SurfaceTreatments); 168 if (faqInfoByProperyValues != null) 169 { 170 if (productFaqs == null) 171 { 172 productFaqs = new List<Paragraph>(); 173 } 174 productFaqs = productFaqs.Union(faqInfoByProperyValues, new CustomGenericComparer<Paragraph>((p, p1) => p.ID == p1.ID)).OrderBy(f => f.Sort); 175 } 176 177 } 178 179 var hasTechnicalInfo = technicalInfo != null && technicalInfo.Any(); 180 181 var relatedArticles = Dynamicweb.Ecommerce.Services.ProductRelated.GetRelations(product.Id).Where(relation => !string.Equals(relation.RelatedGroupId, alternativeProductsGroupId.ToString())); 182 var hasRelatedArticles = relatedArticles != null && relatedArticles.Any(); 183 184 var group = Model.Groups.FirstOrDefault(g => g.Id.Equals(groupId)); 185 var groupName = group?.Name ?? ""; 186 187 var brand = Model.Manufacturer.Name; 188 var brandPageId = EcomHelper.GetBrandPageIdByName(Dynamicweb.Frontend.PageView.Current().AreaID, brand); 189 190 if (!string.IsNullOrWhiteSpace(groupName)) 191 { 192 var groupUrl = $"/Default.aspx?ID={Pageview.Page.ID}&GroupID={groupId}"; 193 if (brandPageId > 0) 194 { 195 groupUrl += $"&Brand={brand.UrlEncode()}"; 196 } 197 groupName = $"<a href=\"{groupUrl}\">{groupName}</a>"; 198 } 199 if (brandPageId > 0) 200 { 201 brand = $"<a href=\"/Default.aspx?ID={brandPageId}\">{brand}</a>"; 202 } 203 204 var variants = Hoenderdaal.Repository.Helpers.EcomHelper.GetVariantsFromProductViewModel(Model); 205 206 var packageQuantityText = ""; 207 (decimal unitPrice, int priceUnit, string unitName, decimal salesUnit) unitprice = (0, 0, "", 0); 208 if (!hidePrices) 209 { 210 unitprice = Hoenderdaal.Repository.Helpers.EcomHelper.GetUnitPrice(product.Number); 211 packageQuantityText = $"<span class=\"price\">&euro; {unitprice.unitPrice.ToString(moneyCulture)}</span> {Translate("ProductDetail_NettoPerPc_Netto", "netto")} {Translate("ProductDetail_NettoPerPc_Per", "per")} {unitprice.priceUnit.IntegerToStringInteger()} {Translate(string.Format("ProductDetail_Unit_{0}", unitprice.unitName), unitprice.unitName)}"; 212 } 213 } 214 215 <div class="container-fluid product-detail" id="@paragraphId"> 216 <div class="product-detail__row"> 217 <div class="container container--medium"> 218 219 <div class="product-detail__variant"> 220 221 @if (productImages.Any()) 222 { 223 <div class="product-detail__variant__slider"> 224 225 <div class="product-detail__variant__slider__large"> 226 227 @foreach (var image in productImages) 228 { 229 var imageLargeUrl = $"/Admin/Public/GetImage.ashx?Image={image.Value}&altFmImage_path=/Files/Templates/Designs/Hoenderdaal/Images/ecom/Product_NoImage.png&Crop=5&Format=webp&Fillcanvas=1&Height=445&Width=445&Quality=95&Background=FFFFFF"; 230 var imageFullUrl = $"/Admin/Public/GetImage.ashx?Image={image.Value}&altFmImage_path=/Files/Templates/Designs/Hoenderdaal/Images/ecom/Product_NoImage.png&Crop=5&Format=webp&Fillcanvas=1&Height=1000&Width=1000&Quality=95&Background=FFFFFF"; 231 var isFirstLargeImage = productImages.IndexOf(image) == 0; // the first image is the one above the fold, so it is not loaded lazily 232 <div class="product-detail__variant__slider__large__container"> 233 @if (isFirstLargeImage) 234 { 235 <img class="product-detail__variant__slider__large__container__image" src="@imageLargeUrl" fetchpriority="high" decoding="async" /> 236 } 237 else 238 { 239 <img class="product-detail__variant__slider__large__container__image" src="@imageLargeUrl" loading="lazy" decoding="async" /> 240 } 241 <div class="product-detail__variant__slider__large__container__zoom"> 242 <a href="@imageFullUrl" data-lightbox="@image.Value"></a> 243 </div> 244 </div> 245 } 246 247 </div> 248 @if (productImages.Count > 1) 249 { 250 var largeClass = productImages.Count > 3 ? "product-detail__variant__slider__thumbnails--large" : ""; 251 <div class="product-detail__variant__slider__thumbnails @largeClass"> 252 @foreach (var image in productImages) 253 { 254 <div class="product-detail__variant__slider__thumbnails__container"> 255 @{ 256 var imageUrl = $"/Admin/Public/GetImage.ashx?Image={image.Value}&altFmImage_path=/Files/Templates/Designs/Hoenderdaal/Images/ecom/Product_NoImage.png&Crop=0&Format=webp&Fillcanvas=1&Height=95&Width=95&Quality=95&Background=FFFFFF"; 257 <img class="product-detail__variant__slider__thumbnails__container__image" src="@imageUrl" width="95" height="95" style="height:auto" loading="lazy" decoding="async" /> 258 } 259 </div> 260 } 261 </div> 262 } 263 </div> 264 } 265 <div class="product-detail__variant__details"> 266 267 <h1 class="product-detail__variant__details__title">@productName</h1> 268 269 @if (userIsLoggedIn) 270 { 271 <div class="product-detail__variant__details__favorite"> 272 <button id="favorite_@Model.Id-@Model.VariantId" type="button" class="btn-favorite" data-productid="@Model.Id" data-variantid="@Model.VariantId" data-note="" title="@Translate("Favorites_AddRemove", "Add or remove favorite").JsEncode()"></button> 273 </div> 274 } 275 276 <div class="product-detail__variant__details__info"> 277 @groupName | @Translate("ProductDetail_Brand", "Brand"): @brand 278 <br /> 279 <span class="product-detail__copyable">@Translate("ProductDetail_ProductNumber", "Prod. nr."): @productNumber <button type="button" class="btn-copy" data-copy="@productNumber" data-label-copy="@Translate("ProductDetail_Copy", "Copy")" data-label-copied="@Translate("ProductDetail_Copied", "Copied")" aria-label="@Translate("ProductDetail_Copy", "Copy")"></button></span> 280 @if (!string.IsNullOrWhiteSpace(product.EAN)) 281 {<span>| </span><span class="product-detail__copyable">@eanLabel: @product.EAN <button type="button" class="btn-copy" data-copy="@product.EAN" data-label-copy="@Translate("ProductDetail_Copy", "Copy")" data-label-copied="@Translate("ProductDetail_Copied", "Copied")" aria-label="@Translate("ProductDetail_Copy", "Copy")"></button></span>} 282 @if (!productNumber.Equals(productCustomerNumber)) 283 {<span>| @Translate("ProductDetail_CustomNumber", "Your nr."): @productCustomerNumber</span>} 284 </div> 285 286 @if (variants?.Variants != null && variants.Variants.Any()) 287 { 288 <div class="product-detail__variant__details__variants"> 289 @Translate("ProductDetail_Variant", "Variant") 290 <div class="select-wrapper"> 291 <select id="variantselector"> 292 @foreach (var variant in variants.Variants.OrderBy(p => Hoenderdaal.Repository.Helpers.EcomHelper.GetVariantSortValueAsString(p, Dynamicweb.Frontend.PageView.Current().Area.EcomCountryCode))) 293 { 294 var link = $"{productLink}&VariantID={variant.VariantId}"; 295 var variantText = EcomHelper.GetVariantText(variant, masterProduct.Prices, Dynamicweb.Frontend.PageView.Current().AreaID, true, language); 296 <option value="@variant.VariantId" data-link="@link" @(variant.VariantId == Model.VariantId ? "selected" : "")>@variantText</option> 297 } 298 </select> 299 <div class="clear clear--open"> 300 &#xf107; 301 </div> 302 </div> 303 </div> 304 305 @SnippetStart("JavaScriptDocReady") 306 <text> 307 // initiate variant selector 308 $("#variantselector").off("change").on("change", function () { 309 $(this).prop("disabled", true); 310 var link = $(this).find(':selected').data('link'); 311 window.location.href = link; 312 }); 313 </text> 314 @SnippetEnd("JavaScriptDocReady") 315 } 316 317 @if (userIsLoggedIn) 318 { 319 var stockInfo = Hoenderdaal.Repository.Helpers.EcomHelper.GetStockInfo(product); 320 showAlternatives = alternativeProductsGroupId > 0 && stockInfo.showAlternatives; 321 if (showAlternatives) 322 { 323 alternatives = Hoenderdaal.Repository.Helpers.EcomHelper.GetAlternativesByProduct(product, alternativeProductsGroupId); 324 showAlternatives = alternatives != null && alternatives.Any(); 325 } 326 327 <div class="product-detail__variant__details__quantity-stock"> 328 <div class="product-detail__variant__details__quantity-stock__quantity-text"> 329 @packageQuantityText 330 </div> 331 332 <div class="product-detail__variant__details__quantity-stock__stock product-detail__variant__details__quantity-stock__stock--@stockInfo.stockTextClass"> 333 @if (showAlternatives) 334 { 335 <a href="#product-alternatives"> 336 @Translate("StockLegend_ClickForAlternatives", "Low on stock, click for alternatives") 337 <div class="product-detail__variant__details__quantity-stock__stock__status-light-button @stockInfo.stockColorClass alternatives-toggler" title="@Translate("StockLegend_ClickForAlternatives", "Low on stock, click for alternatives")"> 338 <div class="arrow"></div> 339 </div> 340 </a> 341 } 342 else 343 { 344 @stockInfo.stockText 345 <div class="product-detail__variant__details__quantity-stock__stock__status-light @stockInfo.stockColorClass" title="@stockInfo.stockText"> 346 </div> 347 } 348 </div> 349 </div> 350 351 <div class="product-detail__variant__details__prices"> 352 @{ 353 var selectedVariant = variants.Variants?.FirstOrDefault(v => v.VariantId.Equals(product.VariantId)); 354 var quantityName = Translate("SpecificationPostfix_Pieces"); 355 var totalPcQuantityName = Translate("SpecificationPostfix_Pieces"); 356 if (selectedVariant?.Units != null && selectedVariant.Units.Any()) 357 { 358 var units = selectedVariant.Units.Select(u => (u.UnitId, u.StockQuantity, u.Description)).ToList(); 359 var sortedUnits = EcomHelper.SortUnits(units); 360 var salesUnit = unitprice.salesUnit; 361 if (selectedVariant.Manufacturer != null && EcomHelper.ExceptionBrands.Contains(selectedVariant.Manufacturer.Name, StringComparer.OrdinalIgnoreCase)) //proftec non baseunits quantity needs to be multiplied by baseunits quantity 362 { 363 var baseUnit = sortedUnits.FirstOrDefault(u => u.UnitId.Equals("0") || u.UnitId.Equals("-1")); 364 if (baseUnit != default) 365 { 366 salesUnit = (decimal)baseUnit.StockQuantity; 367 sortedUnits = sortedUnits.Select(u => (u.UnitId, 368 u.UnitId != baseUnit.UnitId ? u.StockQuantity * baseUnit.StockQuantity : u.StockQuantity, 369 u.Description)).ToList(); 370 } 371 } 372 var firstUnit = sortedUnits.First(); 373 var hasBaseUnit = (firstUnit.UnitId.Equals("0") || firstUnit.UnitId.Equals("-1")); 374 foreach (var stockUnit in sortedUnits.Take(2)) 375 { 376 double pricePerUnit; 377 double quantity = stockUnit.StockQuantity; 378 if (stockUnit.UnitId.Equals("0") || stockUnit.UnitId.Equals("-1")) 379 { 380 quantityName = stockUnit.UnitId.Equals("0") ? "stuks" : "Kg"; // will be translated later 381 pricePerUnit = productPrice; 382 } 383 else 384 { 385 pricePerUnit = productPrice * (stockUnit.StockQuantity / (double)salesUnit); 386 if (!hasBaseUnit) 387 { 388 quantityName = Hoenderdaal.Repository.Helpers.EcomHelper.GetProductField<string>(selectedVariant, Hoenderdaal.Models.Constants.StringConstants.ProductFields.Packaging); 389 } 390 } 391 392 //adjust description if baseunit is box, and larger unit has also description box 393 var unitDescription = stockUnit.Description; 394 if (stockUnit != firstUnit && 395 unitDescription.Equals(StringConstants.UnitTypes.Box, StringComparison.OrdinalIgnoreCase) && 396 firstUnit.Description.Equals(StringConstants.UnitTypes.Box, StringComparison.OrdinalIgnoreCase)) 397 { 398 unitDescription = "Omdoos"; // will be translated later 399 } 400 401 var unitIconClass = string.IsNullOrWhiteSpace(unitDescription) ? "unit__icon--none" : $"unit__icon--{unitDescription.ToLower().Replace(" ", "-")}"; 402 403 var unitText = Translate(unitDescription, unitDescription); 404 unitText = unitText.Replace("koffer", "<wbr>koffer"); // hack for display of "assortimentskoffer" which breakes the lay-out 405 406 if (!string.IsNullOrWhiteSpace(quantityName)) 407 { 408 totalPcQuantityName = Translate($"ProductDetail_TotalPc_{quantityName}", quantityName); 409 } 410 411 var totalPcQuantity = stockUnit.UnitId.Equals("-1") ? quantity.DoubleToStringWeight(new System.Globalization.CultureInfo(Dynamicweb.Frontend.PageView.Current().Area.Culture)) : quantity.DoubleToStringInteger(); 412 413 <div class="unit" data-unitid="@stockUnit.UnitId"> 414 <div class="unit__header"> 415 <div class="unit__header__name">@unitText</div> 416 <div class="unit__header__quantity"> 417 à @totalPcQuantity 418 <span>@totalPcQuantityName</span> 419 </div> 420 </div> 421 422 <div class="unit__icon @unitIconClass"> 423 @switch (unitDescription) 424 { 425 case StringConstants.UnitTypes.Box: 426 <?xml version="1.0" encoding="utf-8"?> 427 <!-- Generator: Adobe Illustrator 24.2.3, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> 428 <svg version="1.1" id="Laag_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" 429 viewBox="0 0 76 78" style="enable-background:new 0 0 76 78;" xml:space="preserve"> 430 <style type="text/css"> 431 .st0{fill:#D2D2D2;} 432 </style> 433 <path id="Path_22" class="st0" d="M38,0L0,19.5v39.4L38,78l38-19.1V19.7L38,0z M65.3,21.6L38,35.3l-27.2-14L38,7.4L65.3,21.6z 434 M6.9,26.7l27.6,14.2v28L6.9,55V26.7z M41.5,68.9V41l27.6-13.9v28L41.5,68.9z"/> 435 </svg> 436 437 break; 438 case StringConstants.UnitTypes.OuterBox: 439 <?xml version="1.0" encoding="utf-8"?> 440 <!-- Generator: Adobe Illustrator 24.2.3, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> 441 <svg version="1.1" id="Laag_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" 442 viewBox="0 0 113.5 109.3" style="enable-background:new 0 0 113.5 109.3;" xml:space="preserve"> 443 <style type="text/css"> 444 .st0{fill:#D2D2D2;} 445 </style> 446 <path id="Path_23" class="st0" d="M76.1,76l1.8-0.9v7.8l-1.8,0.9V76z M93.7,75l1.8-0.9v-7.8l-1.8,0.9L93.7,75L93.7,75z M86.3,78.7 447 l1.8-0.9v-7.8l-1.8,0.9V78.7z M89.3,77.2l1.8-0.9v-7.8l-1.8,0.9V77.2z M83.3,80.1l1.8-0.9v-7.8l-1.8,0.9V80.1z M79.1,82.3l1.8-0.9 448 v-7.8l-1.8,0.9V82.3z M113.5,31.6V84l-50.3,25.3L0,77.5V25.1L50.4,0L113.5,31.6z M50.4,10.5l-10.9,5.4l45.9,23.8l0,0l12-5.7 449 L50.4,10.5z M56.8,58.7L10.3,34.9v37.3l46.4,23.3V58.7z M74.8,44.8L29.1,21.1l-12.8,6.4L62,50.9L74.8,44.8z M103.2,41.6L67.1,58.8 450 v38.1l36.1-18.2L103.2,41.6z"/> 451 </svg> 452 453 break; 454 case StringConstants.UnitTypes.Pallet: 455 case StringConstants.UnitTypes.Euro3Pallet: 456 <?xml version="1.0" encoding="utf-8"?> 457 <!-- Generator: Adobe Illustrator 24.2.3, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> 458 <svg version="1.1" id="Laag_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" 459 viewBox="0 0 181.9 106" style="enable-background:new 0 0 181.9 106;" xml:space="preserve"> 460 <style type="text/css"> 461 .st0{fill:#D2D2D2;} 462 </style> 463 <g id="Group_13" transform="translate(-130.462 -427.363)"> 464 <path id="Path_27" class="st0" d="M209.9,533.4c-2.5-2-5.1-4.1-7.6-6.1c-23.1-17.8-46.3-35.6-69.4-53.4c-0.6-0.4-1-1-1.1-1.7 465 c-0.5-4.5-0.8-9-1.3-13.7c4.1-1.3,8.2-2.5,12.2-4.1c2.4-0.9,4.1-0.4,6.1,1c25.6,17.8,51.2,35.6,76.9,53.4c0.7,0.6,1.6,0.7,2.4,0.2 466 c2-1,4-1.8,6.2-2.8l-81.6-55.1c4.9-1.6,9.5-3.1,14.1-4.5c0.5-0.2,1.4,0.3,1.9,0.7c13.4,8.6,26.9,17.1,40.3,25.7 467 c13.3,8.5,26.7,17.1,40,25.6c0.7,0.5,1.7,0.6,2.4,0.2c1.8-0.9,3.7-1.6,5.8-2.5l-83.4-52c4.6-1.5,9-3,13.4-4.4c0.5,0,1,0.1,1.4,0.4 468 c13.9,8.2,27.9,16.5,41.8,24.7c13.5,8,27.1,16,40.6,24c0.7,0.4,1.5,0.4,2.2,0.2c1.8-0.6,3.5-1.5,5.5-2.4l-84.9-49.1 469 c4.4-1.4,8.5-2.8,12.7-4.1c0.7,0,1.3,0.2,1.9,0.5c16,8.8,31.9,17.6,47.9,26.4c11.8,6.5,23.6,13,35.4,19.6c0.8,0.5,1.8,0.6,2.6,0.1 470 c1.5-0.8,3.1-1.4,4.9-2.2l-86.1-46.5c4.2-1.4,8.1-2.7,12.1-3.9c0.6-0.2,1.4,0.3,2,0.6c12.6,6.5,25.1,13,37.7,19.5 471 c15.5,8,31,16,46.5,24c0.9,0.3,1.4,1.2,1.1,2.2c-0.4,4.2-0.7,8.5-1.2,12.8c-0.1,0.5-0.4,1-0.8,1.2c-4,1.9-8,3.7-12.2,5.6 472 c0.2-2.9,0.4-5.6,0.6-8.6l-7.6,3.4c-5.9,2.6-11.9,5.3-17.8,7.9c-1,0.3-1.6,1.2-1.5,2.2c0,2.1-0.2,4.3-0.3,6.4 473 c0,0.5-0.3,0.9-0.7,1.2c-4.5,2.1-9.1,4.2-13.8,6.3v-8.9l-8.1,3.6c-6.9,3.1-13.8,6.1-20.7,9.1c-1,0.3-1.6,1.2-1.5,2.2 474 c0.1,2.5,0,5,0,7.7c-3.4,1.6-7,3.2-10.6,4.8c-2,0.9-3.9,1.9-5.9,2.8L209.9,533.4z M199.9,519c0-3.2,0-6.1,0-9 475 c0-0.4-0.5-0.9-0.9-1.1c-7-5.2-14.1-10.4-21.1-15.6c-1.6-1.2-3.2-2.3-5.1-3.7c0.2,2.9,0.4,5.4,0.5,8c0,0.9,0.4,1.7,1.2,2.2 476 c4.3,3.2,8.5,6.4,12.7,9.6C191.3,512.6,195.5,515.7,199.9,519L199.9,519z M137.5,463.7c0.3,2.6,0.6,4.9,0.7,7.2 477 c0,1,0.5,1.9,1.3,2.5c5.6,4.2,11.2,8.5,16.8,12.7c1.3,1,2.7,2,4.3,3.2c-0.2-2.7-0.4-5-0.4-7.3c0-1.1-0.5-2.1-1.5-2.7 478 c-4.6-3.3-9.2-6.7-13.7-10.1C142.6,467.4,140.2,465.6,137.5,463.7L137.5,463.7z"/> 479 </g> 480 </svg> 481 482 break; 483 case StringConstants.UnitTypes.AssortmentBox: 484 case StringConstants.UnitTypes.Organizer: 485 <?xml version="1.0" encoding="utf-8"?> 486 <!-- Generator: Adobe Illustrator 25.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> 487 <svg version="1.1" id="Laag_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" 488 viewBox="0 0 150 150" style="enable-background:new 0 0 150 150;" xml:space="preserve"> 489 <style type="text/css"> 490 .st0{fill:#D2D2D2;} 491 </style> 492 <path class="st0" d="M125.1,100.9c-3.9-9.8-7.7-19.6-11.8-29.3c-1.1-2.7-0.9-4.9,0.2-7.4c3.2-7.2,6.1-14.5,9.4-21.6 493 c1.8-3.8,0.2-5.9-2.3-8.3c-2.2-2.1-5-2.6-8-2.6c-24.6,0-49.1,0-73.7,0.1c-2,0-4.1,0.4-5.8,1.2c-4.6,2-6,5.8-4.1,10.2 494 c3.1,7.2,6.1,14.5,9.3,21.7c1,2.2,0.9,4.1,0,6.3c-4.1,10.2-8.5,20.3-11.9,30.8c-2.4,7.3-0.1,16,10.3,15.6 495 c13.1-0.5,26.3-0.1,39.4-0.1c0,0,0,0,0-0.1c13.7,0,27.4,0,41.2,0c3.6,0,6.3-1.4,7.5-4.7C126.2,108.8,126.6,104.8,125.1,100.9z 496 M67.9,69.1l-1.3,9.5H52.8l2.9-9.6C59.8,69.1,63.8,69.1,67.9,69.1z M96.7,69.2l2,9.5H84.3l-0.4-9.5C88.2,69.2,92.4,69.2,96.7,69.2z 497 M119.1,92h-15.4l-2.5-11.6h13.2C116,84.2,117.5,88.1,119.1,92z M101.6,92H84.7l-0.4-11.6h14.8L101.6,92z M82.7,92h-16l1.6-11.6h14 498 L82.7,92z M81.9,69.1l0.4,9.5H68.6l1.3-9.5C73.9,69.1,77.9,69.1,81.9,69.1z M66.3,80.4L64.7,92H48.8l3.5-11.6H66.3z M64.4,93.7 499 l-1.2,8.5c-5.9,0-11.7,0-17.6,0l2.6-8.5H64.4z M66.5,93.7h16.3l0.3,8.5c-5.9,0-11.9,0-17.8,0L66.5,93.7z M85.1,102.2l-0.3-8.5H102 500 l1.8,8.5C97.6,102.2,91.3,102.2,85.1,102.2z M105.9,102.2l-1.8-8.5h15.7c1.1,2.8,2.2,5.6,3.4,8.5 501 C117.4,102.2,111.6,102.2,105.9,102.2z M113.7,78.7h-12.9l-2-9.5c3,0,6,0,8.9,0c1,0,2.5,0.8,2.8,1.6C111.6,73.4,112.7,76,113.7,78.7 502 z M38,34.2c7.5,0,15,0,22.4,0c17.3,0,34.5,0,51.8,0c3.3,0,6.3,0.5,8.5,4.2c-30.1,0-59.6,0-89.8,0C32.9,35.5,35.1,34.2,38,34.2z 503 M31.3,42.3c-0.1-0.2-0.1-0.6-0.1-0.8c5.5-1.4,6.5-1,8.8,4.1c2.5,5.3,3.7,10.9,3.4,16.7c0,0.9,0.2,1.9,1,2.8 504 c2.8-8.3-0.1-15.9-3.5-23.7c23.5,0,46.7,0,70.2,0c-0.8,2-1.6,4-2.4,6c-2,5-2.6,10.2-2.2,15.5c0.1,0.7,0.8,1.4,1.3,2.2 505 c0.3-0.8,1-1.6,0.9-2.3c-0.5-6.2,0.9-12,3.5-17.5c2.1-4.6,3-4.8,8.6-3.6c-1.3,3.1-2.6,6.2-3.9,9.2c-1.9,4.6-3.9,9.2-5.8,13.8 506 c-0.7,1.6-1.5,2.4-3.4,2.4c-21.2-0.1-42.4,0-63.6-0.1c-1,0-2.6-0.7-3-1.5C37.8,57.6,34.6,49.9,31.3,42.3z M40.8,71.5 507 c0.6-1.7,1.5-2.4,3.3-2.4c3.2,0,6.4,0,9.5,0l-2.9,9.6H38C39,76.3,39.9,73.9,40.8,71.5z M37.3,80.4h12.9L46.7,92h-14 508 c0.1-0.3,0.3-0.7,0.4-1C34.5,87.5,35.9,83.9,37.3,80.4z M32,93.7h14.1l-2.6,8.5c-4.9,0-9.9,0-14.8,0C29.9,99.2,31,96.5,32,93.7z 509 M123.4,108.5c-0.6,4.8-2.7,6.7-7.6,6.7c-26.5,0-52.9,0-79.4,0c-6,0-7.8-1.9-8.2-7.8c-0.2-2.4,0.8-2.7,2.8-2.7 510 c11.4,0.1,22.8,0,34.2,0c3.5,0,7.1,0,10.6,0c0,0,0,0,0,0c14.8,0,29.5,0,44.3,0C123.6,104.7,123.9,105,123.4,108.5z"/> 511 </svg> 512 513 break; 514 case StringConstants.UnitTypes.Multipack: 515 <?xml version="1.0" encoding="UTF-8"?> 516 <svg width="114px" height="110px" viewBox="0 0 114 110" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> 517 <title>omdoos</title> 518 <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> 519 <g id="omdoos" fill="#D2D2D2" fill-rule="nonzero"> 520 <path d="M76.1,76 L77.9,75.1 L77.9,82.9 L76.1,83.8 L76.1,76 Z M93.7,75 L95.5,74.1 L95.5,66.3 L93.7,67.2 L93.7,75 L93.7,75 Z M86.3,78.7 L88.1,77.8 L88.1,70 L86.3,70.9 L86.3,78.7 Z M89.3,77.2 L91.1,76.3 L91.1,68.5 L89.3,69.4 L89.3,77.2 Z M83.3,80.1 L85.1,79.2 L85.1,71.4 L83.3,72.3 L83.3,80.1 Z M79.1,82.3 L80.9,81.4 L80.9,73.6 L79.1,74.5 L79.1,82.3 Z M113.5,31.6 L113.5,84 L63.2,109.3 L0,77.5 L0,25.1 L50.4,0 L113.5,31.6 Z M50.4,10.5 L39.5,15.9 L85.4,39.7 L85.4,39.7 L97.4,34 L50.4,10.5 Z M56.8,58.7 L10.3,34.9 L10.3,72.2 L56.7,95.5 L56.7,58.7 L56.8,58.7 Z M74.8,44.8 L29.1,21.1 L16.3,27.5 L62,50.9 L74.8,44.8 Z M103.2,41.6 L67.1,58.8 L67.1,96.9 L103.2,78.7 L103.2,41.6 Z" id="Path_23"></path> 521 </g> 522 </g> 523 </svg> 524 break; 525 case StringConstants.UnitTypes.Bucket: 526 <?xml version="1.0" encoding="UTF-8"?> 527 <svg width="114px" height="110px" viewBox="0 0 114 110" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> 528 <title>omdoos</title> 529 <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> 530 <g id="omdoos" fill="#D2D2D2" fill-rule="nonzero"> 531 <path d="M76.1,76 L77.9,75.1 L77.9,82.9 L76.1,83.8 L76.1,76 Z M93.7,75 L95.5,74.1 L95.5,66.3 L93.7,67.2 L93.7,75 L93.7,75 Z M86.3,78.7 L88.1,77.8 L88.1,70 L86.3,70.9 L86.3,78.7 Z M89.3,77.2 L91.1,76.3 L91.1,68.5 L89.3,69.4 L89.3,77.2 Z M83.3,80.1 L85.1,79.2 L85.1,71.4 L83.3,72.3 L83.3,80.1 Z M79.1,82.3 L80.9,81.4 L80.9,73.6 L79.1,74.5 L79.1,82.3 Z M113.5,31.6 L113.5,84 L63.2,109.3 L0,77.5 L0,25.1 L50.4,0 L113.5,31.6 Z M50.4,10.5 L39.5,15.9 L85.4,39.7 L85.4,39.7 L97.4,34 L50.4,10.5 Z M56.8,58.7 L10.3,34.9 L10.3,72.2 L56.7,95.5 L56.7,58.7 L56.8,58.7 Z M74.8,44.8 L29.1,21.1 L16.3,27.5 L62,50.9 L74.8,44.8 Z M103.2,41.6 L67.1,58.8 L67.1,96.9 L103.2,78.7 L103.2,41.6 Z" id="Path_23"></path> 532 </g> 533 </g> 534 </svg> 535 break; 536 case StringConstants.UnitTypes.Blister: 537 <?xml version="1.0" encoding="UTF-8"?> 538 <svg width="114px" height="110px" viewBox="0 0 114 110" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> 539 <title>omdoos</title> 540 <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> 541 <g id="omdoos" fill="#D2D2D2" fill-rule="nonzero"> 542 <path d="M76.1,76 L77.9,75.1 L77.9,82.9 L76.1,83.8 L76.1,76 Z M93.7,75 L95.5,74.1 L95.5,66.3 L93.7,67.2 L93.7,75 L93.7,75 Z M86.3,78.7 L88.1,77.8 L88.1,70 L86.3,70.9 L86.3,78.7 Z M89.3,77.2 L91.1,76.3 L91.1,68.5 L89.3,69.4 L89.3,77.2 Z M83.3,80.1 L85.1,79.2 L85.1,71.4 L83.3,72.3 L83.3,80.1 Z M79.1,82.3 L80.9,81.4 L80.9,73.6 L79.1,74.5 L79.1,82.3 Z M113.5,31.6 L113.5,84 L63.2,109.3 L0,77.5 L0,25.1 L50.4,0 L113.5,31.6 Z M50.4,10.5 L39.5,15.9 L85.4,39.7 L85.4,39.7 L97.4,34 L50.4,10.5 Z M56.8,58.7 L10.3,34.9 L10.3,72.2 L56.7,95.5 L56.7,58.7 L56.8,58.7 Z M74.8,44.8 L29.1,21.1 L16.3,27.5 L62,50.9 L74.8,44.8 Z M103.2,41.6 L67.1,58.8 L67.1,96.9 L103.2,78.7 L103.2,41.6 Z" id="Path_23"></path> 543 </g> 544 </g> 545 </svg> 546 break; 547 case StringConstants.UnitTypes.Bundle: 548 <?xml version="1.0" encoding="utf-8"?> 549 <!-- Generator: Adobe Illustrator 25.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> 550 <svg version="1.1" id="Laag_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" 551 viewBox="0 0 150 150" style="enable-background:new 0 0 150 150;" xml:space="preserve"> 552 <style type="text/css"> 553 .st0{fill:#D2D2D2;} 554 </style> 555 <g> 556 <g> 557 <path class="st0" d="M59.8,59.5C59.8,59.5,59.8,59.5,59.8,59.5L59.8,59.5h13.6V57h-5.8c3.5-2.5,5.8-6.5,5.8-11.1 558 c0-4.6-2.3-8.7-5.8-11.1h28.3v-2.5H59.8v0c0,0,0,0,0,0c-2.9,0-5.6,0.9-7.8,2.5c-3.5,2.5-5.8,6.5-5.8,11.1 559 C46.2,53.4,52.3,59.5,59.8,59.5z M59.8,34.8c6.1,0,11.1,5,11.1,11.1c0,6.1-5,11.1-11.1,11.1c-6.1,0-11.1-5-11.1-11.1 560 C48.6,39.8,53.6,34.8,59.8,34.8z"/> 561 <path class="st0" d="M44.5,103.6c0-4.6-2.3-8.7-5.8-11.1h5.8V90H30.9v0c-7.5,0-13.6,6.1-13.6,13.6c0,7.5,6.1,13.6,13.6,13.6 562 c0,0,0,0,0,0h13.6v-2.5h-5.8C42.2,112.2,44.5,108.2,44.5,103.6z M31,114.7L31,114.7L31,114.7c-6.2,0-11.1-5-11.1-11.1 563 c0-6.1,5-11.1,11.1-11.1c6.1,0,11.1,5,11.1,11.1C42,109.7,37.1,114.7,31,114.7z"/> 564 <path class="st0" d="M88.9,85.9h-5.8c3.5-2.5,5.8-6.5,5.8-11.1c0-4.6-2.3-8.7-5.8-11.1h33v-2.5H75.7v0c-0.1,0-0.3,0-0.4,0 565 c-7.5,0-13.6,6.1-13.6,13.6c0,7.5,6.1,13.6,13.6,13.6l0,0h13.6V85.9z M64.2,74.7c0-6.1,5-11.1,11.1-11.1c6.1,0,11.1,5,11.1,11.1 566 c0,6.1-5,11.1-11.1,11.1C69.2,85.9,64.2,80.9,64.2,74.7z"/> 567 <path class="st0" d="M59.8,90C59.8,90,59.8,90,59.8,90c-7.5,0-13.6,6.1-13.6,13.6c0,4.6,2.3,8.7,5.8,11.1c2.2,1.6,4.9,2.5,7.8,2.5 568 c0,0,0,0,0,0v0h13.6v-2.5h-5.8c3.5-2.5,5.8-6.5,5.8-11.1c0-4.6-2.3-8.7-5.8-11.1h5.8V90L59.8,90L59.8,90z M70.9,103.6 569 c0,6.1-5,11.1-11.1,11.1c-6.1,0-11.1-5-11.1-11.1c0-6.1,5-11.1,11.1-11.1C65.9,92.4,70.9,97.4,70.9,103.6z"/> 570 <path class="st0" d="M134.2,90H89.7v0c-7.5,0-13.6,6.1-13.6,13.6c0,7.5,6.1,13.6,13.6,13.6c0,0,0,0,0,0h13.6v-2.5h-5.8 571 c3.5-2.5,5.8-6.5,5.8-11.1c0-4.6-2.3-8.7-5.8-11.1h36.7V90z M100.8,103.6c0,6.1-5,11.1-11.1,11.1h0v0c-6.1,0-11.1-5-11.1-11.1 572 c0-6.1,5-11.1,11.1-11.1C95.8,92.4,100.8,97.4,100.8,103.6z"/> 573 <path class="st0" d="M58.9,85.9h-5.8c3.5-2.5,5.8-6.5,5.8-11.1c0-4.6-2.3-8.7-5.8-11.1h5.8v-2.5H45.3c-7.5,0-13.6,6.1-13.6,13.6 574 c0,7.5,6.1,13.6,13.6,13.6h13.6V85.9z M34.2,74.7c0-6.1,5-11.1,11.1-11.1c6.1,0,11.1,5,11.1,11.1c0,6.1-5,11.1-11.1,11.1 575 C39.2,85.9,34.2,80.9,34.2,74.7z"/> 576 </g> 577 </g> 578 </svg> 579 580 break; 581 case StringConstants.UnitTypes.Pieces: 582 <?xml version="1.0" encoding="UTF-8"?> 583 <svg width="76px" height="78px" viewBox="0 0 76 78" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> 584 <title>doos</title> 585 <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> 586 <g id="doos" fill="#D2D2D2" fill-rule="nonzero"> 587 <path d="M38,0 L0,19.5 L0,58.9 L38,78 L76,58.9 L76,19.7 L38,0 Z M65.3,21.6 L38,35.3 L10.8,21.3 L38,7.4 L65.3,21.6 Z M6.9,26.7 L34.5,40.9 L34.5,68.9 L6.9,55 L6.9,26.7 Z M41.5,68.9 L41.5,41 L69.1,27.1 L69.1,55.1 L41.5,68.9 Z" id="Path_22"></path> 588 </g> 589 </g> 590 </svg> 591 break; 592 case StringConstants.UnitTypes.Rol: 593 case StringConstants.UnitTypes.none: 594 default: 595 if (language != "nl") 596 { 597 <?xml version="1.0" encoding="utf-8"?> 598 <!-- Generator: Adobe Illustrator 25.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> 599 <svg version="1.1" id="Laag_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" 600 viewBox="0 0 150 150" style="enable-background:new 0 0 150 150;" xml:space="preserve"> 601 <style type="text/css"> 602 .st0{fill:#D2D2D2;} 603 </style> 604 <g> 605 <g> 606 <path class="st0" d="M55.5,65.3c0,0.8-0.3,1.5-0.8,1.9c-0.5,0.4-1.3,0.7-2.3,0.7h-0.7v2.8h-1.7v-7.9h2.5c1,0,1.7,0.2,2.2,0.6 607 C55.3,63.9,55.5,64.5,55.5,65.3z M51.8,66.5h0.5c0.5,0,0.9-0.1,1.1-0.3c0.3-0.2,0.4-0.5,0.4-0.9c0-0.4-0.1-0.7-0.3-0.9 608 c-0.2-0.2-0.5-0.3-1-0.3h-0.8V66.5z"/> 609 <path class="st0" d="M58.7,67.7v3H57v-7.9h2.3c1.1,0,1.9,0.2,2.4,0.6c0.5,0.4,0.8,1,0.8,1.8c0,0.5-0.1,0.9-0.4,1.2 610 c-0.3,0.4-0.6,0.6-1.1,0.8c1.2,1.8,2,2.9,2.3,3.4h-1.8l-1.9-3H58.7z M58.7,66.3h0.5c0.5,0,0.9-0.1,1.2-0.3s0.4-0.5,0.4-0.8 611 c0-0.4-0.1-0.6-0.4-0.8c-0.3-0.2-0.7-0.2-1.2-0.2h-0.5V66.3z"/> 612 <path class="st0" d="M71.4,66.8c0,1.3-0.3,2.3-1,3s-1.6,1-2.8,1s-2.1-0.3-2.8-1s-1-1.7-1-3s0.3-2.3,1-3c0.6-0.7,1.6-1,2.8-1 613 s2.1,0.3,2.8,1C71.1,64.5,71.4,65.5,71.4,66.8z M65.7,66.8c0,0.9,0.2,1.5,0.5,2s0.8,0.7,1.5,0.7c1.3,0,2-0.9,2-2.6 614 c0-1.8-0.7-2.7-2-2.7c-0.7,0-1.2,0.2-1.5,0.7C65.8,65.2,65.7,65.9,65.7,66.8z"/> 615 <path class="st0" d="M79.5,66.7c0,1.3-0.4,2.3-1.1,3c-0.7,0.7-1.8,1-3.2,1H73v-7.9h2.5c1.3,0,2.3,0.3,3,1S79.5,65.5,79.5,66.7z 616 M77.8,66.7c0-1.7-0.7-2.5-2.2-2.5h-0.9v5.1h0.7C77,69.3,77.8,68.5,77.8,66.7z"/> 617 <path class="st0" d="M87.6,62.8v5.1c0,0.6-0.1,1.1-0.4,1.5c-0.3,0.4-0.6,0.8-1.1,1s-1.1,0.3-1.7,0.3c-1,0-1.8-0.3-2.4-0.8 618 c-0.6-0.5-0.8-1.2-0.8-2.1v-5.1h1.7v4.8c0,0.6,0.1,1,0.4,1.3s0.6,0.4,1.2,0.4c0.5,0,0.9-0.1,1.2-0.4c0.2-0.3,0.4-0.7,0.4-1.3v-4.8 619 H87.6z"/> 620 <path class="st0" d="M92.8,64.1c-0.6,0-1.1,0.2-1.5,0.7c-0.3,0.5-0.5,1.1-0.5,2c0,1.8,0.7,2.6,2,2.6c0.6,0,1.2-0.1,2-0.4v1.4 621 c-0.6,0.3-1.4,0.4-2.2,0.4c-1.1,0-2-0.3-2.6-1c-0.6-0.7-0.9-1.7-0.9-3c0-0.8,0.1-1.5,0.4-2.1c0.3-0.6,0.7-1.1,1.3-1.4 622 c0.6-0.3,1.2-0.5,2-0.5c0.8,0,1.5,0.2,2.3,0.6l-0.5,1.4c-0.3-0.1-0.6-0.3-0.9-0.4S93.1,64.1,92.8,64.1z"/> 623 <path class="st0" d="M99.5,70.7h-1.7v-6.5h-2.1v-1.4h5.9v1.4h-2.1V70.7z"/> 624 <path class="st0" d="M24,87.7h-1.9L21,83.6c0-0.1-0.1-0.5-0.2-0.9c-0.1-0.5-0.1-0.8-0.2-0.9c0,0.2-0.1,0.5-0.2,0.9 625 s-0.2,0.7-0.2,0.9l-1.1,4.1h-1.9l-2-7.9H17l1,4.3c0.2,0.8,0.3,1.5,0.4,2.1c0-0.2,0.1-0.5,0.1-0.9c0.1-0.4,0.1-0.8,0.2-1l1.1-4.4 626 h1.6l1.1,4.4c0.1,0.2,0.1,0.5,0.2,0.9c0.1,0.4,0.1,0.8,0.2,1c0-0.3,0.1-0.6,0.2-1c0.1-0.4,0.2-0.8,0.2-1l1-4.3H26L24,87.7z"/> 627 <path class="st0" d="M27,87.7v-7.9h1.7v7.9H27z"/> 628 <path class="st0" d="M33.6,87.7H32v-6.5h-2.1v-1.4h5.9v1.4h-2.1V87.7z"/> 629 <path class="st0" d="M43.4,87.7h-1.7v-3.4h-3.1v3.4H37v-7.9h1.7v3.1h3.1v-3.1h1.7V87.7z"/> 630 <path class="st0" d="M52.5,83.8c0,1.3-0.3,2.3-1,3s-1.6,1-2.8,1s-2.1-0.3-2.8-1s-1-1.7-1-3c0-1.3,0.3-2.3,1-3c0.6-0.7,1.6-1,2.8-1 631 s2.1,0.3,2.8,1C52.2,81.5,52.5,82.5,52.5,83.8z M46.8,83.8c0,0.9,0.2,1.5,0.5,2c0.3,0.4,0.8,0.7,1.5,0.7c1.3,0,2-0.9,2-2.6 632 c0-1.8-0.7-2.7-2-2.7c-0.7,0-1.2,0.2-1.5,0.7C47,82.2,46.8,82.9,46.8,83.8z"/> 633 <path class="st0" d="M60.5,79.8v5.1c0,0.6-0.1,1.1-0.4,1.5c-0.3,0.4-0.6,0.8-1.1,1c-0.5,0.2-1.1,0.3-1.7,0.3c-1,0-1.8-0.3-2.4-0.8 634 s-0.8-1.2-0.8-2.1v-5.1h1.7v4.8c0,0.6,0.1,1,0.4,1.3c0.2,0.3,0.6,0.4,1.2,0.4c0.5,0,0.9-0.1,1.2-0.4c0.2-0.3,0.4-0.7,0.4-1.3v-4.8 635 H60.5z"/> 636 <path class="st0" d="M65.5,87.7h-1.7v-6.5h-2.1v-1.4h5.9v1.4h-2.1V87.7z"/> 637 <path class="st0" d="M77.1,82.3c0,0.8-0.3,1.5-0.8,1.9c-0.5,0.4-1.3,0.7-2.3,0.7h-0.7v2.8h-1.7v-7.9h2.5c1,0,1.7,0.2,2.2,0.6 638 C76.9,80.9,77.1,81.5,77.1,82.3z M73.4,83.5h0.5c0.5,0,0.9-0.1,1.1-0.3s0.4-0.5,0.4-0.9c0-0.4-0.1-0.7-0.3-0.9 639 c-0.2-0.2-0.5-0.3-1-0.3h-0.8V83.5z"/> 640 <path class="st0" d="M83.4,87.7l-0.6-1.9H80l-0.6,1.9h-1.8l2.8-7.9h2l2.8,7.9H83.4z M82.4,84.4c-0.5-1.7-0.8-2.7-0.9-2.9 641 c-0.1-0.2-0.1-0.4-0.1-0.5c-0.1,0.5-0.5,1.6-1,3.4H82.4z"/> 642 <path class="st0" d="M89.5,81.1c-0.6,0-1.1,0.2-1.5,0.7c-0.3,0.5-0.5,1.1-0.5,2c0,1.8,0.7,2.6,2,2.6c0.6,0,1.2-0.1,2-0.4v1.4 643 c-0.6,0.3-1.4,0.4-2.2,0.4c-1.1,0-2-0.3-2.6-1c-0.6-0.7-0.9-1.7-0.9-3c0-0.8,0.1-1.5,0.4-2.1s0.7-1.1,1.3-1.4 644 c0.6-0.3,1.2-0.5,2-0.5c0.8,0,1.5,0.2,2.3,0.6l-0.5,1.4c-0.3-0.1-0.6-0.3-0.9-0.4C90.1,81.2,89.8,81.1,89.5,81.1z"/> 645 <path class="st0" d="M99.5,87.7h-1.9l-2.1-3.3l-0.7,0.5v2.8h-1.7v-7.9h1.7v3.6l0.7-0.9l2.1-2.7h1.8l-2.7,3.5L99.5,87.7z"/> 646 <path class="st0" d="M105.3,87.7l-0.6-1.9h-2.9l-0.6,1.9h-1.8l2.8-7.9h2l2.8,7.9H105.3z M104.3,84.4c-0.5-1.7-0.8-2.7-0.9-2.9 647 c-0.1-0.2-0.1-0.4-0.1-0.5c-0.1,0.5-0.5,1.6-1,3.4H104.3z"/> 648 <path class="st0" d="M111.1,83.3h3.1v4.1c-0.5,0.2-1,0.3-1.4,0.3c-0.4,0.1-0.9,0.1-1.4,0.1c-1.2,0-2.1-0.3-2.7-1 649 c-0.6-0.7-0.9-1.7-0.9-3c0-1.3,0.4-2.3,1.1-3c0.7-0.7,1.7-1.1,3-1.1c0.8,0,1.6,0.2,2.3,0.5l-0.6,1.3c-0.6-0.3-1.2-0.4-1.8-0.4 650 c-0.7,0-1.3,0.2-1.7,0.7s-0.6,1.1-0.6,1.9c0,0.9,0.2,1.5,0.5,2c0.3,0.4,0.9,0.7,1.5,0.7c0.3,0,0.7,0,1.1-0.1v-1.6h-1.5V83.3z"/> 651 <path class="st0" d="M116.1,87.7v-7.9h1.7v7.9H116.1z"/> 652 <path class="st0" d="M126.7,87.7h-2.1l-3.4-5.9h0c0.1,1,0.1,1.8,0.1,2.2v3.7h-1.5v-7.9h2.1l3.4,5.9h0c-0.1-1-0.1-1.7-0.1-2.2v-3.7 653 h1.5V87.7z"/> 654 <path class="st0" d="M131.6,83.3h3.1v4.1c-0.5,0.2-1,0.3-1.4,0.3c-0.4,0.1-0.9,0.1-1.4,0.1c-1.2,0-2.1-0.3-2.7-1 655 c-0.6-0.7-0.9-1.7-0.9-3c0-1.3,0.4-2.3,1.1-3c0.7-0.7,1.7-1.1,3-1.1c0.8,0,1.6,0.2,2.3,0.5l-0.6,1.3c-0.6-0.3-1.2-0.4-1.8-0.4 656 c-0.7,0-1.3,0.2-1.7,0.7S130,83,130,83.8c0,0.9,0.2,1.5,0.5,2c0.3,0.4,0.9,0.7,1.5,0.7c0.3,0,0.7,0,1.1-0.1v-1.6h-1.5V83.3z"/> 657 </g> 658 </g> 659 </svg> 660 661 } 662 else 663 { 664 <?xml version="1.0" encoding="utf-8"?> 665 <!-- Generator: Adobe Illustrator 25.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> 666 <svg version="1.1" id="Laag_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" 667 viewBox="0 0 150 150" style="enable-background:new 0 0 150 150;" xml:space="preserve"> 668 <style type="text/css"> 669 .st0{fill:#D2D2D2;} 670 </style> 671 <g> 672 <g> 673 <path class="st0" d="M55.4,65.3c0,0.8-0.3,1.5-0.8,1.9c-0.5,0.4-1.3,0.7-2.3,0.7h-0.7v2.8H50v-7.9h2.5c1,0,1.7,0.2,2.2,0.6 674 C55.1,63.9,55.4,64.5,55.4,65.3z M51.6,66.5h0.5c0.5,0,0.9-0.1,1.1-0.3c0.3-0.2,0.4-0.5,0.4-0.9c0-0.4-0.1-0.7-0.3-0.9 675 c-0.2-0.2-0.5-0.3-1-0.3h-0.8V66.5z"/> 676 <path class="st0" d="M58.5,67.7v3h-1.7v-7.9h2.3c1.1,0,1.9,0.2,2.4,0.6c0.5,0.4,0.8,1,0.8,1.8c0,0.5-0.1,0.9-0.4,1.2 677 c-0.3,0.4-0.6,0.6-1.1,0.8c1.2,1.8,2,2.9,2.3,3.4h-1.8l-1.9-3H58.5z M58.5,66.3h0.5c0.5,0,0.9-0.1,1.2-0.3s0.4-0.5,0.4-0.8 678 c0-0.4-0.1-0.6-0.4-0.8c-0.3-0.2-0.7-0.2-1.2-0.2h-0.5V66.3z"/> 679 <path class="st0" d="M71.3,66.8c0,1.3-0.3,2.3-1,3s-1.6,1-2.8,1s-2.1-0.3-2.8-1s-1-1.7-1-3s0.3-2.3,1-3c0.6-0.7,1.6-1,2.8-1 680 s2.1,0.3,2.8,1C70.9,64.5,71.3,65.5,71.3,66.8z M65.5,66.8c0,0.9,0.2,1.5,0.5,2s0.8,0.7,1.5,0.7c1.3,0,2-0.9,2-2.6 681 c0-1.8-0.7-2.7-2-2.7c-0.7,0-1.2,0.2-1.5,0.7C65.7,65.2,65.5,65.9,65.5,66.8z"/> 682 <path class="st0" d="M79.4,66.7c0,1.3-0.4,2.3-1.1,3c-0.7,0.7-1.8,1-3.2,1h-2.2v-7.9h2.5c1.3,0,2.3,0.3,3,1S79.4,65.5,79.4,66.7z 683 M77.7,66.7c0-1.7-0.7-2.5-2.2-2.5h-0.9v5.1h0.7C76.9,69.3,77.7,68.5,77.7,66.7z"/> 684 <path class="st0" d="M87.4,62.8v5.1c0,0.6-0.1,1.1-0.4,1.5c-0.3,0.4-0.6,0.8-1.1,1s-1.1,0.3-1.7,0.3c-1,0-1.8-0.3-2.4-0.8 685 c-0.6-0.5-0.8-1.2-0.8-2.1v-5.1h1.7v4.8c0,0.6,0.1,1,0.4,1.3s0.6,0.4,1.2,0.4c0.5,0,0.9-0.1,1.2-0.4c0.2-0.3,0.4-0.7,0.4-1.3v-4.8 686 H87.4z"/> 687 <path class="st0" d="M92.7,64.1c-0.6,0-1.1,0.2-1.5,0.7c-0.3,0.5-0.5,1.1-0.5,2c0,1.8,0.7,2.6,2,2.6c0.6,0,1.2-0.1,2-0.4v1.4 688 c-0.6,0.3-1.4,0.4-2.2,0.4c-1.1,0-2-0.3-2.6-1c-0.6-0.7-0.9-1.7-0.9-3c0-0.8,0.1-1.5,0.4-2.1c0.3-0.6,0.7-1.1,1.3-1.4 689 c0.6-0.3,1.2-0.5,2-0.5c0.8,0,1.5,0.2,2.3,0.6l-0.5,1.4c-0.3-0.1-0.6-0.3-0.9-0.4S93,64.1,92.7,64.1z"/> 690 <path class="st0" d="M99.4,70.7h-1.7v-6.5h-2.1v-1.4h5.9v1.4h-2.1V70.7z"/> 691 <path class="st0" d="M22.1,87.7h-5.8v-1.1l3.8-5.4h-3.7v-1.4H22v1.1l-3.8,5.4h3.9V87.7z"/> 692 <path class="st0" d="M30.5,83.8c0,1.3-0.3,2.3-1,3s-1.6,1-2.8,1s-2.1-0.3-2.8-1s-1-1.7-1-3c0-1.3,0.3-2.3,1-3c0.6-0.7,1.6-1,2.8-1 693 s2.1,0.3,2.8,1C30.2,81.5,30.5,82.5,30.5,83.8z M24.7,83.8c0,0.9,0.2,1.5,0.5,2c0.3,0.4,0.8,0.7,1.5,0.7c1.3,0,2-0.9,2-2.6 694 c0-1.8-0.7-2.7-2-2.7c-0.7,0-1.2,0.2-1.5,0.7C24.9,82.2,24.7,82.9,24.7,83.8z"/> 695 <path class="st0" d="M39.1,87.7H37l-3.4-5.9h0c0.1,1,0.1,1.8,0.1,2.2v3.7h-1.5v-7.9h2.1l3.4,5.9h0c-0.1-1-0.1-1.7-0.1-2.2v-3.7 696 h1.5V87.7z"/> 697 <path class="st0" d="M47.6,83.7c0,1.3-0.4,2.3-1.1,3c-0.7,0.7-1.8,1-3.2,1h-2.2v-7.9h2.5c1.3,0,2.3,0.3,3,1S47.6,82.5,47.6,83.7z 698 M45.8,83.7c0-1.7-0.7-2.5-2.2-2.5h-0.9v5.1h0.7C45,86.3,45.8,85.5,45.8,83.7z"/> 699 <path class="st0" d="M53.7,87.7h-4.5v-7.9h4.5v1.4h-2.9v1.7h2.7v1.4h-2.7v2h2.9V87.7z"/> 700 <path class="st0" d="M57,84.7v3h-1.7v-7.9h2.3c1.1,0,1.9,0.2,2.4,0.6c0.5,0.4,0.8,1,0.8,1.8c0,0.5-0.1,0.9-0.4,1.2 701 c-0.3,0.4-0.6,0.6-1.1,0.8c1.2,1.8,2,2.9,2.3,3.4h-1.8l-1.9-3H57z M57,83.3h0.5c0.5,0,0.9-0.1,1.2-0.3c0.3-0.2,0.4-0.5,0.4-0.8 702 c0-0.4-0.1-0.6-0.4-0.8c-0.3-0.2-0.7-0.2-1.2-0.2H57V83.3z"/> 703 <path class="st0" d="M70,79.8h1.7L69,87.7h-1.8l-2.7-7.9h1.7l1.5,4.7c0.1,0.3,0.2,0.6,0.3,1c0.1,0.4,0.1,0.6,0.2,0.8 704 c0-0.3,0.2-0.9,0.4-1.7L70,79.8z"/> 705 <path class="st0" d="M77.1,87.7h-4.5v-7.9h4.5v1.4h-2.9v1.7h2.7v1.4h-2.7v2h2.9V87.7z"/> 706 <path class="st0" d="M80.4,84.7v3h-1.7v-7.9h2.3c1.1,0,1.9,0.2,2.4,0.6c0.5,0.4,0.8,1,0.8,1.8c0,0.5-0.1,0.9-0.4,1.2 707 c-0.3,0.4-0.6,0.6-1.1,0.8c1.2,1.8,2,2.9,2.3,3.4h-1.8l-1.9-3H80.4z M80.4,83.3H81c0.5,0,0.9-0.1,1.2-0.3c0.3-0.2,0.4-0.5,0.4-0.8 708 c0-0.4-0.1-0.6-0.4-0.8c-0.3-0.2-0.7-0.2-1.2-0.2h-0.5V83.3z"/> 709 <path class="st0" d="M91.5,82.3c0,0.8-0.3,1.5-0.8,1.9c-0.5,0.4-1.3,0.7-2.3,0.7h-0.7v2.8H86v-7.9h2.5c1,0,1.7,0.2,2.2,0.6 710 C91.2,80.9,91.5,81.5,91.5,82.3z M87.7,83.5h0.5c0.5,0,0.9-0.1,1.1-0.3s0.4-0.5,0.4-0.9c0-0.4-0.1-0.7-0.3-0.9 711 c-0.2-0.2-0.5-0.3-1-0.3h-0.8V83.5z"/> 712 <path class="st0" d="M97.8,87.7l-0.6-1.9h-2.9l-0.6,1.9H92l2.8-7.9h2l2.8,7.9H97.8z M96.8,84.4c-0.5-1.7-0.8-2.7-0.9-2.9 713 c-0.1-0.2-0.1-0.4-0.1-0.5c-0.1,0.5-0.5,1.6-1,3.4H96.8z"/> 714 <path class="st0" d="M106.9,87.7H105l-2.1-3.3l-0.7,0.5v2.8h-1.7v-7.9h1.7v3.6l0.7-0.9l2.1-2.7h1.8l-2.7,3.5L106.9,87.7z"/> 715 <path class="st0" d="M114.2,87.7h-1.9l-2.1-3.3l-0.7,0.5v2.8h-1.7v-7.9h1.7v3.6l0.7-0.9l2.1-2.7h1.8l-2.7,3.5L114.2,87.7z"/> 716 <path class="st0" d="M115.2,87.7v-7.9h1.7v7.9H115.2z"/> 717 <path class="st0" d="M125.8,87.7h-2.1l-3.4-5.9h0c0.1,1,0.1,1.8,0.1,2.2v3.7h-1.5v-7.9h2.1l3.4,5.9h0c-0.1-1-0.1-1.7-0.1-2.2v-3.7 718 h1.5V87.7z"/> 719 <path class="st0" d="M130.7,83.3h3.1v4.1c-0.5,0.2-1,0.3-1.4,0.3c-0.4,0.1-0.9,0.1-1.4,0.1c-1.2,0-2.1-0.3-2.7-1 720 c-0.6-0.7-0.9-1.7-0.9-3c0-1.3,0.4-2.3,1.1-3c0.7-0.7,1.7-1.1,3-1.1c0.8,0,1.6,0.2,2.3,0.5l-0.6,1.3c-0.6-0.3-1.2-0.4-1.8-0.4 721 c-0.7,0-1.3,0.2-1.7,0.7s-0.6,1.1-0.6,1.9c0,0.9,0.2,1.5,0.5,2c0.3,0.4,0.9,0.7,1.5,0.7c0.3,0,0.7,0,1.1-0.1v-1.6h-1.5V83.3z"/> 722 </g> 723 </g> 724 </svg> 725 726 } 727 break; 728 } 729 </div> 730 731 <div class="unit__controls quantity-controls"> 732 <button type="button" 733 data-id="@Model.Id-@Model.VariantId-@stockUnit.UnitId" 734 class="btn-decrease quantity-controls__btn quantity-controls__btn--decrease" 735 disabled="disabled" id="@Model.Id-@Model.VariantId-@stockUnit.UnitId-d"> 736 - 737 </button> 738 <input type="text" 739 class="quantity quantity-controls__quantity quantity-controls__quantity--full-width" 740 id="@Model.Id-@Model.VariantId-@stockUnit.UnitId" 741 name="@Model.Id-@Model.VariantId-@stockUnit.UnitId" 742 data-productid="@Model.Id" 743 data-variantid="@Model.VariantId" 744 data-unitid="@stockUnit.UnitId" 745 data-unitprice="@pricePerUnit.ToString(moneyCulture)" 746 data-unitquantity="@quantity.ToString(moneyCulture)" 747 disabled="disabled" 748 placeholder="0" 749 maxlength="3" /> 750 <button type="button" 751 data-id="@Model.Id-@Model.VariantId-@stockUnit.UnitId" 752 class="btn-increase quantity-controls__btn quantity-controls__btn--increase" 753 disabled="disabled" id="@Model.Id-@Model.VariantId-@stockUnit.UnitId-i"> 754 + 755 </button> 756 </div> 757 </div> 758 } 759 } 760 } 761 </div> 762 763 <div id="subtotal" class="product-detail__variant__details__subtotal"> 764 <div> 765 @Translate("ProductDetail_TotalPc_Total", "Total") <span class="quantity">0</span> 766 <span>@totalPcQuantityName</span> 767 </div> 768 @if (!hidePrices) 769 { 770 <div class="total">&euro; 0,00</div> 771 } 772 </div> 773 @SnippetStart("JavaScriptDocReady") 774 <text> 775 // if the title goes over 2 lines the quantity-stock margin needs to be reduced to maintain layout. 776 if ($(".product-detail__variant__details__title").height() > 35) { 777 $(".product-detail__variant__details__quantity-stock").css("margin-bottom", "22px"); 778 } 779 </text> 780 @SnippetEnd("JavaScriptDocReady") 781 } 782 else 783 { 784 var anonymousAreaId = Dynamicweb.Frontend.PageView.Current().AreaID; 785 var anonymousLoginPageId = Dynamicweb.Content.Services.Pages.GetPageByNavigationTag(anonymousAreaId, Hoenderdaal.Models.Constants.StringConstants.NavigationTags.PAGE_Login)?.ID ?? 0; 786 var anonymousLoginUrl = ""; 787 788 if (anonymousLoginPageId > 0) 789 { 790 var loginPageUrl = Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(anonymousLoginPageId); 791 var redirectUrl = System.Uri.EscapeDataString(Dynamicweb.Context.Current.Request.RawUrl); 792 793 anonymousLoginUrl = $"{loginPageUrl}?redirect={redirectUrl}"; 794 } 795 var anonymousAccountRequestPageId = Dynamicweb.Content.Services.Pages.GetPageByNavigationTag(anonymousAreaId, Hoenderdaal.Models.Constants.StringConstants.NavigationTags.PAGE_CreateAccount)?.ID ?? 0; 796 var anonymousAccountRequestUrl = anonymousAccountRequestPageId > 0 ? Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(anonymousAccountRequestPageId) : ""; 797 798 <div class="product-detail__anonymous"> 799 <div class="product-detail__anonymous__cta"> 800 <h2 class="product-detail__anonymous__cta__title">@Translate("ProductDetail_AnonymousCta_Title", "Log in to see prices")</h2> 801 <p class="product-detail__anonymous__cta__text">@Translate("ProductDetail_AnonymousCta_Text", "If you are logged in you can see more information, including prices. Don't have an account yet? Then you can request one.")</p> 802 <div class="product-detail__anonymous__cta__buttons"> 803 @if (!string.IsNullOrEmpty(anonymousLoginUrl)) 804 { 805 <a href="@anonymousLoginUrl" class="btn product-detail__anonymous__cta__login" data-anonymous-cta="login"> 806 <img src="/Files/Templates/Designs/Hoenderdaal/Images/icons/icon-user-blue.svg" alt="" loading="lazy" decoding="async" /> 807 @Translate("Nav_Login", "Log in") 808 </a> 809 } 810 @if (!string.IsNullOrEmpty(anonymousAccountRequestUrl)) 811 { 812 <a href="@anonymousAccountRequestUrl" class="btn product-detail__anonymous__cta__request" data-anonymous-cta="account_request"> 813 @Translate("LogIn_AccountRequestButtonText", "Request account") 814 </a> 815 } 816 </div> 817 </div> 818 </div> 819 @SnippetStart("JavaScriptDocReady") 820 <text> 821 // measure clicks on the login / account request buttons for anonymous visitors (GTM custom event) 822 $("[data-anonymous-cta]").off("click.anonymouscta").on("click.anonymouscta", function () { 823 window.dataLayer = window.dataLayer || []; 824 window.dataLayer.push({ 825 event: "product_detail_anonymous_cta_click", 826 cta_type: $(this).data("anonymous-cta"), 827 product_number: "@productNumber.JsEncode()" 828 }); 829 }); 830 831 // let the bottom of the block line up with the bottom of the product image (not when the columns are stacked) 832 var anonymousCta = $(".product-detail__anonymous__cta"); 833 var alignAnonymousCta = function () { 834 anonymousCta.css("height", ""); 835 var image = $(".product-detail__variant__slider__large__container").first(); 836 if (!image.length || !window.matchMedia("(min-width: 721px)").matches) { return; } 837 var target = image[0].getBoundingClientRect().bottom - anonymousCta[0].getBoundingClientRect().top; 838 if (target > anonymousCta.outerHeight()) { anonymousCta.css("height", target + "px"); } 839 }; 840 alignAnonymousCta(); 841 $(window).on("load resize", alignAnonymousCta); 842 if (document.fonts && document.fonts.ready) { document.fonts.ready.then(alignAnonymousCta); } 843 </text> 844 @SnippetEnd("JavaScriptDocReady") 845 } 846 </div> 847 </div> 848 </div> 849 </div> 850 <div class="product-detail__anchorbar"> 851 <div class="container container--medium"> 852 @if (!string.IsNullOrWhiteSpace(productDescription)) 853 { 854 <a href="#product-description" class="product-detail__anchorbar__anchor"> 855 @Translate("ProductDetail_Anchor_Description", "Description") 856 <img class="product-detail__anchorbar__anchor__icon" src="@($"{baseUrl}/Images/icons/icons8-down-button-50.svg")" alt="arrow-down icon" loading="lazy" decoding="async" /> 857 </a> 858 } 859 @if (articleSpecifications.Specifications.Any() || technicalSpecifications.Specifications.Any()) 860 { 861 <a href="#product-specifications" class="product-detail__anchorbar__anchor"> 862 @Translate("ProductDetail_Anchor_Specifications", "Specifications") 863 <img class="product-detail__anchorbar__anchor__icon" src="@($"{baseUrl}/Images/icons/icons8-down-button-50.svg")" alt="arrow-down icon" loading="lazy" decoding="async" /> 864 </a> 865 } 866 @if (hasIcons) 867 { 868 <a href="#product-icons" class="product-detail__anchorbar__anchor"> 869 @Translate("ProductDetail_Anchor_Icons", "Quality marks and applications") 870 <img class="product-detail__anchorbar__anchor__icon" src="@($"{baseUrl}/Images/icons/icons8-down-button-50.svg")" alt="arrow-down icon" loading="lazy" decoding="async" /> 871 </a> 872 } 873 @if (hasVideos) 874 { 875 <a href="#product-video" class="product-detail__anchorbar__anchor"> 876 @Translate("ProductDetail_Anchor_Video", "Video") 877 <img class="product-detail__anchorbar__anchor__icon" src="@($"{baseUrl}/Images/icons/icons8-down-button-50.svg")" alt="arrow-down icon" loading="lazy" decoding="async" /> 878 </a> 879 } 880 @if (productDownloads?.Any() ?? false) 881 { 882 <a href="#product-downloads" class="product-detail__anchorbar__anchor"> 883 @Translate("ProductDetail_Anchor_Downloads", "Downloads") 884 <img class="product-detail__anchorbar__anchor__icon" src="@($"{baseUrl}/Images/icons/icons8-down-button-50.svg")" alt="arrow-down icon" loading="lazy" decoding="async" /> 885 </a> 886 } 887 @if (showAlternatives) 888 { 889 <a href="#product-alternatives" class="product-detail__anchorbar__anchor"> 890 @Translate("ProductDetail_Anchor_AlternativeProducts", "Alternative products") 891 <img class="product-detail__anchorbar__anchor__icon" src="@($"{baseUrl}/Images/icons/icons8-down-button-50.svg")" alt="arrow-down icon" loading="lazy" decoding="async" /> 892 </a> 893 } 894 @if (hasTechnicalInfo) 895 { 896 <a href="#product-technical-info" class="product-detail__anchorbar__anchor"> 897 @Translate("ProductDetail_Anchor_TechnicalInfo", "Technical info") 898 <img class="product-detail__anchorbar__anchor__icon" src="@($"{baseUrl}/Images/icons/icons8-down-button-50.svg")" alt="arrow-down icon" loading="lazy" decoding="async" /> 899 </a> 900 } 901 @if (hasFaqs) 902 { 903 <a href="#product-faqs" class="product-detail__anchorbar__anchor"> 904 @Translate("ProductDetail_Anchor_Faqs", "FAQ") 905 <img class="product-detail__anchorbar__anchor__icon" src="@($"{baseUrl}/Images/icons/icons8-down-button-50.svg")" alt="arrow-down icon" loading="lazy" decoding="async" /> 906 </a> 907 } 908 @if (hasRelatedArticles) 909 { 910 <a href="#product-relatedarticles" class="product-detail__anchorbar__anchor"> 911 @Translate("ProductDetail_Anchor_RelatedArticles", "Related articles") 912 <img class="product-detail__anchorbar__anchor__icon" src="@($"{baseUrl}/Images/icons/icons8-down-button-50.svg")" alt="arrow-down icon" loading="lazy" decoding="async" /> 913 </a> 914 } 915 </div> 916 </div> 917 @if (!string.IsNullOrWhiteSpace(productDescription)) 918 { 919 <div class="product-info product-detail__row"> 920 <a id="product-description"></a> 921 <div class="container container--small"> 922 <h2>@Translate("ProductDetail_Anchor_Description", "Description")</h2> 923 @productDescription.MakeParagraph() 924 </div> 925 </div> 926 } 927 @if (hasSpecs) 928 { 929 <div class="product-info product-detail__row"> 930 <a id="product-specifications"></a> 931 <div class="container container--small"> 932 <h2>@Translate("ProductDetail_Anchor_Specifications", "Specifications")</h2> 933 @SpecsTable(articleSpecifications) 934 @SpecsTable(technicalSpecifications) 935 @SpecsTable(applicationFeatures) 936 @SpecsTable(logisticInformation) 937 </div> 938 </div> 939 } 940 @if (hasIcons) 941 { 942 <div class="product-info product-detail__row"> 943 <a id="product-icons"></a> 944 <div class="container container--small"> 945 <h2>@Translate("ProductDetail_Anchor_Icons", "Quality marks and applications")</h2> 946 <div class="text-component__videos"> 947 @foreach (var image in icons) 948 { 949 <img src="@image.Value" class="quality-mark" alt="quality mark icon" loading="lazy" decoding="async" /> 950 } 951 </div> 952 </div> 953 </div> 954 } 955 @if (hasVideos) 956 { 957 <div class="product-info product-detail__row"> 958 <a id="product-video"></a> 959 <div class="container container--small"> 960 <h2>@Translate("ProductDetail_Anchor_Video", "Video")</h2> 961 <div class="text-component__videos"> 962 @foreach (var video in productVideos) 963 { 964 var productVideo = video.Value; 965 var youtubeId = Hoenderdaal.Repository.Helpers.StringHelpers.GetYoutubeIdFromUrl(productVideo); 966 <div class="text-component__videos__video"> 967 <iframe src="https://youtube.com/embed/@youtubeId" frameborder="0" allow="encrypted-media; picture-in-picture" title="@video.Name.JsEncode()" loading="lazy" allowfullscreen></iframe> 968 </div> 969 } 970 </div> 971 </div> 972 </div> 973 974 } 975 @if (productDownloads?.Any() ?? false) 976 { 977 <div class="product-info product-detail__row"> 978 <a id="product-downloads"></a> 979 <div class="container container--small"> 980 <h2>@Translate("ProductDetail_Anchor_Downloads", "Downloads")</h2> 981 <div class="product-detail__downloads"> 982 @foreach (var download in productDownloads) 983 { 984 var downloadInfo = EcomHelper.GetDownloadInfo(Dynamicweb.Frontend.PageView.Current().AreaID, download); 985 if (downloadInfo != null) 986 { 987 <a href="@downloadInfo.Link" class="download" download="@downloadInfo.Name" target="_blank"> 988 <div class="product-detail__downloads__block"> 989 <div class="product-detail__downloads__block__text"> 990 @downloadInfo.Name 991 </div> 992 <div class="product-detail__downloads__block__text"> 993 (@downloadInfo.Size) 994 </div> 995 <div class="product-detail__downloads__block__icon"> 996 <img src="@($"{baseUrl}/Images/icons/icons8-open-document.svg")" alt="download icon" loading="lazy" decoding="async" /> 997 </div> 998 </div> 999 </a> 1000 } 1001 else 1002 { 1003 <a href="@download.Value" class="download" target="_blank"> 1004 <div class="product-detail__downloads__block"> 1005 <div class="product-detail__downloads__block__text"> 1006 @download.Value 1007 </div> 1008 <div class="product-detail__downloads__block__icon"> 1009 1010 </div> 1011 </div> 1012 </a> 1013 } 1014 } 1015 </div> 1016 </div> 1017 </div> 1018 } 1019 @if (showAlternatives) 1020 { 1021 <div class="product-alternatives product-detail__row"> 1022 <a id="product-alternatives"></a> 1023 <div class="container container--small"> 1024 <h2>@Translate("ProductDetail_Anchor_AlternativeProducts", "Alternative products")</h2> 1025 <div class="row"> 1026 @foreach (var alternative in alternatives) 1027 { 1028 var alternativeProduct = Dynamicweb.Ecommerce.Services.Products.GetProductById(alternative.Id, alternative.VariantId, ecomLanguageId); 1029 var alternativeInfo = Hoenderdaal.Repository.Helpers.EcomHelper.GetAlternativeProductViewModel(alternativeProduct, userIsLoggedIn, Dynamicweb.Frontend.PageView.Current().Area, Pageview.Page.ID); 1030 var alternativeProductImage = $"/Admin/Public/GetImage.ashx?Image=/Files/Templates/Designs/Hoenderdaal/Images/ecom/Product_NoImage.png&Crop=5&Format=webp&Fillcanvas=true&Height=95&Width=95&Quality=95"; 1031 if (alternativeProduct != null) 1032 { 1033 var alternativeMaster = Dynamicweb.Ecommerce.Services.Products.GetProductById(alternativeProduct.Id, "", ecomLanguageId); 1034 var alternativeImage = EcomHelper.GetProductImage(alternativeProduct, alternativeMaster); 1035 if (!string.IsNullOrEmpty(alternativeImage?.Value)) 1036 { 1037 alternativeProductImage = $"/Admin/Public/GetImage.ashx?Image={alternativeImage.Value.Replace(" ", "%20")}&altFmImage_path=/Files/Templates/Designs/Hoenderdaal/Images/ecom/Product_NoImage.png&Crop=5&Format=webp&Fillcanvas=1&Height=95&Width=95&Quality=95&Background=FFFFFF"; 1038 } 1039 } 1040 <div class="col-sm-12 col-md-6"> 1041 <a href="@alternativeInfo.Link"> 1042 <div class="alternative-top"> 1043 <div><img src="@alternativeProductImage" loading="lazy" decoding="async" alt="Alternative @alternativeInfo.ProductName.JsEncode()" /></div> 1044 <div class="alternative-content"> 1045 @alternativeInfo.Brand<br /> 1046 @if (alternativeInfo.StockInfo.HasValue) 1047 { 1048 1049 <div class="product-detail__variant__details__quantity-stock__stock product-detail__variant__details__quantity-stock__stock--@alternativeInfo.StockInfo.Value.stockTextClass"> 1050 <div class="product-detail__variant__details__quantity-stock__stock__status-light @alternativeInfo.StockInfo.Value.stockColorClass" title="@alternativeInfo.StockInfo.Value.stockText"></div>&nbsp;@alternativeInfo.StockInfo.Value.stockText 1051 </div> 1052 } 1053 </div> 1054 </div> 1055 <div> 1056 @alternativeInfo.ProductNumber<br />@alternativeInfo.ProductName @alternativeInfo.Specifications<br />@alternativeInfo.Content 1057 </div> 1058 </a> 1059 </div> 1060 } 1061 </div> 1062 </div> 1063 </div> 1064 } 1065 @if (hasTechnicalInfo) 1066 { 1067 <div class="product-info faqlist faqlist--product-detail product-detail__row"> 1068 <a id="product-technical-info"></a> 1069 <div class="container container--small"> 1070 <h2 class="product-detail">@Translate("ProductDetail_Title_TechnicalInfo", "Technical info")</h2> 1071 <div> 1072 @foreach (var faq in technicalInfo) 1073 { 1074 var faqId = string.Format("TI_{0}", faq.ID); 1075 var collapseId = string.Format("Collapse_TI_{0}", faq.ID); 1076 var image = Hoenderdaal.Repository.Helpers.ItemHelper.GetItemValue<string>(faq.Item, "Image"); 1077 var question = Hoenderdaal.Repository.Helpers.ItemHelper.GetItemValue<string>(faq.Item, "Question"); 1078 var answer = Hoenderdaal.Repository.Helpers.ItemHelper.GetItemValue<string>(faq.Item, "Answer"); 1079 1080 <div class="faqlist__accordion" id="@collapseId"> 1081 <button type="button" class="faqlist__accordion__button" onclick="toggle('#@collapseId')" data-toggle="collapse" data-target="#@collapseId"> 1082 <div class="faqlist__accordion__button__question"> 1083 @question 1084 </div> 1085 <div class="faqlist__accordion__button__icon"> 1086 <?xml version="1.0" encoding="UTF-8"?> 1087 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="26pt" height="26pt" viewBox="0 0 26 26" version="1.1"> 1088 <g id="surface220560"> 1089 <path style=" stroke:none;fill-rule:nonzero;fill:rgb(17.647059%,25.098039%,30.588235%);fill-opacity:1;" d="M 13 15.40625 L 21.765625 6.820312 C 22.15625 6.4375 22.78125 6.441406 23.171875 6.828125 L 24.707031 8.363281 C 25.097656 8.757812 25.097656 9.390625 24.703125 9.78125 L 13.707031 20.707031 C 13.511719 20.902344 13.257812 21 13 21 C 12.742188 21 12.488281 20.902344 12.292969 20.707031 L 1.296875 9.78125 C 0.902344 9.390625 0.902344 8.757812 1.292969 8.363281 L 2.828125 6.828125 C 3.21875 6.441406 3.84375 6.4375 4.234375 6.820312 Z M 13 15.40625 "/> 1090 </g> 1091 </svg> 1092 1093 </div> 1094 </button> 1095 <div id="@collapseId" class="faqlist__accordion__content" aria-labelledby="@faqId"> 1096 <div> 1097 @if (!string.IsNullOrWhiteSpace(image) && image.Length > 10) 1098 { 1099 <img src="@image" loading="lazy" decoding="async" /> 1100 } 1101 @answer 1102 </div> 1103 </div> 1104 </div> 1105 } 1106 </div> 1107 </div> 1108 </div> 1109 } 1110 @if (hasFaqs) 1111 { 1112 <div class="product-info faqlist faqlist--product-detail product-detail__row"> 1113 <a id="product-faqs"></a> 1114 <div class="container container--small"> 1115 <h2 class="product-detail">@Translate("ProductDetail_Title_Faqs", "FAQ")</h2> 1116 <div> 1117 @foreach (var faq in productFaqs) 1118 { 1119 var faqId = string.Format("Faq_{0}", faq.ID); 1120 var collapseId = string.Format("Collapse_{0}", faq.ID); 1121 var image = Hoenderdaal.Repository.Helpers.ItemHelper.GetItemValue<string>(faq.Item, "Image"); 1122 var question = Hoenderdaal.Repository.Helpers.ItemHelper.GetItemValue<string>(faq.Item, "Question"); 1123 var answer = Hoenderdaal.Repository.Helpers.ItemHelper.GetItemValue<string>(faq.Item, "Answer"); 1124 <div class="faqlist__accordion" id="@collapseId"> 1125 <button type="button" class="faqlist__accordion__button" onclick="toggle('#@collapseId')" data-toggle="collapse" data-target="#@collapseId"> 1126 <div class="faqlist__accordion__button__question"> 1127 @question 1128 </div> 1129 <div class="faqlist__accordion__button__icon"> 1130 <?xml version="1.0" encoding="UTF-8"?> 1131 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="26pt" height="26pt" viewBox="0 0 26 26" version="1.1"> 1132 <g id="surface220560"> 1133 <path style=" stroke:none;fill-rule:nonzero;fill:rgb(17.647059%,25.098039%,30.588235%);fill-opacity:1;" d="M 13 15.40625 L 21.765625 6.820312 C 22.15625 6.4375 22.78125 6.441406 23.171875 6.828125 L 24.707031 8.363281 C 25.097656 8.757812 25.097656 9.390625 24.703125 9.78125 L 13.707031 20.707031 C 13.511719 20.902344 13.257812 21 13 21 C 12.742188 21 12.488281 20.902344 12.292969 20.707031 L 1.296875 9.78125 C 0.902344 9.390625 0.902344 8.757812 1.292969 8.363281 L 2.828125 6.828125 C 3.21875 6.441406 3.84375 6.4375 4.234375 6.820312 Z M 13 15.40625 "/> 1134 </g> 1135 </svg> 1136 1137 </div> 1138 </button> 1139 <div id="@collapseId" class="faqlist__accordion__content" aria-labelledby="@faqId"> 1140 <div> 1141 @if (!string.IsNullOrWhiteSpace(image) && image.Length > 10) 1142 { 1143 <img src="@image" loading="lazy" decoding="async" /> 1144 } 1145 @answer 1146 </div> 1147 </div> 1148 </div> 1149 } 1150 </div> 1151 </div> 1152 </div> 1153 } 1154 @if (hasTechnicalInfo || hasFaqs) 1155 { 1156 @SnippetStart("JavaScriptBottom") 1157 <script> 1158 function toggle(paragraphId) { 1159 // toggle clicked faq paragraph 1160 var paragraph = $(paragraphId); 1161 paragraph.toggleClass("faqlist__accordion--expanded"); 1162 1163 // close any other open faq paragraph 1164 $(".faqlist__accordion:not(" + paragraphId + ")").removeClass("faqlist__accordion--expanded"); 1165 1166 // scroll to selected faq paragraph 1167 if (paragraph.hasClass('faqlist__accordion--expanded')) { 1168 $('body,html').animate({ 1169 scrollTop: $(paragraphId).offset().top - 150 1170 }, 800); 1171 } 1172 } 1173 </script> 1174 @SnippetEnd("JavaScriptBottom") 1175 } 1176 @if (hasRelatedArticles) 1177 { 1178 <div class="product-related product-detail__row" id="product-relatedarticles"> 1179 <div class="container container--small"> 1180 <h2>@Translate("ProductDetail_Anchor_RelatedArticles", "Related articles")</h2> 1181 <div class="row"> 1182 @foreach (var related in relatedArticles) 1183 { 1184 1185 var relatedProduct = Dynamicweb.Ecommerce.Services.Products.GetProductById(related.RelatedProductId, related.RelatedProductVariantId, ecomLanguageId); 1186 if (relatedProduct != null) 1187 { 1188 var relatedProductGroupId = relatedProduct.Groups.FirstOrDefault(g => !g.IsTopGroup)?.Id ?? ""; 1189 if (!string.IsNullOrWhiteSpace(relatedProductGroupId)) 1190 { 1191 var relatedProductUrl = $"/Default.aspx?ID={Dynamicweb.Frontend.PageView.Current().Page.ID}&GroupID={relatedProductGroupId}&ProductID={relatedProduct.Id}&VariantID={relatedProduct.VariantId}"; 1192 var relatedProductMainImage = relatedProduct.ImageLarge; 1193 if (!string.IsNullOrWhiteSpace(relatedProductMainImage)) 1194 { 1195 relatedProductMainImage = $"/Admin/Public/GetImage.ashx?Image={relatedProductMainImage}&altFmImage_path=/Files/Templates/Designs/Hoenderdaal/Images/ecom/Product_NoImage.png&Crop=5&Format=webp&Fillcanvas=1&Height=95&Width=95&Quality=95&Background=FFFFFF"; 1196 } 1197 else 1198 { 1199 relatedProductMainImage = $"/Admin/Public/GetImage.ashx?Image=/Files/Templates/Designs/Hoenderdaal/Images/ecom/Product_NoImage.png&Crop=5&Format=webp&Fillcanvas=true&Height=95&Width=95&Quality=95"; 1200 } 1201 <div class="col"> 1202 <a href="@relatedProductUrl"> 1203 <img src="@relatedProductMainImage" loading="lazy" decoding="async" alt="Related article @relatedProduct.Name.JsEncode()" /> 1204 <br /> 1205 @relatedProduct.Name 1206 </a> 1207 </div> 1208 } 1209 } 1210 } 1211 </div> 1212 </div> 1213 </div> 1214 } 1215 </div> 1216 1217 @SnippetStart("JavaScriptBottom") 1218 <script> 1219 if (window.contentScriptInjected !== true) { 1220 window.contentScriptInjected = true; // global scope 1221 1222 var largeOptions = { 1223 slidesToShow: 1, 1224 slidesToScroll: 1, 1225 arrows: true, 1226 fade: true, 1227 mobileFirst: true, 1228 infinite: false, 1229 //centerMode: true, 1230 asNavFor: '.product-detail__variant__slider__thumbnails' 1231 } 1232 1233 var thumbnailOptions = { 1234 slidesToShow: @productImages.Count > 4 ? 4 : @productImages.Count, 1235 slidesToScroll: 1, 1236 mobileFirst: true, 1237 centerMode: false, 1238 infinite: false, 1239 arrows: true, 1240 variableWidth: false, 1241 asNavFor: '.product-detail__variant__slider__large', 1242 focusOnSelect: true 1243 } 1244 1245 const debounceHoenderdaal = (func, delay) => { 1246 let inDebounce 1247 return function () { 1248 const context = this 1249 const args = arguments 1250 clearTimeout(inDebounce) 1251 inDebounce = setTimeout(() => func.apply(context, args), delay) 1252 } 1253 } 1254 1255 $(window).resize(debounceHoenderdaal(() => { 1256 var largeSlider = $('.product-detail__variant__slider__large'); 1257 largeSlider.slick('unslick'); 1258 largeSlider.slick(largeOptions); 1259 1260 var thumbnailSlider = $('.product-detail__variant__slider__thumbnails'); 1261 thumbnailSlider.slick('unslick'); 1262 thumbnailSlider.slick(thumbnailOptions); 1263 }, 100)); 1264 } 1265 1266 </script> 1267 @SnippetEnd("JavaScriptBottom") 1268 @SnippetStart("JavaScriptDocReady") 1269 $('.product-detail__variant__slider__thumbnails').slick(thumbnailOptions); 1270 $('.product-detail__variant__slider__large').slick(largeOptions); 1271 1272 // prefill quantities for variants that are already in the cart and initiate quantity inputs and togglers 1273 ProductDetail.PrefillFromCart(); 1274 1275 // copy article number / GTIN to the clipboard and show a short confirmation in the tooltip 1276 $('.btn-copy').on('click', function () { 1277 var button = $(this); 1278 var showCopied = function () { 1279 clearTimeout(button.data('copyTimer')); 1280 button.addClass('copied').attr('data-tooltip', button.data('label-copied')); 1281 button.data('copyTimer', setTimeout(function () { 1282 button.removeClass('copied').attr('data-tooltip', button.data('label-copy')); 1283 }, 2000)); 1284 }; 1285 var value = String(button.data('copy')); 1286 if (navigator.clipboard && window.isSecureContext) { 1287 navigator.clipboard.writeText(value).then(showCopied); 1288 } else { 1289 var input = $('<input type="text" readonly>').val(value).css({ position: 'fixed', opacity: 0 }).appendTo('body'); 1290 input[0].select(); 1291 if (document.execCommand('copy')) { showCopied(); } 1292 input.remove(); 1293 } 1294 }).each(function () { 1295 $(this).attr('data-tooltip', $(this).data('label-copy')); 1296 }); 1297 1298 @if (userIsLoggedIn) 1299 { 1300 <text> 1301 // prefill favorites from my favorites list and initiate onclick events 1302 AccountFavorites.PrefillFromList(); 1303 </text> 1304 } 1305 1306 const lang = ($('html').attr('lang') || 'en').toLowerCase(); 1307 1308 const commaLocales = ['nl', 'fr', 'de']; 1309 const decimalSeparator = commaLocales.includes(lang) ? ',' : '.'; 1310 1311 // 3️⃣ Process all matching elements 1312 $('#variantselector option').each(function() { 1313 let text = $(this).text(); 1314 1315 // Normalize first (convert commas to dots internally) 1316 text = text.replace(/(\d),(\d)/g, '$1.$2'); 1317 1318 // Apply the right separator for the locale 1319 if (decimalSeparator === ',') { 1320 text = text.replace(/(\d)\.(\d)/g, '$1,$2'); 1321 } else { 1322 text = text.replace(/(\d),(\d)/g, '$1.$2'); 1323 } 1324 1325 $(this).text(text); 1326 }); 1327 @SnippetEnd("JavaScriptDocReady")