EIVA A/S

To use this site, please enable javascript

Exception in template (Designs\Eiva\eCom/Product/Details.cshtml): System.NullReferenceException: Object reference not set to an instance of an object.
at CompiledRazorTemplates.Dynamic.afaaadf.Execute()
at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context) in c:\Users\abbottm\Documents\GitHub\RazorEngine\src\Core\RazorEngine.Core\Templating\TemplateBase.cs:line 126
at RazorEngine.Templating.TemplateService.Run(ITemplate template, DynamicViewBag viewBag) in c:\Users\abbottm\Documents\GitHub\RazorEngine\src\Core\RazorEngine.Core\Templating\TemplateService.cs:line 608
at RazorEngine.Templating.TemplateService.Parse(String razorTemplate, Object model, DynamicViewBag viewBag, String cacheName) in c:\Users\abbottm\Documents\GitHub\RazorEngine\src\Core\RazorEngine.Core\Templating\TemplateService.cs:line 439
at RazorEngine.Razor.Parse[T](String razorTemplate, T model, DynamicViewBag viewBag, String cacheName) in c:\Users\abbottm\Documents\GitHub\RazorEngine\src\Core\RazorEngine.Core\Razor.cs:line 290
at Dynamicweb.Rendering.Template.RenderRazorTemplate()
@using Dynamicweb.Content @using Eiva.CustomModules.Helpers @using Dynamicweb.Content.Items @using Dynamicweb.Ecommerce @using Eiva.CustomModules.Helpers @using Dynamicweb.Content; @using Dynamicweb.Ecommerce.Products @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> @{ string productPageId = Pageview.Area.Item["Productpage_Id"].ToString(); var productPageUrl = Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl("Default.aspx?ID=" + productPageId); } @if (GetBoolean("Ecom:Product:Field.IsMyEivaProduct")) { var baseUrl = System.Web.HttpContext.Current.Request.Url.GetLeftPart(UriPartial.Authority); <script> window.location.href = '@baseUrl' + '@productPageUrl'; </script> } @{ var prod = Services.Products.GetProductById(GetString("Ecom:Product.ID"), "", true); string allProductPageId = Pageview.Area.Item["AllProductsPage"].ToString(); string rentalPageId = Pageview.Area.Item["RentalPage"].ToString(); var alsoAvailableProduct = prod.RelatedGroups.Where(rg => rg.Name.ToLower() == "also available for").SelectMany(rp => rp.Products.Where(p => p.Active)).FirstOrDefault(); var alsoAvailableLink = ""; if (alsoAvailableProduct != null) { if (alsoAvailableProduct.ProductFieldValues.GetProductFieldValue("SaleOrRental").Value != null && alsoAvailableProduct.ProductFieldValues.GetProductFieldValue("SaleOrRental").Value.ToString() == "Rental") { alsoAvailableLink = Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl("default.aspx?id=" + rentalPageId + "&groupId=" + alsoAvailableProduct.PrimaryGroupId + "&productId=" + alsoAvailableProduct.Id); } else { alsoAvailableLink = Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl("default.aspx?id=" + productPageId + "&groupId=" + alsoAvailableProduct.PrimaryGroupId + "&productId=" + alsoAvailableProduct.Id); } } Char delimiter = '='; string productNumber = GetString("Ecom:Product.Number"); string image = "/Files/Images/Products/" + productNumber + ".jpg"; bool first = true; string productProductCategory = Helpers.getCategory(prod).Name; double stockCount = GetDouble("Ecom:Product.Stock"); string amountDisabled = ""; bool soldout = false; if (stockCount == 0) { amountDisabled = "disabled"; soldout = true; } string productName = GetValue("Ecom:Product.Name").ToString(); int countExtraImages = 0; for (int i = 1; i <= 5; i++) { string thumbnailImg = GetString("Ecom:Product:Field.AdditionalImage" + i + ".Clean"); if (!string.IsNullOrWhiteSpace(thumbnailImg)) { countExtraImages++; } } string sliderHiddenClass = countExtraImages > 0 ? "m-productImageSlider__list--isHidden" : "m-productImageSlider__list--show"; var singleImageClass = countExtraImages == 0 ? "m-productImageSlider__list--single" : string.Empty; } @helper RenderMyEIVASection(string parameter = "", string url = "", bool fullWidth = false, bool floatRight = false) { var myEivaInfo = Dynamicweb.Frontend.PageView.Current().Area.Item["My_EIVAInfo"]; var myEivaLink = Dynamicweb.Frontend.PageView.Current().Area.Item["My_EIVALink"]; var myEivaLinkText = Dynamicweb.Frontend.PageView.Current().Area.Item["My_EIVALinkText"]; var licenseInfoLink = Dynamicweb.Frontend.PageView.Current().Area.Item["LicenseInfoLink"]; var licenseInfoLinkText = Dynamicweb.Frontend.PageView.Current().Area.Item["LicenseInfoLinkText"]; var myEivaLinkParameter = string.IsNullOrEmpty(parameter) ? "" : "?" + parameter; if (!string.IsNullOrEmpty(url)) { myEivaLink = url; } <div class="container-fluid o-checkout__my-eiva-info"> <section class="o-text-element row @(floatRight ? "float-right" : "")"> <div class="o-text-element__col col-xs-12 @(fullWidth ? "" : "col-sm-10 col-md-8")"> <div class="m-text-element"> <p> @myEivaInfo <a href="@myEivaLink@myEivaLinkParameter"> @myEivaLinkText </a> </p> </div> </div> </section> </div> @*<p>@myEivaInfo <a href="@myEivaLink@myEivaLinkParameter">@myEivaLinkText</a><a href="@licenseInfoLink">@licenseInfoLinkText</a></p>*@ } @* Product details *@ @helper RenderMyEivaLinkOverlay() { var myEivaInfo = Pageview.AreaSettings.GetString("My_EIVAInfo"); var myEivaLink = Pageview.AreaSettings.GetString("My_EIVALink"); var myEivaLinkText = Pageview.AreaSettings.GetString("My_EIVALinkText"); <!-- Popup for normal orders --> <div class="novi-backdrop novi-backdrop--my-eiva-info" id="js-novi-backdrop--my-eiva-link-info"> <div class="novi-overlay novi-overlay--my-eiva-info" id="js-novi-overlay--my-eiva-info"> <div class="novi-overlay__container"> <div class="novi-overlay__content"> <div class="container-fluid"> <section class="o-text-element row "> <div class="o-text-element__col col-xs-12"> <div class="m-text-element"> <h3>@Translate("Already a NaviSuite User", "Already a NaviSuite user?")</h3> <p> @myEivaInfo </p> <div class="novi-overlay__buttons text-center"> @* Dynamic data-attribute for this button values set in novicell.productPagePrices.setSoftwareHiddenValues() *@ <a class="a-button a-button--l a-button--cta" href="#" id="add-to-my-eiva-link" onclick="novicell.cart.addToMyEiva(event, this);" data-href="@myEivaLink" data-product-id="@GetString("Ecom:Product.ID")"> @myEivaLinkText </a> <button class="a-button a-button--l a-button--white" type="submit"> @Translate("Proceed as new customer", "Proceed as new customer") </button> </div> </div> </div> </section> </div> </div> </div> </div> </div> } @helper RenderMyEivaInfoOverlay() { var myEivaCheckoutPageId = Pageview.AreaSettings.GetString("My_EIVACheckoutPage"); var myEivaCheckoutLink = "Default.aspx?ID=" + myEivaCheckoutPageId; <!-- Popup for My EIVA orders --> <div class="novi-backdrop novi-backdrop--my-eiva-info" id="js-novi-backdrop--my-eiva-order-info"> <div class="novi-overlay novi-overlay--my-eiva-info" id="js-novi-overlay--my-eiva-info"> <div class="novi-overlay__container"> <div class="novi-overlay__content"> <div class="container-fluid"> <section class="o-text-element row "> <div class="o-text-element__col col-xs-12"> <div class="m-text-element"> <h3>@Translate("My EIVA | Product page | Popup heading", "You already have products in your My EIVA basket")</h3> <p> @Translate("My EIVA | Product page | Popup body text", "This product cannot be added to your basket as you already have products in your My EIVA basket.") </p> <div class="novi-overlay__buttons text-center"> <a class="a-button a-button--l a-button--cta" href="@myEivaCheckoutLink"> @Translate("My EIVA | Product page | Popup left button text", "Proceed to My EIVA checkout") </a> <button class="a-button a-button--l a-button--white" onclick="novicell.helpers.closeOverlay(this, event)"> @Translate("My EIVA | Product page | Popup right button text", "Continue browsing") </button> <input type="submit" class="hidden" name="js-submit-button" id="js-submit-button" /> </div> </div> </div> </section> </div> </div> </div> </div> </div> } <div class="container"> <div class="o-productDetails"> <div class="o-productDetails__slider"> <span class="o-productDetails__temp" id="o-productDetails__temp"></span> <div class="m-productImageSlider"> <ul class="m-productImageSlider__list @sliderHiddenClass @singleImageClass"> @sliderLargeItem(image, productName, null) @for (int i = 1; i <= 5; i++) { string thumbnailImg = GetString("Ecom:Product:Field.AdditionalImage" + i + ".Clean"); if (!string.IsNullOrWhiteSpace(thumbnailImg)) { string videoId = GetString("Ecom:Product:Field.AdditionalVideoID" + i); if (!string.IsNullOrWhiteSpace(videoId)) { @sliderLargeItem(thumbnailImg, productName, videoId) } else { @sliderLargeItem(thumbnailImg, productName, null) } } } </ul> @if (countExtraImages > 0) { <ul class="m-productImageSlider__listSmall m-productImageSlider__listSmall--isHidden"> @sliderSmallItem(image, productName, null) @for (int i = 1; i <= 5; i++) { string thumbnailImg = GetString("Ecom:Product:Field.AdditionalImage" + i + ".Clean"); if (!string.IsNullOrWhiteSpace(thumbnailImg)) { string videoId = GetString("Ecom:Product:Field.AdditionalVideoID" + i); if (!string.IsNullOrWhiteSpace(videoId)) { @sliderSmallItem(thumbnailImg, productName, videoId) } else { @sliderSmallItem(thumbnailImg, productName, null) } } } <li class="m-productImageSlider__itemSmall m-productImageSlider__itemSmall--invisible"></li> <li class="m-productImageSlider__itemSmall m-productImageSlider__itemSmall--invisible"></li> <li class="m-productImageSlider__itemSmall m-productImageSlider__itemSmall--invisible"></li> <li class="m-productImageSlider__itemSmall m-productImageSlider__itemSmall--invisible"></li> <li class="m-productImageSlider__itemSmall m-productImageSlider__itemSmall--invisible"></li> </ul> } <div class="overlayContent" id="overlayContent--productImageSlider"> <ul class="m-productImageSlider__listOverlay"> @sliderOverlayItem(image, productName, null) @for (int i = 1; i <= 5; i++) { string thumbnailImg = GetString("Ecom:Product:Field.AdditionalImage" + i + ".Clean"); if (!string.IsNullOrWhiteSpace(thumbnailImg)) { string videoId = GetString("Ecom:Product:Field.AdditionalVideoID" + i); if (!string.IsNullOrWhiteSpace(videoId)) { @sliderOverlayItem(thumbnailImg, productName, videoId) } else { @sliderOverlayItem(thumbnailImg, productName, null) } } } </ul> </div> </div> </div> <div class="o-productDetails__top"> <h1 class="a-header">@productName</h1> <dl class="m-productMainFacts"> @*Supplier/Conducted by*@ @if (!string.IsNullOrWhiteSpace(GetString("Ecom:Manufacturer.Name"))) { <dt class="m-productMainFacts__elem m-productMainFacts__elem--term"> @if (productProductCategory == "Class room training") { @Translate("Conducted by", "Conducted by:") } else { @Translate("Supplier", "Supplier:") } </dt> <dd class="m-productMainFacts__elem m-productMainFacts__elem--data"> @* TODO: yyy: Kim, Rune sagde, at selve navnet på Manufacturer skulle være et link: <a href="#" target="_blank">Eiva</a>*@ @if (!string.IsNullOrWhiteSpace(GetString("Ecom:Manufacturer.Web"))) { <a href="@GetString("Ecom:Manufacturer.Web")" target="_blank">@GetString("Ecom:Manufacturer.Name")</a> } else { @GetString("Ecom:Manufacturer.Name") } </dd> } @*Productnumber*@ <dt class="m-productMainFacts__elem m-productMainFacts__elem--term"> @Translate("Product nr.", "Product nr.") : </dt> <dd class="m-productMainFacts__elem m-productMainFacts__elem--data"> @productNumber </dd> </dl> <ul class="m-productTags"> @*Segments*@ @foreach (var segment in GetLoop("Segments.Options")) { string segmentLink = Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl("default.aspx?id=" + allProductPageId); if (segment.GetString("Segments.Option.IsSelected") == "true") { <li class="m-productTags__item"><a href="@(segmentLink)?TypeOfWork=@segment.GetString("Segments.Option.Value")">@segment.GetString("Segments.Option.Name")</a></li> } } </ul> @*Date & Location*@ @if (productProductCategory == "Class room training") { DateTime courseStart = GetDate("Ecom:Product.CategoryField.Class_room_training.Course_date_start.Value"); DateTime courseEnd = GetDate("Ecom:Product.CategoryField.Class_room_training.Course_date_end.Value"); <p class="o-productDetails__timeAndPlace"> <span class="o-productDetails__date"> @if (courseStart.Year == courseEnd.Year && courseStart.Month == courseEnd.Month) { @: @courseStart.ToString("%d")-@courseEnd.ToString("d MMM yyyy") } else { @courseStart.ToString("d MMM")<text> &ndash; </text>@courseEnd.ToString("d MMM yyyy") } </span> <span class="o-productDetails__place">@GetString("Ecom:Product.CategoryField.Class_room_training.Location.Value")</span> </p> } </div> <div class="o-productDetails__content"> <section class="o-text-element"> <div class="o-text-element__col o-text-element__col--embeddedOneCol"> <div class="o-text-element__content o-text-element__content--left"> <div class="m-rich-text-editor o-text-element__rte"> @*Description*@ @GetValue("Ecom:Product.LongDescription") </div> </div> </div> </section> </div> </div> </div> @*Render Price*@ @if (productProductCategory == "Class room training") { if (stockCount < 1) { @RenderTrainingPriceSoldout(productProductCategory, alsoAvailableLink) } else if (GetInteger("Ecom:Product.Price.PricePIP") == 0) { @RenderTrainingPriceNoPrice(productProductCategory, alsoAvailableLink) } else { @RenderTrainingPrice(productProductCategory, alsoAvailableLink, stockCount) } if (!string.IsNullOrWhiteSpace(GetString("Additional_description"))) { <div class="container"> <section class="o-text-element"> <div class="o-text-element__col o-text-element__col--oneColFullWidth col-xs-12 col-sm-10 col-md-8"> <div class="o-text-element__content o-text-element__content--left"> <div class="m-rich-text-editor o-text-element__rte"> @GetValue("Additional_description") </div> </div> </div> </section> </div> } } else if (productProductCategory == "Software" && GetString("Rack_software") != "True") { if (GetBoolean("Ecom:Product:Field.RequestPrice")) { @RenderPriceRequest(productProductCategory, productName, alsoAvailableLink) } else { @RenderSoftwarePrice(productProductCategory, prod, alsoAvailableLink) } } else if (productProductCategory == "Hardware" || productProductCategory == "E-learning" || (productProductCategory == "Software" && GetString("Rack_software") == "True")) { if (GetBoolean("Ecom:Product:Field.RequestPrice")) { @RenderPriceRequest(productProductCategory, productName, alsoAvailableLink) } else { @RenderHardwarePrice(soldout, stockCount, productProductCategory, alsoAvailableLink) } } @* Features *@ @if (!string.IsNullOrWhiteSpace(GetString("Ecom:Product:Field.FeaturesHeader"))) { <div class="container helperProductPageExtraItems"> <div class="o-highlightedFeatures"> <div class="base-accordion base-accordion--mobileOnly"> <h2 class="a-heading a-heading--productPage base-accordion__header ">@GetString("Ecom:Product:Field.FeaturesHeader")</h2> <div class="base-accordion__content js-accordion"> <ul class="row o-highlightedFeatures__list"> @{ for (int i = 1; i <= 20; i++) { string featureLink = GetString("Ecom:Product:Field.Feature" + i); if (!string.IsNullOrWhiteSpace(featureLink)) { String[] featureId = featureLink.Split(delimiter); @RenderFeature(featureId[1]) } } } </ul> </div> </div> </div> </div> } @* Specifications *@ @if (!string.IsNullOrWhiteSpace(GetString("Ecom:Product:Field.SpecificationsHeader"))) { string specificationsLink = GetString("Ecom:Product:Field.Specifications"); if (!string.IsNullOrWhiteSpace(specificationsLink)) { String[] specsId = specificationsLink.Split(delimiter); @RenderSpecifications(specsId[1]) } } @* Product comparison *@ @{string productComparisonLink = GetString("Ecom:Product:Field.ProductComparison"); if (!string.IsNullOrWhiteSpace(productComparisonLink)) { <div class="o-featureComparison helperProductPageExtraItems"> <div class="container"> <div class="base-accordion base-accordion--mobileOnly"> @if (!string.IsNullOrWhiteSpace(GetString("Ecom:Product:Field.ProductComparisonHeader"))) { <h2 class="a-heading a-heading--productPage base-accordion__header ">@GetString("Ecom:Product:Field.ProductComparisonHeader")</h2> } <div class="base-accordion__content js-accordion"> <section class="o-text-element"> <div class="o-text-element__col o-text-element__col--embeddedOneCol"> <div class="o-text-element__content o-text-element__content--left"> @{ String[] pcId = productComparisonLink.Split(delimiter); @RenderProductComparison(pcId[1]) } </div> </div> </section> </div> </div> </div> </div> } } @* Related products *@ @{ var relatedProductList = prod.RelatedGroups.Where(rg => rg.Name.ToLower() == "related products").SelectMany(rp => rp.Products.Where(p => p.Active)); if (relatedProductList.Any()) { <div class="container o-relatedProducts__outer"> <div class="o-relatedProducts"> <h2 class="a-heading a-heading--productPage ">@Translate("Related products", "Related products")</h2> <ul class="row o-relatedProducts__list"> @*@foreach (var product in productList.Select(p => p.Product).Where(p => p.Active))*@ @foreach (var product in relatedProductList) { string prodId = product.Id; string prodName = product.Name; string prodNumber = product.Number; string prodImage = "/Files/Images/Products/" + prodNumber + ".jpg".Replace(" ", "%20"); string prodDesc = product.ShortDescription; string prodLink = ""; if (product.ProductFieldValues.GetProductFieldValue("SaleOrRental").Value != null && product.ProductFieldValues.GetProductFieldValue("SaleOrRental").Value.ToString() == "Rental") { prodLink = Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl("default.aspx?id=" + rentalPageId + "&groupId=" + product.PrimaryGroupId + "&productId=" + prodId); } else { prodLink = Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl("default.aspx?id=" + productPageId + "&groupId=" + product.PrimaryGroupId + "&productId=" + prodId); } <li class="col-xs-12 col-sm-6 col-md-3 o-relatedProducts__item"> <a href="@prodLink" title="" property="url" class="m-product-card m-product-card--3prices"> <div class="m-product-card__image-holder"> <img class="lazyload lazyload-measure lazyload-bg a-image m-cardImageText__image" src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" alt="@prodName" property="contentUrl" data-src="@prodImage" data-query-obj='{ "mode":"crop" , "quality":"80", "upscale":false }'> <noscript> <img src="@prodImage?mode=crop&width=400" alt="@prodName"> </noscript> </div> <div class="m-product-card__content"> <h4 class="m-product-card__header">@prodName</h4> <p class="m-product-card__subheader">@prodDesc</p> </div> <div class="m-product-card__btnPriceHolder"> <div class="m-product-card__btn-holder"> <span class="a-button a-button--s a-button--green m-product-card__btn"> @Translate("More info", "More info") </span> </div> <div class="m-product-card__priceHolder"> @Helpers.GetListPrice(product) </div> </div> </a> </li> } </ul> </div> </div> } } @* News *@ @{ IEnumerable<string> list = new string[] { "NewsPage" }; var pageList = Dynamicweb.Extensibility.ServiceLocator.Current.GetPageService().GetPagesForItems(list); List<Dynamicweb.Content.Page> relatedNewsList = new List<Dynamicweb.Content.Page>(); foreach (var segment in GetLoop("Segments.Options")) { if (segment.GetString("Segments.Option.IsSelected") == "true" && pageList.Any()) { var SOName = segment.GetString("Segments.Option.Name"); var newsList = pageList.Where( p => p.Item.FirstOrDefault( v => v.Key == "Categories" ).Value != null && p.Item.FirstOrDefault( v => v.Key == "Categories" ).Value.ToString().Split(',').ToList().Any(st => Translate(st) == SOName) && p.Item.FirstOrDefault(d => d.Key == "Date").Value != null ); relatedNewsList.AddRange(newsList); } } relatedNewsList = relatedNewsList.Distinct().Where(x => x.Published).OrderByDescending(p => DateTime.Parse(p.Item.FirstOrDefault(iv => iv.Key == "Date").Value.ToString())).Take(3).ToList(); if (relatedNewsList.Any()) { <div class="container o-news-list"> @if (!string.IsNullOrWhiteSpace(GetString("Ecom:Product:Field.RelatedNewsHeader"))) { <h2 class="a-heading a-heading--productPage">@GetString("Ecom:Product:Field.RelatedNewsHeader")</h2> } <div class="o-news-list__listHolder"> @foreach (var ni in relatedNewsList) { var page = Dynamicweb.Services.Pages.GetPage(ni.ID); string relatedLink = Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl("default.aspx?id=" + ni.ID); string teasertext = ""; if (!string.IsNullOrWhiteSpace(ni.Item["Teaser"].ToString())) { teasertext = ni.Item["Teaser"].ToString(); } else { teasertext = page.Description; } string date = ni.Item["Date"].ToString(); DateTime dt = DateTime.ParseExact(date, "dd/MM/yyyy HH:mm:ss", System.Globalization.CultureInfo.InvariantCulture); string imageAltText = Dynamicweb.Content.Items.Item.GetItemById("Image", ni.Item["Image"].ToString())["AltText"].ToString(); string imageLink = Dynamicweb.Content.Items.Item.GetItemById("Image", ni.Item["Image"].ToString())["Image"].ToString(); <div class="o-news-list__item"> <div class="m-cardImageText "> <a href="@relatedLink" class="m-cardImageText__link"> <figure class="m-cardImageText__figure"> <img class="lazyload lazyload-measure a-image m-cardImageText__image" src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" alt="@imageAltText" property="contentUrl" data-src="@imageLink?mode=crop" data-query-obj='{ }'> <noscript> <img src="@imageLink?mode=crop&width=" alt="@imageAltText"> </noscript> </figure> <h3 class="m-cardImageText__header">@ni.Item["Header"]</h3> <div class="m-cardImageText__body"> <p class="m-cardImageText__facts"> <span class="m-cardImageText__date">@dt.ToString("d MMMM yyyy")</span> </p> <p class="m-cardImageText__teaser">@teasertext</p> </div> <span class="m-cardImageText__linkFake"> <span class="m-cardImageText__linkArrow"> &rsaquo; </span> @Translate("Read more", "Read more") </span> </a> </div> </div> } </div> </div> } } @* HELPERS *@ @helper RenderHardwarePrice(bool soldout, double stockCount, string productProductCategory, string alsoAvailableLink) { string inputDisabled = ""; string priceDisabledClass = ""; string buttonDisabledClass = ""; if (soldout) { //inputDisabled = "disabled"; //priceDisabledClass = "m-price--disabled"; //buttonDisabledClass = "a-button--disabled"; } <form method="post" role="form"> @RenderMyEivaInfoOverlay() <div class="container"> <div class="o-priceBar o-priceBar--hardware"> @if (!(productProductCategory == "E-learning" && GetDouble("Ecom:Product.Price.Price") == 0)) { <div class="o-priceBar__item o-priceBar__item--amount "> <div class="m-amountInputArrows m-amountInputArrows--withLabel"> <div class="m-amountInputArrows__inputHolder"> <input data-stock="@stockCount" @inputDisabled max="9999" value="1" class="a-input m-amountInputArrows--withLabel m-amountInputArrows__input" type="number" name="quantity" id="amountHardware" placeholder="" /> <label for="amountHardware" class="m-amountInputArrows__label">@(GetString("Ecom:Product:Field.ProductUnit").Replace("license", "licence"))</label> <button type="button" class="m-amountInputArrows__button m-amountInputArrows__button--prodDetailStdJs m-amountInputArrows__button--up"></button> <button type="button" class="m-amountInputArrows__button m-amountInputArrows__button--prodDetailStdJs m-amountInputArrows__button--down"></button> </div> </div> </div> } <div class="o-priceBar__item o-priceBar__item--link"> <div class="o-priceBar__link"> @if (!string.IsNullOrEmpty(alsoAvailableLink) && !string.IsNullOrWhiteSpace(GetString("Ecom:Product:Field.AlsoAvailableText"))) { <a href="@alsoAvailableLink"> @GetString("Ecom:Product:Field.AlsoAvailableText") </a> } </div> </div> <div class="o-priceBar__item o-priceBar__item--price"> @if (GetBoolean("Ecom:Product.CategoryField.Hardware.Price_Tooltip.Value")) { <div class="m-tooltip"> <input type="checkbox" class="m-tooltip__checkbox" id="m-tooltip-1"> <label for="m-tooltip-1"> <svg class="a-svgIcon m-tooltip__svg"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/frontend/dist/icons/icons.svg#info"></use></svg> </label> <div class="m-tooltip__text"> <p>@Translate("Nordic Region", "Only for sale in the Nordic Region")</p> </div> </div> } @if (!(productProductCategory == "E-learning" && GetDouble("Ecom:Product.Price.Price") == 0)) { <div class="m-price"> <span class="m-price__price @priceDisabledClass"><span class="m-price__unit">@GetValue("Ecom:Product.Price.Currency.Symbol")</span><span id="hardwarePrice" data-price-var="@GetValue("Ecom:Product.Price.PricePIP")">@GetValue("Ecom:Product.Price.Price")</span></span> <span class="m-price__vat">@Translate("ExclVAT" + productProductCategory, "excl VAT, excl shipping fee")</span> </div> } </div> <div class="o-priceBar__item o-priceBar__item--buttons"> <span class="hidden stock-limit js-stock-limit">@Translate("Stock limit", "Stock limit")</span> <input id="oPriceBarHardwareID" type="hidden" name="ID" value="@GetValue("Ecom:Product:Page.ID")" /> <input id="oPriceBarHardwareProductID" type="hidden" name="ProductID" value="@GetValue("Ecom:Product.ID")" /> <input id="oPriceBarHardwareCartCmd" type="hidden" name="CartCmd" value="add" /> <button type="submit" onclick="novicell.cart.addToCart(event, 'hardware');" @inputDisabled class="a-button a-button--l a-button--green o-priceBar__button @buttonDisabledClass"> @Translate("Add to basket", "Add to basket") </button> @if (!string.IsNullOrWhiteSpace(GetString("Ecom:Product:Field.MoreInfoText"))) { var moreInfoLink = GetString("Ecom:Product:Field.MoreInfoLink.Value.Clean"); if (moreInfoLink.IndexOf("/Files") > -1 && moreInfoLink.IndexOf(".") < 0) { moreInfoLink = moreInfoLink.Substring("/Files".Length); } <a href="@moreInfoLink" @(GetBoolean("Ecom:Product:Field.moreInfoNoNewTab") ? "" : "target=\"blank\"") title="@GetString("Ecom:Product:Field.MoreInfoText")" property="url" class="a-button a-button--l a-button--white o-priceBar__button "> @GetString("Ecom:Product:Field.MoreInfoText") </a> } </div> @{ string stockColor = "green"; if (stockCount < 1) { stockColor = "red"; } } <div class="o-priceBar__item o-priceBar__item--inStock o-priceBar__item--outside"> <div class="m-inStock m-inStock--@stockColor"> @if (productProductCategory != "E-learning") { <span class="m-inStock__inStock"> @if (stockCount < 1) { //@Translate("Out of stock", "Out of stock") } else { @: @Translate("In stock", "In stock") &#8210; } </span> } <span class="m-inStock__additionalText"> @*Deliverytime*@ @if (productProductCategory == "E-learning") { <div class="m-inStock__subscription"> @Translate("Deliverytime:", "Deliverytime: ") @Translate("DeliverytimeElearningInStock", "1-4 working days") <div class="m-tooltip m-tooltip--productPageDeliveryTime"> <input type="checkbox" class="m-tooltip__checkbox" id="m-tooltip-1"> <label for="m-tooltip-1"> <svg class="a-svgIcon m-tooltip__svg"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/frontend/dist/icons/icons.svg#info"></use></svg> </label> <div class="m-tooltip__text"> <p>@Pageview.Area.Item["Delivery_Tooltip_eLearning"].ToString()</p> </div> </div> </div> } else if (stockCount < 1) { @Translate("Deliverytime:", "Deliverytime: ") @Translate("DeliverytimeHardwareOutOfStock", "4-10 weeks") } else { @Translate("Deliverytime:", "Deliverytime: ") @Translate("DeliverytimeHardwareInStock", "2-6 working days") } </span> </div> </div> </div> </div> </form> } @helper RenderSoftwarePrice(string productProductCategory, Product product, string alsoAvailableLink) { string licensetypes = Pageview.Area.Item["LicenseTypes"].ToString(); var licensetypesLinkItem = Dynamicweb.Extensibility.ServiceLocator.Current.GetItemService().GetItem("Link", licensetypes); string licensetypesLinkValue = licensetypesLinkItem["Link"].ToString(); string licensetypesLinkTextValue = licensetypesLinkItem["Title"].ToString(); var variants = GetLoop("VariantCombinations").Where(n => n.GetString("Ecom:VariantCombination.VariantText") != "Permanent license"); var variantPermanent = GetLoop("VariantCombinations").Where(n => n.GetString("Ecom:VariantCombination.VariantText") == "Permanent license"); string variantPermanentId = ""; int defaultMinimumAmount = 3; double permanentPrice = 0; if (variantPermanent.Any()) { if (product.Prices.Any(p => p.VariantId == variantPermanent.First().GetString("Ecom:VariantCombination.VariantID"))) { permanentPrice = product.Prices.First(p => p.VariantId == variantPermanent.First().GetString("Ecom:VariantCombination.VariantID")).Amount; variantPermanentId = variantPermanent.First().GetString("Ecom:VariantCombination.VariantID"); } } <form method="post" role="form"> @RenderMyEivaInfoOverlay() @RenderMyEivaLinkOverlay() <input type="hidden" name="quantity" id="quantity" value="@defaultMinimumAmount" /> @if (variants.Any()) { <input type="hidden" name="VariantID" id="VariantID" value="@variants.FirstOrDefault().GetString("Ecom:VariantCombination.VariantID")" /> } else if (variantPermanent.Any()) { <input type="hidden" name="VariantID" id="VariantID" value="@variantPermanent.FirstOrDefault().GetString("Ecom:VariantCombination.VariantID")" /> } <div class="container"> <div class="o-priceBar o-priceBar--software"> <div class="o-priceBar__item o-priceBar__item--amount "> <div class="o-priceBar__item o-priceBar__item--licenseOrSubscription"> <a href="@licensetypesLinkValue" class="o-priceBar__link o-priceBar__link--licenseSubscriptionLink"> <span class="o-priceBar__fakeLink">@licensetypesLinkTextValue</span> </a> <div class="m-amountInputArrows m-amountInputArrows--withLabel"> <div class="m-amountInputArrows__inputHolder"> <input max="9999" value="1" class="a-input m-amountInputArrows__input" type="number" name="EcomOrderLineFieldInput_Licenses" id="EcomOrderLineFieldInput_Licenses" placeholder="" /> <label for="EcomOrderLineFieldInput_Licenses" class="m-amountInputArrows__label">@Translate("license", "licence")</label> <button type="button" class="m-amountInputArrows__button m-amountInputArrows__button--prodDetailJs m-amountInputArrows__button--up"></button> <button type="button" class="m-amountInputArrows__button m-amountInputArrows__button--prodDetailJs m-amountInputArrows__button--down"></button> </div> </div> <div class="m-radioCustom"> @if (variants.Any()) { <input class="m-radioCustom__input" type="radio" id="subscriptionOrPermanent--subscription" name="subscriptionOrPermanent" checked> <label class="m-radioCustom__label" for="subscriptionOrPermanent--subscription">Subscription</label> } @if (variantPermanent.Any()) { string permanentChecked = ""; if (!variants.Any()) { permanentChecked = "checked"; } <input class="m-radioCustom__input" type="radio" id="subscriptionOrPermanent--permanent" value="@variantPermanentId" name="subscriptionOrPermanent" data-price="@permanentPrice" @permanentChecked> <label class="m-radioCustom__label" for="subscriptionOrPermanent--permanent">Permanent</label> } </div> </div> </div> <div class="o-priceBar__item o-priceBar__item--link o-priceBar__item--outside"> @if (!string.IsNullOrEmpty(alsoAvailableLink) && !string.IsNullOrWhiteSpace(GetString("Ecom:Product:Field.AlsoAvailableText"))) { <div class="o-priceBar__link"> <a href="@alsoAvailableLink"> @GetString("Ecom:Product:Field.AlsoAvailableText") </a> </div> } </div> <div id="o-priceBar__item--price-software" class="o-priceBar__item o-priceBar__item--price"> <div class="m-price"> <span class="m-price__price"><span class="m-price__unit">@GetValue("Ecom:Product.Price.Currency.Symbol")</span><span id="softwarePrice" data-price-var="@GetValue("Ecom:Product.Price.PricePIP")"></span></span> <span class="m-price__vat">@Translate("ExclVAT" + productProductCategory, "excl VAT, excl shipping fee")</span> </div> </div> @{ var extraButtonItemClass = !string.IsNullOrWhiteSpace(GetString("Ecom:Product:Field.MoreInfoText")) ? "o-priceBar__item--2buttons" : ""; } <div class="o-priceBar__item o-priceBar__item--buttons @extraButtonItemClass"> <input type="hidden" name="ID" value="@GetValue("Ecom:Product:Page.ID")" /> <input type="hidden" id="softwareProductId" name="ProductID" value="@GetValue("Ecom:Product.ID")" /> <input type="hidden" name="CartCmd" value="add" /> <button onclick="novicell.cart.addToCart(event, 'software');" type="submit" class="a-button a-button--l a-button--green o-priceBar__button">@Translate("Add to basket", "Add to basket")</button> @if (!string.IsNullOrWhiteSpace(GetString("Ecom:Product:Field.MoreInfoText"))) { var moreInfoLink = GetString("Ecom:Product:Field.MoreInfoLink.Value.Clean"); if (moreInfoLink.IndexOf("/Files") > -1 && moreInfoLink.IndexOf(".") < 0) { moreInfoLink = moreInfoLink.Substring("/Files".Length); } <a href="@moreInfoLink" @(GetBoolean("Ecom:Product:Field.moreInfoNoNewTab") ? "" : "target=\"blank\"") title="@GetString("Ecom:Product:Field.MoreInfoText")" property="url" class="a-button a-button--l a-button--white o-priceBar__button "> @GetString("Ecom:Product:Field.MoreInfoText") </a> } </div> @if (variants.Any()) { <div class="o-priceBar__item o-priceBar__item--extraStuff"> <div class="m-amountInputArrows m-amountInputArrows--withLabel"> <div class="m-amountInputArrows__inputHolder"> <input max="9999" data-min="@defaultMinimumAmount" value="1" class="a-input m-amountInputArrows__input" type="number" name="EcomOrderLineFieldInput_SubscriptionQuantity" id="selectId2" placeholder="" /> <div class="m-amountInputArrows__label"></div> <button type="button" class="m-amountInputArrows__button m-amountInputArrows__button--prodDetailJs m-amountInputArrows__button--up"></button> <button type="button" class="m-amountInputArrows__button m-amountInputArrows__button--prodDetailJs m-amountInputArrows__button--down"></button> </div> </div> <div class="o-priceBar__item o-priceBar__item--licenseOrSubscription"> <div class="m-radioCustom"> @{ int variantCount = 1; foreach (LoopItem i in variants.OrderByDescending(n => n.GetString("Ecom:VariantCombination.VariantText"))) { if (product.Prices.Any(p => p.VariantId == i.GetString("Ecom:VariantCombination.VariantID"))) { string variantChecked = ""; if (variantCount == 1) { variantChecked = "checked=\"checked\""; } double variantPrice = 0; string fieldExtraClass = "daysOrWeeks__" + i.GetString("Ecom:VariantCombination.VariantText"); variantPrice = product.Prices.First(p => p.VariantId == i.GetString("Ecom:VariantCombination.VariantID")).Amount; <input class="m-radioCustom__input @fieldExtraClass" data-price="@variantPrice" type="radio" id="@(i.GetString("Ecom:VariantCombination.VariantID"))" name="daysOrWeeks" @variantChecked> <label class="m-radioCustom__label" for="@(i.GetString("Ecom:VariantCombination.VariantID"))">@(i.GetString("Ecom:VariantCombination.VariantText") + "s")</label> variantCount++; } } } </div> </div> </div> } <div class="o-priceBar__item o-priceBar__item--inStock o-priceBar__item--outside"> <div class="m-inStock"> <span class="m-inStock__additionalText"> @*Deliverytime*@ @if (GetString("Rack_software") == "True") { @Translate("Deliverytime:", "Deliverytime: ") @Translate("DeliverytimeRack", "4-10 weeks")<br /> } else { if (variants.Any()) { <div class="m-inStock__subscription"> @{ var variantName = GetString("Ecom:Product.ProductVariantText"); } @Translate("Deliverytime:", "Delivery time: ")<span>&nbsp;</span> <span id="subscription-delivery-time" class="@(variantName == "Permanent license" ? "hidden" : "")"> @Translate("DeliverytimeSubscription", "A few hours") </span> <span id="permanent-delivery-time" class="@(variantName == "Permanent license" ? "" : "hidden")"> @Translate("DeliverytimePermanentLicense", "2-6 working days") </span> <div class="m-tooltip m-tooltip--productPageDeliveryTime"> <input type="checkbox" class="m-tooltip__checkbox" id="m-tooltip-1"> <label for="m-tooltip-1"> <svg class="a-svgIcon m-tooltip__svg"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/frontend/dist/icons/icons.svg#info"></use></svg> </label> <div class="m-tooltip__text"> <p>@Translate("InStockTooltipInfoText:", "Tooltip for in stock text")</p> </div> </div> </div> } @*if (variantPermanent.Any()) { @Translate("Deliverytime permanent license:", "Deliverytime permanent license: ") @Translate("DeliverytimePermanentLicense", "2-6 working days") }*@ } </span> </div> </div> </div> </div> </form> } @helper RenderPriceRequest(string productCategory, string productName, string alsoAvailableLink) { <!--RenderPriceRequest--> Dynamicweb.Ecommerce.Products.Group parentgrp = Services.ProductGroups.GetGroup(GetString("Ecom:Product.PrimaryOrFirstGroupID")); if (!parentgrp.IsTopGroup) { do { parentgrp = parentgrp.ParentGroups.FirstOrDefault(); } while (parentgrp != null && !parentgrp.IsTopGroup); } string requestPriceFormPageId = Pageview.Area.Item["RequestPriceFormPageId"].ToString(); string requestLink = Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl("default.aspx?id=" + requestPriceFormPageId); //Rental string requestRentalPriceFormPageId = Pageview.Area.Item["RequestRentalPriceFormPageId"].ToString(); string requestRentalLink = Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl("default.aspx?id=" + requestRentalPriceFormPageId); <div class="container"> <div class="o-priceBar o-priceBar--softwareRequestPrice"> <div class="o-priceBar__item o-priceBar__item--link"> @if (!string.IsNullOrEmpty(alsoAvailableLink) && !string.IsNullOrWhiteSpace(GetString("Ecom:Product:Field.AlsoAvailableText"))) { <div class="o-priceBar__link"> <a href="@alsoAvailableLink"> @GetString("Ecom:Product:Field.AlsoAvailableText") </a> </div> } </div> <div class="o-priceBar__item o-priceBar__item--buttons"> @if (!(productCategory == "E-learning" && GetDouble("Ecom:Product.Price.Price") == 0)) { if (GetString("SaleOrRental") == "Rental") { <a href="@requestRentalLink?NoviRequestQuote_Product=@productName&NoviRequestQuote_Supplier=@GetString("Ecom:Manufacturer.Name")" title="Request price" property="url" class="a-button a-button--l a-button--green o-priceBar__button "> @Translate("Request rental price", "Request rental price") </a> } else { <a href="@requestLink?NoviRequestQuote_Product=@productName&NoviRequestQuote_Supplier=@GetString("Ecom:Manufacturer.Name")" title="Request price" property="url" class="a-button a-button--l a-button--green o-priceBar__button "> @Translate("Request price", "Request price") </a> } } @if (!string.IsNullOrWhiteSpace(GetString("Ecom:Product:Field.MoreInfoText"))) { var moreInfoLink = GetString("Ecom:Product:Field.MoreInfoLink.Value.Clean"); if (moreInfoLink.IndexOf("/Files") > -1 && moreInfoLink.IndexOf(".") < 0) { moreInfoLink = moreInfoLink.Substring("/Files".Length); } <a href="@moreInfoLink" @(GetBoolean("Ecom:Product:Field.moreInfoNoNewTab") ? "" : "target=\"blank\"") title="@GetString("Ecom:Product:Field.MoreInfoText")" property="url" class="a-button a-button--l a-button--white o-priceBar__button "> @GetString("Ecom:Product:Field.MoreInfoText") </a> } </div> </div> </div> } @helper RenderTrainingPriceNoPrice(string productProductCategory, string alsoAvailableLink) { <div class="container"> <div class="o-priceBar o-priceBar--training"> <div class="o-priceBar__item"> <div class="m-seatsAvailable m-seatsAvailable--soldOut"> <svg class="a-svgIcon m-seatsAvailable__iconHolder"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/frontend/dist/icons/icons.svg#info"></use></svg> <span class="m-seatsAvailable__text"> @Translate("For further information, please contact ", "For further information, please contact ") <a href="mailto:@GetString("Further_contact_Email")">@GetString("Further_contact_Email")</a> </span> </div> </div> @if (!string.IsNullOrEmpty(alsoAvailableLink) && !string.IsNullOrWhiteSpace(GetString("Ecom:Product:Field.AlsoAvailableText"))) { <div class="o-priceBar__item o-priceBar__item--link2 o-priceBar__item--outside"> <div class="o-priceBar__link"> <a href="@alsoAvailableLink"> @GetString("Ecom:Product:Field.AlsoAvailableText") </a> </div> </div> } </div> </div> } @helper RenderTrainingPrice(string productProductCategory, string alsoAvailableLink, double stockCount) { <form method="post" role="form"> <input type="hidden" name="ID" value="@GetValue("Ecom:Product:Page.ID")" /> <input type="hidden" id="ProductID" name="ProductID" value="@GetValue("Ecom:Product.ID")" /> <input type="hidden" name="CartCmd" value="add" /> @RenderMyEivaInfoOverlay() <div class="container"> <div class="o-priceBar o-priceBar--training"> <div class="o-priceBar__item o-priceBar__item--seatsAvailable"> <div class="m-seatsAvailable "> <svg class="a-svgIcon m-seatsAvailable__iconHolder"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/frontend/dist/icons/icons.svg#checkmark"></use></svg> <span class="m-seatsAvailable__text"> @Translate("seats available", "seats available") </span> </div> </div> <div class="o-priceBar__item o-priceBar__item--amount "> <div class="m-amountInputArrows m-amountInputArrows--withLabel"> <div class="m-amountInputArrows__inputHolder"> <input data-stock="@stockCount" max="9999" value="1" class="a-input m-amountInputArrows--withLabel m-amountInputArrows__input" type="number" name="quantity" id="amountTraining" placeholder="" /> <label for="amountTraining" class="m-amountInputArrows__label">@Translate("seat", "seat")</label> <button type="button" class="m-amountInputArrows__button m-amountInputArrows__button--prodDetailStdJs m-amountInputArrows__button--up"></button> <button type="button" class="m-amountInputArrows__button m-amountInputArrows__button--prodDetailStdJs m-amountInputArrows__button--down"></button> </div> </div> </div> <div class="o-priceBar__item o-priceBar__item--price"> <div class="m-price"> <span class="m-price__price"><span class="m-price__unit">@GetValue("Ecom:Product.Price.Currency.Symbol")</span><span id="trainingPriceNormal" data-price-var="@GetValue("Ecom:Product.Price.PricePIP")">@GetValue("Ecom:Product.Price.Price")</span></span> <span class="m-price__vat">@Translate("ExclVAT" + productProductCategory, "excl VAT")</span> </div> </div> <div class="o-priceBar__item o-priceBar__item--buttons"> <span class="hidden stock-limit js-stock-limit">@Translate("Seat stock limit", "Seat stock limit")</span> <button type="submit" onclick="novicell.cart.addToCart(event, 'training');" property="url" class="a-button a-button--l a-button--green o-priceBar__button "> @Translate("Add to basket", "Add to basket") </button> @if (!string.IsNullOrWhiteSpace(GetString("Ecom:Product:Field.MoreInfoText"))) { var moreInfoLink = GetString("Ecom:Product:Field.MoreInfoLink.Value.Clean"); if (moreInfoLink.IndexOf("/Files") > -1 && moreInfoLink.IndexOf(".") < 0) { moreInfoLink = moreInfoLink.Substring("/Files".Length); } <a href="@moreInfoLink" @(GetBoolean("Ecom:Product:Field.moreInfoNoNewTab") ? "" : "target=\"blank\"") title="@GetString("Ecom:Product:Field.MoreInfoText")" property="url" class="a-button a-button--l a-button--white o-priceBar__button "> @GetString("Ecom:Product:Field.MoreInfoText") </a> } </div> @if (!string.IsNullOrEmpty(GetString("Ecom:Product:Field.AlsoAvailableLink")) && !string.IsNullOrWhiteSpace(GetString("Ecom:Product:Field.AlsoAvailableText"))) { <div class="o-priceBar__item o-priceBar__item--link2 o-priceBar__item--outside"> <div class="o-priceBar__link"><a href="@GetString("Ecom:Product:Field.AlsoAvailableLink")">@GetString("Ecom:Product:Field.AlsoAvailableText")</a></div> </div> } </div> </div> </form> } @helper RenderTrainingPriceSoldout(string productProductCategory, string alsoAvailableLink) { <div class="container"> <div class="o-priceBar o-priceBar--training o-priceBar--training-soldout"> <div class="o-priceBar__item o-priceBar__item--seatsAvailable o-priceBar__item--seatsAvailableSoldout"> <div class="m-seatsAvailable m-seatsAvailable--soldOut"> <svg class="a-svgIcon m-seatsAvailable__iconHolder"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/frontend/dist/icons/icons.svg#info"></use></svg> <span class="m-seatsAvailable__text"> @Translate("No seats available at the moment", "No seats available at the moment. Contact mai@eiva.com to get on the list.") </span> </div> </div> <div class="o-priceBar__item o-priceBar__item--amount "> <div class="m-amountInputArrows m-amountInputArrows--withLabel m-amountInputArrows--disabled"> <label class="a-label m-amountInputArrows--withLabel m-amountInputArrows__labelBefore" for="amountTraining"> </label> <div class="m-amountInputArrows__inputHolder"> <input max="9999" value="1" class="a-input m-amountInputArrows--withLabel m-amountInputArrows__input" type="number" name="quantity" id="amountTraining" placeholder="" disabled /> <label for="amountTraining" class="m-amountInputArrows__label">@Translate("seat", "seat")</label> <button type="button" class="m-amountInputArrows__button m-amountInputArrows__button--prodDetailStdJs m-amountInputArrows__button--up"></button> <button type="button" class="m-amountInputArrows__button m-amountInputArrows__button--prodDetailStdJs m-amountInputArrows__button--down"></button> </div> </div> </div> <div class="o-priceBar__item o-priceBar__item--price"> <div class="m-price m-price--disabled"> <span class="m-price__price"><span class="m-price__unit">@GetValue("Ecom:Product.Price.Currency.Symbol")</span><span id="trainingPriceSoldOut" data-price-var="@GetValue("Ecom:Product.Price.PricePIP")">@GetValue("Ecom:Product.Price.Price")</span></span> <span class="m-price__vat">@Translate("ExclVAT" + productProductCategory, "excl VAT, excl shipping fee")</span> </div> </div> <div class="o-priceBar__item o-priceBar__item--buttons"> <button type="submit" disabled property="url" class="a-button a-button--l a-button--green o-priceBar__button a-button--disabled"> @Translate("Add to basket", "Add to basket") </button> </div> @if (!string.IsNullOrEmpty(alsoAvailableLink) && !string.IsNullOrWhiteSpace(GetString("Ecom:Product:Field.AlsoAvailableText"))) { <div class="o-priceBar__item o-priceBar__item--link2 o-priceBar__item--outside"> <div class="o-priceBar__link"> <a href="@alsoAvailableLink"> @GetString("Ecom:Product:Field.AlsoAvailableText") </a> </div> </div> } </div> </div> } @helper RenderAlsoAvailableForLink(Product prod) { @* Also available for *@ if (!string.IsNullOrWhiteSpace(GetString("Ecom:Product:Field.AlsoAvailableText"))) { <div class="o-priceBar__item o-priceBar__item--link2 o-priceBar__item--outside"> <div class="o-priceBar__link">@GetString("Ecom:Product:Field.AlsoAvailableText")</div> </div> } } @helper RenderFeature(string pageId) { int id = Int32.Parse(pageId); if (Dynamicweb.Services.Pages.GetPage(id) != null) { var paragraphs = Dynamicweb.Services.Paragraphs.GetParagraphsByPageId(id); var pageItem = Dynamicweb.Services.Items.GetItemByPageId(id, false); <li class="col-xs-12 col-sm-6 col-md-3 o-highlightedFeatures__item"> <a href="#" title="" property="url" class="m-product-card m-product-card--highlightedFeature m-product-card__btn--openFeatureOverlay" data-feature-overlay-id="overlay@(id)"> <div class="m-product-card__image-holder"> <img class="lazyload lazyload-measure lazyload-bg a-image m-cardImageText__image" src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" alt="@pageItem["ListHeader"]" property="contentUrl" data-src="@pageItem["ListImage"]" data-query-obj='{ "mode":"crop" , "quality":"80", "upscale":false }'> <noscript> <img src="@pageItem["ListImage"]?mode=crop&width=400" alt="@pageItem["ListHeader"]"> </noscript> </div> <div class="m-product-card__content"> <h4 class="m-product-card__header">@pageItem["ListHeader"]</h4> <p class="m-product-card__subheader">@pageItem["ListTeaser"]</p> </div> <div class="m-product-card__btnPriceHolder"> <div class="m-product-card__btn-holder"> <span class="a-button a-button--s a-button--green m-product-card__btn"> @pageItem["ListButtonText"] </span> </div> </div> </a> <div class="m-product-card__featureOverlayContentHolder" id="overlay@(id)"> @foreach (var pi in paragraphs) { if (pi.GlobalID == default(int)) { @RenderParagraphContent(pi.ID) } else { @RenderParagraphContent(pi.GlobalID) } } </div> </li> } } @helper RenderSpecifications(string pageId) { int id = Int32.Parse(pageId); var mainItem = Dynamicweb.Services.Items.GetItemByPageId(id, false); int iid = 0; var specsType = mainItem["Specifications"] != null && int.TryParse(mainItem["Specifications"].ToString(), out iid) ? "specifications" : "comparisonTable"; var mainClass = specsType == "specifications" ? "o-productSpecifications" : "o-featureComparison o-featureComparison--noVisibleScroll"; <div class="@mainClass helperProductPageExtraItems"> <div class="container"> <div class="base-accordion base-accordion--mobileOnly"> <h2 class="a-heading a-heading--productPage base-accordion__header ">@GetString("Ecom:Product:Field.SpecificationsHeader")</h2> <div class="base-accordion__content js-accordion"> @if (specsType == "specifications") { var itemList = ItemList.GetItemListById(iid).Relations; <dl class="o-productSpecifications__list"> @foreach (var item in itemList.ToList()) { var i = Dynamicweb.Services.Items.GetItem("SpecificationItem", item.Id.ToString()); <dt class="o-productSpecifications__item o-productSpecifications__item--term"> @i["LeftColumn"] </dt> <dd class="o-productSpecifications__item o-productSpecifications__item--data"> @i["RightColumn"] </dd> } </dl> } else { @RenderProductComparison(pageId) } </div> </div> </div> </div> } @helper RenderProductComparison(string pageId) { int id = Int32.Parse(pageId); var item = Dynamicweb.Services.Items.GetItemByPageId(id, false); <section class="o-text-element"> <div class="o-text-element__col o-text-element__col--embeddedOneCol"> <div class="o-text-element__content o-text-element__content--left"> <div class="m-rich-text-editor o-text-element__rte"> @item["ProductComparison"] </div> </div> </div> </section> } @helper sliderOverlayItem(string image, string altText, string videoId) { <li class="m-productImageSlider__itemOverlay"> <div class="m-productImageSlider__slideHolder overlay-slideHolder@(!string.IsNullOrEmpty(videoId) ? " video-slide" : "")"> @if (!string.IsNullOrEmpty(videoId)) { <iframe data-src="https://www.youtube.com/embed/@videoId?autoplay=true&amp;rel=0" class="m-productImageSlider__videoIframe" frameborder="0" allowfullscreen="" width="100%" height="100%"></iframe> } else { <img class="slide-image" src="@image?mode=crop&quality=100&upscale=false" alt="@altText" /> } </div> </li> } @helper sliderLargeItem(string image, string altText, string videoId) { <li class="m-productImageSlider__item"> <div class="m-productImageSlider__slideHolder"> <img class="lazyload lazyload-measure lazyload-bg a-image m-productImageSlider__image" src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" alt="@altText" property="contentUrl" data-src="@image" data-query-obj='{ "mode":"crop" , "quality":"100", "upscale":false }'> <noscript> <img src="@image?mode=crop&width=500" alt="@altText"> </noscript> @if (!string.IsNullOrEmpty(videoId)) { <button class="m-productImageSlider__videoButton" data-videoid="@videoId"> <div class="a-videoPlayIcon "></div> </button> } </div> </li> } @helper sliderSmallItem(string image, string altText, string videoId) { <li class="m-productImageSlider__itemSmall"> <img class="lazyload a-image" src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" alt="@altText" property="contentUrl" data-src="@image?mode=crop&width=62&Height=35" data-query-obj='{ "mode":"crop" , "quality":"80", "upscale":false }'> <noscript> <img src="@image?mode=crop&width=62&Height=35" alt="@altText"> </noscript> @if (!string.IsNullOrEmpty(videoId)) { <div class="a-videoPlayIcon a-videoPlayIcon--small js-a-videoPlayIcon--noPlay"></div> } </li> }
EIVA LIVE - Dive into EIVA's software and hardware solutions for the maritime industry

Want to attend free webinars?

Our upcoming webinars showcase solutions such as an autopilot and software for autonomous hydrographic surveys, as well as new automated ROV inspection modes. The ongoing EIVA LIVE webinar series keeps you up to date on our latest software and hardware developments – with the possibility to dive deeper and ask our experts questions.