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
Error executing template "Designs/Mobler2018/eCom/Product/Product.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
   at CompiledRazorTemplates.Dynamic.RazorEngine_79e927bf6ff64a75a5b9d0a819f4754f.Execute() in D:\dynamicweb.net\Solutions\mobler.LIVE\Files\Templates\Designs\Mobler2018\eCom\Product\Product.cshtml:line 1010
   at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader)
   at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.b__0(TextWriter writer)
   at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()

1 @using System.Web 2 @using Mobler.Website.CustomModules.MoblerHelpers 3 @using System.Text.RegularExpressions 4 @using CampaignModule.Models 5 @using Group = Dynamicweb.Ecommerce.Products.Group 6 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 7 8 @{ 9 string shopname = MoblerHelpers.GetShopName(); 10 string SelectPlaceholder = Translate("ShopSelectPlaceholder", "Indtast by, postnummer eller adresse"); 11 var shopInfo = MoblerHelpers.ShopInfo(); 12 int ShopPageId = Firstweb.Custom.CustomCode.Frontend.Helpers.AreaItems.GetInt("ShopPageId"); 13 var AllShops = Firstweb.Custom.CustomCode.Frontend.Helpers.Shops.GetAllShops(ShopPageId); 14 int AjaxCartPageId = Firstweb.Custom.CustomCode.Frontend.Helpers.AreaItems.GetInt("AjaxCartPageId"); 15 int CustomersAlsoSawPageId = Firstweb.Custom.CustomCode.Frontend.Helpers.AreaItems.GetInt("CustomersAlsoSawPageId"); 16 string CartPage = Firstweb.Custom.CustomCode.Frontend.Helpers.AreaItems.GetString("CartPage"); 17 string VariantsEndpoint = Firstweb.Custom.CustomCode.Frontend.Helpers.AreaItems.GetString("VariantsUrl"); 18 string VariantDetailsEndpoint = Firstweb.Custom.CustomCode.Frontend.Helpers.AreaItems.GetString("VariantDetailsUrl"); 19 string BlackFridayTheme = Firstweb.Custom.CustomCode.Frontend.Helpers.AreaItems.GetString("BlackFridayTheme"); 20 string ProductID = GetString("Ecom:Product.ID"); 21 string GroupID = Firstweb.Custom.CustomCode.Frontend.Helpers.EcomGroups.GetProductDefaultShopGroupID(ProductID); //GetString("Ecom:Product.PrimaryOrFirstGroupID"); 22 string DefaultVariantID = GetString("Ecom:Product.DefaultVariantComboID"); 23 string ProductImage = MoblerHelpers.GetProductListImage(ProductID, DefaultVariantID); 24 string ProductName = GetString("Ecom:Product.Name"); 25 string ProductNumber = GetString("Ecom:Product.Number"); 26 string ProductCatalogLink = !String.IsNullOrEmpty(GetString("Ecom:Product:Field.ProductCatelog.Value.Clean")) ? GetString("Ecom:Product:Field.ProductCatelog.Value.Clean") : ""; 27 string VariantId = GetString("Ecom:Product.VariantID"); 28 string ShortDescription = GetString("Ecom:Product.ShortDescription"); 29 string LongDescription = GetString("Ecom:Product.LongDescription").Replace("||", "<br/>"); 30 string CurrentVariantName = GetString("Ecom:Product.SelectedVariantComboName"); 31 var FaqQuestions = MoblerHelpers.GetProductFAQs(ProductID, GroupID); 32 33 string MetaDescription = GetString("Ecom:Product.MetaDescription"); 34 35 if (string.IsNullOrEmpty(MetaDescription)) 36 { 37 MetaDescription = Mobler.Website.CustomCode.Frontend.Helpers.Text.GetFirstLine(LongDescription.Replace("<br/>", " ")); 38 } 39 else 40 { 41 MetaDescription = ""; //Meta data description bliver sat af DW, hvis dette felt er udfyldt, sÃ¥ vi skal ikke opsætte noget. 42 } 43 44 45 var RelatedBlogs = Firstweb.Custom.CustomCode.Frontend.Helpers.Blogs.GetBlogsRelatedToProduct(ProductID); 46 bool NewItem = GetBoolean("Ecom:Product:Field.NewItem"); 47 bool LowPrice = GetBoolean("Ecom:Product:Field.Splash3"); 48 49 50 Mobler.Website.CustomCode.Frontend.ProductsDisplayVariant productsDisplayVariant = Mobler.Website.CustomCode.Frontend.ProductsDisplayVariant.Instance(); 51 52 bool ForSale = !GetBoolean("Ecom:Product:Field.NotForSaleOnline"); 53 54 var MainProdNr = string.Empty; 55 var VariantNr = string.Empty; 56 string FirstImage = ""; 57 if (!string.IsNullOrWhiteSpace(ProductNumber)) 58 { 59 string[] MainProdSplit = ProductNumber.Split('_'); 60 61 62 63 if (MainProdSplit.Length > 1) 64 { 65 MainProdNr = MainProdSplit[0]; 66 VariantNr = MainProdSplit[1]; 67 } 68 else 69 { 70 MainProdNr = ProductNumber; 71 } 72 } 73 var Images = MoblerHelpers.GetProductImages(GetString("Ecom:Product.ID"), VariantId); 74 bool First = true; 75 bool FirstIndicator = true; 76 int IndicatorIncrementer = 0; 77 string ProductLink = GetString("Ecom:Product.Link.Clean"); 78 79 double ActualPrice = GetDouble("Ecom:Product.Price.Price"); 80 double spar = 0; 81 double price = 0; 82 double normalPrice = 0; 83 84 string priceFormatted = ""; 85 string sparFormatted = ""; 86 string normalPriceFormatted = ""; 87 88 string campaignColor = ""; 89 string campaignText = ""; 90 string campaignDate = ""; 91 92 93 string campaignDateStart = ""; 94 string campaignDateEnd = ""; 95 96 97 bool CampaignActiveOnProduct = GetBoolean("CampaignModule:Product.CampaignActiveOnProduct"); 98 99 if (!CampaignActiveOnProduct) 100 { 101 price = ActualPrice; 102 priceFormatted = MoblerHelpers.formatPrice(price); 103 } 104 else 105 { 106 normalPrice = GetDouble("CampaignModule:Product.CampaignProduct.NormalPrice"); 107 normalPriceFormatted = GetString("CampaignModule:Product.CampaignProduct.NormalPrice.FormattedRetail"); 108 109 price = GetDouble("CampaignModule:Product.CampaignProduct.CampaignPrice"); 110 priceFormatted = GetString("CampaignModule:Product.CampaignProduct.CampaignPrice.FormattedRetail"); 111 112 spar = GetDouble("CampaignModule:Product.CampaignProduct.DiscountAmount"); 113 sparFormatted = GetString("CampaignModule:Product.CampaignProduct.DiscountAmount.FormattedRetail"); 114 115 campaignColor = GetString("CampaignModule:Product.Campaign.Color"); 116 campaignText = GetString("CampaignModule:Product.Campaign.Text"); 117 118 campaignDateStart = GetString("CampaignModule:Product.CampaignProduct.Campaign.Start"); 119 campaignDateEnd = GetString("CampaignModule:Product.CampaignProduct.Campaign.End"); 120 } 121 122 123 string DataLayerPrice = ActualPrice.ToString().Replace(".", "").Replace(",", "."); 124 System.Web.HttpContext.Current.Items["OverrideOgTags"] = true; 125 string OgImage = "https://mobler.dk" + Images.FirstOrDefault(); 126 127 string TrimmedTeaser = Firstweb.Custom.CustomCode.Frontend.Helpers.JSFormatting.TrimLinebreaks(ShortDescription); 128 string TrimmedName = Firstweb.Custom.CustomCode.Frontend.Helpers.JSFormatting.TrimLinebreaks(ProductName); 129 130 var ParentGroups = Firstweb.Custom.CustomCode.Frontend.Helpers.EcomGroups.getBreadCrumbGroupList(GroupID, true); 131 var DataLayerParentGroup = ParentGroups.Last().Name; 132 List<string> DataLayerParentGroupStrings = ParentGroups.Select(group => group.Name).ToList(); 133 string DataLayerParentGroups = string.Join(" > ", DataLayerParentGroupStrings); 134 135 string ShowOnPageUrl = ""; 136 string GetCartEndpoint = Firstweb.Custom.CustomCode.Frontend.Helpers.AreaItems.GetString("GetCartJson"); 137 138 string QuickDeliveryColor = Firstweb.Custom.CustomCode.Frontend.Helpers.AreaItems.GetString("QuickDeliveryColor"); 139 string QuickDeliveryDescription = Firstweb.Custom.CustomCode.Frontend.Helpers.AreaItems.GetString("QuickDeliveryDescription"); 140 string NormalDeliveryDescription = Firstweb.Custom.CustomCode.Frontend.Helpers.AreaItems.GetString("NormalDeliveryDescription"); 141 string BrandName = GetString("Ecom:Product:Field.Maerkevarer.Value.Clean"); 142 string DeliveryTime = Translate("DeliveryTime." + BrandName, "Gns. leveringstid 3-12 dage"); 143 bool HideDelivery = DeliveryTime == "Skjul"; 144 string DeliveryColor = "#00AB5D"; 145 bool QuickDelivery = GetBoolean("Ecom:Product:Field.QuickDelivery.Value.Clean"); 146 string CustomDelivery = GetString("Ecom:Product:Field.CustomDeliveryTime.Value.Clean"); 147 if (QuickDelivery) 148 { 149 DeliveryColor = QuickDeliveryColor; 150 DeliveryTime = Translate("DeliveryTime.QuickDelivery", "Ekstra hurtig levering"); 151 } 152 else if (!String.IsNullOrEmpty(CustomDelivery)) 153 { 154 DeliveryTime = CustomDelivery; 155 } 156 string DeliveryFontWeightModifier = QuickDelivery ? "font-weight-bold" : ""; 157 bool DisplayAverageDeliveryTime = Firstweb.Custom.CustomCode.Frontend.Helpers.AreaItems.GetBoolean("DisplayAverageDeliveryTime"); 158 159 double CostPrice = GetDouble("Ecom:Product:Field.FirstwebCostPrice.Value.Raw"); 160 string DailyPriceBackgroundColor = Firstweb.Custom.CustomCode.Frontend.Helpers.AreaItems.GetString("AktuelDagsprisBackgroundColor"); 161 string DailyPriceTextColor = Firstweb.Custom.CustomCode.Frontend.Helpers.AreaItems.GetString("AktuelDagsprisTextColor"); 162 string EAN = GetString("Ecom:Product:Field.FirstEan.Value"); 163 164 string productionDescription = GetString("Ecom:Product:Field.FirstwebProductionDescription"); 165 } 166 167 168 @SnippetStart("ProductDetailsMeta") 169 @if (!string.IsNullOrEmpty(MetaDescription)) 170 { 171 <meta name="description" content="@MetaDescription" /> 172 } 173 @SnippetEnd("ProductDetailsMeta") 174 175 @SnippetStart("OgTags") 176 <meta property="og:type" content="product" /> 177 <meta property="og:description" content="@Regex.Replace(ShortDescription, "<.*?>", String.Empty)" /> 178 <meta property="og:image" content="@OgImage" /> 179 @SnippetEnd("OgTags") 180 181 @using Mobler.Website.CustomModules.MoblerHelpers 182 @using Dynamicweb.Ecommerce.Products 183 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 184 185 @helper RenderProduct(LoopItem product) 186 { 187 string BlackFridayTheme = Firstweb.Custom.CustomCode.Frontend.Helpers.AreaItems.GetString("BlackFridayTheme"); 188 string CTAbg = Firstweb.Custom.CustomCode.Frontend.Helpers.AreaItems.GetString("SeProdukt_CTABaggrundsfarve"); 189 string CTAtextcolor = Firstweb.Custom.CustomCode.Frontend.Helpers.AreaItems.GetString("SeProdukt_CTATekstfarve"); 190 string ProductID = product.GetString("Ecom:Product.ID"); 191 string ProductNumber = product.GetString("Ecom:Product.Number"); 192 string DefaultVariantID = product.GetString("Ecom:Product.DefaultVariantComboID"); 193 string VariantId = product.GetString("Ecom:Product.VariantID"); 194 if (String.IsNullOrEmpty(VariantId)) { 195 VariantId = DefaultVariantID; 196 } 197 var Images = MoblerHelpers.GetProductImages(ProductID, VariantId); 198 string ProductImage = string.Format("/Admin/Public/GetImage.ashx?Image={0}&Width=260&height=200&Format=png&Crop=5&resolution=50", Images.FirstOrDefault()); //MoblerHelpers.GetProductListImageWithMainImage(ProductID, ProductNumber); 199 string ProductName = product.GetString("Ecom:Product.Name"); 200 201 bool NewItem = product.GetBoolean("Ecom:Product:Field.NewItem"); 202 bool LowPrice = product.GetBoolean("Ecom:Product:Field.Splash3"); 203 double CostPrice = product.GetDouble("Ecom:Product:Field.FirstwebCostPrice.Value.Raw"); 204 string ShortDescription = product.GetString("Ecom:Product.ShortDescription"); 205 string PriceSaving = product.GetString("Ecom:Product:Field.Spar.Value"); 206 string ProductLink = product.GetString("Ecom:Product.Link.Clean"); 207 208 if (!String.IsNullOrEmpty(VariantId)) { 209 ProductLink = ProductLink + "&variantid=" + VariantId; 210 } 211 212 213 /* 214 double DiscountedPrice = product.GetDouble("Ecom:Product.Discount.Price.Price"); 215 double ActualPrice = product.GetDouble("Ecom:Product.Price.Price"); 216 var TotalDiscount = product.GetDouble("Ecom:Product.Discount.TotalAmount.Price"); 217 double spar = 0; 218 double price = 0; 219 if (!product.GetBoolean("Ecom:Product:Field.Splash3.Value") && !product.GetBoolean("Ecom:Product:Field.Offer.Value")) 220 { 221 if (DiscountedPrice < ActualPrice) 222 { 223 spar = TotalDiscount; 224 price = DiscountedPrice; 225 } 226 else 227 { 228 price = ActualPrice; 229 } 230 } 231 else 232 { 233 spar = product.GetDouble("Ecom:Product:Field.Spar.Value.Clean"); 234 price = product.GetDouble("Ecom:Product.Price.Price"); 235 } 236 double OriginalPrice = spar + price; 237 */ 238 239 double ActualPrice = product.GetDouble("Ecom:Product.Price.Price"); 240 double spar = 0; 241 double price = 0; 242 double normalPrice = 0; 243 244 string priceFormatted = ""; 245 string sparFormatted = ""; 246 string normalPriceFormatted = ""; 247 248 string campaignColor = ""; 249 string campaignText = ""; 250 string campaignDate = ""; 251 252 bool CampaignActiveOnProduct = product.GetBoolean("CampaignModule:Product.CampaignActiveOnProduct"); 253 if (!CampaignActiveOnProduct) 254 { 255 price = ActualPrice; 256 priceFormatted = MoblerHelpers.formatPrice(price); 257 } 258 else 259 { 260 normalPrice = product.GetDouble("CampaignModule:Product.CampaignProduct.NormalPrice"); 261 normalPriceFormatted = product.GetString("CampaignModule:Product.CampaignProduct.NormalPrice.FormattedRetail"); 262 263 price = product.GetDouble("CampaignModule:Product.CampaignProduct.CampaignPrice"); 264 priceFormatted = product.GetString("CampaignModule:Product.CampaignProduct.CampaignPrice.FormattedRetail"); 265 266 spar = product.GetDouble("CampaignModule:Product.CampaignProduct.DiscountAmount"); 267 sparFormatted = product.GetString("CampaignModule:Product.CampaignProduct.DiscountAmount.FormattedRetail"); 268 269 campaignColor = product.GetString("CampaignModule:Product.Campaign.Color"); 270 campaignText = product.GetString("CampaignModule:Product.Campaign.Text"); 271 } 272 273 274 275 var languageId = product.GetString("Ecom:Product.LanguageID"); 276 var dwProduct = Dynamicweb.Ecommerce.Services.Products.GetProductById(ProductID, VariantId, languageId); 277 var VariantCombinations = dwProduct.VariantCombinations.ToList().Where(v => v.GetProduct(languageId) != null && v.GetProduct(languageId).Number != VariantId); 278 bool ManyVariants = VariantCombinations.Count() > 3; 279 if (ManyVariants) 280 { 281 VariantCombinations = VariantCombinations.Take(3).ToList(); 282 } 283 284 string BrandName = product.GetString("Ecom:Product:Field.Maerkevarer.Value.Clean"); 285 bool QuickDelivery = product.GetBoolean("Ecom:Product:Field.QuickDelivery.Value.Clean"); 286 string DeliveryTime = Translate("DeliveryTime." + BrandName, "Gns. leveringstid 3-12 dage"); 287 string DeliveryColor = "#00AB5D"; 288 if (QuickDelivery) { 289 DeliveryTime = Translate("DeliveryTime.QuickDelivery", "Ekstra hurtig levering"); 290 DeliveryColor = Firstweb.Custom.CustomCode.Frontend.Helpers.AreaItems.GetString("QuickDeliveryColor"); 291 } 292 293 <div class="col-11 col-sm-6 col-lg-3 mt-3 mx-auto mx-sm-0 mb-3 js-product-list-item"> 294 <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"> 295 <div class="d-flex flex-column align-items-center"> 296 <div class="img-container"> 297 <img class="js-product-image-@ProductID" src="@ProductImage" alt="@ProductName" /> 298 </div> 299 </div> 300 <h3 class="mt-2 mb-0 fs2 text-center mw-100 font-weight-bold">@ProductName</h3> 301 <div class="fs0 color-subtle text-center mw-100 mb-0 product-description">@ShortDescription</div> 302 <div class="d-flex flex-wrap justify-content-center w-100 align-content-end flex-fill"> 303 <p class="color-subtle m-0 fs0 w-100 text-center"> 304 @if (!string.IsNullOrWhiteSpace(product.GetString("Ecom:Product:Field.dybdeint.Value.Clean"))) 305 { 306 if (product.GetString("Ecom:Product:Field.dybdeint.Value.Clean") != "0") 307 { 308 <span>D/L: @product.GetValue("Ecom:Product:Field.dybdeint.Value.Clean")</span> 309 } 310 } 311 @if (!string.IsNullOrWhiteSpace(product.GetString("Ecom:Product:Field.hoejdeint.Value.Clean"))) 312 { 313 if (product.GetString("Ecom:Product:Field.hoejdeint.Value.Clean") != "0") 314 { 315 <span>H: @product.GetValue("Ecom:Product:Field.hoejdeint.Value.Clean")</span> 316 } 317 } 318 @if (!string.IsNullOrWhiteSpace(product.GetString("Ecom:Product:Field.breddeint.Value.Clean"))) 319 { 320 if (product.GetString("Ecom:Product:Field.breddeint.Value.Clean") != "0") 321 { 322 <span>B: @product.GetValue("Ecom:Product:Field.breddeint.Value.Clean")</span> 323 } 324 } 325 </p> 326 @if (QuickDelivery) 327 { 328 <div class="delivery-information my-2 w-100 justify-content-center"> 329 <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"> 330 <g> 331 <g> 332 <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" /> 333 334 </g> 335 </g> 336 </svg> 337 <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> 338 </div> 339 } 340 <p class="fs5 my-0 d-flex align-items-center font-weight-bold"> 341 @if (VariantCombinations.Count() > 0) 342 { 343 <span class="font-weight-semibold fs0 mr-2">@Translate("ProductPrice.From", "Fra")</span> 344 } 345 @priceFormatted 346 </p> 347 @if (campaignText == "KOMBI") 348 { 349 <div class="discount-splash discount-splash--small"><p class="m-0">@Translate("ProductCombinationOffer", "Kombinationstilbud")</p></div> 350 } 351 else if (CostPrice > 0) 352 { 353 string DailyPriceBackgroundColor = Firstweb.Custom.CustomCode.Frontend.Helpers.AreaItems.GetString("AktuelDagsprisBackgroundColor"); 354 string DailyPriceTextColor = Firstweb.Custom.CustomCode.Frontend.Helpers.AreaItems.GetString("AktuelDagsprisTextColor"); 355 string EAN = product.GetString("Ecom:Product:Field.FirstEan.Value"); 356 var PriceShapePrices = Firstweb.Custom.CustomCode.Frontend.Helpers.PriceShapeHelpers.GetProductPrice(ProductNumber, EAN); 357 358 <div class="discount-splash price-shape" style="background-color: @DailyPriceBackgroundColor"><p class="m-0" style="color: @DailyPriceTextColor;">@Translate("ProductDailyPriceSplash", "Dagspris")</p></div> 359 @*if (PriceShapePrices != null) 360 { 361 if (price < PriceShapePrices.MoblerPrice) 362 { 363 <div class="d-flex w-100 mb-2"> 364 @if (VariantCombinations.Count() > 0) 365 { 366 <p class="color-black-w-opacity fs0 m-0 text-uppercase">@Translate("PriceRecommendPriceFrom", "Vejl. pris fra") @MoblerHelpers.formatPrice(PriceShapePrices.MoblerPrice)</p> 367 } 368 else 369 { 370 <p class="color-black-w-opacity fs0 m-0 text-uppercase">@Translate("PriceRecommendPrice", "Vejl. pris") @MoblerHelpers.formatPrice(PriceShapePrices.MoblerPrice)</p> 371 } 372 </div> 373 } 374 }*@ 375 376 } 377 else if (spar > 0) 378 { 379 if (BlackFridayTheme == "True") 380 { 381 <div class="discount-splash bf-bg-black bf-color-white"><p class="m-0 font-weight-bold">@Translate("ProductOffer", "Tilbud")</p></div> 382 } 383 else 384 { 385 <div class="discount-splash"><p class="m-0 font-weight-bold">@Translate("ProductOffer", "Tilbud")</p></div> 386 } 387 <div class="d-flex justify-content-between w-100 mb-2"> 388 <p class="color-black-w-opacity fs0 m-0 text-uppercase">@Translate("PriceBefore", "Før") @normalPriceFormatted</p> 389 <p class="bg-discount fs0 text-uppercase m-0 px-2 font-weight-bold">@Translate("PriceSaving", "Spar") @sparFormatted</p> 390 </div> 391 } 392 else if (NewItem) 393 { 394 <div class="discount-splash new-item"><p class="m-0 font-weight-bold">@Translate("ProductNew", "Nyhed")</p></div> 395 } 396 else if (LowPrice) 397 { 398 <div class="discount-splash low-price"><p class="m-0 font-weight-bold">@Translate("ProductLowPrice", "Fast lavpris")</p></div> 399 } 400 </div> 401 @if (VariantCombinations.Count() > 0) 402 { 403 <div class="w-100 row align-items-center justify-content-center"> 404 @foreach (var Variant in VariantCombinations) 405 { 406 string VariantLink = product.GetString("Ecom:Product.Link.Clean") + "&variantid=" + Variant.VariantId; 407 string imageProductDetails = string.Format("/Admin/Public/GetImage.ashx?Image={0}&Width=60&height=50&Format=png&Crop=5&resolution=50", MoblerHelpers.GetProductImages(ProductID, Variant.VariantId).First()); 408 string ImageLarge = imageProductDetails.Replace("&Width=60&height=50", "&Width=260&height=200"); 409 <div class="w-25 p-1 mb-2 d-block" data-bind="previewVariant: { variantImage: '@ImageLarge', currentImage: '.js-product-image-@ProductID', originalImage: '@ProductImage', link: '@VariantLink' }"> 410 <img class="img-fluid" src="@imageProductDetails" /> 411 </div> 412 } 413 @if (ManyVariants) 414 { 415 <div class="w-25 p-1 mb-2 d-flex justify-content-center align-items-center fs2"> 416 <span class="see-more-dots"> 417 <i class="fas fa-ellipsis-h"></i> 418 </span> 419 </div> 420 } 421 </div> 422 <div class="variant-price-disclaimer">@Translate("VariantPriceDisclaimer", "Prisen kan variere efter materialevalg")</div> 423 } 424 @if (BlackFridayTheme == "True") 425 { 426 <div class="bf-bg-black product-cta d-block text-center fs2 font-weight-bold">@Translate("GoToProduct", "Se produkt")</div> 427 } else { 428 <div class="bg-brand product-cta d-block text-center fs2 font-weight-bold" style="background-color: @CTAbg;color: @CTAtextcolor;">@Translate("GoToProduct", "Se produkt")</div> 429 } 430 431 </a> 432 433 </div> 434 } 435 436 @helper RenderWideOffer(LoopItem product) 437 { 438 string ProductID = product.GetString("Ecom:Product.ID"); 439 string DefaultVariantID = product.GetString("Ecom:Product.DefaultVariantComboID"); 440 string ProductImage = MoblerHelpers.GetProductListImage(ProductID, DefaultVariantID).Replace("Width=260&height=200", "Width=400&height=230"); 441 string ProductName = product.GetString("Ecom:Product.Name"); 442 string ShortDescription = product.GetString("Ecom:Product.ShortDescription"); 443 string PriceSaving = product.GetString("Ecom:Product:Field.Spar.Value"); 444 string ProductLink = product.GetString("Ecom:Product.Link.Clean"); 445 double DiscountedPrice = product.GetDouble("Ecom:Product.Discount.Price.Price"); 446 double ActualPrice = product.GetDouble("Ecom:Product.Price.Price"); 447 var TotalDiscount = product.GetDouble("Ecom:Product.Discount.TotalAmount.Price"); 448 double spar = 0; 449 double price = 0; 450 if (!product.GetBoolean("Ecom:Product:Field.Splash3.Value") && !product.GetBoolean("Ecom:Product:Field.Offer.Value")) 451 { 452 if (DiscountedPrice < ActualPrice) 453 { 454 spar = TotalDiscount; 455 price = DiscountedPrice; 456 } 457 else 458 { 459 price = ActualPrice; 460 } 461 } 462 else 463 { 464 spar = product.GetDouble("Ecom:Product:Field.Spar.Value.Clean"); 465 price = product.GetDouble("Ecom:Product.Price.Price"); 466 } 467 double OriginalPrice = spar + price; 468 469 <div class="col-12 bg-white box-shadow-grey border-radius-bottom-8px mt-5"> 470 <div class="row"> 471 472 <div class="col-12 col-md-4 d-flex align-items-center justify-content-center p-2"> 473 @if (spar > 0) 474 { 475 <div class="discount-splash d-md-none"> 476 <p class="m-0"> 477 @Translate("ProductOffer", "Tilbud") 478 </p> 479 </div> 480 } 481 <a href="@ProductLink"> 482 <img class="img-fluid" src="@ProductImage" alt="@ProductName" /> 483 </a> 484 </div> 485 <div class="col-12 col-md-8 px-0 pt-4 pb-0 pb-sm-3 d-flex flex-column align-items-center 486 justify-content-end"> 487 @if (spar > 0) 488 { 489 <div class="discount-splash d-none d-md-flex"> 490 <p class="m-0"> 491 @Translate("ProductOffer", "Tilbud") 492 </p> 493 </div> 494 } 495 <div class="px-2"> 496 <h1 class="wide-offer--title mw-100 word-break mt-3 mt-sm-0 font-weight-bold text-uppercase text-center">@ProductName</h1> 497 <div class="wide-offer--subtitle word-break text-center color-dark-grey rte-content"> 498 @ShortDescription 499 </div> 500 </div> 501 <div class="mt-2 fs5 font-weight-bold"> 502 @MoblerHelpers.formatPrice(price) 503 </div> 504 <div class="d-flex flex-column justify-content-center align-items-center flex-sm-row w-100"> 505 506 @if (spar > 0) 507 { 508 <div class="d-flex mb-2 mb-sm-0 justify-content-center"> 509 <p class="color-black-w-opacity m-0 mr-5 p-1 text-uppercase"> 510 @Translate("PriceBefore", "Før") @MoblerHelpers.formatPrice(OriginalPrice) 511 </p> 512 <p class="bg-discount font-weight-bold mb-0 mr-sm-5 px-2 p-1 text-uppercase"> 513 @Translate("PriceSaving", "Spar") @MoblerHelpers.formatPrice(spar) 514 </p> 515 </div> 516 } 517 <a class="wide-offer--button btn btn-primary pl-3 pr-3" href="@ProductLink"> 518 @Translate("GoToProduct", "Se produkt") 519 </a> 520 </div> 521 </div> 522 523 </div> 524 </div> 525 526 } 527 528 @helper Render2ColOffer(LoopItem product) 529 { 530 string ProductID = product.GetString("Ecom:Product.ID"); 531 string DefaultVariantID = product.GetString("Ecom:Product.DefaultVariantComboID"); 532 string ProductImage = MoblerHelpers.GetProductListImage(ProductID, DefaultVariantID).Replace("Width=260", "Width=450").Replace("height=200", "Height=400"); 533 string ProductName = product.GetString("Ecom:Product.Name"); 534 string ShortDescription = product.GetString("Ecom:Product.ShortDescription"); 535 string PriceSaving = product.GetString("Ecom:Product:Field.Spar.Value"); 536 string ProductLink = product.GetString("Ecom:Product.Link.Clean"); 537 double DiscountedPrice = product.GetDouble("Ecom:Product.Discount.Price.Price"); 538 double ActualPrice = product.GetDouble("Ecom:Product.Price.Price"); 539 var TotalDiscount = product.GetDouble("Ecom:Product.Discount.TotalAmount.Price"); 540 double spar = 0; 541 double price = 0; 542 if (!product.GetBoolean("Ecom:Product:Field.Splash3.Value") && !product.GetBoolean("Ecom:Product:Field.Offer.Value")) 543 { 544 if (DiscountedPrice < ActualPrice) 545 { 546 spar = TotalDiscount; 547 price = DiscountedPrice; 548 } 549 else 550 { 551 price = ActualPrice; 552 } 553 } 554 else 555 { 556 spar = product.GetDouble("Ecom:Product:Field.Spar.Value.Clean"); 557 price = product.GetDouble("Ecom:Product.Price.Price"); 558 } 559 double OriginalPrice = spar + price; 560 561 562 <div class="col-12 col-md-6 mt-5"> 563 <a href="@ProductLink" class="offer-2col box-shadow-large border-radius-bottom-10px w-100 h-100 d-flex flex-column color-black"> 564 <div class="d-flex align-items-center justify-content-center offer-2col--img-container"> 565 <img class="img-fluid" src="@ProductImage" alt="@ProductName"> 566 @if (spar > 0) 567 { 568 <div class="discount-splash"> 569 <p class="m-0"> 570 @Translate("ProductOffer", "Tilbud") 571 </p> 572 </div> 573 } 574 </div> 575 <div> 576 <h1 class="offer-2col--title pl-3 pr-3 mb-3 text-center color-black text-uppercase"> 577 @ProductName 578 </h1> 579 <div class="offer-2col--subtitle color-dark-grey pl-3 pr-3 my-3 my-md-5 text-center"> 580 @ShortDescription 581 </div> 582 </div> 583 <div class="d-flex flex-wrap flex-fill justify-content-center align-items-end"> 584 <div class="d-flex flex-wrap flex-fill justify-content-center align-items-end"> 585 <p class="offer-2col--price mb-3 text-center font-weight-bold color-black w-100"> 586 @MoblerHelpers.formatPrice(price) 587 </p> 588 @if (spar > 0) 589 { 590 <div class="d-flex justify-content-center mb-3"> 591 <span class="offer-2col--pricebefore color-black-w-opacity mr-5 p-1 text-uppercase"> 592 @Translate("PriceBefore", "Før") @MoblerHelpers.formatPrice(OriginalPrice) 593 </span> 594 <span class="offer-2col--pricesave color-black bg-discount font-weight-bold p-1 text-uppercase"> 595 @Translate("PriceSaving", "Spar") @MoblerHelpers.formatPrice(spar) 596 </span> 597 </div> 598 } 599 600 <div class="w-100"> 601 <div class="offer-2col--button btn btn-primary p-3 border-radius-bottom-10px w-100 mb-sm-0 font-weight-bold"> 602 @Translate("GoToProduct", "Se produkt") 603 </div> 604 </div> 605 </div> 606 </div> 607 </a> 608 </div> 609 } 610 611 @using Mobler.Website.CustomModules.MoblerHelpers 612 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 613 614 @helper RenderBlogTeaser(Firstweb.Custom.CustomCode.Frontend.Helpers.Blog Blog) 615 { 616 string CleanLink = Blog.Link.Replace("default.aspx?id", "Default.aspx?Id"); 617 <div class="col-12 col-md-4 px-0 px-md-3 mb-4"> 618 <a href="@CleanLink" class="blog d-block"> 619 <div class="image" style="background-image:url('@Blog.Image')"> 620 <img class="d-none" src="@Blog.Image" alt="Alternate Text" /> 621 </div> 622 <div class="text"> 623 <div class="positioning"> 624 <h4 class="col-10 col-md-9 px-2 pt-3 bg-white font-weight-bold text-center mx-auto">@Blog.Header</h4> 625 <p class="text-center color-subtle">@Blog.Date</p> 626 <p class="text-center font-weight-bold m-0 color-primary">@Translate("BlogReadMore", "L&aelig;s mere her")</p> 627 </div> 628 </div> 629 </a> 630 </div> 631 } 632 633 @helper RenderLargeBlogTeaser(Firstweb.Custom.CustomCode.Frontend.Helpers.Blog Blog, string ImagePosition) 634 { 635 string ImageClass = ImagePosition == "Left" ? "" : "offset-md-4"; 636 string TextClass = ImagePosition == "Left" ? "" : "left"; 637 string Image = "/Admin/Public/GetImage.ashx?Image=" + Blog.Image + "&Height=400&Crop=0"; 638 string CleanLink = Blog.Link.Replace("default.aspx?id", "Default.aspx?Id"); 639 <div class="col-12 blog"> 640 <div class="row"> 641 <div class="col-12 col-md-8 px-0 px-md-3 @ImageClass"> 642 <div class="image-container" style="background-image:url('@Image')"> 643 <img class="img-fluid" src="@Image" alt="@Blog.Header" /> 644 </div> 645 </div> 646 <div class="col-12 col-md-6 text-container mb-5 mb-md-0 @TextClass"> 647 <div class="text bg-white p-3"> 648 <div> 649 <h4>@Blog.Header</h4> 650 @Blog.Teaser 651 </div> 652 <a class="font-weight-bold" href="@CleanLink">@Translate("BlogReadMore", "L&aelig;s mere her")</a> 653 </div> 654 </div> 655 </div> 656 </div> 657 } 658 659 @helper RenderLatestBlogsTeasers() 660 { 661 var LatestBlogs = Firstweb.Custom.CustomCode.Frontend.Helpers.Blogs.GetLatestBlogs(); 662 foreach (var Blog in LatestBlogs) 663 { 664 @RenderBlogTeaser(Blog) 665 } 666 } 667 668 669 <div class="container pt-3 d-none d-md-block"> 670 671 <div class="bread"> 672 <p class="color-subtle">@Translate("Breadcrumb.CurrentPage", "Her er du:")</p> 673 <p class="bread-item color-subtle"> 674 <a href="/"> 675 @Translate("Breadcrumb.Frontpage", "Forside") 676 </a> 677 </p> 678 @foreach (var Group in ParentGroups) 679 { 680 <p class="bread-item color-subtle"> 681 @if (Group == ParentGroups.First()) 682 { 683 @Group.Name 684 ShowOnPageUrl = Group.ProductGroupFieldValues.GetProductGroupFieldValue("FirstwebGroupPrimaryPage").Value.ToString(); 685 } 686 else 687 { 688 <a href="/@ShowOnPageUrl&GroupId=@Group.Id"> 689 @Group.Name 690 </a> 691 } 692 </p> 693 } 694 695 <p class="active color-subtle">@ProductName</p> 696 </div> 697 698 </div> 699 700 <div class="container mt-3 mb-5 product-details position-relative" data-bind="viewModel: 'ProductViewModel'"> 701 702 <div class="d-none" data-bind="setInitValue: { observable: CartPageId, value: '@AjaxCartPageId' }"></div> 703 <div class="d-none" data-bind="setInitValue: { observable: MiniCart, value: '.js-mini-cart-lines' }"></div> 704 <div class="d-none" data-bind="setInitValue: { observable: CartCount, value: '.js-cart-count' }"></div> 705 <div class="d-none" data-bind="setInitValue: { observable: CustomersAlsoSawLines, value: '.js-customers-also-saw-lines' }"></div> 706 <div class="d-none" data-bind="setInitValue: { observable: CustomersAlsoSawPage, value: '@CustomersAlsoSawPageId' }"></div> 707 <div class="d-none" data-bind="setInitValue: { observable: MainProductId, value: '@ProductID' }"></div> 708 <div class="d-none" data-bind="setInitValue: { observable: VariantsEndpoint, value: '@VariantsEndpoint' }"></div> 709 <div class="d-none" data-bind="setInitValue: { observable: VariantDetailsEndpoint, value: '@VariantDetailsEndpoint' }"></div> 710 <div class="d-none" data-bind="setInitValue: { observable: TeaserText, value: '@TrimmedTeaser' }"></div> 711 <div class="d-none" data-bind="setInitValue: { observable: ProductName, value: '@TrimmedName' }"></div> 712 <div class="d-none" data-bind="setInitValue: { observable: ProductNumber, value: '@ProductNumber' }"></div> 713 <div class="d-none" data-bind="setInitValue: { observable: VariantId, value: '@VariantId' }"></div> 714 <div class="d-none" data-bind="setInitValue: { observable: Price, value: '@priceFormatted' }"></div> 715 <div class="d-none js-update-cart" data-bind="setInitValue: { observable: CartEndpoint, value: '@GetCartEndpoint' }, click: GetCart"></div> 716 717 <div id="blueimp-gallery" class="blueimp-gallery"> 718 <div class="slides"></div> 719 <h3 class="title"></h3> 720 <a class="prev">‹</a> 721 <a class="next">›</a> 722 <a class="close">×</a> 723 <a class="play-pause"></a> 724 <ol class="indicator"></ol> 725 </div> 726 727 <div class="modal fade video-modal" id="videoModal" tabindex="-1" role="dialog" aria-labelledby="video-modal" aria-hidden="true"> 728 <div class="modal-dialog modal-dialog-centered" role="document"> 729 <div class="modal-content"> 730 <div class="modal-body"> 731 <div id="player"></div> 732 </div> 733 </div> 734 </div> 735 </div> 736 737 <div class="add-to-cart-overlay" data-bind="css: { 'd-block': ProcessingAjax }"> 738 <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> 739 </div> 740 741 <div class="add-to-cart-overlay" data-bind="css: { 'd-block': ProcessingVariantDetailsAjax }"> 742 <p class="fs4 m-0 color-white">@Translate("ProductAjaxGettingVariant", "Henter variant") <i class="fa fa-spinner fa-spin ml-3 fs5"></i></p> 743 </div> 744 745 <div class="delivery-information-popup" data-bind="css: { 'd-flex': DeliveryInfoOpen }, click: ToggleDeliveryInfo"> 746 <div class="description-content bg-white px-3 py-4 px-lg-4 position-relative" data-bind="click: OpenDeliveryInfo, clickBubble: false"> 747 <div class="modal-closer-custom" data-bind="click: ToggleDeliveryInfo, clickBubble: false"> 748 <img src="/Files/Templates/Designs/Mobler2018/assets/img/icons/close.svg" /> 749 </div> 750 @if (QuickDelivery) 751 { 752 <div> 753 @QuickDeliveryDescription 754 </div> 755 } 756 else if (DisplayAverageDeliveryTime) 757 { 758 <div> 759 @NormalDeliveryDescription 760 </div> 761 } 762 </div> 763 </div> 764 765 @if (CostPrice > 0) 766 { 767 string PriceDescription = Firstweb.Custom.CustomCode.Frontend.Helpers.AreaItems.GetString("DagsprisDescription"); 768 <div class="delivery-information-popup" data-bind="css: { 'd-flex': PriceInfoOpen }, click: TogglePriceInfo"> 769 <div class="description-content bg-white px-3 py-4 px-lg-4 position-relative" data-bind="click: OpenPriceInfo, clickBubble: false"> 770 <div class="modal-closer-custom" data-bind="click: TogglePriceInfo, clickBubble: false"> 771 <img src="/Files/Templates/Designs/Mobler2018/assets/img/icons/close.svg" /> 772 </div> 773 <div> 774 @PriceDescription 775 </div> 776 </div> 777 </div> 778 } 779 780 <h1 class="header mb-4" data-bind="text: ProductName">@ProductName</h1> 781 782 <div class="d-flex flex-wrap"> 783 784 <div class="image-container position-relative overflow-hidden"> 785 786 <div class="discount-splash unimportant-hidden discount-splash--small" data-bind="css: { 'd-flex': SplashType() == 5}"><p class="m-0">@Translate("ProductCombinationOffer", "Kombinationstilbud")</p></div> 787 <div class="discount-splash unimportant-hidden" data-bind="css: { 'd-flex': SplashType() == 1 }"><p class="m-0">@Translate("ProductOffer", "Tilbud")</p></div> 788 <div class="discount-splash unimportant-hidden new-item" data-bind="css: { 'd-flex': SplashType() == 2 }"><p class="m-0">@Translate("ProductNew", "Nyhed")</p></div> 789 <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> 790 <div class="discount-splash unimportant-hidden price-shape" data-bind="css: { 'd-flex': SplashType() == 4 }" style="background-color: @DailyPriceBackgroundColor;"><p class="m-0" style="color: @DailyPriceTextColor;">@Translate("ProductDailyPriceSplash", "Dagspris")</p></div> 791 792 <div id="imageSlider" class="carousel slide" data-ride="carousel" data-interval="5000"> 793 <div class="carousel-inner align-items-center" data-bind="if: Images().length == 0"> 794 795 @foreach (var Image in Images) 796 { 797 if (First) 798 { 799 <a href="/Admin/Public/GetImage.ashx?Image=@Image&width=2000" class="mb-3 mb-lg-0 carousel-item active" data-gallery> 800 <img class="product-image main-image" src="/Admin/Public/GetImage.ashx?Image=@Image&width=950&height=500&crop=5" alt="@ProductName" /> 801 </a> 802 First = false; 803 FirstImage = "/Admin/Public/GetImage.ashx?Image=" + Image + "&width=950&height=500&crop=5"; 804 } 805 else 806 { 807 <a href="/Admin/Public/GetImage.ashx?Image=@Image&width=2000" class="mb-3 mb-lg-0 carousel-item" data-gallery> 808 <img class="product-image main-image" src="/Admin/Public/GetImage.ashx?Image=@Image&width=950&height=500&crop=5" alt="@ProductName" /> 809 </a> 810 } 811 812 } 813 814 </div> 815 <div class="carousel-inner align-items-center d-flex js-ko-carousel" data-bind="foreach: Images()"> 816 817 <a data-bind="attr: { href: '/Admin/Public/GetImage.ashx?Image=' + $data + '&width=2000' }" class="mb-3 mb-lg-0 carousel-item active" data-gallery> 818 <img class="product-image main-image" data-bind="attr: { src: '/Admin/Public/GetImage.ashx?Image=' + $data + '&width=950&height=500&crop=5' }" /> 819 </a> 820 821 </div> 822 </div> 823 824 @if (Images.Count > 1) 825 { 826 <div class="row small-gutter carousel-row" data-bind="css: { 'd-none': Images().length > 0 }"> 827 828 @foreach (var Image in Images) 829 { 830 if (FirstIndicator) 831 { 832 <div data-target="#imageSlider" data-slide-to="@IndicatorIncrementer" class="col-4 mt-lg-3 cursor-pointer active"> 833 <div class="secondary-image"> 834 <img class="product-image" src="/Admin/Public/GetImage.ashx?Image=@Image&width=400&height=230&crop=5" alt="@ProductName" /> 835 </div> 836 </div> 837 FirstIndicator = false; 838 } 839 else 840 { 841 <div data-target="#imageSlider" data-slide-to="@IndicatorIncrementer" class="col-4 mt-lg-3 cursor-pointer"> 842 <div class="secondary-image"> 843 <img class="product-image" src="/Admin/Public/GetImage.ashx?Image=@Image&width=400&height=230&crop=5" alt="@ProductName" /> 844 </div> 845 </div> 846 } 847 IndicatorIncrementer++; 848 } 849 850 @if (!String.IsNullOrEmpty(GetString("Ecom:Product:Field.VideoKlip.Value"))) 851 { 852 string BackgroundSize = !String.IsNullOrEmpty(GetString("Ecom:Product:Field.VideoBillede.Value.Clean")) ? "cover" : "contain"; 853 string OverlayImage = !String.IsNullOrEmpty(GetString("Ecom:Product:Field.VideoBillede.Value.Clean")) ? GetString("Ecom:Product:Field.VideoBillede.Value.Clean") : FirstImage; 854 <div class="youtube-video-container mt-lg-3" data-bind="youtubeVideo: { videoId: '@GetString("Ecom:Product:Field.VideoKlip.Value")', overlayId: 'js-video-overlay', playerId: 'player' }"> 855 <div id="js-video-overlay" class="video-overlay pointer" style="background-image:url('@OverlayImage');background-size: @BackgroundSize;"> 856 <div class="visual-overlay d-flex flex-column justify-content-center align-items-center h-100 w-100"> 857 <img src="/Files/Templates/Designs/Mobler2018/assets/img/icons/Play.svg" /> 858 <p class="mt-3 mb-0 color-white">@Translate("Product.WatchVideo", "Se video")</p> 859 </div> 860 </div> 861 </div> 862 } 863 864 </div> 865 866 <div class="row small-gutter carousel-row unimportant-hidden" data-bind="css: { 'd-flex': Images().length > 0 }, foreach: Images()"> 867 868 <!-- ko if: $index() == 0 --> 869 <div data-target="#imageSlider" class="col-4 mt-lg-3 cursor-pointer active" data-bind="click: $parent.ChangeSlide.bind($data, $index())"> 870 <div class="secondary-image"> 871 <img class="product-image" data-bind="attr: { src: '/Admin/Public/GetImage.ashx?Image=' + $data + '&width=400&height=230&crop=5' }" alt="@ProductName" /> 872 </div> 873 </div> 874 <!-- /ko --> 875 <!-- ko if: $index() != 0 --> 876 <div data-target="#imageSlider" class="col-4 mt-lg-3 cursor-pointer" data-bind="click: $parent.ChangeSlide.bind($data, $index())"> 877 <div class="secondary-image"> 878 <img class="product-image" data-bind="attr: { src: '/Admin/Public/GetImage.ashx?Image=' + $data + '&width=400&height=230&crop=5' }" alt="@ProductName" /> 879 </div> 880 </div> 881 <!-- /ko --> 882 883 </div> 884 } 885 886 </div> 887 888 <div class="pl-lg-4 description-container d-flex flex-wrap flex-column mt-3 mt-lg-0 position-relative"> 889 890 <div class="mb-2">@ShortDescription</div> 891 892 <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> 893 894 <div class="w-100"> 895 <p class="color-subtle m-0">@Translate("ProductProductNumber", "Produktnummer:") <span data-bind="text: ProductNumber">@ProductNumber</span></p> 896 <p class="color-subtle m-0"> 897 @if (!string.IsNullOrWhiteSpace(GetString("Ecom:Product:Field.dybdeint.Value.Clean"))) 898 { 899 if (GetString("Ecom:Product:Field.dybdeint.Value.Clean") != "0") 900 { 901 <span>D/L: @GetValue("Ecom:Product:Field.dybdeint.Value.Clean")</span> 902 } 903 } 904 @if (!string.IsNullOrWhiteSpace(GetString("Ecom:Product:Field.hoejdeint.Value.Clean"))) 905 { 906 if (GetString("Ecom:Product:Field.hoejdeint.Value.Clean") != "0") 907 { 908 <span>H: @GetValue("Ecom:Product:Field.hoejdeint.Value.Clean")</span> 909 } 910 } 911 @if (!string.IsNullOrWhiteSpace(GetString("Ecom:Product:Field.breddeint.Value.Clean"))) 912 { 913 if (GetString("Ecom:Product:Field.breddeint.Value.Clean") != "0") 914 { 915 <span>B: @GetValue("Ecom:Product:Field.breddeint.Value.Clean")</span> 916 } 917 } 918 </p> 919 </div> 920 921 @if ((QuickDelivery || DisplayAverageDeliveryTime) && !HideDelivery) 922 { 923 <div class="w-100 mt-3"> 924 925 <div class="delivery-information"> 926 <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"> 927 <g> 928 <g> 929 <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" /> 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 </g> 946 </g> 947 </svg> 948 <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> 949 </div> 950 951 </div> 952 } 953 954 @if (CostPrice > 0) 955 { 956 <div class="w-100 mt-3"> 957 958 <div class="delivery-information"> 959 <div class="live-price-animation"></div> 960 <p class="delivery-text">@Translate("Product.PriceInfo.RecommendedPriceInfo", "Aktuel dagspris - ")<a href="#" class="text-underline" data-bind="click: TogglePriceInfo">@Translate("Product.PriceInfo.RecommendedPriceLink", "L&aelig;s mere")</a></p> 961 </div> 962 963 </div> 964 } 965 966 967 <div class="w-100"> 968 @if (GetBoolean("Ecom:Product:Field.Farvevarianter1.Value")) 969 { 970 <img class="img-fluid mb-3 mt-5" src="/Files/Images/Farver/farver1.png" /> 971 <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> 972 } 973 else if (GetBoolean("Ecom:Product:Field.Farvevarianter2.Value")) 974 { 975 <img class="img-fluid mb-3 mt-5" src="/Files/Images/Farver/farver2.png" /> 976 <p class="mb-0">@Translate("ProductColor2Text", "Farve 2 hj&aelig;lpetekst")</p> 977 } 978 else if (GetBoolean("Ecom:Product:Field.Farvevarianter3.Value")) 979 { 980 <img class="img-fluid mb-3 mt-5" src="/Files/Images/Farver/farver3.png" /> 981 <p class="mb-0">@Translate("ProductColor3Text", "Farve 3 hj&aelig;lpetekst")</p> 982 } 983 else if (GetBoolean("Ecom:Product:Field.Farvevarianter4.Value")) 984 { 985 <img class="img-fluid mb-3 mt-5" src="/Files/Images/Farver/farver4.png" /> 986 <p class="mb-0">@Translate("ProductColor4Text", "Farve 4 hj&aelig;lpetekst")</p> 987 } 988 else if (GetBoolean("Ecom:Product:Field.Farvevarianter5.Value")) 989 { 990 <img class="img-fluid mb-3 mt-5" src="/Files/Images/Farver/farver5.png" /> 991 <p class="mb-0">@Translate("ProductColor5Text", "Farve 5 hj&aelig;lpetekst")</p> 992 } 993 </div> 994 @if (GetLoop("VariantCombinations").Count > 0) 995 { 996 var VariantGroupsWithMultipleOptions = GetLoop("VariantGroups").Where(x => x.GetLoop("VariantAvailableOptions").Count > 1); 997 int VariantGroupCount = VariantGroupsWithMultipleOptions.Count(); 998 int VariantCombinationsCount = GetLoop("VariantCombinations").Count; 999 int PossibleVariantCombinations = 1; 1000 foreach (var VG in GetLoop("VariantGroups")) 1001 { 1002 PossibleVariantCombinations *= VG.GetLoop("VariantAvailableOptions").Count; 1003 } 1004 if (VariantGroupCount == 1) 1005 { 1006 var RelevantVariantGroup = VariantGroupsWithMultipleOptions.FirstOrDefault(); 1007 var SelectedVariant = RelevantVariantGroup.GetLoop("VariantAvailableOptions").Where(x => x.GetBoolean("Ecom:VariantOption.Selected")).FirstOrDefault(); 1008 <div class="position-relative"> 1009 <div class="variant-dropdown p-2 box-shadow mt-3 d-flex justify-content-between align-items-center pointer js-variant-dropdown"> 1010 <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> 1011 <i class="fas fa-chevron-down"></i> 1012 </div> 1013 <div class="variant-options bg-white"> 1014 @foreach (var Variant in RelevantVariantGroup.GetLoop("VariantAvailableOptions")) 1015 { 1016 var VariantCombination = GetLoop("VariantCombinations").Where(x => x.GetString("Ecom:VariantCombination.VariantID").ToString().Contains(Variant.GetString("Ecom:VariantOption.ID"))).FirstOrDefault(); 1017 string VariantName = Variant.GetString("Ecom:VariantOption.Name"); 1018 string VariantIdentifier = Variant.GetString("Ecom:VariantOption.ID"); 1019 string VariantLink = VariantCombination.GetString("Ecom:VariantCombination.Link.Clean"); 1020 string VariantPreview = String.Empty; 1021 var ObservableToSet = "SelectedVariantOption0"; 1022 var ObservableToSetId = "SelectedVariantOptionId0"; 1023 bool ShowPreview = RelevantVariantGroup.GetString("Ecom:VariantGroup.Name").ToString().ToLower().Contains("farve") || RelevantVariantGroup.GetString("Ecom:VariantGroup.Name").ToString().ToLower().Contains("materiale") ? true : false; 1024 if (!String.IsNullOrEmpty(Variant.GetString("Ecom:VariantOption.ImgSmall.Clean")) && ShowPreview) 1025 { 1026 if (Variant.GetString("Ecom:VariantOption.ImgSmall.Clean").StartsWith("#")) 1027 { 1028 VariantPreview = "style= \"background-color: " + Variant.GetString("Ecom:VariantOption.ImgSmall.Clean") + ";\""; 1029 } 1030 else 1031 { 1032 VariantPreview = "style=\"background-image: url('" + Variant.GetString("Ecom:VariantOption.ImgSmall.Clean") + "');\""; 1033 } 1034 } 1035 <div class="option pointer color-primary d-flex w-100 p-2 bg-grey" data-bind="click: UpdateVariantAndSetObservable.bind($data, '@VariantIdentifier', @ObservableToSet, '@VariantName', @ObservableToSetId)"> 1036 @if (!String.IsNullOrEmpty(VariantPreview)) 1037 { 1038 <span class="option-preview mr-2" @VariantPreview></span> 1039 } 1040 <span>@VariantName</span> 1041 </div> 1042 <div class="d-none" data-bind="setInitValue: { observable: @ObservableToSet, value: '@SelectedVariant.GetString("Ecom:VariantOption.Name")' }"></div> 1043 <div class="d-none" data-bind="setInitValue: { observable: @ObservableToSetId, value: '@SelectedVariant.GetString("Ecom:VariantOption.ID")' }"></div> 1044 1045 } 1046 </div> 1047 </div> 1048 } 1049 else if (PossibleVariantCombinations == VariantCombinationsCount) 1050 { 1051 Dictionary<string, string> CurrentlySelectedVariantOptions = new Dictionary<string, string>(); 1052 foreach (var VG in GetLoop("VariantGroups")) 1053 { 1054 foreach (var VO in VG.GetLoop("VariantAvailableOptions").Where(x => x.GetBoolean("Ecom:VariantOption.Selected"))) 1055 { 1056 CurrentlySelectedVariantOptions.Add(VG.GetString("Ecom:VariantGroup.Name"), VO.GetString("Ecom:VariantOption.ID")); 1057 } 1058 } 1059 int VGLoopCounter = 0; 1060 foreach (var VG in GetLoop("VariantGroups")) 1061 { 1062 List<LoopItem> RelevantVariantCombinations = new List<LoopItem>(); 1063 var VariantCombinationLink = GetLoop("VariantCombinations"); 1064 var SelectedVariant = VG.GetLoop("VariantAvailableOptions").Where(x => x.GetBoolean("Ecom:VariantOption.Selected")).FirstOrDefault(); 1065 var ObservableToSet = "SelectedVariantOption" + VGLoopCounter.ToString(); 1066 var ObservableToSetId = "SelectedVariantOptionId" + VGLoopCounter.ToString(); 1067 VGLoopCounter++; 1068 foreach (var VC in VariantCombinationLink) 1069 { 1070 var Add = true; 1071 foreach (var KVP in CurrentlySelectedVariantOptions.Where(s => s.Key != VG.GetString("Ecom:VariantGroup.Name"))) 1072 { 1073 if (!VC.GetString("Ecom:VariantCombination.VariantID").ToString().Contains(KVP.Value)) 1074 { 1075 Add = false; 1076 } 1077 } 1078 if (Add) 1079 { 1080 RelevantVariantCombinations.Add(VC); 1081 } 1082 } 1083 <div class="d-none" data-bind="setInitValue: { observable: @ObservableToSet, value: '@SelectedVariant.GetString("Ecom:VariantOption.Name")' }"></div> 1084 <div class="d-none" data-bind="setInitValue: { observable: @ObservableToSetId, value: '@SelectedVariant.GetString("Ecom:VariantOption.ID")' }"></div> 1085 1086 1087 <div class="position-relative"> 1088 <div class="variant-dropdown p-2 box-shadow mt-3 d-flex justify-content-between align-items-center pointer js-variant-dropdown"> 1089 <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> 1090 <i class="fas fa-chevron-down"></i> 1091 </div> 1092 <div class="variant-options bg-white"> 1093 @foreach (var VO in VG.GetLoop("VariantAvailableOptions")) 1094 { 1095 var VariantCombination = RelevantVariantCombinations.Where(vc => vc.GetString("Ecom:VariantCombination.VariantID").ToString().Contains(VO.GetString("Ecom:VariantOption.ID"))).FirstOrDefault(); 1096 string VariantLink = VariantCombination.GetString("Ecom:VariantCombination.Link.Clean"); 1097 string VariandOptionId = VariantCombination.GetString("Ecom:VariantCombination.VariantID"); 1098 string VariantPreview = String.Empty; 1099 string VOName = VO.GetString("Ecom:VariantOption.Name"); 1100 string VOId = VO.GetString("Ecom:VariantOption.ID"); 1101 bool ShowPreview = VG.GetString("Ecom:VariantGroup.Name").ToString().ToLower().Contains("farve") || VG.GetString("Ecom:VariantGroup.Name").ToString().ToLower().Contains("materiale") ? true : false; 1102 if (!String.IsNullOrEmpty(VO.GetString("Ecom:VariantOption.ImgSmall.Clean")) && ShowPreview) 1103 { 1104 if (VO.GetString("Ecom:VariantOption.ImgSmall.Clean").StartsWith("#")) 1105 { 1106 VariantPreview = "style= \"background-color: " + VO.GetString("Ecom:VariantOption.ImgSmall.Clean") + ";\""; 1107 } 1108 else 1109 { 1110 VariantPreview = "style=\"background-image: url('" + VO.GetString("Ecom:VariantOption.ImgSmall.Clean") + "');\""; 1111 } 1112 } 1113 <div class="option d-flex w-100 p-2 bg-grey color-primary pointer" data-bind="click: UpdateVariantAndSetObservable.bind($data, '@VOId', @ObservableToSet, '@VOName', @ObservableToSetId)"> 1114 @if (!String.IsNullOrEmpty(VariantPreview)) 1115 { 1116 <span class="option-preview mr-2" @VariantPreview></span> 1117 } 1118 @VOName 1119 </div> 1120 } 1121 </div> 1122 </div> 1123 } 1124 } 1125 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) 1126 { 1127 <div class="mt-3"> 1128 <p class="mb-1">@Translate("CurrentDesignName", "Valgte design: ")</p> 1129 <p class="font-weight-bold">@CurrentVariantName</p> 1130 </div> 1131 <div class="d-flex"> 1132 <div class="btn btn-primary" data-bind="click: ToggleVariantPicker">@Translate("ChooseNewDesign", "V&aelig;lg design")</div> 1133 </div> 1134 } 1135 else 1136 { 1137 var SelectedVariant = GetLoop("VariantCombinations").Where(x => x.GetBoolean("Ecom:VariantCombination.Selected")).FirstOrDefault(); 1138 var SelectedVariantName = SelectedVariant.GetString("Ecom:VariantCombination.VariantText"); 1139 var SelectedVariantId = SelectedVariant.GetString("Ecom:VariantOption.ID"); 1140 <div class="d-none" data-bind="setInitValue: { observable: SelectedVariantOption0, value: '@SelectedVariantName' }"></div> 1141 <div class="d-none" data-bind="setInitValue: { observable: SelectedVariantOptionId0, value: '@SelectedVariantId' }"></div> 1142 <div class="position-relative"> 1143 <div class="variant-dropdown p-2 box-shadow mt-3 d-flex justify-content-between align-items-center pointer js-variant-dropdown"> 1144 <p class="m-0"><span class="font-weight-bold">@Translate("FallbackVariantsText", "VARIANTER")</span> - <span data-bind="text: SelectedVariantOption0">@SelectedVariantName</span></p> 1145 <i class="fas fa-chevron-down"></i> 1146 </div> 1147 <div class="variant-options bg-white"> 1148 @foreach (var Variant in GetLoop("VariantCombinations")) 1149 { 1150 string VariantName = Variant.GetString("Ecom:VariantCombination.VariantText"); 1151 string VariantLink = Variant.GetString("Ecom:VariantCombination.Link.Clean"); 1152 string VCId = Variant.GetString("Ecom:Product.VariantID"); 1153 <div class="option color-primary pointer d-block p-2 bg-grey" data-bind="click: UpdateVariantAndSetObservable.bind($data, '@VCId', SelectedVariantOption0, '@VariantName', SelectedVariantOptionId0)">@VariantName</div> 1154 } 1155 </div> 1156 </div> 1157 } 1158 1159 } 1160 1161 <div class="row align-items-end f-grow-1"> 1162 <div class="col-10 offset-1 col-sm-12 offset-sm-0 d-flex justify-content-center justify-content-lg-start"> 1163 1164 <div class="mt-5 d-flex flex-wrap flex-column justify-content-end"> 1165 @*@if (CostPrice > 0) 1166 { 1167 var PriceShapePrices = Firstweb.Custom.CustomCode.Frontend.Helpers.PriceShapeHelpers.GetProductPrice(ProductNumber, EAN); 1168 <div class="d-none" data-bind="setInitValue: { observable: SplashType, value: 4 }"></div> 1169 if (PriceShapePrices != null && price < PriceShapePrices.MoblerPrice) 1170 { 1171 <div class="d-none" data-bind="setInitValue: { observable: ShowSaving, value: true }"></div> 1172 <div class="d-none" data-bind="setInitValue: { observable: CostPrice, value: '@MoblerHelpers.formatPrice(PriceShapePrices.MoblerPrice)' }"></div> 1173 } 1174 }*@ 1175 @if (campaignText == "KOMBI") 1176 { 1177 <div class="d-none" data-bind="setInitValue: { observable: SplashType, value: 5 }"></div> 1178 } 1179 else if (spar > 0) 1180 { 1181 <div class="d-none" data-bind="setInitValue: { observable: SplashType, value: 1 }"></div> 1182 <div class="d-none" data-bind="setInitValue: { observable: BeforePrice, value: '@normalPriceFormatted' }"></div> 1183 <div class="d-none" data-bind="setInitValue: { observable: Saving, value: '@sparFormatted' }"></div> 1184 } 1185 else if (NewItem) 1186 { 1187 <div class="d-none" data-bind="setInitValue: { observable: SplashType, value: 2 }"></div> 1188 } 1189 else if (LowPrice) 1190 { 1191 <div class="d-none" data-bind="setInitValue: { observable: SplashType, value: 3 }"></div> 1192 } 1193 1194 <div class="w-100 unimportant-hidden" data-bind="css: { 'd-flex': SplashType() == 1 }"> 1195 <p class="color-subtle fs0 m-0 text-uppercase mr-3">@Translate("PriceBefore", "Før") <span data-bind="text: BeforePrice"></span></p> 1196 <p class="bg-discount fs0 text-uppercase m-0 px-2 font-weight-bold">@Translate("PriceSaving", "Spar") <span data-bind="text: Saving"></span></p> 1197 </div> 1198 <div class="w-100 unimportant-hidden" data-bind="css: { 'd-flex': SplashType() == 4 && ShowSaving }"> 1199 @if (GetLoop("VariantCombinations").Count > 0) 1200 { 1201 <p class="color-subtle fs0 m-0 text-uppercase mr-3">@Translate("PriceRecommendPriceFrom", "Vejl. pris fra") <span data-bind="text: CostPrice"></span></p> 1202 } 1203 else 1204 { 1205 <p class="color-subtle fs0 m-0 text-uppercase mr-3">@Translate("PriceRecommendPrice", "Vejl. pris") <span data-bind="text: CostPrice"></span></p> 1206 } 1207 </div> 1208 <p class="price font-weight-bold m-0"> 1209 <span class="unimportant-hidden" data-bind="css: { 'd-inline': SplashType() == 1 }">@Translate("ProductNow", "NU") </span> 1210 <span data-bind="text: Price"></span> 1211 </p> 1212 1213 1214 @if (!string.IsNullOrEmpty(campaignDateStart) && !string.IsNullOrEmpty(campaignDateEnd)) 1215 { 1216 string CampaignText = $"{Translate("Campaign.BeforeDate.Text", "Gældende fra:")} {campaignDateStart} {Translate("Campaign.BeforeDate.Text2", "t.o.m.")} {campaignDateEnd}"; 1217 <div class="d-none" data-bind="setInitValue: { observable: CampaignText, value: '@CampaignText' }"></div> 1218 } 1219 else 1220 { 1221 <div class="d-none" data-bind="setInitValue: { observable: CampaignText, value: '' }"></div> 1222 } 1223 1224 <p data-bind="text: CampaignText"></p> 1225 1226 1227 <div> 1228 <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> 1229 <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://proxy.payever.org/finances/business/mobler/finance-express/91203/scripts/finance_express.embed.min.js', 'Payever', 'FinanceExpress');</script> 1230 </div> 1231 1232 @if (ForSale) 1233 { 1234 <div class="d-flex align-items-center mt-3"> 1235 <p class="m-0 font-weight-bold fs1 mr-2">@Translate("Product.Quantity", "Antal")</p> 1236 <div class="d-flex"> 1237 <div class="quantity-controls d-flex align-items-center mr-3"> 1238 <div class="control minus" data-bind="click: DecreaseQuantity"> 1239 - 1240 </div> 1241 <input type="text" name="Quantity" value="1" data-bind="value: Quantity" /> 1242 <div class="control plus" data-bind="click: IncrementQuantity"> 1243 + 1244 </div> 1245 </div> 1246 @if (BlackFridayTheme == "True") 1247 { 1248 <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')"> 1249 @Translate("ProductAddToCart", "L&aelig;g i kurv") 1250 </p> 1251 } 1252 else 1253 { 1254 <p class="btn btn-primary add-to-cart m-0 d-flex align-items-center px-4" data-bind="click: AddToCart.bind($data, '@DataLayerPrice')"> 1255 @Translate("ProductAddToCart", "L&aelig;g i kurv") 1256 </p> 1257 } 1258 </div> 1259 </div> 1260 } 1261 else 1262 { 1263 <p>@Translate("Ecom:Product.NotForSaleMessage", "Produktet kan ikke købes.")</p> 1264 } 1265 </div> 1266 </div> 1267 </div> 1268 1269 </div> 1270 1271 </div> 1272 1273 <div class="d-flex flex-wrap justify-content-center external-ctas"> 1274 1275 @if (!String.IsNullOrWhiteSpace(GetString("Ecom:Product:Field.ProviderLink.Value.Clean"))) 1276 { 1277 <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"> 1278 <span>@Translate("Product.DesignSelf", "Design selv")</span> 1279 <img src="/Files/Templates/Designs/Mobler2018/assets/img/icons/Pencil1.svg" /> 1280 </a> 1281 } 1282 1283 @if (!String.IsNullOrEmpty(ProductCatalogLink)) 1284 { 1285 <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"> 1286 <span>@Translate("ProductProductCatalogLink", "Se inspirationsbrochure")</span> 1287 <img src="/Files/Templates/Designs/Mobler2018/assets/img/icons/Brochure.svg" /> 1288 </a> 1289 } 1290 1291 </div> 1292 1293 <div class="d-flex flex-wrap mt-5"> 1294 1295 <div id="js-full-description"> 1296 <p class="fs3 mb-2 font-weight-bold">@Translate("ProductDescriptionHeader", "Beskrivelse")</p> 1297 <div class="unimportant-hidden" data-bind="html: FullDescription, css: { 'd-block': FullDescription().length > 0 }"> 1298 </div> 1299 <div data-bind="css: { 'd-none': FullDescription().length > 0 }"> 1300 @LongDescription 1301 1302 @if (!string.IsNullOrEmpty(productionDescription)) 1303 { 1304 <br/><br /> 1305 <h4>@Translate("Product.ProductionDescription.Headline", "Produktionsbeskrivelse")</h4> 1306 @:@productionDescription 1307 } 1308 </div> 1309 </div> 1310 1311 </div> 1312 1313 <div class="d-flex flex-wrap my-5"> 1314 1315 <div class="description-container mt-5 mt-lg-0"> 1316 <div class="bg-brand color-white box-shadow p-3 pb-5 questions"> 1317 <img class="staff-img" src="/Files/Templates/Designs/Mobler2018/assets/img/sovnmand.png" /> 1318 1319 @if (!String.IsNullOrWhiteSpace(shopInfo.ShopName) && shopInfo.ShopName != "Møblér") 1320 { 1321 <div class="shop-info"> 1322 <h4 class="fs45">@Translate("ProductQuestionsHeader", "Har du sp&oslash;rsm&aring;l?")</h4> 1323 <p class="mb-1">@shopInfo.Address, @shopInfo.PostalAndCity</p> 1324 <p class="mb-1">@shopInfo.Phone</p> 1325 @if (!String.IsNullOrEmpty(shopInfo.Email)) 1326 { 1327 <p class="mb-1"><a class="color-white" href="mailto:@shopInfo.Email">@shopInfo.Email</a></p> 1328 } 1329 @if (!String.IsNullOrEmpty(shopInfo.ShopName1)) 1330 { 1331 <p class="mb-1 mt-2">@shopInfo.Address1, @shopInfo.PostalAndCity1</p> 1332 <p class="mb-2">@shopInfo.Phone1</p> 1333 } 1334 @if (!String.IsNullOrEmpty(shopInfo.ShopName2)) 1335 { 1336 <p class="mb-1 mt-2">@shopInfo.Address2, @shopInfo.PostalAndCity2</p> 1337 <p class="mb-2">@shopInfo.Phone2</p> 1338 } 1339 @shopInfo.OpeningHours 1340 </div> 1341 } 1342 else 1343 { 1344 <h4 class="fs45">@Translate("ProductQuestionsHeader", "Har du sp&oslash;rsm&aring;l?")</h4> 1345 <p class="fs2 text">@Translate("ProductSelectNearestShop", "V&aelig;lg n&aelig;rmeste M&oslash;bler bolighus")</p> 1346 <select style="width: 280px;" data-bind="select2SelectShop: { overlay: 'find-dealer-overlay', placeholder: '@SelectPlaceholder' }"> 1347 @if (shopname == "Møblér") 1348 { 1349 <option selected disabled>@Translate("HeaderFindShop", "Find forhandler")</option> 1350 } 1351 else 1352 { 1353 foreach (var Shop in AllShops.Where(x => x.MenuText == shopname)) 1354 { 1355 <option selected disabled value="@HttpUtility.UrlEncode(Shop.MenuText)">@Shop.ShopName</option> 1356 } 1357 } 1358 @foreach (var Shop in AllShops) 1359 { 1360 if (Shop.MenuText != "Møblér" && Shop.MenuText != shopname) 1361 { 1362 var Address = "<div>" + Shop.Address + "</div><div>" + Shop.PostalAndCity + "</div>"; 1363 <option title="@Address" value="@HttpUtility.UrlEncode(Shop.MenuText)">@Shop.ShopName {{@Shop.PostalAndCity @Shop.SearchKeyWords}}</option> 1364 } 1365 } 1366 </select> 1367 } 1368 </div> 1369 </div> 1370 1371 </div> 1372 1373 @if (GetInteger("Ecom:Product.RelatedCount") > 0) 1374 { 1375 foreach (var Group in GetLoop("ProductRelatedGroups").Where(g => g.GetLoop("Products").Count > 0)) 1376 { 1377 <div class="py-3 mt-5" data-bind="viewModel: 'ProductListViewModel'"> 1378 1379 <div class="delivery-information-popup" data-bind="css: { 'd-flex': QuickDeliveryInfoOpen }, click: ToggleQuickDeliveryInfo"> 1380 <div class="description-content bg-white px-3 py-4 px-lg-4 position-relative" data-bind="click: OpenQuickDeliveryInfo, clickBubble: false"> 1381 <div class="modal-closer-custom" data-bind="click: ToggleQuickDeliveryInfo, clickBubble: false"> 1382 <img src="/Files/Templates/Designs/Mobler2018/assets/img/icons/close.svg" /> 1383 </div> 1384 <div> 1385 @QuickDeliveryDescription 1386 </div> 1387 </div> 1388 </div> 1389 <div class="delivery-information-popup" data-bind="css: { 'd-flex': NormalDeliveryInfoOpen }, click: ToggleNormalDeliveryInfo"> 1390 <div class="description-content bg-white px-3 py-4 px-lg-4 position-relative" data-bind="click: OpenNormalDeliveryInfo, clickBubble: false"> 1391 <div class="modal-closer-custom" data-bind="click: ToggleNormalDeliveryInfo, clickBubble: false"> 1392 <img src="/Files/Templates/Designs/Mobler2018/assets/img/icons/close.svg" /> 1393 </div> 1394 <div> 1395 @NormalDeliveryDescription 1396 </div> 1397 </div> 1398 </div> 1399 1400 <div class="line-through-header mb-3"> 1401 <h4>@Group.GetString("Ecom:Product:RelatedGroup.Name")</h4> 1402 </div> 1403 1404 <div class="row"> 1405 1406 @foreach (var Product in Group.GetLoop("Products")) 1407 { 1408 var productToRender = Product; 1409 string productId = Product.GetString("Ecom:Product.ID"); 1410 string variantIdLoop = productsDisplayVariant.GetDisplayVariantId(productId); 1411 1412 if (Product.GetLoop("VariantCombinations").Count > 0 && Product.GetLoop("VariantCombinations").Any(x => x.GetString("Ecom:Product.VariantID").Equals(variantIdLoop))) 1413 { 1414 productToRender = Product.GetLoop("VariantCombinations").FirstOrDefault(x => x.GetString("Ecom:Product.VariantID").Equals(variantIdLoop)); 1415 } 1416 1417 @RenderProduct(productToRender) 1418 } 1419 </div> 1420 </div> 1421 } 1422 } 1423 1424 @if (RelatedBlogs.Count > 0) 1425 { 1426 string ImagePosition = "Left"; 1427 <div class="feature-blogs my-5"> 1428 1429 <div class="row"> 1430 1431 @foreach (var Blog in RelatedBlogs) 1432 { 1433 @RenderLargeBlogTeaser(Blog, ImagePosition) 1434 if (ImagePosition == "Left") 1435 { 1436 ImagePosition = "Right"; 1437 } 1438 else 1439 { 1440 ImagePosition = "Left"; 1441 } 1442 } 1443 1444 </div> 1445 1446 </div> 1447 } 1448 1449 1450 <div class="after-add-to-cart bg-white box-shadow" data-bind="css: { 'd-block': ProductAddedToCart }"> 1451 <div class="closer fs3 pointer" data-bind="click: ProductAddedToCart(false)"> 1452 <i class="fas fa-times-circle color-primary"></i> 1453 </div> 1454 <div class="p-3"> 1455 <p class="font-weight-bold fs4 text-uppercase m-0"> 1456 <i class="fas fa-check-circle color-primary"></i> 1457 @Translate("ProductProductAddedToCart", "Varen er lagt i indk&oslash;bskurven") 1458 </p> 1459 </div> 1460 <div class="mini-cart large-cart power-step"> 1461 1462 <div class="position-relative"> 1463 <div class="cart-command-loader unimportant-hidden justify-content-center align-items-center" data-bind="css: { 'd-flex': Loading }"> 1464 <div class="d-flex align-items-center"> 1465 <p class="m-0 mr-2">@Translate("Cart.UpdatingCart", "Opdaterer kurv")</p> 1466 <i class="fas fa-spinner fa-spin"></i> 1467 </div> 1468 </div> 1469 1470 <div class="lines" data-bind="foreach: Orderlines"> 1471 <div class="cartline d-flex justify-content-between align-items-center px-3 py-2 position-relative bg-grey"> 1472 <span class="delete-orderline color-subtle cursor-pointer mr-2" data-bind="click: $parent.DeleteOrderline.bind($data, OrderlineId)"> 1473 <i class="fas fa-times"></i> 1474 </span> 1475 <div class="product-image w-10"> 1476 <img class="img-fluid" data-bind="attr: { src: ImagePath }" /> 1477 </div> 1478 <div class="flex-fill px-3 w-75"> 1479 <p class="font-weight-bold m-0" data-bind="text: ProductName"></p> 1480 <p class="m-0 color-subtle small-quantity-indicator"><span data-bind="text: Quantity"></span> stk. a <span data-bind="text: QuantityPrice"></span></p> 1481 <div class="variant-dimensions" data-bind="foreach: VariantDimensions"> 1482 <p class="m-0 color-subtle color-dark-grey font-weight-bold"> 1483 <span data-bind="text: Label"></span> 1484 <span class="font-weight-normal" data-bind="text: Value"></span> 1485 </p> 1486 </div> 1487 </div> 1488 <div class="qty-counter w-10"> 1489 <div class="d-flex"> 1490 <div class="quantity-controls d-flex align-items-center mr-3"> 1491 <div class="control minus" data-bind="click: $parent.QuantityControl.bind($data, -1, OrderlineId)"> 1492 - 1493 </div> 1494 <input disabled type="text" name="Quantity" value="1" data-bind="value: Quantity, attr: { 'data-id': 'js-input-' + OrderlineId }" /> 1495 <div class="control plus" data-bind="click: $parent.QuantityControl.bind($data, 1, OrderlineId)"> 1496 + 1497 </div> 1498 </div> 1499 </div> 1500 </div> 1501 1502 <p class="fs0 m-0 orderline-price" data-bind="text: OrderlinePrice"></p> 1503 </div> 1504 </div> 1505 @if (BlackFridayTheme == "True") 1506 { 1507 <div class="bf-bg-black p-3 d-flex justify-content-between align-items-center price-summary"> 1508 <p class="m-0 color-white fs-12px font-weight-semibold">@Translate("MiniCartTotal", "Din kurv i alt (ex. fragt)")</p> 1509 <p class="m-0 color-white fs1 font-weight-bold" data-bind="text: CartTotalNoFees"></p> 1510 </div> 1511 } 1512 else 1513 { 1514 <div class="bg-brand p-3 d-flex justify-content-between align-items-center price-summary"> 1515 <p class="m-0 color-white fs-12px font-weight-semibold">@Translate("MiniCartTotal", "Din kurv i alt (ex. fragt)")</p> 1516 <p class="m-0 color-white fs1 font-extra-bold" data-bind="text: CartTotalNoFees"></p> 1517 </div> 1518 } 1519 </div> 1520 1521 </div> 1522 <div class="p-3 d-flex justify-content-between"> 1523 <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> 1524 1525 @if (BlackFridayTheme == "True") 1526 { 1527 <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> 1528 } 1529 else 1530 { 1531 <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> 1532 } 1533 1534 </div> 1535 <div class="js-customers-also-saw-lines"></div> 1536 1537 </div> 1538 <div class="variant-picker" data-bind="css: { 'open': VariantPickerOpen }"> 1539 <div class="closer color-primary fs5 pointer" data-bind="click: ToggleVariantPicker"> 1540 <i class="fas fa-times-circle"></i> 1541 </div> 1542 <div class="container py-5 position-relative"> 1543 <h3 class="fs4 text-center">Design din @ProductName</h3> 1544 @{ 1545 var ColorDimensions = GetLoop("VariantGroups").Where(g => g.GetString("Ecom:VariantGroup.Name").ToLower().Contains("farve")); 1546 var NonColorDimensions = GetLoop("VariantGroups").Where(g => !g.GetString("Ecom:VariantGroup.Name").ToLower().Contains("farve")); 1547 int FilterCounter = 0; 1548 string RowClass = NonColorDimensions.Any() && ColorDimensions.Any() ? "flex-row-reverse" : ""; 1549 } 1550 <div class="row mt-5 @RowClass"> 1551 @if (ColorDimensions.Any()) 1552 { 1553 <div class="col-12 col-md-8"> 1554 @foreach (var VariantDimension in ColorDimensions) 1555 { 1556 string DimensionName = VariantDimension.GetString("Ecom:VariantGroup.Name"); 1557 string FilterName = "filter-" + FilterCounter; 1558 FilterCounter++; 1559 <div class="mb-5 mb-md-0"> 1560 <p class="font-weight-bold fs2 mb-2">@DimensionName</p> 1561 <div class="row custom-row"> 1562 @foreach (var VariantOption in VariantDimension.GetLoop("VariantAvailableOptions").OrderBy(v => v.GetString("Ecom:VariantOption.Name"))) 1563 { 1564 string VariantOptionName = VariantOption.GetString("Ecom:VariantOption.Name"); 1565 string VariantOptionId = VariantOption.GetString("Ecom:VariantOption.ID"); 1566 string Preview = VariantOption.GetString("Ecom:VariantOption.ImgSmall.Clean"); 1567 string PreviewCss = ""; 1568 if (!String.IsNullOrEmpty(Preview)) 1569 { 1570 if (Preview.StartsWith("#")) 1571 { 1572 PreviewCss = "style= \"background-color: " + Preview + ";\""; 1573 } 1574 else 1575 { 1576 PreviewCss = "style=\"background-image: url('" + Preview + "');\""; 1577 } 1578 } 1579 <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')"> 1580 <p class="mb-0 color-variant-name d-none d-sm-block">@VariantOptionName</p> 1581 <div class="variant-preview position-relative d-flex" @PreviewCss></div> 1582 </div> 1583 } 1584 </div> 1585 </div> 1586 } 1587 </div> 1588 } 1589 @if (NonColorDimensions.Any()) 1590 { 1591 <div class="col-12 col-sm-6 col-md-4"> 1592 @foreach (var VariantDimension in NonColorDimensions) 1593 { 1594 string DimensionName = VariantDimension.GetString("Ecom:VariantGroup.Name"); 1595 string FilterName = "filter-" + FilterCounter; 1596 FilterCounter++; 1597 <div class="mb-5"> 1598 <p class="font-weight-bold fs2 mb-2">@DimensionName</p> 1599 <div class="row custom-row"> 1600 @foreach (var VariantOption in VariantDimension.GetLoop("VariantAvailableOptions").OrderBy(v => v.GetString("Ecom:VariantOption.Name"))) 1601 { 1602 string VariantOptionName = VariantOption.GetString("Ecom:VariantOption.Name"); 1603 string VariantOptionId = VariantOption.GetString("Ecom:VariantOption.ID"); 1604 string Preview = VariantOption.GetString("Ecom:VariantOption.ImgSmall.Clean"); 1605 string PreviewCss = ""; 1606 if (!String.IsNullOrEmpty(Preview)) 1607 { 1608 if (Preview.StartsWith("#")) 1609 { 1610 PreviewCss = "style= \"background-color: " + Preview + ";\""; 1611 } 1612 else 1613 { 1614 PreviewCss = "style=\"background-image: url('/Files" + Preview + "');\""; 1615 } 1616 } 1617 if (DimensionName == "STØRRELSE") 1618 { 1619 <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')"> 1620 <div class="variant-preview position-relative d-flex justify-content-center align-items-center" @PreviewCss> 1621 <p class="mb-0 color-variant-name font-weight-bold">@VariantOptionName</p> 1622 </div> 1623 </div> 1624 } 1625 else 1626 { 1627 <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')"> 1628 <p class="mb-0 color-variant-name">@VariantOptionName</p> 1629 <div class="variant-preview position-relative d-flex" @PreviewCss></div> 1630 </div> 1631 } 1632 } 1633 </div> 1634 </div> 1635 } 1636 </div> 1637 } 1638 1639 <div class="col-12 d-flex justify-content-end"> 1640 <p class="color-primary pointer my-3" data-bind="click: ResetFilters">Nulstil</p> 1641 </div> 1642 </div> 1643 <p class="font-weight-bold fs2 mt-5"> 1644 @Translate("ChooseProduct", "V&aelig;lg produkt") 1645 </p> 1646 <div class="row align-items-end" data-bind="foreach: FilteredVariants"> 1647 <div class="col-12 col-sm-6 col-md-3 mb-3"> 1648 <a class="color-black no-underline" data-bind="attr: { href: Link }"> 1649 <p class="fs0 font-weight-bold m-0" data-bind="text: Name"></p> 1650 <img class="img-fluid box-shadow my-1" data-bind="attr: { src: Image }" /> 1651 <div class="d-flex justify-content-center mt-2"> 1652 <div class="btn btn-primary">@Translate("VariantChooseProduct", "V&aelig;lg")</div> 1653 </div> 1654 </a> 1655 </div> 1656 </div> 1657 <div data-bind="visible: FilteredVariants().length == 0"> 1658 <p class="font-weight-bold mt-3 fs3">@Translate("VariantsNoResults", "Filtreringen gav ingen resultater")</p> 1659 </div> 1660 </div> 1661 </div> 1662 </div> 1663 1664 @SnippetStart("DataLayerOverwrites") 1665 <script> 1666 ecomm_pagetype = "Product"; 1667 ecomm_totalvalue = @GetString("Ecom:Product.Price.Price").Replace(".","").Replace(",","."); 1668 ecomm_prodid = "@GetString("Ecom:Product.ID")"; 1669 </script> 1670 @SnippetEnd("DataLayerOverwrites") 1671 1672 <script> 1673 var dataLayer = window.dataLayer || []; 1674 dataLayer.push({ 1675 'event': 'product', 1676 'ecommerce': { 1677 'detail': { 1678 'actionField': { 1679 'list': '@DataLayerParentGroups' 1680 }, 1681 'products': [{ 1682 'id': '@ProductID', 1683 'name': '@ProductName', 1684 'image': '@OgImage', 1685 'brand': '@BrandName', 1686 'variant': '@CurrentVariantName', 1687 'category': '@DataLayerParentGroup', 1688 'price': '@DataLayerPrice' 1689 }] 1690 } 1691 }, 1692 'page': { 1693 'type': 'product', 1694 'environment': 'production' 1695 } 1696 }); 1697 </script> 1698

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.