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_b87677ce0d5144dc8f0cd400eba6b49d.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.09" 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 @if (isProductPage)
68 {
69 @RenderSnippet( "ProductOpenGraph" )
70 }
71 else
72 {
73 <meta property="og:title" content="@openGraphTitle">
74 <meta property="og:description" content="@openGraphDescription">
75 <meta property="og:image" content="@openGraphImage">
76 }
77 <meta property="og:url" content="@openGraphUrl">
78 <meta property="og:type" content="website">
79 80 <meta name="facebook-domain-verification" content="8kymtn6m9jq0t3gqsk3y6dqbadc3qf">
81 @if ( string.IsNullOrEmpty( Espresso.Area.Item.GoogleSiteVerification ) == false )
82 {
83 <meta name="google-site-verification" content="@Espresso.Area.Item.GoogleSiteVerification">
84 }
85 @{
86 if ( 1 == 2 )
87 {
88 @GetValue( "Stylesheets" )
89 }
90 }
91 92 @inherits Co3.Espresso.Website.TemplateBases.Pages.PageBase
93 @using System.Web;
94 @using System.IO
95 @using Dynamicweb.Content
96 @using Dynamicweb.Content.Items
97 @using Dynamicweb.Rendering
98 @using Dynamicweb.Frontend
99100 <!-- Hreflang -->
101 @{
102 @* Get areas from service *@
103 Dynamicweb.Content.AreaService areaService = new Dynamicweb.Content.AreaService();
104 IList<Area> areas = areaService.GetAreas();
105 @* Get current page's relation-text from page-item *@
106 string currentPageRelation = PageView.Current().Page.Item["PageRelation"] != null ? PageView.Current().Page.Item["PageRelation"].ToString() : string.Empty;
107 @* Frontpage must have 'frontpage' as relation-text *@
108109 string frontpageRelation = "i-frontpage";
110 int REDIRECT_ID = 1;
111 if (PageView.Current().Area.Item["CustomWebsite"] != null && PageView.Current().Area.Item["CustomWebsite"].ToString() == "timeout-website")
112 {
113 frontpageRelation = "t-frontpage";
114 REDIRECT_ID = 63;
115 }
116 if (PageView.Current().Area.Item["CustomWebsite"] != null && PageView.Current().Area.Item["CustomWebsite"].ToString() == "camplet-website")
117 {
118 frontpageRelation = "c-frontpage";
119 REDIRECT_ID = 76;
120 }
121 string domainBase = areas.FirstOrDefault( a => a?.ID == REDIRECT_ID ).DomainLock;
122 List<dynamic> areaInfoList = new List< dynamic >();
123124 @* Iterate areas *@
125 foreach ( Area area in areas )
126 {
127 if ( area.Active == true && area.ID != REDIRECT_ID )
128 {
129130 @* Get current area's culture *@
131 string culture = area.Culture;
132 string name = area.Name;
133 @* Check for IsDefault Hreflang on area *@
134 string isDefaultHrefLang = area.Item[ "IsDefaultHrefLang" ] != null ? area.Item[ "IsDefaultHrefLang" ].ToString() : string.Empty;
135 @* Check for override-culture text on area *@
136 string hreflangCultureOverride = area.Item[ "HreflangLanguageOverride" ] != null ? area.Item[ "HreflangLanguageOverride" ].ToString() : string.Empty;
137138 string isWebsiteExcluded = area.Item["ExcludeFromHreflang"] != null ? area.Item["ExcludeFromHreflang"]?.ToString() : string.Empty;
139 @* Get scheme and domain *@
140 string scheme = GetGlobalValue("Global:Request.Scheme");
141 string domain = domainBase;
142 @* If we have a primary domain call pageservice and get pages *@
143144 string productId = HttpContext.Current.Request[ "productid" ];
145 if (string.IsNullOrEmpty(productId) == false)
146 {
147 if (PageView.Current().Page.Parent != null && PageView.Current().Page.Parent.Item != null && PageView.Current().Page.Parent.Item["PageRelation"] != null)
148 {
149 currentPageRelation = PageView.Current().Page.Parent.Item["PageRelation"].ToString();
150 }
151152 }
153154 if ( string.IsNullOrEmpty(currentPageRelation) == false && string.IsNullOrEmpty(domain) == false )
155 {
156157158 Dynamicweb.Content.PageService pageService = new Dynamicweb.Content.PageService();
159 IEnumerable< Dynamicweb.Content.Page > pages = pageService.GetPagesByAreaID(area.ID);
160 @* Iterate pages in area - check if is active + has item + has item-pagerelation + item-pagerelation equals current pagerelation *@
161 foreach ( Dynamicweb.Content.Page page in pages.Where(p => p.Published && p.Item != null && p.Item[ "PageRelation" ] != null && p.Item[ "PageRelation" ].ToString().Equals(currentPageRelation)) )
162 {
163164 string url = string.Empty;
165 if ( string.IsNullOrEmpty(productId) == false )
166 {
167 @* Build url to area product page *@
168 string prodUrl = string.Format("Default.aspx?ID={0}&ProductId={1}", pageService.GetPagesByParentID(page.ID)?.FirstOrDefault()?.ID, productId);
169 url = string.Format("{0}://{1}{2}", scheme, domain, SearchEngineFriendlyURLs.GetFriendlyUrl(prodUrl, area.EcomLanguageId));
170 }
171 else
172 {
173 @* Build url to area page *@
174 url = string.Format("{0}://{1}{2}", scheme, domain, SearchEngineFriendlyURLs.GetFriendlyUrl(page.GetPageHrefValue()));
175 }
176 @* If our current page relation match frontpage - set link to domain only *@
177 if ( currentPageRelation == frontpageRelation )
178 {
179 url = string.Format("{0}://{1}/{2}", scheme, domain, name);
180 }
181182 @* If our area item has checked in Default hreflang, we render x-default link *@
183 if ( isDefaultHrefLang == "True" )
184 {
185 <link rel="alternate" hreflang="x-default" href="@url">
186 }
187 @* If we have a value in the area-item to overrule the culture, override the value here *@
188 if ( string.IsNullOrEmpty(hreflangCultureOverride) == false )
189 {
190 culture = hreflangCultureOverride;
191 }
192 @* Render hreflang-link *@
193 if ( isWebsiteExcluded != "True")
194 {
195 <link rel="alternate" hreflang="@culture.ToLower()" href="@url">
196 }
197198 }
199 }
200 }
201 }
202203 }
204 <!-- End Hreflang -->
205206 @if (!isCamplet)
207 {
208 <!-- Google Tag Manager -->
209 <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>
210 <!-- End Google Tag Manager -->
211 }
212 else
213 {
214 if ( string.IsNullOrEmpty( Espresso.Area.GoogleTagManagerID ) == false && Espresso.Area.GoogleTagManagerID != "GTM-XXXX" )
215 {
216 <!-- Google Tag Manager -->
217 <script>
218 (function(w, d, s, l, i) {
219 w[l] = w[l] || [];
220 w[l].push({
221 'gtm.start':
222 new Date().getTime(),
223 event: 'gtm.js'
224 });
225 var f = d.getElementsByTagName(s)[0],
226 j = d.createElement(s),
227 dl = l != 'dataLayer' ? '&l=' + l : '';
228 j.async = true;
229 j.src =
230 'https://www.googletagmanager.com/gtm.js?id=' + i + dl;
231 f.parentNode.insertBefore(j, f);
232 })(window, document, 'script', 'dataLayer', '@Espresso.Area.GoogleTagManagerID');
233 </script>
234 <!-- End Google Tag Manager -->
235 }
236 }
237238239240241 <meta name="p:domain_verify" content="f3602094bd5d9d79dad3925721bc1ae4">
242 <meta name="msvalidate.01" content="DF1E6C310BF3052B5579FABC80E4444D">
243 <!-- ActiveCampaign -->
244 <script type="text/javascript" defer="">
245246 (function(e,t,o,n,p,r,i){e.visitorGlobalObjectAlias=n;
247 e[e.visitorGlobalObjectAlias]=e[e.visitorGlobalObjectAlias]||function(){(e[e.visitorGlobalObjectAlias].q=e[e.visitorGlobalObjectAlias].q||[]).push(arguments)};
248 e[e.visitorGlobalObjectAlias].l=(new Date).getTime();
249 r=t.createElement("script");
250 r.src=o;r.async=true;
251 i=t.getElementsByTagName("script")[0];
252 i.parentNode.insertBefore(r,i)})(window,document,"https://diffuser-cdn.app-us1.com/diffuser/diffuser.js","vgo");
253 vgo('setAccount', '254430349');
254 vgo('setTrackByDefault', true);
255 vgo('process');
256 </script>
257 <!-- ActiveCampaign -->
258259260 </dynamic></head>
261262 <body class="@Espresso.Item.CustomClasses @customWebsite @isOutletClass" data-cart-currencycode="@Context.Currency.Code" data-shop-currencycode="@Pageview.Area.EcomCurrencyId" data-userauthenticated="@isUserAuthenticated.ToString().ToLower()">
263264 @if (!isCamplet)
265 {
266 <!-- Google Tag Manager (noscript) -->
267 <noscript><iframe src="https://ss.isabella.net/ns.html?id=GTM-TT2Z6XF" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
268 <!-- End Google Tag Manager (noscript) -->
269 }
270 else
271 {
272 if ( string.IsNullOrEmpty( Espresso.Area.GoogleTagManagerID ) == false && Espresso.Area.GoogleTagManagerID != "GTM-XXXX" )
273 {
274 <!-- Google Tag Manager (noscript) -->
275 <noscript>
276 <iframe src="https://www.googletagmanager.com/ns.html?id=@Espresso.Area.GoogleTagManagerID" height="0" width="0" style="display: none; visibility: hidden"></iframe>
277 </noscript>
278 <!-- End Google Tag Manager (noscript) -->
279 }
280 }
281282 @using Dynamicweb.Frontend
283 @inherits Co3.Espresso.Website.TemplateBases.Pages.PageBase
284 @{
285 Espresso.Canvas.ClassList.AddClasses( "js-e-canvas is-loading" );
286 if ( Espresso.Item.CanvasFullscreen == "True" )
287 {
288 Espresso.Canvas.ClassList.AddClasses( "is-fullscreen" );
289 }
290291 }
292293294295 @using System.Globalization
296 @using System.Security.Cryptography.X509Certificates
297 @using System.Web.Razor.Parser.SyntaxTree
298 @using Co3.Espresso.Base.Extensions
299 @using Co3.Espresso.Website.Models.FrontEnd
300 @using Co3.Espresso.Website.Services
301 @using Co3.Isabella.Dw.Models.FrontEnd.Ecommerce
302 @using Dynamicweb.Content
303 @using Dynamicweb.Ecommerce.Products
304 @using Dynamicweb.Frontend
305 @using Dynamicweb.Rendering
306 @using Dynamicweb.Rendering.Translation
307 @using Dynamicweb.SystemTools
308 @using EcomContext = Dynamicweb.Ecommerce.Common.Context
309 @using eProductService = Co3.Espresso.Website.Services.ProductService
310 @using Page = Dynamicweb.Content.Page
311 @using PageService = Dynamicweb.Content.PageService
312313 @functions {
314315 public string getCountryCodeFromArea(Area area)
316 {
317 RegionInfo regionInfo = new RegionInfo( area.CultureInfo.LCID );
318 return regionInfo.TwoLetterISORegionName;
319 }
320321 public string getCheckoutSetup(string shopType = "")
322 {
323 bool isB2bCheckout = PageView.Current().User != null;
324 if (isB2bCheckout)
325 {
326 return "shipping,customer,approve";
327 } else if (shopType == "B2C")
328 {
329 return "shipping,payment,approve";
330 } else if (shopType == "Outlet")
331 {
332 return "shipping,customer,payment,approve";
333 }
334335 return "customer,approve";
336 }
337338 public static string GetStandardCollapseToggleTextExpand()
339 {
340 return "Se mere";
341 }
342343 public static string GetStandardCollapseToggleTextCollapse()
344 {
345 return "Se mindre";
346 }
347348 public string getModelTypeLink()
349 {
350 bool isUserAuthenticated = PageView.Current().User != null;
351 string eComCountryCode = PageView.Current().Area.Item[ "EcommerceCountryCode" ] != null ? PageView.Current().Area.Item[ "EcommerceCountryCode" ].ToString() : "";
352 string returnValue = string.Empty;
353354 if ( isUserAuthenticated == false )
355 {
356 if ( string.IsNullOrEmpty(eComCountryCode) == false)
357 {
358 {
359 returnValue = string.Format( "Ecom:Product.CategoryField.ModelType.ModelTypeLink_{0}.Value", eComCountryCode );
360 }
361 }
362 else
363 {
364 returnValue = "Ecom:Product.CategoryField.ModelType.ModelTypeLink.Value";
365 }
366 }
367 else
368 {
369 if ( string.IsNullOrEmpty(eComCountryCode) == false)
370 {
371 {
372 returnValue = string.Format( "Ecom:Product.CategoryField.ModelType.ModelTypeLinkB2B_{0}.Value", eComCountryCode );
373 }
374 }
375 else
376 {
377 returnValue = "Ecom:Product.CategoryField.ModelType.ModelTypeLinkB2B.Value";
378 }
379 }
380381 return returnValue;
382 }
383384 }
385386 @helper ProductDescription(string sectionClasses = "e-section", bool sectionCollapse = false, string contentClasses = null, string heading = null, string content = null, string collapseToggleTextExpand = null, string collapseToggleTextCollapse = null)
387 {
388 if ( string.IsNullOrEmpty( content ) == false )
389 {
390 ClassList headingClassList = new ClassList();
391 headingClassList.AddClasses( "col-12" );
392 ClassList contentClassList = new ClassList();
393 contentClassList.AddClasses( "col-12" );
394395 @sectionStart( sectionClasses: sectionClasses, sectionCollapse: sectionCollapse, contentClasses: contentClasses, collapseToggleTextCollapse: collapseToggleTextCollapse, collapseToggleTextExpand: collapseToggleTextExpand )
396397 if ( string.IsNullOrEmpty( heading ) == false )
398 {
399 <div class="@headingClassList">
400 <h2>@heading</h2>
401 </div>
402 }
403 <div class="@contentClassList">
404 @content
405 </div>
406407 @sectionEnd()
408 }
409 }
410411412 @helper ProductVideo(string sectionClasses = "e-section", string contentClasses = null, string heading = null, string videoURL = null)
413 {
414 if ( string.IsNullOrEmpty( videoURL ) == false )
415 {
416 ClassList headingClassList = new ClassList();
417 headingClassList.AddClasses( "col-12" );
418 ClassList contentClassList = new ClassList();
419 contentClassList.AddClasses( "col-12" );
420421422 @sectionStart( sectionClasses: sectionClasses, contentClasses: contentClasses )
423424 if ( string.IsNullOrEmpty( heading ) == false )
425 {
426 <div class="@headingClassList">
427 <h2>@heading</h2>
428 </div>
429 }
430431 <div class="@contentClassList">
432 <div class="embed-responsive embed-responsive-16by9 mb-2">
433 <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>
434 <div class="cookieconsent-optout-marketing">
435 <div>
436 <a class="btn btn-primary" href="javascript:Cookiebot.renew()">
437 @Dynamicweb.Rendering.Translation.Translation.GetTranslation("CookieBot - Video - accept marketing-cookies", PageView.Current().Area.Layout.Design)
438 </a>
439440 </div>
441 </div>
442 </div>
443 </div>
444 @sectionEnd()
445 }
446 }
447448 @helper ProductRelatedProducts(string sectionClasses = "e-section", bool sectionCollapse = false, string contentClasses = null, string heading = null, string content = null, string collapseToggleTextExpand = null, string collapseToggleTextCollapse = null,
449 IEnumerable< Product > productLoop = null)
450 {
451 if ( productLoop != null && productLoop.Any() == true )
452 {
453 ClassList headingClassList = new ClassList();
454 headingClassList.AddClasses( "col-12" );
455 ClassList contentClassList = new ClassList();
456 contentClassList.AddClasses( "col-12" );
457458 @sectionStart( sectionClasses: sectionClasses, sectionCollapse: sectionCollapse, contentClasses: contentClasses, collapseToggleTextCollapse: collapseToggleTextCollapse, collapseToggleTextExpand: collapseToggleTextExpand )
459460 if ( string.IsNullOrEmpty( heading ) == false )
461 {
462 <div class="@headingClassList">
463 <h4 class="isabella-text-bullets-left mb-3">@heading</h4>
464 </div>
465 }
466 <div class="@contentClassList">
467 <div class="e-products mb-2">
468 <div class="row">
469 @{
470 string productlistItemClassList = "col-12 col-sm-6 col-md-3 col-lg-3 col-xl-3";
471 }
472 @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) )
473 {
474 @ProductlistItem(product, productlistItemClassList)
475 }
476 </div>
477 </div>
478 </div>
479480 @sectionEnd()
481 }
482 }
483484485 @helper ProductlistItem(Product product, string productlistItemClassList = null, string isModelProductList = null)
486 {
487 Dynamicweb.Ecommerce.Products.ProductService dwProductService = new Dynamicweb.Ecommerce.Products.ProductService();
488 string shopType = PageView.Current().Area.Item["ShopType"]?.ToString();
489 string productLink = eProductService.Instance.GetProductLink( product.GetDefaultGroupByShopId( product.DefaultShopId ).Id, product.Id, product.VariantId );
490491492 productLink = SearchEngineFriendlyURLs.GetFriendlyUrl( productLink );
493494 if (shopType == "Outlet")
495 {
496 Page page = new PageService().GetPageByNavigationTag(PageView.Current().AreaID, "outletdisplaypage");
497 if (page != null)
498 {
499 productLink = SearchEngineFriendlyURLs.GetFriendlyUrl( $"Default.aspx?ID={page.ID}&productId={product.Id}" );
500 }
501502 }
503504 IsabellaProductImageUrl primaryImage = Co3.Isabella.Dw.Services.ProductService.Instance.GetImagePrimary(product);
505 List<IsabellaProductImageUrl> detailsImages = Co3.Isabella.Dw.Services.ProductService.Instance.GetImageDetails(product);
506 string detailsImage = detailsImages?.FirstOrDefault( pd => pd.Type == 0 && pd.GroupId == 4 )?.Medium ?? string.Empty;
507508 //string productlistDetailImage = product.Details.FirstOrDefault( pd => pd.Type == 0 && pd.GroupId == 4 )?.Value;
509510511512 string image = "/Files/Templates/Designs/isabella/_assets/img/NoImage.gif";
513514 if (primaryImage != null)
515 {
516 image = primaryImage.Medium;
517 }
518519 if ( product != null )
520 {
521 dynamic productData = new
522 {
523 id = product.Id,
524 url = productLink,
525 number = product.Number,
526 name = product.Name,
527 imageDefault = image,
528 price = Co3.Isabella.Dw.Services.ProductService.Instance.GetPrice( product.Id ).Format(),
529 priceClean = Co3.Isabella.Dw.Services.ProductService.Instance.GetPrice( product.Id ).Price,
530 productIntroText = product.GetCategoryValue( "ProductsGeneral", "ProductIntroText" )?.ToString(),
531 news = product.GetCategoryValue( "ProductsGeneral", "News" )?.ToString(),
532 productType = product.GetCategoryValue( "ProductsGeneral", "ProductType" )?.ToString(),
533 isModelProductList = isModelProductList,
534 productlistDetailImage = detailsImage,
535 shopType
536 };
537538 <div class="@productlistItemClassList">
539 <div class="border-1 card mb-6">
540 <a href="@productData.url">
541 @if ( productData.isModelProductList == "True" )
542 {
543 <img src="@productData.productlistDetailImage" alt="@productData.name @productData.productType" class="col-12 p-0">
544 }
545 else
546 {
547 <img src="@productData.imageDefault" alt="@productData.name @productData.productType" class="col-12 p-0">
548 }
549 @if ( productData.news == "True" )
550 {
551 <div class="isabella-product-item-news">
552 @Dynamicweb.Rendering.Translation.Translation.GetTranslation( "Ecom Product - News Badge - Text" )
553 </div>
554 }
555 </a>
556 <div class="card-body p-1 p-lg-3">
557 <h4 class="e-products-item-name mb-0">
558 <a href="@productData.url">
559 @productData.name
560 </a>
561 </h4>
562563 </div>
564 </div>
565 </div>
566 }
567 }
568569570 @helper sectionStart(string sectionClasses = "e-section", string contentClasses = null, bool sectionCollapse = false, string sectionId = null, string collapseToggleTextExpand = null, string collapseToggleTextCollapse = null)
571 {
572 sectionId = string.IsNullOrEmpty( sectionId ) ? Guid.NewGuid().ToString( "N" ) : sectionId;
573 ClassList sectionClassList = new ClassList();
574 sectionClassList.AddClasses( sectionClasses );
575 ClassList contentClassList;
576577 if ( contentClasses == null )
578 {
579 contentClassList = Co3.Espresso.Website.Services.PageService.Instance.GetResponsiveClassesFromPageItem( PageView.Current().Page.Item );
580 }
581 else
582 {
583 contentClassList = new ClassList();
584 contentClassList.AddClasses( contentClasses );
585 }
586587 // TODO: Split collapse logic into separate helper function.
588 string collapseId = Guid.NewGuid().ToString( "N" );
589 ClassList collapseToggleClassList = new ClassList();
590 if ( sectionCollapse )
591 {
592 sectionClassList.AddClasses( "p-section-collapse js-p-section-collapse" );
593 collapseToggleClassList.AddClasses( contentClasses );
594 collapseToggleClassList.AddClasses( "p-section-collapse-toggle collapsed order-last text-center" );
595 contentClassList.AddClasses( "p-section-collapse-content collapse is-md" );
596 }
597598 @:<section class="@sectionClassList" id="@sectionId">
599 @:<div class="container-fluid">
600 @:<div class="row">
601602 // TODO: Split collapse logic into separate helper function.
603 if ( sectionCollapse )
604 {
605 <div class="@collapseToggleClassList" data-toggle="collapse" data-target="#@collapseId">
606 <button class="btn btn-primary p-section-collapse-toggle-btn" type="button">
607 <i class="material-icons p-section-collapse-toggle-icon">keyboard_arrow_down</i>
608 </button>
609 <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>
610 </div>
611 }
612613 @:<div class="@contentClassList" id="@collapseId">
614 @:<div class="row">
615 }
616617 @helper sectionEnd()
618 {
619 @:</div>
620 @:</div>
621 @:</div>
622 @:</div>
623 @:</section>
624 }
625626627628629630 <div class="e-loading-overlay e-page-loading-overlay is-loading js-e-page-loading-overlay">
631 <svg class="e-loading-spinner isabella-loading-spinner-logo" viewbox="0 0 316.9 383">
632 <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
633 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
634 L264.2,150.9z"></path>
635 <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
636 C79.6,364.6,78.2,345.4,76.1,324.8"></path>
637 <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>
638 <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>
639 <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>
640 <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>
641 </svg>
642643644 </div>
645 @* https://medium.com/clio-calliope/making-google-fonts-faster-aadf3c02a36d *@
646 @SnippetStart("webfonts")
647 <link crossorigin="" href="https://fonts.gstatic.com/" rel="preconnect">
648 <link href="https://fonts.googleapis.com/css?family=IBM+Plex+Sans:400,700%7CMaterial+Icons" media="@Espresso.StylesheetAttributeMedia" rel="@Espresso.StylesheetAttributeRel" as="style">
649 @SnippetEnd("webfonts")
650651652653 <div class="@Espresso.Canvas.ClassList">
654 @using Co3.Espresso.Website.Models.FrontEnd
655 @using Dynamicweb.Ecommerce.Orders
656 @using Dynamicweb.Frontend
657 @using Dynamicweb.Frontend.Navigation
658 @{
659 ClassList headerClassList = new ClassList();
660 headerClassList.AddClasses( "e-header js-e-header is-sticky" );
661 if ( Espresso.Item.HeaderTransparent == "True" )
662 {
663 headerClassList.AddClasses( "is-transparent" );
664 }
665666 ClassList logoClassList = new ClassList();
667 logoClassList.AddClasses( "e-logo" );
668669 string backButtonLink = Espresso.Item.BackButtonLink;
670 ClassList backButtonClassList = new ClassList();
671 ClassList backButtonIconClassList = new ClassList();
672 if ( Espresso.Item.BackButton == "True" )
673 {
674 backButtonClassList.AddClasses( "btn btn-sm btn-secondary my-1 align-self-center" );
675 if ( backButtonLink == "" || backButtonLink == "/" )
676 {
677 backButtonLink = "/";
678 backButtonClassList.AddClasses( "js-e-back-link" );
679 }
680 backButtonIconClassList.AddClasses( "material-icons material-icons-large" );
681 if ( Espresso.Item.BackButtonPosition == "right" )
682 {
683 backButtonClassList.AddClasses( "mr-0 ml-auto order-last" );
684 logoClassList.AddClasses( "order-first" );
685 }
686 else
687 {
688 backButtonClassList.AddClasses( "order-first" );
689 logoClassList.AddClasses( "mr-0 ml-auto order-last" );
690 }
691 if ( Espresso.Item.BackButtonIcon == "arrow_back" )
692 {
693 backButtonClassList.AddClasses( "arrow-left" );
694 backButtonIconClassList.AddClasses( "d-none" );
695 }
696 else if ( Espresso.Item.BackButtonIcon == "arrow_forward" )
697 {
698 backButtonClassList.AddClasses( "arrow-right" );
699 backButtonIconClassList.AddClasses( "d-none" );
700 }
701 }
702703 string logoPrimary = Espresso.Area.Item.LogoPrimary;
704 string logoSecondary = Espresso.Area.Item.LogoSecondary;
705706 if ( string.IsNullOrEmpty( logoSecondary ) == true )
707 {
708 logoSecondary = logoPrimary;
709 }
710 string tagline = Espresso.Area.Item.Tagline;
711712 Dictionary< string, string > navigationHtml = new Dictionary< string, string >
713 {
714 {
715 "global", Navigation.RenderNavigation( "navigation/espresso.cshtml", new NavigationSettings()
716 {
717 StartLevel = 1,
718 StopLevel = 8,
719 ExpandMode = ExpandMode.All,
720 Parameters = new Dictionary< string, object >()
721 {
722 { "id", "dwnav-global" }
723 }
724 } )
725 },
726 {
727 "utilities-primary", Navigation.RenderNavigation( "navigation/espresso.cshtml", new NavigationSettings()
728 {
729 StartLevel = 4,
730 StopLevel = 5,
731 ExpandMode = ExpandMode.All,
732 RootNavigationTag = "utilities-primary",
733 Parameters = new Dictionary< string, object >()
734 {
735 { "id", "dwnav-utilities-primary" }
736 }
737 } )
738 },
739 {
740 "utilities-secondary", Navigation.RenderNavigation( "navigation/espresso.cshtml", new NavigationSettings()
741 {
742 StartLevel = 4,
743 StopLevel = 4,
744 ExpandMode = ExpandMode.All,
745 RootNavigationTag = "utilities-secondary",
746 Parameters = new Dictionary< string, object >()
747 {
748 { "id", "dwnav-utilities-secondary" }
749 }
750 } )
751 },
752 {
753 "hamburger-header", Navigation.RenderNavigation( "navigation/espresso.cshtml", new NavigationSettings()
754 {
755 StartLevel = 4,
756 StopLevel = 4,
757 ExpandMode = ExpandMode.All,
758 RootNavigationTag = "hamburger-header",
759 Parameters = new Dictionary< string, object >()
760 {
761 { "id", "dwnav-hamburger-header" }
762 }
763 } )
764 },
765 {
766 "hamburger-aside", Navigation.RenderNavigation( "navigation/espresso.cshtml", new NavigationSettings()
767 {
768 StartLevel = 4,
769 StopLevel = 4,
770 ExpandMode = ExpandMode.All,
771 RootNavigationTag = "hamburger-aside",
772 Parameters = new Dictionary< string, object >()
773 {
774 { "id", "dwnav-hamburger-aside" }
775 }
776 } )
777 }
778 };
779780 double cartQuantity = 0;
781 var areaCartContext = PageView.Current().Area.Item[ "ContextCart" ]?.ToString();
782783 Dynamicweb.Ecommerce.Common.Context.CartContext = OrderContext.GetOrderContextById(areaCartContext);
784 Order cart = Dynamicweb.Ecommerce.Common.Context.Cart;
785 if (cart != null )
786 {
787 cartQuantity = cart.get_ParentProductLineQuantityCount(cart.ProductOrderLines);
788 }
789 }
790791 @SnippetStart("CartQuantity")
792 @cartQuantity
793 @SnippetEnd("CartQuantity")
794795 @if ( Espresso.Item.HeaderHide != "True" )
796 {
797 <header class="@headerClassList" data-autohide="true">
798799 <div class="e-header-hamburger">
800 @sectionStart( "e-header-section e-section", "col-12" )
801 <div class="col-12 e-header-section-content">
802 <div class="@logoClassList">
803 <a class="e-logo-link" href="/@globalAreaName/">
804 <img src="@logoPrimary" class="e-logo-img e-logo-img-primary" alt="@Espresso.Area.Item.CompanyName">
805 <img src="@logoSecondary" class="e-logo-img e-logo-img-secondary" alt="@Espresso.Area.Item.CompanyName">
806 @if ( string.IsNullOrEmpty( tagline ) == false )
807 {
808 <p class="e-logo-tagline">@tagline</p>
809 }
810 </a>
811 </div>
812 @if ( Espresso.Item.NavigationHide != "True" )
813 {
814 <section class="e-nav-hamburger-header">
815 <ul class="nav">
816 @navigationHtml[ "hamburger-header" ]
817 @* TODO: Move to xslt *@
818 <li class="e-nav-item-hamburger-open nav-item">
819 <a class="nav-link" data-target=".modal.e-nav" data-toggle="modal" href="#">
820 <i class="e-nav-pageicon material-icons">menu</i>
821 <span class="e-nav-pagename">@Translate( "Header - Hamburger menu open - Button", "Menu" )</span>
822 </a>
823 </li>
824 </ul>
825 </section>
826 }
827 @if ( Espresso.Item.BackButton == "True" )
828 {
829 <a class="@backButtonClassList" href="@backButtonLink">
830 @if ( Espresso.Item.BackButtonIcon != "" )
831 {
832 <i class="@backButtonIconClassList">@Espresso.Item.BackButtonIcon</i>
833 }
834 @Espresso.Item.BackButtonText
835 </a>
836 }
837 </div>
838 @sectionEnd()
839 </div>
840 <div class="e-nav js-e-nav modal p-0" data-backdrop="false">
841 <div class="e-nav-container navbar flex-column d-flex">
842843 @sectionStart( "e-header-section e-header-section-primary e-section order-xl-2", "col-12" )
844 <div class="col-12 e-header-section-content">
845 <div class="@logoClassList">
846 <a class="e-logo-link" href="/@globalAreaName/">
847 <img src="@logoPrimary" class="e-logo-img e-logo-img-primary" alt="@Espresso.Area.Item.CompanyName">
848 <img src="@logoSecondary" class="e-logo-img e-logo-img-secondary" alt="@Espresso.Area.Item.CompanyName">
849 @if (string.IsNullOrEmpty(tagline) == false)
850 {
851 <p class="e-logo-tagline">@tagline</p>
852 }
853 </a>
854 </div>
855856 @if ( Espresso.Item.NavigationHide != "True" )
857 {
858 <nav class="e-nav-global js-e-nav-global">
859 <ul class="nav">
860 @navigationHtml[ "global" ]
861 </ul>
862 </nav>
863864 <div class="e-nav-item-hamburger-close">
865 <a class="nav-link" data-target=".modal.e-nav" data-toggle="modal" href="#">
866 <i class="e-nav-pageicon material-icons">close</i>
867 <span class="e-nav-pagename">@Translate( "Header - Hamburger menu close - Button", "Close" )</span>
868 </a>
869 </div>
870871 if ( string.IsNullOrEmpty( navigationHtml[ "utilities-primary" ] ) == false )
872 {
873 @:</div>
874 @sectionEnd()
875 @sectionStart( "e-header-section e-header-section-secondary e-section order-xl-1", "col-12" )
876 @:<div class="col-12 e-header-section-content">
877878 <nav class="e-nav-utilities-primary js-e-nav-utilities-primary">
879 <ul class="nav">
880 @navigationHtml[ "utilities-primary" ]
881 </ul>
882 </nav>
883 }
884885 if ( string.IsNullOrEmpty( navigationHtml[ "utilities-secondary" ] ) == false )
886 {
887 <nav class="e-nav-utilities-secondary">
888 <ul class="nav">
889 @navigationHtml[ "utilities-secondary" ]
890 </ul>
891 </nav>
892 }
893 if ( string.IsNullOrEmpty( navigationHtml[ "hamburger-aside" ] ) == false )
894 {
895 <nav class="e-nav-hamburger-aside">
896 <ul class="nav">
897 @navigationHtml[ "hamburger-aside" ]
898 </ul>
899 </nav>
900 }
901 }
902 @if ( Espresso.Item.BackButton == "True" )
903 {
904 <a class="@backButtonClassList" href="@backButtonLink">
905 @if ( Espresso.Item.BackButtonIcon != "" )
906 {
907 <i class="@backButtonIconClassList">@Espresso.Item.BackButtonIcon</i>
908 }
909 @Espresso.Item.BackButtonText
910 </a>
911 }
912 </div>
913 @sectionEnd()
914915 </div>
916 </div>
917918 </header>
919 }
920921 @helper GetSvgFileData(string svgfile)
922 {
923 string rtnValue = svgfile;
924 if (!string.IsNullOrEmpty(svgfile))
925 {
926 string FilePath = svgfile;
927928 if (System.IO.Path.GetExtension(FilePath) == ".svg")
929 {
930 System.Xml.XmlReaderSettings settings = new System.Xml.XmlReaderSettings();
931 settings.DtdProcessing = System.Xml.DtdProcessing.Ignore;
932 string svgFilePath = System.Web.HttpContext.Current.Server.MapPath(FilePath) ?? string.Empty;
933 if (System.IO.File.Exists(svgFilePath))
934 {
935 using (System.IO.StreamReader sr = new System.IO.StreamReader(svgFilePath))
936 {
937 using (System.Xml.XmlReader xr = System.Xml.XmlReader.Create(sr, settings))
938 {
939 bool done = false;
940 while (xr.Read() && !done)
941 {
942 if (xr.NodeType == System.Xml.XmlNodeType.Element && xr.Name == "svg")
943 {
944 rtnValue = xr.ReadOuterXml();
945 done = true;
946 }
947 }
948 }
949 }
950 }
951 }
952 }
953 @rtnValue;
954 }
955956957 @*General - Website Settings*@
958959 @if ( Espresso.Item.Notificationbar != "True" )
960 {
961 if ( !string.IsNullOrEmpty(Espresso.Area.Item.NotificationbarPageId) )
962 {
963 <section class="e-section">
964 <div class="container-fluid">
965 <div class="row">
966 <div class="col-12">
967 <div class="row">
968 @RenderPageContent(int.Parse(Espresso.Area.Item.NotificationbarPageId))
969 </div>
970 </div>
971 </div>
972 </div>
973 </section>
974 }
975 }
976977 @*Specific - Page*@
978979 @if ( !string.IsNullOrEmpty(Espresso.Item.NotificationbarPageId) )
980 {
981 <section class="e-section">
982 <div class="container-fluid">
983 <div class="row">
984 <div class="col-12">
985 <div class="row">
986 @RenderPageContent(int.Parse(Espresso.Item.NotificationbarPageId))
987 </div>
988 </div>
989 </div>
990 </div>
991 </section>
992 }
993 @using Dynamicweb.Frontend
994 @using Dynamicweb.Security.UserManagement
995 @{
996 User currentUser = PageView.Current().User;
997 if ( currentUser != null )
998 {
999 User currentSecondaryUser = currentUser.CurrentSecondaryUser;
1000 if ( currentSecondaryUser != null )
1001 {
1002 @sectionStart( "e-section bg-warning e-text-dark js-e-section is-sticky zi-fixed py-1", "col-12 small" )
1003 <div class="align-self-center col-12 col-lg-9 col-md-8">
1004 <p class="line-height-sm mb-1 mb-md-0 text-center text-md-left">
1005 <i class="material-icons material-icons-2x">supervisor_account</i> @Translate( "Extranet Impersonation - Active impersonation message - Text", "You are currently impersonating this user:" ) <strong>@currentUser.Name — @currentUser.Company </strong>
1006 </p>
1007 </div>
1008 <div class="align-self-center col-12 col-lg-3 col-md-4">
1009 <form class="mb-0 small text-center text-md-right" method="post" action="@Espresso.Area.Item.ExtranetImpersonationPage">
1010 <button class="btn btn-primary" name="DwExtranetRemoveSecondaryUser" type="submit">@Translate( "Extranet Impersonation - Stop impersonation - Button", "Stop impersonation" )</button>
1011 </form>
1012 </div>
1013 @sectionEnd()
1014 }
1015 }
1016 }
101710181019 <main id="dwcontentmain" class="e-content js-e-content @Espresso.ContentArea.ClassList">
1020 @using Dynamicweb.Content;
1021 @using Dynamicweb.Extensibility;
1022 @using Dynamicweb.Frontend
1023 @{
1024 string eBreadcrumbClasslist = "e-breadcrumb js-e-breadcrumb d-none d-lg-block";
1025 if ( Espresso.Item.Breadcrumb != "auto" && Espresso.Item.Breadcrumb != "none" && String.IsNullOrEmpty( Espresso.Item.Breadcrumb ) == false )
1026 {
1027 eBreadcrumbClasslist += string.Format( " e-breadcrumb-{0}", Espresso.Item.Breadcrumb );
1028 }
1029 string navigationHtmlBreadcrumb = RenderNavigation( new
1030 {
1031 id = "dwnav-breadcrumb",
1032 template = "breadcrumb.xslt",
1033 startlevel = 1,
1034 endlevel = 10,
1035 expandmode = "pathonly",
1036 sitemapmode = true
1037 } );
10381039 var urlName = PageView.Current().Area.Name;
1040 }
10411042 @if ( string.IsNullOrEmpty( navigationHtmlBreadcrumb ) == false && Espresso.Item.Breadcrumb != "none" && string.IsNullOrEmpty( Espresso.Item.Breadcrumb ) == false )
1043 {
1044 <section class="e-section @eBreadcrumbClasslist">
1045 <div class="container-fluid">
1046 <div class="row">
1047 <div class="col-12">
1048 <div class="row">
10491050 <div class="col-12">
1051 <nav class="e-breadcrumb-container">
1052 <ol class="breadcrumb nav text-muted" itemscope="" itemtype="https://schema.org/BreadcrumbList">
1053 <li class="breadcrumb-item m-0 p-0">
1054 <a class="arrow-left breadcrumb-back-link js-e-back-link px-0" href="/@urlName">@Translate( "Breadcrumb - Back link", "Back" )</a>
1055 <span class="breadcrumb-prefix-text">
1056 @Translate( "Breadcrumb - Prefix - Text", "You are here:" )
1057 </span>
1058 <a href="/@urlName">
1059 @ServiceLocator.Current.GetPageService().GetFirstPageForArea( GetInteger( "DwAreaID" ) ).MenuText
1060 </a>
1061 </li>
1062 @navigationHtmlBreadcrumb
1063 </ol>
1064 </nav>
1065 </div>
10661067 </div>
1068 </div>
1069 </div>
1070 </div>
1071 </section>
1072 }
10731074 <article class="e-content-article">
1075 @{
1076 int NavigationLocalHorizontalParentPageId = 0;
1077 if ( !string.IsNullOrEmpty( Espresso.Item.NavigationLocalParentPage ) )
1078 {
1079 int.TryParse( Espresso.Item.NavigationLocalParentPage, out NavigationLocalHorizontalParentPageId );
1080 }
1081 if ( NavigationLocalHorizontalParentPageId == 0 )
1082 {
1083 NavigationLocalHorizontalParentPageId = PageView.Current().Page.ID;
1084 if ( !Dynamicweb.Services.Pages.GetPagesByParentID( NavigationLocalHorizontalParentPageId ).Any() )
1085 {
1086 NavigationLocalHorizontalParentPageId = PageView.Current().Page.ParentPageId;
1087 }
1088 }
1089 string NavigationLocalHorizontalClassList = "e-nav-local e-nav-local-horizontal js-e-nav-local-horizontal";
1090 string NavigationLocalHorizontalContainerClassList = "e-nav-local-container";
1091 string NavigationLocalHorizontalTemplate = "local-" + Espresso.Item.NavigationLocalLayout + ".xslt";
1092 if ( string.IsNullOrEmpty( Espresso.Item.NavigationLocalTemplate ) == false && Path.GetExtension( Espresso.Item.NavigationLocalTemplate ) == ".xslt" )
1093 {
1094 NavigationLocalHorizontalTemplate = Path.GetFileName( Espresso.Item.NavigationLocalTemplate );
1095 }
10961097 if ( Espresso.Item.NavigationLocalShow == "True" && Espresso.Item.NavigationLocalLayout == "horizontal" )
1098 {
1099 NavigationLocalHorizontalClassList += " " + Espresso.Item.NavigationLocalCustomClasses;
1100 if ( Espresso.Item.NavigationLocalSticky == "True" )
1101 {
1102 NavigationLocalHorizontalClassList += " is-sticky";
1103 }
1104 if ( Espresso.Item.NavigationLocalAbsolute == "True" )
1105 {
1106 NavigationLocalHorizontalClassList += " is-absolute";
1107 }
1108 else
1109 {
1110 if ( Espresso.Item.NavigationLocalMarginTop != "0" && Espresso.Item.NavigationLocalMarginTop != "" )
1111 {
1112 NavigationLocalHorizontalClassList += " mt-" + Espresso.Item.NavigationLocalMarginTop;
1113 }
1114 if ( Espresso.Item.NavigationLocalMarginBottom != "0" && Espresso.Item.NavigationLocalMarginBottom != "" )
1115 {
1116 NavigationLocalHorizontalClassList += " mb-" + Espresso.Item.NavigationLocalMarginBottom;
1117 }
1118 }
1119 }
1120 }
1121 @if ( Espresso.Item.NavigationLocalShow == "True" && Espresso.Item.NavigationLocalLayout == "horizontal" )
1122 {
1123 <section class="e-section @NavigationLocalHorizontalClassList">
1124 <div class="container-fluid">
1125 <div class="row">
1126 <div class="col-12">
1127 <div class="row">
11281129 <div class="col-12">
1130 <nav id="dwnav-local-horizontal-@NavigationLocalHorizontalParentPageId" class="@NavigationLocalHorizontalContainerClassList">
1131 <ul class="justify-content-start nav">
1132 @if ( Espresso.Item.NavigationLocalHeading != "" )
1133 {
1134 <li class="e-nav-local-heading">
1135 <h2>@Espresso.Item.NavigationLocalHeading</h2>
1136 </li>
1137 }
1138 @RenderNavigation( new
1139 {
1140 id = "dwnav-local-horizontal-" + NavigationLocalHorizontalParentPageId,
1141 parentid = NavigationLocalHorizontalParentPageId,
1142 template = NavigationLocalHorizontalTemplate,
1143 startlevel = Espresso.Item.NavigationLocalLevelStart,
1144 endlevel = Espresso.Item.NavigationLocalLevelEnd,
1145 expandmode = Espresso.Item.NavigationLocalPageTreeExpand == "True" ? "all" : "path"
1146 } )
1147 </ul>
1148 </nav>
1149 </div>
11501151 </div>
1152 </div>
1153 </div>
1154 </div>
1155 </section>
1156 }
115711581159 @{
1160 int NavigationLocalVerticalParentPageId = 0;
1161 if ( !string.IsNullOrEmpty( Espresso.Item.NavigationLocalParentPage ) )
1162 {
1163 int.TryParse( Espresso.Item.NavigationLocalParentPage, out NavigationLocalVerticalParentPageId );
1164 }
1165 if ( NavigationLocalVerticalParentPageId == 0 )
1166 {
1167 NavigationLocalVerticalParentPageId = PageView.Current().Page.ID;
1168 if ( !Dynamicweb.Services.Pages.GetPagesByParentID( NavigationLocalVerticalParentPageId ).Any() )
1169 {
1170 NavigationLocalVerticalParentPageId = PageView.Current().Page.ParentPageId;
1171 }
1172 }
11731174 string NavigationLocalVerticalClassList = "e-nav-local e-nav-local-vertical js-e-nav-local-vertical";
1175 string NavigationLocalVerticalContainerClassList = "e-nav-local-container";
1176 string NavigationLocalVerticalTemplate = "local-" + Espresso.Item.NavigationLocalLayout + ".xslt";
1177 if ( string.IsNullOrEmpty( Espresso.Item.NavigationLocalTemplate ) == false && Path.GetExtension( Espresso.Item.NavigationLocalTemplate ) == ".xslt" )
1178 {
1179 NavigationLocalVerticalTemplate = Path.GetFileName( Espresso.Item.NavigationLocalTemplate );
1180 }
11811182 if ( Espresso.Item.NavigationLocalShow == "True" && Espresso.Item.NavigationLocalLayout == "vertical" )
1183 {
1184 NavigationLocalVerticalClassList += " " + Espresso.Item.NavigationLocalCustomClasses;
11851186 if ( Espresso.Item.NavigationLocalMarginTop != "0" && Espresso.Item.NavigationLocalMarginTop != "" )
1187 {
1188 NavigationLocalVerticalClassList += " mt-" + Espresso.Item.NavigationLocalMarginTop;
1189 }
1190 if ( Espresso.Item.NavigationLocalMarginBottom != "0" && Espresso.Item.NavigationLocalMarginBottom != "" )
1191 {
1192 NavigationLocalVerticalClassList += " mb-" + Espresso.Item.NavigationLocalMarginBottom;
1193 }
11941195 if ( Espresso.Item.NavigationLocalSticky == "True" )
1196 {
1197 NavigationLocalVerticalClassList += " is-sticky";
1198 }
11991200 if ( Espresso.Item.NavigationLocalAbsolute == "True" )
1201 {
1202 NavigationLocalVerticalClassList += " is-absolute";
1203 }
1204 else
1205 {
1206 Espresso.ContentSection.ClassList.Clear();
1207 Espresso.ContentSection.ClassList.AddClasses( "wtf col-12 col-lg-9 ml-auto" );
1208 }
1209 }
1210 }
12111212 @if ( Espresso.Item.NavigationLocalShow == "True" && Espresso.Item.NavigationLocalLayout == "vertical" )
1213 {
1214 <section class="e-section @NavigationLocalVerticalClassList">
1215 <div class="container-fluid">
1216 <div class="row">
1217 <div class="col-12">
1218 <div class="row">
12191220 <div class="col-3">
1221 <nav id="dwnav-local-@NavigationLocalVerticalParentPageId" class="@NavigationLocalVerticalContainerClassList">
1222 <ul class="flex-column nav">
1223 @if ( Espresso.Item.NavigationLocalHeading != "" )
1224 {
1225 <li class="e-nav-local-heading">
1226 <h2>@Espresso.Item.NavigationLocalHeading</h2>
1227 </li>
1228 }
1229 @RenderNavigation( new
1230 {
1231 id = "dwnav-local-" + NavigationLocalVerticalParentPageId,
1232 parentid = NavigationLocalVerticalParentPageId,
1233 template = NavigationLocalVerticalTemplate,
1234 startlevel = Espresso.Item.NavigationLocalLevelStart,
1235 endlevel = Espresso.Item.NavigationLocalLevelEnd,
1236 expandmode = Espresso.Item.NavigationLocalPageTreeExpand == "True" ? "all" : "path",
1237 } )
1238 </ul>
1239 </nav>
1240 </div>
12411242 </div>
1243 </div>
1244 </div>
1245 </div>
1246 </section>
1247 }
124812491250 @sectionStart()
1251 @GetValue("DwContent(dwcontentmain)")
1252 @sectionEnd()
1253 </article>
1254 </main>
1255 @using Dynamicweb.Frontend
1256 @{
1257 string FooterContentClassList = "e-footer-content e-section";
12581259 bool isOutlet = shopType == "Outlet";
1260 }
1261 @if ( Espresso.Item.FooterHide != "True" )
1262 {
1263 <footer class="e-footer">
1264 <article class="e-footer-wrapper">
1265 <section class="@FooterContentClassList">
1266 <div class="container-fluid">
1267 <div class="row">
1268 @if ( !string.IsNullOrEmpty( Espresso.Area.Item.FooterPageId ) )
1269 {
1270 @RenderPageContent( int.Parse( Espresso.Area.Item.FooterPageId ) )
1271 }
1272 </div>
1273 </div>
1274 </section>
1275 @if (!isOutlet)
1276 {
1277 <section class="e-footer-copyright e-section">
1278 <div class="container-fluid">
1279 <div class="align-items-baseline row">
1280 <div class="col-12 col-lg-5">
1281 @if (string.IsNullOrEmpty(Espresso.Area.Item.Adresse) == false)
1282 {
1283 @Espresso.Area.Item.Adresse
1284 }
1285 </div>
12861287 <div class="col-12 col-lg-4">
1288 @if (string.IsNullOrEmpty(GetString("DwNavigation(dwnavutilitiessecondaryfooter)")) == false)
1289 {
1290 <div class="col-12 p-0">
1291 <aside class="e-nav-utilities-secondary">
1292 <ul class="nav nav-inline">
1293 @GetValue("DwNavigation(dwnavutilitiessecondaryfooter)")
1294 </ul>
1295 </aside>
1296 </div>
1297 }
1298 </div>
129913001301 <div class="col-12 col-lg-3 text-lg-right">
1302 <p class="e-copyright nav-link">
1303 @*@Translate( "Footer - Copyright - Text", "Copyright ©" ) *@
1304 @*@DateTime.Now.Year.ToString() *@
1305 @Translate("Footer - All Rights Reserved - Text", "All rights reserved.")
1306 @Espresso.Area.Item.CompanyName.
1307 </p>
1308 </div>
1309 </div>
1310 </div>
1311 </section>
1312 }
1313 </article>
1314 </footer>
1315 }
1316 @if( string.IsNullOrEmpty( GetString("DwContent(dwcontentcta)") ) == false ) {
1317 <aside id="dwcontentcta" class="js-e-cta e-cta is-hidden fixed-top">
1318 <section class="e-section">
1319 <div class="container-fluid">
1320 <div class="row no-gutters">
1321 <div class="col-12">
1322 <div class="row no-gutters justify-content-center align-items-center">
1323 @GetValue("DwContent(dwcontentcta)")
1324 @* <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> *@
1325 </div>
1326 </div>
1327 </div>
1328 </div>
1329 </section>
1330 </aside>
1331 }
13321333 @using Dynamicweb.Frontend
13341335 @{
1336 string cartUrl = "/cart";
13371338 if ( PageView.Current().Area.Name.Contains( "webshop" ) == false )
1339 {
1340 cartUrl = string.Format("{0}{1}", PageView.Current().Area.Name, cartUrl);
1341 }
1342 else
1343 {
1344 cartUrl = string.Format("{0}/shop{1}", PageView.Current().Area.Name.ToLower(), cartUrl);
1345 }
13461347 var ShopType = PageView.Current().Area.Item["ShopType"];
1348 }
1349 <div class="e-cart-msg modal fade small" id="js-e-cart-msg" data-backdrop="false">
1350 <div class="modal-dialog e-cart-msg-modal-dialog">
1351 <div class="modal-content">
1352 <div class="modal-header">
1353 <h4 class="js-e-cart-msg-heading modal-title">
1354 <i class="material-icons material-icons-large text-success">check_circle</i>
1355 <span>@Translate( "eCom Cart - Product Added - Heading", "Added to your cart" )</span>
1356 </h4>
1357 <button class="close" data-dismiss="modal" type="button">
1358 <i class="material-icons">close</i>
1359 </button>
1360 </div>
1361 <div class="modal-body">
1362 <div class="js-e-cart-msg-content">
1363 <script id="js-e-handlebars-tmpl-cart-msg-lastadded" type="text/x-handlebars-template">
1364 <div class="row">
1365 {{#each cart.lastAdded}}
1366 <div class="col-12 py-1">
1367 <div class="row">
1368 <div class="col-4">
1369 <a class="" href="{{url}}">
1370 <img alt="" class="img-fluid" src="{{imageDefault}}">
1371 </a>
1372 </div>
1373 <div class="col-8">
1374 <h3 class="mb-0">
1375 <a href="{{url}}" class="text-decoration-none">{{name}}</a>
1376 </h3>
1377 <p class="mb-0">
1378 <a href="{{url}}" class="text-auto text-decoration-none">
1379 {{{price}}}
1380 @if (ShopType?.ToString() != "B2C")
1381 {
1382 <span>
1383 <br>
1384 {{{stock.text}}}<br>
1385 {{{stock.delivery}}}<br>
1386 </span>
1387 }
13881389 </a>
1390 </p>
1391 </div>
1392 </div>
1393 </div>
1394 {{/each}}
1395 </div>
1396 </script>
1397 </div>
1398 </div>
1399 <div class="bg-info e-cart-msg-footer modal-footer border-top-0">
1400 <a class="btn btn-secondary mr-1" href="/" data-dismiss="modal">@Translate( "eCom Cart - Continue Shopping - Button", "Continue shopping" )</a>
1401 <a class="arrow-right btn btn-primary" href="@cartUrl">@Translate( "eCom Cart - Checkout - Button", "Checkout" )</a>
1402 </div>
1403 </div>
1404 </div>
1405 </div>
14061407 </div>
14081409 @using Co3.Espresso.Base.Extensions
1410 @using Co3.Espresso.Website.Services
1411 @using Dynamicweb.Frontend
14121413 <div class="modal fade e-search js-e-search js-e-search-modal modal-fullscreen" data-backdrop="false" data-keyboard="true" data-focus="true">
1414 <div class="modal-dialog">
1415 <div class="modal-content">
141614171418 <div class="modal-header">
1419 <a class="btn btn-sm btn-secondary js-e-back-link arrow-left" href="/" data-dismiss="modal">
1420 @Translate("Search - Back button", "Back")
1421 </a>
1422 <div class="e-logo">
1423 <a href="/" class="e-logo-link my-0">
1424 <img src="@logoPrimary" class="e-logo-img e-logo-img-primary" alt="@Espresso.Area.Item.CompanyName">
1425 <img src="@logoSecondary" class="e-logo-img e-logo-img-secondary" alt="@Espresso.Area.Item.CompanyName">
1426 </a>
1427 </div>
1428 </div>
14291430 <div class="modal-body">
14311432 <div class="container-fluid">
14331434 <div class="e-search-form-container">
1435 <div class="row justify-content-center">
1436 <div class="col-12 col-md-10 col-lg-8 col-xl-6 mt-3">
1437 <form action="" class="e-search-form js-e-search-form">
1438 <div class="js-e-search-input-group e-search-input-group is-empty">
1439 <label class="e-search-label" for="e-search-input"><i class="material-icons">search</i></label>
1440 @{ string Translate_Search_InputText = Translate("Search - Input Placeholder - Text", "Search"); }
1441 <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">
1442 <span class="js-e-search-clear e-search-clear"><i class="material-icons">close</i></span>
1443 <button class="e-search-submit btn btn-primary" type="submit"><i class="material-icons">search</i></button>
1444 </div>
1445 </form>
1446 </div>
1447 </div>
1448 </div>
14491450 <div class="js-e-search-result-container e-search-result-container">
14511452 <div class="row justify-content-center">
1453 <div class="col-12 col-md-10 col-lg-8 col-xl-6">
1454 <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>
1455 </div>
1456 </div>
14571458 <div class="row justify-content-center">
1459 <div class="col-12 col-xl-10">
1460 <div class="js-e-search-result-products e-search-result-products is-empty mb-4">
1461 @{string productlistItemClassList = ProductlistService.Instance.GetGridItemWidth(null).ToResponsiveClasses();}
1462 <script id="js-e-handlebars-tmpl-search-result-item-product" type="text/x-handlebars-template">
1463 <div class="e-products">
1464 <div class="row justify-content-center">
1465 {{#each products}}
1466 <div class="@productlistItemClassList">
1467 <div class="card border-1 mb-6">
1468 <a href="{{url}}">
1469 @if (Espresso.Item.ModelProductlist == "True")
1470 {
1471 <img src="{{productlistDetailImage}}" alt="{{name}}" class="col-12 p-0">
1472 }
1473 else
1474 {
1475 <img src="{{imageDefault}}" alt="{{name}}" class="col-12 p-0">
1476 }
1477 {{#if news}}
1478 <div class="isabella-product-item-news">
1479 @Translate("Ecom Product - News Badge - Text", "Nyhed")
1480 </div>
1481 {{/if}}
1482 </a>
1483 <div class="card-body p-1 p-lg-3">
1484 <h4 class="e-products-item-name mb-0">
1485 <a href="{{url}}">
1486 {{{name}}}
1487 </a>
1488 </h4>
1489 {{#if shortDescription}}
1490 {{{shortDescription}}}
1491 {{/if}}
1492 @* @if (PageView.Current().Area.Name.Contains("webshop") != false)
1493 {
1494 <p class="e-products-item-text mt-2 mb-0 @Co3.Isabella.Dw.Services.ProductService.Instance.GetNoBuyB2CandB2B()" style="display: flex">
1495 <small class="e-products-item-price small">
1496 <a href="{{url}}" class="text-dark" style="text-decoration: none">
1497 {{#if pimActive}}{{{price}}}{{else}}@Translate("eCom Product - Add To Cart Form Table - Accessory Discontinued - Text", "Udgået"){{/if}}
1498 </a>
1499 </small>
1500 <a href="{{url}}" style="left: 0" class="isabella-arrow arrow-primary-small ml-auto"></a>
1501 </p>
1502 }
1503 *@
1504 </div>
1505 </div>
1506 </div>
1507 {{/each}}
1508 </div>
1509 <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>
1510 </div>
1511 </script>
1512 </div>
1513 </div>
1514 </div>
15151516 <div class="row justify-content-center">
1517 <div class="col-12 col-md-10 col-lg-8 col-xl-6">
1518 <div class="js-e-search-result-pages e-search-result-pages is-empty mb-3">
1519 <script id="js-e-handlebars-tmpl-search-result-item-page" type="text/x-handlebars-template">
1520 <div class="row">
1521 {{#each pages}}
1522 <div class="col-12">
1523 <p class="mb-0"><a href="{{{url}}}" class="text-bold">{{{title}}}</a></p>
1524 <p class="mb-0 small text-truncate">
1525 <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>
1526 <p class="small">{{{text}}}...</p>
1527 </div>
1528 {{/each}}
1529 </div>
1530 </script>
1531 </div>
1532 </div>
1533 </div>
15341535 <div class="js-e-search-loading-overlay e-loading-overlay e-search-loading-overlay">
1536 <div class="e-loading-spinner"></div>
1537 </div>
15381539 </div>
15401541 </div>
1542 </div>
1543 </div>
1544 </div>
1545 </div>
15461547 @if( Espresso.Area.Item.BackToTopLink == "True" ){
1548 <a href="#top" class="e-back-to-top js-e-back-to-top"><i class="material-icons">keyboard_arrow_up</i></a>
1549 }
155015511552 @* @using System.Web;
1553 @inherits Co3.Espresso.Website.TemplateBases.Pages.PageBase
15541555 @{
1556 HttpCookie optInLevel = HttpContext.Current.Request.Cookies[ "Dynamicweb.CookieOptInLevel" ];
1557 bool showCookieWarning = optInLevel == null;
1558 if ( optInLevel != null )
1559 {
1560 showCookieWarning = optInLevel.Value != "2";
1561 }
1562 }
15631564 @if ( showCookieWarning )
1565 {
1566 <div class="e-cookie js-e-cookie py-1" hidden="">
1567 <aside class="e-cookie-wrapper">
1568 <section class="e-section">
1569 <div class="container-fluid">
1570 <div class="align-items-center row">
1571 <div class="col-12 col-lg-10 col-md-9 my-1">
1572 <p class="line-height-sm mb-0 small text-center text-md-left">
1573 <span class="d-md-inline d-none">
1574 @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" )
1575 </span>
1576 <span class="d-md-none">
1577 @Translate( "Cookie Warning - Message Short - Text", "This website uses cookies to improve your experience. Learn more about our" )
1578 </span>
1579
1580 <a href="@Espresso.Area.Item.CookieMessage">@Translate( "Cookie Warning - Policy - Link", "cookie policy" )</a>
1581 </p>
1582 </div>
1583 <div class="col-12 col-lg-2 col-md-3 my-1">
1584 <p class="mb-0 text-center text-md-right">
1585 <button class="btn e-cookie-accept-btn js-e-cookie-accept-btn" type="button">
1586 @Translate( "Cookie Warning - Accept - Button", "OKAY" )
1587 </button>
1588 </p>
1589 </div>
1590 </div>
1591 </div>
1592 </section>
1593 </aside>
1594 </div>
1595 }
15961597 @if ( 1 == 2 )
1598 {
1599 @GetValue( "DwCookieWarning" )
1600 }
16011602 *@
16031604 <script data-cookieconsent="ignore" async="" src="/Files/Templates/Designs/isabella/_assets/_dist/js/default.js?v=3.1.1"></script>
1605 <script>
16061607 window.dataLayer.push({
1608 'event':'ipEvent',
1609 'ipAddress' : '@Dynamicweb.Context.Current.Request.UserHostAddress'
1610 });
1611 </script>
1612 </body>
16131614 @GetValue( "CopyRightNotice" )
1615 </html>
1616