Error executing template "Designs/isabella/_parsed/espresso.parsed.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
at CompiledRazorTemplates.Dynamic.RazorEngine_3fdc3b6c78334a34a82ec5da2456094d.Execute() in F:\dynamicweb.net\Solutions\isabella.espresso4.dk\Files\Templates\Designs\isabella\_parsed\espresso.parsed.cshtml:line 59
at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader)
at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<RunCompile>b__0(TextWriter writer)
at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template)
at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template)
at Dynamicweb.Rendering.Template.RenderRazorTemplate()

1 @inherits Co3.Espresso.Website.TemplateBases.Pages.PageBase 2 @using System.IO 3 @using System.Web 4 @using Co3.Espresso.Website.Services 5 @using Dynamicweb.Admin.dk.dynamicweb.templates 6 @using Dynamicweb.Ecommerce.Common 7 @using Dynamicweb.Frontend 8 @using System.Net 9 @using System.Net.Sockets 10 @{ 11 string globalAreaLang = PageView.Current().Area.CultureInfo.TwoLetterISOLanguageName; 12 string globalAreaName = string.Empty; 13 globalAreaName = PageView.Current().Area.Name; 14 string currencySeparatorDecimal = PageView.Current().Area.CultureInfo.NumberFormat.NumberDecimalSeparator; 15 string currencySeparatorInteger = PageView.Current().Area.CultureInfo.NumberFormat.NumberGroupSeparator; 16 bool isProductPage = !string.IsNullOrEmpty(Dynamicweb.Context.Current.Request["productid"]); 17 string openGraphUrl = PageView.Current().SearchFriendlyUrl; 18 string openGraphImage = HttpContext.Current.Request.Url.Scheme + "://" + HttpContext.Current.Request.Url.Host + Espresso.OpenGraphImage; 19 string openGraphTitle = Espresso.OpenGraphTitle; 20 string openGraphDescription = Espresso.OpenGraphDescription; 21 if (string.IsNullOrEmpty(openGraphImage)) 22 { 23 openGraphImage = HttpContext.Current.Request.Url.Scheme + "://" + HttpContext.Current.Request.Url.Host + (string)PageView.Current().Area.Item["OpenGraphImage"]; 24 } 25 if (string.IsNullOrEmpty(openGraphTitle)) 26 { 27 openGraphTitle = (string)PageView.Current().Area.Item["OpenGraphTitle"]; 28 } 29 if (string.IsNullOrEmpty(openGraphDescription)) 30 { 31 openGraphDescription = (string)PageView.Current().Area.Item["OpenGraphDescription"]; 32 } 33 34 35 bool isUserAuthenticated = PageView.Current().User != null; 36 string webfontsSnippetHtml = RenderSnippet( "webfonts" ).ToString().Trim(); 37 string customWebsite = PageView.Current().Area.Item["CustomWebsite"]?.ToString(); 38 string shopType = PageView.Current().Area.Item["ShopType"]?.ToString(); 39 string isOutletClass = shopType == "Outlet" ? "is-outlet" : string.Empty; 40 bool isCamplet = customWebsite == "camplet-website"; 41 42 } 43 44 <!DOCTYPE html> 45 <html lang="@globalAreaLang" data-separator-integer="@currencySeparatorInteger" data-separator-decimal="@currencySeparatorDecimal" data-area="@globalAreaName" data-shop="@shopType"> 46 <head> 47 @GetValue( "CopyRightNotice" ) 48 <meta charset="utf-8"> 49 <meta content="width=device-width, initial-scale=1, shrink-to-fit=no, minimal-ui" name="viewport"> 50 <meta content="ie=edge" http-equiv="x-ua-compatible"> 51 <title>@GetValue("Title")</title> 52 @Espresso.CriticalCSS 53 @if ( webfontsSnippetHtml != "<!--$$Snippet(webfonts)-->" ) 54 { 55 @webfontsSnippetHtml 56 } 57 <link href="/Files/Templates/Designs/isabella/_assets/_dist/css/default.css?v=1.15" media="@Espresso.StylesheetAttributeMedia" rel="@Espresso.StylesheetAttributeRel" as="style"> 58 59 @Espresso.CriticalJS 60 @*<meta name="description" content="@Espresso.DynamicwebPage.Description">*@ 61 <link rel="shortcut icon" href="@Espresso.Area.Item.Favicon"> 62 @GetValue( "MetaTags" ) 63 @if ( Espresso.IsStagingUrl ) 64 { 65 <meta content="noindex,nofollow" name="robots"> 66 } 67 68 <meta property="og:site_name" content="Isabella"> 69 70 @if (isProductPage) 71 { 72 @RenderSnippet( "ProductOpenGraph" ) 73 } 74 else 75 { 76 <meta property="og:title" content="@openGraphTitle"> 77 <meta property="og:description" content="@openGraphDescription"> 78 <meta property="og:image" content="@openGraphImage"> 79 } 80 <meta property="og:url" content="@openGraphUrl"> 81 <meta property="og:type" content="website"> 82 83 <meta name="facebook-domain-verification" content="8kymtn6m9jq0t3gqsk3y6dqbadc3qf"> 84 @if ( string.IsNullOrEmpty( Espresso.Area.Item.GoogleSiteVerification ) == false ) 85 { 86 <meta name="google-site-verification" content="@Espresso.Area.Item.GoogleSiteVerification"> 87 } 88 @{ 89 if ( 1 == 2 ) 90 { 91 @GetValue( "Stylesheets" ) 92 } 93 } 94 95 @inherits Co3.Espresso.Website.TemplateBases.Pages.PageBase 96 @using System.Web; 97 @using System.IO 98 @using Dynamicweb.Content 99 @using Dynamicweb.Content.Items 100 @using Dynamicweb.Rendering 101 @using Dynamicweb.Frontend 102103 <!-- Hreflang --> 104 @{ 105 @* Get areas from service *@ 106 Dynamicweb.Content.AreaService areaService = new Dynamicweb.Content.AreaService(); 107 IList<Area> areas = areaService.GetAreas(); 108 @* Get current page's relation-text from page-item *@ 109 string currentPageRelation = PageView.Current().Page.Item["PageRelation"] != null ? PageView.Current().Page.Item["PageRelation"].ToString() : string.Empty; 110 @* Frontpage must have 'frontpage' as relation-text *@ 111112 string frontpageRelation = "i-frontpage"; 113 int REDIRECT_ID = 1; 114 if (PageView.Current().Area.Item["CustomWebsite"] != null && PageView.Current().Area.Item["CustomWebsite"].ToString() == "timeout-website") 115 { 116 frontpageRelation = "t-frontpage"; 117 REDIRECT_ID = 63; 118 } 119 if (PageView.Current().Area.Item["CustomWebsite"] != null && PageView.Current().Area.Item["CustomWebsite"].ToString() == "camplet-website") 120 { 121 frontpageRelation = "c-frontpage"; 122 REDIRECT_ID = 76; 123 } 124 string domainBase = areas.FirstOrDefault( a => a?.ID == REDIRECT_ID ).DomainLock; 125 List<dynamic> areaInfoList = new List< dynamic >(); 126127 @* Iterate areas *@ 128 foreach ( Area area in areas ) 129 { 130 if ( area.Active == true && area.ID != REDIRECT_ID ) 131 { 132133 @* Get current area's culture *@ 134 string culture = area.Culture; 135 string name = area.Name; 136 @* Check for IsDefault Hreflang on area *@ 137 string isDefaultHrefLang = area.Item[ "IsDefaultHrefLang" ] != null ? area.Item[ "IsDefaultHrefLang" ].ToString() : string.Empty; 138 @* Check for override-culture text on area *@ 139 string hreflangCultureOverride = area.Item[ "HreflangLanguageOverride" ] != null ? area.Item[ "HreflangLanguageOverride" ].ToString() : string.Empty; 140141 string isWebsiteExcluded = area.Item["ExcludeFromHreflang"] != null ? area.Item["ExcludeFromHreflang"]?.ToString() : string.Empty; 142 @* Get scheme and domain *@ 143 string scheme = GetGlobalValue("Global:Request.Scheme"); 144 string domain = domainBase; 145 @* If we have a primary domain call pageservice and get pages *@ 146147 string productId = HttpContext.Current.Request[ "productid" ]; 148 if (string.IsNullOrEmpty(productId) == false) 149 { 150 if (PageView.Current().Page.Parent != null && PageView.Current().Page.Parent.Item != null && PageView.Current().Page.Parent.Item["PageRelation"] != null) 151 { 152 currentPageRelation = PageView.Current().Page.Parent.Item["PageRelation"].ToString(); 153 } 154155 } 156157 if ( string.IsNullOrEmpty(currentPageRelation) == false && string.IsNullOrEmpty(domain) == false ) 158 { 159160161 Dynamicweb.Content.PageService pageService = new Dynamicweb.Content.PageService(); 162 IEnumerable< Dynamicweb.Content.Page > pages = pageService.GetPagesByAreaID(area.ID); 163 @* Iterate pages in area - check if is active + has item + has item-pagerelation + item-pagerelation equals current pagerelation *@ 164 foreach ( Dynamicweb.Content.Page page in pages.Where(p => p.Published && p.Item != null && p.Item[ "PageRelation" ] != null && p.Item[ "PageRelation" ].ToString().Equals(currentPageRelation)) ) 165 { 166167 string url = string.Empty; 168 if ( string.IsNullOrEmpty(productId) == false ) 169 { 170 @* Build url to area product page *@ 171 string prodUrl = string.Format("Default.aspx?ID={0}&ProductId={1}", pageService.GetPagesByParentID(page.ID)?.FirstOrDefault()?.ID, productId); 172 url = string.Format("{0}://{1}{2}", scheme, domain, SearchEngineFriendlyURLs.GetFriendlyUrl(prodUrl, area.EcomLanguageId)); 173 } 174 else 175 { 176 @* Build url to area page *@ 177 url = string.Format("{0}://{1}{2}", scheme, domain, SearchEngineFriendlyURLs.GetFriendlyUrl(page.GetPageHrefValue())); 178 } 179 @* If our current page relation match frontpage - set link to domain only *@ 180 if ( currentPageRelation == frontpageRelation ) 181 { 182 url = string.Format("{0}://{1}/{2}", scheme, domain, name); 183 } 184185 @* If our area item has checked in Default hreflang, we render x-default link *@ 186 if ( isDefaultHrefLang == "True" ) 187 { 188 <link rel="alternate" hreflang="x-default" href="@url"> 189 } 190 @* If we have a value in the area-item to overrule the culture, override the value here *@ 191 if ( string.IsNullOrEmpty(hreflangCultureOverride) == false ) 192 { 193 culture = hreflangCultureOverride; 194 } 195 @* Render hreflang-link *@ 196 if ( isWebsiteExcluded != "True") 197 { 198 <link rel="alternate" hreflang="@culture.ToLower()" href="@url"> 199 } 200201 } 202 } 203 } 204 } 205206 } 207 <!-- End Hreflang --> 208209 @if (!isCamplet) 210 { 211 <!-- Google Tag Manager --> 212 <script>!function(){"use strict";function l(e){for(var t=e,r=0,n=document.cookie.split(";");r<n.length;r++){var o=n[r].split("=");if(o[0].trim()===t)return o[1]}}function s(e){return localStorage.getItem(e)}function u(e){return window[e]}function d(e,t){e=document.querySelector(e);return t?null==e?void 0:e.getAttribute(t):null==e?void 0:e.textContent}var e=window,t=document,r="script",n="dataLayer",o="TT2Z6XF",a="https://ss.isabella.net",i="",c="vchxjrma",E="stapeUserId",I="",v="",g=!1;try{var g=!!E&&(m=navigator.userAgent,!!(m=new RegExp("Version/([0-9._]+)(.*Mobile)?.*Safari.*").exec(m)))&&16.4<=parseFloat(m[1]),A="stapeUserId"===E,f=g&&!A?function(e,t,r){void 0===t&&(t="");var n={cookie:l,localStorage:s,jsVariable:u,cssSelector:d},t=Array.isArray(t)?t:[t];if(e&&n[e])for(var o=n[e],a=0,i=t;a<i.length;a++){var c=i[a],c=r?o(c,r):o(c);if(c)return c}else console.warn("invalid uid source",e)}(E,I,v):void 0;g=g&&(!!f||A)}catch(e){console.error(e)}var m=e,E=(m[n]=m[n]||[],m[n].push({"gtm.start":(new Date).getTime(),event:"gtm.js"}),t.getElementsByTagName(r)[0]),I="dataLayer"===n?"":"&l="+n,v=f?"&bi="+encodeURIComponent(f):"",A=t.createElement(r),e=g?"kp"+c:c,n=!g&&i?i:a;A.async=!0,A.src=n+"/"+e+".js?st="+o+I+v,null!=(f=E.parentNode)&&f.insertBefore(A,E)}();</script> 213 <!-- End Google Tag Manager --> 214 } 215 else 216 { 217 if ( string.IsNullOrEmpty( Espresso.Area.GoogleTagManagerID ) == false && Espresso.Area.GoogleTagManagerID != "GTM-XXXX" ) 218 { 219 <!-- Google Tag Manager --> 220 <script> 221 (function(w, d, s, l, i) { 222 w[l] = w[l] || []; 223 w[l].push({ 224 'gtm.start': 225 new Date().getTime(), 226 event: 'gtm.js' 227 }); 228 var f = d.getElementsByTagName(s)[0], 229 j = d.createElement(s), 230 dl = l != 'dataLayer' ? '&l=' + l : ''; 231 j.async = true; 232 j.src = 233 'https://www.googletagmanager.com/gtm.js?id=' + i + dl; 234 f.parentNode.insertBefore(j, f); 235 })(window, document, 'script', 'dataLayer', '@Espresso.Area.GoogleTagManagerID'); 236 </script> 237 <!-- End Google Tag Manager --> 238 } 239 } 240241242243244 <meta name="p:domain_verify" content="f3602094bd5d9d79dad3925721bc1ae4"> 245 <meta name="msvalidate.01" content="DF1E6C310BF3052B5579FABC80E4444D"> 246 <!-- ActiveCampaign --> 247 <script type="text/javascript" defer=""> 248249 (function(e,t,o,n,p,r,i){e.visitorGlobalObjectAlias=n; 250 e[e.visitorGlobalObjectAlias]=e[e.visitorGlobalObjectAlias]||function(){(e[e.visitorGlobalObjectAlias].q=e[e.visitorGlobalObjectAlias].q||[]).push(arguments)}; 251 e[e.visitorGlobalObjectAlias].l=(new Date).getTime(); 252 r=t.createElement("script"); 253 r.src=o;r.async=true; 254 i=t.getElementsByTagName("script")[0]; 255 i.parentNode.insertBefore(r,i)})(window,document,"https://diffuser-cdn.app-us1.com/diffuser/diffuser.js","vgo"); 256 vgo('setAccount', '254430349'); 257 vgo('setTrackByDefault', true); 258 vgo('process'); 259 </script> 260 <!-- ActiveCampaign --> 261262263 </dynamic></head> 264265 <body class="@Espresso.Item.CustomClasses @customWebsite @isOutletClass" data-cart-currencycode="@Context.Currency.Code" data-shop-currencycode="@Pageview.Area.EcomCurrencyId" data-userauthenticated="@isUserAuthenticated.ToString().ToLower()"> 266267 @if (!isCamplet) 268 { 269 <!-- Google Tag Manager (noscript) --> 270 <noscript><iframe src="https://ss.isabella.net/ns.html?id=GTM-TT2Z6XF" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> 271 <!-- End Google Tag Manager (noscript) --> 272 } 273 else 274 { 275 if ( string.IsNullOrEmpty( Espresso.Area.GoogleTagManagerID ) == false && Espresso.Area.GoogleTagManagerID != "GTM-XXXX" ) 276 { 277 <!-- Google Tag Manager (noscript) --> 278 <noscript> 279 <iframe src="https://www.googletagmanager.com/ns.html?id=@Espresso.Area.GoogleTagManagerID" height="0" width="0" style="display: none; visibility: hidden"></iframe> 280 </noscript> 281 <!-- End Google Tag Manager (noscript) --> 282 } 283 } 284285 @using Dynamicweb.Frontend 286 @inherits Co3.Espresso.Website.TemplateBases.Pages.PageBase 287 @{ 288 Espresso.Canvas.ClassList.AddClasses( "js-e-canvas is-loading" ); 289 if ( Espresso.Item.CanvasFullscreen == "True" ) 290 { 291 Espresso.Canvas.ClassList.AddClasses( "is-fullscreen" ); 292 } 293294 } 295296297298 @using System.Globalization 299 @using System.Security.Cryptography.X509Certificates 300 @using System.Web.Razor.Parser.SyntaxTree 301 @using Co3.Espresso.Base.Extensions 302 @using Co3.Espresso.Website.Models.FrontEnd 303 @using Co3.Espresso.Website.Services 304 @using Co3.Isabella.Dw.Models.FrontEnd.Ecommerce 305 @using Dynamicweb.Content 306 @using Dynamicweb.Ecommerce.Products 307 @using Dynamicweb.Frontend 308 @using Dynamicweb.Rendering 309 @using Dynamicweb.Rendering.Translation 310 @using Dynamicweb.SystemTools 311 @using EcomContext = Dynamicweb.Ecommerce.Common.Context 312 @using eProductService = Co3.Espresso.Website.Services.ProductService 313 @using Page = Dynamicweb.Content.Page 314 @using PageService = Dynamicweb.Content.PageService 315316 @functions { 317318 public string getCountryCodeFromArea(Area area) 319 { 320 RegionInfo regionInfo = new RegionInfo( area.CultureInfo.LCID ); 321 return regionInfo.TwoLetterISORegionName; 322 } 323324 public string getCheckoutSetup(string shopType = "") 325 { 326 bool isB2bCheckout = PageView.Current().User != null; 327 if (isB2bCheckout) 328 { 329 return "shipping,customer,approve"; 330 } else if (shopType == "B2C") 331 { 332 return "shipping,payment,approve"; 333 } else if (shopType == "Outlet") 334 { 335 return "shipping,customer,payment,approve"; 336 } 337338 return "customer,approve"; 339 } 340341 public static string GetStandardCollapseToggleTextExpand() 342 { 343 return "Se mere"; 344 } 345346 public static string GetStandardCollapseToggleTextCollapse() 347 { 348 return "Se mindre"; 349 } 350351 public string getModelTypeLink() 352 { 353 bool isUserAuthenticated = PageView.Current().User != null; 354 string eComCountryCode = PageView.Current().Area.Item[ "EcommerceCountryCode" ] != null ? PageView.Current().Area.Item[ "EcommerceCountryCode" ].ToString() : ""; 355 string returnValue = string.Empty; 356357 if ( isUserAuthenticated == false ) 358 { 359 if ( string.IsNullOrEmpty(eComCountryCode) == false) 360 { 361 { 362 returnValue = string.Format( "Ecom:Product.CategoryField.ModelType.ModelTypeLink_{0}.Value", eComCountryCode ); 363 } 364 } 365 else 366 { 367 returnValue = "Ecom:Product.CategoryField.ModelType.ModelTypeLink.Value"; 368 } 369 } 370 else 371 { 372 if ( string.IsNullOrEmpty(eComCountryCode) == false) 373 { 374 { 375 returnValue = string.Format( "Ecom:Product.CategoryField.ModelType.ModelTypeLinkB2B_{0}.Value", eComCountryCode ); 376 } 377 } 378 else 379 { 380 returnValue = "Ecom:Product.CategoryField.ModelType.ModelTypeLinkB2B.Value"; 381 } 382 } 383384 return returnValue; 385 } 386387 } 388389 @helper ProductDescription(string sectionClasses = "e-section", bool sectionCollapse = false, string contentClasses = null, string heading = null, string content = null, string collapseToggleTextExpand = null, string collapseToggleTextCollapse = null) 390 { 391 if ( string.IsNullOrEmpty( content ) == false ) 392 { 393 ClassList headingClassList = new ClassList(); 394 headingClassList.AddClasses( "col-12" ); 395 ClassList contentClassList = new ClassList(); 396 contentClassList.AddClasses( "col-12" ); 397398 @sectionStart( sectionClasses: sectionClasses, sectionCollapse: sectionCollapse, contentClasses: contentClasses, collapseToggleTextCollapse: collapseToggleTextCollapse, collapseToggleTextExpand: collapseToggleTextExpand ) 399400 if ( string.IsNullOrEmpty( heading ) == false ) 401 { 402 <div class="@headingClassList"> 403 <h2>@heading</h2> 404 </div> 405 } 406 <div class="@contentClassList"> 407 @content 408 </div> 409410 @sectionEnd() 411 } 412 } 413414415 @helper ProductVideo(string sectionClasses = "e-section", string contentClasses = null, string heading = null, string videoURL = null) 416 { 417 if ( string.IsNullOrEmpty( videoURL ) == false ) 418 { 419 ClassList headingClassList = new ClassList(); 420 headingClassList.AddClasses( "col-12" ); 421 ClassList contentClassList = new ClassList(); 422 contentClassList.AddClasses( "col-12" ); 423424425 @sectionStart( sectionClasses: sectionClasses, contentClasses: contentClasses ) 426427 if ( string.IsNullOrEmpty( heading ) == false ) 428 { 429 <div class="@headingClassList"> 430 <h2>@heading</h2> 431 </div> 432 } 433434 <div class="@contentClassList"> 435 <div class="embed-responsive embed-responsive-16by9 mb-2"> 436 <iframe class="embed-responsive-item cookieconsent-optin-marketing" data-cookieconsent="marketing" data-cookieblock-src="@videoURL" width="1080" height="608" frameborder="0" webkitallowfullscreen="" mozallowfullscreen="" allowfullscreen=""></iframe> 437 <div class="cookieconsent-optout-marketing"> 438 <div> 439 <a class="btn btn-primary" href="javascript:Cookiebot.renew()"> 440 @Dynamicweb.Rendering.Translation.Translation.GetTranslation("CookieBot - Video - accept marketing-cookies", PageView.Current().Area.Layout.Design) 441 </a> 442443 </div> 444 </div> 445 </div> 446 </div> 447 @sectionEnd() 448 } 449 } 450451 @helper ProductRelatedProducts(string sectionClasses = "e-section", bool sectionCollapse = false, string contentClasses = null, string heading = null, string content = null, string collapseToggleTextExpand = null, string collapseToggleTextCollapse = null, 452 IEnumerable< Product > productLoop = null) 453 { 454 if ( productLoop != null && productLoop.Any() == true ) 455 { 456 ClassList headingClassList = new ClassList(); 457 headingClassList.AddClasses( "col-12" ); 458 ClassList contentClassList = new ClassList(); 459 contentClassList.AddClasses( "col-12" ); 460461 @sectionStart( sectionClasses: sectionClasses, sectionCollapse: sectionCollapse, contentClasses: contentClasses, collapseToggleTextCollapse: collapseToggleTextCollapse, collapseToggleTextExpand: collapseToggleTextExpand ) 462463 if ( string.IsNullOrEmpty( heading ) == false ) 464 { 465 <div class="@headingClassList"> 466 <h4 class="isabella-text-bullets-left mb-3">@heading</h4> 467 </div> 468 } 469 <div class="@contentClassList"> 470 <div class="e-products mb-2"> 471 <div class="row"> 472 @{ 473 string productlistItemClassList = "col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3"; 474 } 475 @foreach ( Product product in productLoop.Where(p => p.Groups.Any(g => g.ShopId.Equals("SHOP1")) && (bool) p.GetCategoryValue( "ProductsGeneral", "PIMActive" ) != false && (bool) p.ShowInProductList && p.Active) ) 476 { 477 @ProductlistItem(product, productlistItemClassList) 478 } 479 </div> 480 </div> 481 </div> 482483 @sectionEnd() 484 } 485 } 486487488 @helper ProductlistItem(Product product, string productlistItemClassList = null, string isModelProductList = null) 489 { 490 Dynamicweb.Ecommerce.Products.ProductService dwProductService = new Dynamicweb.Ecommerce.Products.ProductService(); 491 string shopType = PageView.Current().Area.Item["ShopType"]?.ToString(); 492 string productLink = eProductService.Instance.GetProductLink( product.GetDefaultGroupByShopId( product.DefaultShopId ).Id, product.Id, product.VariantId ); 493494495 productLink = SearchEngineFriendlyURLs.GetFriendlyUrl( productLink ); 496497 if (shopType == "Outlet") 498 { 499 Page page = new PageService().GetPageByNavigationTag(PageView.Current().AreaID, "outletdisplaypage"); 500 if (page != null) 501 { 502 productLink = SearchEngineFriendlyURLs.GetFriendlyUrl( $"Default.aspx?ID={page.ID}&productId={product.Id}" ); 503 } 504505 } 506507 IsabellaProductImageUrl primaryImage = Co3.Isabella.Dw.Services.ProductService.Instance.GetImagePrimary(product); 508 List<IsabellaProductImageUrl> detailsImages = Co3.Isabella.Dw.Services.ProductService.Instance.GetImageDetails(product); 509 string detailsImage = detailsImages?.FirstOrDefault( pd => pd.Type == 0 && pd.GroupId == 4 )?.Medium ?? string.Empty; 510511 //string productlistDetailImage = product.Details.FirstOrDefault( pd => pd.Type == 0 && pd.GroupId == 4 )?.Value; 512513514515 string image = "/Files/Templates/Designs/isabella/_assets/img/NoImage.gif"; 516517 if (primaryImage != null) 518 { 519 image = primaryImage.Medium; 520 } 521522 if ( product != null ) 523 { 524 dynamic productData = new 525 { 526 id = product.Id, 527 url = productLink, 528 number = product.Number, 529 name = product.Name, 530 imageDefault = image, 531 price = Co3.Isabella.Dw.Services.ProductService.Instance.GetPrice( product.Id ).Format(), 532 priceClean = Co3.Isabella.Dw.Services.ProductService.Instance.GetPrice( product.Id ).Price, 533 productIntroText = product.GetCategoryValue( "ProductsGeneral", "ProductIntroText" )?.ToString(), 534 news = product.GetCategoryValue( "ProductsGeneral", "News" )?.ToString(), 535 productType = product.GetCategoryValue( "ProductsGeneral", "ProductType" )?.ToString(), 536 isModelProductList = isModelProductList, 537 productlistDetailImage = detailsImage, 538 shopType 539 }; 540541 <div class="@productlistItemClassList"> 542 <div class="border-1 card mb-6"> 543 <a href="@productData.url"> 544 @if ( productData.isModelProductList == "True" ) 545 { 546 <img src="@productData.productlistDetailImage" alt="@productData.name @productData.productType" class="col-12 p-0"> 547 } 548 else 549 { 550 <img src="@productData.imageDefault" alt="@productData.name @productData.productType" class="col-12 p-0"> 551 } 552 @if ( productData.news == "True" ) 553 { 554 <div class="isabella-product-item-news"> 555 @Dynamicweb.Rendering.Translation.Translation.GetTranslation( "Ecom Product - News Badge - Text" ) 556 </div> 557 } 558 </a> 559 <div class="card-body p-1 p-lg-3"> 560 <h4 class="e-products-item-name mb-0"> 561 <a href="@productData.url"> 562 @productData.name 563 </a> 564 </h4> 565566 </div> 567 </div> 568 </div> 569 } 570 } 571572573 @helper sectionStart(string sectionClasses = "e-section", string contentClasses = null, bool sectionCollapse = false, string sectionId = null, string collapseToggleTextExpand = null, string collapseToggleTextCollapse = null) 574 { 575 sectionId = string.IsNullOrEmpty( sectionId ) ? Guid.NewGuid().ToString( "N" ) : sectionId; 576 ClassList sectionClassList = new ClassList(); 577 sectionClassList.AddClasses( sectionClasses ); 578 ClassList contentClassList; 579580 if ( contentClasses == null ) 581 { 582 contentClassList = Co3.Espresso.Website.Services.PageService.Instance.GetResponsiveClassesFromPageItem( PageView.Current().Page.Item ); 583 } 584 else 585 { 586 contentClassList = new ClassList(); 587 contentClassList.AddClasses( contentClasses ); 588 } 589590 // TODO: Split collapse logic into separate helper function. 591 string collapseId = Guid.NewGuid().ToString( "N" ); 592 ClassList collapseToggleClassList = new ClassList(); 593 if ( sectionCollapse ) 594 { 595 sectionClassList.AddClasses( "p-section-collapse js-p-section-collapse" ); 596 collapseToggleClassList.AddClasses( contentClasses ); 597 collapseToggleClassList.AddClasses( "p-section-collapse-toggle collapsed order-last text-center" ); 598 contentClassList.AddClasses( "p-section-collapse-content collapse is-md" ); 599 } 600601 @:<section class="@sectionClassList" id="@sectionId"> 602 @:<div class="container-fluid"> 603 @:<div class="row"> 604605 // TODO: Split collapse logic into separate helper function. 606 if ( sectionCollapse ) 607 { 608 <div class="@collapseToggleClassList" data-toggle="collapse" data-target="#@collapseId"> 609 <button class="btn btn-primary p-section-collapse-toggle-btn" type="button"> 610 <i class="material-icons p-section-collapse-toggle-icon">keyboard_arrow_down</i> 611 </button> 612 <small class="h4 p-section-collapse-toggle-text" data-expand-text="@( string.IsNullOrEmpty( collapseToggleTextExpand ) ? GetStandardCollapseToggleTextExpand() : collapseToggleTextExpand )" data-collapse-text="@( string.IsNullOrEmpty( collapseToggleTextCollapse ) ? GetStandardCollapseToggleTextCollapse() : collapseToggleTextCollapse )"></small> 613 </div> 614 } 615616 @:<div class="@contentClassList" id="@collapseId"> 617 @:<div class="row"> 618 } 619620 @helper sectionEnd() 621 { 622 @:</div> 623 @:</div> 624 @:</div> 625 @:</div> 626 @:</section> 627 } 628629630631632633 <div class="e-loading-overlay e-page-loading-overlay is-loading js-e-page-loading-overlay"> 634 <svg class="e-loading-spinner isabella-loading-spinner-logo" viewbox="0 0 316.9 383"> 635 <path class="isabella-logo crown-top" d="M264.2,150.9l-30.5,45.4L220.2,57.9l-18.5-5l-45.4,122.8L113.7,52.9l-17,5L81.1,196.3l-27.7-46.1 636 c-10,5.1-10,5.1-10,5.1s0,0-5.7,3.4c14.9,39.8,28.4,91.6,35.5,142c45.4-11.4,120.7-12.8,168.3-1.4c8.5-47.6,22-102.9,37.6-140.6 637 L264.2,150.9z"></path> 638 <path class="isabella-logo crown-bottom" d="M76.1,324.8c64.6-14.2,102.2-14.2,163.3-0.7c-2.1,21.3-4.3,40.5-5.7,57.5c-43.3-9.2-105.1-9.2-154.1,1.4 639 C79.6,364.6,78.2,345.4,76.1,324.8"></path> 640 <path class="isabella-logo circle-1" d="M54,153.1c0,0,19-23-1.9-44S0.7,110.7,0,127.7s10.4,25.4,10.4,25.4S33.8,172.8,54,153.1z"></path> 641 <path class="isabella-logo circle-3" d="M241.2,52.4c0,0,19-23-1.9-44s-51.4,1.6-52.1,18.6s10.4,25.4,10.4,25.4S221,72.2,241.2,52.4z"></path> 642 <path class="isabella-logo circle-4" d="M309,110.4c0,0,19,23-1.9,44s-51.4-1.6-52.1-18.6c-0.6-17.1,10.4-25.4,10.4-25.4S288.8,90.7,309,110.4z"></path> 643 <path class="isabella-logo circle-2" d="M122.1,8.8c0,0,19,23-1.9,44s-51.4-1.6-52.1-18.6S78.5,8.8,78.5,8.8S101.9-11,122.1,8.8z"></path> 644 </svg> 645646647 </div> 648 @* https://medium.com/clio-calliope/making-google-fonts-faster-aadf3c02a36d *@ 649 @SnippetStart("webfonts") 650 <link crossorigin="" href="https://fonts.gstatic.com/" rel="preconnect"> 651 <link href="https://fonts.googleapis.com/css?family=IBM+Plex+Sans:400,700%7CMaterial+Icons" media="@Espresso.StylesheetAttributeMedia" rel="@Espresso.StylesheetAttributeRel" as="style"> 652 @SnippetEnd("webfonts") 653654655656 <div class="@Espresso.Canvas.ClassList"> 657 @using Co3.Espresso.Website.Models.FrontEnd 658 @using Dynamicweb.Ecommerce.Orders 659 @using Dynamicweb.Frontend 660 @using Dynamicweb.Frontend.Navigation 661 @{ 662 ClassList headerClassList = new ClassList(); 663 headerClassList.AddClasses( "e-header js-e-header is-sticky" ); 664 if ( Espresso.Item.HeaderTransparent == "True" ) 665 { 666 headerClassList.AddClasses( "is-transparent" ); 667 } 668669 ClassList logoClassList = new ClassList(); 670 logoClassList.AddClasses( "e-logo" ); 671672 string backButtonLink = Espresso.Item.BackButtonLink; 673 ClassList backButtonClassList = new ClassList(); 674 ClassList backButtonIconClassList = new ClassList(); 675 if ( Espresso.Item.BackButton == "True" ) 676 { 677 backButtonClassList.AddClasses( "btn btn-sm btn-secondary my-1 align-self-center" ); 678 if ( backButtonLink == "" || backButtonLink == "/" ) 679 { 680 backButtonLink = "/"; 681 backButtonClassList.AddClasses( "js-e-back-link" ); 682 } 683 backButtonIconClassList.AddClasses( "material-icons material-icons-large" ); 684 if ( Espresso.Item.BackButtonPosition == "right" ) 685 { 686 backButtonClassList.AddClasses( "mr-0 ml-auto order-last" ); 687 logoClassList.AddClasses( "order-first" ); 688 } 689 else 690 { 691 backButtonClassList.AddClasses( "order-first" ); 692 logoClassList.AddClasses( "mr-0 ml-auto order-last" ); 693 } 694 if ( Espresso.Item.BackButtonIcon == "arrow_back" ) 695 { 696 backButtonClassList.AddClasses( "arrow-left" ); 697 backButtonIconClassList.AddClasses( "d-none" ); 698 } 699 else if ( Espresso.Item.BackButtonIcon == "arrow_forward" ) 700 { 701 backButtonClassList.AddClasses( "arrow-right" ); 702 backButtonIconClassList.AddClasses( "d-none" ); 703 } 704 } 705706 string logoPrimary = Espresso.Area.Item.LogoPrimary; 707 string logoSecondary = Espresso.Area.Item.LogoSecondary; 708709 if ( string.IsNullOrEmpty( logoSecondary ) == true ) 710 { 711 logoSecondary = logoPrimary; 712 } 713 string tagline = Espresso.Area.Item.Tagline; 714715 Dictionary< string, string > navigationHtml = new Dictionary< string, string > 716 { 717 { 718 "global", Navigation.RenderNavigation( "navigation/espresso.cshtml", new NavigationSettings() 719 { 720 StartLevel = 1, 721 StopLevel = 8, 722 ExpandMode = ExpandMode.All, 723 Parameters = new Dictionary< string, object >() 724 { 725 { "id", "dwnav-global" } 726 } 727 } ) 728 }, 729 { 730 "utilities-primary", Navigation.RenderNavigation( "navigation/espresso.cshtml", new NavigationSettings() 731 { 732 StartLevel = 4, 733 StopLevel = 5, 734 ExpandMode = ExpandMode.All, 735 RootNavigationTag = "utilities-primary", 736 Parameters = new Dictionary< string, object >() 737 { 738 { "id", "dwnav-utilities-primary" } 739 } 740 } ) 741 }, 742 { 743 "utilities-secondary", Navigation.RenderNavigation( "navigation/espresso.cshtml", new NavigationSettings() 744 { 745 StartLevel = 4, 746 StopLevel = 4, 747 ExpandMode = ExpandMode.All, 748 RootNavigationTag = "utilities-secondary", 749 Parameters = new Dictionary< string, object >() 750 { 751 { "id", "dwnav-utilities-secondary" } 752 } 753 } ) 754 }, 755 { 756 "hamburger-header", Navigation.RenderNavigation( "navigation/espresso.cshtml", new NavigationSettings() 757 { 758 StartLevel = 4, 759 StopLevel = 4, 760 ExpandMode = ExpandMode.All, 761 RootNavigationTag = "hamburger-header", 762 Parameters = new Dictionary< string, object >() 763 { 764 { "id", "dwnav-hamburger-header" } 765 } 766 } ) 767 }, 768 { 769 "hamburger-aside", Navigation.RenderNavigation( "navigation/espresso.cshtml", new NavigationSettings() 770 { 771 StartLevel = 4, 772 StopLevel = 4, 773 ExpandMode = ExpandMode.All, 774 RootNavigationTag = "hamburger-aside", 775 Parameters = new Dictionary< string, object >() 776 { 777 { "id", "dwnav-hamburger-aside" } 778 } 779 } ) 780 } 781 }; 782783 double cartQuantity = 0; 784 var areaCartContext = PageView.Current().Area.Item[ "ContextCart" ]?.ToString(); 785786 Dynamicweb.Ecommerce.Common.Context.CartContext = OrderContext.GetOrderContextById(areaCartContext); 787 Order cart = Dynamicweb.Ecommerce.Common.Context.Cart; 788 if (cart != null ) 789 { 790 cartQuantity = cart.get_ParentProductLineQuantityCount(cart.ProductOrderLines); 791 } 792 } 793794 @SnippetStart("CartQuantity") 795 @cartQuantity 796 @SnippetEnd("CartQuantity") 797798 @if ( Espresso.Item.HeaderHide != "True" ) 799 { 800 <header class="@headerClassList" data-autohide="true"> 801802 <div class="e-header-hamburger"> 803 @sectionStart( "e-header-section e-section", "col-12" ) 804 <div class="col-12 e-header-section-content"> 805 <div class="@logoClassList"> 806 <a class="e-logo-link" href="/@globalAreaName/"> 807 <img src="@logoPrimary" class="e-logo-img e-logo-img-primary" alt="@Espresso.Area.Item.CompanyName"> 808 <img src="@logoSecondary" class="e-logo-img e-logo-img-secondary" alt="@Espresso.Area.Item.CompanyName"> 809 @if ( string.IsNullOrEmpty( tagline ) == false ) 810 { 811 <p class="e-logo-tagline">@tagline</p> 812 } 813 </a> 814 </div> 815 @if ( Espresso.Item.NavigationHide != "True" ) 816 { 817 <section class="e-nav-hamburger-header"> 818 <ul class="nav"> 819 @navigationHtml[ "hamburger-header" ] 820 @* TODO: Move to xslt *@ 821 <li class="e-nav-item-hamburger-open nav-item"> 822 <a class="nav-link" data-target=".modal.e-nav" data-toggle="modal" href="#"> 823 <i class="e-nav-pageicon material-icons">menu</i> 824 <span class="e-nav-pagename">@Translate( "Header - Hamburger menu open - Button", "Menu" )</span> 825 </a> 826 </li> 827 </ul> 828 </section> 829 } 830 @if ( Espresso.Item.BackButton == "True" ) 831 { 832 <a class="@backButtonClassList" href="@backButtonLink"> 833 @if ( Espresso.Item.BackButtonIcon != "" ) 834 { 835 <i class="@backButtonIconClassList">@Espresso.Item.BackButtonIcon</i> 836 } 837 @Espresso.Item.BackButtonText 838 </a> 839 } 840 </div> 841 @sectionEnd() 842 </div> 843 <div class="e-nav js-e-nav modal p-0" data-backdrop="false"> 844 <div class="e-nav-container navbar flex-column d-flex"> 845846 @sectionStart( "e-header-section e-header-section-primary e-section order-xl-2", "col-12" ) 847 <div class="col-12 e-header-section-content"> 848 <div class="@logoClassList"> 849 <a class="e-logo-link" href="/@globalAreaName/"> 850 <img src="@logoPrimary" class="e-logo-img e-logo-img-primary" alt="@Espresso.Area.Item.CompanyName"> 851 <img src="@logoSecondary" class="e-logo-img e-logo-img-secondary" alt="@Espresso.Area.Item.CompanyName"> 852 @if (string.IsNullOrEmpty(tagline) == false) 853 { 854 <p class="e-logo-tagline">@tagline</p> 855 } 856 </a> 857 </div> 858859 @if ( Espresso.Item.NavigationHide != "True" ) 860 { 861 <nav class="e-nav-global js-e-nav-global"> 862 <ul class="nav"> 863 @navigationHtml[ "global" ] 864 </ul> 865 </nav> 866867 <div class="e-nav-item-hamburger-close"> 868 <a class="nav-link" data-target=".modal.e-nav" data-toggle="modal" href="#"> 869 <i class="e-nav-pageicon material-icons">close</i> 870 <span class="e-nav-pagename">@Translate( "Header - Hamburger menu close - Button", "Close" )</span> 871 </a> 872 </div> 873874 if ( string.IsNullOrEmpty( navigationHtml[ "utilities-primary" ] ) == false ) 875 { 876 @:</div> 877 @sectionEnd() 878 @sectionStart( "e-header-section e-header-section-secondary e-section order-xl-1", "col-12" ) 879 @:<div class="col-12 e-header-section-content"> 880881 <nav class="e-nav-utilities-primary js-e-nav-utilities-primary"> 882 <ul class="nav"> 883 @navigationHtml[ "utilities-primary" ] 884 </ul> 885 </nav> 886 } 887888 if ( string.IsNullOrEmpty( navigationHtml[ "utilities-secondary" ] ) == false ) 889 { 890 <nav class="e-nav-utilities-secondary"> 891 <ul class="nav"> 892 @navigationHtml[ "utilities-secondary" ] 893 </ul> 894 </nav> 895 } 896 if ( string.IsNullOrEmpty( navigationHtml[ "hamburger-aside" ] ) == false ) 897 { 898 <nav class="e-nav-hamburger-aside"> 899 <ul class="nav"> 900 @navigationHtml[ "hamburger-aside" ] 901 </ul> 902 </nav> 903 } 904 } 905 @if ( Espresso.Item.BackButton == "True" ) 906 { 907 <a class="@backButtonClassList" href="@backButtonLink"> 908 @if ( Espresso.Item.BackButtonIcon != "" ) 909 { 910 <i class="@backButtonIconClassList">@Espresso.Item.BackButtonIcon</i> 911 } 912 @Espresso.Item.BackButtonText 913 </a> 914 } 915 </div> 916 @sectionEnd() 917918 </div> 919 </div> 920921 </header> 922 } 923924 @helper GetSvgFileData(string svgfile) 925 { 926 string rtnValue = svgfile; 927 if (!string.IsNullOrEmpty(svgfile)) 928 { 929 string FilePath = svgfile; 930931 if (System.IO.Path.GetExtension(FilePath) == ".svg") 932 { 933 System.Xml.XmlReaderSettings settings = new System.Xml.XmlReaderSettings(); 934 settings.DtdProcessing = System.Xml.DtdProcessing.Ignore; 935 string svgFilePath = System.Web.HttpContext.Current.Server.MapPath(FilePath) ?? string.Empty; 936 if (System.IO.File.Exists(svgFilePath)) 937 { 938 using (System.IO.StreamReader sr = new System.IO.StreamReader(svgFilePath)) 939 { 940 using (System.Xml.XmlReader xr = System.Xml.XmlReader.Create(sr, settings)) 941 { 942 bool done = false; 943 while (xr.Read() && !done) 944 { 945 if (xr.NodeType == System.Xml.XmlNodeType.Element && xr.Name == "svg") 946 { 947 rtnValue = xr.ReadOuterXml(); 948 done = true; 949 } 950 } 951 } 952 } 953 } 954 } 955 } 956 @rtnValue; 957 } 958959960 @*General - Website Settings*@ 961962 @if ( Espresso.Item.Notificationbar != "True" ) 963 { 964 if ( !string.IsNullOrEmpty(Espresso.Area.Item.NotificationbarPageId) ) 965 { 966 <section class="e-section"> 967 <div class="container-fluid"> 968 <div class="row"> 969 <div class="col-12"> 970 <div class="row"> 971 @RenderPageContent(int.Parse(Espresso.Area.Item.NotificationbarPageId)) 972 </div> 973 </div> 974 </div> 975 </div> 976 </section> 977 } 978 } 979980 @*Specific - Page*@ 981982 @if ( !string.IsNullOrEmpty(Espresso.Item.NotificationbarPageId) ) 983 { 984 <section class="e-section"> 985 <div class="container-fluid"> 986 <div class="row"> 987 <div class="col-12"> 988 <div class="row"> 989 @RenderPageContent(int.Parse(Espresso.Item.NotificationbarPageId)) 990 </div> 991 </div> 992 </div> 993 </div> 994 </section> 995 } 996 @using Dynamicweb.Frontend 997 @using Dynamicweb.Security.UserManagement 998 @{ 999 User currentUser = PageView.Current().User; 1000 if ( currentUser != null ) 1001 { 1002 User currentSecondaryUser = currentUser.CurrentSecondaryUser; 1003 if ( currentSecondaryUser != null ) 1004 { 1005 @sectionStart( "e-section bg-warning e-text-dark js-e-section is-sticky zi-fixed py-1", "col-12 small" ) 1006 <div class="align-self-center col-12 col-lg-9 col-md-8"> 1007 <p class="line-height-sm mb-1 mb-md-0 text-center text-md-left"> 1008 <i class="material-icons material-icons-2x">supervisor_account</i>&nbsp;@Translate( "Extranet Impersonation - Active impersonation message - Text", "You are currently impersonating this user:" ) <strong>@currentUser.Name &mdash; @currentUser.Company </strong> 1009 </p> 1010 </div> 1011 <div class="align-self-center col-12 col-lg-3 col-md-4"> 1012 <form class="mb-0 small text-center text-md-right" method="post" action="@Espresso.Area.Item.ExtranetImpersonationPage"> 1013 <button class="btn btn-primary" name="DwExtranetRemoveSecondaryUser" type="submit">@Translate( "Extranet Impersonation - Stop impersonation - Button", "Stop impersonation" )</button> 1014 </form> 1015 </div> 1016 @sectionEnd() 1017 } 1018 } 1019 } 102010211022 <main id="dwcontentmain" class="e-content js-e-content @Espresso.ContentArea.ClassList"> 1023 @using Dynamicweb.Content; 1024 @using Dynamicweb.Extensibility; 1025 @using Dynamicweb.Frontend 1026 @{ 1027 string eBreadcrumbClasslist = "e-breadcrumb js-e-breadcrumb d-none d-lg-block"; 1028 if ( Espresso.Item.Breadcrumb != "auto" && Espresso.Item.Breadcrumb != "none" && String.IsNullOrEmpty( Espresso.Item.Breadcrumb ) == false ) 1029 { 1030 eBreadcrumbClasslist += string.Format( " e-breadcrumb-{0}", Espresso.Item.Breadcrumb ); 1031 } 1032 string navigationHtmlBreadcrumb = RenderNavigation( new 1033 { 1034 id = "dwnav-breadcrumb", 1035 template = "breadcrumb.xslt", 1036 startlevel = 1, 1037 endlevel = 10, 1038 expandmode = "pathonly", 1039 sitemapmode = true 1040 } ); 10411042 var urlName = PageView.Current().Area.Name; 1043 } 10441045 @if ( string.IsNullOrEmpty( navigationHtmlBreadcrumb ) == false && Espresso.Item.Breadcrumb != "none" && string.IsNullOrEmpty( Espresso.Item.Breadcrumb ) == false ) 1046 { 1047 <section class="e-section @eBreadcrumbClasslist"> 1048 <div class="container-fluid"> 1049 <div class="row"> 1050 <div class="col-12"> 1051 <div class="row"> 10521053 <div class="col-12"> 1054 <nav class="e-breadcrumb-container"> 1055 <ol class="breadcrumb nav text-muted" itemscope="" itemtype="https://schema.org/BreadcrumbList"> 1056 <li class="breadcrumb-item m-0 p-0"> 1057 <a class="arrow-left breadcrumb-back-link js-e-back-link px-0" href="/@urlName">@Translate( "Breadcrumb - Back link", "Back" )</a> 1058 <span class="breadcrumb-prefix-text"> 1059 @Translate( "Breadcrumb - Prefix - Text", "You are here:" ) 1060 </span> 1061 <a href="/@urlName"> 1062 @ServiceLocator.Current.GetPageService().GetFirstPageForArea( GetInteger( "DwAreaID" ) ).MenuText 1063 </a> 1064 </li> 1065 @navigationHtmlBreadcrumb 1066 </ol> 1067 </nav> 1068 </div> 10691070 </div> 1071 </div> 1072 </div> 1073 </div> 1074 </section> 1075 } 10761077 <article class="e-content-article"> 1078 @{ 1079 int NavigationLocalHorizontalParentPageId = 0; 1080 if ( !string.IsNullOrEmpty( Espresso.Item.NavigationLocalParentPage ) ) 1081 { 1082 int.TryParse( Espresso.Item.NavigationLocalParentPage, out NavigationLocalHorizontalParentPageId ); 1083 } 1084 if ( NavigationLocalHorizontalParentPageId == 0 ) 1085 { 1086 NavigationLocalHorizontalParentPageId = PageView.Current().Page.ID; 1087 if ( !Dynamicweb.Services.Pages.GetPagesByParentID( NavigationLocalHorizontalParentPageId ).Any() ) 1088 { 1089 NavigationLocalHorizontalParentPageId = PageView.Current().Page.ParentPageId; 1090 } 1091 } 1092 string NavigationLocalHorizontalClassList = "e-nav-local e-nav-local-horizontal js-e-nav-local-horizontal"; 1093 string NavigationLocalHorizontalContainerClassList = "e-nav-local-container"; 1094 string NavigationLocalHorizontalTemplate = "local-" + Espresso.Item.NavigationLocalLayout + ".xslt"; 1095 if ( string.IsNullOrEmpty( Espresso.Item.NavigationLocalTemplate ) == false && Path.GetExtension( Espresso.Item.NavigationLocalTemplate ) == ".xslt" ) 1096 { 1097 NavigationLocalHorizontalTemplate = Path.GetFileName( Espresso.Item.NavigationLocalTemplate ); 1098 } 10991100 if ( Espresso.Item.NavigationLocalShow == "True" && Espresso.Item.NavigationLocalLayout == "horizontal" ) 1101 { 1102 NavigationLocalHorizontalClassList += " " + Espresso.Item.NavigationLocalCustomClasses; 1103 if ( Espresso.Item.NavigationLocalSticky == "True" ) 1104 { 1105 NavigationLocalHorizontalClassList += " is-sticky"; 1106 } 1107 if ( Espresso.Item.NavigationLocalAbsolute == "True" ) 1108 { 1109 NavigationLocalHorizontalClassList += " is-absolute"; 1110 } 1111 else 1112 { 1113 if ( Espresso.Item.NavigationLocalMarginTop != "0" && Espresso.Item.NavigationLocalMarginTop != "" ) 1114 { 1115 NavigationLocalHorizontalClassList += " mt-" + Espresso.Item.NavigationLocalMarginTop; 1116 } 1117 if ( Espresso.Item.NavigationLocalMarginBottom != "0" && Espresso.Item.NavigationLocalMarginBottom != "" ) 1118 { 1119 NavigationLocalHorizontalClassList += " mb-" + Espresso.Item.NavigationLocalMarginBottom; 1120 } 1121 } 1122 } 1123 } 1124 @if ( Espresso.Item.NavigationLocalShow == "True" && Espresso.Item.NavigationLocalLayout == "horizontal" ) 1125 { 1126 <section class="e-section @NavigationLocalHorizontalClassList"> 1127 <div class="container-fluid"> 1128 <div class="row"> 1129 <div class="col-12"> 1130 <div class="row"> 11311132 <div class="col-12"> 1133 <nav id="dwnav-local-horizontal-@NavigationLocalHorizontalParentPageId" class="@NavigationLocalHorizontalContainerClassList"> 1134 <ul class="justify-content-start nav"> 1135 @if ( Espresso.Item.NavigationLocalHeading != "" ) 1136 { 1137 <li class="e-nav-local-heading"> 1138 <h2>@Espresso.Item.NavigationLocalHeading</h2> 1139 </li> 1140 } 1141 @RenderNavigation( new 1142 { 1143 id = "dwnav-local-horizontal-" + NavigationLocalHorizontalParentPageId, 1144 parentid = NavigationLocalHorizontalParentPageId, 1145 template = NavigationLocalHorizontalTemplate, 1146 startlevel = Espresso.Item.NavigationLocalLevelStart, 1147 endlevel = Espresso.Item.NavigationLocalLevelEnd, 1148 expandmode = Espresso.Item.NavigationLocalPageTreeExpand == "True" ? "all" : "path" 1149 } ) 1150 </ul> 1151 </nav> 1152 </div> 11531154 </div> 1155 </div> 1156 </div> 1157 </div> 1158 </section> 1159 } 116011611162 @{ 1163 int NavigationLocalVerticalParentPageId = 0; 1164 if ( !string.IsNullOrEmpty( Espresso.Item.NavigationLocalParentPage ) ) 1165 { 1166 int.TryParse( Espresso.Item.NavigationLocalParentPage, out NavigationLocalVerticalParentPageId ); 1167 } 1168 if ( NavigationLocalVerticalParentPageId == 0 ) 1169 { 1170 NavigationLocalVerticalParentPageId = PageView.Current().Page.ID; 1171 if ( !Dynamicweb.Services.Pages.GetPagesByParentID( NavigationLocalVerticalParentPageId ).Any() ) 1172 { 1173 NavigationLocalVerticalParentPageId = PageView.Current().Page.ParentPageId; 1174 } 1175 } 11761177 string NavigationLocalVerticalClassList = "e-nav-local e-nav-local-vertical js-e-nav-local-vertical"; 1178 string NavigationLocalVerticalContainerClassList = "e-nav-local-container"; 1179 string NavigationLocalVerticalTemplate = "local-" + Espresso.Item.NavigationLocalLayout + ".xslt"; 1180 if ( string.IsNullOrEmpty( Espresso.Item.NavigationLocalTemplate ) == false && Path.GetExtension( Espresso.Item.NavigationLocalTemplate ) == ".xslt" ) 1181 { 1182 NavigationLocalVerticalTemplate = Path.GetFileName( Espresso.Item.NavigationLocalTemplate ); 1183 } 11841185 if ( Espresso.Item.NavigationLocalShow == "True" && Espresso.Item.NavigationLocalLayout == "vertical" ) 1186 { 1187 NavigationLocalVerticalClassList += " " + Espresso.Item.NavigationLocalCustomClasses; 11881189 if ( Espresso.Item.NavigationLocalMarginTop != "0" && Espresso.Item.NavigationLocalMarginTop != "" ) 1190 { 1191 NavigationLocalVerticalClassList += " mt-" + Espresso.Item.NavigationLocalMarginTop; 1192 } 1193 if ( Espresso.Item.NavigationLocalMarginBottom != "0" && Espresso.Item.NavigationLocalMarginBottom != "" ) 1194 { 1195 NavigationLocalVerticalClassList += " mb-" + Espresso.Item.NavigationLocalMarginBottom; 1196 } 11971198 if ( Espresso.Item.NavigationLocalSticky == "True" ) 1199 { 1200 NavigationLocalVerticalClassList += " is-sticky"; 1201 } 12021203 if ( Espresso.Item.NavigationLocalAbsolute == "True" ) 1204 { 1205 NavigationLocalVerticalClassList += " is-absolute"; 1206 } 1207 else 1208 { 1209 Espresso.ContentSection.ClassList.Clear(); 1210 Espresso.ContentSection.ClassList.AddClasses( "wtf col-12 col-lg-9 ml-auto" ); 1211 } 1212 } 1213 } 12141215 @if ( Espresso.Item.NavigationLocalShow == "True" && Espresso.Item.NavigationLocalLayout == "vertical" ) 1216 { 1217 <section class="e-section @NavigationLocalVerticalClassList"> 1218 <div class="container-fluid"> 1219 <div class="row"> 1220 <div class="col-12"> 1221 <div class="row"> 12221223 <div class="col-3"> 1224 <nav id="dwnav-local-@NavigationLocalVerticalParentPageId" class="@NavigationLocalVerticalContainerClassList"> 1225 <ul class="flex-column nav"> 1226 @if ( Espresso.Item.NavigationLocalHeading != "" ) 1227 { 1228 <li class="e-nav-local-heading"> 1229 <h2>@Espresso.Item.NavigationLocalHeading</h2> 1230 </li> 1231 } 1232 @RenderNavigation( new 1233 { 1234 id = "dwnav-local-" + NavigationLocalVerticalParentPageId, 1235 parentid = NavigationLocalVerticalParentPageId, 1236 template = NavigationLocalVerticalTemplate, 1237 startlevel = Espresso.Item.NavigationLocalLevelStart, 1238 endlevel = Espresso.Item.NavigationLocalLevelEnd, 1239 expandmode = Espresso.Item.NavigationLocalPageTreeExpand == "True" ? "all" : "path", 1240 } ) 1241 </ul> 1242 </nav> 1243 </div> 12441245 </div> 1246 </div> 1247 </div> 1248 </div> 1249 </section> 1250 } 125112521253 @sectionStart() 1254 @GetValue("DwContent(dwcontentmain)") 1255 @sectionEnd() 1256 </article> 1257 </main> 1258 @using Dynamicweb.Frontend 1259 @{ 1260 string FooterContentClassList = "e-footer-content e-section"; 12611262 bool isOutlet = shopType == "Outlet"; 1263 } 1264 @if ( Espresso.Item.FooterHide != "True" ) 1265 { 1266 <footer class="e-footer"> 1267 <article class="e-footer-wrapper"> 1268 <section class="@FooterContentClassList"> 1269 <div class="container-fluid"> 1270 <div class="row"> 1271 @if ( !string.IsNullOrEmpty( Espresso.Area.Item.FooterPageId ) ) 1272 { 1273 @RenderPageContent( int.Parse( Espresso.Area.Item.FooterPageId ) ) 1274 } 1275 </div> 1276 </div> 1277 </section> 1278 @if (!isOutlet) 1279 { 1280 <section class="e-footer-copyright e-section"> 1281 <div class="container-fluid"> 1282 <div class="align-items-baseline row"> 1283 <div class="col-12 col-lg-5"> 1284 @if (string.IsNullOrEmpty(Espresso.Area.Item.Adresse) == false) 1285 { 1286 @Espresso.Area.Item.Adresse 1287 } 1288 </div> 12891290 <div class="col-12 col-lg-4"> 1291 @if (string.IsNullOrEmpty(GetString("DwNavigation(dwnavutilitiessecondaryfooter)")) == false) 1292 { 1293 <div class="col-12 p-0"> 1294 <aside class="e-nav-utilities-secondary"> 1295 <ul class="nav nav-inline"> 1296 @GetValue("DwNavigation(dwnavutilitiessecondaryfooter)") 1297 </ul> 1298 </aside> 1299 </div> 1300 } 1301 </div> 130213031304 <div class="col-12 col-lg-3 text-lg-right"> 1305 <p class="e-copyright nav-link"> 1306 @*@Translate( "Footer - Copyright - Text", "Copyright &copy;" )&nbsp;*@ 1307 @*@DateTime.Now.Year.ToString()&nbsp;*@ 1308 @Translate("Footer - All Rights Reserved - Text", "All rights reserved.")&nbsp; 1309 @Espresso.Area.Item.CompanyName.&nbsp; 1310 </p> 1311 </div> 1312 </div> 1313 </div> 1314 </section> 1315 } 1316 </article> 1317 </footer> 1318 } 1319 @if( string.IsNullOrEmpty( GetString("DwContent(dwcontentcta)") ) == false ) { 1320 <aside id="dwcontentcta" class="js-e-cta e-cta is-hidden fixed-top"> 1321 <section class="e-section"> 1322 <div class="container-fluid"> 1323 <div class="row no-gutters"> 1324 <div class="col-12"> 1325 <div class="row no-gutters justify-content-center align-items-center"> 1326 @GetValue("DwContent(dwcontentcta)") 1327 @* <p><a class="d-flex align-items-center justify-content-center justify-content-lg-left text-black text-decoration-none small" href="/bliv-ringet-op"><i class="material-icons material-icons-large text-primary mr-1">phone</i>Bliv ringet op</a></p> *@ 1328 </div> 1329 </div> 1330 </div> 1331 </div> 1332 </section> 1333 </aside> 1334 } 13351336 @using Dynamicweb.Frontend 13371338 @{ 1339 string cartUrl = "/cart"; 13401341 if ( PageView.Current().Area.Name.Contains( "webshop" ) == false ) 1342 { 1343 cartUrl = string.Format("{0}{1}", PageView.Current().Area.Name, cartUrl); 1344 } 1345 else 1346 { 1347 cartUrl = string.Format("{0}/shop{1}", PageView.Current().Area.Name.ToLower(), cartUrl); 1348 } 13491350 var ShopType = PageView.Current().Area.Item["ShopType"]; 1351 } 1352 <div class="e-cart-msg modal fade small" id="js-e-cart-msg" data-backdrop="false"> 1353 <div class="modal-dialog e-cart-msg-modal-dialog"> 1354 <div class="modal-content"> 1355 <div class="modal-header"> 1356 <h4 class="js-e-cart-msg-heading modal-title"> 1357 <i class="material-icons material-icons-large text-success">check_circle</i> 1358 <span>@Translate( "eCom Cart - Product Added - Heading", "Added to your cart" )</span> 1359 </h4> 1360 <button class="close" data-dismiss="modal" type="button"> 1361 <i class="material-icons">close</i> 1362 </button> 1363 </div> 1364 <div class="modal-body"> 1365 <div class="js-e-cart-msg-content"> 1366 <script id="js-e-handlebars-tmpl-cart-msg-lastadded" type="text/x-handlebars-template"> 1367 <div class="row"> 1368 {{#each cart.lastAdded}} 1369 <div class="col-12 py-1"> 1370 <div class="row"> 1371 <div class="col-4"> 1372 <a class="" href="{{url}}"> 1373 <img alt="" class="img-fluid" src="{{imageDefault}}"> 1374 </a> 1375 </div> 1376 <div class="col-8"> 1377 <h3 class="mb-0"> 1378 <a href="{{url}}" class="text-decoration-none">{{name}}</a> 1379 </h3> 1380 <p class="mb-0"> 1381 <a href="{{url}}" class="text-auto text-decoration-none"> 1382 {{{price}}} 1383 @if (ShopType?.ToString() != "B2C") 1384 { 1385 <span> 1386 <br> 1387 {{{stock.text}}}<br> 1388 {{{stock.delivery}}}<br> 1389 </span> 1390 } 13911392 </a> 1393 </p> 1394 </div> 1395 </div> 1396 </div> 1397 {{/each}} 1398 </div> 1399 </script> 1400 </div> 1401 </div> 1402 <div class="bg-info e-cart-msg-footer modal-footer border-top-0"> 1403 <a class="btn btn-secondary mr-1" href="/" data-dismiss="modal">@Translate( "eCom Cart - Continue Shopping - Button", "Continue shopping" )</a> 1404 <a class="arrow-right btn btn-primary" href="@cartUrl">@Translate( "eCom Cart - Checkout - Button", "Checkout" )</a> 1405 </div> 1406 </div> 1407 </div> 1408 </div> 14091410 </div> 14111412 @using Co3.Espresso.Base.Extensions 1413 @using Co3.Espresso.Website.Services 1414 @using Dynamicweb.Frontend 14151416 <div class="modal fade e-search js-e-search js-e-search-modal modal-fullscreen" data-backdrop="false" data-keyboard="true" data-focus="true"> 1417 <div class="modal-dialog"> 1418 <div class="modal-content"> 141914201421 <div class="modal-header"> 1422 <a class="btn btn-sm btn-secondary js-e-back-link arrow-left" href="/" data-dismiss="modal"> 1423 @Translate("Search - Back button", "Back") 1424 </a> 1425 <div class="e-logo"> 1426 <a href="/" class="e-logo-link my-0"> 1427 <img src="@logoPrimary" class="e-logo-img e-logo-img-primary" alt="@Espresso.Area.Item.CompanyName"> 1428 <img src="@logoSecondary" class="e-logo-img e-logo-img-secondary" alt="@Espresso.Area.Item.CompanyName"> 1429 </a> 1430 </div> 1431 </div> 14321433 <div class="modal-body"> 14341435 <div class="container-fluid"> 14361437 <div class="e-search-form-container"> 1438 <div class="row justify-content-center"> 1439 <div class="col-12 col-md-10 col-lg-8 col-xl-6 mt-3"> 1440 <form action="" class="e-search-form js-e-search-form"> 1441 <div class="js-e-search-input-group e-search-input-group is-empty"> 1442 <label class="e-search-label" for="e-search-input"><i class="material-icons">search</i></label> 1443 @{ string Translate_Search_InputText = Translate("Search - Input Placeholder - Text", "Search"); } 1444 <input type="text" class="js-e-search-input e-search-input form-control-plaintext border-0" name="q" id="e-search-input" placeholder="@Translate_Search_InputText"> 1445 <span class="js-e-search-clear e-search-clear"><i class="material-icons">close</i></span> 1446 <button class="e-search-submit btn btn-primary" type="submit"><i class="material-icons">search</i></button> 1447 </div> 1448 </form> 1449 </div> 1450 </div> 1451 </div> 14521453 <div class="js-e-search-result-container e-search-result-container"> 14541455 <div class="row justify-content-center"> 1456 <div class="col-12 col-md-10 col-lg-8 col-xl-6"> 1457 <p class="e-search-result-info small text-muted mt-1 mb-3"><span class="js-e-search-result-count">0</span> @Translate("Search - Result Count - Text", "results")</p> 1458 </div> 1459 </div> 14601461 <div class="row justify-content-center"> 1462 <div class="col-12 col-xl-10"> 1463 <div class="js-e-search-result-products e-search-result-products is-empty mb-4"> 1464 @{string productlistItemClassList = ProductlistService.Instance.GetGridItemWidth(null).ToResponsiveClasses();} 1465 <script id="js-e-handlebars-tmpl-search-result-item-product" type="text/x-handlebars-template"> 1466 <div class="e-products"> 1467 <div class="row justify-content-center"> 1468 {{#each products}} 1469 <div class="@productlistItemClassList"> 1470 <div class="card border-1 mb-6"> 1471 <a href="{{url}}"> 1472 @if (Espresso.Item.ModelProductlist == "True") 1473 { 1474 <img src="{{productlistDetailImage}}" alt="{{name}}" class="col-12 p-0"> 1475 } 1476 else 1477 { 1478 <img src="{{imageDefault}}" alt="{{name}}" class="col-12 p-0"> 1479 } 1480 {{#if news}} 1481 <div class="isabella-product-item-news"> 1482 @Translate("Ecom Product - News Badge - Text", "Nyhed") 1483 </div> 1484 {{/if}} 1485 </a> 1486 <div class="card-body p-1 p-lg-3"> 1487 <h4 class="e-products-item-name mb-0"> 1488 <a href="{{url}}"> 1489 {{{name}}} 1490 </a> 1491 </h4> 1492 {{#if shortDescription}} 1493 {{{shortDescription}}} 1494 {{/if}} 1495 @* @if (PageView.Current().Area.Name.Contains("webshop") != false) 1496 { 1497 <p class="e-products-item-text mt-2 mb-0 @Co3.Isabella.Dw.Services.ProductService.Instance.GetNoBuyB2CandB2B()" style="display: flex"> 1498 <small class="e-products-item-price small"> 1499 <a href="{{url}}" class="text-dark" style="text-decoration: none"> 1500 {{#if pimActive}}{{{price}}}{{else}}@Translate("eCom Product - Add To Cart Form Table - Accessory Discontinued - Text", "Udgået"){{/if}} 1501 </a> 1502 </small> 1503 <a href="{{url}}" style="left: 0" class="isabella-arrow arrow-primary-small ml-auto"></a> 1504 </p> 1505 } 1506 *@ 1507 </div> 1508 </div> 1509 </div> 1510 {{/each}} 1511 </div> 1512 <p class="js-e-search-products-show-all text-center"><a href="" class="btn btn-secondary px-6">@Translate("Search - View All Products - Button", "View All Products")</a></p> 1513 </div> 1514 </script> 1515 </div> 1516 </div> 1517 </div> 15181519 <div class="row justify-content-center"> 1520 <div class="col-12 col-md-10 col-lg-8 col-xl-6"> 1521 <div class="js-e-search-result-pages e-search-result-pages is-empty mb-3"> 1522 <script id="js-e-handlebars-tmpl-search-result-item-page" type="text/x-handlebars-template"> 1523 <div class="row"> 1524 {{#each pages}} 1525 <div class="col-12"> 1526 <p class="mb-0"><a href="{{{url}}}" class="text-bold">{{{title}}}</a></p> 1527 <p class="mb-0 small text-truncate"> 1528 <a href="{{{url}}}" class="text-auto text-muted text-decoration-none"><span class="d-none d-sm-inline">@HttpContext.Current.Request.Url.Host</span>{{{url}}}</a></p> 1529 <p class="small">{{{text}}}...</p> 1530 </div> 1531 {{/each}} 1532 </div> 1533 </script> 1534 </div> 1535 </div> 1536 </div> 15371538 <div class="js-e-search-loading-overlay e-loading-overlay e-search-loading-overlay"> 1539 <div class="e-loading-spinner"></div> 1540 </div> 15411542 </div> 15431544 </div> 1545 </div> 1546 </div> 1547 </div> 1548 </div> 15491550 @if( Espresso.Area.Item.BackToTopLink == "True" ){ 1551 <a href="#top" class="e-back-to-top js-e-back-to-top"><i class="material-icons">keyboard_arrow_up</i></a> 1552 } 155315541555 @* @using System.Web; 1556 @inherits Co3.Espresso.Website.TemplateBases.Pages.PageBase 15571558 @{ 1559 HttpCookie optInLevel = HttpContext.Current.Request.Cookies[ "Dynamicweb.CookieOptInLevel" ]; 1560 bool showCookieWarning = optInLevel == null; 1561 if ( optInLevel != null ) 1562 { 1563 showCookieWarning = optInLevel.Value != "2"; 1564 } 1565 } 15661567 @if ( showCookieWarning ) 1568 { 1569 <div class="e-cookie js-e-cookie py-1" hidden=""> 1570 <aside class="e-cookie-wrapper"> 1571 <section class="e-section"> 1572 <div class="container-fluid"> 1573 <div class="align-items-center row"> 1574 <div class="col-12 col-lg-10 col-md-9 my-1"> 1575 <p class="line-height-sm mb-0 small text-center text-md-left"> 1576 <span class="d-md-inline d-none"> 1577 @Translate( "Cookie Warning - Message Long - Text", "This website uses cookies to provide necessary site functionality and improve your experience. By using our website, you agree to our" ) 1578 </span> 1579 <span class="d-md-none"> 1580 @Translate( "Cookie Warning - Message Short - Text", "This website uses cookies to improve your experience. Learn more about our" ) 1581 </span> 1582 &nbsp; 1583 <a href="@Espresso.Area.Item.CookieMessage">@Translate( "Cookie Warning - Policy - Link", "cookie policy" )</a> 1584 </p> 1585 </div> 1586 <div class="col-12 col-lg-2 col-md-3 my-1"> 1587 <p class="mb-0 text-center text-md-right"> 1588 <button class="btn e-cookie-accept-btn js-e-cookie-accept-btn" type="button"> 1589 @Translate( "Cookie Warning - Accept - Button", "OKAY" ) 1590 </button> 1591 </p> 1592 </div> 1593 </div> 1594 </div> 1595 </section> 1596 </aside> 1597 </div> 1598 } 15991600 @if ( 1 == 2 ) 1601 { 1602 @GetValue( "DwCookieWarning" ) 1603 } 16041605 *@ 16061607 <script data-cookieconsent="ignore" async="" src="/Files/Templates/Designs/isabella/_assets/_dist/js/default.js?v=3.1.2"></script> 1608 <script> 16091610 window.dataLayer.push({ 1611 'event':'ipEvent', 1612 'ipAddress' : '@Dynamicweb.Context.Current.Request.UserHostAddress' 1613 }); 1614 </script> 1615 </body> 16161617 @GetValue( "CopyRightNotice" ) 1618 </html> 1619