Exception in 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 CompiledRazorTemplates.Dynamic.beccbdbdbdfdca.isActive(Int32 productMonth, Int32 productYear, Int32 productDay)
   at CompiledRazorTemplates.Dynamic.beccbdbdbdfdca.Execute()
   at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context)
   at RazorEngine.Templating.TemplateService.Run(ITemplate template, DynamicViewBag viewBag)
   at RazorEngine.Templating.TemplateService.Parse(String razorTemplate, Object model, DynamicViewBag viewBag, String cacheName)
   at RazorEngine.Razor.Parse[T](String razorTemplate, T model, String cacheName)
   at Dynamicweb.Rendering.Template.Output()
@inherits RazorTemplateBase<RazorTemplateModel<Template>> @using Dynamicweb.Rendering; @if(!string.IsNullOrEmpty(System.Web.HttpContext.Current.Request.Params["detail"]) && GetInteger("Ecom:Product.PrimaryOrCurrentPageID") != Pageview.Page.ID) { string redirect = "/Default.aspx?ID=" + GetString("Ecom:Product.PrimaryOrCurrentPageID") + "&ProductID=" + GetString("Ecom:Product.ID"); if(!string.IsNullOrEmpty(System.Web.HttpContext.Current.Request.QueryString["variantID"])) { redirect += "&variantID=" + System.Web.HttpContext.Current.Request.QueryString["variantID"].ToString(); } System.Web.HttpContext.Current.Response.Redirect(Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(redirect)); } @using System.Collections.Generic @using System.Dynamic @using System.Globalization @using System.Text.RegularExpressions @using System.Web @using Co3.JUC.Website.Models.Frontend @using Dynamicweb.eCommerce.Cart.ShippingProviders.GLSwsPakkeshop @using Dynamicweb.eCommerce.Products @using Dynamicweb.Frontend @inherits Dynamicweb.Rendering.RazorTemplateBase< Dynamicweb.Rendering.RazorTemplateModel< Dynamicweb.Rendering.Template > > @using System; @using Group = Dynamicweb.eCommerce.Products.Group @{ string designName = GetString("Template:DesignBaseUrl").Replace("/Files/Templates/Designs/", "").Replace("/", ""); }@functions{ public static string GetImage(string sourceString, int imageWidth, int imageHeight, int imageWidthTablet = 0, int imageHeightTablet = 0, int imageWidthMobile = 0, int imageHeightMobile = 0, string imageFormat = "jpg", int imageCompression = 0, int imageCrop = 5, string background = "", string designName = "RizzoDesignFolder") { Dynamicweb.Frontend.PageView currentPageview = Dynamicweb.Frontend.PageView.Current(); string currDevice = currentPageview.Device.ToString(), alternativeImage = currentPageview.Area.Item["NoImage"] != null ? currentPageview.Area.Item["NoImage"].ToString() : "/Files/Templates/Designs/"+ designName + "/images/alternativeImage.jpg", widthString = "", heightString = "", getImageFormat = imageFormat != "jpg" ? "&amp;Format=" + imageFormat : "", getImageCompression = imageCompression != 0 ? "&amp;Compression=" + imageCompression : "", bgColor = !string.IsNullOrEmpty(background) ? "&amp;backgroud="+background : ""; int getImageWidth = imageWidth != 0 ? imageWidth : 0, getImageHeight = imageHeight != 0 ? imageHeight : 0; if (currDevice == Dynamicweb.Frontend.PageView.DeviceType.Tablet.ToString()) { getImageWidth = imageWidthTablet != 0 ? imageWidthTablet : getImageWidth; getImageHeight = imageHeightTablet != 0 ? imageHeightTablet : getImageHeight; } else if (currDevice == Dynamicweb.Frontend.PageView.DeviceType.Mobile.ToString()) { getImageWidth = imageWidthMobile != 0 ? imageWidthMobile : getImageWidth; getImageHeight = imageHeightMobile != 0 ? imageHeightMobile : getImageHeight; } if (getImageWidth != 0) { widthString = "&amp;Width=" + getImageWidth; } if (getImageHeight != 0) { heightString = "&amp;Height=" + getImageHeight; } string output = "/Admin/Public/GetImage.ashx?Image=" + sourceString + widthString + heightString + "&amp;altFmImage_path=" + alternativeImage + getImageFormat + getImageCompression + "&amp;Crop=" + imageCrop + bgColor; return output; } } @inherits RazorTemplateBase<RazorTemplateModel<Template>> @using Dynamicweb.Rendering; @functions{ private string GetImagePathUrl(string small, string medium, string large, string pattern) { string imagePath; if (!string.IsNullOrEmpty(small)) imagePath = small; else if (!string.IsNullOrEmpty(medium)) imagePath = medium; else if (!string.IsNullOrEmpty(large)) imagePath = large; else imagePath = pattern; return imagePath; } } @{ var areaItem = Pageview.Area.Item; bool isLoggedIn = Pageview.User.LoggedIn, isFrontEnd = Dynamicweb.ExecutingContext.IsFrontEnd(), productIsFavorite = GetBoolean( "Ecom:Product.IsProductInFavoriteList" ); string areaid = Pageview.GlobalTags.GetTagByName( "Global:Area.ID" ).Value, currentPageId = Pageview.Page.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 = GetImagePathUrl( GetString( "Ecom:Product.ImageSmall.Clean" ), GetString( "Ecom:Product.ImageMedium.Clean" ), GetString( "Ecom:Product.ImageLarge.Clean" ), pattern ), productGetImage = GetImage( productImage, 0, 600 ), imagesFolder = "/Files/Files/" + designName + "/Products/", imagePattern = "/Files/Images/SocialeMedier/" + productNumber + ".jpg", standardProdImg = "/Files/Templates/Designs/RizzoDesignFolder/images/JUC_logo.png", productIntro = GetString( "Ecom:Product.MetaDescription" ), productDescription = GetString( "Ecom:Product.LongDescription" ), pointPrice = GetString( "Ecom:Product.PointPrice" ), productDetails = GetString( "Ecom:Product:Field.Details.Value.Clean" ), 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" ); int stockNumberInt = Int32.Parse( stockNumber ); string firstActivityStartDate = ""; string lastActivityEndDate = ""; var nrCompleteDate = nrDay + "/" + nrMonth + "/" + nrYear; DateTime productFieldDateStart = DateTime.Now; var imagesList = new List< Dictionary< string, string > >(); var relatedGroupsList = GetLoop( "ProductRelatedGroups" ); var currentGroup = Dynamicweb.eCommerce.Products.Group.GetGroupByID( 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 = isActive( productMonth, productYear, productDay ); bool maskClassActive = false; if ( GetString( "Ecom:Product:Field.ShowFoaLogo.Value" ) == "True" ) { maskClassActive = true; } } @if ( GetInteger( "Ecom:Product.PrimaryOrCurrentPageID" ) != Pageview.Page.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.Page.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="/uber-juc/pflichtfortbildung-fur-fachanwalte-nach-§15-fao.aspx"> <img alt="" src="/Files/Templates/Designs/RizzoDesignFolder/images/foalogo_small.png" width="120px" /> </a> </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 class="share-wrapper"> <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> <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" )'> <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> } <div style="float: left; width: 100%; overflow: hidden;"> <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" : "" )" class="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 ) ) { <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 = Product.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" ); DateTime CurrentStartDate = GetDate( "Ecom:Product:Field.outgoingStartDate.Value" ); DateTime CurrentEndDate = GetDate( "Ecom:Product:Field.outgoingEndDate.Value" ); string activityPrefix = "season01Activity"; IEnumerable< ProductFieldValue > fields = product.ProductFieldValues.Where( pfv => pfv.ProductField.SystemName.StartsWith( activityPrefix ) ); List< ActivityDay > activityDays = new List< ActivityDay >(); bool done = false; int activityDayNumber = 1; while ( !done ) { string activityDayPrefix = string.Format( "{0}{1}", activityPrefix, activityDayNumber.ToString( "00" ) ); if ( fields.Any( f => f.ProductField.SystemName.StartsWith( string.Format( "{0}{1}", activityPrefix, activityDayNumber.ToString( "00" ) ) ) ) ) { ProductFieldValue headLine = fields.FirstOrDefault( f => f.ProductField.SystemName == string.Format( "{0}{1}", activityDayPrefix, "Headline" ) ); ProductFieldValue extra = fields.FirstOrDefault( f => f.ProductField.SystemName == string.Format( "{0}{1}", activityDayPrefix, "Extra" ) ); ProductFieldValue startTime = fields.FirstOrDefault( f => f.ProductField.SystemName == string.Format( "{0}{1}", activityDayPrefix, "DateStart" ) ); ProductFieldValue endTime = fields.FirstOrDefault( f => f.ProductField.SystemName == string.Format( "{0}{1}", activityDayPrefix, "DateEnd" ) ); ActivityDay nextActivityDay = new ActivityDay() { HeadLine = headLine != null ? headLine.Value as string : string.Empty, Extra = extra != null ? extra.Value as string : string.Empty, StartTime = startTime != null ? ( DateTime ) startTime.Value : default( DateTime ), EndTime = endTime != null ? ( DateTime ) endTime.Value : default( DateTime ) }; if ( nextActivityDay.Valid() ) { activityDays.Add( nextActivityDay ); } } else { done = true; } activityDayNumber++; } <div class="CustomCouseActivity"> @if ( activityDays.Count > 1 ) { <div class="courseLocation"> <p> @courseEventLocation </p> <br /> </div> } @if ( CurrentHeadline != "" && CurrentEndDate >= DateTime.Now ) { <div class="first-letter"> <h3>@CurrentHeadline</h3> @if ( CurrentStartDate.Date == CurrentEndDate.Date ) { <p>@CurrentStartDate.ToString( "dddd" ) d. @CurrentStartDate.ToString( "d. MMMM yyyy" )</p> <p>Kl. @CurrentStartDate.ToString( "HH:mm" ) - @CurrentEndDate.ToString( "HH:mm" )</p> } else { <p>Fra @CurrentStartDate.ToString( "dddd" ) d @CurrentStartDate.ToString( "d. MMMM yyyy" ) <br /> kl. @CurrentStartDate.ToString( "HH:mm" ) <br /> Til @CurrentEndDate.ToString( "dddd" ) d. @CurrentEndDate.ToString( "d. MMMM yyyy" ) kl. @CurrentEndDate.ToString( "HH:mm" ) </p> } <p>@CurrentExtra</p> </div> if ( !GetBoolean( "Ecom:Product:Field.showAddToCalendar.Value.Clean" ) ) { <span class="fullStartDate" style="display:none">@CurrentStartDate.ToString( "dd" )-@CurrentStartDate.ToString( "MM" )-@CurrentStartDate.ToString( "yyyy" ) @CurrentStartDate.ToString( "HH" ):@CurrentStartDate.ToString( "mm" )</span> <span class="fullEndDate" style="display:none">@CurrentEndDate.ToString( "HH" ):@CurrentEndDate.ToString( "mm" )</span> <div class="addeventatc" title="Add to Calendar"> <span class="addeventatcText">+ @Translate( "Tilføj til kalender", "Tilføj til kalender" )</span> <span class="start"></span> <span class="end"></span> <span class="timezone">Europe/Danmark</span> <span class="title">JUC - @productName</span> <span class="description"></span> <span class="location">@courseEventLocation.Replace( "<br>", ", " )</span> </div> } <br /> <h3>@Translate( "MeetingNexSeason", "Møder i næste sæson" )</h3> <br /> } @foreach ( ActivityDay day in activityDays ) { string exceeded = day.EndTime <= DateTime.Now ? "exceeded" : string.Empty; <div class="first-letter @exceeded"> <strong>@day.HeadLine</strong><br /> @if ( day.StartTime.Date == day.EndTime.Date ) { <p>@day.StartTime.ToString( "dddd" ) d. @day.StartTime.ToString( "d. MMMM yyyy" )</p> <p>Kl. @day.StartTime.ToString( "HH:mm" ) - @day.EndTime.ToString( "HH:mm" )</p> } else { <p>Fra @day.StartTime.ToString( "dddd" ) d @day.StartTime.ToString( "d. MMMM yyyy" ) <br /> kl. @day.StartTime.ToString( "HH:mm" ) <br /> Til @day.EndTime.ToString( "dddd" ) d. @day.EndTime.ToString( "d. MMMM yyyy" ) kl. @day.EndTime.ToString( "HH:mm" ) </p> } <p>@day.Extra</p> </div> // Here we make the Add To Calender button // DateTime outgoingEndDate = DateTime.ParseExact(GetString("Ecom:Product:Field.outgoingEndDate.Value.Clean"), "dd-MM-yyyy HH:mm", System.Globalization.CultureInfo.InvariantCulture); if ( !GetBoolean( "Ecom:Product:Field.showAddToCalendar.Value.Clean" ) ) { <span class="fullStartDate" style="display:none">@day.StartTime.ToString( "dd" )-@day.StartTime.ToString( "MM" )-@day.StartTime.ToString( "yyyy" ) @day.StartTime.ToString( "HH" ):@day.StartTime.ToString( "mm" )</span> <span class="fullEndDate" style="display:none">@day.EndTime.ToString( "HH" ):@day.EndTime.ToString( "mm" )</span> <div class="addeventatc" title="Add to Calendar"> <span class="addeventatcText @exceeded">+ @Translate( "Tilføj til kalender", "Tilføj til kalender" )</span> <span class="start"></span> <span class="end"></span> <span style="display: none;" class="timezone">Europe/Danmark</span> <span style="display: none;" class="title">JUC - @productName</span> <span style="display: none;" class="description"></span> <span style="display: none;" class="location">@courseEventLocation.Replace( "<br>", ", " )</span> </div> } <br /> } @if ( activityDays.Count == 1 ) { <div class="courseLocation"> <br /> <p> @courseEventLocation </p> </div> } </div> // START: Current Course // This is where we show the current/present course DateTime currentDateTimeNow = DateTime.Now; DateTime outgoingStartDate = DateTime.ParseExact( GetString( "Ecom:Product:Field.outgoingStartDate.Value.Clean" ), "dd-MM-yyyy HH:mm", System.Globalization.CultureInfo.InvariantCulture ); // 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 = productFieldDateStart.ToString( "dd-MM-yyyy" ) + " " + productFieldDateEndHour.ToString( "HH:mm" ); 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" ) { <span class="e-com-product-details"> @productDetails </span> } <p>&nbsp;</p> @if ( areaid == "1" && productType == "Course" ) { 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" && courseIsActive ) { 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 { if ( stockStatusID != "STOCKSTATUS3" && courseIsActive ) { <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> } <h3>@Translate( "priceDetails" )</h3> <p class="price @productPrice"> @currencyCode @productPrice.Replace( ",00", "" ) </p> @if ( stockStatusID != "STOCKSTATUS3" && courseIsActive ) { <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 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" href="javascript:void(0);" data-add='@Translate( "addToCart", "Læg i kurven" )' data-added='@Translate( "added", "Lagt til" )'> <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> } </div> @if ( GetString( "Ecom:Product:Field.ShowFoaLogo.Value" ) == "True" ) { <div class="mask maskRight"> <a href="/uber-juc/pflichtfortbildung-fur-fachanwalte-nach-§15-fao.aspx" target="_blank"> <img alt="" src="/Files/Templates/Designs/RizzoDesignFolder/images/foalogo_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" ) { 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 = GetImagePathUrl( prod.GetString( "Ecom:Product.ImageSmall.Clean" ), prod.GetString( "Ecom:Product.ImageMedium.Clean" ), prod.GetString( "Ecom:Product.ImageLarge.Clean" ), "*" ); teacherImage = 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> @Dynamicweb.Base.TeaserString( 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 = GetImagePathUrl( prod.GetString( "Ecom:Product.ImageSmall.Clean" ), prod.GetString( "Ecom:Product.ImageMedium.Clean" ), prod.GetString( "Ecom:Product.ImageLarge.Clean" ), "*" ); responsibleImage = 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> @Dynamicweb.Base.TeaserString( 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 = Dynamicweb.Base.TeaserString( 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 = isActive( productMonthRel, productYearRel, productDayRel ); //string relatedProductMod2Class = "mod" + (relatedProductIndex % 2).ToString(); int productDateStartInt = 0; string myDateTime = relatedProduct.GetString( "Ecom:Product:Field.season01Activity01DateStart.Value.Clean" ); DateTime productDateStart = DateTime.Now; if ( !String.IsNullOrEmpty( myDateTime ) ) { productDateStart = DateTime.ParseExact( myDateTime, "dd-MM-yyyy HH:mm", System.Globalization.CultureInfo.InvariantCulture ); productDateStartInt = ( int ) productDateStart.Day; } miscdebug = relatedProduct.GetString( "Ecom:Product.PrimaryGroupID" ) + "-----"; Dynamicweb.eCommerce.Products.Group relatedGroup = Dynamicweb.eCommerce.Products.Group.GetGroupByID( 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 ( 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> } } </div> </li> <li class="productLessons"> <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> <a href="@relatedProductLink" title="@relatedProductName"> @relatedProductDesc </a> </div>*@ </div> </div> <a href="@relatedProductLink" title="@relatedProductName" class="overlayLink">@relatedProductName</a> </li> } 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='@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" ) @functions { public static string StripHtml( string source ) { return Regex.Replace( source, "<.*?>", string.Empty ); } public bool isActive( int productMonth, int productYear, int productDay ) { DateTime productDate = new DateTime( productYear, productMonth, productDay ); DateTime localDate = DateTime.Now; int result = DateTime.Compare( productDate, localDate ); if ( result > 0 ) { return true; } return false; } }