0
Din indkøbskurv

Opdaterer kurv

stk. a

-
+

Din kurv i alt (ex. fragt)

Handel videre

Gå til kassen
VISA/DK VISA/DK VISA/DK VISA/DK VISA/DK
Find forhandler

,

Tlf.

Se alle
Exception in template (Designs\Mobler2018\eCom/Product/Product.cshtml): System.NullReferenceException: Object reference not set to an instance of an object.
   at CompiledRazorTemplates.Dynamic.accbeecefeef.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 System.Web @using Mobler.Website.CustomModules.MoblerHelpers @using System.Text.RegularExpressions @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> @{ string shopname = MoblerHelpers.GetShopName(); string SelectPlaceholder = Translate("ShopSelectPlaceholder", "Indtast by, postnummer eller adresse"); var shopInfo = MoblerHelpers.ShopInfo(); int ShopPageId = Firstweb.Custom.CustomCode.Frontend.Helpers.AreaItems.GetInt("ShopPageId"); var AllShops = Firstweb.Custom.CustomCode.Frontend.Helpers.Shops.GetAllShops(ShopPageId); int AjaxCartPageId = Firstweb.Custom.CustomCode.Frontend.Helpers.AreaItems.GetInt("AjaxCartPageId"); int CustomersAlsoSawPageId = Firstweb.Custom.CustomCode.Frontend.Helpers.AreaItems.GetInt("CustomersAlsoSawPageId"); string CartPage = Firstweb.Custom.CustomCode.Frontend.Helpers.AreaItems.GetString("CartPage"); string VariantsEndpoint = Firstweb.Custom.CustomCode.Frontend.Helpers.AreaItems.GetString("VariantsUrl"); string VariantDetailsEndpoint = Firstweb.Custom.CustomCode.Frontend.Helpers.AreaItems.GetString("VariantDetailsUrl"); string BlackFridayTheme = Firstweb.Custom.CustomCode.Frontend.Helpers.AreaItems.GetString("BlackFridayTheme"); string ProductID = GetString("Ecom:Product.ID"); string GroupID = GetString("Ecom:Product.PrimaryOrFirstGroupID"); string DefaultVariantID = GetString("Ecom:Product.DefaultVariantComboID"); string ProductImage = MoblerHelpers.GetProductListImage(ProductID, DefaultVariantID); string ProductName = GetString("Ecom:Product.Name"); string ProductNumber = GetString("Ecom:Product.Number"); string ProductCatalogLink = !String.IsNullOrEmpty(GetString("Ecom:Product:Field.ProductCatelog.Value.Clean")) ? GetString("Ecom:Product:Field.ProductCatelog.Value.Clean") : ""; string VariantId = GetString("Ecom:Product.VariantID"); string ShortDescription = GetString("Ecom:Product.ShortDescription"); string LongDescription = GetString("Ecom:Product.LongDescription").Replace("||", "<br/>"); string MetaDescription = LongDescription.Replace("<br/>", " "); string CurrentVariantName = GetString("Ecom:Product.SelectedVariantComboName"); MetaDescription = Regex.Replace(MetaDescription, "<.*?>", String.Empty); var FaqQuestions = MoblerHelpers.GetProductFAQs(ProductID, GroupID); var RelatedBlogs = Firstweb.Custom.CustomCode.Frontend.Helpers.Blogs.GetBlogsRelatedToProduct(ProductID); bool NewItem = GetBoolean("Ecom:Product:Field.NewItem"); bool LowPrice = GetBoolean("Ecom:Product:Field.Splash3"); Mobler.Website.CustomCode.Frontend.ProductsDisplayVariant productsDisplayVariant = Mobler.Website.CustomCode.Frontend.ProductsDisplayVariant.Instance(); bool ForSale = !GetBoolean("Ecom:Product:Field.NotForSaleOnline"); var MainProdNr = string.Empty; var VariantNr = string.Empty; string FirstImage = ""; if (!string.IsNullOrWhiteSpace(ProductNumber)) { string[] MainProdSplit = ProductNumber.Split('_'); if (MainProdSplit.Length > 1) { MainProdNr = MainProdSplit[0]; VariantNr = MainProdSplit[1]; } else { MainProdNr = ProductNumber; } } var Images = MoblerHelpers.GetProductImages(GetString("Ecom:Product.ID"), VariantNr); bool First = true; bool FirstIndicator = true; int IndicatorIncrementer = 0; string PriceSaving = GetString("Ecom:Product:Field.Spar.Value"); string ProductLink = GetString("Ecom:Product.Link.Clean"); double DiscountedPrice = GetDouble("Ecom:Product.Discount.Price.Price"); double ActualPrice = GetDouble("Ecom:Product.Price.Price"); var TotalDiscount = GetDouble("Ecom:Product.Discount.TotalAmount.Price"); double spar = 0; double price = 0; if (!GetBoolean("Ecom:Product:Field.Splash3.Value") && !GetBoolean("Ecom:Product:Field.Offer.Value")) { if (DiscountedPrice < ActualPrice) { spar = TotalDiscount; price = DiscountedPrice; } else { price = ActualPrice; } } else { spar = GetDouble("Ecom:Product:Field.Spar.Value.Clean"); price = GetDouble("Ecom:Product.Price.Price"); } double OriginalPrice = spar + price; string DataLayerPrice = ActualPrice.ToString().Replace(".", "").Replace(",", "."); System.Web.HttpContext.Current.Items["OverrideOgTags"] = true; string OgImage = "https://mobler.dk" + Images.FirstOrDefault(); string TrimmedTeaser = Firstweb.Custom.CustomCode.Frontend.Helpers.JSFormatting.TrimLinebreaks(ShortDescription); string TrimmedName = Firstweb.Custom.CustomCode.Frontend.Helpers.JSFormatting.TrimLinebreaks(ProductName); var ParentGroups = Firstweb.Custom.CustomCode.Frontend.Helpers.EcomGroups.getBreadCrumbGroupList(GroupID, true); string ShowOnPageUrl = ""; string GetCartEndpoint = Firstweb.Custom.CustomCode.Frontend.Helpers.AreaItems.GetString("GetCartJson"); string QuestionPadding = !String.IsNullOrEmpty(GetString("Ecom:Product:Field.VideoKlip.Value")) ? "pl-lg-4" : ""; string QuickDeliveryColor = Firstweb.Custom.CustomCode.Frontend.Helpers.AreaItems.GetString("QuickDeliveryColor"); string QuickDeliveryDescription = Firstweb.Custom.CustomCode.Frontend.Helpers.AreaItems.GetString("QuickDeliveryDescription"); string NormalDeliveryDescription = Firstweb.Custom.CustomCode.Frontend.Helpers.AreaItems.GetString("NormalDeliveryDescription"); string BrandName = GetString("Ecom:Product:Field.Maerkevarer.Value.Clean"); string DeliveryTime = Translate("DeliveryTime." + BrandName, "Gns. leveringstid 3-12 dage"); string DeliveryColor = "#00AB5D"; bool QuickDelivery = GetBoolean("Ecom:Product:Field.QuickDelivery.Value.Clean"); string CustomDelivery = GetString("Ecom:Product:Field.CustomDeliveryTime.Value.Clean"); if (QuickDelivery) { DeliveryColor = QuickDeliveryColor; DeliveryTime = Translate("DeliveryTime.QuickDelivery", "Ekstra hurtig levering"); } else if (!String.IsNullOrEmpty(CustomDelivery)) { DeliveryTime = CustomDelivery; } string DeliveryFontWeightModifier = QuickDelivery ? "font-weight-bold" : ""; bool DisplayAverageDeliveryTime = Firstweb.Custom.CustomCode.Frontend.Helpers.AreaItems.GetBoolean("DisplayAverageDeliveryTime"); } @SnippetStart("ProductDetailsMeta") <meta name="description" content="@MetaDescription" /> @SnippetEnd("ProductDetailsMeta") @SnippetStart("OgTags") <meta property="og:type" content="product" /> <meta property="og:description" content="@Regex.Replace(ShortDescription, "<.*?>", String.Empty)" /> <meta property="og:image" content="@OgImage" /> @SnippetEnd("OgTags") @using Mobler.Website.CustomModules.MoblerHelpers @using Dynamicweb.Ecommerce.Products @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> @helper RenderProduct(LoopItem product) { string BlackFridayTheme = Firstweb.Custom.CustomCode.Frontend.Helpers.AreaItems.GetString("BlackFridayTheme"); string ProductID = product.GetString("Ecom:Product.ID"); string ProductNumber = product.GetString("Ecom:Product.Number"); string DefaultVariantID = product.GetString("Ecom:Product.DefaultVariantComboID"); string ProductImage = MoblerHelpers.GetProductListImageWithMainImage(ProductID, ProductNumber); string ProductName = product.GetString("Ecom:Product.Name"); string VariantId = product.GetString("Ecom:Product.VariantID"); if (String.IsNullOrEmpty(VariantId)) { VariantId = DefaultVariantID; } bool NewItem = product.GetBoolean("Ecom:Product:Field.NewItem"); bool LowPrice = product.GetBoolean("Ecom:Product:Field.Splash3"); string ShortDescription = product.GetString("Ecom:Product.ShortDescription"); string PriceSaving = product.GetString("Ecom:Product:Field.Spar.Value"); string ProductLink = product.GetString("Ecom:Product.Link.Clean"); if (!String.IsNullOrEmpty(VariantId)) { ProductLink = ProductLink + "&variantid=" + VariantId; } double DiscountedPrice = product.GetDouble("Ecom:Product.Discount.Price.Price"); double ActualPrice = product.GetDouble("Ecom:Product.Price.Price"); var TotalDiscount = product.GetDouble("Ecom:Product.Discount.TotalAmount.Price"); double spar = 0; double price = 0; if (!product.GetBoolean("Ecom:Product:Field.Splash3.Value") && !product.GetBoolean("Ecom:Product:Field.Offer.Value")) { if (DiscountedPrice < ActualPrice) { spar = TotalDiscount; price = DiscountedPrice; } else { price = ActualPrice; } } else { spar = product.GetDouble("Ecom:Product:Field.Spar.Value.Clean"); price = product.GetDouble("Ecom:Product.Price.Price"); } double OriginalPrice = spar + price; var languageId = product.GetString("Ecom:Product.LanguageID"); var dwProduct = Dynamicweb.Ecommerce.Services.Products.GetProductById(ProductID, VariantId, languageId); var VariantCombinations = dwProduct.VariantCombinations.ToList().Where(v => v.GetProduct(languageId).Number != VariantId); bool ManyVariants = VariantCombinations.Count() > 3; if (ManyVariants) { VariantCombinations = VariantCombinations.Take(3).ToList(); } string BrandName = product.GetString("Ecom:Product:Field.Maerkevarer.Value.Clean"); bool QuickDelivery = product.GetBoolean("Ecom:Product:Field.QuickDelivery.Value.Clean"); string DeliveryTime = Translate("DeliveryTime." + BrandName, "Gns. leveringstid 3-12 dage"); string DeliveryColor = "#00AB5D"; if (QuickDelivery) { DeliveryTime = Translate("DeliveryTime.QuickDelivery", "Ekstra hurtig levering"); DeliveryColor = Firstweb.Custom.CustomCode.Frontend.Helpers.AreaItems.GetString("QuickDeliveryColor"); } <div class="col-11 col-sm-6 col-lg-3 mt-3 mx-auto mx-sm-0 mb-3"> <a href="@ProductLink" class="product-list-product box-shadow px-3 pt-3 pb-5 h-100 d-flex flex-column align-items-center mb-3 overflow-hidden"> <div class="d-flex flex-column align-items-center"> <div class="img-container"> <img class="js-product-image-@ProductID" src="@ProductImage" alt="@ProductName" /> </div> </div> <h3 class="mt-2 mb-0 fs2 text-center mw-100 font-weight-bold">@ProductName</h3> <div class="fs0 color-subtle text-center mw-100 mb-0 product-description">@ShortDescription</div> <div class="d-flex flex-wrap justify-content-center w-100 align-content-end flex-fill"> <p class="color-subtle m-0 fs0 w-100 text-center"> @if (!string.IsNullOrWhiteSpace(product.GetString("Ecom:Product:Field.dybdeint.Value.Clean"))) { if (product.GetString("Ecom:Product:Field.dybdeint.Value.Clean") != "0") { <span>D/L: @product.GetValue("Ecom:Product:Field.dybdeint.Value.Clean")</span> } } @if (!string.IsNullOrWhiteSpace(product.GetString("Ecom:Product:Field.hoejdeint.Value.Clean"))) { if (product.GetString("Ecom:Product:Field.hoejdeint.Value.Clean") != "0") { <span>H: @product.GetValue("Ecom:Product:Field.hoejdeint.Value.Clean")</span> } } @if (!string.IsNullOrWhiteSpace(product.GetString("Ecom:Product:Field.breddeint.Value.Clean"))) { if (product.GetString("Ecom:Product:Field.breddeint.Value.Clean") != "0") { <span>B: @product.GetValue("Ecom:Product:Field.breddeint.Value.Clean")</span> } } </p> @if (QuickDelivery) { <div class="delivery-information my-2 w-100 justify-content-center"> <svg class="delivery-icon mr-2" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Capa_1" fill="@DeliveryColor" x="0px" y="0px" width="20px" height="20px" viewBox="0 0 612 612" style="enable-background:new 0 0 612 612;" xml:space="preserve"> <g> <g> <path d="M226.764,375.35c-28.249,0-51.078,22.91-51.078,51.16c0,28.166,22.829,51.078,51.078,51.078s51.078-22.912,51.078-51.078 C277.841,398.26,255.013,375.35,226.764,375.35z M226.764,452.049c-14.125,0-25.54-11.498-25.54-25.541 c0-14.123,11.415-25.539,25.54-25.539c14.124,0,25.539,11.416,25.539,25.539C252.302,440.551,240.888,452.049,226.764,452.049z M612,337.561v54.541c0,13.605-11.029,24.635-24.636,24.635h-26.36c-4.763-32.684-32.929-57.812-66.927-57.812 c-33.914,0-62.082,25.129-66.845,57.812H293.625c-4.763-32.684-32.93-57.812-66.845-57.812c-33.915,0-62.082,25.129-66.844,57.812 h-33.012c-13.606,0-24.635-11.029-24.635-24.635v-54.541H612L612,337.561z M494.143,375.35c-28.249,0-51.16,22.91-51.16,51.16 c0,28.166,22.912,51.078,51.16,51.078c28.166,0,51.077-22.912,51.077-51.078C545.22,398.26,522.309,375.35,494.143,375.35z M494.143,452.049c-14.125,0-25.539-11.498-25.539-25.541c0-14.123,11.414-25.539,25.539-25.539 c14.042,0,25.539,11.416,25.539,25.539C519.682,440.551,508.185,452.049,494.143,452.049z M602.293,282.637l-96.817-95.751 c-6.159-6.077-14.453-9.526-23.076-9.526h-48.86v-18.313c0-13.631-11.004-24.635-24.635-24.635H126.907 c-13.55,0-24.635,11.005-24.635,24.635v3.86L2.3,174.429l177.146,23.068L0,215.323l178.814,25.423L0,256.25l102.278,19.29 l-0.007,48.403h509.712v-17.985C611.983,297.171,608.452,288.796,602.293,282.637z M560.084,285.839h-93.697 c-2.135,0-3.86-1.724-3.86-3.859v-72.347c0-2.135,1.725-3.86,3.86-3.86h17.82c0.985,0,1.971,0.411,2.71,1.068l75.796,72.347 C565.257,281.569,563.532,285.839,560.084,285.839z" /> </g> </g> </svg> <p class="delivery-text font-weight-bold">@DeliveryTime - <span class="text-underline cursor-pointer" data-bind="click: ToggleQuickDeliveryInfo" style="color: @DeliveryColor">@Translate("Product.DeliveryInfo.ReadmoreText", "L&aelig;s mere")</span></p> </div> } <p class="fs5 my-0 d-flex align-items-end font-weight-bold">@MoblerHelpers.formatPrice(price)</p> @if (spar > 0) { if (BlackFridayTheme == "True") { <div class="discount-splash bf-bg-black bf-color-white"><p class="m-0 font-weight-bold">@Translate("ProductOffer", "Tilbud")</p></div> } else { <div class="discount-splash"><p class="m-0 font-weight-bold">@Translate("ProductOffer", "Tilbud")</p></div> } <div class="d-flex justify-content-between w-100 mb-2"> <p class="color-black-w-opacity fs0 m-0 text-uppercase">@Translate("PriceBefore", "Før") @MoblerHelpers.formatPrice(OriginalPrice)</p> <p class="bg-discount fs0 text-uppercase m-0 px-2 font-weight-bold">@Translate("PriceSaving", "Spar") @MoblerHelpers.formatPrice(spar)</p> </div> } else if (NewItem) { <div class="discount-splash new-item"><p class="m-0 font-weight-bold">@Translate("ProductNew", "Nyhed")</p></div> } else if (LowPrice) { <div class="discount-splash low-price"><p class="m-0 font-weight-bold">@Translate("ProductLowPrice", "Fast lavpris")</p></div> } </div> @if (VariantCombinations.Count() > 0) { <div class="w-100 row align-items-center justify-content-center"> @foreach (var Variant in VariantCombinations) { var currentproductLoop = Variant.GetProduct(languageId); string VariantNumber = currentproductLoop.Number; string VariantLink = product.GetString("Ecom:Product.Link.Clean") + "&variantid=" + currentproductLoop.VariantId; string VariantVariantId = ""; if (VariantNumber.Split('_').Length > 1) { VariantVariantId = VariantNumber.Split('_')[1]; } string imageProductDetails = string.Format("/Admin/Public/GetImage.ashx?Image={0}&Width=60&height=50&Format=png&Crop=5&resolution=50", MoblerHelpers.GetProductImages(ProductID, VariantVariantId).First()); string ImageLarge = imageProductDetails.Replace("&Width=60&height=50", "&Width=260&height=200");; <div class="w-25 p-1 mb-2 d-block" data-bind="previewVariant: { variantImage: '@ImageLarge', currentImage: '.js-product-image-@ProductID', originalImage: '@ProductImage', link: '@VariantLink' }"> <img class="img-fluid" src="@imageProductDetails" /> </div> } @if (ManyVariants) { <div class="w-25 p-1 mb-2 d-flex justify-content-center align-items-center fs2"> <span class="see-more-dots"> <i class="fas fa-ellipsis-h"></i> </span> </div> } </div> } @if (BlackFridayTheme == "True") { <div class="bf-bg-black product-cta d-block text-center fs2 font-weight-bold">@Translate("GoToProduct", "Se produkt")</div> } else { <div class="bg-brand product-cta d-block text-center fs2 font-weight-bold">@Translate("GoToProduct", "Se produkt")</div> } </a> </div> } @helper RenderWideOffer(LoopItem product) { string ProductID = product.GetString("Ecom:Product.ID"); string DefaultVariantID = product.GetString("Ecom:Product.DefaultVariantComboID"); string ProductImage = MoblerHelpers.GetProductListImage(ProductID, DefaultVariantID).Replace("Width=260&height=200", "Width=400&height=230"); string ProductName = product.GetString("Ecom:Product.Name"); string ShortDescription = product.GetString("Ecom:Product.ShortDescription"); string PriceSaving = product.GetString("Ecom:Product:Field.Spar.Value"); string ProductLink = product.GetString("Ecom:Product.Link.Clean"); double DiscountedPrice = product.GetDouble("Ecom:Product.Discount.Price.Price"); double ActualPrice = product.GetDouble("Ecom:Product.Price.Price"); var TotalDiscount = product.GetDouble("Ecom:Product.Discount.TotalAmount.Price"); double spar = 0; double price = 0; if (!product.GetBoolean("Ecom:Product:Field.Splash3.Value") && !product.GetBoolean("Ecom:Product:Field.Offer.Value")) { if (DiscountedPrice < ActualPrice) { spar = TotalDiscount; price = DiscountedPrice; } else { price = ActualPrice; } } else { spar = product.GetDouble("Ecom:Product:Field.Spar.Value.Clean"); price = product.GetDouble("Ecom:Product.Price.Price"); } double OriginalPrice = spar + price; <div class="col-12 bg-white box-shadow-grey border-radius-bottom-8px mt-5"> <div class="row"> <div class="col-12 col-md-4 d-flex align-items-center justify-content-center p-2"> @if (spar > 0) { <div class="discount-splash d-md-none"> <p class="m-0"> @Translate("ProductOffer", "Tilbud") </p> </div> } <a href="@ProductLink"> <img class="img-fluid" src="@ProductImage" alt="@ProductName" /> </a> </div> <div class="col-12 col-md-8 px-0 pt-4 pb-0 pb-sm-3 d-flex flex-column align-items-center justify-content-end"> @if (spar > 0) { <div class="discount-splash d-none d-md-flex"> <p class="m-0"> @Translate("ProductOffer", "Tilbud") </p> </div> } <div class="px-2"> <h1 class="wide-offer--title mw-100 word-break mt-3 mt-sm-0 font-weight-bold text-uppercase text-center">@ProductName</h1> <div class="wide-offer--subtitle word-break text-center color-dark-grey rte-content"> @ShortDescription </div> </div> <div class="mt-2 fs5 font-weight-bold"> @MoblerHelpers.formatPrice(price) </div> <div class="d-flex flex-column justify-content-center align-items-center flex-sm-row w-100"> @if (spar > 0) { <div class="d-flex mb-2 mb-sm-0 justify-content-center"> <p class="color-black-w-opacity m-0 mr-5 p-1 text-uppercase"> @Translate("PriceBefore", "Før") @MoblerHelpers.formatPrice(OriginalPrice) </p> <p class="bg-discount font-weight-bold mb-0 mr-sm-5 px-2 p-1 text-uppercase"> @Translate("PriceSaving", "Spar") @MoblerHelpers.formatPrice(spar) </p> </div> } <a class="wide-offer--button btn btn-primary pl-3 pr-3" href="@ProductLink"> @Translate("GoToProduct", "Se produkt") </a> </div> </div> </div> </div> } @helper Render2ColOffer(LoopItem product) { string ProductID = product.GetString("Ecom:Product.ID"); string DefaultVariantID = product.GetString("Ecom:Product.DefaultVariantComboID"); string ProductImage = MoblerHelpers.GetProductListImage(ProductID, DefaultVariantID).Replace("Width=260", "Width=450").Replace("height=200", "Height=400"); string ProductName = product.GetString("Ecom:Product.Name"); string ShortDescription = product.GetString("Ecom:Product.ShortDescription"); string PriceSaving = product.GetString("Ecom:Product:Field.Spar.Value"); string ProductLink = product.GetString("Ecom:Product.Link.Clean"); double DiscountedPrice = product.GetDouble("Ecom:Product.Discount.Price.Price"); double ActualPrice = product.GetDouble("Ecom:Product.Price.Price"); var TotalDiscount = product.GetDouble("Ecom:Product.Discount.TotalAmount.Price"); double spar = 0; double price = 0; if (!product.GetBoolean("Ecom:Product:Field.Splash3.Value") && !product.GetBoolean("Ecom:Product:Field.Offer.Value")) { if (DiscountedPrice < ActualPrice) { spar = TotalDiscount; price = DiscountedPrice; } else { price = ActualPrice; } } else { spar = product.GetDouble("Ecom:Product:Field.Spar.Value.Clean"); price = product.GetDouble("Ecom:Product.Price.Price"); } double OriginalPrice = spar + price; <div class="col-12 col-md-6 mt-5"> <a href="@ProductLink" class="offer-2col box-shadow-large border-radius-bottom-10px w-100 h-100 d-flex flex-column color-black"> <div class="d-flex align-items-center justify-content-center offer-2col--img-container"> <img class="img-fluid" src="@ProductImage" alt="@ProductName"> @if (spar > 0) { <div class="discount-splash"> <p class="m-0"> @Translate("ProductOffer", "Tilbud") </p> </div> } </div> <div> <h1 class="offer-2col--title pl-3 pr-3 mb-3 text-center color-black text-uppercase"> @ProductName </h1> <div class="offer-2col--subtitle color-dark-grey pl-3 pr-3 my-3 my-md-5 text-center"> @ShortDescription </div> </div> <div class="d-flex flex-wrap flex-fill justify-content-center align-items-end"> <div class="d-flex flex-wrap flex-fill justify-content-center align-items-end"> <p class="offer-2col--price mb-3 text-center font-weight-bold color-black w-100"> @MoblerHelpers.formatPrice(price) </p> @if (spar > 0) { <div class="d-flex justify-content-center mb-3"> <span class="offer-2col--pricebefore color-black-w-opacity mr-5 p-1 text-uppercase"> @Translate("PriceBefore", "Før") @MoblerHelpers.formatPrice(OriginalPrice) </span> <span class="offer-2col--pricesave color-black bg-discount font-weight-bold p-1 text-uppercase"> @Translate("PriceSaving", "Spar") @MoblerHelpers.formatPrice(spar) </span> </div> } <div class="w-100"> <div class="offer-2col--button btn btn-primary p-3 border-radius-bottom-10px w-100 mb-sm-0 font-weight-bold"> @Translate("GoToProduct", "Se produkt") </div> </div> </div> </div> </a> </div> } @using Mobler.Website.CustomModules.MoblerHelpers @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> @helper RenderBlogTeaser(Firstweb.Custom.CustomCode.Frontend.Helpers.Blog Blog) { <div class="col-12 col-md-4 px-0 px-md-3 mb-4"> <a href="@Blog.Link" class="blog d-block"> <div class="image" style="background-image:url('@Blog.Image')"> <img class="d-none" src="@Blog.Image" alt="Alternate Text" /> </div> <div class="text"> <div class="positioning"> <h4 class="col-10 col-md-9 px-2 pt-3 bg-white font-weight-bold text-center mx-auto">@Blog.Header</h4> <p class="text-center color-subtle">@Blog.Date</p> <p class="text-center font-weight-bold m-0 color-primary">@Translate("BlogReadMore", "L&aelig;s mere her")</p> </div> </div> </a> </div> } @helper RenderLargeBlogTeaser(Firstweb.Custom.CustomCode.Frontend.Helpers.Blog Blog, string ImagePosition) { string ImageClass = ImagePosition == "Left" ? "" : "offset-md-4"; string TextClass = ImagePosition == "Left" ? "" : "left"; string Image = "/Admin/Public/GetImage.ashx?Image=" + Blog.Image + "&Height=400&Format=png&Crop=0"; <div class="col-12 blog"> <div class="row"> <div class="col-12 col-md-8 px-0 px-md-3 @ImageClass"> <div class="image-container" style="background-image:url('@Image')"> <img class="img-fluid" src="@Image" alt="@Blog.Header" /> </div> </div> <div class="col-12 col-md-6 text-container mb-5 mb-md-0 @TextClass"> <div class="text bg-white p-3"> <div> <h4>@Blog.Header</h4> @Blog.Teaser </div> <a class="font-weight-bold" href="@Blog.Link">@Translate("BlogReadMore", "L&aelig;s mere her")</a> </div> </div> </div> </div> } @helper RenderLatestBlogsTeasers() { var LatestBlogs = Firstweb.Custom.CustomCode.Frontend.Helpers.Blogs.GetLatestBlogs(); foreach (var Blog in LatestBlogs) { @RenderBlogTeaser(Blog) } } <div class="container pt-3 d-none d-md-block"> <div class="bread"> <p class="color-subtle">@Translate("Breadcrumb.CurrentPage", "Her er du:")</p> <p class="bread-item color-subtle"> <a href="/"> @Translate("Breadcrumb.Frontpage", "Forside") </a> </p> @foreach (var Group in ParentGroups) { <p class="bread-item color-subtle"> @if (Group == ParentGroups.First()) { @Group.Name ShowOnPageUrl = Group.ProductGroupFieldValues.GetProductGroupFieldValue("FirstwebGroupPrimaryPage").Value.ToString(); } else { <a href="/@ShowOnPageUrl&GroupId=@Group.Id"> @Group.Name </a> } </p> } <p class="active color-subtle">@ProductName</p> </div> </div> <div class="container mt-3 mb-5 product-details position-relative" data-bind="viewModel: 'ProductViewModel'"> <div class="d-none" data-bind="setInitValue: { observable: CartPageId, value: '@AjaxCartPageId' }"></div> <div class="d-none" data-bind="setInitValue: { observable: MiniCart, value: '.js-mini-cart-lines' }"></div> <div class="d-none" data-bind="setInitValue: { observable: CartCount, value: '.js-cart-count' }"></div> <div class="d-none" data-bind="setInitValue: { observable: CustomersAlsoSawLines, value: '.js-customers-also-saw-lines' }"></div> <div class="d-none" data-bind="setInitValue: { observable: CustomersAlsoSawPage, value: '@CustomersAlsoSawPageId' }"></div> <div class="d-none" data-bind="setInitValue: { observable: MainProductId, value: '@MainProdNr' }"></div> <div class="d-none" data-bind="setInitValue: { observable: VariantsEndpoint, value: '@VariantsEndpoint' }"></div> <div class="d-none" data-bind="setInitValue: { observable: VariantDetailsEndpoint, value: '@VariantDetailsEndpoint' }"></div> <div class="d-none" data-bind="setInitValue: { observable: TeaserText, value: '@TrimmedTeaser' }"></div> <div class="d-none" data-bind="setInitValue: { observable: ProductName, value: '@TrimmedName' }"></div> <div class="d-none" data-bind="setInitValue: { observable: ProductNumber, value: '@ProductNumber' }"></div> <div class="d-none" data-bind="setInitValue: { observable: VariantId, value: '@VariantId' }"></div> <div class="d-none" data-bind="setInitValue: { observable: Price, value: '@MoblerHelpers.formatPrice(price)' }"></div> <div class="d-none" data-bind="setInitValue: { observable: CartEndpoint, value: '@GetCartEndpoint' }, click: GetCart"></div> <div id="blueimp-gallery" class="blueimp-gallery"> <div class="slides"></div> <h3 class="title"></h3> <a class="prev">‹</a> <a class="next">›</a> <a class="close">×</a> <a class="play-pause"></a> <ol class="indicator"></ol> </div> <div class="add-to-cart-overlay" data-bind="css: { 'd-block': ProcessingAjax }"> <p class="fs4 m-0 color-white">@Translate("ProductAjaxAddingToCart", "Tilf&oslash;jer til kurv") <i class="fa fa-spinner fa-spin ml-3 fs5"></i></p> </div> <div class="add-to-cart-overlay" data-bind="css: { 'd-block': ProcessingVariantDetailsAjax }"> <p class="fs4 m-0 color-white">@Translate("ProductAjaxGettingVariant", "Henter variant") <i class="fa fa-spinner fa-spin ml-3 fs5"></i></p> </div> <div class="delivery-information-popup" data-bind="css: { 'd-flex': DeliveryInfoOpen }, click: ToggleDeliveryInfo"> <div class="description-content bg-white px-3 py-4 px-lg-4 position-relative" data-bind="click: OpenDeliveryInfo, clickBubble: false"> <div class="modal-closer-custom" data-bind="click: ToggleDeliveryInfo, clickBubble: false"> <img src="/Files/Templates/Designs/Mobler2018/assets/img/icons/close.svg" /> </div> @if (QuickDelivery) { <div> @QuickDeliveryDescription </div> } else if (DisplayAverageDeliveryTime) { <div> @NormalDeliveryDescription </div> } </div> </div> <h1 class="header mb-4" data-bind="text: ProductName">@ProductName</h1> <div class="d-flex flex-wrap"> <div class="image-container position-relative overflow-hidden"> <div class="discount-splash unimportant-hidden" data-bind="css: { 'd-flex': SplashType() == 1 }"><p class="m-0">@Translate("ProductOffer", "Tilbud")</p></div> <div class="discount-splash unimportant-hidden new-item" data-bind="css: { 'd-flex': SplashType() == 2 }"><p class="m-0">@Translate("ProductNew", "Nyhed")</p></div> <div class="discount-splash unimportant-hidden low-price" data-bind="css: { 'd-flex': SplashType() == 3 }"><p class="m-0">@Translate("ProductLowPrice", "Fast lavpris")</p></div> <div id="imageSlider" class="carousel slide" data-ride="carousel"> <div class="carousel-inner align-items-center" data-bind="css: { 'd-none': Images().length > 0 }"> @foreach (var Image in Images) { if (First) { <a href="/Admin/Public/GetImage.ashx?Image=@Image&width=2000" class="mb-3 mb-lg-0 carousel-item active" data-gallery> <img class="product-image main-image" src="/Admin/Public/GetImage.ashx?Image=@Image&width=950&height=500&crop=5" alt="@ProductName" /> </a> First = false; FirstImage = "/Admin/Public/GetImage.ashx?Image=" + Image + "&width=950&height=500&crop=5"; } else { <a href="/Admin/Public/GetImage.ashx?Image=@Image&width=2000" class="mb-3 mb-lg-0 carousel-item" data-gallery> <img class="product-image main-image" src="/Admin/Public/GetImage.ashx?Image=@Image&width=950&height=500&crop=5" alt="@ProductName" /> </a> } } </div> <div class="carousel-inner align-items-center d-flex" data-bind="foreach: Images()"> <!-- ko if: $index() == 0 --> <a data-bind="attr: { href: '/Admin/Public/GetImage.ashx?Image=' + $data + '&width=2000' }" class="mb-3 mb-lg-0 carousel-item active" data-gallery> <img class="product-image main-image" data-bind="attr: { src: '/Admin/Public/GetImage.ashx?Image=' + $data + '&width=950&height=500&crop=5' }" /> </a> <!-- /ko --> <!-- ko if: $index() != 0 --> <a data-bind="attr: { href: '/Admin/Public/GetImage.ashx?Image=' + $data + '&width=2000' }" class="mb-3 mb-lg-0 carousel-item" data-gallery> <img class="product-image main-image" data-bind="attr: { src: '/Admin/Public/GetImage.ashx?Image=' + $data + '&width=950&height=500&crop=5' }" /> </a> <!-- /ko --> </div> </div> @if (Images.Count > 1) { <div class="row small-gutter carousel-row" data-bind="css: { 'd-none': Images().length > 0 }"> @foreach (var Image in Images) { if (FirstIndicator) { <div data-target="#imageSlider" data-slide-to="@IndicatorIncrementer" class="col-4 mt-lg-3 cursor-pointer active"> <div class="secondary-image"> <img class="product-image" src="/Admin/Public/GetImage.ashx?Image=@Image&width=400&height=230&crop=5" alt="@ProductName" /> </div> </div> FirstIndicator = false; } else { <div data-target="#imageSlider" data-slide-to="@IndicatorIncrementer" class="col-4 mt-lg-3 cursor-pointer"> <div class="secondary-image"> <img class="product-image" src="/Admin/Public/GetImage.ashx?Image=@Image&width=400&height=230&crop=5" alt="@ProductName" /> </div> </div> } IndicatorIncrementer++; } </div> <div class="row small-gutter carousel-row unimportant-hidden" data-bind="css: { 'd-flex': Images().length > 0 }, foreach: Images()"> <!-- ko if: $index() == 0 --> <div data-target="#imageSlider" class="col-4 mt-lg-3 cursor-pointer active" data-bind="attr: { 'data-slide-to': $index }"> <div class="secondary-image"> <img class="product-image" data-bind="attr: { src: '/Admin/Public/GetImage.ashx?Image=' + $data + '&width=400&height=230&crop=5' }" alt="@ProductName" /> </div> </div> <!-- /ko --> <!-- ko if: $index() != 0 --> <div data-target="#imageSlider" class="col-4 mt-lg-3 cursor-pointer" data-bind="attr: { 'data-slide-to': $index }"> <div class="secondary-image"> <img class="product-image" data-bind="attr: { src: '/Admin/Public/GetImage.ashx?Image=' + $data + '&width=400&height=230&crop=5' }" alt="@ProductName" /> </div> </div> <!-- /ko --> </div> } </div> <div class="pl-lg-4 description-container d-flex flex-wrap flex-column mt-3 mt-lg-0 position-relative"> <div class="mb-2">@ShortDescription</div> <div class="w-100"><p class="color-primary pointer mb-2" data-bind="scrollToElement: { target: '#js-full-description' }">@Translate("ProductReadFullDescription", "L&aelig;s hele beskrivelsen")</p></div> <div class="w-100"> <p class="color-subtle m-0">@Translate("ProductProductNumber", "Produktnummer:") <span data-bind="text: ProductNumber">@ProductNumber</span></p> <p class="color-subtle m-0"> @if (!string.IsNullOrWhiteSpace(GetString("Ecom:Product:Field.dybdeint.Value.Clean"))) { if (GetString("Ecom:Product:Field.dybdeint.Value.Clean") != "0") { <span>D/L: @GetValue("Ecom:Product:Field.dybdeint.Value.Clean")</span> } } @if (!string.IsNullOrWhiteSpace(GetString("Ecom:Product:Field.hoejdeint.Value.Clean"))) { if (GetString("Ecom:Product:Field.hoejdeint.Value.Clean") != "0") { <span>H: @GetValue("Ecom:Product:Field.hoejdeint.Value.Clean")</span> } } @if (!string.IsNullOrWhiteSpace(GetString("Ecom:Product:Field.breddeint.Value.Clean"))) { if (GetString("Ecom:Product:Field.breddeint.Value.Clean") != "0") { <span>B: @GetValue("Ecom:Product:Field.breddeint.Value.Clean")</span> } } </p> </div> @if (QuickDelivery || DisplayAverageDeliveryTime) { <div class="w-100 my-3"> <div class="delivery-information"> <svg class="delivery-icon mr-2" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Capa_1" fill="@DeliveryColor" x="0px" y="0px" width="30px" height="30px" viewBox="0 0 612 612" style="enable-background:new 0 0 612 612;" xml:space="preserve"> <g> <g> <path d="M226.764,375.35c-28.249,0-51.078,22.91-51.078,51.16c0,28.166,22.829,51.078,51.078,51.078s51.078-22.912,51.078-51.078 C277.841,398.26,255.013,375.35,226.764,375.35z M226.764,452.049c-14.125,0-25.54-11.498-25.54-25.541 c0-14.123,11.415-25.539,25.54-25.539c14.124,0,25.539,11.416,25.539,25.539C252.302,440.551,240.888,452.049,226.764,452.049z M612,337.561v54.541c0,13.605-11.029,24.635-24.636,24.635h-26.36c-4.763-32.684-32.929-57.812-66.927-57.812 c-33.914,0-62.082,25.129-66.845,57.812H293.625c-4.763-32.684-32.93-57.812-66.845-57.812c-33.915,0-62.082,25.129-66.844,57.812 h-33.012c-13.606,0-24.635-11.029-24.635-24.635v-54.541H612L612,337.561z M494.143,375.35c-28.249,0-51.16,22.91-51.16,51.16 c0,28.166,22.912,51.078,51.16,51.078c28.166,0,51.077-22.912,51.077-51.078C545.22,398.26,522.309,375.35,494.143,375.35z M494.143,452.049c-14.125,0-25.539-11.498-25.539-25.541c0-14.123,11.414-25.539,25.539-25.539 c14.042,0,25.539,11.416,25.539,25.539C519.682,440.551,508.185,452.049,494.143,452.049z M602.293,282.637l-96.817-95.751 c-6.159-6.077-14.453-9.526-23.076-9.526h-48.86v-18.313c0-13.631-11.004-24.635-24.635-24.635H126.907 c-13.55,0-24.635,11.005-24.635,24.635v3.86L2.3,174.429l177.146,23.068L0,215.323l178.814,25.423L0,256.25l102.278,19.29 l-0.007,48.403h509.712v-17.985C611.983,297.171,608.452,288.796,602.293,282.637z M560.084,285.839h-93.697 c-2.135,0-3.86-1.724-3.86-3.859v-72.347c0-2.135,1.725-3.86,3.86-3.86h17.82c0.985,0,1.971,0.411,2.71,1.068l75.796,72.347 C565.257,281.569,563.532,285.839,560.084,285.839z" /> </g> </g> </svg> <p class="delivery-text @DeliveryFontWeightModifier">@DeliveryTime - <a href="#" class="text-underline" data-bind="click: ToggleDeliveryInfo" style="color: @DeliveryColor">@Translate("Product.DeliveryInfo.ReadmoreText", "L&aelig;s mere")</a></p> </div> </div> } <div class="w-100"> @if (GetBoolean("Ecom:Product:Field.Farvevarianter1.Value")) { <img class="img-fluid mb-3 mt-5" src="/Files/Images/Farver/farver1.png" /> <p class="mb-0">@Translate("ProductColor1Text", "F&aring;s i flere forskellige varianter og moduler, bes&oslash;g dit lokale M&oslash;blér bolighus og f&aring; vejledning til design af din sofa.")</p> } else if (GetBoolean("Ecom:Product:Field.Farvevarianter2.Value")) { <img class="img-fluid mb-3 mt-5" src="/Files/Images/Farver/farver2.png" /> <p class="mb-0">@Translate("ProductColor2Text", "Farve 2 hj&aelig;lpetekst")</p> } else if (GetBoolean("Ecom:Product:Field.Farvevarianter3.Value")) { <img class="img-fluid mb-3 mt-5" src="/Files/Images/Farver/farver3.png" /> <p class="mb-0">@Translate("ProductColor3Text", "Farve 3 hj&aelig;lpetekst")</p> } else if (GetBoolean("Ecom:Product:Field.Farvevarianter4.Value")) { <img class="img-fluid mb-3 mt-5" src="/Files/Images/Farver/farver4.png" /> <p class="mb-0">@Translate("ProductColor4Text", "Farve 4 hj&aelig;lpetekst")</p> } else if (GetBoolean("Ecom:Product:Field.Farvevarianter5.Value")) { <img class="img-fluid mb-3 mt-5" src="/Files/Images/Farver/farver5.png" /> <p class="mb-0">@Translate("ProductColor5Text", "Farve 5 hj&aelig;lpetekst")</p> } </div> @if (GetLoop("VariantCombinations").Count > 0) { var VariantGroupsWithMultipleOptions = GetLoop("VariantGroups").Where(x => x.GetLoop("VariantAvailableOptions").Count > 1); int VariantGroupCount = VariantGroupsWithMultipleOptions.Count(); int VariantCombinationsCount = GetLoop("VariantCombinations").Count; int PossibleVariantCombinations = 1; foreach (var VG in GetLoop("VariantGroups")) { PossibleVariantCombinations *= VG.GetLoop("VariantAvailableOptions").Count; } if (VariantGroupCount == 1) { var RelevantVariantGroup = VariantGroupsWithMultipleOptions.FirstOrDefault(); var SelectedVariant = RelevantVariantGroup.GetLoop("VariantAvailableOptions").Where(x => x.GetBoolean("Ecom:VariantOption.Selected")).FirstOrDefault(); <div class="position-relative"> <div class="variant-dropdown p-2 box-shadow mt-3 d-flex justify-content-between align-items-center pointer js-variant-dropdown"> <p class="m-0"><span class="font-weight-bold">@RelevantVariantGroup.GetString("Ecom:VariantGroup.Label")</span> - <span data-bind="text: SelectedVariantOption0">@SelectedVariant.GetString("Ecom:VariantOption.Name")</span></p> <i class="fas fa-chevron-down"></i> </div> <div class="variant-options bg-white"> @foreach (var Variant in RelevantVariantGroup.GetLoop("VariantAvailableOptions")) { var VariantCombination = GetLoop("VariantCombinations").Where(x => x.GetString("Ecom:VariantCombination.VariantID").ToString().Contains(Variant.GetString("Ecom:VariantOption.ID"))).FirstOrDefault(); string VariantName = Variant.GetString("Ecom:VariantOption.Name"); string VariantIdentifier = Variant.GetString("Ecom:VariantOption.ID"); string VariantLink = VariantCombination.GetString("Ecom:VariantCombination.Link.Clean"); string VariantPreview = String.Empty; var ObservableToSet = "SelectedVariantOption0"; var ObservableToSetId = "SelectedVariantOptionId0"; bool ShowPreview = RelevantVariantGroup.GetString("Ecom:VariantGroup.Name").ToString().ToLower().Contains("farve") || RelevantVariantGroup.GetString("Ecom:VariantGroup.Name").ToString().ToLower().Contains("materiale") ? true : false; if (!String.IsNullOrEmpty(Variant.GetString("Ecom:VariantOption.ImgSmall.Clean")) && ShowPreview) { if (Variant.GetString("Ecom:VariantOption.ImgSmall.Clean").StartsWith("#")) { VariantPreview = "style= \"background-color: " + Variant.GetString("Ecom:VariantOption.ImgSmall.Clean") + ";\""; } else { VariantPreview = "style=\"background-image: url('" + Variant.GetString("Ecom:VariantOption.ImgSmall.Clean") + "');\""; } } <div class="option pointer color-primary d-flex w-100 p-2 bg-grey" data-bind="click: UpdateVariantAndSetObservable.bind($data, '@VariantIdentifier', @ObservableToSet, '@VariantName', @ObservableToSetId)"> @if (!String.IsNullOrEmpty(VariantPreview)) { <span class="option-preview mr-2" @VariantPreview></span> } <span>@VariantName</span> </div> <div class="d-none" data-bind="setInitValue: { observable: @ObservableToSet, value: '@SelectedVariant.GetString("Ecom:VariantOption.Name")' }"></div> <div class="d-none" data-bind="setInitValue: { observable: @ObservableToSetId, value: '@SelectedVariant.GetString("Ecom:VariantOption.ID")' }"></div> } </div> </div> } else if (PossibleVariantCombinations == VariantCombinationsCount) { Dictionary<string, string> CurrentlySelectedVariantOptions = new Dictionary<string, string>(); foreach (var VG in GetLoop("VariantGroups")) { foreach (var VO in VG.GetLoop("VariantAvailableOptions").Where(x => x.GetBoolean("Ecom:VariantOption.Selected"))) { CurrentlySelectedVariantOptions.Add(VG.GetString("Ecom:VariantGroup.Name"), VO.GetString("Ecom:VariantOption.ID")); } } int VGLoopCounter = 0; foreach (var VG in GetLoop("VariantGroups")) { List<LoopItem> RelevantVariantCombinations = new List<LoopItem>(); var VariantCombinationLink = GetLoop("VariantCombinations"); var SelectedVariant = VG.GetLoop("VariantAvailableOptions").Where(x => x.GetBoolean("Ecom:VariantOption.Selected")).FirstOrDefault(); var ObservableToSet = "SelectedVariantOption" + VGLoopCounter.ToString(); var ObservableToSetId = "SelectedVariantOptionId" + VGLoopCounter.ToString(); VGLoopCounter++; foreach (var VC in VariantCombinationLink) { var Add = true; foreach (var KVP in CurrentlySelectedVariantOptions.Where(s => s.Key != VG.GetString("Ecom:VariantGroup.Name"))) { if (!VC.GetString("Ecom:VariantCombination.VariantID").ToString().Contains(KVP.Value)) { Add = false; } } if (Add) { RelevantVariantCombinations.Add(VC); } } <div class="d-none" data-bind="setInitValue: { observable: @ObservableToSet, value: '@SelectedVariant.GetString("Ecom:VariantOption.Name")' }"></div> <div class="d-none" data-bind="setInitValue: { observable: @ObservableToSetId, value: '@SelectedVariant.GetString("Ecom:VariantOption.ID")' }"></div> <div class="position-relative"> <div class="variant-dropdown p-2 box-shadow mt-3 d-flex justify-content-between align-items-center pointer js-variant-dropdown"> <p class="m-0"><span class="font-weight-bold">@VG.GetString("Ecom:VariantGroup.Label")</span> - <span data-bind="text: @ObservableToSet">@SelectedVariant.GetString("Ecom:VariantOption.Name")</span></p> <i class="fas fa-chevron-down"></i> </div> <div class="variant-options bg-white"> @foreach (var VO in VG.GetLoop("VariantAvailableOptions")) { var VariantCombination = RelevantVariantCombinations.Where(vc => vc.GetString("Ecom:VariantCombination.VariantID").ToString().Contains(VO.GetString("Ecom:VariantOption.ID"))).FirstOrDefault(); string VariantLink = VariantCombination.GetString("Ecom:VariantCombination.Link.Clean"); string VariandOptionId = VariantCombination.GetString("Ecom:VariantCombination.VariantID"); string VariantPreview = String.Empty; string VOName = VO.GetString("Ecom:VariantOption.Name"); string VOId = VO.GetString("Ecom:VariantOption.ID"); bool ShowPreview = VG.GetString("Ecom:VariantGroup.Name").ToString().ToLower().Contains("farve") || VG.GetString("Ecom:VariantGroup.Name").ToString().ToLower().Contains("materiale") ? true : false; if (!String.IsNullOrEmpty(VO.GetString("Ecom:VariantOption.ImgSmall.Clean")) && ShowPreview) { if (VO.GetString("Ecom:VariantOption.ImgSmall.Clean").StartsWith("#")) { VariantPreview = "style= \"background-color: " + VO.GetString("Ecom:VariantOption.ImgSmall.Clean") + ";\""; } else { VariantPreview = "style=\"background-image: url('" + VO.GetString("Ecom:VariantOption.ImgSmall.Clean") + "');\""; } } <div class="option d-flex w-100 p-2 bg-grey color-primary pointer" data-bind="click: UpdateVariantAndSetObservable.bind($data, '@VOId', @ObservableToSet, '@VOName', @ObservableToSetId)"> @if (!String.IsNullOrEmpty(VariantPreview)) { <span class="option-preview mr-2" @VariantPreview></span> } @VOName </div> } </div> </div> } } else if (GetLoop("VariantGroups").Where(x => x.GetString("Ecom:VariantGroup.Name").ToString().ToLower().Contains("farve")).Count() > 0 && GetLoop("VariantGroups").Where(x => x.GetString("Ecom:VariantGroup.Name").ToString().ToLower().Contains("materiale")).Count() > 0) { <div class="mt-3"> <p class="mb-1">@Translate("CurrentDesignName", "Valgte design: ")</p> <p class="font-weight-bold">@CurrentVariantName</p> </div> <div class="d-flex"> <div class="btn btn-primary" data-bind="click: ToggleVariantPicker">@Translate("ChooseNewDesign", "V&aelig;lg design")</div> </div> } else { var SelectedVariant = GetLoop("VariantCombinations").Where(x => x.GetBoolean("Ecom:VariantCombination.Selected")).FirstOrDefault(); var SelectedVariantName = SelectedVariant.GetString("Ecom:VariantCombination.VariantText"); var SelectedVariantId = SelectedVariant.GetString("Ecom:VariantOption.ID"); <div class="d-none" data-bind="setInitValue: { observable: SelectedVariantOption0, value: '@SelectedVariantName' }"></div> <div class="d-none" data-bind="setInitValue: { observable: SelectedVariantOptionId0, value: '@SelectedVariantId' }"></div> <div class="position-relative"> <div class="variant-dropdown p-2 box-shadow mt-3 d-flex justify-content-between align-items-center pointer js-variant-dropdown"> <p class="m-0"><span class="font-weight-bold">@Translate("FallbackVariantsText", "VARIANTER")</span> - <span data-bind="text: SelectedVariantOption0">@SelectedVariantName</span></p> <i class="fas fa-chevron-down"></i> </div> <div class="variant-options bg-white"> @foreach (var Variant in GetLoop("VariantCombinations")) { string VariantName = Variant.GetString("Ecom:VariantCombination.VariantText"); string VariantLink = Variant.GetString("Ecom:VariantCombination.Link.Clean"); string VCId = Variant.GetString("Ecom:Product.VariantID"); <div class="option color-primary pointer d-block p-2 bg-grey" data-bind="click: UpdateVariantAndSetObservable.bind($data, '@VCId', SelectedVariantOption0, '@VariantName', SelectedVariantOptionId0)">@VariantName</div> } </div> </div> } } <div class="row align-items-end f-grow-1"> <div class="col-10 offset-1 col-sm-12 offset-sm-0 d-flex justify-content-center justify-content-lg-start"> <div class="mt-5 d-flex flex-wrap flex-column justify-content-end"> @if (spar > 0) { <div class="d-none" data-bind="setInitValue: { observable: SplashType, value: 1 }"></div> <div class="d-none" data-bind="setInitValue: { observable: BeforePrice, value: '@MoblerHelpers.formatPrice(OriginalPrice)' }"></div> <div class="d-none" data-bind="setInitValue: { observable: Saving, value: '@MoblerHelpers.formatPrice(spar)' }"></div> } else if (NewItem) { <div class="d-none" data-bind="setInitValue: { observable: SplashType, value: 2 }"></div> } else if (LowPrice) { <div class="d-none" data-bind="setInitValue: { observable: SplashType, value: 3 }"></div> } <div class="w-100 unimportant-hidden" data-bind="css: { 'd-flex': SplashType() == 1 }"> <p class="color-subtle fs0 m-0 text-uppercase mr-3">@Translate("PriceBefore", "Før") <span data-bind="text: BeforePrice"></span></p> <p class="bg-discount fs0 text-uppercase m-0 px-2 font-weight-bold">@Translate("PriceSaving", "Spar") <span data-bind="text: Saving"></span></p> </div> <p class="price font-weight-bold m-0"> <span class="unimportant-hidden" data-bind="css: { 'd-inline': SplashType() == 1 }">@Translate("ProductNow", "NU")</span> <span data-bind="text: Price"></span> </p> <div class="payever-finance-express payever-button" data-code="@GetString("Ecom:Product.Number")" data-name="@GetString("Ecom:Product.Name")" data-price="@GetString("Ecom:Product.Price.Price").Replace(".", string.Empty).Replace(",", ".")" data-currency="DKK"></div> <script>(function (p, a, y, e, v, r, f) { p[v] = p[v] || []; p[v][r] = p[v][r] || []; if (!p[v][r][y]) { p[v][r][y] = f = a.createElement(y); f.async = 1; f.src = e; a.head.appendChild(f) } })(window, document, 'script', 'https://mein.payever.de/finances/business/mobler/finance-express/91203/scripts/finance_express.embed.min.js', 'Payever', 'FinanceExpress');</script> @if (ForSale) { <div class="d-flex align-items-center mt-3"> <p class="m-0 font-weight-bold fs1 mr-2">@Translate("Product.Quantity", "Antal")</p> <div class="d-flex"> <div class="quantity-controls d-flex align-items-center mr-3"> <div class="control minus" data-bind="click: DecreaseQuantity"> - </div> <input type="text" name="Quantity" value="1" data-bind="value: Quantity" /> <div class="control plus" data-bind="click: IncrementQuantity"> + </div> </div> @if (BlackFridayTheme == "True") { <p class="btn btn-black-friday bf-bg-black add-to-cart m-0 d-flex align-items-center px-4" data-bind="click: AddToCart.bind($data, '@DataLayerPrice')"> @Translate("ProductAddToCart", "L&aelig;g i kurv") </p> } else { <p class="btn btn-primary add-to-cart m-0 d-flex align-items-center px-4" data-bind="click: AddToCart.bind($data, '@DataLayerPrice')"> @Translate("ProductAddToCart", "L&aelig;g i kurv") </p> } </div> </div> } else { <p>@Translate("Ecom:Product.NotForSaleMessage", "Produktet kan ikke købes.")</p> } </div> </div> </div> </div> </div> <div class="d-flex flex-wrap justify-content-center external-ctas"> @if (!String.IsNullOrWhiteSpace(GetString("Ecom:Product:Field.ProviderLink.Value.Clean"))) { <a href="@GetString("Ecom:Product:Field.ProviderLink.Value.Clean")" target="_blank" class="bg-brand font-weight-bold d-flex align-items-center justify-content-center no-underline p-3 color-white"> <span>@Translate("Product.DesignSelf", "Design selv")</span> <img src="/Files/Templates/Designs/Mobler2018/assets/img/icons/Pencil1.svg" /> </a> } @if (!String.IsNullOrEmpty(ProductCatalogLink)) { <a class="btn btn-secondary rounded-0 d-flex justify-content-center align-items-center p-3 color-white font-weight-bold" href="@ProductCatalogLink" target="_blank"> <span>@Translate("ProductProductCatalogLink", "Se inspirationsbrochure")</span> <img src="/Files/Templates/Designs/Mobler2018/assets/img/icons/Brochure.svg" /> </a> } </div> <div class="d-flex flex-wrap mt-5"> <div id="js-full-description"> <p class="fs3 mb-2 font-weight-bold">@Translate("ProductDescriptionHeader", "Beskrivelse")</p> <div class="unimportant-hidden" data-bind="html: FullDescription, css: { 'd-block': FullDescription().length > 0 }"> </div> <div data-bind="css: { 'd-none': FullDescription().length > 0 }"> @LongDescription </div> </div> </div> <div class="d-flex flex-wrap my-5"> @if (!String.IsNullOrEmpty(GetString("Ecom:Product:Field.VideoKlip.Value"))) { string BackgroundSize = !String.IsNullOrEmpty(GetString("Ecom:Product:Field.VideoBillede.Value.Clean")) ? "cover" : "contain"; string OverlayImage = !String.IsNullOrEmpty(GetString("Ecom:Product:Field.VideoBillede.Value.Clean")) ? GetString("Ecom:Product:Field.VideoBillede.Value.Clean") : FirstImage; <div class="image-container"> <div class="youtube-video-container" data-bind="youtubeVideo: { videoId: '@GetString("Ecom:Product:Field.VideoKlip.Value")', overlayId: 'js-video-overlay', playerId: 'player' }"> <div id="js-video-overlay" class="video-overlay pointer" style="background-image:url('@OverlayImage');background-size: @BackgroundSize;"> <div class="visual-overlay d-flex flex-column justify-content-center align-items-center h-100 w-100"> <img src="/Files/Templates/Designs/Mobler2018/assets/img/icons/Play.svg" /> <p class="mt-3 mb-0 color-white">@Translate("Product.WatchVideo", "Se video")</p> </div> </div> <div id="player"></div> </div> </div> } <div class="description-container mt-5 mt-lg-0 @QuestionPadding"> <div class="bg-brand color-white box-shadow p-3 pb-5 questions"> <img class="staff-img" src="/Files/Templates/Designs/Mobler2018/assets/img/sovnmand.png" /> @if (!String.IsNullOrWhiteSpace(shopInfo.ShopName) && shopInfo.ShopName != "Møblér") { <div class="shop-info"> <h4 class="fs45">@Translate("ProductQuestionsHeader", "Har du sp&oslash;rsm&aring;l?")</h4> <p class="mb-1">@shopInfo.Address, @shopInfo.PostalAndCity</p> <p class="mb-1">@shopInfo.Phone</p> @if (!String.IsNullOrEmpty(shopInfo.Email)) { <p class="mb-1"><a class="color-white" href="mailto:@shopInfo.Email">@shopInfo.Email</a></p> } @if (!String.IsNullOrEmpty(shopInfo.ShopName1)) { <p class="mb-1 mt-2">@shopInfo.Address1, @shopInfo.PostalAndCity1</p> <p class="mb-2">@shopInfo.Phone1</p> } @if (!String.IsNullOrEmpty(shopInfo.ShopName2)) { <p class="mb-1 mt-2">@shopInfo.Address2, @shopInfo.PostalAndCity2</p> <p class="mb-2">@shopInfo.Phone2</p> } @shopInfo.OpeningHours </div> } else { <h4 class="fs45">@Translate("ProductQuestionsHeader", "Har du sp&oslash;rsm&aring;l?")</h4> <p class="fs2 text">@Translate("ProductSelectNearestShop", "V&aelig;lg n&aelig;rmeste M&oslash;bler bolighus")</p> <select style="width: 280px;" data-bind="select2SelectShop: { overlay: 'find-dealer-overlay', placeholder: '@SelectPlaceholder' }"> @if (shopname == "Møblér") { <option selected disabled>@Translate("HeaderFindShop", "Find forhandler")</option> } else { foreach (var Shop in AllShops.Where(x => x.MenuText == shopname)) { <option selected disabled value="@HttpUtility.UrlEncode(Shop.MenuText)">@Shop.ShopName</option> } } @foreach (var Shop in AllShops) { if (Shop.MenuText != "Møblér" && Shop.MenuText != shopname) { var Address = "<div>" + Shop.Address + "</div><div>" + Shop.PostalAndCity + "</div>"; <option title="@Address" value="@HttpUtility.UrlEncode(Shop.MenuText)">@Shop.ShopName {{@Shop.PostalAndCity @Shop.SearchKeyWords}}</option> } } </select> } </div> </div> </div> @if (GetInteger("Ecom:Product.RelatedCount") > 0) { foreach (var Group in GetLoop("ProductRelatedGroups").Where(g => g.GetLoop("Products").Count > 0)) { <div class="py-3 mt-5"> <div class="line-through-header mb-3"> <h4>@Group.GetString("Ecom:Product:RelatedGroup.Name")</h4> </div> <div class="row"> @foreach (var Product in Group.GetLoop("Products")) { var productToRender = Product; string productId = Product.GetString("Ecom:Product.ID"); string variantIdLoop = productsDisplayVariant.GetDisplayVariantId(productId); if (Product.GetLoop("VariantCombinations").Count > 0 && Product.GetLoop("VariantCombinations").Any(x => x.GetString("Ecom:Product.VariantID").Equals(variantIdLoop))) { productToRender = Product.GetLoop("VariantCombinations").FirstOrDefault(x => x.GetString("Ecom:Product.VariantID").Equals(variantIdLoop)); } @RenderProduct(productToRender) } </div> </div> } } @if (RelatedBlogs.Count > 0) { string ImagePosition = "Left"; <div class="feature-blogs my-5"> <div class="row"> @foreach (var Blog in RelatedBlogs) { @RenderLargeBlogTeaser(Blog, ImagePosition) if (ImagePosition == "Left") { ImagePosition = "Right"; } else { ImagePosition = "Left"; } } </div> </div> } <div class="after-add-to-cart bg-white box-shadow" data-bind="css: { 'd-block': ProductAddedToCart }"> <div class="closer fs3 pointer" data-bind="click: ProductAddedToCart(false)"> <i class="fas fa-times-circle color-primary"></i> </div> <div class="p-3"> <p class="font-weight-bold fs4 text-uppercase m-0"> <i class="fas fa-check-circle color-primary"></i> @Translate("ProductProductAddedToCart", "Varen er lagt i indk&oslash;bskurven") </p> </div> <div class="mini-cart large-cart power-step"> <div class="position-relative"> <div class="cart-command-loader unimportant-hidden justify-content-center align-items-center" data-bind="css: { 'd-flex': Loading }"> <div class="d-flex align-items-center"> <p class="m-0 mr-2">@Translate("Cart.UpdatingCart", "Opdaterer kurv")</p> <i class="fas fa-spinner fa-spin"></i> </div> </div> <div class="lines" data-bind="foreach: Orderlines"> <div class="cartline d-flex justify-content-between align-items-center px-3 py-2 position-relative bg-grey"> <span class="delete-orderline color-subtle cursor-pointer mr-2" data-bind="click: $parent.DeleteOrderline.bind($data, OrderlineId)"> <i class="fas fa-times"></i> </span> <div class="product-image w-10"> <img class="img-fluid" data-bind="attr: { src: ImagePath }" /> </div> <div class="flex-fill px-3 w-75"> <p class="font-weight-bold m-0" data-bind="text: ProductName"></p> <p class="m-0 color-subtle small-quantity-indicator"><span data-bind="text: Quantity"></span> stk. a <span data-bind="text: QuantityPrice"></span></p> <div class="variant-dimensions" data-bind="foreach: VariantDimensions"> <p class="m-0 color-subtle color-dark-grey font-weight-bold"> <span data-bind="text: Label"></span> <span class="font-weight-normal" data-bind="text: Value"></span> </p> </div> </div> <div class="qty-counter w-10"> <div class="d-flex"> <div class="quantity-controls d-flex align-items-center mr-3"> <div class="control minus" data-bind="click: $parent.QuantityControl.bind($data, -1, OrderlineId)"> - </div> <input disabled type="text" name="Quantity" value="1" data-bind="value: Quantity, attr: { 'data-id': 'js-input-' + OrderlineId }" /> <div class="control plus" data-bind="click: $parent.QuantityControl.bind($data, 1, OrderlineId)"> + </div> </div> </div> </div> <p class="fs0 m-0 orderline-price" data-bind="text: OrderlinePrice"></p> </div> </div> @if (BlackFridayTheme == "True") { <div class="bf-bg-black p-3 d-flex justify-content-between align-items-center price-summary"> <p class="m-0 color-white fs-12px font-weight-semibold">@Translate("MiniCartTotal", "Din kurv i alt (ex. fragt)")</p> <p class="m-0 color-white fs1 font-weight-bold" data-bind="text: CartTotalNoFees"></p> </div> } else { <div class="bg-brand p-3 d-flex justify-content-between align-items-center price-summary"> <p class="m-0 color-white fs-12px font-weight-semibold">@Translate("MiniCartTotal", "Din kurv i alt (ex. fragt)")</p> <p class="m-0 color-white fs1 font-extra-bold" data-bind="text: CartTotalNoFees"></p> </div> } </div> </div> <div class="p-3 d-flex justify-content-between"> <p class="pointer py-2 px-3 bg-dark-grey color-white rounded m-0" data-bind="click: ProductAddedToCart(false)">@Translate("MiniCartContinueShopping", "Handel videre")</p> @if (BlackFridayTheme == "True") { <a href="@CartPage" class="pointer py-2 px-3 bf-bg-black color-white rounded d-block no-underline">@Translate("MiniCartGoToCheckout", "G&aring; til kassen")</a> } else { <a href="@CartPage" class="pointer py-2 px-3 bg-brand color-white rounded d-block no-underline">@Translate("MiniCartGoToCheckout", "G&aring; til kassen")</a> } </div> <div class="js-customers-also-saw-lines"></div> </div> <div class="variant-picker" data-bind="css: { 'open': VariantPickerOpen }"> <div class="closer color-primary fs5 pointer" data-bind="click: ToggleVariantPicker"> <i class="fas fa-times-circle"></i> </div> <div class="container py-5 position-relative"> <h3 class="fs4 text-center">Design din @ProductName</h3> @{ var ColorDimensions = GetLoop("VariantGroups").Where(g => g.GetString("Ecom:VariantGroup.Name").ToLower().Contains("farve")); var NonColorDimensions = GetLoop("VariantGroups").Where(g => !g.GetString("Ecom:VariantGroup.Name").ToLower().Contains("farve")); int FilterCounter = 0; string RowClass = NonColorDimensions.Any() && ColorDimensions.Any() ? "flex-row-reverse" : ""; } <div class="row mt-5 @RowClass"> @if (ColorDimensions.Any()) { <div class="col-12 col-md-8"> @foreach (var VariantDimension in ColorDimensions) { string DimensionName = VariantDimension.GetString("Ecom:VariantGroup.Name"); string FilterName = "filter-" + FilterCounter; FilterCounter++; <div class="mb-5 mb-md-0"> <p class="font-weight-bold fs2 mb-2">@DimensionName</p> <div class="row custom-row"> @foreach (var VariantOption in VariantDimension.GetLoop("VariantAvailableOptions").OrderBy(v => v.GetString("Ecom:VariantOption.Name"))) { string VariantOptionName = VariantOption.GetString("Ecom:VariantOption.Name"); string VariantOptionId = VariantOption.GetString("Ecom:VariantOption.ID"); string Preview = VariantOption.GetString("Ecom:VariantOption.ImgSmall.Clean"); string PreviewCss = ""; if (!String.IsNullOrEmpty(Preview)) { if (Preview.StartsWith("#")) { PreviewCss = "style= \"background-color: " + Preview + ";\""; } else { PreviewCss = "style=\"background-image: url('" + Preview + "');\""; } } <div class="col-2 col-sm-3 col-md-2 mb-3 d-flex flex-column justify-content-end pointer color-variant" data-bind="click: AddToFilter.bind($data, $element, '@FilterName', '@VariantOptionId')"> <p class="mb-0 color-variant-name d-none d-sm-block">@VariantOptionName</p> <div class="variant-preview position-relative d-flex" @PreviewCss></div> </div> } </div> </div> } </div> } @if (NonColorDimensions.Any()) { <div class="col-12 col-sm-6 col-md-4"> @foreach (var VariantDimension in NonColorDimensions) { string DimensionName = VariantDimension.GetString("Ecom:VariantGroup.Name"); string FilterName = "filter-" + FilterCounter; FilterCounter++; <div class="mb-5"> <p class="font-weight-bold fs2 mb-2">@DimensionName</p> <div class="row custom-row"> @foreach (var VariantOption in VariantDimension.GetLoop("VariantAvailableOptions").OrderBy(v => v.GetString("Ecom:VariantOption.Name"))) { string VariantOptionName = VariantOption.GetString("Ecom:VariantOption.Name"); string VariantOptionId = VariantOption.GetString("Ecom:VariantOption.ID"); string Preview = VariantOption.GetString("Ecom:VariantOption.ImgSmall.Clean"); string PreviewCss = ""; if (!String.IsNullOrEmpty(Preview)) { if (Preview.StartsWith("#")) { PreviewCss = "style= \"background-color: " + Preview + ";\""; } else { PreviewCss = "style=\"background-image: url('/Files" + Preview + "');\""; } } if (DimensionName == "STØRRELSE") { <div class="col-6 col-sm-4 mb-3 d-flex flex-column justify-content-end pointer size-variant" data-bind="click: AddToFilter.bind($data, $element, '@FilterName', '@VariantOptionId')"> <div class="variant-preview position-relative d-flex justify-content-center align-items-center" @PreviewCss> <p class="mb-0 color-variant-name font-weight-bold">@VariantOptionName</p> </div> </div> } else { <div class="col-6 col-sm-4 mb-3 d-flex flex-column justify-content-end pointer" data-bind="click: AddToFilter.bind($data, $element, '@FilterName', '@VariantOptionId')"> <p class="mb-0 color-variant-name">@VariantOptionName</p> <div class="variant-preview position-relative d-flex" @PreviewCss></div> </div> } } </div> </div> } </div> } <div class="col-12 d-flex justify-content-end"> <p class="color-primary pointer my-3" data-bind="click: ResetFilters">Nulstil</p> </div> </div> <p class="font-weight-bold fs2 mt-5"> @Translate("ChooseProduct", "V&aelig;lg produkt") </p> <div class="row align-items-end" data-bind="foreach: FilteredVariants"> <div class="col-12 col-sm-6 col-md-3 mb-3"> <a class="color-black no-underline" data-bind="attr: { href: Link }"> <p class="fs0 font-weight-bold m-0" data-bind="text: Name"></p> <img class="img-fluid box-shadow my-1" data-bind="attr: { src: Image }" /> <div class="d-flex justify-content-center mt-2"> <div class="btn btn-primary">@Translate("VariantChooseProduct", "V&aelig;lg")</div> </div> </a> </div> </div> <div data-bind="visible: FilteredVariants().length == 0"> <p class="font-weight-bold mt-3 fs3">@Translate("VariantsNoResults", "Filtreringen gav ingen resultater")</p> </div> </div> </div> </div> @SnippetStart("DataLayerOverwrites") <script> ecomm_pagetype = "Product"; ecomm_totalvalue = @GetString("Ecom:Product.Price.Price").Replace(".","").Replace(",","."); ecomm_prodid = "@GetString("Ecom:Product.ID")"; </script> @SnippetEnd("DataLayerOverwrites")

Tilbud, indretningstips og inspiration – tilmeld dig vores nyhedsbrev

Hold dig opdateret om vores nyeste tilbud på senge, sofaer og spiseborde, eller få inspiration til indretningen af dit hjem. Som abonnent på Møblérs nyhedsbrev får du altid besked om udsalg og gode tilbud på vores mange møbler, ligesom vi ligeledes deler ud af vores store erfaring og viden inden for indretning og tidens trends. 

Tak, du er nu tilmeldt Møblérs nyhedsbrev.
Du er allerede tilmeldt Møblérs nyhedsbrev.
Du er allerede tilmeldt Møblérs nyhedsbrev.