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

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.