Error executing template "Designs/junckers/eCom/Product/junckers-cases.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
   at CompiledRazorTemplates.Dynamic.RazorEngine_972a0ecd2835459baf05de13e766d4f1.Execute() in E:\Dynamicweb.NET\Solutions\junckers.espresso4.dk\files\Templates\Designs\junckers\eCom\Product\junckers-cases.cshtml:line 633
   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 RazorTemplateBase< RazorTemplateModel< Template > > 2 @using Dynamicweb.Ecommerce.Prices; 3 @using Co3.Espresso.Base.Extensions; 4 @using Co3.Espresso.Base.Models; 5 @using Co3.Espresso.Website.Models.FrontEnd 6 @using Co3.Espresso.Website.Services 7 @using Dynamicweb.Ecommerce.Common.eCom7 8 @using Dynamicweb.Rendering 9 @using System.Web 10 @using Dynamicweb.Ecommerce.Products; 11 @using ProductService = Co3.Espresso.Website.Services.ProductService 12 @using System.Globalization @using Co3.Espresso.Base.Extensions @using Co3.Espresso.DownloadManager.Models @using Co3.Espresso.Website.Models.FrontEnd @using Co3.Espresso.Website.Services @using Dynamicweb.Content @using Dynamicweb.Frontend @using Dynamicweb.Rendering @using EcomContext = Dynamicweb.Ecommerce.Common.Context @functions { public string getCountryCodeFromArea( Area area ) { RegionInfo regionInfo = new RegionInfo( area.CultureInfo.LCID ); return regionInfo.TwoLetterISORegionName; } public dynamic GetPriceInfo( string beforePrice = "", string basicPrice = "" ) { double vat = EcomContext.Country.Vat; double dblBeforePrice = 0; double.TryParse( beforePrice, out dblBeforePrice ); double dblBasicPrice = 0; double.TryParse( basicPrice, out dblBasicPrice ); double dblBeforePriceWithVat = 0; double dblDiffPrice = 0; int pct = 0; if ( dblBeforePrice > 0 ) { dblBeforePriceWithVat = dblBeforePrice * ( ( vat / 100d ) + 1 ); if ( dblBeforePriceWithVat > dblBasicPrice ) { dblDiffPrice = dblBeforePriceWithVat - dblBasicPrice; pct = (int)Math.Ceiling((( 100d / dblBeforePriceWithVat ) * dblDiffPrice)); } } dynamic returnValue = new { beforePriceWithVat = dblBeforePriceWithVat, beforePriceWithVatFormatted = ProductService.Instance.GetPriceFormatted(dblBeforePriceWithVat), basicPrice = dblBasicPrice, basicPriceFormatted = ProductService.Instance.GetPriceFormatted(dblBasicPrice), diffPrice = dblDiffPrice, diffPriceFormatted = ProductService.Instance.GetPriceFormatted(dblDiffPrice), pct = pct, vat = vat }; return returnValue; } } @helper ProductDescription(string sectionClasses = "e-section", bool sectionCollapse = false, string contentClasses = null, string heading = null, string content = null) { if ( string.IsNullOrEmpty( content ) == false ) { ClassList headingClassList = new ClassList(); headingClassList.AddClasses( "col-12" ); ClassList contentClassList = new ClassList(); contentClassList.AddClasses( "col-12" ); @sectionStart( sectionClasses: sectionClasses, sectionCollapse: sectionCollapse, contentClasses: contentClasses ) if ( string.IsNullOrEmpty( heading ) == false ) { <div class="@headingClassList"> <h2>@heading</h2> </div> } <div class="@contentClassList"> @content </div> @sectionEnd() } } @helper ProductVideo(string sectionClasses = "e-section", string contentClasses = null, string heading = null, string videoURL = null) { if ( string.IsNullOrEmpty( videoURL ) == false ) { ClassList headingClassList = new ClassList(); headingClassList.AddClasses( "col-12" ); ClassList contentClassList = new ClassList(); contentClassList.AddClasses( "col-12" ); @sectionStart( sectionClasses: sectionClasses, contentClasses: contentClasses ) if ( string.IsNullOrEmpty( heading ) == false ) { <div class="@headingClassList"> <h2>@heading</h2> </div> } <div class="@contentClassList"> <div class="embed-responsive embed-responsive-16by9 mb-2"> <iframe class="embed-responsive-item" src="@videoURL" width="1080" height="608" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe> </div> </div> @sectionEnd() } } @helper ProductRelatedProducts(string sectionClasses = "e-section p-section p-section-bg-white pt-3 border-bottom", string contentClasses = null, string heading = null, IEnumerable<RazorTemplateBase<RazorTemplateModel<Template>>.LoopItem> productLoop = null) { if ( productLoop != null && productLoop.Any() == true ) { ClassList headingClassList = new ClassList(); headingClassList.AddClasses( "col-10 mx-auto" ); ClassList contentClassList = new ClassList(); contentClassList.AddClasses( "col-10 mx-auto" ); @sectionStart( sectionClasses: sectionClasses, contentClasses: contentClasses ) if ( string.IsNullOrEmpty( heading ) == false ) { <div class="@headingClassList"> <h2>@heading</h2> </div> } <div class="@contentClassList"> <div class="e-products mb-2"> <div class="row"> @{ string productlistItemClassList = ProductlistService.Instance.GetGridItemWidth( null ).ToResponsiveClasses(); } @foreach ( RazorTemplateBase<RazorTemplateModel<Template>>.LoopItem product in productLoop ) { @ProductlistItem( product, productlistItemClassList ) } </div> </div> </div> @sectionEnd() } } @helper ProductlistItem(RazorTemplateBase<RazorTemplateModel<Template>>.LoopItem product, string productlistItemClassList = null) { if ( product != null ) { dynamic productData = new { id = product.GetString( "Ecom:Product.ID" ), url = ProductService.Instance.GetProductLink( product.GetString( "Ecom:Product.PrimaryOrFirstGroupID" ), product.GetString( "Ecom:Product.ID" ) ), number = product.GetString( "Ecom:Product.Number" ), name = product.GetString( "Ecom:Product.Name" ), imageLarge = ImageService.Instance.GetImageURL( product.GetString( "Ecom:Product.ImageLarge.Clean" ), 450, 350, 5 ), price = ProductService.Instance.GetPriceFormatted( product.GetDouble( "Ecom:Product.Price.Price" ) ), descriptionShortExtra01 = product.GetString( "Ecom:Product:Field.DescriptionShortExtra01" ), descriptionShort = product.GetString( "Ecom:Product.ShortDescription" ), stock = new { id = product.GetString( "Ecom:Product:Stock.ID" ), quantity = product.GetString( "Ecom:Product.Stock" ), text = product.GetString( "Ecom:Product:Stock.Text" ), delivery = product.GetString( "Ecom:Product:Stock.DeliveryText" ) } }; <div class="@productlistItemClassList"> <div class="e-products-item js-e-products-item"> <div class="e-products-item-container"> <div class="junckers-relatedproducts-item-image-container" style="background: url(@productData.imageLarge)"> @if ( string.IsNullOrEmpty( productData.descriptionShort ) == false ) {<div class="junckers-relatedproducts-item-text-container py-1"> <p class="e-products-item-text mb-0 px-2 small"> <strong>Package Size</strong> </p> <p class="e-products-item-text mb-0 text-muted px-2 small"> @productData.descriptionShort </p> </div> } </div> <div class="e-products-item-text-container text-center"> <h3 class="e-products-item-name mb-0"> @productData.name </h3> @* <p class="e-products-item-text mb-0"> *@ @* <small class="e-products-item-price small text-muted"> *@ @* <a href="@productData.url"> *@ @* @productData.price *@ @* </a> *@ @* </small> *@ @* </p> *@ </div> </div> </div> </div> } } @helper sectionStart(string sectionClasses = "e-section", string contentClasses = null, bool sectionCollapse = false, string collapseToggleTextExpand = "Se mere", string collapseToggleTextCollapse = "Se mindre") { ClassList sectionClassList = new ClassList(); sectionClassList.AddClasses( sectionClasses ); ClassList contentClassList; string collapseId = Guid.NewGuid().ToString( "N" ); ClassList collapseToggleClassList = new ClassList(); if ( contentClasses == null ) { contentClassList = Co3.Espresso.Website.Services.PageService.Instance.GetResponsiveClassesFromPageItem( PageView.Current().Page.Item ); } else { contentClassList = new ClassList(); contentClassList.AddClasses( contentClasses ); } if ( sectionCollapse == true ) { sectionClassList.AddClasses( "p-section-collapse js-p-section-collapse" ); collapseToggleClassList.AddClasses( contentClasses ); collapseToggleClassList.AddClasses( "p-section-collapse-toggle collapsed order-last text-center" ); contentClassList.AddClasses( "p-section-collapse-content collapse is-md" ); } @:<section class="@sectionClassList"> @:<div class="container-fluid"> @:<div class="row"> if ( sectionCollapse == true ) // TODO: SplitPattern into seperate heler function { <div class="@collapseToggleClassList" data-toggle="collapse" data-target="#@collapseId"> <button class="btn btn-primary p-section-collapse-toggle-btn" type="button"> <i class="material-icons p-section-collapse-toggle-icon">keyboard_arrow_down</i> </button> <small class="p-section-collapse-toggle-text h4" data-expand-text="@collapseToggleTextExpand" data-collapse-text="@collapseToggleTextCollapse"></small> </div> } @:<div class="@contentClassList" id="@collapseId"> @:<div class="row"> } @helper sectionEnd() { @:</div> @:</div> @:</div> @:</div> @:</section> } 13 14 15 16 @{ 17 string logoPrimary = Espresso.Area.Item.LogoPrimary; 18 bool isRequestingPDF = System.Web.HttpContext.Current.Request[ "pdfgeneratorworking" ] == "true" || System.Web.HttpContext.Current.Request[ "newpdf" ] == "true" || System.Web.HttpContext.Current.Request[ "newpdf" ] == "test"; 19 20 dynamic JSON = new 21 { 22 productid = GetValue( "Ecom:Product.ID" ), 23 variantoptions = new List< dynamic >(), 24 variantcombinations = new List< dynamic >() 25 }; 26 27 foreach ( LoopItem variantCombo in GetLoop( "VariantCombinations" ) ) 28 { 29 if ( variantCombo.GetBoolean( "Ecom:VariantCombination.Product.Active" ) == true ) 30 { 31 JSON.variantcombinations.Add( new 32 { 33 id = variantCombo.GetString( "Ecom:VariantCombination.Product.ID" ), 34 name = variantCombo.GetString( "Ecom:VariantCombination.Product.Name" ), 35 text = variantCombo.GetString( "Ecom:VariantCombination.VariantText" ), 36 number = variantCombo.GetString( "Ecom:VariantCombination.Product.Number" ), 37 price = variantCombo.GetDouble( "Ecom:VariantCombination.Product.Price.Price" ), 38 imageLarge = variantCombo.GetString( "Ecom:VariantCombination.Product.ImageLarge.Clean" ), 39 stock = variantCombo.GetDouble( "Ecom:VariantCombination.Product.Stock" ), 40 stockState = variantCombo.GetString( "Ecom:VariantCombination.Product.Stock.Text" ), 41 delivery = variantCombo.GetString( "Ecom:VariantCombination.Product.Stock.DeliveryText" ) 42 } ); 43 } 44 } 45 string primaryGroupID = GetString( "Ecom:Product.PrimaryGroupID" ); 46 GroupService groupService = new GroupService(); 47 48 49 Product dynamicwebProduct = Dynamicweb.Ecommerce.Services.Products.GetProductById(GetString( "Ecom:Product.ID" ), GetString( "Ecom:Product.VariantID" ), Dynamicweb.Ecommerce.Common.Context.LanguageID, false); 50 51 IEnumerable<Detail> details = Dynamicweb.Ecommerce.Services.Details.GetDetails( dynamicwebProduct, "0" ).Where( d => d.GroupId == 1 ); 52 } 53 54 @inherits Co3.Espresso.Website.TemplateBases.Pages.PageBase @{ string eComProductCanonical = string.Empty; string globalValueUrl = GetGlobalValue( "Global:Pageview.Url" ); if ( GetGlobalValue( "Global:Pageview.Url" ).IndexOf( "?" ) > -1 ) { globalValueUrl = GetGlobalValue( "Global:Pageview.Url" ).Substring( 0, GetGlobalValue( "Global:Pageview.Url" ).IndexOf( "?" ) ); } if ( string.IsNullOrEmpty( GetString( "Ecom:Product.Canonical" ) ) == false ) { eComProductCanonical = String.Format( "{0}://{1}{2}", GetGlobalValue( "Global:Request.Scheme" ), GetGlobalValue( "Global:Request.Host" ), GetString( "Ecom:Product.Canonical" ) ); } else { eComProductCanonical = String.Format( "{0}://{1}{2}", GetGlobalValue( "Global:Request.Scheme" ), GetGlobalValue( "Global:Request.Host" ), globalValueUrl ); } string metaTitle = @GetString( "Ecom:Product.MetaTitle" ); string metaDescription = @GetString( "Ecom:Product.MetaDescription" ); } @SnippetStart( "productMetaTags" ) @{ if (string.IsNullOrEmpty( metaTitle ) ) { metaTitle = GetString( "Ecom:Product.Name" ); } } <title>@metaTitle</title> <meta title="@metaTitle" /> <meta name="description" content="@metaDescription" /> <link rel="canonical" href="@eComProductCanonical"> @SnippetEnd( "productMetaTags" ) 55 56 @sectionEnd() 57 58 <input id="js-junckers-case-documentation-link-value" type="hidden" value="@GetString( "Ecom:Product:Field.DocumentationPdf.Value" )" /> 59 60 <section class="align-items-center e-reveal-done e-section mb-0 p p-banner p-banner-medium pb-auto pt-auto junckers-case-banner pdf-page-break-avoid @(isRequestingPDF ? "pdf-case-banner-height" : "")"> 61 <div class="p-banner-img-center-middle p-img-container" style="background-image: url(/admin/public/getimage.ashx?Crop=0&Image=@GetValue( "Ecom:Product.ImageDefault.Default.Clean" )&Format=jpg&Width=2000&Height=&Quality=90)" title=""></div> 62 <div class="is-visible p-banner-txt-left-bottom p-txt-animate p-txt-container w-100"> 63 <div class="container-fluid"> 64 <div class="p-txt-wrapper row"> 65 <div class="col-11 col-md-9 mx-auto p-0"> 66 </div> 67 </div> 68 </div> 69 </div> 70 </section> 71 72 @sectionStart( "e-section p-section-bg-white pt-4" ) 73 74 <div class="e-product js-e-product junckers-product-case-description col-12 px-2 @(isRequestingPDF ? "junckers-product-case-text-min-height" : "")" data-pdf="@GetString( "Ecom:Product:Field.DocumentationPdf.Value" )"> 75 <div class="col-12 col-12 px-0"> 76 77 @if ( !string.IsNullOrWhiteSpace( GetString( "Ecom:Product.ShortDescription" ) ) ) 78 { 79 <div class="row"> 80 <div class="col-12 col-md-4"> 81 <h1 class="e-product-name mb-0 pdf-h1"> 82 @GetString( "Ecom:Product.Name" ) 83 </h1> 84 <div class="e-product-text-container h2 pdf-h2 mt-1"> 85 @GetString( "Ecom:Product.ShortDescription" ) 86 </div> 87 <div class="e-product-text-container row small mb-4"> 88 @if ( !string.IsNullOrWhiteSpace( GetString( "Ecom:Product.CategoryField.CasesGeneral.Categories.Value" ) ) ) 89 { 90 <div class="col-6"> 91 <h3> 92 @GetString( "Ecom:Product.CategoryField.CasesGeneral.Categories.Label" ) 93 </h3> 94 <ul class="material-icons-ul mt-0 mb-1"> 95 @{ 96 string[] detailsSpecialProps = GetString( "Ecom:Product.CategoryField.CasesGeneral.Categories.OptionLabel" ).Split( ',' ); 97 } 98 @foreach ( string prop in detailsSpecialProps ) 99 { 100 if ( prop != "" ) 101 { 102 <li><i class="material-icons">check</i>@prop</li> 103 } 104 } 105 </ul> 106 </div> 107 } 108 @if ( !string.IsNullOrWhiteSpace( GetString( "Ecom:Product.CategoryField.CasesGeneral.SquareMeters.Value" ) ) ) 109 { 110 <div class="col-6"> 111 <h3> 112 @GetString( "Ecom:Product.CategoryField.CasesGeneral.SquareMeters.Label" ) 113 </h3> 114 <p> 115 @GetString( "Ecom:Product.CategoryField.CasesGeneral.SquareMeters.Value" ) m<sup>2</sup> 116 </p> 117 </div> 118 } 119 @if ( !string.IsNullOrWhiteSpace( GetString( "Ecom:Product.CategoryField.CasesGeneral.Architect.Value" ) ) ) 120 { 121 <div class="col-6"> 122 <h3> 123 @GetString( "Ecom:Product.CategoryField.CasesGeneral.Architect.Label" ) 124 </h3> 125 <p> 126 @GetString( "Ecom:Product.CategoryField.CasesGeneral.Architect.Value" ) 127 </p> 128 </div> 129 } 130 @if ( !string.IsNullOrWhiteSpace( GetString( "Ecom:Product.CategoryField.CasesGeneral.Contractor.Value" ) ) ) 131 { 132 <div class="col-6"> 133 <h3> 134 @GetString( "Ecom:Product.CategoryField.CasesGeneral.Contractor.Label" ) 135 </h3> 136 <p> 137 @GetString( "Ecom:Product.CategoryField.CasesGeneral.Contractor.Value" ) 138 </p> 139 </div> 140 } 141 @if ( !string.IsNullOrWhiteSpace( GetString( "Ecom:Product.CategoryField.CasesGeneral.Country.Value" ) ) ) 142 { 143 <div class="col-6"> 144 <h3> 145 @GetString( "Ecom:Product.CategoryField.CasesGeneral.Country.Label" ) 146 </h3> 147 <p> 148 @GetString( "Ecom:Product.CategoryField.CasesGeneral.Country.OptionLabel" ) 149 </p> 150 </div> 151 } 152 @if ( !string.IsNullOrWhiteSpace( GetString( "Ecom:Product.CategoryField.CasesGeneral.Location.Value" ) ) ) 153 { 154 <div class="col-6"> 155 <h3> 156 @GetString( "Ecom:Product.CategoryField.CasesGeneral.Location.Label" ) 157 </h3> 158 <p> 159 @GetString( "Ecom:Product.CategoryField.CasesGeneral.Location.Value" ) 160 </p> 161 </div> 162 } 163 @if ( !string.IsNullOrWhiteSpace( GetString( "Ecom:Product.CategoryField.Cases_Wood_Flooring.FloorType.Value" ) ) ) 164 { 165 <div class="col-6"> 166 <h3> 167 @GetString( "Ecom:Product.CategoryField.Cases_Wood_Flooring.FloorType.Label" ) 168 </h3> 169 <p> 170 @GetString( "Ecom:Product.CategoryField.Cases_Wood_Flooring.FloorType.OptionLabel" ) 171 </p> 172 </div> 173 } 174 @if ( !string.IsNullOrWhiteSpace( GetString( "Ecom:Product.CategoryField.Cases_Wood_Flooring.WoodType.Value" ) ) ) 175 { 176 <div class="col-6"> 177 <h3> 178 @GetString( "Ecom:Product.CategoryField.Cases_Wood_Flooring.WoodType.Label" ) 179 </h3> 180 <p> 181 @GetString( "Ecom:Product.CategoryField.Cases_Wood_Flooring.WoodType.OptionLabel" ) 182 </p> 183 </div> 184 } 185 @if ( !string.IsNullOrWhiteSpace( GetString( "Ecom:Product.CategoryField.Cases_Wood_Flooring.Finish.Value" ) ) ) 186 { 187 <div class="col-6"> 188 <h3> 189 @GetString( "Ecom:Product.CategoryField.Cases_Wood_Flooring.Finish.Label" ) 190 </h3> 191 <p> 192 @GetString( "Ecom:Product.CategoryField.Cases_Wood_Flooring.Finish.OptionLabel" ) 193 </p> 194 </div> 195 } 196 @if ( !string.IsNullOrWhiteSpace( GetString( "Ecom:Product.CategoryField.Cases_Wood_Flooring.Segment.Value" ) ) ) 197 { 198 <div class="col-6"> 199 <h3> 200 @GetString( "Ecom:Product.CategoryField.Cases_Wood_Flooring.Segment.Label" ) 201 </h3> 202 <ul class="material-icons-ul mt-0 mb-1"> 203 @{ 204 string[] detailsSpecialProps = GetString( "Ecom:Product.CategoryField.Cases_Wood_Flooring.Segment.OptionLabel" ).Split( ',' ); 205 } 206 @foreach ( string prop in detailsSpecialProps ) 207 { 208 if ( prop != "" ) 209 { 210 <li><i class="material-icons">check</i>@prop</li> 211 } 212 } 213 </ul> 214 </div> 215 } 216 </div> 217 </div> 218 @if ( !string.IsNullOrWhiteSpace( GetString( "Ecom:Product.LongDescription" ) ) ) 219 { 220 <div class="col-12 col-md-8"> 221 <div class="e-product-text-container mt-1 @(isRequestingPDF ? "pb-0" : "pb-2")"> 222 @GetString( "Ecom:Product.LongDescription" ) 223 </div> 224 </div> 225 } 226 </div> 227 } 228 </div> 229 </div> 230 @sectionEnd() 231 232 @sectionStart( "e-section p-section-bg-white px-0 mt-auto " + (isRequestingPDF ? "py-0" : "") ) 233 <div class="e-product js-e-product junckers-product-case-description col-12 px-0" data-pdf="@GetString( "Ecom:Product:Field.DocumentationPdf.Value" )"> 234 <div class="e-product-image-container mb-0"> 235 <div class="junckers-product-image-container col-12"> 236 <div class="row"> 237 238 <div class="col-6 col-md-4 @(isRequestingPDF ? "px-1 mb-1" : "px-2 mb-4")" data-toggle="modal" data-target="#js-e-product-image-modal" data-slide-to="0"> 239 <span class="junckers-case-image" style="background-image: url(/admin/public/getimage.ashx?Crop=0&Image=@GetValue( "Ecom:Product.ImageDefault.Default.Clean" )&Format=jpg&Width=500&Height=&Quality=90)"></span> 240 </div> 241 242 @foreach ( ElementWithIndex<Detail> image in details.Where( d => d.GroupId == 1 ).WithIndex() ) 243 { 244 if ( !isRequestingPDF || (isRequestingPDF && image.Index < 2) ) 245 { 246 <div class="col-6 col-md-4 @(isRequestingPDF ? "px-1 mb-1" : "px-2 mb-4")" data-toggle="modal" data-target="#js-e-product-image-modal" data-slide-to="@( image.Index + 1 )"> 247 <span class="junckers-case-image" style="background-image: url(/admin/public/getimage.ashx?Crop=0&Image=@(image.Element.Value)&Format=jpg&Width=500&Height=&Quality=75)"></span> 248 </div> 249 } 250 } 251 </div> 252 @if(isRequestingPDF) 253 { 254 <div class="row"> 255 <div class="col-2 mx-auto text-center"> 256 <a href="/"> 257 <img src="@logoPrimary" class="p-img"> 258 </a> 259 </div> 260 </div> 261 } 262 </div> 263 </div> 264 265 <div class="modal modal-fullscreen fade e-product-image-modal" id="js-e-product-image-modal" data-backdrop="false" data-keyboard="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-body"> <button type="button" class="close" data-dismiss="modal"> <i class="material-icons">close</i> </button> <div id="js-e-product-image-modal-carousel" class="carousel slide" data-keyboard="true" data-interval="false"> <div class="carousel-inner"> @if ( !details.Any() ) { <div class="carousel-item active" style="background-image:url(/admin/public/getimage.ashx?Crop=0&Image=@GetValue( "Ecom:Product.ImageLarge.Clean" )&Format=jpg&Width=&Height=1800&Quality=90)"> </div> } @foreach ( ElementWithIndex<Detail> image in details.WithIndex() ) { string activeClass = image.Index == 0 ? "active" : string.Empty; <div class="carousel-item @activeClass" style="background-image:url(/admin/public/getimage.ashx?Crop=0&Image=@(image.Element.Value)&Format=jpg&Width=&Height=1800&Quality=90)"> </div> } </div> @{ int CarouselModalItemLoopCounter = 1; } @foreach ( ElementWithIndex<Detail> imageIndicator in details.WithIndex() ) { if ( CarouselModalItemLoopCounter == 1 ) { if ( !string.IsNullOrEmpty( imageIndicator.Element.Value ) ) { <ol class="carousel-indicators"> @if ( !details.Any() ) { <li data-target="#js-e-product-image-modal-carousel" data-slide-to="0" class="active"> <span style="background-image: url(/admin/public/getimage.ashx?Crop=0&Image=@( imageIndicator.Element.Value )&Format=jpg&Width=50&Height=&Quality=90)"></span> </li> } @foreach ( ElementWithIndex<Detail> image in details.WithIndex() ) { string activeClass = image.Index == 0 ? "active" : string.Empty; <li class="@activeClass" data-target="#js-e-product-image-modal-carousel" data-slide-to="@( image.Index + 1 )"> <span style="background-image: url(/admin/public/getimage.ashx?Crop=0&Image=@(image.Element.Value)&Format=jpg&Width=50&Height=&Quality=75)"></span> </li> } </ol> <a class="carousel-control-prev" data-target="#js-e-product-image-modal-carousel" data-slide="prev"></a> <a class="carousel-control-next" data-target="#js-e-product-image-modal-carousel" data-slide="next"></a> } CarouselModalItemLoopCounter++; } } </div> </div> </div> </div> </div> 266 </div> 267 @sectionEnd() 268 269 @* @foreach ( LoopItem group in GetLoop( "ProductRelatedGroups" ) ) *@ 270 @* { *@ 271 @* @ProductRelatedProducts( *@ 272 @* heading: group.GetString( "Ecom:Product:RelatedGroup.Name" ), *@ 273 @* productLoop: group.GetLoop( "RelatedProducts" ).Take( 4 ) *@ 274 @* ) *@ 275 @* } *@ 276 277 278 279 <script type="application/ld+json"> 280 { 281 "@@context" : "http://schema.org", 282 "@@type" : "Product", 283 "category" : "@groupService.GetGroup(primaryGroupID).Name", 284 "description" : "@GetString("Ecom:Product.LongDescription").StripHtml()", 285 "mpn" : "@GetString("Ecom:Product.Number").StripHtml()", 286 "name" : "@GetString("Ecom:Product.Name").StripHtml()", 287 "image" : "@( GetGlobalValue( "Global:Request.Scheme" ) + "://" + GetGlobalValue( "Global:Request.Host" ) + GetString("Ecom:Product.ImageLarge.Clean") )", 288 "offers" : { 289 "@@type" : "Offer", 290 "availability" : "http://schema.org/InStock", 291 "price" : "@GetDouble("Ecom:Product.Price.Price")", 292 "priceCurrency" : "@EcomContext.Currency.Code" 293 } 294 } 295 </script> 296 297 298 <code class="js-e-breadcrumb-item-append" data-text="@HttpUtility.HtmlAttributeEncode( GetString( "Ecom:Product.Name" ) )" data-link="@HttpUtility.HtmlAttributeEncode( ProductService.Instance.GetProductLink( GetString( "Ecom:Product.PrimaryOrFirstGroupID" ), GetString( "Ecom:Product.ID" ) ) )"></code> 299 300
keyboard_arrow_up



picture_as_pdf