Indretning af spisestuen - gør din spisestue spiselig

12. februar 2025

Spisestuen er efterhånden blevet et af de mest centrale rum i boligen og det sted, hvor vi tilbringer en stor del af døgnets timer. Hvor man førhen brugte spisestuen til at indtage dagens tre hovedmåltider, er rummet i dag blevet et multifunktionelt sted, der ofte smelter sammen med dagligstuen. Derfor bliver man også nødt til at betragte spisestuen som en del af den øvrige boligindretning.

Vi er eksperter i møbler, og vi har taget et kig i spåkuglen for at skabe os et overblik over de kommende trends inden for boligindretning. Vi har samlet en række tendenser, som vi mener, bliver agendasættende for det kommende år, og som i den grad vil afspejle sig i spisestuerne rundt omkring i de danske hjem. Og bare rolig – vi snakker ikke om radikale tendenser. Du behøver ikke frygte for at skulle lave hele din spisestue om, da det handler om nuanceforskelle, udvidelser og en nyfortolkning. Ikke desto mindre er det væsentligt at være bevidst om udviklingen, hvis du gerne vil have en spisestue, der er moderne og tidssvarende.

Så læn dig godt tilbage, og læs med her, hvor vi giver dig fem gode tips til, hvordan du gør din spisestue spiselig.

God fornøjelse!

Læs også: Indretning af stuen

1. God siddekomfort – når enden er god, er alting godt

Plankebord med elegante spisestole med plastskal

Når man taler om indretning af spisestuen, vil de fleste nok med det samme tænke i enten funktionsorienterede eller æstetiske baner. Det er der som sådan ikke noget galt med, da spisestuens identitet i den grad er defineret ved den hverdagslige brugspraksis, hvor vi dagligt mødes med familien og spiser. Samtidig vil vi gerne have, at spisestuen tager sig godt ud rent visuelt og repræsenterer et hjem med god stil. Funktionalitet og æstetik er stadig i højsædet, men i det kommende år vil der blive sat fokus på et tredje ben: komfort.

Udover at være et praktisk og funktionsdygtigt rum skal spisestuen også afspejle komfort og velvære, hvilket har betydning for indretningen, men også valg af møblement. Det er ikke nok, at spisestuens møbler er designrigtige og en fryd for øjet – de skal også fremstå indbydende, lækre og invitere til brug, afslapning og nydelse.

Du kan skabe et casual look ved at investere i møbler, der er helt eller delvist polstrede med lækkert kvalitetsstof eller læder. Det vil rent visuelt signalere komfort, men også give dig en god siddeoplevelse. Her kan det være en god idé at starte med spisebordsstolene og bytte de gamle og hårde aluminiums- eller træstole ud med mere komfortorienterede udgaver, der har polstrede sæder i lækre og bløde tekstiler. Er du lidt mere vovet anlagt, kan du også gå hele vejen og vælge stole, der er betrukket med stof på alle overflader. Det giver et mere intimt og hyggeligt udtryk, som imiterer dagligstuens afslappede møblement og giver en behagelig siddeoplevelse rundt om spisebordet – time efter time.

Se alle spisebordsstole i træ her.

Vi tager samtidig ”a trip down memory lane” – til 1970’erne, hvor fløjl var det helt store hit. Fløjl har nemlig ikke kun fået et comeback inden for tøjmoden, men også på boligindretningsfronten som supplement til den ellers dominerende velourtrend, der i lang tid har været topmoderne.

Det skal altså være komfortabelt og afslappende at sidde til bords i 2019, og derfor gør det heller ikke noget, at dine spisebordsstole er rummelige og tager noget plads, da møblementet skal støtte kroppen og have en god siddekomfort - her kan særligt spisebordsstole med armlæn være en godt valg. Det kan du blandt andet sikre ved at tilkøbe ekstra siddehynder, bløde puder eller lækre kvalitetsskind, som kan placeres i spisestuens forskellige møbler.

Sagt på en anden måde: Når enden er god, er alting godt – og derfor bør du kigge efter et spisestuemøblement med masser af komfort.

Læs også: Vælg den rigtige spisebordsstol

Mangler du en råd tråd i din indretning, har vi skrevet et blogindlæg om 5 populære indretningsstile, så du kan finde inspiration.

2. Der er ”grønt” på menuen

Hvilken farve, der dominerer boligindretningen i den pågældende sæson, er altid et varmt diskuteret emne hvert år. Der er ofte flere forskellige bud og farvenuancer i spil, men i år er der en bred enighed om, at grøn er den farve, der kommer til at præge boligindretningen. Den grønne farve vil gå igen i samtlige rum i boligen, hvilket betyder, at spisestuens indretning, interiør og møblement generelt vil have grønne nuancer.

De danske hjem har tidligere været præget af en nordisk stil med rene linjer, hvide vægge og hvide møbler, men fremover vil vi i stigende grad se en tendens, hvor der er mere fokus på det jordnære og afbalancerede look, hvilket kommer til udtryk i farvevalget. Nogle af de mest fremtrædende farver vil være lyse, knækkede pastelfarver – ofte i grønlige nuancer såsom lime. Men også andre farver som for eksempel syren, fersken, lavendel eller pudder vil titte frem.

Fælles for alle disse farver er, at de kommer i sarte og støvede nude- og douce-toner, der ikke larmer eller vækker opsigt, frem for pangfarvede og sprælske farver. Det skaber en rolig atmosfære, der understøtter det øgede fokus på afslapning og komfort. Samme effekt kan du opnå ved at anvende ”tone-i-tone”-farver. Det vil sige nuancer inden for samme farveskala, der komplementerer hinanden og skaber en harmonisk og afbalanceret helhedsoplevelse – gerne på tværs af vægge, paneler, interiør, gardiner og møblement. Foruden den grønne farve vil den såkaldte ”greige” være populær. Det er en farve, der bedst beskrives som en blanding af kølig grå og klassisk beige.

Så hvis du har ”grønt” på menuen, kan du med fordel implementere det i din indretning af spisestuen, hvis du gerne vil være med på farvemoden.

Læs også: Vær ikke bange for mørke farver

3. Rundt om det runde (spise)bord

Rundt skovby spisebord med læderspisestole

Ingen spisestue uden et spisebord. Spisebordet er det centrale møbel i spisestuen, og det er som regel det møbel, der tager mest plads – både fysisk og visuelt. Derfor er det vigtigt, at du gør dig en række overvejelser om, hvad dit spisebord skal udtrykke, og hvilke formål det skal bruges til, inden du investerer i et nyt bord. 

Når vi taler om møblering af spisestuen anno 2019, er der et stigende fokus på runde og organiske former, hvilket blandt andet bliver tydeligt inden for kategorier som spiseborde og sofaborde. Vi ser flere og flere eksempler på, at de klassiske borde med skarpe kanter og lige, ubrudte linjer bliver erstattet af borde, der har slebne og afrundede kanter eller ligefrem runde design. Det runde bord er samtidig et udtryk for en øget tendens til at prioritere de såkaldte ”sociale” møbler i boligindretningen, hvor møblerne og møbelarrangementerne i høj grad skal indbyde og motivere til social interaktion og hyggeligt samvær. Ud over formen på bordet, kan det være en fordel at overveje hvorvidt bordet skal være et rundt spisebord med udtræk, således alle gæsterne kan være der. Såfremt man ønsker et bestemt visuelt look eller materiale, kan man overveje et af vores egetræsborde, langborde eller laminat spiseborde. Du kan læse endnu mere om fordelene ved at vælge et rundt spisebord i vores blogindlæg dedikeret til netop denne type spisebord. 

Det samlede overblik: Se alle spiseborde i træ her.

Er du ikke til de runde former, kan du i stedet hoppe på ”plankebordsvognen”, da de solide og store plankeborde og planke sofaborde også synes at trende – særligt grundet deres rustikke og naturlige træmaterialer, der giver spisestuen et autentisk look. Et look, som i den grad vil dominere bolig- og designverdenen det kommende år.

Er du i tvivl om, hvilket spisebord der passer til dit hjem og dine behov, kan du med fordel tage et kig på Møblérs brede udvalg af lækre kvalitetsspiseborde i vores onlinekatalog, hvor du også finder en lang række spisebordsstole, der matcher i stil og afspejler samme høje standard, hvad angår kvalitetsmaterialer. Her finder du også alle vores runde sofaborde der matcher.

Læs også: Spisebord med plads til det rigtige

4. Den naturlige indretning af spisestuen – bogstavelig talt

Tevva plankebord med sorte spisebordsstole

I direkte forlængelse af ovenstående vil vi gerne slå et slag for, at du integrerer naturelementer i indretningen af din spisestue såvel som i resten af boligens rum. Vi har tidligere været inde på grøn som den dominerende farve. Derfor vil vi også se spisestuer med jordnære naturfarver såsom grøn, brun, greige og lignende nuancer. Denne farveprioritering harmonerer med den generelle tendens til at inkorporere naturmaterialer, eksempelvis i form af træmøbler i mørke sorter, der står i skarp kontrast til de lyse egetræsmøbler, som indtil nu har domineret mange nordiske hjem. 

Læs også: Naturlig og nordisk boligindretning

Denne stilmæssige udvikling kommer blandt andet til udtryk i kraft af de mange grønne planter, der finder vej til de danske hjem. Og her er der ikke tale om små potteplanter – tværtimod. Vi snakker om store planter, bregner eller lignende, der gerne må fylde og tiltrække noget opmærksomhed i spisestuen og dermed bidrage til etableringen af et naturligt miljø. Vi ser altså i stigende grad et ønske om at hylde autenticiteten og naturen, hvilket langt fra begrænser sig til brugen af planter, men også inkluderer anvendelsen af andre naturmaterialer som for eksempel læder, uld, pels, skind og rustikke træstubbe, der fungerer som et smart alternativ til en skammel eller en puf. 

Naturen bliver bogstavelig talt budt indenfor, hvilket kan være med til at give dit hjem nyt liv og et friskt pust.

Læs også: Indret med farver, og giv hjemmet et friskt pust

5. Tør du gå med på de tørrede blomster? 

Med det sidste og femte råd til, hvordan du opdaterer din spisestue, bevæger vi os over i den dekorative del af indretningen. Og dette felt er naturligvis også influeret af den omtalte tendens til at hylde naturen og det autentiske look. Det ser vi blandt andet, når flere af boligens rum dekoreres med tørrede blomster i forskellige udgaver og former.

De tørrede blomster er i sig selv et klart symbol på naturen, men tørrede blomster er samtidig en praktisk konstellation, da de ikke kræver pleje, vedligeholdelse og grønne fingre ligesom friske planter og blomster. Derudover er de fleste tørrede blomster karakteriseret ved de føromtalte jordfarver, som matcher de tendenser, vi tidligere har beskrevet.

Læs også: Lav en smuk evighedsbuket

Et godt eksempel er den populære og dekorative pampasgræs fra Sydamerika, som fås først på efteråret. Den er langtidsholdbar og pynter med sit fjerlignende aks. Så du kan altså sagtens være ”grøn” og med på boligmoden – både når det gælder planter og farver.

Læs også: Lav din egen kokedama - en japansk hængeplante

Når det gælder andre trends inden for det dekorative felt, ser vi desuden en stigende tendens til at bruge glas som pynt. Det kan eksempelvis være i form af unikke vintageglas, der er fundet på et antik- eller loppemarked, og det gør bestemt ikke noget, hvis glassene ikke matcher i hverken udformning eller farve. Forskellige toner inden for samme farve vil passe rigtig godt ind i en spisestue, der gennemgående har en tone-i-tone-palet. 

En anden måde, hvorpå du kan understøtte det naturlige udtryk og design i spisestuen, er ved at investere i lækre gulvtæpper eller plaider i naturmaterialer såsom dyreskind. Det kan både have en æstetisk og komfortoptimerende funktion, samtidig med at gulvtæpper generelt er med til at skabe sammenhæng i spisestuen på tværs af rum og områder.

Hvis du følger (nogle af) ovenstående tips, kan du således relativt nemt få etableret en tidssvarende og opdateret spisestue, der holder hele året ud – og hvem ved, måske også længere ud i fremtiden. Hvordan du konkret vælger at indrette din spisestue, er helt op til dig selv. Det vigtigste er, at den dækker dine behov og passer til din smag.

Skulle du ønske yderligere vejledning eller inspiration til, hvordan du gør din spisestue spiselig og personlig, må du endelig ikke tøve med at henvende dig til os. Du kan kontakte os telefonisk, pr. mail eller møde fysisk op i en af vores landsdækkende Møblér-butikker, hvor du altid kan få kyndig rådgivning og har mulighed for selv at afprøve møblerne på egen krop.

Læs også: indretning af entréen

Vi glæder os til at høre fra dig.

Held og lykke med møbleringen og indretningen af din spisestue.

De nyeste trends indenfor havemøbler - sådan skaber du moderne uderum

De nyeste trends indenfor havemøbler - sådan skaber du moderne uderum

Læs mere her
Boheme eller klassisk? Find din stil med de rette møbler til haven

Boheme eller klassisk? Find din stil med de rette møbler til haven

Læs mere her
Sådan skaber du skandinavisk minimalisme i haven

Sådan skaber du skandinavisk minimalisme i haven

Læs mere her
Error compiling template "/Designs/Mobler/Paragraph/FeaturedProducts.cshtml"
Line 125: The name 'MoblerHelpers' does not exist in the current context
Line 152: The name 'MoblerHelpers' does not exist in the current context
Line 157: The name 'MoblerHelpers' does not exist in the current context
Line 161: The name 'MoblerHelpers' does not exist in the current context
Line 165: The name 'MoblerHelpers' does not exist in the current context
Line 144: The variable 'campaignDate' is assigned but its value is never used
Line 651: The name 'MoblerHelpers' does not exist in the current context
Line 1308: The variable 'createEmptyLine' is assigned but its value is never used

1 //------------------------------------------------------------------------------ 2 // <auto-generated> 3 // This code was generated by a tool. 4 // Runtime Version:4.0.30319.42000 5 // 6 // Changes to this file may cause incorrect behavior and will be lost if 7 // the code is regenerated. 8 // </auto-generated> 9 //------------------------------------------------------------------------------ 10 11 namespace CompiledRazorTemplates.Dynamic { 12 using System; 13 using System.Collections.Generic; 14 using System.Linq; 15 16 #line 16 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 17 using Mobler.Website.CustomModules.MoblerHelpers; 18 19 #line default 20 #line hidden 21 22 #line 4 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 23 using System.Collections; 24 25 #line default 26 #line hidden 27 28 #line 5 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 29 using Dynamicweb.Core; 30 31 #line default 32 #line hidden 33 34 #line 6 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 35 using Dynamicweb.Ecommerce; 36 37 #line default 38 #line hidden 39 40 #line 8 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 41 using Dynamicweb.Ecommerce.Products; 42 43 #line default 44 #line hidden 45 46 #line 9 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 47 using Dynamicweb.Ecommerce.Variants; 48 49 #line default 50 #line hidden 51 52 #line 10 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 53 using Humanizer; 54 55 #line default 56 #line hidden 57 58 #line 11 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 59 using Mobler.Website.CustomCode; 60 61 #line default 62 #line hidden 63 64 #line 12 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 65 using Mobler.Website.CustomCode.Models; 66 67 #line default 68 #line hidden 69 70 #line 13 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 71 using Newtonsoft.Json; 72 73 #line default 74 #line hidden 75 76 77 public class RazorEngine_5e387b5f27254444971897e9a1b6b503 : Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> { 78 79 #line hidden 80 81 #line 18 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 82 83 84 public class SplashPriceObject 85 { 86 public string splashType { get; set; } 87 public string splashText { get; set; } 88 public string splashTextPrefix { get; set; } 89 public string onTopSplashText { get; set; } 90 public string priceFormatted { get; set; } 91 public string OLprice { get; set; } 92 public string normalPriceFormatted { get; set; } 93 public string normalPricePrefix { get; set; } 94 public int splashTypeInt { get; set; } 95 } 96 97 public double GetDoubleValue(LoopItem loopItem, string key) 98 { 99 return loopItem == null ? GetDouble(key) : loopItem.GetDouble(key); 100 } 101 public DateTime GetDateValue(LoopItem loopItem, string key) 102 { 103 return loopItem == null ? GetDate(key) : loopItem.GetDate(key); 104 } 105 public bool GetBooleanValue(LoopItem loopItem, string key) 106 { 107 return loopItem == null ? GetBoolean(key) : loopItem.GetBoolean(key); 108 } 109 public string GetStringValue(LoopItem loopItem, string key) 110 { 111 return loopItem == null ? GetString(key) : loopItem.GetString(key); 112 } 113 public SplashPriceObject GetSplashPriceObject(LoopItem product) 114 { 115 var result = new SplashPriceObject() 116 { 117 normalPriceFormatted = "", 118 normalPricePrefix = "", 119 splashText = "", 120 splashTextPrefix = "", 121 onTopSplashText = "", 122 priceFormatted = "", 123 splashType = "", 124 splashTypeInt = 0, 125 OLprice = MoblerHelpers.formatPrice(GetDoubleValue(product, "Ecom:Order:olPrice.Price")) 126 }; 127 // Pricing 128 DateTime newItemExpiryDate = GetDateValue(product, "Ecom:Product:Field.NewItemExpiryDate"); 129 bool hasNewItemExpiryDate = newItemExpiryDate.Date > DateTime.Now.Date; 130 bool newItem = GetBooleanValue(product, "Ecom:Product:Field.NewItem") && hasNewItemExpiryDate; 131 bool LowPrice = GetBooleanValue(product, "Ecom:Product:Field.Splash3"); 132 bool JubileePrice = GetBooleanValue(product, "Ecom:Product:Field.JubileePrice"); 133 double CostPrice = GetDoubleValue(product, "Ecom:Product:Field.FirstwebCostPrice.Value.Raw"); 134 string PriceSaving = GetStringValue(product, "Ecom:Product:Field.Spar.Value"); 135 double ActualPrice = GetDoubleValue(product, "Ecom:Product.Price.Price"); 136 137 // Initialize variables 138 double spar = 0; 139 double price = 0; 140 double normalPrice = 0; 141 string sparFormatted = ""; 142 string campaignColor = ""; 143 string campaignText = ""; 144 string campaignDate = ""; 145 bool CampaignActiveOnProduct = GetBooleanValue(product, "CampaignModule:Product.CampaignActiveOnProduct"); 146 bool IsMasterShopProduct = GetBooleanValue(product, "Ecom:Product:Field.SystemIsMasterShopProduct"); 147 bool IsLocalWebshopProduct = Mobler.Website.CustomCode.Frontend.Helper.IsLocalWebshop() && !IsMasterShopProduct; 148 149 if (!CampaignActiveOnProduct && !IsLocalWebshopProduct) 150 { 151 price = ActualPrice; 152 result.priceFormatted = MoblerHelpers.formatPrice(price); 153 } 154 else if (IsLocalWebshopProduct) 155 { 156 price = ActualPrice; 157 result.priceFormatted = MoblerHelpers.formatPrice(price); 158 159 normalPrice = GetDoubleValue(product, "Ecom:Product:Field.ForPris"); 160 if(normalPrice > 0) { 161 result.normalPriceFormatted = MoblerHelpers.formatPrice(normalPrice); 162 } 163 164 spar = GetDoubleValue(product, "Ecom:Product:Field.Spar"); 165 sparFormatted = MoblerHelpers.formatPrice(spar); 166 167 bool SplashLwCombiPrice = GetBooleanValue(product, "Ecom:Product:Field.SplashLwCombiPrice"); 168 DateTime SplashLwCombiPriceExpiryDate = GetDateValue(product, "Ecom:Product:Field.SplashLwCombiPriceExpiryDate"); 169 170 if (SplashLwCombiPrice && (SplashLwCombiPriceExpiryDate == DateTime.MinValue || SplashLwCombiPriceExpiryDate > DateTime.Now)) 171 { 172 campaignText = "KOMBI"; 173 } 174 } 175 else 176 { 177 normalPrice = GetDoubleValue(product, "CampaignModule:Product.CampaignProduct.NormalPrice"); 178 result.normalPriceFormatted = GetStringValue(product, "CampaignModule:Product.CampaignProduct.NormalPrice.FormattedRetail"); 179 180 price = GetDoubleValue(product, "CampaignModule:Product.CampaignProduct.CampaignPrice"); 181 result.priceFormatted = GetStringValue(product, "CampaignModule:Product.CampaignProduct.CampaignPrice.FormattedRetail"); 182 183 spar = GetDoubleValue(product, "CampaignModule:Product.CampaignProduct.DiscountAmount"); 184 sparFormatted = GetStringValue(product, "CampaignModule:Product.CampaignProduct.DiscountAmount.FormattedRetail"); 185 186 campaignColor = GetStringValue(product, "CampaignModule:Product.Campaign.Color"); 187 campaignText = GetStringValue(product, "CampaignModule:Product.Campaign.Text"); 188 } 189 190 // Set Splash Types 191 if (JubileePrice) 192 { 193 result.splashType = "jubileeprice"; 194 result.splashTypeInt = 6; 195 result.splashText = sparFormatted; 196 result.splashTextPrefix = Translate("PriceSaving", "Spar"); 197 result.onTopSplashText = Translate("ProductJubileePrice", "Jubilæums pris"); 198 } 199 else if (campaignText == "KOMBI") 200 { 201 result.splashType = "combo"; 202 result.splashTypeInt = 5; 203 result.splashText = sparFormatted; 204 result.splashTextPrefix = Translate("PriceSaving", "Spar"); 205 result.onTopSplashText = Translate("ProductCombinationOffer", "Sætpris"); 206 result.normalPricePrefix = Translate("PriceBeforeCombo", "Samlet normpris."); 207 } 208 else if (CostPrice > 0) 209 { 210 result.splashType = "priceshape"; 211 result.splashTypeInt = 4; 212 result.splashText = ""; 213 result.splashTextPrefix = ""; 214 result.onTopSplashText = Translate("ProductDailyPriceSplash", "Dagspris"); 215 } 216 else if (spar > 0) 217 { 218 result.splashType = "offer"; 219 result.splashTypeInt = 1; 220 result.splashText = sparFormatted; 221 result.splashTextPrefix = Translate("PriceSaving", "Spar"); 222 result.onTopSplashText = Translate("ProductOffer", "Tilbud"); 223 result.normalPricePrefix = Translate("PriceBefore", "Normpris."); 224 } 225 else if (newItem) 226 { 227 result.splashType = "new"; 228 result.splashTypeInt = 2; 229 result.splashText = ""; 230 result.splashTextPrefix = ""; 231 result.onTopSplashText = Translate("ProductNew", "Nyhed"); 232 } 233 else if (LowPrice) 234 { 235 result.splashType = "low"; 236 result.splashTypeInt = 3; 237 result.splashText = ""; 238 result.splashTextPrefix = ""; 239 result.onTopSplashText = Translate("ProductLowPrice", "Fast lavpris"); 240 } 241 else 242 { 243 result.splashType = "invisible"; 244 result.splashText = ""; 245 } 246 return result; 247 } 248 249 250 #line default 251 #line hidden 252 253 254 #line 186 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 255 public RazorEngine.Templating.TemplateWriter RenderProductPricing(LoopItem product, SplashPriceObject splashPriceObject = null, bool renderAsCard = false, bool showPriceFromText = false, string priceFSClass = "fs3", bool priceCanBeUpdated = false) 256 { 257 #line default 258 #line hidden 259 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 260 261 #line 187 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 262 263 if (splashPriceObject == null) 264 { 265 splashPriceObject = GetSplashPriceObject(product); 266 } 267 // Theming 268 bool blackFridayTheme = Firstweb.Custom.CustomCode.Frontend.Helpers.AreaItems.GetBoolean("BlackFridayTheme"); 269 string blackFridayClass = blackFridayTheme ? "bf-bg-black bf-text-white" : ""; 270 string lineHeight = renderAsCard ? "tight-line-height" : ""; 271 bool hideStrikeThroughText = string.IsNullOrEmpty(splashPriceObject.normalPriceFormatted); 272 if (hideStrikeThroughText) 273 { 274 splashPriceObject.normalPriceFormatted = ""; 275 } 276 277 string priceTargetClass = priceCanBeUpdated ? "js-orderline-price-target" : ""; 278 279 280 if (!string.IsNullOrEmpty(splashPriceObject.splashText) || !string.IsNullOrEmpty(splashPriceObject.splashTextPrefix)) 281 { 282 283 284 #line default 285 #line hidden 286 WriteLiteralTo(__razor_helper_writer, " <p"); 287 288 WriteAttributeTo(__razor_helper_writer, "class", Tuple.Create(" class=\"", 9211), Tuple.Create("\"", 9333) 289 290 #line 207 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 291 , Tuple.Create(Tuple.Create("", 9219), Tuple.Create<System.Object, System.Int32>(lineHeight 292 293 #line default 294 #line hidden 295 , 9219), false) 296 , Tuple.Create(Tuple.Create(" ", 9230), Tuple.Create("orderline-splash", 9231), true) 297 , Tuple.Create(Tuple.Create(" ", 9247), Tuple.Create("font-bold", 9248), true) 298 , Tuple.Create(Tuple.Create(" ", 9257), Tuple.Create("fs0", 9258), true) 299 , Tuple.Create(Tuple.Create(" ", 9261), Tuple.Create("text-uppercase", 9262), true) 300 , Tuple.Create(Tuple.Create(" ", 9276), Tuple.Create("m-0", 9277), true) 301 , Tuple.Create(Tuple.Create(" ", 9280), Tuple.Create("px-1", 9281), true) 302 303 #line 207 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 304 , Tuple.Create(Tuple.Create(" ", 9285), Tuple.Create<System.Object, System.Int32>(splashPriceObject.splashType 305 306 #line default 307 #line hidden 308 , 9286), false) 309 310 #line 207 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 311 , Tuple.Create(Tuple.Create(" ", 9315), Tuple.Create<System.Object, System.Int32>(blackFridayClass 312 313 #line default 314 #line hidden 315 , 9316), false) 316 ); 317 318 WriteLiteralTo(__razor_helper_writer, ">"); 319 320 321 #line 207 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 322 WriteTo(__razor_helper_writer, !string.IsNullOrEmpty(splashPriceObject.splashTextPrefix) ? (splashPriceObject.splashTextPrefix + " ") : ""); 323 324 325 #line default 326 #line hidden 327 WriteLiteralTo(__razor_helper_writer, "<span"); 328 329 WriteLiteralTo(__razor_helper_writer, " class=\"js-saving-price-target\""); 330 331 WriteLiteralTo(__razor_helper_writer, ">"); 332 333 334 #line 207 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 335 WriteTo(__razor_helper_writer, splashPriceObject.splashText); 336 337 338 #line default 339 #line hidden 340 WriteLiteralTo(__razor_helper_writer, "</span></p>\r\n"); 341 342 343 #line 208 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 344 } 345 346 347 348 #line default 349 #line hidden 350 WriteLiteralTo(__razor_helper_writer, " <div"); 351 352 WriteAttributeTo(__razor_helper_writer, "class", Tuple.Create(" class=\"", 9541), Tuple.Create("\"", 9560) 353 354 #line 210 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 355 , Tuple.Create(Tuple.Create("", 9549), Tuple.Create<System.Object, System.Int32>(lineHeight 356 357 #line default 358 #line hidden 359 , 9549), false) 360 ); 361 362 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 363 364 365 #line 211 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 366 367 368 #line default 369 #line hidden 370 371 #line 211 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 372 if (showPriceFromText) 373 { 374 375 376 #line default 377 #line hidden 378 WriteLiteralTo(__razor_helper_writer, " <span"); 379 380 WriteLiteralTo(__razor_helper_writer, " class=\"font-weight-semibold fs0\""); 381 382 WriteLiteralTo(__razor_helper_writer, "><small>"); 383 384 385 #line 213 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 386 WriteTo(__razor_helper_writer, Translate("ProductPrice.From", "Fra:")); 387 388 389 #line default 390 #line hidden 391 WriteLiteralTo(__razor_helper_writer, "</small></span>\r\n"); 392 393 394 #line 214 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 395 } 396 397 398 #line default 399 #line hidden 400 WriteLiteralTo(__razor_helper_writer, " <span"); 401 402 WriteAttributeTo(__razor_helper_writer, "class", Tuple.Create(" class=\"", 9746), Tuple.Create("\"", 9815) 403 404 #line 215 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 405 , Tuple.Create(Tuple.Create("", 9754), Tuple.Create<System.Object, System.Int32>(priceFSClass 406 407 #line default 408 #line hidden 409 , 9754), false) 410 , Tuple.Create(Tuple.Create(" ", 9767), Tuple.Create("m-0", 9768), true) 411 , Tuple.Create(Tuple.Create(" ", 9771), Tuple.Create("orderline-price", 9772), true) 412 413 #line 215 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 414 , Tuple.Create(Tuple.Create(" ", 9787), Tuple.Create<System.Object, System.Int32>(priceTargetClass 415 416 #line default 417 #line hidden 418 , 9788), false) 419 , Tuple.Create(Tuple.Create(" ", 9805), Tuple.Create("font-bold", 9806), true) 420 ); 421 422 WriteLiteralTo(__razor_helper_writer, ">"); 423 424 425 #line 215 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 426 WriteTo(__razor_helper_writer, renderAsCard ? splashPriceObject.priceFormatted : splashPriceObject.OLprice); 427 428 429 #line default 430 #line hidden 431 WriteLiteralTo(__razor_helper_writer, "</span>\r\n </div>\r\n"); 432 433 434 #line 217 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 435 436 if(!string.IsNullOrEmpty(splashPriceObject.normalPriceFormatted)) 437 { 438 439 440 #line default 441 #line hidden 442 WriteLiteralTo(__razor_helper_writer, " <p"); 443 444 WriteAttributeTo(__razor_helper_writer, "class", Tuple.Create(" class=\'", 10006), Tuple.Create("\'", 10096) 445 446 #line 220 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 447 , Tuple.Create(Tuple.Create("", 10014), Tuple.Create<System.Object, System.Int32>(lineHeight 448 449 #line default 450 #line hidden 451 , 10014), false) 452 , Tuple.Create(Tuple.Create(" ", 10025), Tuple.Create("m-0", 10026), true) 453 , Tuple.Create(Tuple.Create(" ", 10029), Tuple.Create("font-bold", 10030), true) 454 , Tuple.Create(Tuple.Create(" ", 10039), Tuple.Create("line-through", 10040), true) 455 456 #line 220 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 457 , Tuple.Create(Tuple.Create(" ", 10052), Tuple.Create<System.Object, System.Int32>(hideStrikeThroughText ? "invisible" : "" 458 459 #line default 460 #line hidden 461 , 10053), false) 462 ); 463 464 WriteLiteralTo(__razor_helper_writer, "><small>"); 465 466 467 #line 220 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 468 WriteTo(__razor_helper_writer, !string.IsNullOrEmpty(splashPriceObject.normalPricePrefix) ? (splashPriceObject.normalPricePrefix + " ") : ""); 469 470 471 #line default 472 #line hidden 473 WriteLiteralTo(__razor_helper_writer, " <span"); 474 475 WriteLiteralTo(__razor_helper_writer, " class=\"js-normal-price-target\""); 476 477 WriteLiteralTo(__razor_helper_writer, ">"); 478 479 480 #line 220 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 481 WriteTo(__razor_helper_writer, splashPriceObject.normalPriceFormatted); 482 483 484 #line default 485 #line hidden 486 WriteLiteralTo(__razor_helper_writer, "</span></small></p>\r\n"); 487 488 489 #line 221 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 490 } 491 492 493 #line default 494 #line hidden 495 }); 496 497 #line 222 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 498 } 499 #line default 500 #line hidden 501 502 503 #line 224 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 504 public RazorEngine.Templating.TemplateWriter RenderOnTopSplash(LoopItem product, SplashPriceObject splashPriceObject = null, bool isProductCardSplash = false) 505 { 506 #line default 507 #line hidden 508 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 509 510 #line 225 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 511 512 if (splashPriceObject == null) 513 { 514 splashPriceObject = GetSplashPriceObject(product); 515 } 516 string DailyPriceBackgroundColor = ""; 517 string DailyPriceTextColor = ""; 518 string splashClass = isProductCardSplash ? "product-card-splash" : ""; 519 if (splashPriceObject.splashType == "priceshape") 520 { 521 DailyPriceBackgroundColor = Firstweb.Custom.CustomCode.Frontend.Helpers.AreaItems.GetString("AktuelDagsprisBackgroundColor"); 522 if (!string.IsNullOrEmpty(DailyPriceBackgroundColor)) 523 { 524 DailyPriceBackgroundColor = string.Format("background-color:{0};", DailyPriceBackgroundColor); 525 } 526 DailyPriceTextColor = Firstweb.Custom.CustomCode.Frontend.Helpers.AreaItems.GetString("AktuelDagsprisTextColor"); 527 if (!string.IsNullOrEmpty(DailyPriceTextColor)) 528 { 529 DailyPriceTextColor = string.Format("color:{0};", DailyPriceTextColor); 530 } 531 } 532 533 // Theming 534 bool blackFridayTheme = Firstweb.Custom.CustomCode.Frontend.Helpers.AreaItems.GetBoolean("BlackFridayTheme"); 535 string blackFridayClass = blackFridayTheme ? "bf-bg-black bf-text-white" : ""; 536 537 538 539 #line default 540 #line hidden 541 WriteLiteralTo(__razor_helper_writer, " <div"); 542 543 WriteAttributeTo(__razor_helper_writer, "class", Tuple.Create(" class=\"", 11630), Tuple.Create("\"", 11724) 544 , Tuple.Create(Tuple.Create("", 11638), Tuple.Create("splash", 11638), true) 545 , Tuple.Create(Tuple.Create(" ", 11644), Tuple.Create("splash--on-top", 11645), true) 546 , Tuple.Create(Tuple.Create(" ", 11659), Tuple.Create("p-1", 11660), true) 547 548 #line 251 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 549 , Tuple.Create(Tuple.Create(" ", 11663), Tuple.Create<System.Object, System.Int32>(blackFridayClass 550 551 #line default 552 #line hidden 553 , 11664), false) 554 555 #line 251 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 556 , Tuple.Create(Tuple.Create(" ", 11681), Tuple.Create<System.Object, System.Int32>(splashClass 557 558 #line default 559 #line hidden 560 , 11682), false) 561 562 #line 251 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 563 , Tuple.Create(Tuple.Create(" ", 11694), Tuple.Create<System.Object, System.Int32>(splashPriceObject.splashType 564 565 #line default 566 #line hidden 567 , 11695), false) 568 ); 569 570 WriteAttributeTo(__razor_helper_writer, "style", Tuple.Create(" style=\"", 11725), Tuple.Create("\"", 11759) 571 572 #line 251 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 573 , Tuple.Create(Tuple.Create("", 11733), Tuple.Create<System.Object, System.Int32>(DailyPriceBackgroundColor 574 575 #line default 576 #line hidden 577 , 11733), false) 578 ); 579 580 WriteLiteralTo(__razor_helper_writer, ">\r\n <p"); 581 582 WriteLiteralTo(__razor_helper_writer, " class=\"m-0\""); 583 584 WriteAttributeTo(__razor_helper_writer, "style", Tuple.Create(" style=\"", 11785), Tuple.Create("\"", 11813) 585 586 #line 252 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 587 , Tuple.Create(Tuple.Create("", 11793), Tuple.Create<System.Object, System.Int32>(DailyPriceTextColor 588 589 #line default 590 #line hidden 591 , 11793), false) 592 ); 593 594 WriteLiteralTo(__razor_helper_writer, ">"); 595 596 597 #line 252 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 598 WriteTo(__razor_helper_writer, splashPriceObject.onTopSplashText); 599 600 601 #line default 602 #line hidden 603 WriteLiteralTo(__razor_helper_writer, "</p>\r\n </div>\r\n"); 604 605 606 #line 254 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 607 608 609 #line default 610 #line hidden 611 }); 612 613 #line 254 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 614 } 615 #line default 616 #line hidden 617 618 619 #line 257 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 620 public RazorEngine.Templating.TemplateWriter RenderProduct(LoopItem product, Int32 productListIndex, String productListGroupId, String productListGroupName, Boolean powerStep = false) 621 { 622 #line default 623 #line hidden 624 return new RazorEngine.Templating.TemplateWriter(__razor_helper_writer => { 625 626 #line 258 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 627 628 // Group Specific - Exclude Bed Accessories 629 bool excludeBedAccessories = product.GetBoolean("Ecom:Product.CategoryField.Senge.ExcludeBedAccessories.Value"); 630 string multipleExcludeBedAccessoriesOptionLabel = product.GetString("Ecom:Product.CategoryField.Senge.DisplayMultipleExcludeBedAccessories.OptionLabel"); 631 632 // Product General Info 633 string productId = product.GetString("Ecom:Product.ID"); 634 string cylindoProductId = product.GetString("Ecom:Product:Field.CylindoId.Value.Clean"); 635 string productName = product.GetString("Ecom:Product.Name"); 636 string productLink = product.GetString("Ecom:Product.Link.Clean"); 637 string shortDescription = product.GetString("Ecom:Product.ShortDescription"); 638 string languageId = product.GetString("Ecom:Product.LanguageID"); 639 640 // Variants 641 string defaultVariantId = product.GetString("Ecom:Product.DefaultVariantComboID"); 642 string variantId = product.GetString("Ecom:Product.VariantID"); 643 if (String.IsNullOrEmpty(variantId)) { 644 variantId = defaultVariantId; 645 } 646 if (!String.IsNullOrEmpty(variantId)) { 647 productLink = productLink + "&variantid=" + variantId; 648 } 649 650 // Product Images 651 List<string> images = MoblerHelpers.GetProductImages(productId, variantId); 652 string productImage = string.Format("/Admin/Public/GetImage.ashx?Image={0}&Width=280&height=220&Format=webP&Quality=90&Crop=5&resolution=50", images.FirstOrDefault()); //MoblerHelpers.GetProductListImageWithMainImage(ProductID, ProductNumber); 653 654 bool isUsingCylindoAssets = Mobler.Website.CustomCode.Frontend.CylindoHelper.IsUsingCylindoAssets(cylindoProductId); 655 656 if (isUsingCylindoAssets) 657 { 658 productImage = Mobler.Website.CustomCode.Frontend.CylindoHelper.GetCylindoProductImage(productId, variantId, languageId); 659 } 660 661 // Product Dimensions 662 string productDepth = product.GetString("Ecom:Product:Field.dybdeint.Value.Clean"); 663 string productHeight = product.GetString("Ecom:Product:Field.hoejdeint.Value.Clean"); 664 string productWidth = product.GetString("Ecom:Product:Field.breddeint.Value.Clean"); 665 bool hasProductDepth = !string.IsNullOrWhiteSpace(productDepth) && productDepth != "0"; 666 bool hasProductHeight = !string.IsNullOrWhiteSpace(productHeight) && productHeight != "0"; 667 bool hasProductWidth = !string.IsNullOrWhiteSpace(productWidth) && productWidth != "0"; 668 669 // Campaign 670 string campaignDateStart = ""; 671 string campaignDateEnd = ""; 672 673 bool campaignActiveOnProduct = product.GetBoolean("CampaignModule:Product.CampaignActiveOnProduct"); 674 if (campaignActiveOnProduct) 675 { 676 campaignDateStart = product.GetString("CampaignModule:Product.CampaignProduct.Campaign.Start"); 677 campaignDateEnd = product.GetString("CampaignModule:Product.CampaignProduct.Campaign.End"); 678 } 679 680 bool hasCampaignDateStart = !string.IsNullOrWhiteSpace(campaignDateStart); 681 682 bool hasCampaignDateEnd = !string.IsNullOrWhiteSpace(campaignDateEnd); 683 string campaignText = ""; 684 if (hasCampaignDateStart && hasCampaignDateStart) 685 { 686 campaignText = $"{Translate("Campaign.BeforeDate.Text", "Gældende fra:")} {campaignDateStart} {Translate("Campaign.BeforeDate.Text2", "t.o.m.")} {campaignDateEnd}"; 687 } 688 var splashPriceObject = GetSplashPriceObject(product); 689 690 // Google Analytics Ecommerce Data Item 691 var googleAnalyticsViewItem = new GA4EcommerceItem() 692 { 693 item_id = productId, 694 item_name = productName, 695 currency = Dynamicweb.Ecommerce.Common.Context.Currency.Code, 696 index = productListIndex - 1, 697 item_list_id = productListGroupId, 698 item_list_name = productListGroupName, 699 price = product.GetDouble("Ecom:Product.Price.Price"), 700 quantity = 1 701 }; 702 string googleAnalyticsViewItemAsJson = string.Empty; 703 try 704 { 705 googleAnalyticsViewItemAsJson = JsonConvert.SerializeObject(googleAnalyticsViewItem, Formatting.None, new JsonSerializerSettings 706 { 707 NullValueHandling = NullValueHandling.Ignore 708 }); 709 } catch {} 710 // {"item_id":"@productId", "item_name":"@productName", "currency":"@Dynamicweb.Ecommerce.Common.Context.Currency.Code", "index":@productListIndex, "item_list_id":"@productListGroupId", "item_list_name":"@productListGroupName", "price":@product.GetDouble("Ecom:Product.Price.Price"), "quantity":1 } 711 712 713 714 #line default 715 #line hidden 716 WriteLiteralTo(__razor_helper_writer, " <div"); 717 718 WriteLiteralTo(__razor_helper_writer, " class=\"col-12 col-sm-6 col-lg-3 product-item js-product-list-item\""); 719 720 WriteLiteralTo(__razor_helper_writer, " data-gaitem=\'"); 721 722 723 #line 343 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 724 WriteTo(__razor_helper_writer, googleAnalyticsViewItemAsJson); 725 726 727 #line default 728 #line hidden 729 WriteLiteralTo(__razor_helper_writer, "\'"); 730 731 WriteLiteralTo(__razor_helper_writer, " data-gaitemsent=\"false\""); 732 733 WriteLiteralTo(__razor_helper_writer, ">\r\n <div"); 734 735 WriteLiteralTo(__razor_helper_writer, " class=\"product-item-inner rounded p-3\""); 736 737 WriteLiteralTo(__razor_helper_writer, ">\r\n <div"); 738 739 WriteLiteralTo(__razor_helper_writer, " class=\"product-item__header\""); 740 741 WriteLiteralTo(__razor_helper_writer, ">\r\n <a"); 742 743 WriteAttributeTo(__razor_helper_writer, "href", Tuple.Create(" href=\"", 16735), Tuple.Create("\"", 16754) 744 745 #line 346 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 746 , Tuple.Create(Tuple.Create("", 16742), Tuple.Create<System.Object, System.Int32>(productLink 747 748 #line default 749 #line hidden 750 , 16742), false) 751 ); 752 753 WriteLiteralTo(__razor_helper_writer, " class=\"product-item__image p-0 mb-3 h-auto relative w-100 \""); 754 755 WriteLiteralTo(__razor_helper_writer, ">\r\n <img"); 756 757 WriteLiteralTo(__razor_helper_writer, " width=\"290\""); 758 759 WriteLiteralTo(__razor_helper_writer, " height=\"170\""); 760 761 WriteAttributeTo(__razor_helper_writer, "class", Tuple.Create(" class=\"", 16867), Tuple.Create("\"", 16921) 762 , Tuple.Create(Tuple.Create("", 16875), Tuple.Create("js-product-image-", 16875), true) 763 764 #line 347 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 765 , Tuple.Create(Tuple.Create("", 16892), Tuple.Create<System.Object, System.Int32>(productId 766 767 #line default 768 #line hidden 769 , 16892), false) 770 , Tuple.Create(Tuple.Create(" ", 16902), Tuple.Create("product-item-image", 16903), true) 771 ); 772 773 WriteAttributeTo(__razor_helper_writer, "src", Tuple.Create(" src=\"", 16922), Tuple.Create("\"", 16941) 774 775 #line 347 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 776 , Tuple.Create(Tuple.Create("", 16928), Tuple.Create<System.Object, System.Int32>(productImage 777 778 #line default 779 #line hidden 780 , 16928), false) 781 ); 782 783 WriteAttributeTo(__razor_helper_writer, "alt", Tuple.Create(" alt=\"", 16942), Tuple.Create("\"", 16960) 784 785 #line 347 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 786 , Tuple.Create(Tuple.Create("", 16948), Tuple.Create<System.Object, System.Int32>(productName 787 788 #line default 789 #line hidden 790 , 16948), false) 791 ); 792 793 WriteLiteralTo(__razor_helper_writer, " loading=\"lazy\""); 794 795 WriteLiteralTo(__razor_helper_writer, "/>\r\n"); 796 797 WriteLiteralTo(__razor_helper_writer, " "); 798 799 800 #line 348 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 801 WriteTo(__razor_helper_writer, RenderOnTopSplash(product, splashPriceObject, true)); 802 803 804 #line default 805 #line hidden 806 WriteLiteralTo(__razor_helper_writer, "\r\n </a>\r\n </div>\r\n\r\n <div"); 807 808 WriteLiteralTo(__razor_helper_writer, " class=\"product-item__body\""); 809 810 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 811 812 813 #line 353 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 814 815 816 #line default 817 #line hidden 818 819 #line 353 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 820 821 int colorOptionsToShow = 4; 822 List<string> variantCombinationVariantIds = product.GetLoop("Co3VariantCombinations").Select(p => p.GetString("Ecom:VariantCombination.VariantID")).ToList(); 823 bool hasVariants = false; 824 825 826 #line default 827 #line hidden 828 WriteLiteralTo(__razor_helper_writer, "\r\n"); 829 830 831 #line 358 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 832 833 834 #line default 835 #line hidden 836 837 #line 358 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 838 if (variantCombinationVariantIds.Any() && !powerStep) 839 { 840 hasVariants = true; 841 842 843 844 #line default 845 #line hidden 846 WriteLiteralTo(__razor_helper_writer, " <div"); 847 848 WriteLiteralTo(__razor_helper_writer, " class=\"product-item__variants flex items-center mb-2\""); 849 850 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 851 852 853 #line 363 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 854 855 856 #line default 857 #line hidden 858 859 #line 363 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 860 foreach (LoopItem vg in product.GetLoop("VariantGroups")) 861 { 862 int variantOptionWithColorCount = 0; 863 864 865 866 #line default 867 #line hidden 868 869 #line 367 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 870 871 foreach (LoopItem variantOption in vg.GetLoop("VariantAvailableOptions")) 872 { 873 874 875 #line default 876 #line hidden 877 WriteLiteralTo(__razor_helper_writer, " <p"); 878 879 WriteLiteralTo(__razor_helper_writer, " class=\"hidden\""); 880 881 WriteLiteralTo(__razor_helper_writer, ">"); 882 883 884 #line 370 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 885 WriteTo(__razor_helper_writer, variantOptionWithColorCount); 886 887 888 #line default 889 #line hidden 890 WriteLiteralTo(__razor_helper_writer, "</p>\r\n"); 891 892 893 #line 371 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 894 string variantOptionColor = variantOption.GetString("Ecom:VariantOption.ColorHex"); 895 896 // Get count of variants with color 897 if (variantOptionColor.Any()) 898 { 899 variantOptionWithColorCount++; 900 } 901 // Only show this specific amount of variants 902 if (variantOptionColor.Any() && variantOptionWithColorCount < colorOptionsToShow) 903 { 904 // Get variant option id, then compare with variant combinations, to get the link to the specific variant 905 string variantOptionId = variantOption.GetString("Ecom:VariantOption.ID"); 906 string variantIdWithColorOptionId = variantCombinationVariantIds.FirstOrDefault(vid => vid.Contains(variantOptionId)); 907 908 if (variantIdWithColorOptionId.IsNullOrEmpty() == false) 909 { 910 string variantLink = product.GetString("Ecom:Product.Link.Clean") + "&variantid=" + variantIdWithColorOptionId; 911 912 913 #line default 914 #line hidden 915 WriteLiteralTo(__razor_helper_writer, " <a"); 916 917 WriteAttributeTo(__razor_helper_writer, "href", Tuple.Create(" href=\"", 19499), Tuple.Create("\"", 19518) 918 919 #line 388 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 920 , Tuple.Create(Tuple.Create("", 19506), Tuple.Create<System.Object, System.Int32>(variantLink 921 922 #line default 923 #line hidden 924 , 19506), false) 925 ); 926 927 WriteLiteralTo(__razor_helper_writer, " class=\"product-item__variant\""); 928 929 WriteAttributeTo(__razor_helper_writer, "style", Tuple.Create(" style=\"", 19549), Tuple.Create("\"", 19595) 930 , Tuple.Create(Tuple.Create("", 19557), Tuple.Create("background-color:", 19557), true) 931 932 #line 388 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 933 , Tuple.Create(Tuple.Create(" ", 19574), Tuple.Create<System.Object, System.Int32>(variantOptionColor 934 935 #line default 936 #line hidden 937 , 19575), false) 938 , Tuple.Create(Tuple.Create("", 19594), Tuple.Create(";", 19594), true) 939 ); 940 941 WriteLiteralTo(__razor_helper_writer, "></a>\r\n"); 942 943 944 #line 389 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 945 } 946 } 947 else if (variantOptionColor.Any() && variantOptionWithColorCount == colorOptionsToShow) 948 { 949 950 951 #line default 952 #line hidden 953 WriteLiteralTo(__razor_helper_writer, " <a"); 954 955 WriteAttributeTo(__razor_helper_writer, "href", Tuple.Create(" href=\"", 19871), Tuple.Create("\"", 19890) 956 957 #line 393 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 958 , Tuple.Create(Tuple.Create("", 19878), Tuple.Create<System.Object, System.Int32>(productLink 959 960 #line default 961 #line hidden 962 , 19878), false) 963 ); 964 965 WriteLiteralTo(__razor_helper_writer, " class=\"fs2 product-item__more-variants\""); 966 967 WriteLiteralTo(__razor_helper_writer, ">+</a>\r\n"); 968 969 970 #line 394 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 971 } 972 else 973 { 974 break; 975 } 976 } 977 } 978 979 980 #line default 981 #line hidden 982 WriteLiteralTo(__razor_helper_writer, " "); 983 984 985 #line 401 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 986 if (hasVariants) 987 { 988 989 990 #line default 991 #line hidden 992 WriteLiteralTo(__razor_helper_writer, " <a"); 993 994 WriteAttributeTo(__razor_helper_writer, "href", Tuple.Create(" href=\"", 20284), Tuple.Create("\"", 20303) 995 996 #line 403 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 997 , Tuple.Create(Tuple.Create("", 20291), Tuple.Create<System.Object, System.Int32>(productLink 998 999 #line default 1000 #line hidden 1001 , 20291), false) 1002 ); 1003 1004 WriteLiteralTo(__razor_helper_writer, " class=\"ml-4 fs-s\""); 1005 1006 WriteLiteralTo(__razor_helper_writer, ">\r\n <i"); 1007 1008 WriteLiteralTo(__razor_helper_writer, " class=\"fas fa-pen mr-1 fs-2\""); 1009 1010 WriteLiteralTo(__razor_helper_writer, "></i>\r\n <u>"); 1011 1012 1013 #line 405 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 1014 WriteTo(__razor_helper_writer, Translate("Ecom:Product.Pricing.Designer", "Design selv")); 1015 1016 1017 #line default 1018 #line hidden 1019 WriteLiteralTo(__razor_helper_writer, "</u>\r\n </a>\r\n"); 1020 1021 1022 #line 407 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 1023 } 1024 1025 1026 #line default 1027 #line hidden 1028 WriteLiteralTo(__razor_helper_writer, " </div>\r\n"); 1029 1030 1031 #line 409 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 1032 } 1033 1034 1035 #line default 1036 #line hidden 1037 WriteLiteralTo(__razor_helper_writer, " <a"); 1038 1039 WriteAttributeTo(__razor_helper_writer, "href", Tuple.Create(" href=\"", 20620), Tuple.Create("\"", 20639) 1040 1041 #line 410 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 1042 , Tuple.Create(Tuple.Create("", 20627), Tuple.Create<System.Object, System.Int32>(productLink 1043 1044 #line default 1045 #line hidden 1046 , 20627), false) 1047 ); 1048 1049 WriteLiteralTo(__razor_helper_writer, " class=\"product-item__title\""); 1050 1051 WriteLiteralTo(__razor_helper_writer, ">\r\n <h3"); 1052 1053 WriteLiteralTo(__razor_helper_writer, " class=\"fs0\""); 1054 1055 WriteLiteralTo(__razor_helper_writer, ">"); 1056 1057 1058 #line 411 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 1059 WriteTo(__razor_helper_writer, productName); 1060 1061 1062 #line default 1063 #line hidden 1064 WriteLiteralTo(__razor_helper_writer, "</h3>\r\n </a>\r\n <div"); 1065 1066 WriteLiteralTo(__razor_helper_writer, " class=\"product-item__description fs0 color-subtle\""); 1067 1068 WriteLiteralTo(__razor_helper_writer, ">"); 1069 1070 1071 #line 413 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 1072 WriteTo(__razor_helper_writer, shortDescription); 1073 1074 1075 #line default 1076 #line hidden 1077 WriteLiteralTo(__razor_helper_writer, "</div>\r\n"); 1078 1079 1080 #line 414 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 1081 1082 1083 #line default 1084 #line hidden 1085 1086 #line 414 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 1087 if (hasProductDepth && !powerStep || hasProductHeight && !powerStep || hasProductWidth && !powerStep) 1088 { 1089 1090 1091 #line default 1092 #line hidden 1093 WriteLiteralTo(__razor_helper_writer, " <p"); 1094 1095 WriteLiteralTo(__razor_helper_writer, " class=\"product-item__dimensions fs0 color-subtle\""); 1096 1097 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 1098 1099 1100 #line 417 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 1101 1102 1103 #line default 1104 #line hidden 1105 1106 #line 417 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 1107 if (hasProductDepth) 1108 { 1109 1110 1111 #line default 1112 #line hidden 1113 WriteLiteralTo(__razor_helper_writer, " <span><strong>D/L:</strong> "); 1114 1115 1116 #line 419 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 1117 WriteTo(__razor_helper_writer, productDepth); 1118 1119 1120 #line default 1121 #line hidden 1122 WriteLiteralTo(__razor_helper_writer, "</span>\r\n"); 1123 1124 1125 #line 420 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 1126 } 1127 1128 1129 #line default 1130 #line hidden 1131 WriteLiteralTo(__razor_helper_writer, " "); 1132 1133 1134 #line 421 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 1135 if (hasProductHeight) 1136 { 1137 1138 1139 #line default 1140 #line hidden 1141 WriteLiteralTo(__razor_helper_writer, " <span><strong>H:</strong> "); 1142 1143 1144 #line 423 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 1145 WriteTo(__razor_helper_writer, productHeight); 1146 1147 1148 #line default 1149 #line hidden 1150 WriteLiteralTo(__razor_helper_writer, "</span>\r\n"); 1151 1152 1153 #line 424 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 1154 } 1155 1156 1157 #line default 1158 #line hidden 1159 WriteLiteralTo(__razor_helper_writer, " "); 1160 1161 1162 #line 425 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 1163 if (hasProductWidth) 1164 { 1165 1166 1167 #line default 1168 #line hidden 1169 WriteLiteralTo(__razor_helper_writer, " <span><strong>B:</strong> "); 1170 1171 1172 #line 427 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 1173 WriteTo(__razor_helper_writer, productWidth); 1174 1175 1176 #line default 1177 #line hidden 1178 WriteLiteralTo(__razor_helper_writer, "</span>\r\n"); 1179 1180 1181 #line 428 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 1182 } 1183 1184 1185 #line default 1186 #line hidden 1187 WriteLiteralTo(__razor_helper_writer, " </p>\r\n"); 1188 1189 1190 #line 430 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 1191 } 1192 1193 1194 #line default 1195 #line hidden 1196 WriteLiteralTo(__razor_helper_writer, " </div>\r\n\r\n <div"); 1197 1198 WriteLiteralTo(__razor_helper_writer, " class=\"product-item__footer w-full\""); 1199 1200 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 1201 1202 1203 #line 434 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 1204 1205 1206 #line default 1207 #line hidden 1208 1209 #line 434 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 1210 if (!powerStep) 1211 { 1212 if (hasCampaignDateStart && hasCampaignDateEnd) 1213 { 1214 1215 1216 #line default 1217 #line hidden 1218 WriteLiteralTo(__razor_helper_writer, " <div"); 1219 1220 WriteLiteralTo(__razor_helper_writer, " class=\"product-item__campaign\""); 1221 1222 WriteLiteralTo(__razor_helper_writer, ">\r\n <p"); 1223 1224 WriteLiteralTo(__razor_helper_writer, " class=\"color-subtle fs-s m-0\""); 1225 1226 WriteLiteralTo(__razor_helper_writer, ">"); 1227 1228 1229 #line 439 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 1230 WriteTo(__razor_helper_writer, campaignText); 1231 1232 1233 #line default 1234 #line hidden 1235 WriteLiteralTo(__razor_helper_writer, "</p>\r\n </div>\r\n"); 1236 1237 1238 #line 441 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 1239 } 1240 } 1241 1242 1243 #line default 1244 #line hidden 1245 WriteLiteralTo(__razor_helper_writer, " <div"); 1246 1247 WriteLiteralTo(__razor_helper_writer, " class=\"py-1 my-2 border-top border-bottom\""); 1248 1249 WriteLiteralTo(__razor_helper_writer, ">\r\n <div"); 1250 1251 WriteLiteralTo(__razor_helper_writer, " class=\"row flex items-center justify-content-between\""); 1252 1253 WriteLiteralTo(__razor_helper_writer, ">\r\n <div"); 1254 1255 WriteLiteralTo(__razor_helper_writer, " class=\"col-8\""); 1256 1257 WriteLiteralTo(__razor_helper_writer, ">\r\n"); 1258 1259 WriteLiteralTo(__razor_helper_writer, " "); 1260 1261 1262 #line 446 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 1263 WriteTo(__razor_helper_writer, RenderProductPricing(product, splashPriceObject, true, hasVariants)); 1264 1265 1266 #line default 1267 #line hidden 1268 WriteLiteralTo(__razor_helper_writer, "\r\n </div>\r\n <div"); 1269 1270 WriteLiteralTo(__razor_helper_writer, " class=\"col-4 pl-0\""); 1271 1272 WriteLiteralTo(__razor_helper_writer, ">\r\n <a"); 1273 1274 WriteAttributeTo(__razor_helper_writer, "href", Tuple.Create(" href=\"", 22479), Tuple.Create("\"", 22498) 1275 1276 #line 449 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 1277 , Tuple.Create(Tuple.Create("", 22486), Tuple.Create<System.Object, System.Int32>(productLink 1278 1279 #line default 1280 #line hidden 1281 , 22486), false) 1282 ); 1283 1284 WriteLiteralTo(__razor_helper_writer, " class=\"btn btn-show-product float-right my-1 px-4\""); 1285 1286 WriteLiteralTo(__razor_helper_writer, "><strong>"); 1287 1288 1289 #line 449 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 1290 WriteTo(__razor_helper_writer, Translate("Ecom:Product.Show", "Vis")); 1291 1292 1293 #line default 1294 #line hidden 1295 WriteLiteralTo(__razor_helper_writer, "</strong></a>\r\n </div>\r\n </div>\r\n " + 1296 " </div>\r\n"); 1297 1298 1299 #line 453 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 1300 1301 1302 #line default 1303 #line hidden 1304 1305 #line 453 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 1306 if (!powerStep) 1307 { 1308 bool createEmptyLine = true; 1309 if (!string.IsNullOrEmpty(multipleExcludeBedAccessoriesOptionLabel)) 1310 { 1311 createEmptyLine = false; 1312 1313 1314 #line default 1315 #line hidden 1316 WriteLiteralTo(__razor_helper_writer, " <p"); 1317 1318 WriteLiteralTo(__razor_helper_writer, " class=\"color-subtle fs-s m-0\""); 1319 1320 WriteLiteralTo(__razor_helper_writer, ">"); 1321 1322 1323 #line 459 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 1324 WriteTo(__razor_helper_writer, Translate("Ecom:Product.Pricing.Excludes.Beds - " + multipleExcludeBedAccessoriesOptionLabel, "")); 1325 1326 1327 #line default 1328 #line hidden 1329 WriteLiteralTo(__razor_helper_writer, "</p>\r\n"); 1330 1331 1332 #line 460 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 1333 } 1334 else if (excludeBedAccessories) 1335 { 1336 createEmptyLine = false; 1337 1338 1339 #line default 1340 #line hidden 1341 WriteLiteralTo(__razor_helper_writer, " <p"); 1342 1343 WriteLiteralTo(__razor_helper_writer, " class=\"color-subtle fs-s m-0\""); 1344 1345 WriteLiteralTo(__razor_helper_writer, ">"); 1346 1347 1348 #line 464 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 1349 WriteTo(__razor_helper_writer, Translate("Ecom:Product.Pricing.Excludes.Beds", "Prisen er ekskl. ben og gavl.")); 1350 1351 1352 #line default 1353 #line hidden 1354 WriteLiteralTo(__razor_helper_writer, "</p>\r\n"); 1355 1356 1357 #line 465 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 1358 } 1359 if (hasVariants) 1360 { 1361 1362 1363 #line default 1364 #line hidden 1365 WriteLiteralTo(__razor_helper_writer, " <div"); 1366 1367 WriteLiteralTo(__razor_helper_writer, " class=\"variant-price-disclaimer color-subtle fs-s\""); 1368 1369 WriteLiteralTo(__razor_helper_writer, ">"); 1370 1371 1372 #line 468 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 1373 WriteTo(__razor_helper_writer, Translate("VariantPriceDisclaimer", "Prisen kan variere efter materialevalg")); 1374 1375 1376 #line default 1377 #line hidden 1378 WriteLiteralTo(__razor_helper_writer, "</div>\r\n"); 1379 1380 1381 #line 469 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 1382 } 1383 else 1384 { 1385 1386 1387 #line default 1388 #line hidden 1389 WriteLiteralTo(__razor_helper_writer, " <div"); 1390 1391 WriteLiteralTo(__razor_helper_writer, " class=\"variant-price-disclaimer color-subtle fs-s invisible\""); 1392 1393 WriteLiteralTo(__razor_helper_writer, ">&nbsp;</div>\r\n"); 1394 1395 1396 #line 473 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 1397 } 1398 1399 } 1400 1401 1402 #line default 1403 #line hidden 1404 WriteLiteralTo(__razor_helper_writer, " </div>\r\n "); 1405 1406 WriteLiteralTo(__razor_helper_writer, "\r\n "); 1407 1408 WriteLiteralTo(__razor_helper_writer, "\r\n "); 1409 1410 WriteLiteralTo(__razor_helper_writer, "\r\n "); 1411 1412 WriteLiteralTo(__razor_helper_writer, "\r\n "); 1413 1414 WriteLiteralTo(__razor_helper_writer, "\r\n "); 1415 1416 WriteLiteralTo(__razor_helper_writer, "\r\n "); 1417 1418 WriteLiteralTo(__razor_helper_writer, "\r\n "); 1419 1420 WriteLiteralTo(__razor_helper_writer, "\r\n "); 1421 1422 WriteLiteralTo(__razor_helper_writer, "\r\n "); 1423 1424 WriteLiteralTo(__razor_helper_writer, "\r\n "); 1425 1426 WriteLiteralTo(__razor_helper_writer, "\r\n "); 1427 1428 WriteLiteralTo(__razor_helper_writer, "\r\n "); 1429 1430 WriteLiteralTo(__razor_helper_writer, "\r\n "); 1431 1432 WriteLiteralTo(__razor_helper_writer, "\r\n </div>\r\n </div>\r\n"); 1433 1434 1435 #line 493 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 1436 1437 1438 #line default 1439 #line hidden 1440 }); 1441 1442 #line 493 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 1443 } 1444 #line default 1445 #line hidden 1446 1447 1448 public RazorEngine_5e387b5f27254444971897e9a1b6b503() { 1449 } 1450 1451 public override void Execute() { 1452 WriteLiteral("\r\n"); 1453 1454 WriteLiteral("\r\n\r\n"); 1455 1456 WriteLiteral("\r\n\r\n"); 1457 1458 1459 #line 496 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 1460 1461 string QuickDeliveryDescription = Firstweb.Custom.CustomCode.Frontend.Helpers.AreaItems.GetString("QuickDeliveryDescription"); 1462 string NormalDeliveryDescription = Firstweb.Custom.CustomCode.Frontend.Helpers.AreaItems.GetString("NormalDeliveryDescription"); 1463 string itemHeading = GetString("Item.Heading"); 1464 int counter = 0; 1465 1466 1467 #line default 1468 #line hidden 1469 WriteLiteral("\r\n\r\n<div"); 1470 1471 WriteLiteral(" class=\"featured-products my-5 py-5 bg-beige\""); 1472 1473 WriteLiteral(" data-bind=\"viewModel: \'ProductListViewModel\'\""); 1474 1475 WriteLiteral(">\r\n\r\n <div"); 1476 1477 WriteLiteral(" class=\"delivery-information-popup\""); 1478 1479 WriteLiteral(" data-bind=\"css: { \'flex\': QuickDeliveryInfoOpen }, click: ToggleQuickDeliveryInf" + 1480 "o\""); 1481 1482 WriteLiteral(">\r\n <div"); 1483 1484 WriteLiteral(" class=\"description-content bg-white px-3 py-4 px-lg-4 relative\""); 1485 1486 WriteLiteral(" data-bind=\"click: OpenQuickDeliveryInfo, clickBubble: false\""); 1487 1488 WriteLiteral(">\r\n <div"); 1489 1490 WriteLiteral(" class=\"modal-closer-custom\""); 1491 1492 WriteLiteral(" data-bind=\"click: ToggleQuickDeliveryInfo, clickBubble: false\""); 1493 1494 WriteLiteral(">\r\n <img"); 1495 1496 WriteLiteral(" src=\"/Files/Templates/Designs/Mobler2018/dist/icons/close.svg\""); 1497 1498 WriteLiteral(" />\r\n </div>\r\n <div>\r\n"); 1499 1500 WriteLiteral(" "); 1501 1502 1503 #line 511 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 1504 Write(QuickDeliveryDescription); 1505 1506 1507 #line default 1508 #line hidden 1509 WriteLiteral("\r\n </div>\r\n </div>\r\n </div>\r\n <div"); 1510 1511 WriteLiteral(" class=\"delivery-information-popup\""); 1512 1513 WriteLiteral(" data-bind=\"css: { \'flex\': NormalDeliveryInfoOpen }, click: ToggleNormalDeliveryI" + 1514 "nfo\""); 1515 1516 WriteLiteral(">\r\n <div"); 1517 1518 WriteLiteral(" class=\"description-content bg-white px-3 py-4 px-lg-4 relative\""); 1519 1520 WriteLiteral(" data-bind=\"click: OpenNormalDeliveryInfo, clickBubble: false\""); 1521 1522 WriteLiteral(">\r\n <div"); 1523 1524 WriteLiteral(" class=\"modal-closer-custom\""); 1525 1526 WriteLiteral(" data-bind=\"click: ToggleNormalDeliveryInfo, clickBubble: false\""); 1527 1528 WriteLiteral(">\r\n <img"); 1529 1530 WriteLiteral(" src=\"/Files/Templates/Designs/Mobler2018/dist/icons/close.svg\""); 1531 1532 WriteLiteral(" />\r\n </div>\r\n <div>\r\n"); 1533 1534 WriteLiteral(" "); 1535 1536 1537 #line 521 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 1538 Write(NormalDeliveryDescription); 1539 1540 1541 #line default 1542 #line hidden 1543 WriteLiteral("\r\n </div>\r\n </div>\r\n </div>\r\n\r\n"); 1544 1545 1546 #line 526 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 1547 1548 1549 #line default 1550 #line hidden 1551 1552 #line 526 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 1553 if (itemHeading != null && itemHeading != "") 1554 { 1555 1556 1557 #line default 1558 #line hidden 1559 WriteLiteral(" <div"); 1560 1561 WriteLiteral(" class=\"line-through-header\""); 1562 1563 WriteLiteral(">\r\n <h2>"); 1564 1565 1566 #line 529 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 1567 Write(itemHeading); 1568 1569 1570 #line default 1571 #line hidden 1572 WriteLiteral("</h2>\r\n </div>\r\n"); 1573 1574 1575 #line 531 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 1576 } 1577 1578 1579 #line default 1580 #line hidden 1581 WriteLiteral("\r\n <div"); 1582 1583 WriteLiteral(" class=\"container mt-4\""); 1584 1585 WriteLiteral(">\r\n <div"); 1586 1587 WriteLiteral(" class=\"row\""); 1588 1589 WriteLiteral(">\r\n"); 1590 1591 1592 #line 535 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 1593 1594 1595 #line default 1596 #line hidden 1597 1598 #line 535 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 1599 foreach (var product in GetLoop("Item.Products.Value")) 1600 { 1601 1602 1603 #line default 1604 #line hidden 1605 1606 #line 537 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 1607 Write(RenderProduct(product, counter, itemHeading, itemHeading)); 1608 1609 1610 #line default 1611 #line hidden 1612 1613 #line 537 "D:\dynamicweb.net\Solutions\mobler.STAGING\Files\Templates\\Designs\Mobler\Paragraph\FeaturedProducts.cshtml" 1614 1615 counter++; 1616 } 1617 1618 1619 #line default 1620 #line hidden 1621 WriteLiteral(" </div>\r\n </div>\r\n\r\n</div>\r\n"); 1622 1623 } 1624 } 1625 } 1626

1 @using Mobler.Website.CustomModules.MoblerHelpers 2 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 3 4 @using System.Collections 5 @using Dynamicweb.Core 6 @using Dynamicweb.Ecommerce 7 @using Mobler.Website.CustomModules.MoblerHelpers 8 @using Dynamicweb.Ecommerce.Products 9 @using Dynamicweb.Ecommerce.Variants 10 @using Humanizer 11 @using Mobler.Website.CustomCode 12 @using Mobler.Website.CustomCode.Models 13 @using Newtonsoft.Json 14 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 15 16 @using Mobler.Website.CustomModules.MoblerHelpers 17 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 18 @functions { 19 20 public class SplashPriceObject 21 { 22 public string splashType { get; set; } 23 public string splashText { get; set; } 24 public string splashTextPrefix { get; set; } 25 public string onTopSplashText { get; set; } 26 public string priceFormatted { get; set; } 27 public string OLprice { get; set; } 28 public string normalPriceFormatted { get; set; } 29 public string normalPricePrefix { get; set; } 30 public int splashTypeInt { get; set; } 31 } 32 33 public double GetDoubleValue(LoopItem loopItem, string key) 34 { 35 return loopItem == null ? GetDouble(key) : loopItem.GetDouble(key); 36 } 37 public DateTime GetDateValue(LoopItem loopItem, string key) 38 { 39 return loopItem == null ? GetDate(key) : loopItem.GetDate(key); 40 } 41 public bool GetBooleanValue(LoopItem loopItem, string key) 42 { 43 return loopItem == null ? GetBoolean(key) : loopItem.GetBoolean(key); 44 } 45 public string GetStringValue(LoopItem loopItem, string key) 46 { 47 return loopItem == null ? GetString(key) : loopItem.GetString(key); 48 } 49 public SplashPriceObject GetSplashPriceObject(LoopItem product) 50 { 51 var result = new SplashPriceObject() 52 { 53 normalPriceFormatted = "", 54 normalPricePrefix = "", 55 splashText = "", 56 splashTextPrefix = "", 57 onTopSplashText = "", 58 priceFormatted = "", 59 splashType = "", 60 splashTypeInt = 0, 61 OLprice = MoblerHelpers.formatPrice(GetDoubleValue(product, "Ecom:Order:olPrice.Price")) 62 }; 63 // Pricing 64 DateTime newItemExpiryDate = GetDateValue(product, "Ecom:Product:Field.NewItemExpiryDate"); 65 bool hasNewItemExpiryDate = newItemExpiryDate.Date > DateTime.Now.Date; 66 bool newItem = GetBooleanValue(product, "Ecom:Product:Field.NewItem") && hasNewItemExpiryDate; 67 bool LowPrice = GetBooleanValue(product, "Ecom:Product:Field.Splash3"); 68 bool JubileePrice = GetBooleanValue(product, "Ecom:Product:Field.JubileePrice"); 69 double CostPrice = GetDoubleValue(product, "Ecom:Product:Field.FirstwebCostPrice.Value.Raw"); 70 string PriceSaving = GetStringValue(product, "Ecom:Product:Field.Spar.Value"); 71 double ActualPrice = GetDoubleValue(product, "Ecom:Product.Price.Price"); 72 73 // Initialize variables 74 double spar = 0; 75 double price = 0; 76 double normalPrice = 0; 77 string sparFormatted = ""; 78 string campaignColor = ""; 79 string campaignText = ""; 80 string campaignDate = ""; 81 bool CampaignActiveOnProduct = GetBooleanValue(product, "CampaignModule:Product.CampaignActiveOnProduct"); 82 bool IsMasterShopProduct = GetBooleanValue(product, "Ecom:Product:Field.SystemIsMasterShopProduct"); 83 bool IsLocalWebshopProduct = Mobler.Website.CustomCode.Frontend.Helper.IsLocalWebshop() && !IsMasterShopProduct; 84 85 if (!CampaignActiveOnProduct && !IsLocalWebshopProduct) 86 { 87 price = ActualPrice; 88 result.priceFormatted = MoblerHelpers.formatPrice(price); 89 } 90 else if (IsLocalWebshopProduct) 91 { 92 price = ActualPrice; 93 result.priceFormatted = MoblerHelpers.formatPrice(price); 94 95 normalPrice = GetDoubleValue(product, "Ecom:Product:Field.ForPris"); 96 if(normalPrice > 0) { 97 result.normalPriceFormatted = MoblerHelpers.formatPrice(normalPrice); 98 } 99 100 spar = GetDoubleValue(product, "Ecom:Product:Field.Spar"); 101 sparFormatted = MoblerHelpers.formatPrice(spar); 102 103 bool SplashLwCombiPrice = GetBooleanValue(product, "Ecom:Product:Field.SplashLwCombiPrice"); 104 DateTime SplashLwCombiPriceExpiryDate = GetDateValue(product, "Ecom:Product:Field.SplashLwCombiPriceExpiryDate"); 105 106 if (SplashLwCombiPrice && (SplashLwCombiPriceExpiryDate == DateTime.MinValue || SplashLwCombiPriceExpiryDate > DateTime.Now)) 107 { 108 campaignText = "KOMBI"; 109 } 110 } 111 else 112 { 113 normalPrice = GetDoubleValue(product, "CampaignModule:Product.CampaignProduct.NormalPrice"); 114 result.normalPriceFormatted = GetStringValue(product, "CampaignModule:Product.CampaignProduct.NormalPrice.FormattedRetail"); 115 116 price = GetDoubleValue(product, "CampaignModule:Product.CampaignProduct.CampaignPrice"); 117 result.priceFormatted = GetStringValue(product, "CampaignModule:Product.CampaignProduct.CampaignPrice.FormattedRetail"); 118 119 spar = GetDoubleValue(product, "CampaignModule:Product.CampaignProduct.DiscountAmount"); 120 sparFormatted = GetStringValue(product, "CampaignModule:Product.CampaignProduct.DiscountAmount.FormattedRetail"); 121 122 campaignColor = GetStringValue(product, "CampaignModule:Product.Campaign.Color"); 123 campaignText = GetStringValue(product, "CampaignModule:Product.Campaign.Text"); 124 } 125 126 // Set Splash Types 127 if (JubileePrice) 128 { 129 result.splashType = "jubileeprice"; 130 result.splashTypeInt = 6; 131 result.splashText = sparFormatted; 132 result.splashTextPrefix = Translate("PriceSaving", "Spar"); 133 result.onTopSplashText = Translate("ProductJubileePrice", "Jubilæums pris"); 134 } 135 else if (campaignText == "KOMBI") 136 { 137 result.splashType = "combo"; 138 result.splashTypeInt = 5; 139 result.splashText = sparFormatted; 140 result.splashTextPrefix = Translate("PriceSaving", "Spar"); 141 result.onTopSplashText = Translate("ProductCombinationOffer", "Sætpris"); 142 result.normalPricePrefix = Translate("PriceBeforeCombo", "Samlet normpris."); 143 } 144 else if (CostPrice > 0) 145 { 146 result.splashType = "priceshape"; 147 result.splashTypeInt = 4; 148 result.splashText = ""; 149 result.splashTextPrefix = ""; 150 result.onTopSplashText = Translate("ProductDailyPriceSplash", "Dagspris"); 151 } 152 else if (spar > 0) 153 { 154 result.splashType = "offer"; 155 result.splashTypeInt = 1; 156 result.splashText = sparFormatted; 157 result.splashTextPrefix = Translate("PriceSaving", "Spar"); 158 result.onTopSplashText = Translate("ProductOffer", "Tilbud"); 159 result.normalPricePrefix = Translate("PriceBefore", "Normpris."); 160 } 161 else if (newItem) 162 { 163 result.splashType = "new"; 164 result.splashTypeInt = 2; 165 result.splashText = ""; 166 result.splashTextPrefix = ""; 167 result.onTopSplashText = Translate("ProductNew", "Nyhed"); 168 } 169 else if (LowPrice) 170 { 171 result.splashType = "low"; 172 result.splashTypeInt = 3; 173 result.splashText = ""; 174 result.splashTextPrefix = ""; 175 result.onTopSplashText = Translate("ProductLowPrice", "Fast lavpris"); 176 } 177 else 178 { 179 result.splashType = "invisible"; 180 result.splashText = ""; 181 } 182 return result; 183 } 184 185 } 186 @helper RenderProductPricing(LoopItem product, SplashPriceObject splashPriceObject = null, bool renderAsCard = false, bool showPriceFromText = false, string priceFSClass = "fs3", bool priceCanBeUpdated = false) 187 { 188 if (splashPriceObject == null) 189 { 190 splashPriceObject = GetSplashPriceObject(product); 191 } 192 // Theming 193 bool blackFridayTheme = Firstweb.Custom.CustomCode.Frontend.Helpers.AreaItems.GetBoolean("BlackFridayTheme"); 194 string blackFridayClass = blackFridayTheme ? "bf-bg-black bf-text-white" : ""; 195 string lineHeight = renderAsCard ? "tight-line-height" : ""; 196 bool hideStrikeThroughText = string.IsNullOrEmpty(splashPriceObject.normalPriceFormatted); 197 if (hideStrikeThroughText) 198 { 199 splashPriceObject.normalPriceFormatted = ""; 200 } 201 202 string priceTargetClass = priceCanBeUpdated ? "js-orderline-price-target" : ""; 203 204 205 if (!string.IsNullOrEmpty(splashPriceObject.splashText) || !string.IsNullOrEmpty(splashPriceObject.splashTextPrefix)) 206 { 207 <p class="@lineHeight orderline-splash font-bold fs0 text-uppercase m-0 px-1 @splashPriceObject.splashType @blackFridayClass">@(!string.IsNullOrEmpty(splashPriceObject.splashTextPrefix) ? (splashPriceObject.splashTextPrefix + " ") : "")<span class="js-saving-price-target">@splashPriceObject.splashText</span></p> 208 } 209 210 <div class="@lineHeight"> 211 @if (showPriceFromText) 212 { 213 <span class="font-weight-semibold fs0"><small>@Translate("ProductPrice.From", "Fra:")</small></span> 214 } 215 <span class="@priceFSClass m-0 orderline-price @priceTargetClass font-bold">@(renderAsCard ? splashPriceObject.priceFormatted : splashPriceObject.OLprice)</span> 216 </div> 217 218 if(!string.IsNullOrEmpty(splashPriceObject.normalPriceFormatted)) 219 { 220 <p class='@lineHeight m-0 font-bold line-through @(hideStrikeThroughText ? "invisible" : "")'><small>@(!string.IsNullOrEmpty(splashPriceObject.normalPricePrefix) ? (splashPriceObject.normalPricePrefix + " ") : "") <span class="js-normal-price-target">@splashPriceObject.normalPriceFormatted</span></small></p> 221 } 222 } 223 224 @helper RenderOnTopSplash(LoopItem product, SplashPriceObject splashPriceObject = null, bool isProductCardSplash = false) 225 { 226 if (splashPriceObject == null) 227 { 228 splashPriceObject = GetSplashPriceObject(product); 229 } 230 string DailyPriceBackgroundColor = ""; 231 string DailyPriceTextColor = ""; 232 string splashClass = isProductCardSplash ? "product-card-splash" : ""; 233 if (splashPriceObject.splashType == "priceshape") 234 { 235 DailyPriceBackgroundColor = Firstweb.Custom.CustomCode.Frontend.Helpers.AreaItems.GetString("AktuelDagsprisBackgroundColor"); 236 if (!string.IsNullOrEmpty(DailyPriceBackgroundColor)) 237 { 238 DailyPriceBackgroundColor = string.Format("background-color:{0};", DailyPriceBackgroundColor); 239 } 240 DailyPriceTextColor = Firstweb.Custom.CustomCode.Frontend.Helpers.AreaItems.GetString("AktuelDagsprisTextColor"); 241 if (!string.IsNullOrEmpty(DailyPriceTextColor)) 242 { 243 DailyPriceTextColor = string.Format("color:{0};", DailyPriceTextColor); 244 } 245 } 246 247 // Theming 248 bool blackFridayTheme = Firstweb.Custom.CustomCode.Frontend.Helpers.AreaItems.GetBoolean("BlackFridayTheme"); 249 string blackFridayClass = blackFridayTheme ? "bf-bg-black bf-text-white" : ""; 250 251 <div class="splash splash--on-top p-1 @blackFridayClass @splashClass @splashPriceObject.splashType" style="@DailyPriceBackgroundColor"> 252 <p class="m-0" style="@DailyPriceTextColor">@splashPriceObject.onTopSplashText</p> 253 </div> 254 } 255 256 257 @helper RenderProduct(LoopItem product, Int32 productListIndex, String productListGroupId, String productListGroupName, Boolean powerStep = false) 258 { 259 // Group Specific - Exclude Bed Accessories 260 bool excludeBedAccessories = product.GetBoolean("Ecom:Product.CategoryField.Senge.ExcludeBedAccessories.Value"); 261 string multipleExcludeBedAccessoriesOptionLabel = product.GetString("Ecom:Product.CategoryField.Senge.DisplayMultipleExcludeBedAccessories.OptionLabel"); 262 263 // Product General Info 264 string productId = product.GetString("Ecom:Product.ID"); 265 string cylindoProductId = product.GetString("Ecom:Product:Field.CylindoId.Value.Clean"); 266 string productName = product.GetString("Ecom:Product.Name"); 267 string productLink = product.GetString("Ecom:Product.Link.Clean"); 268 string shortDescription = product.GetString("Ecom:Product.ShortDescription"); 269 string languageId = product.GetString("Ecom:Product.LanguageID"); 270 271 // Variants 272 string defaultVariantId = product.GetString("Ecom:Product.DefaultVariantComboID"); 273 string variantId = product.GetString("Ecom:Product.VariantID"); 274 if (String.IsNullOrEmpty(variantId)) { 275 variantId = defaultVariantId; 276 } 277 if (!String.IsNullOrEmpty(variantId)) { 278 productLink = productLink + "&variantid=" + variantId; 279 } 280 281 // Product Images 282 List<string> images = MoblerHelpers.GetProductImages(productId, variantId); 283 string productImage = string.Format("/Admin/Public/GetImage.ashx?Image={0}&Width=280&height=220&Format=webP&Quality=90&Crop=5&resolution=50", images.FirstOrDefault()); //MoblerHelpers.GetProductListImageWithMainImage(ProductID, ProductNumber); 284 285 bool isUsingCylindoAssets = Mobler.Website.CustomCode.Frontend.CylindoHelper.IsUsingCylindoAssets(cylindoProductId); 286 287 if (isUsingCylindoAssets) 288 { 289 productImage = Mobler.Website.CustomCode.Frontend.CylindoHelper.GetCylindoProductImage(productId, variantId, languageId); 290 } 291 292 // Product Dimensions 293 string productDepth = product.GetString("Ecom:Product:Field.dybdeint.Value.Clean"); 294 string productHeight = product.GetString("Ecom:Product:Field.hoejdeint.Value.Clean"); 295 string productWidth = product.GetString("Ecom:Product:Field.breddeint.Value.Clean"); 296 bool hasProductDepth = !string.IsNullOrWhiteSpace(productDepth) && productDepth != "0"; 297 bool hasProductHeight = !string.IsNullOrWhiteSpace(productHeight) && productHeight != "0"; 298 bool hasProductWidth = !string.IsNullOrWhiteSpace(productWidth) && productWidth != "0"; 299 300 // Campaign 301 string campaignDateStart = ""; 302 string campaignDateEnd = ""; 303 304 bool campaignActiveOnProduct = product.GetBoolean("CampaignModule:Product.CampaignActiveOnProduct"); 305 if (campaignActiveOnProduct) 306 { 307 campaignDateStart = product.GetString("CampaignModule:Product.CampaignProduct.Campaign.Start"); 308 campaignDateEnd = product.GetString("CampaignModule:Product.CampaignProduct.Campaign.End"); 309 } 310 311 bool hasCampaignDateStart = !string.IsNullOrWhiteSpace(campaignDateStart); 312 313 bool hasCampaignDateEnd = !string.IsNullOrWhiteSpace(campaignDateEnd); 314 string campaignText = ""; 315 if (hasCampaignDateStart && hasCampaignDateStart) 316 { 317 campaignText = $"{Translate("Campaign.BeforeDate.Text", "Gældende fra:")} {campaignDateStart} {Translate("Campaign.BeforeDate.Text2", "t.o.m.")} {campaignDateEnd}"; 318 } 319 var splashPriceObject = GetSplashPriceObject(product); 320 321 // Google Analytics Ecommerce Data Item 322 var googleAnalyticsViewItem = new GA4EcommerceItem() 323 { 324 item_id = productId, 325 item_name = productName, 326 currency = Dynamicweb.Ecommerce.Common.Context.Currency.Code, 327 index = productListIndex - 1, 328 item_list_id = productListGroupId, 329 item_list_name = productListGroupName, 330 price = product.GetDouble("Ecom:Product.Price.Price"), 331 quantity = 1 332 }; 333 string googleAnalyticsViewItemAsJson = string.Empty; 334 try 335 { 336 googleAnalyticsViewItemAsJson = JsonConvert.SerializeObject(googleAnalyticsViewItem, Formatting.None, new JsonSerializerSettings 337 { 338 NullValueHandling = NullValueHandling.Ignore 339 }); 340 } catch {} 341 // {"item_id":"@productId", "item_name":"@productName", "currency":"@Dynamicweb.Ecommerce.Common.Context.Currency.Code", "index":@productListIndex, "item_list_id":"@productListGroupId", "item_list_name":"@productListGroupName", "price":@product.GetDouble("Ecom:Product.Price.Price"), "quantity":1 } 342 343 <div class="col-12 col-sm-6 col-lg-3 product-item js-product-list-item" data-gaitem='@googleAnalyticsViewItemAsJson' data-gaitemsent="false"> 344 <div class="product-item-inner rounded p-3"> 345 <div class="product-item__header"> 346 <a href="@productLink" class="product-item__image p-0 mb-3 h-auto relative w-100 "> 347 <img width="290" height="170" class="js-product-image-@productId product-item-image" src="@productImage" alt="@productName" loading="lazy"/> 348 @RenderOnTopSplash(product, splashPriceObject, true) 349 </a> 350 </div> 351 352 <div class="product-item__body"> 353 @{ 354 int colorOptionsToShow = 4; 355 List<string> variantCombinationVariantIds = product.GetLoop("Co3VariantCombinations").Select(p => p.GetString("Ecom:VariantCombination.VariantID")).ToList(); 356 bool hasVariants = false; 357 } 358 @if (variantCombinationVariantIds.Any() && !powerStep) 359 { 360 hasVariants = true; 361 362 <div class="product-item__variants flex items-center mb-2"> 363 @foreach (LoopItem vg in product.GetLoop("VariantGroups")) 364 { 365 int variantOptionWithColorCount = 0; 366 367 @* Only show variants with hex colors *@ 368 foreach (LoopItem variantOption in vg.GetLoop("VariantAvailableOptions")) 369 { 370 <p class="hidden">@variantOptionWithColorCount</p> 371 string variantOptionColor = variantOption.GetString("Ecom:VariantOption.ColorHex"); 372 373 // Get count of variants with color 374 if (variantOptionColor.Any()) 375 { 376 variantOptionWithColorCount++; 377 } 378 // Only show this specific amount of variants 379 if (variantOptionColor.Any() && variantOptionWithColorCount < colorOptionsToShow) 380 { 381 // Get variant option id, then compare with variant combinations, to get the link to the specific variant 382 string variantOptionId = variantOption.GetString("Ecom:VariantOption.ID"); 383 string variantIdWithColorOptionId = variantCombinationVariantIds.FirstOrDefault(vid => vid.Contains(variantOptionId)); 384 385 if (variantIdWithColorOptionId.IsNullOrEmpty() == false) 386 { 387 string variantLink = product.GetString("Ecom:Product.Link.Clean") + "&variantid=" + variantIdWithColorOptionId; 388 <a href="@variantLink" class="product-item__variant" style="background-color: @variantOptionColor;"></a> 389 } 390 } 391 else if (variantOptionColor.Any() && variantOptionWithColorCount == colorOptionsToShow) 392 { 393 <a href="@productLink" class="fs2 product-item__more-variants">+</a> 394 } 395 else 396 { 397 break; 398 } 399 } 400 } 401 @if (hasVariants) 402 { 403 <a href="@productLink" class="ml-4 fs-s"> 404 <i class="fas fa-pen mr-1 fs-2"></i> 405 <u>@Translate("Ecom:Product.Pricing.Designer", "Design selv")</u> 406 </a> 407 } 408 </div> 409 } 410 <a href="@productLink" class="product-item__title"> 411 <h3 class="fs0">@productName</h3> 412 </a> 413 <div class="product-item__description fs0 color-subtle">@shortDescription</div> 414 @if (hasProductDepth && !powerStep || hasProductHeight && !powerStep || hasProductWidth && !powerStep) 415 { 416 <p class="product-item__dimensions fs0 color-subtle"> 417 @if (hasProductDepth) 418 { 419 <span><strong>D/L:</strong> @productDepth</span> 420 } 421 @if (hasProductHeight) 422 { 423 <span><strong>H:</strong> @productHeight</span> 424 } 425 @if (hasProductWidth) 426 { 427 <span><strong>B:</strong> @productWidth</span> 428 } 429 </p> 430 } 431 </div> 432 433 <div class="product-item__footer w-full"> 434 @if (!powerStep) 435 { 436 if (hasCampaignDateStart && hasCampaignDateEnd) 437 { 438 <div class="product-item__campaign"> 439 <p class="color-subtle fs-s m-0">@campaignText</p> 440 </div> 441 } 442 } 443 <div class="py-1 my-2 border-top border-bottom"> 444 <div class="row flex items-center justify-content-between"> 445 <div class="col-8"> 446 @RenderProductPricing(product, splashPriceObject, true, hasVariants) 447 </div> 448 <div class="col-4 pl-0"> 449 <a href="@productLink" class="btn btn-show-product float-right my-1 px-4"><strong>@Translate("Ecom:Product.Show", "Vis")</strong></a> 450 </div> 451 </div> 452 </div> 453 @if (!powerStep) 454 { 455 bool createEmptyLine = true; 456 if (!string.IsNullOrEmpty(multipleExcludeBedAccessoriesOptionLabel)) 457 { 458 createEmptyLine = false; 459 <p class="color-subtle fs-s m-0">@Translate("Ecom:Product.Pricing.Excludes.Beds - " + multipleExcludeBedAccessoriesOptionLabel, "")</p> 460 } 461 else if (excludeBedAccessories) 462 { 463 createEmptyLine = false; 464 <p class="color-subtle fs-s m-0">@Translate("Ecom:Product.Pricing.Excludes.Beds", "Prisen er ekskl. ben og gavl.")</p> 465 } 466 if (hasVariants) 467 { 468 <div class="variant-price-disclaimer color-subtle fs-s">@Translate("VariantPriceDisclaimer", "Prisen kan variere efter materialevalg")</div> 469 } 470 else 471 { 472 <div class="variant-price-disclaimer color-subtle fs-s invisible">&nbsp;</div> 473 } 474 475 } 476 </div> 477 @* <script> *@ 478 @* var ga4ProductListItems = ga4ProductListItems || [] *@ 479 @* *@ 480 @* var item = {}; *@ 481 @* item.item_id = '@productId'; *@ 482 @* item.item_name = '@productName'; *@ 483 @* item.currency = '@Dynamicweb.Ecommerce.Common.Context.Currency.Code'; *@ 484 @* item.index = @productListIndex; *@ 485 @* item.item_list_id = '@productListGroupId'; *@ 486 @* item.item_list_name = '@productListGroupName'; *@ 487 @* item.price = @product.GetDouble("Ecom:Product.Price.Price"); *@ 488 @* item.quantity = 1; *@ 489 @* ga4ProductListItems.push(item); *@ 490 @* </script> *@ 491 </div> 492 </div> 493 } 494 495 496 @{ 497 string QuickDeliveryDescription = Firstweb.Custom.CustomCode.Frontend.Helpers.AreaItems.GetString("QuickDeliveryDescription"); 498 string NormalDeliveryDescription = Firstweb.Custom.CustomCode.Frontend.Helpers.AreaItems.GetString("NormalDeliveryDescription"); 499 string itemHeading = GetString("Item.Heading"); 500 int counter = 0; 501 } 502 503 <div class="featured-products my-5 py-5 bg-beige" data-bind="viewModel: 'ProductListViewModel'"> 504 505 <div class="delivery-information-popup" data-bind="css: { 'flex': QuickDeliveryInfoOpen }, click: ToggleQuickDeliveryInfo"> 506 <div class="description-content bg-white px-3 py-4 px-lg-4 relative" data-bind="click: OpenQuickDeliveryInfo, clickBubble: false"> 507 <div class="modal-closer-custom" data-bind="click: ToggleQuickDeliveryInfo, clickBubble: false"> 508 <img src="/Files/Templates/Designs/Mobler2018/dist/icons/close.svg" /> 509 </div> 510 <div> 511 @QuickDeliveryDescription 512 </div> 513 </div> 514 </div> 515 <div class="delivery-information-popup" data-bind="css: { 'flex': NormalDeliveryInfoOpen }, click: ToggleNormalDeliveryInfo"> 516 <div class="description-content bg-white px-3 py-4 px-lg-4 relative" data-bind="click: OpenNormalDeliveryInfo, clickBubble: false"> 517 <div class="modal-closer-custom" data-bind="click: ToggleNormalDeliveryInfo, clickBubble: false"> 518 <img src="/Files/Templates/Designs/Mobler2018/dist/icons/close.svg" /> 519 </div> 520 <div> 521 @NormalDeliveryDescription 522 </div> 523 </div> 524 </div> 525 526 @if (itemHeading != null && itemHeading != "") 527 { 528 <div class="line-through-header"> 529 <h2>@itemHeading</h2> 530 </div> 531 } 532 533 <div class="container mt-4"> 534 <div class="row"> 535 @foreach (var product in GetLoop("Item.Products.Value")) 536 { 537 @RenderProduct(product, counter, itemHeading, itemHeading) 538 counter++; 539 } 540 </div> 541 </div> 542 543 </div> 544
Skovby Møbler Stressless ZensiZone Egetæpper Natuzzi Jensen
møblér
© 2025 Møblér. All Rights Reserved | In2house A.M.B.A. | CVR.: DK31771269