Error executing template "Designs/RizzoDesignFolder/eCom/Product/ProductRedirect.cshtml"
System.ArgumentOutOfRangeException: Year, Month, and Day parameters describe an un-representable DateTime.
   at System.DateTime.DateToTicks(Int32 year, Int32 month, Int32 day)
   at System.DateTime..ctor(Int32 year, Int32 month, Int32 day)
   at Co3.JUC.Website.Services.ViewService.IsActive(Int32 productMonth, Int32 productYear, Int32 productDay) in C:\Git\Frontend\juc-frontend\Co3.JUC.Website\Services\ViewService.cs:line 26
   at CompiledRazorTemplates.Dynamic.RazorEngine_e073d087b86d4986a4e378a88fc7b5c7.Execute() in E:\Dynamicweb.NET\Solutions\dw9live.juc.dk\Files\Templates\Designs\RizzoDesignFolder\eCom\Product\ProductRedirect.cshtml:line 129
   at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader)
   at RazorEngine.Templating.RazorEngineCore.RunTemplate(ICompiledTemplate template, TextWriter writer, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.DynamicWrapperService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.b__0(TextWriter writer)
   at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
   at RazorEngine.Templating.RazorEngineServiceExtensions.RunCompile(IRazorEngineService service, String name, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineServiceExtensions.RunCompile(IRazorEngineService service, ITemplateSource templateSource, String name, Type modelType, Object model, DynamicViewBag viewBag)
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()

1 @inherits RazorTemplateBase<RazorTemplateModel<Template>> @using Dynamicweb.Rendering; @inherits Dynamicweb.Rendering.RazorTemplateBase< Dynamicweb.Rendering.RazorTemplateModel< Dynamicweb.Rendering.Template > > @using System.Dynamic @using System.Globalization @using System.Text.RegularExpressions @using Co3.JUC.Website.Models.Frontend @using Co3.JUC.Website.Services @using Dynamicweb.Frontend @using Dynamicweb.Ecommerce.Products @using Dynamicweb.Admin @using System.Web @{ var areaItem = Pageview.Area.Item; bool isLoggedIn = Dynamicweb.Security.UserManagement.User.IsExtranetUserLoggedIn(), productIsFavorite = GetBoolean( "Ecom:Product.IsProductInFavoriteList" ); string areaid = Pageview.GlobalTags.GetTagByName( "Global:Area.ID" ).Value, currentPageId = Pageview.ID.ToString(), variantDefaultId = GetString( "Ecom:Product.DefaultVariantComboID" ), variantCurrentId = GetString( "Ecom:Product.VariantID" ), variantId = !string.IsNullOrEmpty( variantCurrentId ) ? variantCurrentId : variantDefaultId, titleKey = "title", title = "", imageKey = "image", image = "", stockStatus = GetInteger( "Ecom:Product.Stock" ) > 0 ? "fa-check" : "fa-close", stockStatusID = GetString( "Ecom:Product:Stock.ID" ), productId = GetString( "Ecom:Product.ID" ), productLanguage = GetString( "Ecom:Product.LanguageID" ), productName = GetString( "Ecom:Product.Name" ), productNumber = GetString( "Ecom:Product.Number" ).Trim(), pattern = "", productImage = ViewService.Instance.GetImagePathUrl( GetString( "Ecom:Product.ImageSmall.Clean" ), GetString( "Ecom:Product.ImageMedium.Clean" ), GetString( "Ecom:Product.ImageLarge.Clean" ), pattern ), productGetImage = ViewService.Instance.GetImage( productImage, 0, 600 ), imagePattern = "/Files/Images/SocialeMedier/" + productNumber + ".jpg", standardProdImg = "/Files/Templates/Designs/RizzoDesignFolder/images/JUC_logo.png", productIntro = GetString( "Ecom:Product.MetaDescription" ).Replace( "\"", "" ), productDescription = GetString( "Ecom:Product.LongDescription" ), pointPrice = GetString( "Ecom:Product.PointPrice" ), productDetails = GetString( "Ecom:Product:Field.Details.Value.Clean" ), productTags = GetString( "Ecom:Product:Field.tags" ), productWarranty = GetString( "Ecom:Product:Field.Warranty.Value.Clean" ), ShowFoaLogo = GetString( "Ecom:Product:Field.ShowFoaLogo.Value.Clean" ), productPrice = GetString( "Ecom:Product.Price.PriceWithoutVAT" ).Replace( ",00", "" ), currency = GetString( "Ecom:Product.Price.Currency.Symbol" ), currencyCode = GetString( "Ecom:Order.Price.CurrencyCode" ), productPriceDB = GetString( "Ecom:Product.DBPrice" ), productRemoveFromList = "/Default.aspx?Id=" + currentPageId + "&amp;ProductID=" + productId + "&amp;CCRemoveFromMyLists=" + productId + "&amp;CCRemoveFromListVariantID=" + variantId + "&amp;CCRemoveFromListLanguageID=" + productLanguage, productAddToList = "/Default.aspx?Id=" + currentPageId + "&amp;ProductID=" + productId + "&amp;CCAddToMyLists=" + productId + "&amp;CCAddToListVariantID=" + variantId + "&amp;CCAddToListLanguageID=" + productLanguage, favoriteUrl = productIsFavorite ? productRemoveFromList : productAddToList, // Filter for downloads item downloadsFilter = "Products contains 'p_" + productId + ",' or Products contains 'p_" + productId + ":' or Products ends with 'p_" + productId + "'", nrLectures = GetString( "Ecom:Product:Field.Lectures.Value.Clean" ), nrLecturesDecimal = GetString( "Ecom:Product:Field.LecturesDecimal.Value.Raw" ), video = GetString( "Ecom:Product:Field.video.FullPath" ), poster = GetString( "Ecom:Product:Field.poster.FullPath" ), groupId = GetString( "Ecom:Product.PrimaryOrFirstGroupID" ), parentGroupId = groupId, pageGroupUrl = String.Format( "/Default.aspx?Id={0}&amp;groupid={1}#open", currentPageId, parentGroupId ), pageGroupPrimaryPageUrl = "", stock = GetString( "Ecom:Product:Stock.Text" ), nrDay = GetString( "Ecom:Product:Field.Day.Value.Clean" ), nrMonth = GetString( "Ecom:Product:Field.Month.Value.Clean" ), nrYear = GetString( "Ecom:Product:Field.Year.Value.Clean" ), nrAdress = GetString( "Ecom:Product:Field.locationEvent.Value.Clean" ), /* HUAH: old one*/ courseEventLocation = GetString( "Ecom:Product:Field.LokationAfBegivenhed.Value.Clean" ), OpenGraphTitle = GetString( "Ecom:Product:Field.OpenGraphTitle.Value.Clean" ), OpenGraphDescription = GetString( "Ecom:Product:Field.OpenGraphDescription.Value.Clean" ), OpenGraphImage = GetString( "Ecom:Product:Field.OpenGraphImage2.Value" ), stockNumber = GetString( "Ecom:Product.Stock" ), VimeoId = GetString( "Ecom:Product:Field.vimeoid" ), VimeoSettings = "", exceeded = string.Empty, VideoImage = GetString( "Ecom:Product:Field.VideoOverlayImage.Clean" ).Replace( "../", "Files/" ), VideoOverlayImage = "Admin/Public/GetImage.ashx?Image=" + VideoImage + "&Format=jpg&Width=700&Height=394&Compression=90&Crop=0", topBanner = GetString( "Ecom:Product:Field.ecomtopbanner.Clean" ), topBannerImg = "Admin/Public/GetImage.ashx?Image=" + topBanner + "&Format=jpg&Width=1366&Height=297&Compression=90&Crop=0"; if ( string.IsNullOrEmpty( VideoImage ) ) { VimeoSettings = "?autoplay=1&loop=1&autopause=0&muted=1"; } int stockNumberInt = Int32.Parse( stockNumber ); bool hideDateOnDetail = GetBoolean( "Ecom:Product:Field.HideDateOnDetail.Value" ); string firstActivityStartDate = ""; string firstActivityEndDate = ""; string lastActivityEndDate = ""; string weekday = ""; string weekdayKey = ""; string weekdayEnd = ""; string weekdayEndKey = ""; var nrCompleteDate = nrDay + "/" + nrMonth + "/" + nrYear; DateTime productFieldDateStart = DateTime.Now; var imagesList = new List< Dictionary< string, string > >(); var relatedGroupsList = GetLoop( "ProductRelatedGroups" ); var currentGroup = Dynamicweb.Ecommerce.Services.ProductGroups.GetGroup( groupId, productLanguage ); string parentGroupName = currentGroup.Name; var parentGroups = currentGroup.ParentGroupsDefaultLanguage; if ( parentGroups.Any() ) { var parentGroup = parentGroups.FirstOrDefault(); parentGroupId = parentGroup.Id.ToString(); parentGroupName = parentGroup.Name; pageGroupUrl = String.Format( "/Default.aspx?Id={0}&amp;groupid={1}#open", currentPageId, parentGroupId ); pageGroupPrimaryPageUrl = parentGroup.Meta.PrimaryPage.ToString(); } var productCanonical = GetGlobalValue( "Global:Request.Scheme" ) + "://" + GetGlobalValue( "Global:Request.Host" ) + GetGlobalValue( "Global:Pageview.Url" ); var productMetaTitle = GetString( "Ecom:Product.Name" ); var productMetaDescription = GetString( "Ecom:Product.MetaDescription" ); var shareWithEmailBody = Translate( "shareWithEmailBody", "Jeg anbefaler dig at kigge på denne side:" ); var productType = GetString( "Ecom:Product.CategoryField.Product.Type.Value" ); var productDay = 0; var productMonth = 0; var productYear = 0; productDay = GetInteger( "Ecom:Product:Field.Day.Value" ); productMonth = GetInteger( "Ecom:Product:Field.Month.Value" ); productYear = GetInteger( "Ecom:Product:Field.Year.Value" ); var courseIsActive = ViewService.Instance.IsActive( productMonth, productYear, productDay ); @* bool courseIsActive = GetBoolean( "Ecom:Product.IsActive" ); *@ bool maskClassActive = false; if ( GetString( "Ecom:Product:Field.ShowFoaLogo.Value" ) == "True" ) { maskClassActive = true; } string productID = GetString( "Ecom:Product.ID" ), cartType = ""; if ( productID == "PROD2806" || productID == "PROD2807" ) { cartType = "subscribe"; } else { cartType = "regular"; } } @if ( topBanner != "" ) { <style> #contentWrapper > #intro { background-image: url("@topBannerImg") !important; } </style> } @if ( GetInteger( "Ecom:Product.PrimaryOrCurrentPageID" ) != Pageview.ID ) { var redirect = "/Default.aspx?ID=" + GetString( "Ecom:Product.PrimaryOrCurrentPageID" ) + "&ProductID=" + GetString( "Ecom:Product.ID" ); if ( !string.IsNullOrEmpty( HttpContext.Current.Request.QueryString[ "variantID" ] ) ) { redirect += "&variantID=" + HttpContext.Current.Request.QueryString[ "variantID" ]; } HttpContext.Current.Response.Redirect( SearchEngineFriendlyURLs.GetFriendlyUrl( redirect ) ); } else if ( !String.IsNullOrEmpty( pageGroupPrimaryPageUrl ) ) { var currentPageUrl = "Default.aspx?Id=" + Pageview.ID; if ( currentPageUrl.ToLower() != pageGroupPrimaryPageUrl.ToLower() ) { pageGroupPrimaryPageUrl = pageGroupPrimaryPageUrl + "&ProductID=" + GetString( "Ecom:Product.ID" ); HttpContext.Current.Response.Redirect( SearchEngineFriendlyURLs.GetFriendlyUrl( pageGroupPrimaryPageUrl ) ); } } @SnippetStart( "productTracking" ) <script> fbq('track', 'ViewContent', { content_name: '@productName', content_ids: ['@productId'], content_type: 'product', value: @productPriceDB, currency: 'DKK' }); </script> @SnippetEnd( "productTracking" ) <div id="product-container" data-pageId="@currentPageId" data-productId="@productId" data-variantId="@variantId" data-errorCombination1='@Translate( "combinationNotAvailable", "Kombinationen findes ikke" )'> <article class="col-xs-12 noPadding" id="product-description"> <div class="col-sm-8 col-xs-12 noPaddingLeft product-column" id="leftSide"> <div> <div class="smartbuttons"> <a href="javascript:window.print();" id="smart_print"></a> </div> <h2>@productName</h2> @if ( GetString( "Ecom:Product:Field.ShowFoaLogo.Value" ) == "True" ) { <div class="mask maskLeft"> <a href="@Translate( "FaoLogoLink", "/default.aspx?id=591" )"> <img alt="" src="/Files/Templates/Designs/RizzoDesignFolder/images/foalogo_small.png" width="120px" /> </a> </div> } @if ( !string.IsNullOrEmpty( VimeoId ) ) { <div class="embed-container js-juc-vimeo-container"> @if ( !string.IsNullOrEmpty( VideoImage ) ) { <script> jQuery(".js-juc-vimeo-container").addClass("play"); </script> <style> .embed-container { background-image: url(@VideoOverlayImage); margin-top: 30px; } .embed-container iframe, .embed-container object, .embed-container embed { visibility: hidden; } </style> } <iframe src="https://player.vimeo.com/video/@VimeoId@VimeoSettings" data-cookieconsent="marketing" width="100%" class="js-juc-vimeo-video" id="myVideo" height="500px" allow="autoplay; fullscreen" allowfullscreen></iframe> </div> } @if ( !String.IsNullOrEmpty( productImage ) ) { <div id="product-image"> <figure> <img class="img-responsive" src="@productGetImage" alt="@productName" title="@productName" /> </figure> </div> } <div id="product-description"> @if ( !String.IsNullOrEmpty( video ) ) { <video id="video" width="100%" preload controls poster="@poster" onclick="this.play();"> <source src="@video" type="video/mp4"> Din browser understøtter ikke video. </video> } <br /> @productDescription </div> </div> @if ( !string.IsNullOrEmpty( productTags ) ) { <div class="productTags" title="@productTags"><p><span>Tags:</span> @productTags</p></div> } @if ( GetString( "Ecom:Product:Field.ShowIAPPLogo.Value" ) == "True" && areaid == "1" ) { <div class="custom-global-content iapp-wrapper col-lg-12"> @RenderPageContent( 6502 ) </div> } @if ( GetString( "Ecom:Product:Field.ShowIAPPLogo.Value" ) == "True" && areaid == "9" ) { <div class="custom-global-content iapp-wrapper col-lg-12"> @RenderPageContent( 6983 ) </div> } @if ( GetString( "Ecom:Product:Field.ShowIAPPLogo.Value" ) == "True" && areaid == "8" ) { <div class="custom-global-content iapp-wrapper col-lg-12"> @RenderPageContent( 6984 ) </div> } @if ( GetString( "Ecom:Product:Field.ShowIAPPLogo.Value" ) == "True" && areaid == "5" ) { <div class="custom-global-content iapp-wrapper col-lg-12"> @RenderPageContent( 6985 ) </div> } <div class="custom-global-content share-wrapper col-lg-12"> <h2><strong>@Translate( "shareSoMeHeader", "Share" )</strong></h2> <div class="share-wrapper-inner"> <ul class="social-inner"> <li class="facebook"> <a class="dk-share" href="https://www.facebook.com/sharer/sharer.php?u=@productCanonical" title="Share on Facebook" alt="Share on Facebook" target="_blank"> <img alt="Facebook Icon" src="/Files/Images/Icons/facebook.png"> <p class="share-text">Facebook</p> </a> </li> <li class="linkedin"> <a class="dk-share" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=@productCanonical&amp;title=@productMetaTitle&amp;summary=@productMetaDescription" title="Share on LinkedIn" alt="Share on LinkedIn" target="_blank"> <img alt="LinkedIn Icon" src="/Files/Images/Icons/linkedin.png"> <p class="share-text">LinkedIn</p> </a> </li> <li class="epost"> <a class="share-email" href="mailto:?subject=@productMetaTitle&amp;body=@shareWithEmailBody @productCanonical" title="Share with e-mail"> <img alt="Email Icon" src="/Files/Images/Icons/email.png"> <p class="share-text">E-mail</p> </a> </li> </ul> </div> </div> </div> <div id="rightSide" class="col-xs-12 col-sm-4 product-column noPaddingRight @stockStatusID"> @if ( stockStatusID != "STOCKSTATUS3" ) { <form name="addToCart" class="add-to-cart form-fields hidden-lg hidden-md hidden-sm" action="@SearchEngineFriendlyURLs.GetFriendlyUrl( currentPageId )" method="post" data-outofstock='@Translate( "outOfStock", "Out of stock" )'> <input name="cartcmd" type="hidden" value="add" /> <input type="hidden" name="productID" value="@productId" /> <input name="EcomOrderLineFieldInput_dateNow" type="hidden" value="" /> <input name="EcomOrderLineFieldInput_customerName" type="hidden" value="" /> <input name="EcomOrderLineFieldInput_email" type="hidden" value="" /> <input name="EcomOrderLineFieldInput_title" type="hidden" value="" /> <input type="hidden" name="EcomOrderLineFieldInput_MaterialIDSystem" value="" class="@productNumber" /> <input name="EcomOrderLineFieldInput_participate" type="hidden" value="" /> <textarea class="js-courseActivities" name="EcomOrderLineFieldInput_courseActivities" style="display:none"></textarea> <textarea class="js-courseLocation" name="EcomOrderLineFieldInput_courseLocation" style="display:none"></textarea> <a class="addToCartSubmit" href="javascript:void(0);" data-add='@Translate( "addToCart", "Læg i kurven" )' data-added='@Translate( "added", "Lagt til" )' data-cart-type="@cartType"> <img class="addToCartIcon" src="/files/templates/designs/rizzodesignfolder/images/svgicons/cart.svg"> @Translate( "addToCart_" + productType, "Læg i kurven" ) @cartType </a> <input class="hidden" type="submit" value='@Translate( "addToCart" )' /> </form> } <div style="float: left; width: 100%; overflow: hidden;"> @if ( productType != "Elearning" ) { <div style="@( courseIsActive ? "" : "hide" )"> <h3>@Translate( "keepMedUpdatedHeader", "Hold mig opdateret" )</h3> <p class="keepMeUpdated_text">@Translate( "keepMeUpdatedProductText", "Er du nysgerrig og vil vide mere?" )</p> <p class="keepMeUpdatedIntro" style="display: none">@Translate( "keepMeUpdatedIntro", "" )</p> </div> <div id="keepMeUpdated_course"> <h3 style="@( courseIsActive ? "" : "hide" )" class="expand" id="keepMeUpdated_header">@Translate( "keepMedUpdatedButton", "Hold mig opdateret" )</h3> <div class="expandItem" id="keepMeUpdated_form" style="display: none"> @if ( areaid == "1" ) { @RenderParagraphContent( 761 ) ; } @if ( areaid == "9" ) { @RenderParagraphContent( 764 ) ; } @if ( areaid == "8" ) { @RenderParagraphContent( 763 ) ; } @if ( areaid == "5" ) { @RenderParagraphContent( 762 ) ; } </div> </div> } @if ( areaid == "1" ) { @*Skriv mig op - Inaktive kurser*@ if ( !courseIsActive ) { <script>$('.add-to-cart').remove(); </script> } <h3 class="@( courseIsActive ? "hide" : "" )">@Translate( "Skriv mig op", "Skriv mig op" )</h3> <div class="@( courseIsActive ? "hide" : "" ) @( GetString( "Ecom:Product:Field.ShowFoaLogo.Value" ) == "True" ? "maskActiveClass" : "" )"> <p>@Translate( "Kurset er afholdt", "Kurset er afholdt, men hvis du er interesseret i at det genopsættes, så giv os besked. Klik på ”Skriv mig op” herunder og udfyld felterne." )</p> <p>&nbsp;</p> </div> <div id="signup_course"> <h3 class="@( courseIsActive ? "hide" : "" ) expand" id="signup_header">@Translate( "Skriv mig op", "Skriv mig op" )</h3> <div class="expandItem" id="signup_form" style="display: none"> @*Hidden signup form extranet + Forms for editors*@ @RenderParagraphContent( 744 ) @RenderParagraphContent( 748 ) <p>&nbsp;</p> </div> </div> } @*Lagerstatus = antal pladser*@ @if ( !String.IsNullOrEmpty( stock ) ) { if ( stockStatusID == "STOCKSTATUS3" ) { if ( areaid == "1" || areaid == "9" ) { @*Tilmeld venteliste - Aktive kurser*@ var styleDisplayWaitinglist = "display:block"; if ( courseIsActive ) { styleDisplayWaitinglist = "display:block"; } else { styleDisplayWaitinglist = "display:none"; } <h3 style="@styleDisplayWaitinglist" class="@stockStatusID">@Translate( "WaitinglistHeader", "Tilmeld venteliste" )</h3> <div style="@styleDisplayWaitinglist"> <p>@Translate( "WaitinglistIntro", "Aktiviteten er fyldt. Skriv dig hurtigt og nemt på ventelisten og kom foran, hvis der bliver en plads ledig." )</p> <p>&nbsp;</p> </div> <div id="Waitinglist_course"> <h3 style="@styleDisplayWaitinglist" id="Waitinglist_header" class="expand">@Translate( "WaitinglistButton", "Tilmeld venteliste" )</h3> <div class="expandItem" id="Waitinglist_form" style="display: none"> @if ( areaid == "1" ) { @RenderParagraphContent( 774 ) <p>&nbsp;</p> } @if ( areaid == "9" ) { @RenderParagraphContent( 785 ) <p>&nbsp;</p> } </div> </div> } } else if ( stockStatusID == "STOCKSTATUS2" && stockNumberInt < 8 ) { <h3>OBS!</h3> <p> @stock</p> <p>&nbsp;</p> } } @if ( !String.IsNullOrEmpty( nrLectures ) && ( nrLectures != "0" ) ) { <h3> @Translate( "lectures" ) </h3> if ( !String.IsNullOrEmpty( nrLecturesDecimal ) && nrLecturesDecimal != "0" ) { <p>@nrLecturesDecimal</p> } else { <p>@nrLectures</p> } <p>&nbsp;</p> } @if ( GetString( "Ecom:Product:Field.newDateFIelds.Value" ) == "True" ) { <div class="e-com-product-details e-com-product-field"> @{ Product product = Dynamicweb.Ecommerce.Services.Products.GetProductById( GetString( "Ecom:Product.ID" ), GetString( "Ecom:Product.VariantID" ), GetString( "Ecom:Product.LanguageID" ) ); String CurrentHeadline = GetString( "Ecom:Product:Field.outgoingHeadline.Value" ); String CurrentExtra = GetString( "Ecom:Product:Field.outgoingExtra.Value" ); object fieldOutgoingStartDate = product.GetProductFieldValue( "outgoingStartDate" ); object fieldOutgoingEndDate = product.GetProductFieldValue( "outgoingEndDate" ); DateTime CurrentStartDate = DateTime.MinValue; DateTime CurrentEndDate = DateTime.MinValue; if (fieldOutgoingStartDate != null) { DateTime.TryParse( fieldOutgoingStartDate.ToString(), out CurrentStartDate ); } if (fieldOutgoingEndDate != null) { DateTime.TryParse( fieldOutgoingEndDate.ToString(), out CurrentEndDate ); } string activityPrefix = "season01Activity"; IEnumerable<ProductFieldValue> fields = product.ProductFieldValues.Where( pfv => pfv.ProductField.SystemName.StartsWith( activityPrefix ) ); List< ActivityDay > activityDays = ActivityService.Instance.GetActivityDays( GetString( "Ecom:Product.ID" ), GetString( "Ecom:Product.VariantID" ), GetString( "Ecom:Product.LanguageID" ) ); weekday = CurrentStartDate.ToString( "dddd" ); weekdayKey = GetGlobalValue("Global:Area.LongLang") + "-WeekDay-" + CurrentStartDate.ToString( "dddd" ); weekdayEnd = CurrentEndDate.ToString( "dddd" ); weekdayEndKey = GetGlobalValue("Global:Area.LongLang") + "-WeekDagEnd-" + CurrentEndDate.ToString( "dddd" ); <div class="CustomCouseActivity"> @if ( activityDays.Count > 1 ) { <div class="courseLocation"> <p> @courseEventLocation </p> <br /> </div> } @if ( CurrentHeadline != "" && CurrentEndDate >= DateTime.Now ) { if ( !hideDateOnDetail ) { <div class="first-letter"> <h3>@CurrentHeadline</h3> @if ( CurrentStartDate.Date == CurrentEndDate.Date ) { <p>@Translate( weekdayKey, weekday ) d. @CurrentStartDate.ToString( "d. MMMM yyyy" )</p> <p>Kl. @CurrentStartDate.ToString( "HH:mm" ) - @CurrentEndDate.ToString( "HH:mm" )</p> } else { <p>Fra @Translate( weekdayKey, weekday ) d @CurrentStartDate.ToString( "d. MMMM yyyy" ) <br /> kl. @CurrentStartDate.ToString( "HH:mm" ) <br /> Til @Translate( weekdayEndKey, weekdayEnd ) d. @CurrentEndDate.ToString( "d. MMMM yyyy" ) kl. @CurrentEndDate.ToString( "HH:mm" ) </p> } <p>@CurrentExtra</p> </div> <br /> <h3>@Translate( "MeetingNexSeason", "Møder i næste sæson" )</h3> <br /> } } @foreach ( ActivityDay day in activityDays ) { exceeded = day.StartTime <= DateTime.Now ? "exceeded" : "active"; weekday = day.StartTime.ToString( "dddd" ); weekdayKey = GetGlobalValue("Global:Area.LongLang") + "-WeekDay-" + day.StartTime.ToString( "dddd" ); weekdayEnd = day.EndTime.ToString( "dddd" ); weekdayEndKey = GetGlobalValue("Global:Area.LongLang") + "-WeekDagEnd-" + day.EndTime.ToString( "dddd" ); if(!hideDateOnDetail) { <div class="first-letter @exceeded"> <strong>@day.HeadLine</strong><br /> @if ( day.StartTime.Date >= day.EndTime.Date ) { <p>@Translate( weekdayKey, weekday )@Translate("courseDateShort", " d") @day.StartTime.ToString( "d. MMMM yyyy" )</p> <p>@if( areaid != "9" ) {@Translate("courseTimeShort", "Kl")} @day.StartTime.ToString( "HH:mm" ) - @day.EndTime.ToString( "HH:mm" ) @if( areaid == "9" ) {@Translate("courseTimeShort", "Kl")}</p> } else { <p>@Translate("Fra", "Fra") @Translate( weekdayKey, weekday )@Translate("dateShort", " d") @day.StartTime.ToString( "d. MMMM yyyy" ) <br /> @if( areaid != "9" ) {@Translate("courseTimeShort", "Kl")} @day.StartTime.ToString( "HH:mm" )@if( areaid == "9" ) {@Translate("courseTimeShort", "Kl")} <br /> @Translate("Til", "Til") @Translate( weekdayEndKey, weekdayEnd ) @Translate("dateShort", "d") @day.EndTime.ToString( "d. MMMM yyyy" ) @if( areaid != "9" ) {@Translate("courseTimeShort", "Kl")} @day.EndTime.ToString( "HH:mm" )@if( areaid == "9" ) {@Translate("courseTimeShort", "Kl")} </p> } <p>@day.Extra</p> </div> <br /> } if ( firstActivityStartDate == "" && exceeded == "" ) { firstActivityStartDate = day.StartTime.ToString( "dd-MM-yyyy" ) + " " + day.StartTime.ToString( "HH:mm" ); firstActivityEndDate = day.EndTime.ToString( "dd-MM-yyyy" ) + " " + day.EndTime.ToString( "HH:mm" ); } } @if ( firstActivityStartDate == "" ) { ActivityDay lastActivitiday = activityDays.LastOrDefault(); if ( lastActivitiday != null ) { firstActivityStartDate = lastActivitiday.StartTime.ToString( "dd-MM-yyyy" ) + " " + lastActivitiday.StartTime.ToString( "HH:mm" ); firstActivityEndDate = lastActivitiday.EndTime.ToString( "dd-MM-yyyy" ) + " " + lastActivitiday.EndTime.ToString( "HH:mm" ); } } @if ( activityDays.Count == 1 ) { <div class="courseLocation"> <br /> <p> @courseEventLocation </p> </div> } </div> // some of this is old Schema and some is new. It might need to be replaced SnippetStart( "organizationEvent" ); string eventName = GetString( "Ecom:Product.Name" ), eventURL = GetGlobalValue( "Global:Request.Scheme" ) + "://" + GetGlobalValue( "Global:Request.Host" ) + GetGlobalValue( "Global:Pageview.Url" ); DateTime productFieldDateStartMonth = activityDays.Any() ? activityDays.FirstOrDefault().StartTime : DateTime.MinValue; //DateTime.ParseExact(firstActivityStartDate, "dd-MM-yyyy HH:mm", System.Globalization.CultureInfo.InvariantCulture); DateTime productFieldDateEndHour = activityDays.Any() ? activityDays.LastOrDefault().EndTime : DateTime.MaxValue; //DateTime.ParseExact(lastActivityEndDate, "dd-MM-yyyy HH:mm", System.Globalization.CultureInfo.InvariantCulture); dynamic organization = new ExpandoObject(); organization.Name = eventName; organization.Url = eventURL; organization.Description = productIntro; organization.Email = "juc@juc.dk"; organization.Locality = "Danmark"; organization.ZipCode = "1620"; organization.StreetAddress = courseEventLocation.Replace( "<br>", ", " ); organization.Phone = "+45 70 20 82 60"; organization.OpeningHours = ""; organization.PriceRange = productPrice.Replace( ",00", "" ); organization.PriceCurrency = "DKK"; organization.Image = "http://juc.dk" + productGetImage; organization.firstActivityStartDate = firstActivityStartDate; organization.activityEnd = firstActivityEndDate; var organizationEvent = new HtmlString( string.Format( @" {{ ""@context"" : ""http://schema.org"", ""@type"" : ""Event"", ""name"": ""{0}"", ""startDate"": ""{12}"", ""endDate"": ""{13}"", ""location"": {{ ""@type"": ""Place"", ""name"": ""JUC"", ""address"": {{ ""@type"": ""PostalAddress"", ""streetAddress"": ""{6}"", ""addressLocality"": ""{4}"", ""postalCode"": ""{5}"", ""addressRegion"": ""DK"" }} }}, ""image"": [ ""{11}"" ], ""description"": ""{2}"", ""offers"": {{ ""@type"": ""Offer"", ""url"": ""{1}"", ""price"": ""{9}"", ""priceCurrency"": ""DKK"", ""validFrom"": ""{12}"" }}, ""performer"": {{ ""@type"": ""Organization"", ""name"": ""JUC"" }} }} ", organization.Name, // 0 organization.Url, // 1 organization.Description, // 2 organization.Email, // 3 organization.Locality, // 4 organization.ZipCode, // 5 organization.StreetAddress, // 6 organization.Phone, // 7 organization.OpeningHours, // 8 organization.PriceRange, // 9 organization.PriceCurrency, // 10 organization.Image, // 11 organization.firstActivityStartDate, //12 organization.activityEnd //13 ) ); SnippetEnd( "organizationEvent" ); SnippetStart( "organizationCourseCourse" ); dynamic organizationCourse = new ExpandoObject(); organizationCourse.Name = eventName; organizationCourse.Url = eventURL; organizationCourse.Description = productIntro; var organizationCourseCourse = new HtmlString( string.Format( @" {{ ""@context"" : ""http://schema.org"", ""@type"" : ""Course"", ""name"": ""{0}"", ""description"": ""{2}"", ""provider"": {{ ""@type"": ""Offer"", ""name"": ""JUC"", ""SameAs"": ""{1}"" }} }} ", organizationCourse.Name, // 0 organizationCourse.Url, // 1 organizationCourse.Description // 2 ) ); } @SnippetEnd( "organizationCourseCourse" ) <script type="application/ld+json"> @organizationEvent </script> <script type="application/ld+json"> @organizationCourseCourse </script> </div> } @if ( GetString( "Ecom:Product:Field.newDateFIelds.Value" ) == "False" && productType != "Elearning") { <span class="e-com-product-details"> @productDetails </span> <p>&nbsp;</p> } @if ( areaid == "1" && productType == "Course" || productType == "Conference" || productType == "Certificering" || (exceeded == "active" && productType != "Network") ) { string popupTextOneOpt1 = HttpUtility.JavaScriptStringEncode( Translate( "ParticipateSelectOneOpt1", "Du skal vælge afholdelsestypen Klasseundervisning, før du kan lægge kurset i kurven." ) ); string popupTextOneOpt2 = HttpUtility.JavaScriptStringEncode( Translate( "ParticipateSelectOneOpt2", "Du skal vælge afholdelsestypen Fjernundervisning, før du kan lægge kurset i kurven." ) ); string popupTextTwoOrMore = HttpUtility.JavaScriptStringEncode( Translate( "ParticipateSelectTwoOrMore", "Du skal vælge afholdelsestype som enten er Fjernundervisning eller klasseundervisning, før du kan lægge kurset i kurven." ) ); string loopCounter = ""; if ( stockStatusID != "STOCKSTATUS3" ) { if ( productMonth == 3 && productYear == 2020 || productMonth == 4 && productYear == 2020 || productMonth == 5 && productYear == 2020 ) { { string optionTranslate = Translate( "optionInfoDistanceLearning", "Information" ); <div class="course-selector"> <div> <input class="radiobutton" id="DistanceLearning" name="participate" type="radio" value="DistanceLearning"> <label class="radiobutton-label" for="DistanceLearning">Fjernundervisning</label> <span class="tooltip" data-placement="left" data-toggle="tooltip" title="@optionTranslate"> </span> </div> </div> } } else { <div class="course-selector"> @foreach ( LoopItem educationform in GetLoop( "educationform.Options" ) ) { string optionValue = educationform.GetString( "educationform.Option.Value" ); string optionTranslate = Translate( "optionInfo" + optionValue, "Information" ); string courseTranslate = Translate( "optionName" + optionValue, "Course Name" ); bool optionSelected = educationform.GetBoolean( "educationform.Option.IsSelected" ); if ( optionSelected ) { <div> <input type="radio" id="@optionValue" class="radiobutton @optionValue" name="participate" value="@optionValue"> <label class="radiobutton-label" for="@optionValue">@courseTranslate</label> <span class="tooltip" data-toggle="tooltip" data-placement="left" title="@optionTranslate"></span> </div> } } </div> } } <script> var popupTextOneOpt1 = "@popupTextOneOpt1"; var popupTextOneOpt2 = "@popupTextOneOpt2"; var popupTextTwoOrMore = "@popupTextTwoOrMore"; var loopCounter = jQuery('input[name=\'participate\']').length; jQuery(function(){ jQuery('.addToCartSubmit').on('click', function(event) { event.preventDefault(); if (!jQuery('input[name=\'participate\']').is(':checked')) { if( loopCounter == 1 ) { if( jQuery('input[name=\'participate\']').is('.Classroom') ) { alert(popupTextOneOpt1); } else { alert(popupTextOneOpt2); } } else { alert(popupTextTwoOrMore); } return false; } }); }); </script> } @{ string OrderDate = GetString( "Ecom:Product:Field.season01Activity01DateStart" ); string OrderDateOld = GetString( "Ecom:Product:Field.Day.Value" ) + "-" + GetString( "Ecom:Product:Field.Month.Value" ) + "-" + GetString( "Ecom:Product:Field.Year.Value" ); } @if ( productType == "Elearning" ) { <div>@Translate( "VariantInfotext", "Her kan du vælge hvilket produkt du ønsker. Vil du løbe 1 lektion eller have et abonnement?" )</div> } else { <h3>@Translate( "priceDetails" )</h3> <p class="price @productPrice"> @currencyCode @productPrice.Replace( ",00", "" ) </p> } @if ( stockStatusID != "STOCKSTATUS3" && exceeded == "active" ) { if ( productId != "PROD2807" && productId != "PROD2806" ) { <form name="addToCart" class="add-to-cart form-fields hidden-xs" action="@SearchEngineFriendlyURLs.GetFriendlyUrl( currentPageId )" method="post" data-outofstock='@Translate( "outOfStock", "Out of stock" )'> <input name="cartcmd" type="hidden" value="add" /> <input type="hidden" name="productID" value="@productId" /> <input name="EcomOrderLineFieldInput_dateNow" type="hidden" value="" /> <input name="EcomOrderLineFieldInput_customerName" type="hidden" value="" /> <input name="EcomOrderLineFieldInput_email" type="hidden" value="" /> <input name="EcomOrderLineFieldInput_title" type="hidden" value="" /> <input name="EcomOrderLineFieldInput_OrderDate" type="hidden" value="@OrderDate.Remove( 10 )" /> <input name="EcomOrderLineFieldInput_OrderDateOld" type="hidden" value="@OrderDateOld" /> <input type="hidden" name="EcomOrderLineFieldInput_MaterialIDSystem" value="" class="@productNumber" /> <input name="EcomOrderLineFieldInput_participate" type="hidden" value="" /> <textarea class="js-courseActivities" name="EcomOrderLineFieldInput_courseActivities" style="display:none"></textarea> <textarea class="js-courseLocation" name="EcomOrderLineFieldInput_courseLocation" style="display:none"></textarea> @if ( productType != "Elearning" ) { <a class="addToCartSubmit addToCartSubmitDesktop" href="javascript:void(0);" data-add='@Translate( "addToCart", "Læg i kurven" )' data-added='@Translate( "added", "Lagt til" )' data-cart-type="regular"> <img class="addToCartIcon" src="/files/templates/designs/rizzodesignfolder/images/svgicons/cart.svg"> @Translate( "addToCart_" + productType, "Læg I kurven" ) </a> <input class="hidden" type="submit" value='@Translate( "addToCart" )' /> } </form> } } @if ( productType == "Elearning" ) { if ( productId != "PROD2807" && productId != "PROD2806" && productId != "PROD3458" ) { <form name="addToCart" class="add-to-cart form-fields hidden-xs" action="@SearchEngineFriendlyURLs.GetFriendlyUrl( currentPageId )" method="post" data-outofstock='@Translate( "outOfStock", "Out of stock" )'> <input name="cartcmd" type="hidden" value="add" /> <input type="hidden" name="productID" value="@productId" /> <input name="EcomOrderLineFieldInput_dateNow" type="hidden" value="" /> <input name="EcomOrderLineFieldInput_customerName" type="hidden" value="" /> <input name="EcomOrderLineFieldInput_email" type="hidden" value="" /> <input name="EcomOrderLineFieldInput_title" type="hidden" value="" /> <input name="EcomOrderLineFieldInput_OrderDate" type="hidden" value="@OrderDate.Remove( 10 )" /> <input name="EcomOrderLineFieldInput_OrderDateOld" type="hidden" value="@OrderDateOld" /> <input type="hidden" name="EcomOrderLineFieldInput_MaterialIDSystem" value="" class="@productNumber" /> <input name="EcomOrderLineFieldInput_participate" type="hidden" value="" /> <textarea class="js-courseActivities" name="EcomOrderLineFieldInput_courseActivities" style="display:none"></textarea> <textarea class="js-courseLocation" name="EcomOrderLineFieldInput_courseLocation" style="display:none"></textarea> @if ( productType == "Elearning" ) { <a class="addToCartSubmit addToCartSubmitDesktop subscriptionOneLekt" href="javascript:void(0);" data-add='@Translate( "addToCart", "Læg i kurven" )' data-added='@Translate( "added", "Lagt til" )' data-cart-type="regular"> <img class="addToCartIcon" src="/files/templates/designs/rizzodesignfolder/images/svgicons/cart.svg"> @Translate( "1 lektion", "Køb denne lektion" ) </a> <div> @if( GetString( "Ecom:Product:Field.OneLessonPrice" ) != "") { @GetString( "Ecom:Product:Field.OneLessonPrice" ) } else { @Translate( "1 Lekt price", "Pris ekskl. moms kr. 850 stk." ) } </div> <input class="hidden" type="submit" value='@Translate( "addToCart" )' /> } </form> } /* if ( productId != "PROD2806" && productId != "PROD3458" ) { <form name="addToCart" class="add-to-cart form-fields hidden-xs" action="@SearchEngineFriendlyURLs.GetFriendlyUrl( currentPageId )" method="post" data-outofstock='@Translate( "outOfStock", "Out of stock" )'> <input name="cartcmd" type="hidden" value="add" /> <input type="hidden" name="productID" value="PROD2807" /> <input name="EcomOrderLineFieldInput_dateNow" type="hidden" value="" /> <input name="EcomOrderLineFieldInput_customerName" type="hidden" value="" /> <input name="EcomOrderLineFieldInput_email" type="hidden" value="" /> <input name="EcomOrderLineFieldInput_title" type="hidden" value="" /> <input name="EcomOrderLineFieldInput_OrderDate" type="hidden" value="@OrderDate.Remove( 10 )" /> <input name="EcomOrderLineFieldInput_OrderDateOld" type="hidden" value="@OrderDateOld" /> <input type="hidden" name="EcomOrderLineFieldInput_MaterialIDSystem" value="" class="@productNumber" /> <input name="EcomOrderLineFieldInput_participate" type="hidden" value="" /> <textarea class="js-courseActivities" name="EcomOrderLineFieldInput_courseActivities" style="display:none"></textarea> <textarea class="js-courseLocation" name="EcomOrderLineFieldInput_courseLocation" style="display:none"></textarea> <a class="addToCartSubmit addToCartSubmitDesktop subscriptionMonth" href="javascript:void(0);" data-add='@Translate( "addToCart", "Læg i kurven" )' data-added='@Translate( "added", "Lagt til" )' data-cart-type="subscribe"> <img class="addToCartIcon" src="/files/templates/designs/rizzodesignfolder/images/svgicons/cart.svg"> @Translate( "MånedsabonnementButton", "Månedsabonnement" ) </a> <input class="hidden" type="submit" value='@Translate( "addToCart" )' /> <div>@Translate( "MonthSubscriptionPrice", "Pris ekskl. moms kr. 799 pr. md" )</div> </form> } */ if ( productId != "PROD2806" && productId != "PROD2807" ) { <form name="addToCart" class="add-to-cart form-fields hidden-xs" action="@SearchEngineFriendlyURLs.GetFriendlyUrl( currentPageId )" method="post"> <input name="cartcmd" type="hidden" value="add" /> <input type="hidden" name="productID" value="PROD3458" /> <input name="EcomOrderLineFieldInput_dateNow" type="hidden" value="" /> <input name="EcomOrderLineFieldInput_customerName" type="hidden" value="" /> <input name="EcomOrderLineFieldInput_email" type="hidden" value="" /> <input name="EcomOrderLineFieldInput_title" type="hidden" value="" /> <input name="EcomOrderLineFieldInput_OrderDate" type="hidden" value="@OrderDate.Remove( 10 )" /> <input name="EcomOrderLineFieldInput_OrderDateOld" type="hidden" value="@OrderDateOld" /> <input type="hidden" name="EcomOrderLineFieldInput_MaterialIDSystem" value="" class="@productNumber" /> <input name="EcomOrderLineFieldInput_participate" type="hidden" value="" /> <textarea class="js-courseActivities" name="EcomOrderLineFieldInput_courseActivities" style="display:none"></textarea> <textarea class="js-courseLocation" name="EcomOrderLineFieldInput_courseLocation" style="display:none"></textarea> <a class="addToCartSubmit addToCartSubmitDesktop subscriptionYear" href="javascript:void(0);" data-add='@Translate( "addToCart", "Læg i kurven" )' data-added='@Translate( "added", "Lagt til" )' data-cart-type="subscribe"> <img class="addToCartIcon" src="/files/templates/designs/rizzodesignfolder/images/svgicons/cart.svg"> @Translate( "3MånedersabonnementButton", "3 månedersabonnement" ) </a> <input class="hidden" type="submit" value='@Translate( "addToCart" )' /> <div>@Translate( "3MonthsSubscriptionPrice", "Pris ekskl. moms kr. kr. 799 pr. md (kr. 8.388 pr. år)" )</div> </form> } if ( productId != "PROD2807" && productId != "PROD3458" ) { <form name="addToCart" class="add-to-cart form-fields hidden-xs" action="@SearchEngineFriendlyURLs.GetFriendlyUrl( currentPageId )" method="post"> <input name="cartcmd" type="hidden" value="add" /> <input type="hidden" name="productID" value="PROD2806" /> <input name="EcomOrderLineFieldInput_dateNow" type="hidden" value="" /> <input name="EcomOrderLineFieldInput_customerName" type="hidden" value="" /> <input name="EcomOrderLineFieldInput_email" type="hidden" value="" /> <input name="EcomOrderLineFieldInput_title" type="hidden" value="" /> <input name="EcomOrderLineFieldInput_OrderDate" type="hidden" value="@OrderDate.Remove( 10 )" /> <input name="EcomOrderLineFieldInput_OrderDateOld" type="hidden" value="@OrderDateOld" /> <input type="hidden" name="EcomOrderLineFieldInput_MaterialIDSystem" value="" class="@productNumber" /> <input name="EcomOrderLineFieldInput_participate" type="hidden" value="" /> <textarea class="js-courseActivities" name="EcomOrderLineFieldInput_courseActivities" style="display:none"></textarea> <textarea class="js-courseLocation" name="EcomOrderLineFieldInput_courseLocation" style="display:none"></textarea> <a class="addToCartSubmit addToCartSubmitDesktop subscriptionYear" href="javascript:void(0);" data-add='@Translate( "addToCart", "Læg i kurven" )' data-added='@Translate( "added", "Lagt til" )' data-cart-type="subscribe"> <img class="addToCartIcon" src="/files/templates/designs/rizzodesignfolder/images/svgicons/cart.svg"> @Translate( "ÅrsabonnementButton", "Årsabonnement" ) </a> <input class="hidden" type="submit" value='@Translate( "addToCart" )' /> <div>@Translate( "YearSubscriptionPrice", "Pris ekskl. moms kr. 699 pr. md (kr. 8.388 pr. år)" )</div> </form> } } <p>&nbsp;</p> <p>&nbsp;</p> @if ( GetString( "Ecom:Product:Field.newDateFIelds.Value" ) == "False" || productType == "Conference" ) { <span class="e-com-product-details"> @productDetails </span> } </div> <p style="display: none;">@productType</p> @if ( GetString( "Ecom:Product:Field.ShowFoaLogo.Value" ) == "True" ) { <div class="mask maskRight"> <a href="@Translate( "FaoLogoLink", "/default.aspx?id=591" )" target="_blank"> <img alt="" src="/Files/Templates/Designs/RizzoDesignFolder/images/foalogo_small.png" width="120px" /> </a> </div> } @if ( GetString( "Ecom:Product:Field.ShowIAPPLogo.Value" ) == "True" ) { <div class="mask maskRight"> <a href="@Translate( "IappLogoLink", "/default.aspx?id=591" )" target="_blank"> <img alt="" src="/Files/Templates/Designs/RizzoDesignFolder/images/iapplogo_small.png" width="120px" /> </a> </div> } </div> <div class="col-lg-8 col-xs-12 noPadding product-column"> @foreach ( var group in relatedGroupsList ) { @*teachers*@ if ( group.GetString( "Ecom:Product:RelatedGroup.GroupID" ) == "RELGRP2" || group.GetString( "Ecom:Product:RelatedGroup.GroupID" ) == "RELGRP18" ) { var relatedProdsList = group.GetLoop( "Products" ); if ( relatedProdsList.Any() ) { string teacherName = "", teacherDescription = "", teacherLink = "", teacherImage = "", teacherTeaser = "", teachersTitle = relatedProdsList.Count() > 1 ? Translate( "teachers", "Undervisere" ) : Translate( "teacher", "Underviser" ); if ( groupId == "GROUP4" || groupId == "GROUP29" || groupId == "GROUP32" || groupId == "GROUP41" ) { teachersTitle = relatedProdsList.Count() > 1 ? Translate( "Netværksledelse", "Netværksledelse" ) : Translate( "Netværksledelse", "Netværksledelse" ); } <div class="teachers" id="leftSideOuter"> <div class='teachers-container'> <h2>@teachersTitle</h2> <div id="listContainer"> <ul class="productsList row teachersOuter" data-list id="productsList"> @foreach ( var prod in relatedProdsList ) { teacherName = prod.GetString( "Ecom:Product.Name" ); teacherDescription = prod.GetString( "Ecom:Product.ShortDescription" ); teacherImage = ViewService.Instance.GetImagePathUrl( prod.GetString( "Ecom:Product.ImageSmall.Clean" ), prod.GetString( "Ecom:Product.ImageMedium.Clean" ), prod.GetString( "Ecom:Product.ImageLarge.Clean" ), "*" ); teacherImage = ViewService.Instance.GetImage( teacherImage, 0, 600 ); teacherLink = "Default.aspx?ID=" + prod.GetString( "Ecom:Product.PrimaryOrCurrentPageID" ) + "&ProductID=" + prod.GetString( "Ecom:Product.ID" ); if ( !String.IsNullOrEmpty( teacherDescription ) && !String.IsNullOrEmpty( teacherLink ) && !String.IsNullOrEmpty( teacherImage ) && !String.IsNullOrEmpty( teacherName ) ) { <li> <div class="col-xs-12 noPadding"> <figure class="col-xs-2 noPadding"> <a href="@teacherLink"> <img src="@teacherImage" title="@teacherName" alt="@teacherName" class="img-responsive" /> </a> </figure> <div class="col-xs-10"> <h3> <a itemprop="name" href="@teacherLink"> @teacherName </a> </h3> @if ( !String.IsNullOrEmpty( teacherDescription ) ) { <div class="shortDescription tileHide"> <a itemprop="name" href="@teacherLink"> <p> @ViewService.Instance.GetTeaserText( ViewService.Instance.StripHtml( teacherDescription ), 120 ) </p> </a> </div> } </div> </div> </li> } } </ul> </div> </div> </div> } } } @foreach ( var group in relatedGroupsList ) { @*ansvarlig*@ if ( group.GetString( "Ecom:Product:RelatedGroup.GroupID" ) == "RELGRP10" ) { var responsibleProdsList = group.GetLoop( "Products" ); if ( responsibleProdsList.Any() ) { string responsibleName = "", responsibleDescription = "", responsibleLink = "", responsibleImage = "", responsibleTeaser = "", responsibleTitle = ""; responsibleTitle = responsibleProdsList.Count() > 0 ? Translate( "Ansvarlig", "Ansvarlig" ) : Translate( "Ansvarlig", "Ansvarlig" ); <div class="responsible" id="leftSideOuter"> <div class='teachers-container @group.GetString( "Ecom:Product:RelatedGroup.GroupID" )'> <h2>@responsibleTitle</h2> <div id="listContainer"> <ul class="productsList row teachersOuter" data-list id="productsList"> @foreach ( var prod in responsibleProdsList ) { responsibleName = prod.GetString( "Ecom:Product.Name" ); responsibleDescription = prod.GetString( "Ecom:Product.ShortDescription" ); responsibleImage = ViewService.Instance.GetImagePathUrl( prod.GetString( "Ecom:Product.ImageSmall.Clean" ), prod.GetString( "Ecom:Product.ImageMedium.Clean" ), prod.GetString( "Ecom:Product.ImageLarge.Clean" ), "*" ); responsibleImage = ViewService.Instance.GetImage( responsibleImage, 0, 600 ); responsibleLink = "Default.aspx?ID=" + prod.GetString( "Ecom:Product.PrimaryOrCurrentPageID" ) + "&ProductID=" + prod.GetString( "Ecom:Product.ID" ); <li> <div class="col-xs-12 noPadding"> <figure class="col-xs-2 noPadding"> <a href="@responsibleLink"> <img src="@responsibleImage" title="@responsibleName" alt="@responsibleName" class="img-responsive" /> </a> </figure> <div class="col-xs-10"> <h3> <a itemprop="name" href="@responsibleLink"> @responsibleName </a> </h3> @if ( !String.IsNullOrEmpty( responsibleDescription ) ) { <div class="shortDescription tileHide"> <a itemprop="name" href="@responsibleLink"> <p> @ViewService.Instance.GetTeaserText( ViewService.Instance.StripHtml( responsibleDescription ), 120) </p> </a> </div> } </div> </div> </li> } </ul> </div> </div> </div> } } } </div> @*relaterede produkter*@ <div class="col-lg-4 col-xs-12 noPadding product-column product-right-column"> @if ( GetLoop( "ProductRelatedGroups" ).Any() ) { var miscdebug = ""; <div> @foreach ( var group in relatedGroupsList ) { if ( group.GetString( "Ecom:Product:RelatedGroup.GroupID" ) == "RELGRP1" ) { var prodsList = group.GetLoop( "Products" ); if ( prodsList.Any() ) { string groupName = group.GetString( "Ecom:Product:RelatedGroup.Name" ), groupID = group.GetString( "Ecom:Product:RelatedGroup.GroupID" ), relatedProductName = "", relatedProductLink = "", relatedProductDesc = "", relatednrLectures = "", relatednrLecturesDecimal = "", relatedProductMonth = "", moduleNumber = "", ShowDateOnList = "", relatedProductGroupID = ""; var productMonthRel = 0; var productYearRel = 0; var productDayRel = 0; var relatedProductIndex = 0; var monthNames = DateTimeFormatInfo.CurrentInfo.AbbreviatedMonthNames; <div class="related-products-legend top">@Translate( "relatedProducts", "Relaterede produkter" )</div> <ul class="relatedOuter related-products"> @foreach ( LoopItem relatedProduct in prodsList.OrderBy( x => x.GetInteger( "Ecom:Product:Field.Year.Value" ) ).ThenBy( x => x.GetInteger( "Ecom:Product:Field.Month.Value" ) ).ThenBy( x => x.GetInteger( "Ecom:Product:Field.Day.Value" ) ) ) { miscdebug = ""; try { relatedProductIndex++; relatedProductName = relatedProduct.GetString( "Ecom:Product.Name" ); relatedProductLink = relatedProduct.GetString( "Ecom:Product.LinkGroup.Clean" ); relatedProductDesc = ViewService.Instance.GetTeaserText( ViewService.Instance.StripHtml( relatedProduct.GetString( "Ecom:Product.ShortDescription" ) ), 80, "..." ); relatednrLectures = relatedProduct.GetString( "Ecom:Product:Field.Lectures.Value.Clean" ); relatednrLecturesDecimal = relatedProduct.GetString( "Ecom:Product:Field.LecturesDecimal.Value.Raw" ); productMonthRel = relatedProduct.GetInteger( "Ecom:Product:Field.Month.Value" ); productYearRel = relatedProduct.GetInteger( "Ecom:Product:Field.Year.Value" ); productDayRel = relatedProduct.GetInteger( "Ecom:Product:Field.Day.Value" ); moduleNumber = relatedProduct.GetString( "Ecom:Product:Field.moduleNummer" ); ShowDateOnList = relatedProduct.GetString( "Ecom:Product:Field.ShowDateOnList" ); relatedProductMonth = monthNames[ productMonthRel - 1 ]; relatedProductGroupID = relatedProduct.GetString( "Ecom:Product.PrimaryGroupID" ); var relCourseIsActive = ViewService.Instance.IsActive( productMonthRel, productYearRel, productDayRel ); //string relatedProductMod2Class = "mod" + (relatedProductIndex % 2).ToString(); int productDateStartInt = 0; DateTime myDateTime = relatedProduct.GetDate( "Ecom:Product:Field.season01Activity01DateStart.Value.Clean" ); DateTime productDateStart = myDateTime; if ( !String.IsNullOrEmpty( myDateTime.ToString() ) ) { // DateTime.TryParseExact( myDateTime.ToString(), "dd-MM-yyyy HH:mm", System.Globalization.CultureInfo.InvariantCulture, DateTimeStyles.None, out productDateStart ); productDateStartInt = ( int ) productDateStart.Day; } miscdebug = relatedProduct.GetString( "Ecom:Product.PrimaryGroupID" ) + "<---Mangler primærgruppe-->"; if ( !String.IsNullOrEmpty( relatedProductGroupID ) ) { var relatedGroup = Dynamicweb.Ecommerce.Services.ProductGroups.GetGroup( relatedProductGroupID ); if ( !relatedGroup.IsTopGroup ) { string relatedProductGroupPrimaryParentGroupID = relatedGroup.PrimaryParentGroupId; if ( relatedGroup.ParentGroups.Any() ) { relatedGroup = !String.IsNullOrEmpty( relatedProductGroupPrimaryParentGroupID ) ? relatedGroup.ParentGroups.Where( x => x.Id == relatedProductGroupPrimaryParentGroupID ).First() : relatedGroup.ParentGroups.First(); } } string relatedProductGroupColor = relatedGroup.ProductGroupFieldValues.GetProductGroupFieldValue( "Color" ).Value.ToString(); <li class="related-product-item @relatedProductGroupColor @relatedProductName @( relCourseIsActive ? "" : "hide" )"> <div> <div class="related-info"> <ul> <li class="productDate"> <div> @if ( relatedProductGroupColor != "green" && relatedProductGroupColor != "greendark" ) { if ( relatedProduct.GetString( "Ecom:Product:Field.newDateFIelds.Value" ) != "False" && productDateStart != DateTime.Now ) { <strong class="newDateStartInt">@productDateStartInt</strong> <span>@productDateStart.ToString( "MMMM" ).Substring( 0, 3 )</span> } else { if ( ShowDateOnList == "False" ) { <strong>@relatedProduct.GetString( "Ecom:Product:Field.Day.Value" )</strong> <span>@relatedProductMonth</span> } } } else { <strong style="text-transform: none">@Translate( "E", "e" )</strong><span>@Translate( "Learning", "Learning" )</span> } </div> </li> <li class="productLessons"> @if ( relatednrLectures != "0" ) { <div> @if ( !String.IsNullOrEmpty( relatednrLecturesDecimal ) && relatednrLecturesDecimal != "0" ) { <strong>@relatednrLecturesDecimal</strong> } else { <strong>@relatednrLectures</strong> } <span>@Translate( "ShortLectures", "Lekt." )</span> </div> } </li> </ul> </div> <div class="related-details"> <h3> <a href="@relatedProductLink" title="@relatedProductName"> @relatedProductName </a> </h3> @if ( !String.IsNullOrEmpty( moduleNumber ) && moduleNumber != "0" ) { <span class="productModuleNumberText">modul<span class="productModuleNumber">@moduleNumber</span></span> } </div> </div> <a href="@relatedProductLink" title="@relatedProductName" class="overlayLink">@relatedProductName</a> </li> } else { <div class="hideError">@relatedProductName mangler at få sat en primær gruppe under "relaterede grupper"</div> } } catch ( Exception ee ) { <div> Fejl: @ee.ToString() <br /><br /> @miscdebug </div> } } </ul> } } } </div> } </div> </article> </div> @SnippetStart( "breadCrumb" ) <li>&nbsp;|&nbsp;</li> <li> <a href="@pageGroupUrl">@parentGroupName</a> </li> @SnippetEnd( "breadCrumb" ) @SnippetStart( "OGMeta" ) @{ if ( !String.IsNullOrEmpty( OpenGraphTitle ) ) { <meta property="og:title" content='@OpenGraphTitle' /> } else { <meta property="og:title" content='@productName' /> } if ( !String.IsNullOrEmpty( OpenGraphDescription ) ) { <meta property="og:description" content='@OpenGraphDescription' /> } else { <meta property="og:description" content='@ViewService.Instance.StripHtml( productIntro )' /> } if ( !String.IsNullOrEmpty( OpenGraphImage ) ) { <meta property="og:image" content='@Pageview.GlobalTags.GetTagByName( "Global:Request.Scheme" ).Value://@Pageview.GlobalTags.GetTagByName( "Global:Request.Host" ).Value/@OpenGraphImage' /> } else { <meta property="og:image" content='@Pageview.GlobalTags.GetTagByName( "Global:Request.Scheme" ).Value://@Pageview.GlobalTags.GetTagByName( "Global:Request.Host" ).Value@imagePattern' /> } } <meta property="og:site_name" content='@areaItem[ "CompanyName" ]' /> <meta property="og:url" content='@Pageview.GlobalTags.GetTagByName( "Global:Request.Scheme" ).Value://@Pageview.GlobalTags.GetTagByName( "Global:Request.Host" ).Value@( Pageview.GlobalTags.GetTagByName( "Global:Pageview.Url" ).Value )' /> <meta content="article" property="og:type" /> <meta property="og:locale" content='@Pageview.GlobalTags.GetTagByName( "Global:Area.LongLang" ).Value.Replace( "-", "_" )' /> @SnippetEnd( "OGMeta" ) @SnippetStart( "jsOnLoad" ) onLoadProductDetail(); @SnippetEnd( "jsOnLoad" )