Error executing template "Designs/isabella/eCom/Product/isabella-villa-and-camplet.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
at CompiledRazorTemplates.Dynamic.RazorEngine_3d8bb150b63a4044abd1dcc1492cedb3.Execute() in F:\dynamicweb.net\Solutions\isabella.espresso4.dk\Files\Templates\Designs\isabella\eCom\Product\isabella-villa-and-camplet.cshtml:line 592
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 @inherits Co3.Espresso.Website.TemplateBases.Pages.PageBase 2 3 @using System.Security.Cryptography 4 @using System.Text.RegularExpressions 5 @using Co3.Espresso.Website.Services 6 @using Dynamicweb.Ecommerce.Products 7 @using Dynamicweb.Frontend 8 @using Co3.Isabella.Dw.Models.FrontEnd.Ecommerce 9 @using Dynamicweb.Ecommerce 10 @using Dynamicweb.Ecommerce.Common 11 @using Newtonsoft.Json 12 @using System.Web 13 @using Co3.Espresso.Base.Extensions 14 @using Co3.Espresso.Base.Models 15 @using Dynamicweb.Content.Items 16 @using Dynamicweb.Ecommerce.Products.Categories 17 @using eProductService = Co3.Espresso.Website.Services.ProductService 18 @using ProductService = Co3.Isabella.Dw.Services.ProductService 19 @inherits Co3.Espresso.Website.TemplateBases.Paragraphs.Module 20 21 @using System.Globalization 22 @using System.Security.Cryptography.X509Certificates 23 @using System.Web.Razor.Parser.SyntaxTree 24 @using Co3.Espresso.Base.Extensions 25 @using Co3.Espresso.Website.Models.FrontEnd 26 @using Co3.Espresso.Website.Services 27 @using Co3.Isabella.Dw.Models.FrontEnd.Ecommerce 28 @using Dynamicweb.Content 29 @using Dynamicweb.Ecommerce.Products 30 @using Dynamicweb.Frontend 31 @using Dynamicweb.Rendering 32 @using Dynamicweb.Rendering.Translation 33 @using Dynamicweb.SystemTools 34 @using EcomContext = Dynamicweb.Ecommerce.Common.Context 35 @using eProductService = Co3.Espresso.Website.Services.ProductService 36 @using Page = Dynamicweb.Content.Page 37 @using PageService = Dynamicweb.Content.PageService 38 39 @functions { 40 41 public string getCountryCodeFromArea(Area area) 42 { 43 RegionInfo regionInfo = new RegionInfo( area.CultureInfo.LCID ); 44 return regionInfo.TwoLetterISORegionName; 45 } 46 47 public string getCheckoutSetup(string shopType = "") 48 { 49 bool isB2bCheckout = PageView.Current().User != null; 50 if (isB2bCheckout) 51 { 52 return "shipping,customer,approve"; 53 } else if (shopType == "B2C") 54 { 55 return "shipping,payment,approve"; 56 } else if (shopType == "Outlet") 57 { 58 return "shipping,customer,payment,approve"; 59 } 60 61 return "customer,approve"; 62 } 63 64 public static string GetStandardCollapseToggleTextExpand() 65 { 66 return "Se mere"; 67 } 68 69 public static string GetStandardCollapseToggleTextCollapse() 70 { 71 return "Se mindre"; 72 } 73 74 public string getModelTypeLink() 75 { 76 bool isUserAuthenticated = PageView.Current().User != null; 77 string eComCountryCode = PageView.Current().Area.Item[ "EcommerceCountryCode" ] != null ? PageView.Current().Area.Item[ "EcommerceCountryCode" ].ToString() : ""; 78 string returnValue = string.Empty; 79 80 if ( isUserAuthenticated == false ) 81 { 82 if ( string.IsNullOrEmpty(eComCountryCode) == false) 83 { 84 { 85 returnValue = string.Format( "Ecom:Product.CategoryField.ModelType.ModelTypeLink_{0}.Value", eComCountryCode ); 86 } 87 } 88 else 89 { 90 returnValue = "Ecom:Product.CategoryField.ModelType.ModelTypeLink.Value"; 91 } 92 } 93 else 94 { 95 if ( string.IsNullOrEmpty(eComCountryCode) == false) 96 { 97 { 98 returnValue = string.Format( "Ecom:Product.CategoryField.ModelType.ModelTypeLinkB2B_{0}.Value", eComCountryCode ); 99 } 100 } 101 else 102 { 103 returnValue = "Ecom:Product.CategoryField.ModelType.ModelTypeLinkB2B.Value"; 104 } 105 } 106107 return returnValue; 108 } 109110 } 111112 @helper ProductDescription(string sectionClasses = "e-section", bool sectionCollapse = false, string contentClasses = null, string heading = null, string content = null, string collapseToggleTextExpand = null, string collapseToggleTextCollapse = null) 113 { 114 if ( string.IsNullOrEmpty( content ) == false ) 115 { 116 ClassList headingClassList = new ClassList(); 117 headingClassList.AddClasses( "col-12" ); 118 ClassList contentClassList = new ClassList(); 119 contentClassList.AddClasses( "col-12" ); 120121 @sectionStart( sectionClasses: sectionClasses, sectionCollapse: sectionCollapse, contentClasses: contentClasses, collapseToggleTextCollapse: collapseToggleTextCollapse, collapseToggleTextExpand: collapseToggleTextExpand ) 122123 if ( string.IsNullOrEmpty( heading ) == false ) 124 { 125 <div class="@headingClassList"> 126 <h2>@heading</h2> 127 </div> 128 } 129 <div class="@contentClassList"> 130 @content 131 </div> 132133 @sectionEnd() 134 } 135 } 136137138 @helper ProductVideo(string sectionClasses = "e-section", string contentClasses = null, string heading = null, string videoURL = null) 139 { 140 if ( string.IsNullOrEmpty( videoURL ) == false ) 141 { 142 ClassList headingClassList = new ClassList(); 143 headingClassList.AddClasses( "col-12" ); 144 ClassList contentClassList = new ClassList(); 145 contentClassList.AddClasses( "col-12" ); 146147148 @sectionStart( sectionClasses: sectionClasses, contentClasses: contentClasses ) 149150 if ( string.IsNullOrEmpty( heading ) == false ) 151 { 152 <div class="@headingClassList"> 153 <h2>@heading</h2> 154 </div> 155 } 156157 <div class="@contentClassList"> 158 <div class="embed-responsive embed-responsive-16by9 mb-2"> 159 <iframe class="embed-responsive-item" src="@videoURL" width="1080" height="608" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe> 160 </div> 161 </div> 162 @sectionEnd() 163 } 164 } 165166 @helper ProductRelatedProducts(string sectionClasses = "e-section", bool sectionCollapse = false, string contentClasses = null, string heading = null, string content = null, string collapseToggleTextExpand = null, string collapseToggleTextCollapse = null, 167 IEnumerable< Product > productLoop = null) 168 { 169 if ( productLoop != null && productLoop.Any() == true ) 170 { 171 ClassList headingClassList = new ClassList(); 172 headingClassList.AddClasses( "col-12" ); 173 ClassList contentClassList = new ClassList(); 174 contentClassList.AddClasses( "col-12" ); 175176 @sectionStart( sectionClasses: sectionClasses, sectionCollapse: sectionCollapse, contentClasses: contentClasses, collapseToggleTextCollapse: collapseToggleTextCollapse, collapseToggleTextExpand: collapseToggleTextExpand ) 177178 if ( string.IsNullOrEmpty( heading ) == false ) 179 { 180 <div class="@headingClassList"> 181 <h4 class="isabella-text-bullets-left mb-3">@heading</h4> 182 </div> 183 } 184 <div class="@contentClassList"> 185 <div class="e-products mb-2"> 186 <div class="row"> 187 @{ 188 string productlistItemClassList = "col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3"; 189 } 190 @foreach ( Product product in productLoop.Where(p => p.Groups.Any(g => g.ShopId.Equals("SHOP1")) && (bool) p.GetCategoryValue( "ProductsGeneral", "PIMActive" ) != false && (bool) p.ShowInProductList && p.Active) ) 191 { 192 @ProductlistItem(product, productlistItemClassList) 193 } 194 </div> 195 </div> 196 </div> 197198 @sectionEnd() 199 } 200 } 201202203 @helper ProductlistItem(Product product, string productlistItemClassList = null, string isModelProductList = null) 204 { 205 Dynamicweb.Ecommerce.Products.ProductService dwProductService = new Dynamicweb.Ecommerce.Products.ProductService(); 206 string shopType = PageView.Current().Area.Item["ShopType"]?.ToString(); 207 string productLink = eProductService.Instance.GetProductLink( product.GetDefaultGroupByShopId( product.DefaultShopId ).Id, product.Id, product.VariantId ); 208209210 productLink = SearchEngineFriendlyURLs.GetFriendlyUrl( productLink ); 211212 if (shopType == "Outlet") 213 { 214 Page page = new PageService().GetPageByNavigationTag(PageView.Current().AreaID, "outletdisplaypage"); 215 if (page != null) 216 { 217 productLink = SearchEngineFriendlyURLs.GetFriendlyUrl( $"Default.aspx?ID={page.ID}&productId={product.Id}" ); 218 } 219220 } 221222 string productlistDetailImage = product.Details.FirstOrDefault( pd => pd.Type == 0 && pd.GroupId == 4 )?.Value; 223224 if ( product != null ) 225 { 226 dynamic productData = new 227 { 228 id = product.Id, 229 url = productLink, 230 number = product.Number, 231 name = product.Name, 232 imageDefault = Co3.Isabella.Dw.Services.ImageService.Instance.GetImageURL( Dynamicweb.Ecommerce.Services.Details.GetDefaultDetail( product.Id, product.VariantId, 233 EcomContext.LanguageID )?.Value, 400, 225, 0, 75, "jpg", "/Files/Templates/Designs/isabella/_assets/img/NoImage.gif" ), 234 price = Co3.Isabella.Dw.Services.ProductService.Instance.GetPrice( product.Id ).Format(), 235 priceClean = Co3.Isabella.Dw.Services.ProductService.Instance.GetPrice( product.Id ).Price, 236 productIntroText = product.GetCategoryValue( "ProductsGeneral", "ProductIntroText" )?.ToString(), 237 news = product.GetCategoryValue( "ProductsGeneral", "News" )?.ToString(), 238 productType = product.GetCategoryValue( "ProductsGeneral", "ProductType" )?.ToString(), 239 isModelProductList = isModelProductList, 240 productlistDetailImage = Co3.Isabella.Dw.Services.ImageService.Instance.GetImageURL( productlistDetailImage ), 241 shopType 242 }; 243244 <div class="@productlistItemClassList"> 245 <div class="border-1 card mb-6"> 246 <a href="@productData.url"> 247 @if ( productData.isModelProductList == "True" ) 248 { 249 <img src="@productData.productlistDetailImage" alt="@productData.name @productData.productType" class="col-12 p-0"> 250 } 251 else 252 { 253 <img src="@productData.imageDefault" alt="@productData.name @productData.productType" class="col-12 p-0"> 254 } 255 @if ( productData.news == "True" ) 256 { 257 <div class="isabella-product-item-news"> 258 @Dynamicweb.Rendering.Translation.Translation.GetTranslation( "Ecom Product - News Badge - Text" ) 259 </div> 260 } 261 </a> 262 <div class="card-body p-1 p-lg-3"> 263 <h4 class="e-products-item-name mb-0"> 264 <a href="@productData.url"> 265 @productData.name 266 </a> 267 </h4> 268 @if ( string.IsNullOrEmpty( productData.productIntroText ) == false ) 269 { 270 @productData.productIntroText 271 } 272 </div> 273 </div> 274 </div> 275 } 276 } 277278279 @helper sectionStart(string sectionClasses = "e-section", string contentClasses = null, bool sectionCollapse = false, string sectionId = null, string collapseToggleTextExpand = null, string collapseToggleTextCollapse = null) 280 { 281 sectionId = string.IsNullOrEmpty( sectionId ) ? Guid.NewGuid().ToString( "N" ) : sectionId; 282 ClassList sectionClassList = new ClassList(); 283 sectionClassList.AddClasses( sectionClasses ); 284 ClassList contentClassList; 285286 if ( contentClasses == null ) 287 { 288 contentClassList = Co3.Espresso.Website.Services.PageService.Instance.GetResponsiveClassesFromPageItem( PageView.Current().Page.Item ); 289 } 290 else 291 { 292 contentClassList = new ClassList(); 293 contentClassList.AddClasses( contentClasses ); 294 } 295296 // TODO: Split collapse logic into separate helper function. 297 string collapseId = Guid.NewGuid().ToString( "N" ); 298 ClassList collapseToggleClassList = new ClassList(); 299 if ( sectionCollapse ) 300 { 301 sectionClassList.AddClasses( "p-section-collapse js-p-section-collapse" ); 302 collapseToggleClassList.AddClasses( contentClasses ); 303 collapseToggleClassList.AddClasses( "p-section-collapse-toggle collapsed order-last text-center" ); 304 contentClassList.AddClasses( "p-section-collapse-content collapse is-md" ); 305 } 306307 @:<section class="@sectionClassList" id="@sectionId"> 308 @:<div class="container-fluid"> 309 @:<div class="row"> 310311 // TODO: Split collapse logic into separate helper function. 312 if ( sectionCollapse ) 313 { 314 <div class="@collapseToggleClassList" data-toggle="collapse" data-target="#@collapseId"> 315 <button class="btn btn-primary p-section-collapse-toggle-btn" type="button"> 316 <i class="material-icons p-section-collapse-toggle-icon">keyboard_arrow_down</i> 317 </button> 318 <small class="h4 p-section-collapse-toggle-text" data-expand-text="@( string.IsNullOrEmpty( collapseToggleTextExpand ) ? GetStandardCollapseToggleTextExpand() : collapseToggleTextExpand )" data-collapse-text="@( string.IsNullOrEmpty( collapseToggleTextCollapse ) ? GetStandardCollapseToggleTextCollapse() : collapseToggleTextCollapse )"></small> 319 </div> 320 } 321322 @:<div class="@contentClassList" id="@collapseId"> 323 @:<div class="row"> 324 } 325326 @helper sectionEnd() 327 { 328 @:</div> 329 @:</div> 330 @:</div> 331 @:</div> 332 @:</section> 333 } 334335336337338339 @{ 340 bool isUserAuthenticated = PageView.Current().User != null; 341 string userDealerType = string.Empty; 342 string variantId = HttpContext.Current.Request[ "VariantID" ] ?? GetString("Ecom:Product.VariantID"); 343 IsabellaProduct isabellaProduct = ProductService.Instance.GetIsabellaProduct(GetString("Ecom:Product.ID"), variantId, GetString("Ecom:Product.DefaultVariantComboID")); 344 string OrderContext = PageView.Current().Area.Item[ "ContextCart" ]?.ToString(); 345 string shopType = PageView.Current().Area.Item["ShopType"]?.ToString(); 346347 string jsDataPropertyPath = isabellaProduct.Id; 348349 object noBuyB2BandB2C = Espresso.Page.Area.Item[ "EcommerceNoBuyB2CB2B" ]; 350351 bool isHybridShop = (bool)noBuyB2BandB2C && isUserAuthenticated && shopType == "Hybrid"; 352353 bool userCanBuy = false; 354355 bool isIsabellaProduct = GetBoolean( "Ecom:Product.CategoryField.ProductsGeneral.IsabellaProduct.Value" ); 356 bool isCampletProduct = GetBoolean( "Ecom:Product.CategoryField.ProductsGeneral.CampletProduct.Value" ); 357 bool isVillaProduct = GetString("Ecom:Product.CategoryField.ProductsGeneral.ProductType.Value") == "Villa"; 358 bool isAccessorieProduct = GetBoolean( "Ecom:Product.CategoryField.IsAccessory.VillaProduct.Value" ); 359360 if ( isUserAuthenticated ) 361 { 362 Item item = null; 363364 if (!string.IsNullOrEmpty(PageView.Current().User.ItemType)) 365 { 366 item = Dynamicweb.Services.Items.GetItem( PageView.Current().User.ItemType, PageView.Current().User.ItemId ); 367 } 368369 if ( item != null && item.ContainsKey( "Type" ) && item[ "Type" ] != null ) 370 { 371 userDealerType = item[ "Type" ].ToString(); 372 } 373374 if ( string.IsNullOrEmpty( userDealerType ) ) 375 { 376 userDealerType = string.Empty; 377 } 378379380 if ( isIsabellaProduct && userDealerType.Contains( "Isabella" ) == true ) 381 { 382 userCanBuy = true; 383 } else if ( isCampletProduct && userDealerType.Contains( "Camplet" ) == true ) 384 { 385 userCanBuy = true; 386 } else if ( isVillaProduct && userDealerType.Contains( "Villa" ) == true ) 387 { 388 userCanBuy = true; 389 } 390 } 391 else 392 { 393 userCanBuy = true; 394 } 395396 string productHeadline = eProductService.Instance.GetName(GetString("Ecom:Product.ID")); 397 string productPrice = Co3.Isabella.Dw.Services.ProductService.Instance.GetPrice(GetString("Ecom:Product.ID"), GetString("Ecom:Product.VariantID")).Price.ToJavaScript(); 398 string productDescription = Regex.Replace(GetString("Ecom:Product.CategoryField.ProductsGeneral.ProductIntroText.Value"), @"<[^>]*>", String.Empty); 399 string productImage = GetString("Ecom:Product.ImageDefault.Clean"); 400401 Dynamicweb.Ecommerce.Products.ProductService dwProductService = new Dynamicweb.Ecommerce.Products.ProductService(); 402 Product product = dwProductService.GetProductById(GetString("Ecom:Product.ID"), GetString("Ecom:Product.VariantID"), true); 403 IEnumerable< Product > parentProducts = Co3.Isabella.Dw.Services.ProductService.Instance.GetRelatedParentProducts(product); 404405 string howItWorksPage = Espresso.Page.Area.Item[ "Villa_Camplet_HowItWorks" ]?.ToString().ToLower().Replace("default.aspx?id=", ""); 406407 @* Global Image modal variable used in part image carousel *@ 408 string isActive = string.Empty; 409410 string modelTypeLink = getModelTypeLink(); 411412 dynamic JSON = new 413 { 414 pdfData = new 415 { 416 colors = new List< dynamic >(), 417 frameMatch = new List< dynamic >(), 418 miscFrameMaterial = new List<dynamic>(), 419 frameMaterial = new List<dynamic>(), 420 materials = new List< dynamic >(), 421 measures = new List< dynamic >(), 422 } 423 }; 424425 dynamic isabellaExtendPdfData = new 426 { 427 currency = Context.Currency.Code, 428 logo = "Files/Images/isabella/signbuilder/signbuilder-logo.png", 429 campletLogo = "Files/Images/isabella/Products/Camp-let/Camp-let.png", 430 noBuyB2BandB2C = noBuyB2BandB2C, 431 deliveryCost = new 432 { 433 label = string.IsNullOrEmpty( GetString("Ecom:Product.CategoryField.TentCamVillaGeneral.Delivery_cost.Value") ) == false ? GetString("Ecom:Product.CategoryField.TentCamVillaGeneral.Delivery_cost.Label") : string.Empty, 434 value = GetString("Ecom:Product.CategoryField.TentCamVillaGeneral.Delivery_cost.Value") 435 }, 436 translations = new 437 { 438 totalPrice = Translate("PDF - Total Price - Text", "Total"), 439 specsHeader = Translate("PDF - Villa Variant Specs - Header", "Specifikationer"), 440 Fronts = Translate("PDF - Villa Variant Specs - Fronts", "Fronter"), 441 Length = Translate("PDF - Villa Variant Specs - Length", "Længde"), 442 VillaTotalLength = Translate("PDF - Villa Variant Specs - VillaTotalLength", "Total længde"), 443 Depth = Translate("PDF - Villa Variant Specs - Depth", "Dybde"), 444 Height = Translate("PDF - Villa Variant Specs - Height", "Højde med vogn"), 445 LengthOfAccessories = Translate("PDF - Villa Variant Specs - LengthOfAccessories", "LengthOfAccessories") 446 } 447 }; 448449 string formClassList = "js-e-product-form"; 450 string sendToDealerType = "Camplet"; 451 if (isUserAuthenticated == false ) 452 { 453 formClassList = "js-e-product-form js-i-context-cart-product-form"; 454 } 455 object findDealerLink = Espresso.Page.Area.Item[ "FindDealer" ].ToString(); 456457 bool useSendToDealer = false; 458 if (isUserAuthenticated == false) 459 { 460 if (isVillaProduct) 461 { 462 sendToDealerType = "Villa"; 463 } 464 if (isCampletProduct || isVillaProduct) 465 { 466 useSendToDealer = true; 467 } 468 } 469 } 470471 @sectionEnd() 472473 <div class="e-product js-e-product js-isabella-villa-and-camplet-pdf" data-product-id="@isabellaProduct.Id" data-has-variants="@isabellaProduct.HasVariants.ToString().ToLower()" data-variant-id="@isabellaProduct.VariantId" > 474 <form class="@formClassList" data-dealer-type="@sendToDealerType"> 475 <input name="CartCmd" type="hidden" value="addmulti"> 476 <input name="Redirect" type="hidden" value="false"> 477 <input name="ProductLoopCounter0" type="hidden" value="0"> 478 <input name="ProductID0" type="hidden" value="@isabellaProduct.Id"> 479 <input name="VariantID0" type="hidden" value="@isabellaProduct.VariantId"> 480 <input name="Name" type="hidden" value="@isabellaProduct.Name"> 481 <input name="Number" type="hidden" value="@isabellaProduct.Number"> 482 <input name="Price" type="hidden" value="@isabellaProduct.bomPrice.Price.ToJavaScript()"> 483 <input name="CurrencyCode" type="hidden" value="@Context.Currency.Code"> 484 <input name="Quantity0" type="hidden" value="1"> 485486487488 @if ( useSendToDealer ) { 489 <input name="OrderContext" type="hidden" value="Camplet"> 490 <input name="QuoteType" type="hidden" value="@sendToDealerType" > 491 } 492 else 493 { 494 <input name="OrderContext" type="hidden" value="@OrderContext"> 495 } 496497498 @if ( isabellaProduct.ImagePrimary != null ) 499 { 500 <section class="align-items-center e-reveal-done e-section e-section-height-md js-e-section mb-6 p p-banner p-banner-gradient-disabled pb-auto pt-auto" id="11589"> 501 <div class="bg-center-middle e-product-image js-i-villa-and-camplet-image-large p-img-container" style="background-image: url('@isabellaProduct.ImagePrimary.Large')" title=""></div> 502 <a class="hidden-sm-down js-p-banner-next-section-link p-banner-next-section-link" href=""> 503 <i class="material-icons p-banner-next-section-link-icon">keyboard_arrow_down</i> 504 </a> 505 </section> 506507 } 508509510 @sectionStart(sectionClasses: "e-section pb-2", contentClasses: "col-12") 511512 <div class="col-12"> 513 <h1 class="e-product-name h2 js-e-product-name js-i-villa-and-camplet-name"> 514 @isabellaProduct.Name 515 </h1> 516 <div class="row"> 517 <div class="col-12 col-md-7"> 518 <div class="e-product-description-long js-e-product-description-long mb-2"> 519 @isabellaProduct.DescriptionLong 520 </div> 521 </div> 522 </div> 523 <div class="row"> 524 <div class="col-12 col-md-7"> 525 <div class="bg-septenary-opacity-low p-2"> 526 @if ( GetString("Ecom:Product.CategoryField.ProductsGeneral.CampletProduct.Value") == "True" ) 527 { 528 <h2>@Translate("Camp-let - Camp-let - Heading", "Camp-let")</h2> 529 } 530 else 531 { 532 <h2>@Translate("Villa - Byg dit telt - Heading", "Byg dit telt")</h2> 533 } 534535536537 @if ( isabellaProduct.VariantGroups.Any() ) 538 { 539 foreach ( KeyValuePair< string, IsabellaVariantGroup > variantGroup in isabellaProduct.VariantGroups ) 540 { 541 @* Variant form groups and label - START *@ 542 <div class="form-group isabella-form-variant-form-group-custom-control js-e-product-form-variant-group" data-variant-group-id="@variantGroup.Value.Id"> 543544 @if ( variantGroup.Value.Id == "VARGRP26" ) 545 { 546 @* Villa front modules - START *@ 547 <label class="font-weight-bold form-control-label"> 548 @variantGroup.Value.Name 549 </label> 550 <p class="form-text"> 551 @variantGroup.Value.Description 552 </p> 553 <div class="col-12 p-0"> 554 <div class="row"> 555 @foreach ( KeyValuePair< string, IsabellaVariantOption > variantOption in variantGroup.Value.Options ) 556 { 557 string variantInputFieldId = string.Format("{0}_{1}_{2}", isabellaProduct.Id, variantGroup.Value.Id, variantOption.Value.Id); 558 <div class="col-12 col-sm-6 js-i-villa-and-camplet-variant-group-option mb-2"> 559 <label class="custom-control h-100 p-2" for="@variantInputFieldId"> 560 <input type="radio" name="@variantGroup.Value.Id" class="custom-control-input js-e-product-form-variant-group-input required" id="@variantInputFieldId" value="@variantOption.Value.Id" @(variantOption.Value.IsSelected ? "checked" : string.Empty)> 561 <span class="custom-control-indicator h-100 position-absolute w-100">&nbsp;</span> 562 <img class="col-12" src="@variantOption.Value.Image"> 563 @*<span class="custom-control-image" style="background-image: url('@variantOption.Value.Image')"></span>*@ 564 <span class="custom-control-description d-none"> 565 @variantOption.Value.Properties[ "Description" ]<br /> 566 @variantGroup.Value.Id @variantOption.Value.Id</span> 567 </label> 568 </div> 569 } 570 </div> 571 </div> 572 @* Villa front modules - END *@ 573 } 574 else 575 { 576 string variantInputFieldId = string.Format("{0}_{1}", isabellaProduct.Id, variantGroup.Value.Id); 577578579 @* Villa length & Villa porch - START *@ 580581 <label class="font-weight-bold form-control-label" for="@variantInputFieldId"> 582 @variantGroup.Value.Name 583 @if ( !string.IsNullOrEmpty(variantGroup.Value.Description) ) 584 { 585 <i class="material-icons material-icons-large ml-2 p-0 text-muted" data-toggle="popover" data-trigger="click hover focus" data-content="@HttpUtility.HtmlAttributeEncode(variantGroup.Value.Description)">info</i> 586 } 587 </label> 588 <select class="form-control js-e-product-form-variant-group-input required" data-variant-group-id="@variantGroup.Value.Id" name="@variantGroup.Value.Id" id="@variantInputFieldId"> 589 @foreach ( KeyValuePair< string, IsabellaVariantOption > variantOption in variantGroup.Value.Options ) 590 { 591 KeyValuePair<string, IsabellaProduct> optionProduct = isabellaProduct.VariantCombinations.FirstOrDefault(vc => vc.Key == variantOption.Key); 592 Product dwProduct = Dynamicweb.Ecommerce.Services.Products.GetProductById(optionProduct.Value.Id, optionProduct.Value.VariantId, Context.LanguageID); 593 if (dwProduct.ShowInProductList) 594 { 595 <option value="@variantOption.Value.Id" @(variantOption.Value.IsSelected ? "selected" : string.Empty)>@variantOption.Value.Name</option> 596 } 597 } 598 </select> 599600601 @* Villa length & Villa porch - END *@ 602 } 603604 </div> 605 @* Variant form groups and label - END *@ 606 } 607 } 608 </div> 609 <div class="bg-septenary-opacity-low p-2"> 610 <div class="border-top isabella-product-form-heading py-1" id="isabella-product-form-heading-addons"> 611 <h4 class="mb-0"> 612 <a aria-controls="isabella-product-form-collapse-addons" aria-expanded="true" class="collapsed h3 isabella-product-form-heading-collapse" data-target="#isabella-product-form-collapse-addons" data-toggle="collapse"> 613 @Translate("eCom Product - Choose Accessory - Heading","Vælg tilbehør") 614 <i class="order-last p-accordion-toggle-icon-img">&nbsp;</i> 615 </a> 616 </h4> 617 </div> 618 <div aria-expanded="false" aria-labelledby="isabella-product-form-heading-addons" class="collapse" id="isabella-product-form-collapse-addons"> 619620 <div class="flex-table js-i-villa-and-camplet-acc isabella-form-variant-form-group-custom-control" role="rowgroup"> 621 <script id="js-e-handlebars-tmpl-villa-and-camplet-acc" type="text/x-handlebars-template"> 622 {{#if campletProduct}} 623 {{#each products}} 624 <div class="col-6 mb-2 js-i-villa-and-camplet-variant-group-option"> 625 <label class="bg-white custom-control h-100 p-2 d-block" for="{{id}}"> 626 <input type="checkbox" name="{{id}}" class="custom-control-input js-e-camplet-product-related-form-input" id="{{id}}" value="{{id}}"> 627 <span class="custom-control-indicator h-100 position-absolute w-100">&nbsp;</span> 628 <img class="col-12 mb-2" src="{{image}}"> 629 <span class="custom-control-description col-12 p-0"> 630 <span class="font-weight-bold">{{name}}</span> 631 @if (!isHybridShop) 632 { 633 <span class="@Co3.Isabella.Dw.Services.ProductService.Instance.GetNoBuyB2CandB2B()"><br />{{{price}}}</span><br /> 634 } 635 else 636 { 637 <span ><br />{{{price}}}</span><br /> 638 } 639640 <span><a href="{{link}}" target="_blank" rel="noreferrer noopener">@Translate("eCom Villa Camplet Product - Product Link - Text","Se detaljer")</a></span> 641 </span> 642 <div class="d-none js-isabella-product-villa-and-camplet-acc-row"> 643 <input id="ProductID{{counter @@index}}" type="hidden" value="{{id}}" name="ProductID{{counter @@index}}"> 644 <input id="VariantID{{counter @@index}}" name="VariantID{{counter @@index}}" type="hidden" value="{{variantId}}"> 645 <input id="ProductLoopCounter{{counter @@index}}" name="ProductLoopCounter{{counter @@index}}" type="hidden" value="{{counter @@index}}"> 646 <input id="UnitID{{counter @@index}}" name="UnitID{{counter @@index}}" type="hidden" value=""> 647 <input class="js-acc-product-id" type="hidden" value="{{id}}"> 648 <input class="js-acc-product-variantid" type="hidden" value="{{variantId}}"> 649 <input class="js-acc-product-name" type="hidden" value="{{name}}"> 650 <input class="form-control text-right js-isabella-colli-quanitity js-isabella-quanitity" name="Quantity{{counter @@index}}" type="text" value="0" data-rule-digits="true" data-price="{{priceClean}}"> 651 </div> 652 </label> 653 </div> 654 {{/each}} 655 {{else}} 656 {{#each groups as |group|}} 657 <div class="flex-row first w-100"> 658 <div class="flex-table header" role="rowgroup"> 659 <div class="first flex-row w-50" role="columnheader"> 660 <h3 class="mb-0">{{group.name}}</h3> 661 </div> 662 @if (!isHybridShop) 663 { 664 <div class="flex-row w-30 font-weight-bold" role="columnheader">@Translate("eCom Product - Add To Cart Form Table - Price Text", "Pris")</div> 665 <div class="flex-row w-20 font-weight-bold" role="columnheader">@Translate("eCom Product - Add To Cart Form Table - Quantity Text", "Antal")</div> 666 } 667 else 668 { 669 <div class="flex-row w-30 font-weight-bold" role="columnheader">@Translate("eCom Product - Add To Cart Form Table - Recommended Retail Price Text", "Vejl. Pris")</div> 670671 } 672673 </div> 674 </div> 675 {{#each group.products}} 676 <div class="flex-row first w-50 align-self-center " role="cell"> 677678 {{#unless image}} 679 {{name}} 680 {{else}} 681 <span class="text-with-image-popover" data-rel="image-popover" data-placement="right" data-content="<img style='max-width:100%;' src='{{image}}'>">{{name}}</span> 682 {{/unless}} 683 </div> 684 <div class="flex-row w-30 align-self-center" role="cell"> 685 @if (!isHybridShop) 686 { 687 <span class="@Co3.Isabella.Dw.Services.ProductService.Instance.GetNoBuyB2CandB2B()">{{{price}}}</span> 688 } 689 else 690 { 691 <span>{{{price}}}</span> 692 } 693694 </div> 695696 <div class="flex-row w-20 align-self-center js-isabella-product-villa-and-camplet-acc-row" role="cell"> 697 <input id="ProductID{{counter @@index}}" type="hidden" value="{{id}}" name="ProductID{{counter @@index}}"> 698 <input id="VariantID{{counter @@index}}" name="VariantID{{counter @@index}}" type="hidden" value="{{variantId}}"> 699 <input id="ProductLoopCounter{{counter @@index}}" name="ProductLoopCounter{{counter @@index}}" type="hidden" value="{{counter @@index}}"> 700 <input id="UnitID{{counter @@index}}" name="UnitID{{counter @@index}}" type="hidden" value=""> 701 <input class="js-acc-product-id" type="hidden" value="{{id}}"> 702 <input class="js-acc-product-variantid" type="hidden" value="{{variantId}}"> 703 <input class="js-acc-product-name" type="hidden" value="{{name}}"> 704 <input class="form-control text-right js-isabella-colli-quanitity js-isabella-quanitity" name="Quantity{{counter @@index}}" type="@(isHybridShop ? "hidden" : "text")" value="0" data-rule-digits="true" data-price="{{priceClean}}"> 705 </div> 706707 {{/each}} 708 <div class="flex-row first w-100 border-bottom"></div> 709 {{/each}} 710 {{/if}} 711712 </script> 713 </div> 714715 </div> 716 </div> 717718 </div> 719 <div class="col-12 col-md-5"> 720 <div class="py-2"> 721 <h2 class=""> 722 @if ( GetString("Ecom:Product.CategoryField.ProductsGeneral.CampletProduct.Value") == "True" ) 723 { 724 <p>@Translate("eCom Villa Camplet Product - Min Camplet - Heading ","Min Camplet")</p> 725 } else if ( isVillaProduct ) 726 { 727 <p>@Translate("eCom Villa Camplet Product - Mit Villa telt - Heading ","Mit Villa telt")</p> 728 } 729 </h2> 730 @{ 731 string imagePrimary = isabellaProduct.ImagePrimary != null ? isabellaProduct.ImagePrimary.Medium : string.Empty; 732 } 733 <img src="@imagePrimary" alt="" class="e-product-image-small img-fluid js-i-villa-and-camplet-image-medium" /> 734735 <div class="e-product-specs js-i-villa-and-camplet-specs" data-has-villa="@GetString("Ecom:Product.CategoryField.ProductsGeneral.VillaProduct.Value")"> 736 <script id="js-e-handlebars-tmpl-villa-and-camplet-specs" type="text/x-handlebars-template"> 737 @if ( isVillaProduct ) 738 { 739 <hr /> 740 <h4>@Translate("eCom Villa Camplet Product - Mål - Heading ","Mål")</h4> 741 <p> 742 @Translate("eCom Villa Camplet Product - Længde - Heading ","Længde"): {{villa.Length}}<br /> 743 @Translate("eCom Villa Camplet Product - Dybde - Heading ","Dybde"): {{villa.Depth}}<br /> 744 @Translate("eCom Villa Camplet Product - Højde med vogn - Heading ","Højde med vogn"): {{villa.Height}}<br /> 745 {{#if villa.VillaTotalLength}} 746 @Translate("eCom Villa Camplet Product - Total længde - Heading ","Total længde"): {{villa.VillaTotalLength}}<br /> 747 {{/if}} 748 </p> 749 <h4>@Translate("eCom Villa Camplet Product - Veranda - Heading ","Veranda")</h4> 750 <p class="js-i-villa-and-camplet-specs-porch"> 751 - {{#contains variantId "VO1863"}}@Translate("eCom Villa Camplet Product - Yes - Text ","Ja") 752 {{else}} 753 {{#contains variantId "VO1928"}} 754 @Translate("eCom Villa Camplet Product - Yes - Text ","Ja") 755 {{else}} 756 @Translate("eCom Villa Camplet Product - No - Text ","Nej") 757 {{/contains}} 758 {{/contains}} 759 </p> 760 <h4>@Translate("eCom Villa Camplet Product - Fronter - Heading ","Fronter")</h4> 761 <p class="js-i-villa-and-camplet-specs-fronts"> 762 {{#each villa.Fronts}} 763 <span>- @Translate("eCom Villa Camplet Product - Sektion - Heading ","Sektion") {{counter @@index}}: {{this}}</span> 764 <br /> 765 {{/each}} 766 </p> 767 } 768 </script> 769 </div> 770771 <div class="mt-0 table-container" role="table"> 772 <hr /> 773 <div class="flex-table mt-1" role="rowgroup"> 774 <div class="align-self-center first flex-row js-i-villa-and-camplet-name w-50" role="cell"> 775 @isabellaProduct.Name 776 </div> 777 <div class="flex-row text-right w-50 @Co3.Isabella.Dw.Services.ProductService.Instance.GetNoBuyB2CandB2B()" role="cell"> 778 <div class="js-i-villa-and-camplet-price">@isabellaProduct.Price.Format()</div> 779 </div> 780 </div> 781 @if ( string.IsNullOrEmpty( GetString( "Ecom:Product.CategoryField.TentCamVillaGeneral.Delivery_cost.Value" ) ) == false ) 782 { 783784785 <div class="flex-table mt-1" role="rowgroup"> 786 <div class="flex-row text-left w-50" role="cell"> 787 @GetString("Ecom:Product.CategoryField.TentCamVillaGeneral.Delivery_cost.Label") 788 </div> 789 <div class="flex-row text-right w-50" role="cell"> 790 @GetString("Ecom:Product.CategoryField.TentCamVillaGeneral.Delivery_cost.Value") 791 </div> 792 </div> 793 } 794 <hr /> 795 <div class="e-product-specs js-i-villa-and-camplet-specs-acc"> 796 <script id="js-e-handlebars-tmpl-villa-and-camplet-spec-acc" type="text/x-handlebars-template"> 797 {{#if this}} 798 <h4>@Translate("eCom Villa Camplet Product - Accessory - Heading ","Tilbehør")</h4> 799 {{#each this}} 800 <div class="flex-table mt-1" role="rowgroup"> 801 <div class="align-self-center first flex-row w-50" role="cell"> 802 {{this.name}} 803 </div> 804 @if (!isHybridShop) 805 { 806 <div class="flex-row text-right w-50 @Co3.Isabella.Dw.Services.ProductService.Instance.GetNoBuyB2CandB2B()" role="cell"> 807 {{this.formattedPrice}} <span class="e-price-currency e-price-currency-symbol">@Context.Currency.Code</span> 808 </div> 809 } 810 else 811 { 812 <div class="flex-row text-right w-50" role="cell"> 813 {{this.formattedPrice}} <span class="e-price-currency e-price-currency-symbol">@Context.Currency.Code</span> 814 </div> 815 } 816817 </div> 818 {{/each}} 819 <hr /> 820 {{/if}} 821 </script> 822 </div> 823824 <div class="flex-table mt-1 @Co3.Isabella.Dw.Services.ProductService.Instance.GetNoBuyB2CandB2B()" role="rowgroup"> 825 <div class="align-self-center first flex-row h4 w-50" role="cell"> 826 @Translate("eCom Product - Add To Cart Form Table - Total Price Text", "I alt") 827 </div> 828 <div class="flex-row text-right w-50" role="cell"> 829 <div class="h3 js-i-villa-and-camplet-total-price">@isabellaProduct.bomPrice.Format()</div> 830 </div> 831832 </div> 833 <div class="flex-table" role="rowgroup"> 834 <div class="align-self-center first flex-row w-50" role="cell"> 835 <a class="text-underline" data-target="#howItWorksModal" data-toggle="modal"> 836 @if (isUserAuthenticated == false) 837 { 838 @Translate("eCom Villa Camplet Product - Sådan fungerer det - Link", "Sådan fungerer det") 839 } 840 else 841 { 842 @Translate("eCom Villa Camplet Product - Sådan fungerer det B2B - Link", "Sådan fungerer det") 843 } 844 </a> 845 </div> 846 <div class="flex-row text-right w-50" role="cell"> 847 @if ( ( bool ) noBuyB2BandB2C == false && userCanBuy == true ) 848 { 849 if ( GetBoolean( "Ecom:Product.CategoryField.ProductsGeneral.NoBuyB2C.Value" ) != true && isUserAuthenticated == false ) 850 { 851 <button class="btn btn-primary btn-block" type="submit">@Translate( "eCom Product - Send to dealer - Button", "Send til forhandler" )</button> 852 } 853 if ((GetBoolean("Ecom:Product.CategoryField.ProductsGeneral.NoBuyB2B.Value") != true && isUserAuthenticated == true) || shopType == "B2C" ) 854 { 855 <button class="btn btn-block btn-success" type="submit">@Translate( "eCom Product - Add To Cart - Button", "Add to cart" )</button> 856 } 857 } 858 @if ( GetBoolean( "Ecom:Product.CategoryField.ProductsGeneral.NoBuyB2C.Value" ) == true && isUserAuthenticated == false || GetBoolean( "Ecom:Product.CategoryField.ProductsGeneral.NoBuyB2B.Value" ) == true || userCanBuy == false && isUserAuthenticated == true ) 859 { 860 <p class="mb-0">@Translate( "eCom Product - No Buy Online - Text", "Denne varer kan ikke købes online" )</p> 861 } 862 </div> 863 </div> 864 <div class="flex-table mb-2" role="rowgroup"> 865 <div class="align-self-center first flex-row w-50 pr-1" role="cell"> 866 @if (!string.IsNullOrEmpty(PageView.Current().Area.Domain)) 867 { 868 @Translate("Product page - Not On Stock Info B2B - Text", "B2B relevant text") 869 } 870 else 871 { 872 @Translate("Product page - Not On Stock Info - Start Text", "Er varen ikke på lager kontakt Isabellas salgsafdeling på") 873 <span class="text-primary">@Translate("Product page - Contact Phone - Number", "76497292")</span> 874 @Translate("Product page - Not On Stock Info - End Textr", "eller send en mail") 875 } 876 </div> 877 <div class="flex-row text-right w-50" role="cell"> 878 @if (!string.IsNullOrEmpty(PageView.Current().Area.Domain)) 879 { 880 <a href="@findDealerLink" class="btn btn-block btn-secondary">@Translate("Product Page - Find Dealer B2B - Link", "Find forhandler")</a> 881 } 882 else 883 { 884 <a href="@findDealerLink" class="btn btn-block btn-secondary">@Translate("Product Page - Find Dealer - Link", "Find forhandler")</a> 885 } 886 </div> 887 <p class="mt-2"> 888 <a class="js-isabella-villa-and-camplet-pdf-generate text-primary" href="#"> 889 <i class="material-icons material-icons-large">vertical_align_bottom</i> @Translate("eCom Product - Download PDF - Text", "Hent produkt-PDF")</a> 890 </p> 891 </div> 892 </div> 893 </div> 894 </div> 895 </div> 896 </div> 897898 @sectionEnd() 899900 @sectionStart( 901 sectionClasses: "e-section py-2", 902 contentClasses: "col-12") 903 <div class="col-12"> 904 <div class="row"> 905 <div class="col-12 col-md-5"> 906 @using Dynamicweb.Admin.dk.dynamicweb.templates 907 @using WebSupergoo.ImageGlue6 908909 @{ 910 string moodCarouselClassList = "d-none"; 911 } 912913 @if ( GetBoolean( "Ecom:Product.CategoryField.ProductsGeneral.IsAccessory.Value" ) == true ) 914 { 915 <div class="e-product-image-container position-relative"> 916 @if(GetBoolean( "Ecom:Product.CategoryField.ProductsGeneral.News.Value" ) == true ) { 917 <div class="isabella-product-item-news zi-sticky"> 918 @Translate("Ecom Product - News Badge - Text","Nyhed") 919 </div> 920 } 921 <div class="carousel slide" data-interval="false" data-ride="carousel" id="js-e-product-image-carousel"> 922 <div class="e-product-image-wrapper"> 923 <div class="carousel-inner"> 924 <div class="active carousel-item" data-target="#js-e-product-image-modal-mood" data-toggle="modal"> 925 <img src="/admin/public/getimage.ashx?Crop=0&Image=@productImage&Format=jpg&Width=600&Height=&Quality=90&AlternativeImage=/Files/Templates/Designs/isabella/_assets/img/NoImage.gif" alt="" class="e-product-image" data-target="#js-e-product-image-modal-carousel-mood" data-slide-to="0"> 926 </div> 927928 @foreach ( LoopItem imageCategories in GetLoop("ImageCategories") ) 929 { 930 if ( imageCategories.GetString("Category.SystemName") == "MoodImages" ) 931 { 932 foreach ( ElementWithIndex< LoopItem > image in imageCategories.GetLoop("Category.Images").WithIndex() ) 933 { 934 if ( image.Index != null ) 935 { 936 moodCarouselClassList = "d-flex"; 937 } 938 <div class="carousel-item" data-target="#js-e-product-image-modal-mood" data-toggle="modal"> 939 <img src="/admin/public/getimage.ashx?Crop=0&Image=@image.Element.GetString("Ecom:Product:Detail.Image.Clean")&Format=jpg&Width=600&Height=&Quality=90&AlternativeImage=/Files/Templates/Designs/isabella/_assets/img/NoImage.gif" alt="" class="e-product-image" data-target="#js-e-product-image-modal-carousel-mood" data-slide-to="@(image.Index + 1)"> 940 </div> 941 } 942 } 943 } 944945 <a class="carousel-control-prev @moodCarouselClassList" data-slide="prev" data-target="#js-e-product-image-carousel"></a> 946 <a class="carousel-control-next @moodCarouselClassList" data-slide="next" data-target="#js-e-product-image-carousel"></a> 947948 </div> 949 </div> 950951 <ol class="carousel-indicators @moodCarouselClassList"> 952 <li data-target="#js-e-product-image-carousel" class="active" data-slide-to="0"></li> 953 @foreach ( LoopItem imageCategories in GetLoop("ImageCategories") ) 954 { 955 if ( imageCategories.GetString("Category.SystemName") == "MoodImages" ) 956 { 957 foreach ( ElementWithIndex< LoopItem > image in imageCategories.GetLoop("Category.Images").WithIndex() ) 958 { 959 <li data-target="#js-e-product-image-carousel" data-slide-to="@(image.Index + 1)"></li> 960 } 961 } 962 } 963 </ol> 964965 </div> 966 </div> 967 } 968 else 969 { 970971 <div class="e-product-image-container isabella-product-image-container-mood"> 972 <div class="carousel slide" data-interval="false" data-ride="carousel" id="js-e-product-image-carousel"> 973 <div class="e-product-image-wrapper"> 974 <div class="carousel-inner"> 975976 @foreach ( LoopItem imageCategories in GetLoop( "ImageCategories" ) ) 977 { 978 if ( imageCategories.GetString( "Category.SystemName" ) == "MoodImages" ) 979 { 980 foreach ( ElementWithIndex< LoopItem > image in imageCategories.GetLoop( "Category.Images" ).WithIndex() ) 981 { 982 if ( image.Element.Index == 1 ) 983 { 984 isActive = "active"; 985 } 986 else 987 { 988 isActive = ""; 989 } 990 if ( image.Index != 0 ) 991 { 992 moodCarouselClassList = "d-flex"; 993 } 994 <div class="carousel-item @isActive" data-target="#js-e-product-image-modal-mood" data-toggle="modal"> 995 <img src="/admin/public/getimage.ashx?Crop=0&Image=@image.Element.GetString( "Ecom:Product:Detail.Image.Clean" )&Format=jpg&Width=600&Height=&Quality=90" alt="" class="e-product-image" data-target="#js-e-product-image-modal-carousel-mood" data-slide-to="@( image.Index )"> 996 </div> 997 } 998 } 999 } 10001001 <a class="carousel-control-prev @moodCarouselClassList" data-slide="prev" data-target="#js-e-product-image-carousel"></a> 1002 <a class="carousel-control-next @moodCarouselClassList" data-slide="next" data-target="#js-e-product-image-carousel"></a> 10031004 </div> 1005 </div> 1006 <ol class="carousel-indicators @moodCarouselClassList"> 1007 @foreach ( LoopItem imageCategories in GetLoop( "ImageCategories" ) ) 1008 { 1009 if ( imageCategories.GetString( "Category.SystemName" ) == "MoodImages" ) 1010 { 1011 foreach ( ElementWithIndex< LoopItem > image in imageCategories.GetLoop( "Category.Images" ).WithIndex() ) 1012 { 1013 if ( image.Element.Index == 1 ) 1014 { 1015 isActive = "active"; 1016 } 1017 else 1018 { 1019 isActive = ""; 1020 } 10211022 <li class="@isActive" data-target="#js-e-product-image-carousel" data-slide-to="@( image.Index )"></li> 1023 } 1024 } 1025 } 1026 </ol> 1027 </div> 1028 </div> 1029 } 1030 @using Dynamicweb.Admin.dk.dynamicweb.templates 1031 <div class="modal modal-fullscreen fade e-product-image-modal" id="js-e-product-image-modal-mood" data-backdrop="false" data-keyboard="true"> 1032 <div class="modal-dialog"> 1033 <div class="modal-content"> 1034 <div class="modal-body"> 10351036 <button type="button" class="close" data-dismiss="modal"> 1037 <i class="material-icons">close</i> 1038 </button> 10391040 <div id="js-e-product-image-modal-carousel-mood" class="carousel slide" data-keyboard="true" data-interval="false"> 1041 <div class="carousel-inner"> 10421043 <div class="carousel-item active" style="background-image:url(/admin/public/getimage.ashx?Crop=0&Image=@productImage&Format=jpg&Width=&Height=1800&Quality=90&AlternativeImage=/Files/Templates/Designs/isabella/_assets/img/NoImage.gif)"> 1044 </div> 1045 @foreach (LoopItem imageCategories in GetLoop("ImageCategories")) 1046 { 1047 if (imageCategories.GetString("Category.SystemName") == "MoodImages") 1048 { 1049 foreach (ElementWithIndex<LoopItem> image in imageCategories.GetLoop("Category.Images").WithIndex()) 1050 { 1051 if (image.Element.Index == 1) 1052 { 1053 isActive = "active"; 1054 } 1055 else 1056 { 1057 isActive = ""; 1058 } 1059 <div class="carousel-item" style="background-image:url(/admin/public/getimage.ashx?Crop=0&Image=@image.Element.GetString("Ecom:Product:Detail.Image.Clean")&Format=jpg&Width=&Height=1800&Quality=90)"> 1060 </div> 1061 } 1062 } 1063 } 1064 </div> 10651066 <ol class="carousel-indicators @moodCarouselClassList"> 1067 <li class="" data-target="#js-e-product-image-modal-carousel-mood" data-slide-to="0"> 1068 <span style="background-image:url(/admin/public/getimage.ashx?Crop=0&Image=@productImage&Format=jpg&Width=50&Height=&Quality=75)"></span> 1069 </li> 1070 @foreach ( LoopItem imageCategories in GetLoop( "ImageCategories" ) ) 1071 { 1072 if ( imageCategories.GetString( "Category.SystemName" ) == "MoodImages" ) 1073 { 1074 foreach ( ElementWithIndex< LoopItem > image in imageCategories.GetLoop( "Category.Images" ).WithIndex() ) 1075 { 1076 if (image.Element.Index == 1 ) 1077 { 1078 isActive = "active"; 1079 } 1080 else 1081 { 1082 isActive = ""; 1083 } 1084 <li class="" data-target="#js-e-product-image-modal-carousel-mood" data-slide-to="@( image.Index + 1 )"> 1085 <span style="background-image:url(/admin/public/getimage.ashx?Crop=0&Image=@image.Element.GetString( "Ecom:Product:Detail.Image.Clean" )&Format=jpg&Width=50&Height=&Quality=75)"></span> 1086 </li> 1087 } 1088 } 1089 } 1090 </ol> 10911092 <a class="carousel-control-prev @moodCarouselClassList" data-target="#js-e-product-image-modal-carousel-mood" data-slide="prev"></a> 1093 <a class="carousel-control-next @moodCarouselClassList" data-target="#js-e-product-image-modal-carousel-mood" data-slide="next"></a> 10941095 </div> 1096 </div> 1097 </div> 1098 </div> 1099 </div> 11001101 </div> 1102 <div class="col-12 col-md-7"> 1103 <h2 class="col-12">@Translate("eCom Product - Productinformation - Heading","Produktinformation")</h2> 1104 @using Co3.Espresso.Base.Extensions 1105 @using Co3.Espresso.Website.Services 1106 @using Dynamicweb.Admin.dk.dynamicweb.templates 1107 @using Dynamicweb.Ecommerce.Products 1108 @using Dynamicweb.Ecommerce.Products.Categories 1109 @using Dynamicweb.Ecommerce.Products.FieldDisplayGroups 1110 @using Dynamicweb.Frontend 1111 @using ProductService = Co3.Isabella.Dw.Services.ProductService 11121113 @{ 1114 //Hard coded group ID's from Model Display Groups // 1115 List< string > modelDisplayGroupIds = new List< string >(); 1116 modelDisplayGroupIds.Add("7"); 1117 List< LoopItem > modelDisplayGroupList = new List< LoopItem >(); 1118 } 11191120 <div class="col-12 p p-accordion"> 1121 <div class="p-accordion-container "> 1122 <div class="border-bottom e-reveal-done mb-0 p-accordion-item"> 11231124 @{ 1125 int displayGroupCount = 0; 1126 } 11271128 @foreach (LoopItem groupItem in GetLoop("FieldDisplayGroups")) 1129 { 11301131 string displayGroupId = groupItem.GetString("Ecom:FieldDisplayGroup.ID"); 11321133 if (modelDisplayGroupIds.Contains(groupItem.GetString("Ecom:FieldDisplayGroup.ID"))) 1134 { 1135 modelDisplayGroupList.Add(groupItem); 1136 } 1137 else 1138 { 1139 List<LoopItem> fieldItems = new List<LoopItem>(); 1140 bool hasValues = false; 11411142 foreach (LoopItem fieldItem in groupItem.GetLoop("Fields")) 1143 { 1144 fieldItems.Add(fieldItem); 1145 if (!string.IsNullOrEmpty(fieldItem.GetString("Ecom:FieldDisplayGroup.Field.Value"))) 1146 { 1147 hasValues = true; 1148 } 1149 } 11501151 if (hasValues == true) 1152 { 1153 <div class="p-accordion-toggle"> 1154 <p class="align-items-center border-top collapsed d-flex justify-content-between m-0 py-1" data-target="#accordion-id-@displayGroupId" data-toggle="collapse"> 1155 <span class="font-weight-bold line-height-sm my-0 p-accordion-toggle-text text-auto">@groupItem.GetString("Ecom:FieldDisplayGroup.Name")</span> 1156 <i class="order-last p-accordion-toggle-icon-img">&nbsp;</i> 1157 </p> 1158 </div> 1159 <div class="collapse @(displayGroupCount == 0 ? "show" : string.Empty)" id="accordion-id-@displayGroupId"> 1160 <div class="pb-2"> 1161 <div class="row"> 1162 @{ 1163 int loopCounter = 0; 1164 } 116511661167 @foreach (LoopItem fieldItem in fieldItems) 1168 { 1169 if (string.IsNullOrEmpty(fieldItem.GetString("Ecom:FieldDisplayGroup.Field.Value")) == false && fieldItem.GetString("Ecom:FieldDisplayGroup.Field.Id").Contains("Color")) 1170 { 1171 string[] fieldValue = fieldItem.GetString("Ecom:FieldDisplayGroup.Field.Value").Split(','); 1172 string[] fieldLabel = fieldItem.GetString("Ecom:FieldDisplayGroup.Field.OptionLabel").Split(','); 1173 string fieldImage = string.Empty; 11741175 for (int sharedArrayIndex = 0; sharedArrayIndex < fieldValue.Length; sharedArrayIndex++) 1176 { 1177 if (fieldValue.Length == fieldLabel.Length) 1178 { 1179 fieldImage = fieldValue[sharedArrayIndex] + ".png"; 11801181 JSON.pdfData.colors.Add(new 1182 { 1183 fieldLabel = fieldValue[sharedArrayIndex], 1184 path = string.Format("/Files/Images/isabella/IsabellaIcons/{0}", fieldImage), 1185 imageUri = string.Empty 1186 }); 1187 } 1188 } 1189 } 11901191 if (string.IsNullOrEmpty(fieldItem.GetString("Ecom:FieldDisplayGroup.Field.Value")) == false && fieldItem.GetString("Ecom:FieldDisplayGroup.Field.Id").Contains("FrameMatch")) 1192 { 1193 string[] fieldValue = fieldItem.GetString("Ecom:FieldDisplayGroup.Field.Value").Split(','); 1194 string[] fieldLabel = fieldItem.GetString("Ecom:FieldDisplayGroup.Field.OptionLabel").Split(','); 1195 string fieldImage = string.Empty; 11961197 for (int sharedArrayIndex = 0; sharedArrayIndex < fieldValue.Length; sharedArrayIndex++) 1198 { 1199 if (fieldValue.Length == fieldLabel.Length) 1200 { 1201 fieldImage = fieldValue[sharedArrayIndex] + ".png"; 12021203 JSON.pdfData.frameMatch.Add(new 1204 { 1205 fieldLabel = fieldValue[sharedArrayIndex], 1206 path = string.Format("/Files/Images/isabella/IsabellaIcons/{0}", fieldImage), 1207 imageUri = string.Empty 1208 }); 1209 } 1210 } 1211 } 12121213 if (string.IsNullOrEmpty(fieldItem.GetString("Ecom:FieldDisplayGroup.Field.Value")) == false && fieldItem.GetString("Ecom:FieldDisplayGroup.Field.Id").Contains("MiscFrameMaterial")) 1214 { 1215 string[] fieldValue = fieldItem.GetString("Ecom:FieldDisplayGroup.Field.Value").Split(','); 1216 string[] fieldLabel = fieldItem.GetString("Ecom:FieldDisplayGroup.Field.OptionLabel").Split(','); 1217 string fieldImage = string.Empty; 12181219 for (int sharedArrayIndex = 0; sharedArrayIndex < fieldValue.Length; sharedArrayIndex++) 1220 { 1221 if (fieldValue.Length == fieldLabel.Length) 1222 { 1223 fieldImage = fieldValue[sharedArrayIndex] + ".png"; 12241225 JSON.pdfData.miscFrameMaterial.Add(new 1226 { 1227 fieldLabel = fieldValue[sharedArrayIndex], 1228 path = string.Format("/Files/Images/isabella/IsabellaIcons/{0}", fieldImage), 1229 imageUri = string.Empty 1230 }); 1231 } 1232 } 1233 } 12341235 if (string.IsNullOrEmpty(fieldItem.GetString("Ecom:FieldDisplayGroup.Field.Value")) == false && fieldItem.GetString("Ecom:FieldDisplayGroup.Field.Id").Contains("FrameMaterial")) 1236 { 1237 string[] fieldValue = fieldItem.GetString("Ecom:FieldDisplayGroup.Field.Value").Split(','); 1238 string[] fieldLabel = fieldItem.GetString("Ecom:FieldDisplayGroup.Field.OptionLabel").Split(','); 1239 string fieldImage = string.Empty; 12401241 for (int sharedArrayIndex = 0; sharedArrayIndex < fieldValue.Length; sharedArrayIndex++) 1242 { 1243 if (fieldValue.Length == fieldLabel.Length) 1244 { 1245 fieldImage = fieldValue[sharedArrayIndex] + ".png"; 12461247 JSON.pdfData.frameMaterial.Add(new 1248 { 1249 fieldLabel = fieldValue[sharedArrayIndex], 1250 path = string.Format("/Files/Images/isabella/IsabellaIcons/{0}", fieldImage), 1251 imageUri = string.Empty 1252 }); 1253 } 1254 } 1255 } 12561257 if (string.IsNullOrEmpty(fieldItem.GetString("Ecom:FieldDisplayGroup.Field.Value")) == false && fieldItem.GetString("Ecom:FieldDisplayGroup.Field.Id").Contains("Color") || fieldItem.GetString("Ecom:FieldDisplayGroup.Field.Id").Contains("FrameMatch")) 1258 { 1259 string translatedFieldLabel = fieldItem.GetString("Ecom:FieldDisplayGroup.Field.Name"); 1260 string[] categoryFieldIds = fieldItem.GetString("Ecom:FieldDisplayGroup.Field.Id").Split('|'); 1261 if (categoryFieldIds.Length == 3) 1262 { 1263 Field translatedField = GetTranslatedCategoryFieldName(categoryFieldIds[1], categoryFieldIds[2]); 1264 translatedFieldLabel = translatedField.Label; 1265 } 1266 <div class="col-12"> 1267 @{ 1268 string[] colorValue = fieldItem.GetString("Ecom:FieldDisplayGroup.Field.Value").Split(','); 1269 string[] colorLabel = fieldItem.GetString("Ecom:FieldDisplayGroup.Field.OptionLabel").Split(','); 1270 string colorImagePng = string.Empty; 1271 } 1272127312741275 @if (string.IsNullOrEmpty(fieldItem.GetString("Ecom:FieldDisplayGroup.Field.Value")) == false) 1276 { 12771278 <p class="font-weight-bold mb-1">@translatedFieldLabel</p> 12791280 <div class="row"> 1281 @for (int sharedArrayIndex = 0; sharedArrayIndex < colorValue.Length; sharedArrayIndex++) 1282 { 1283 if (colorValue.Length == colorLabel.Length) 1284 { 1285 colorImagePng = colorValue[sharedArrayIndex] + ".png"; 1286 <div class="col-4 mb-2"> 1287 <img src="@Co3.Espresso.Website.Services.ImageService.Instance.GetImageURL("/Files/Images/isabella/IsabellaIcons/" + @colorImagePng, 200, 65, 0)" class="col-12 mb-1 mr-2 p-0"> 1288 <div> 1289 @colorLabel[sharedArrayIndex] 1290 </div> 1291 </div> 1292 } 1293 } 1294 </div> 1295 } 12961297 </div> 1298 } 1299 else if (fieldItem.GetString("Ecom:FieldDisplayGroup.Field.Name").Contains("VideoPresentation") && fieldItem.GetString("Ecom:FieldDisplayGroup.Field.Value") != "") 1300 { 1301 <div class="col-12 mb-2"> 1302 <div class="col-12 px-0 mt-1"> 1303 <iframe width="100%" height="400" src="@fieldItem.GetString("Ecom:FieldDisplayGroup.Field.Value")" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> 1304 </div> 1305 </div> 1306 } 1307 else if (fieldItem.GetString("Ecom:FieldDisplayGroup.Field.TypeName").Contains("Filemanager") && fieldItem.GetString("Ecom:FieldDisplayGroup.Field.Value").Contains(".jpg")) 1308 { 1309 <img class="col-12 col-md-6" src="@Co3.Espresso.Website.Services.ImageService.Instance.GetImageURL("/Files/Images/" + fieldItem.GetString("Ecom:FieldDisplayGroup.Field.Value"), 500, 0, 0)"/> 1310 } 1311 else if (fieldItem.GetString("Ecom:FieldDisplayGroup.Field.TypeName").Contains("Filemanager") && fieldItem.GetString("Ecom:FieldDisplayGroup.Field.Value").Contains(".pdf")) 1312 { 1313 <div class="col-5 col-lg-3 d-flex"> 1314 <p class="font-weight-bold mb-0 pb-0">@fieldItem.GetString("Ecom:FieldDisplayGroup.Field.Name")</p> 1315 </div> 1316 <div class="col-7 col-lg-9 d-flex flex-column"> 1317 <a href="@fieldItem.GetString("Ecom:FieldDisplayGroup.Field.Value").Replace("../", "/Files/")"> 1318 @Translate("eCom Product = Download PDF - Link", "Download pdf here") 1319 </a> 1320 </div> 1321 } 1322 else if (fieldItem.GetString("Ecom:FieldDisplayGroup.Field.TypeName").Contains("Link")) 1323 { 1324 <div class="col-5 col-lg-3 d-flex"> 1325 <p class="font-weight-bold mb-0 pb-0">@fieldItem.GetString("Ecom:FieldDisplayGroup.Field.Name")</p> 1326 </div> 1327 <div class="col-7 col-lg-9 d-flex flex-column"> 1328 <a href="@fieldItem.GetString("Ecom:FieldDisplayGroup.Field.Value")"> 1329 @Translate("eCom Product - View more - Text", "View more") 1330 </a> 1331 </div> 1332 } 1333 else 1334 { 1335 string translatedFieldLabel = fieldItem.GetString("Ecom:FieldDisplayGroup.Field.Name"); 1336 string[] categoryFieldIds = fieldItem.GetString("Ecom:FieldDisplayGroup.Field.Id").Split('|'); 1337 if (categoryFieldIds.Length == 3) 1338 { 1339 Field translatedField = GetTranslatedCategoryFieldName(categoryFieldIds[1], categoryFieldIds[2]); 1340 translatedFieldLabel = translatedField.Label; 1341 } 13421343 switch (groupItem.GetString("Ecom:FieldDisplayGroup.ID")) 1344 { 1345 case "11": // Delivery Width 1346 <div class="col-12"> 1347 <div class="row"> 1348 <div class="col-12 col-md-6"> 1349 <p> 1350 @if ( fieldItem.GetString("Ecom:FieldDisplayGroup.Field.IsList") == "True" ) 1351 { 1352 @fieldItem.GetString("Ecom:FieldDisplayGroup.Field.OptionLabel")<br /> 1353 } 1354 else 1355 { 1356 @fieldItem.GetString("Ecom:FieldDisplayGroup.Field.Value")<br /> 1357 } 1358 </p> 1359 </div> 1360 <div class="col-12 col-md-6"> 1361 @using Dynamicweb.Admin.dk.dynamicweb.templates 13621363 @{ 1364 string deliveryCarouselClassList = "d-none"; 1365 } 13661367 <div class="e-product-image-container"> 1368 <div class="carousel slide" data-interval="false" data-ride="carousel" id="js-e-product-image-carousel-delivery"> 1369 <div class="e-product-image-wrapper"> 1370 <div class="carousel-inner"> 1371 @foreach ( LoopItem imageCategories in GetLoop( "ImageCategories" ) ) 1372 { 1373 if ( imageCategories.GetString( "Category.SystemName" ) == "DeliveryWithGallery" ) 1374 { 1375 foreach ( ElementWithIndex< LoopItem > image in imageCategories.GetLoop( "Category.Images" ).WithIndex() ) 1376 { 1377 if (image.Element.Index == 1 ) 1378 { 1379 isActive = "active"; 1380 } 1381 else 1382 { 1383 isActive = ""; 1384 } 1385 if (image.Index != 0 ) 1386 { 1387 deliveryCarouselClassList = "d-flex"; 1388 } 1389 <div class="carousel-item @isActive" data-target="#js-e-product-image-modal-delivery" data-toggle="modal"> 1390 <img src="/admin/public/getimage.ashx?Crop=0&Image=@image.Element.GetString( "Ecom:Product:Detail.Image.Clean" )&Format=jpg&Width=600&Height=&Quality=90" alt="" class="e-product-image" data-target="#js-e-product-image-modal-carousel-delivery" data-slide-to="@( image.Index )"> 1391 </div> 1392 } 1393 } 1394 } 13951396 <a class="carousel-control-prev @deliveryCarouselClassList" data-slide="prev" data-target="#js-e-product-image-carousel-delivery"></a> 1397 <a class="carousel-control-next @deliveryCarouselClassList" data-slide="next" data-target="#js-e-product-image-carousel-delivery"></a> 13981399 </div> 1400 </div> 1401 <ol class="carousel-indicators @deliveryCarouselClassList"> 1402 @foreach ( LoopItem imageCategories in GetLoop( "ImageCategories" ) ) 1403 { 1404 if ( imageCategories.GetString( "Category.SystemName" ) == "DeliveryWithGallery" ) 1405 { 1406 foreach ( ElementWithIndex< LoopItem > image in imageCategories.GetLoop( "Category.Images" ).WithIndex() ) 1407 { 1408 if (image.Element.Index == 1 ) 1409 { 1410 isActive = "active"; 1411 } 1412 else 1413 { 1414 isActive = ""; 1415 } 1416 <li class="@isActive" data-target="#js-e-product-image-carousel-delivery" data-slide-to="@( image.Index )"></li> 1417 } 1418 } 1419 } 1420 </ol> 1421 </div> 1422 </div> 1423 @using Dynamicweb.Admin.dk.dynamicweb.templates 1424 <div class="modal modal-fullscreen fade e-product-image-modal" id="js-e-product-image-modal-delivery" data-backdrop="false" data-keyboard="true"> 1425 <div class="modal-dialog"> 1426 <div class="modal-content"> 1427 <div class="modal-body"> 14281429 <button type="button" class="close" data-dismiss="modal"> 1430 <i class="material-icons">close</i> 1431 </button> 14321433 <div id="js-e-product-image-modal-carousel-delivery" class="carousel slide" data-keyboard="true" data-interval="false"> 1434 <div class="carousel-inner"> 1435 @foreach ( LoopItem imageCategories in GetLoop( "ImageCategories" ) ) 1436 { 1437 if ( imageCategories.GetString( "Category.SystemName" ) == "DeliveryWithGallery" ) 1438 { 1439 foreach ( ElementWithIndex< LoopItem > image in imageCategories.GetLoop( "Category.Images" ).WithIndex() ) 1440 { 1441 if (image.Element.Index == 1 ) 1442 { 1443 isActive = "active"; 1444 } 1445 else 1446 { 1447 isActive = ""; 1448 deliveryCarouselClassList = "d-flex"; 1449 } 1450 <div class="carousel-item @isActive" style="background-image:url(/admin/public/getimage.ashx?Crop=0&Image=@image.Element.GetString("Ecom:Product:Detail.Image.Clean")&Format=jpg&Width=&Height=1800&Quality=90)"> 1451 </div> 1452 } 1453 } 1454 } 1455 </div> 14561457 <ol class="carousel-indicators @deliveryCarouselClassList"> 1458 @foreach ( LoopItem imageCategories in GetLoop( "ImageCategories" ) ) 1459 { 1460 if ( imageCategories.GetString( "Category.SystemName" ) == "DeliveryWithGallery" ) 1461 { 1462 foreach ( ElementWithIndex< LoopItem > image in imageCategories.GetLoop( "Category.Images" ).WithIndex() ) 1463 { 1464 if (image.Element.Index == 1 ) 1465 { 1466 isActive = "active"; 1467 } 1468 else 1469 { 1470 isActive = ""; 1471 deliveryCarouselClassList = "d-flex"; 1472 } 1473 <li class="@isActive" data-target="#js-e-product-image-modal-carousel-delivery" data-slide-to="@( image.Index + 1 )"> 1474 <span style="background-image:url(/admin/public/getimage.ashx?Crop=0&Image=@image.Element.GetString( "Ecom:Product:Detail.Image.Clean" )&Format=jpg&Width=50&Height=&Quality=75)"></span> 1475 </li> 1476 } 1477 } 1478 } 1479 </ol> 14801481 <a class="carousel-control-prev @deliveryCarouselClassList" data-target="#js-e-product-image-modal-carousel-delivery" data-slide="prev"></a> 1482 <a class="carousel-control-next @deliveryCarouselClassList" data-target="#js-e-product-image-modal-carousel-delivery" data-slide="next"></a> 14831484 </div> 1485 </div> 1486 </div> 1487 </div> 1488 </div> 14891490 </div> 1491 </div> 1492 </div> 1493 break; 1494 case "2": // Material 1495 <div class="col-12"> 1496 @{ 1497 string materialImg = fieldItem.GetString( "Ecom:FieldDisplayGroup.Field.Value" ) + ".png"; 14981499 if ( string.IsNullOrEmpty( fieldItem.GetString( "Ecom:FieldDisplayGroup.Field.Value" ) ) == false ) 1500 { 1501 JSON.pdfData.materials.Add( new 1502 { 1503 id = fieldItem.GetString( "Ecom:FieldDisplayGroup.Field.Id" ), 1504 label = translatedFieldLabel, 1505 text = fieldItem.GetString( "Ecom:FieldDisplayGroup.Field.OptionLabel" ), 1506 path = string.Format( "/Files/Images/isabella/IsabellaIcons/{0}", materialImg ), 1507 imageUri = string.Empty 1508 } ); 1509 } 15101511 bool isEditor = fieldItem.GetString("Ecom:FieldDisplayGroup.Field.TypeName") == "EditorText"; 15121513 } 15141515 @if ( string.IsNullOrEmpty(fieldItem.GetString( "Ecom:FieldDisplayGroup.Field.Value" )) == false ) 1516 { 1517 if(isEditor){ 1518 <p class="mb-1">@fieldItem.GetString( "Ecom:FieldDisplayGroup.Field.Value" )</p> 1519 } 1520 else 1521 { 1522 <p class="font-weight-bold mb-1">@translatedFieldLabel</p> 1523 <div class="d-flex align-items-start mb-3"> 1524 <img src="/Files/Images/isabella/IsabellaIcons/@materialImg" style="width: 45px" class="mr-2"> 1525 <div> 1526 @if ( fieldItem.GetString("Ecom:FieldDisplayGroup.Field.IsList") == "True" ) 1527 { 1528 @fieldItem.GetString("Ecom:FieldDisplayGroup.Field.OptionLabel")<br /> 1529 } 1530 else 1531 { 1532 @fieldItem.GetString("Ecom:FieldDisplayGroup.Field.Value")<br /> 1533 } 1534 </div> 1535 </div> 1536 } 153715381539 } 15401541 </div> 1542 break; 1543 case "3": // Measures 1544 if(loopCounter == 0) { 1545 foreach ( LoopItem imageCategories in GetLoop( "ImageCategories" ) ) 1546 { 1547 if ( imageCategories.GetString( "Category.SystemName" ) == "MeasureIllustrations" ) 1548 { 1549 foreach ( ElementWithIndex< LoopItem > image in imageCategories.GetLoop( "Category.Images" ).WithIndex() ) 1550 { 1551 <div class="col-12"> 1552 <img src="@image.Element.GetString( "Ecom:Product:Detail.Image.Clean" )" alt="" class="col-12 p-0 mb-3"> 1553 </div> 1554 } 1555 } 1556 } 15571558 } 15591560 if ( fieldItem.GetString( "Ecom:FieldDisplayGroup.Field.Id" ).Contains("MeasureDesc") || fieldItem.GetString( "Ecom:FieldDisplayGroup.Field.Id" ).Contains("MeasureDesc2")) 1561 { 1562 <div class="col-12 col-md-6"> 1563 <p class="font-weight-bold"> 1564 @if ( fieldItem.GetString("Ecom:FieldDisplayGroup.Field.IsList") == "True" ) 1565 { 1566 @fieldItem.GetString("Ecom:FieldDisplayGroup.Field.OptionLabel")<br /> 1567 } 1568 else 1569 { 1570 @fieldItem.GetString("Ecom:FieldDisplayGroup.Field.Value")<br /> 1571 } 1572 </p> 1573 </div> 1574 } 1575 else if (string.IsNullOrEmpty( fieldItem.GetString( "Ecom:FieldDisplayGroup.Field.Value" ) ) == false) { 1576 <div class="col-5 col-lg-3 d-flex"> 1577 <p class="font-weight-bold mb-0 pb-0">@translatedFieldLabel</p> 1578 </div> 1579 <div class="col-7 col-lg-9 d-flex"> 1580 <p class="mb-0 pb-0"> 1581 @if ( fieldItem.GetString("Ecom:FieldDisplayGroup.Field.IsList") == "True" ) 1582 { 1583 @fieldItem.GetString("Ecom:FieldDisplayGroup.Field.OptionLabel")<br /> 1584 } 1585 else 1586 { 1587 @fieldItem.GetString("Ecom:FieldDisplayGroup.Field.Value")<br /> 1588 } 1589 </p><br /> 1590 </div> 15911592 JSON.pdfData.measures.Add( new 1593 { 1594 value = fieldItem.GetString( "Ecom:FieldDisplayGroup.Field.Value" ), 1595 name = fieldItem.GetString( "Ecom:FieldDisplayGroup.Field.Name" ) 1596 } ); 1597 } 1598 break; 1599 case "1": // Details & Features 1600 if (string.IsNullOrEmpty( fieldItem.GetString( "Ecom:FieldDisplayGroup.Field.Value" ) ) == false) { 1601 if ( fieldItem.GetString( "Ecom:FieldDisplayGroup.Field.Id" ).Contains("VideoPresentation")) { 1602 <div class="col-12 mb-2"> 1603 <div class="col-12 px-0"> 1604 <p class="font-weight-bold">@GetString( "Ecom:Product.CategoryField.TentCamVillaGeneral.AssemblyLabelVideo3.Value.Clean" )</p> 1605 <iframe width="100%" height="210" src="@fieldItem.GetString( "Ecom:FieldDisplayGroup.Field.Value" )" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> 1606 </div> 1607 </div> 1608 } else { 1609 <div class="col-5 col-lg-3 d-flex"> 1610 <p class="font-weight-bold mb-0 pb-0">@translatedFieldLabel</p> 1611 </div> 1612 <div class="col-7 col-lg-9 d-flex flex-column"> 1613 @if ( fieldItem.GetString( "Ecom:FieldDisplayGroup.Field.Id" ) == "FrameGuide" || fieldItem.GetString( "Ecom:FieldDisplayGroup.Field.Id" ) == "FrameIllustration") { 1614 <a href="@GetString( "Ecom:Product.CategoryField.AccessoriesGeneral.FrameGuide.Value" )">@fieldItem.GetString( "Ecom:FieldDisplayGroup.Field.Value" )</a> 1615 } else { 1616 if ( fieldItem.GetString("Ecom:FieldDisplayGroup.Field.IsList") == "True" ) 1617 { 1618 @fieldItem.GetString("Ecom:FieldDisplayGroup.Field.OptionLabel")<br /> 1619 } 1620 else 1621 { 1622 @fieldItem.GetString("Ecom:FieldDisplayGroup.Field.Value")<br /> 1623 } 1624 } 1625 <br /> 1626 </div> 1627 } 1628 } 1629 break; 1630 case "5": // Assembly 16311632 if(loopCounter == 0) { 1633 foreach ( LoopItem imageCategories in GetLoop( "ImageCategories" ) ) 1634 { 1635 if ( imageCategories.GetString( "Category.SystemName" ).Contains("AssemblyIllustrations" )) 1636 { 1637 foreach ( ElementWithIndex< LoopItem > image in imageCategories.GetLoop( "Category.Images" ).WithIndex() ) 1638 { 1639 <div class="col-12 col-lg-8"> 1640 <img src="/admin/public/getimage.ashx?Crop=0&Image=@image.Element.GetString( "Ecom:Product:Detail.Image.Clean" )&Format=png&Width=600&Height=&Quality=90" alt="" class="col-12 p-0 mb-3"> 1641 </div> 1642 } 1643 } 1644 } 16451646 } 1647 if ( fieldItem.GetString( "Ecom:FieldDisplayGroup.Field.Id" ) == "AssemblyGuide" && string.IsNullOrEmpty( fieldItem.GetString( "Ecom:FieldDisplayGroup.Field.Value" ) ) == false ) 1648 { 1649 <div class="col-12 mb-3"> 1650 <p class="font-weight-bold mb-1">@Translate( "eCom Product - Download installation instructions - Header", "Opstillingsvejledning" )</p> 1651 <a class="text-primary" href="@fieldItem.GetString( "Ecom:FieldDisplayGroup.Field.Value" )" download> 1652 <i class="material-icons material-icons-large">vertical_align_bottom</i> @Translate( "eCom Product - Download installation instructions - Link", "Download opstillingsvejledning" ) 1653 </a> 1654 </div> 1655 } 1656 else if ( fieldItem.GetString( "Ecom:FieldDisplayGroup.Field.Id" ).Contains("AssemblyVideo1") && string.IsNullOrEmpty( fieldItem.GetString( "Ecom:FieldDisplayGroup.Field.Value" ) ) == false ) 1657 { 1658 <div class="col-12"> 1659 <p class="font-weight-bold">@GetString( "Ecom:Product.CategoryField.TentCamVillaGeneral.AssemblyLabelVideo1.Value.Clean" )</p> 1660 <iframe width="100%" height="400" src="@fieldItem.GetString( "Ecom:FieldDisplayGroup.Field.Value" )" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> 1661 </div> 1662 } 1663 else if ( fieldItem.GetString( "Ecom:FieldDisplayGroup.Field.Id" ).Contains("AssemblyVideo2") && string.IsNullOrEmpty( fieldItem.GetString( "Ecom:FieldDisplayGroup.Field.Value" ) ) == false ) 1664 { 1665 <div class="col-12"> 1666 <p class="font-weight-bold">@GetString( "Ecom:Product.CategoryField.TentCamVillaGeneral.AssemblyLabelVideo2.Value.Clean" )</p> 1667 <iframe width="100%" height="400" src="@fieldItem.GetString( "Ecom:FieldDisplayGroup.Field.Value" )" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> 1668 </div> 1669 } 1670 else if ( fieldItem.GetString( "Ecom:FieldDisplayGroup.Field.Id" ).Contains("AssemblyVideo3") && string.IsNullOrEmpty( fieldItem.GetString( "Ecom:FieldDisplayGroup.Field.Value" ) ) == false ) 1671 { 1672 <div class="col-12"> 1673 <p class="font-weight-bold">@GetString( "Ecom:Product.CategoryField.TentCamVillaGeneral.AssemblyLabelVideo3.Value.Clean" )</p> 1674 <iframe width="100%" height="400" src="@fieldItem.GetString( "Ecom:FieldDisplayGroup.Field.Value" )" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> 1675 </div> 1676 } 1677 else if ( fieldItem.GetString( "Ecom:FieldDisplayGroup.Field.Id" ).Contains("MaintenanceAdvice") || string.IsNullOrEmpty( fieldItem.GetString( "Ecom:FieldDisplayGroup.Field.Value" ) ) == false && fieldItem.GetString( "Ecom:FieldDisplayGroup.Field.Id" ).Contains("AssemblyLabelVideo") == false ) 1678 { 1679 <div class="col-5 col-lg-3 d-flex"> 1680 <p class="font-weight-bold mb-0 pb-0">@translatedFieldLabel</p> 1681 </div> 1682 <div class="col-7 col-lg-9 d-flex flex-column"> 1683 @if ( fieldItem.GetString("Ecom:FieldDisplayGroup.Field.IsList") == "True" ) 1684 { 1685 @fieldItem.GetString("Ecom:FieldDisplayGroup.Field.OptionLabel")<br /> 1686 } 1687 else 1688 { 1689 @fieldItem.GetString("Ecom:FieldDisplayGroup.Field.Value")<br /> 1690 } 1691 </div> 1692 } 1693 break; 1694 default: 1695 if (string.IsNullOrEmpty(fieldItem.GetString("Ecom:FieldDisplayGroup.Field.Value")) == false) 1696 { 1697 <div class="col-5 col-lg-3 d-flex"> 1698 <p class="font-weight-bold mb-0 pb-0">@translatedFieldLabel</p> 1699 </div> 1700 <div class="col-7 col-lg-9 d-flex flex-column"> 1701 @if (fieldItem.GetString("Ecom:FieldDisplayGroup.Field.IsList") == "True") 1702 { 1703 string text = fieldItem.GetString("Ecom:FieldDisplayGroup.Field.OptionLabel"); 1704 if (text.Contains(",")) 1705 { 1706 string[] splitText = text.Split(','); 1707 text = string.Join(", ", splitText); 1708 } 1709 @text<br/> 1710 } 1711 else 1712 { 1713 @fieldItem.GetString("Ecom:FieldDisplayGroup.Field.Value")<br/> 1714 } 1715 </div> 1716 } 1717 break; 1718 } 1719 } 1720 loopCounter++; 1721 } 1722 </div> 1723 </div> 1724 </div> 1725 displayGroupCount++; 1726 } 1727 } 17281729 } 1730 </div> 1731 </div> 1732 </div> 173317341735 @functions 1736 { 1737 public Field GetTranslatedCategoryFieldName(string categoryId, string fieldId) 1738 { 1739 Field result = null; 17401741 Category category = Category.GetCategoryById(categoryId, Dynamicweb.Ecommerce.Common.Context.LanguageID); 17421743 Field field = category.Fields.FirstOrDefault(f => f.Id.Equals(fieldId)); 17441745 if (field != null && string.IsNullOrEmpty(field.Label) == false) 1746 { 17471748 result = field; 1749 } 17501751 return result; 1752 } 1753 } 17541755 </div> 1756 </div> 1757 </div> 1758 @sectionEnd() 175917601761 @if ( GetBoolean("Ecom:Product.CategoryField.ProductsGeneral.IsAccessory.Value") == false ) 1762 { 1763 foreach ( LoopItem group in GetLoop("ProductRelatedGroups") ) 1764 { 1765 @ProductRelatedProducts( 1766 sectionClasses: "e-section pt-6 bg-septenary-opacity-low", 1767 contentClasses: "col-12", 1768 sectionCollapse: true, 1769 collapseToggleTextExpand: Translate( "eCom Product - View more - Text", "View more" ), 1770 collapseToggleTextCollapse: Translate( "eCom Product - View less - Text", "View less" ), 1771 heading: group.GetString("Ecom:Product:RelatedGroup.Name"), 1772 productLoop: group.GetLoop("RelatedProducts").Take(999).Select(p => Product.GetProductById(p.GetString("Ecom:Product.ID"))) 1773 ) 1774 } 1775 } 1776 else 1777 { 1778 @ProductRelatedProducts( 1779 sectionClasses: "e-section pt-6 bg-septenary-opacity-low", 1780 contentClasses: "col-12", 1781 sectionCollapse: true, 1782 collapseToggleTextExpand: Translate( "eCom Product - View more - Text", "View more" ), 1783 collapseToggleTextCollapse: Translate( "eCom Product - View less - Text", "View less" ), 1784 heading: Translate("eCom Product - Accessory for these products - Heading", "Kan også bruges som tilbehør til disse produkter"), 1785 productLoop: parentProducts.Take(999) 1786 ) 1787 } 17881789 @if ( string.IsNullOrEmpty(GetString("Ecom:Product.CategoryField.ModelType.ModelTypeDesc.Value.Clean")) == false ) 1790 { 1791 <section class="e-section e-theme-secondary js-e-section mb-0 p p-0 p-mosaic p-mosaic-img-right"> 1792 <div class="container-fluid px-0"> 1793 <div class="e-reveal-done no-gutters row"> 1794 <div class="align-self-center col-12 col-md-6 p-txt-container"> 1795 <h2>@GetString( "Ecom:Product.CategoryField.ModelType.ModelTypeName.OptionLabel" )</h2> 1796 @GetString( "Ecom:Product.CategoryField.ModelType.ModelTypeDesc.Value.Clean" ) 1797 <p> 1798 <a class="arrow-white isabella-arrow text-white" href="@GetString( modelTypeLink )"> 1799 @Translate( "eCom Product - Model - Read more about - Link", "Læs mere om" ) @GetString( "Ecom:Product.CategoryField.ModelType.ModelTypeName.OptionLabel" ) @Translate( "eCom Product - Model - series - Link", "serien" ) 1800 </a> 1801 </p> 1802 </div> 1803 <div class="col-12 col-md-6 e-section-height-md order-md-last p-img-container position-relative"> 1804 <div class="bg-center-middle bg-cover p-img pos-b-0 position-absolute pos-l-0 pos-r-0 pos-t-0" style="background-image:url(/admin/public/getimage.ashx?Crop=0&amp;Image=@GetString( "Ecom:Product.CategoryField.ModelType.ModelTypeImage.Value.Clean" )&amp;Format=png&amp;Width=1280&amp;Height=0&amp;Quality=75);" title=""></div> 1805 </div> 1806 </div> 1807 </div> 1808 </section> 1809 } 18101811 </form> 18121813 <script>e4.data.set( '@jsDataPropertyPath', @JsonService.Instance.ToJson(isabellaProduct) );</script> 1814 <script>e4.data.set( 'isabella.villaAndCamplet.extendedPdfdata', @JsonService.Instance.ToJson(isabellaExtendPdfData) );</script> 1815 <code class="js-e-breadcrumb-item-append" data-text="@HttpUtility.HtmlAttributeEncode(isabellaProduct.Name)" data-link="@HttpUtility.HtmlAttributeEncode(isabellaProduct.Link)"></code> 1816 </div> 18171818 @sectionStart() 181918201821 <!-- Modal - B2C Send mail --> 18221823 <div aria-hidden="true" aria-labelledby="CampLetB2CCheckoutLabel" class="fade modal" id="CampletB2CModal" role="dialog" tabindex="-1"> 1824 <div class="modal-dialog modal-lg" role="document"> 1825 <div class="modal-content"> 1826 <div class="modal-header"> 1827 <h3 class="modal-title" id="CampLetB2CCheckoutLabel">@Translate("eCom Product - Camp-let Modal - Header", "Beregn pris på din Camp-let")</h3> 1828 <button aria-label="Close" class="close" data-dismiss="modal" type="button"> 1829 <span aria-hidden="true">&times;</span> 1830 </button> 1831 </div> 1832 <div class="modal-body"> 1833 @using System.Globalization 1834 @using Co3.Espresso.Website.Models.XML 1835 @using Co3.Espresso.Website.Services 1836 @using Dynamicweb.Frontend 1837 @inherits Co3.Espresso.Website.TemplateBases.Paragraphs.ParagraphBase 1838 @{ 1839 Dictionary< string, Territory > countriesOfTheWorld = TranslationService.Instance.GetCountries(); 1840 Dictionary< string, Territory > dealersearchCountries = new Dictionary< string, Territory >(); 1841 dealersearchCountries = countriesOfTheWorld.Values.OrderBy(t => t.Name).ToDictionary(t => t.Code, t => t); 1842 string quoteType = GetString("QuoteType.Clean"); 1843 string formAction = $"/{PageView.Current().Area.Name}/cart/checkout-camplet"; 18441845 string areaCountryCode = new RegionInfo(Espresso.Page.Area.CultureInfo.LCID).TwoLetterISORegionName; 1846 } 18471848 <div class="e-checkout-step"> 1849 <div class="card-body e-checkout-step-card-body pt-0"> 1850 <form action="@formAction" class="e-checkout-step-form e-product js-e-product js-e-checkout-step-form row" method="post" name="CheckoutApproveForm" data-validate="true"> 1851 <fieldset class="col-12 col-md-6 form-group"> 1852 <h3>@Translate("MasterLogin_PersonalInfoLabel","Personoplysninger")</h3> 1853 <div class="js-e-checkout-alternative-billing-address mt-2 show" id="CustomerAddress"> 1854 <fieldset class="form-group"> 1855 <label class="form-control-label" for="EcomOrderCustomerName"> 1856 <span class="js-e-checkout-name-label-toggle">@Translate("eCom Checkout - Name - Heading", "Name")</span> 1857 </label> 1858 <input class="form-control required" id="EcomOrderCustomerName" name="EcomOrderCustomerName" type="text" value=""> 1859 </fieldset> 1860 <fieldset class="form-group"> 1861 <label class="form-control-label" for="EcomOrderCustomerAddress">@Translate("eCom Checkout - Address - Text", "Address")</label> 1862 <input class="form-control required" id="EcomOrderCustomerAddress" name="EcomOrderCustomerAddress" type="text" value=""> 1863 </fieldset> 1864 <fieldset class=""> 1865 <div class="row"> 1866 <div class="col-12 col-sm-3 form-group"> 1867 <label class="form-control-label" for="EcomOrderCustomerZip">@Translate("eCom Checkout - Zip - Heading", "ZIP")</label> 1868 <input class="form-control required" id="EcomOrderCustomerZip" name="EcomOrderCustomerZip" type="text" value=""> 1869 </div> 1870 <div class="col-12 col-sm-9 form-group"> 1871 <label class="form-control-label" for="EcomOrderCustomerCity"> 1872 @Translate("eCom Checkout - City - Heading", "City") 1873 </label> 1874 <input class="form-control required" id="EcomOrderCustomerCity" name="EcomOrderCustomerCity" type="text" value=""> 1875 </div> 1876 </div> 1877 </fieldset> 1878 <fieldset class="form-group"> 1879 <label class="form-control-label" for="EcomOrderCustomerCountry">@Translate("eCom Checkout - Country - Heading", "Country")</label> 1880 <select autocomplete="none" class="form-control js-e-checkout-change-billing-country" id="EcomOrderCustomerCountry" name="EcomOrderCustomerCountry"> 1881 <option>@Translate("eCom Checkout - Country Select - Heading", "Choose country")</option> 1882 @foreach ( KeyValuePair< string, Territory > country in dealersearchCountries ) 1883 { 1884 <option value="@country.Value.Code">@country.Value.Name</option> 1885 } 1886 </select> 1887 </fieldset> 1888 <fieldset class="form-group"> 1889 <label class="form-control-label" for="EcomOrderCustomerPhone">@Translate("eCom Checkout - Phone - Heading", "Phone")</label> 1890 <input class="form-control" id="EcomOrderCustomerPhone" name="EcomOrderCustomerPhone" type="text" value=""> 1891 <small>@Translate("eCom Checkout - Call Help - Text", "We won't call you unless we have questions regarding your shipping")</small> 1892 </fieldset> 1893 <fieldset class="form-group"> 1894 <label class="form-control-label" for="EcomOrderCustomerComment">@Translate("eCom Checkout - Comment - Heading", "Comment")</label> 1895 <textarea class="form-control" id="EcomOrderCustomerComment" name="EcomOrderCustomerComment" rows="3" type="text"></textarea> 1896 </fieldset> 1897 </div> 1898 </fieldset> 1899 <div class="col-12 col-md-6"> 1900 <h3>@Translate("Modules_UserManagement_DealerText","Forhandler")</h3> 1901 <fieldset class="form-group"> 1902 <div class="js-i-camplet-cart-dealer" data-country-code="@areaCountryCode"> 1903 <script id="js-e-handlebars-tmpl-cart-b2c-dealer" type="text/x-handlebars-template"> 1904 <select autocomplete="none" class="form-control js-i-camplet-cart-dealer-select" id="EcomOrderCustomerDealer" name="EcomOrderCustomerDealer"> 1905 <option>@Translate("eCom Checkout - Dealer Select - Heading", "Vælg forhandler")</option> 1906 {{#each users}} 1907 <option value="{{id}}">{{name}}</option> 1908 {{/each}} 1909 </select> 1910 </script> 1911 </div> 1912 </fieldset> 1913 <input type="hidden" name="EcomOrderDeliveryName" value="" /> 1914 <input type="hidden" name="EcomOrderDeliveryAddress" value="" /> 1915 <input type="hidden" name="EcomOrderDeliveryAddress2" value="" /> 1916 <input type="hidden" name="EcomOrderDeliveryZip" value="" /> 1917 <input type="hidden" name="EcomOrderDeliveryCity" value="" /> 1918 <input type="hidden" name="EcomOrderDeliveryCountry" value="" /> 1919 <input type="hidden" name="EcomOrderDeliveryCountryCode" value="" /> 1920 <input type="hidden" name="EcomOrderDeliveryPhone" value="" /> 1921 <input type="hidden" name="EcomOrderDeliveryMail" value="" /> 1922 <input type="hidden" name="Company" value="" /> 19231924 <h3>@Translate("eCom Checkout - Receipt - Heading", "Receipt")</h3> 1925 <fieldset class="form-group"> 1926 <label class="form-control-label" for="EcomOrderCustomerEmail">@Translate("eCom Checkout - Email - Heading", "Email")</label> 1927 <input class="email form-control required" id="EcomOrderCustomerEmail" name="EcomOrderCustomerEmail" type="email" value=""> 1928 <small class="">@Translate("eCom Checkout - Email Help - Text", "Your receipt will be send to this e-mail.")</small> 1929 </fieldset> 19301931 <div class="align-items-center d-flex e-checkout-actions form-group"> 1932 <button type="submit" name="@GetString("CartV2.NextStepButtonName")" class="arrow-right btn btn-lg btn-success e-checkout-next-step">@Translate("eCom Checkout Approve - Next - Button", "Checkout")</button> 1933 </div> 1934 </div> 1935 </form> 1936 </div> 1937 </div> 19381939 </div> 1940 </div> 1941 </div> 1942 </div> 19431944 <!-- Modal - How it Works --> 19451946 <div aria-hidden="true" aria-labelledby="howItWorksModalLabel" class="fade modal" id="howItWorksModal" role="dialog" tabindex="-1"> 1947 <div class="modal-dialog" role="document"> 1948 <div class="modal-content"> 1949 <div class="modal-body"> 19501951 @if ( !string.IsNullOrEmpty( howItWorksPage ) ) 1952 { 1953 @RenderPageContent(int.Parse(howItWorksPage)) 1954 } 1955 </div> 1956 </div> 1957 </div> 1958 </div> 19591960 @SnippetStart("ProductOpenGraph") 1961 @{ 1962 string openGraphTitle = product.Meta.Title; 1963 if (string.IsNullOrEmpty(openGraphTitle)) 1964 { 1965 openGraphTitle = product.Name; 1966 } 1967 string openGraphDescription = product.Meta.Description; 1968 if (string.IsNullOrEmpty(openGraphDescription)) 1969 { 1970 openGraphDescription = product.ShortDescription; 1971 } 1972 string openGraphImage = $"{HttpContext.Current.Request.Url.Scheme}://{HttpContext.Current.Request.Url.Host}/admin/public/getimage.ashx?Crop=0&Image={productImage}&Format=jpg&Width=1820&Height=1000&Quality=90"; 1973 } 1974 <meta property="og:title" content="@openGraphTitle"> 1975 <meta property="og:description" content="@openGraphDescription.StripHtml()"> 1976 <meta property="og:image" content="@openGraphImage"> 1977 @SnippetEnd("ProductOpenGraph") 1978
keyboard_arrow_up