Error executing template "Designs/elsalg/_parsed/error404.parsed.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
at Dynamicweb.Ecommerce.Products.ProductService.GetProductFieldValue(Product product, String productFieldSystemName)
at CompiledRazorTemplates.Dynamic.RazorEngine_99fce80130a341f3a774fcd5ea7cda2e.Execute() in D:\websites\elsalg.dk\application(9.12.1)\Files\Templates\Designs\elsalg\_parsed\error404.parsed.cshtml:line 47
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 @using System.Web;
2 @using Dynamicweb.Frontend;
3 @using Dynamicweb.Ecommerce;
4 @using Dynamicweb.Ecommerce.Products;
5 @using Dynamicweb.Ecommerce.Shops;
6 @using Dynamicweb.Content;
7 @using Dynamicweb.Rendering;
8 @using eela.custom.Providers;
9 @using System.Collections.Generic;
10
11 <!DOCTYPE html>
12 <html xmlns="http://www.w3.org/1999/xhtml" data-ng-app="" lang="da-DK">
13 <head>
14 <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE11,chrome=1" http-equiv="X-UA-Compatible">
15 <meta http-equiv="content-type" content="text/html; charset=UTF-8">
16 <meta name="msvalidate.01" content="D8FD1D65ECA95854E304AD60C8D3BEA0">
17
18 @{
19 string defaultOGTitle = "El-Salg";
20 string defaultOGImage = "https://elsalg.dk/Files/Templates/Designs/elsalg/assets/images/el-salg-logo-fs8.png";
21 string defaultOGDescription = "Hos El-Salg finder du alt hvad du skal bruge af hvidevarer, køkkenudstyr, lamper og elektriker ydelser";
22 string defaultOGUrl = "https://elsalg.dk/";
23 string defaultOGSiteName = "elsalg.dk";
24 }
25
26 @if (HttpContext.Current.Request.Url.AbsoluteUri.Contains("195.249.142.64") || HttpContext.Current.Request.Url.AbsoluteUri.Contains("staging.elsalg.dk") ||
27 HttpContext.Current.Request.Url.AbsoluteUri.Contains(".dw.inet-design.dk"))
28 {
29 <meta name="robots" content="noindex, nofollow">
30 }
31
32 <title>@GetValue("Title")</title>
33 @GetValue("MetaTags")
34 @GetValue("CopyRightNotice")
35
36
37 <meta id="meta-viewport" name="viewport" content="width=device-width, initial-scale=1.0">
38
39 <link href="https://plus.google.com/112327954699236545383" rel="publisher">
40
41 <meta name="google-site-verification" content="vT-VZzPF1cLb217WD6k7UcMC6Co3kUuGywylExsxKYc">
42
43 @if (!string.IsNullOrWhiteSpace(HttpContext.Current.Request.QueryString["ProductID"]))
44 {
45 string productmetaId = HttpContext.Current.Request.QueryString["ProductID"];
46 var productmeta = Dynamicweb.Ecommerce.Services.Products.GetProductById(productmetaId, string.Empty, false);
47 string image = string.Format("https://cdn1.elsalg.dk/inetimagegen.ashx?altFmImage_path=/Files/ELSALG/eCom/Pictures/0000000000001.png&Width=280&image=/files/ELSALG/eCom/Pictures/{0}.png&width=1024&height=768&crop=5", Dynamicweb.Ecommerce.Services.Products.GetProductFieldValue(productmeta, "ELSEan").ToString());
48 string productUrl = "https://elsalg.dk" + Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl("Default.aspx?ID=9&ProductID=" + productmeta.Id);
49 <meta property="og:title" content="@(string.IsNullOrWhiteSpace(productmeta.Meta.Title) ? defaultOGTitle : productmeta.Meta.Title)">
50 <meta property="og:image" content="@image">
51 <meta property="og:description" content="@(string.IsNullOrWhiteSpace(productmeta.Meta.Description) ? defaultOGDescription : productmeta.Meta.Description)">
52 <meta property="og:url" content="@productUrl">
53 }
54
55 @if (!string.IsNullOrWhiteSpace(HttpContext.Current.Request.QueryString["GroupID"]))
56 {
57 string groupmetaId = HttpContext.Current.Request.QueryString["GroupID"].Trim().Split(',').Last();
58 var groupmeta = Dynamicweb.Ecommerce.Services.ProductGroups.GetGroup(groupmetaId);
59 string groupUrl = "https://elsalg.dk" + Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl("Default.aspx?ID=9&GroupID=" + groupmeta.Id);
60 <meta property="og:title" content="@(string.IsNullOrWhiteSpace(groupmeta.Meta.Title) ? defaultOGTitle : groupmeta.Meta.Title)">
61 <meta property="og:image" content="https://elsalg.dk/Files/Templates/Designs/elsalg/assets/images/el-salg-logo-fs8.png">
62 <meta property="og:description" content="@(string.IsNullOrWhiteSpace(groupmeta.Meta.Description) ? defaultOGDescription : groupmeta.Meta.Description)">
63 <meta property="og:url" content="@groupUrl">
64 }
65
66 @if (string.IsNullOrWhiteSpace(HttpContext.Current.Request.QueryString["GroupID"]) && string.IsNullOrWhiteSpace(HttpContext.Current.Request.QueryString["ProductID"]))
67 {
68 var pageTitle = GetString("Title");
69 var pageDescription = GetString("Meta.Description");
70 <meta property="og:title" content="@(string.IsNullOrWhiteSpace(pageTitle) ? defaultOGTitle : pageTitle)">
71 <meta property="og:image" content="@defaultOGImage">
72 <meta property="og:description" content="@(string.IsNullOrWhiteSpace(pageDescription) ? defaultOGDescription : pageDescription)">
73 <meta property="og:url" content="@defaultOGUrl">
74 }
75
76 <meta property="og:site_name" content="@defaultOGSiteName">
77
78 <!--$$Snippet(googleStructuredData)-->
79
80 <link rel="shortcut icon" type="image/png" href="https://elsalg.dk/Files/templates/designs/elsalg/assets/images/favicon.ico">
81
82 <link rel="stylesheet" type="text/css" media="all" href="/files/templates/designs/elsalg/assets/css/fluid-grid.css">
83
84 <link rel="stylesheet" type="text/css" media="all" href="/files/templates/designs/elsalg/assets/css/new.css?ver=3">
85 <link rel="stylesheet" type="text/css" media="all" href="/files/templates/designs/elsalg/assets/css/screen.css?ver=3.3.7">
86 <link rel="stylesheet" type="text/css" media="all" href="/files/templates/designs/elsalg/assets/css/owl/owl.carousel.css?ver=2.0">
87 <link rel="stylesheet" type="text/css" media="all" href="/files/templates/designs/elsalg/assets/css/widgets.css?ver=2.0.4">
88
89 <!--$$Snippet(cssFiles)-->
90
91 <link rel="stylesheet" type="text/css" media="all" href="/files/templates/designs/elsalg/assets/css/magnific-popup.css?ver=2.1">
92 <link rel="stylesheet" type="text/css" media="all" href="/files/templates/designs/elsalg/assets/css/footable.core.css">
93 <link rel="stylesheet" type="text/css" media="all" href="/files/templates/designs/elsalg/assets/css/jquery.prettycheckbox.css">
94 <link rel="stylesheet" type="text/css" media="all" href="/files/templates/designs/elsalg/assets/css/1stweb.css?ver=2.0">
95 <link rel="stylesheet" type="text/css" media="all" href="/files/templates/designs/elsalg/assets/css/m-1200.css?ver=2.0">
96 <link rel="stylesheet" type="text/css" media="all" href="/files/templates/designs/elsalg/assets/css/m-1024.css?ver=2.0">
97 <link rel="stylesheet" type="text/css" media="all" href="/files/templates/designs/elsalg/assets/css/m-768.css?ver=2.0">
98 <link rel="stylesheet" type="text/css" media="all" href="/files/templates/designs/elsalg/assets/css/m-480.css?ver=2.2">
99 <link rel="stylesheet" type="text/css" media="all" href="/files/templates/designs/elsalg/assets/css/megamenu/megamenu.css?ver=1.2">
100
101 @{
102 var dateFrom = DateTime.ParseExact("20-11-17", "dd-MM-yy", System.Globalization.CultureInfo.InvariantCulture);
103 var dateTo = DateTime.ParseExact("01-01-18", "dd-MM-yy", System.Globalization.CultureInfo.InvariantCulture);
104 var isXmas = DateTime.Now >= dateFrom && DateTime.Now < dateTo;
105
106 var saleDateFrom = DateTime.ParseExact("27-12-17", "dd-MM-yy", System.Globalization.CultureInfo.InvariantCulture);
107 var saleDateTo = DateTime.ParseExact("06-01-18", "dd-MM-yy", System.Globalization.CultureInfo.InvariantCulture);
108 var isSale = DateTime.Now >= saleDateFrom && DateTime.Now < saleDateTo;
109
110 if (isXmas)
111 {
112 isXmas = !HttpContext.Current.Request.RawUrl.Contains("/lamper");
113
114 //check if product page is for lamps
115 if (isXmas)
116 {
117 var prodId = HttpContext.Current.Request.QueryString["productid"];
118 if (!string.IsNullOrEmpty(prodId))
119 {
120 isXmas = !GetIfIsInLampGroup(prodId);
121 }
122 }
123 }
124
125 if (isXmas && !isSale)
126 {
127 <link rel="stylesheet" type="text/css" media="all" href="/files/templates/designs/elsalg/assets/css/xmas2015.css?ver=1">
128 }
129
130 if (isSale)
131 {
132 isSale = !HttpContext.Current.Request.RawUrl.Contains("/lamper");
133
134 //check if product page is for lamps
135 if (isSale)
136 {
137 var prodId = HttpContext.Current.Request.QueryString["productid"];
138 if (!string.IsNullOrEmpty(prodId))
139 {
140 isSale = !GetIfIsInLampGroup(prodId);
141 }
142 }
143 }
144
145 if (isSale)
146 {
147 <link rel="stylesheet" type="text/css" media="all" href="/files/templates/designs/elsalg/assets/css/xmas2015.css?ver=1">
148 <link rel="stylesheet" type="text/css" media="all" href="/files/templates/designs/elsalg/assets/css/sale.css?ver=1">
149 }
150 }
151 @functions {
152 public bool GetIfIsInLampGroup(string currentProductId)
153 {
154 try
155 {
156 if (string.IsNullOrEmpty(currentProductId)) { return false; }
157 var lampParentGroupId = "20-at-SHOP1";
158 if (lampParentGroupId == currentProductId) { return true; }
159
160 var product = Dynamicweb.Ecommerce.Services.Products.GetProductById(currentProductId, "", true);
161 if (product == null) { return false; }
162
163 var groups = product.Groups.ToList();
164 while (groups != null && groups.Count > 0)
165 {
166 var temp = new List<Dynamicweb.Ecommerce.Products.Group>();
167 foreach (var g in groups)
168 {
169 if (g.Id == lampParentGroupId) { return true; }
170 temp.AddRange(g.ParentGroups.ToList());
171 }
172 groups = temp;
173 }
174
175 return false;
176 }
177 catch
178 {
179 return false;
180 }
181 }
182 }
183
184 <!--[if lte IE 8]><link rel="stylesheet" type="text/css" media="all" href="assets/css/ie8.css" /><![endif]-->
185 <!--[if IE 9]><link rel="stylesheet" type="text/css" media="all" href="/Files/Templates/Designs/elsalg/assets/css/ie9.css" /><![endif]-->
186 <!--[if lte IE 9]>
187 <script type="text/javascript">
188 if (typeof window.console === 'undefined') window.console = {
189 'ver': 'Fri Feb 07 2014 16:44:36 GMT+0100 (CET)',
190 'debug': function() {},
191 'error': function() {},
192 'info': function() {},
193 'log': function() {},
194 'warn': function() {},
195 'dir': function() {},
196 'dirxml': function() {},
197 'table': function() {},
198 'trace': function() {},
199 'assert': function() {},
200 'count': function() {},
201 'markTimeline': function() {},
202 'profile': function() {},
203 'profileEnd': function() {},
204 'time': function() {},
205 'timeEnd': function() {},
206 'timeStamp': function() {},
207 'timeline': function() {},
208 'timelineEnd': function() {},
209 'group': function() {},
210 'groupCollapsed': function() {},
211 'groupEnd': function() {},
212 'clear': function() {}
213 };</script>
214 <script type="text/javascript" src="assets/scripts/jquery-ie-text-shadow.js"></script>
215 <script type="text/javascript" src="assets/scripts/ie.js"></script>
216 <![endif]-->
217
218 <script type="text/javascript" src="/files/templates/designs/elsalg/assets/scripts/jquery-1.9.1.min.js"></script>
219 <script src="/files/templates/designs/elsalg/assets/scripts/jquery-migrate-1.2.1.js"></script>
220 <script type="text/javascript" src="/Files/Templates/Designs/elsalg/assets/scripts/instantsearch.js?ver=7"></script>
221
222 <script type="text/javascript" src="/Files/Templates/Designs/elsalg/assets/scripts/advga.js?ver=2"></script>
223
224
225
226 <!--$$Snippet(head)-->
227
228 @GetString("Item.Area.Header_Scripts")
229 @GetValue("Stylesheets")
230 @GetValue("Javascripts")
231 </head>
232 <body>
233 <div class="body-wrapper">
234 @GetString("Item.Area.AfterOpeningBody_Scripts")
235
236 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>>
237 @using Dynamicweb.Content
238 @using Dynamicweb
239 @using System
240 @using Dynamicweb.Data
241 @using System.Data
242
243 <header id="sticker">
244
245 <nav id="options-menu">
246 <div class="container_4 clearfix">
247 <div class="open-nav">Menu</div>
248 <div class="container_row">
249 <ul class="clearfix">
250 <li id="logo"><a href="/"><img src="/Files/Templates/Designs/elsalg/assets/images/icons/icon-elsalg.svg" height="55"></a></li>
251 @{
252 string searchUrl = Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl("default.aspx?id=2063").ToString();
253 string q = HttpContext.Current.Request.QueryString["q"];
254 }
255 <li class="euronics-logo"><img src="/Files/Templates/Designs/elsalg/assets/images/icons/icon-euronics-group.svg" width="160" height="40"></li>
256 <li class="quick-srch">
257 <div id="quicksearch-bar" class="container_4 clearfix">
258 <form method="get" id="quicksearch-form" class="clearfix">
259 <span class="input"><input type="text" id="quicksearch-q" name="q" value="@(q)" autocomplete="off"></span>
260 <span class="button"><input type="submit" id="quicksearch-submit" class="quicksearch-button" value="Søg"></span>
261 </form>
262 </div>
263 <div class="q-results"></div>
264 </li>
265 <li class="icon icon-right icon-phone"><a href="tel:+4570201122">70 20 11 22</a></li>
266 @*--><li class="icon icon-right icon-book"><a href="/tilbudsavis">Tilbudsavis</a></li>*@
267 <li class="icon icon-right icon-e"><a href="#">Godkendt af E-handelsfonden</a></li>
268 <!-- Mobile links -->
269 <li class="icon-mobile" id="cart-button"><!--$$Global:Paragraph.Content(5)--></li>
270 <li class="icon icon-mobile icon-butik"><a href='/andre-links/find-butik'>Find butik</a></li>
271 <li class="icon icon-mobile icon-phone"><a href="tel:70201122">70 20 11 22</a></li>
272 <li class="icon icon-mobile icon-search"></li>
273 </ul>
274 </div>
275 </div>
276 </nav>
277
278 <div class="meganav">
279 <div class="container_4 clearfix">
280 <ul class="meganav-menu">
281 <!-- Render megamenu menu -->
282 <li>
283 <a href="#" class="product-menu">Produkter</a>
284 <div class="single-dropdown">
285 <ul class="single-dropdown-list dropdown-height">
286 @RenderMenu()
287 </ul>
288 </div>
289 </li>
290
291 <!-- Render top menu -->
292 @{
293 var menuParagraph = Dynamicweb.Services.Paragraphs.GetParagraph(5199);
294 object menuLinksIds = null;
295 menuParagraph.Item.TryGetValue("Collection", out menuLinksIds);
296
297 if (menuLinksIds != null && menuLinksIds.ToString().Split(',').Count() > 0)
298 {
299 foreach (string menuLinkId in menuLinksIds.ToString().Split(','))
300 {
301 DataTable links = Database.CreateDataTable(string.Format("SELECT * FROM ItemType_Link WHERE Id = {0} ORDER BY SORT", menuLinkId));
302
303 foreach (DataRow linkRow in links.Rows)
304 {
305 @*string linkUrl = Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(linkRow["Link_Url"].ToString()).ToString();
306 <li><a href="@linkUrl">@linkRow["Display_Text"].ToString()</a></li>*@
307
308 string url = linkRow["Link_Url"].ToString();
309 if (!String.IsNullOrEmpty(url))
310 {
311 if (url.StartsWith("Default.aspx"))
312 {
313 url = Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(url).ToString();
314 }
315 else
316 {
317
318 }
319 }
320
321 string target = linkRow["Target"].ToString();
322 if (!String.IsNullOrEmpty(target))
323 {
324 //target = "target=\"" + target + "\"";
325 }
326
327 <li><a href="@url" target="@target">@linkRow["Display_Text"].ToString()</a></li>
328 }
329 }
330 }
331 }
332 <!-- Render fixed menu -->
333 <li class="last-item last-item-cart" id="cart-button"><!--$$Global:Paragraph.Content(5)--></li>
334 <li class="last-item last-item-map"><a href='/andre-links/find-butik'>Find butik</a></li>
335 </ul>
336 </div>
337 </div>
338
339 <div class="container_4 clearfix quicksearch-bar quicksearch-bar-responsive">
340 <form method="get" class="clearfix">
341 <span class="input"><input type="text" id="quicksearch-q-responsive" value="" autocomplete="off"></span>
342 <span class="button"><input type="submit" id="quicksearch-submit" class="quicksearch-button" value="Søg"></span>
343 </form>
344 <div class="q-results"></div>
345 </div>
346
347 </header>
348
349 <script type="text/javascript">
350 $(function () {
351 var openMenu = $('.open-nav'),
352 li1 = $('.meganav-menu > li'),
353 li2 = $('.single-dropdown-list > li'),
354 li3 = $('.nav-wrapper .nav-label'),
355 megaNavMenu = $('.meganav-menu'),
356 megaNavDropdown = $('.meganav-dropdown'),
357 navWrapperBack = $('.nav-wrapper-dropdown > .nav-back'),
358 megaNavBack = $('.meganav-dropdown > .nav-back');
359
360 openMenu.on('click', function (e) {
361 e.stopPropagation();
362 $('.meganav').toggleClass('expanded');
363 });
364
365 function checkWidth() {
366 var windowSize = $(window).width();
367
368 if (windowSize >= 1200) {
369 li1.bind({
370 mouseenter: function (e) {
371 $(this).addClass('hovered');
372 },
373 mouseleave: function (e) {
374 li1.removeClass('hovered');
375 }
376 });
377 li2.bind({
378 mouseenter: function (e) {
379 var $this = $(this),
380 $parent = $this.parent(),
381 $box = $this.find('.dropdown-height');
382
383 $this.addClass('hovered');
384
385 //maxHeight = Math.max.apply(null, $box.map(function () {
386 // return $(this).height();
387 //}).get());
388
389 $parent.height($box.height());
390 },
391 mouseleave: function (e) {
392 li2.removeClass('hovered');
393 $(this).parent().removeAttr('style');
394 }
395 });
396 }
397
398 // Mobile menu
399 // -----------
400
401 if (windowSize <= 1199) {
402
403 li1.on('click', function () {
404 li1.removeClass('active-dropdown');
405 $(this).toggleClass('active-dropdown');
406
407 });
408
409 li2.on('click', function (e) {
410 e.preventDefault();
411 li2.removeClass('active');
412 $(this).addClass('active');
413 megaNavMenu.addClass('invisible');
414
415 });
416
417 li3.on('click', function () {
418 var $this = $(this),
419 parent = $this.parent();
420 $('.nav-wrapper').removeClass('expanded');
421 parent.addClass('expanded');
422 megaNavDropdown.addClass('invisible');
423 });
424
425 megaNavBack.on('click', function (e) {
426 e.stopPropagation();
427 e.preventDefault();
428 $(this).closest('li').removeClass('active');
429 megaNavMenu.removeClass('invisible');
430
431 });
432
433 navWrapperBack.on('click', function () {
434 $(this).closest('.nav-wrapper').removeClass('expanded');
435 megaNavDropdown.removeClass('invisible');
436 });
437
438 // Force href 4th level mobile menu
439 $('.thumb-subcategory a').on('click', function (e) {
440 e.preventDefault();
441 window.location.href = $(this).attr('href');
442 });
443
444 $('.nav-label-mobile').on('click', function (e) {
445 e.preventDefault();
446 window.location.href = $(this).find("a").attr('href');
447 });
448 }
449 }
450 // Execute on load
451 checkWidth();
452 // Bind event listener
453 $(window).resize(checkWidth);
454
455 });
456
457 </script>
458
459 @helper RenderMenu()
460 {
461 var topPages = Dynamicweb.Services.Pages.GetPages().Where(p => p.ParentPageId == 0 && (p.LayoutTemplate == "webshop.cshtml" || p.LayoutTemplate == "webshopmiele.cshtml") &&
462 !p.Hidden && p.Active)
463 .OrderBy(p => p.Sort)
464 .ToList();
465
466 var topGroups = Dynamicweb.Ecommerce.Services.ProductGroups.GetToplevelGroups();
467
468 foreach (var categoryPage in topPages)
469 {
470 try
471 {
472 var group = topGroups.FirstOrDefault(g => g.Name == categoryPage.MenuText);
473 if (group == null) { continue; }
474
475 if (!group.NavigationShowInMenu) { continue; }
476
477 var groupIdStr = group.Id.ToString().Replace("-at-SHOP1", "");
478 int groupId = int.TryParse(groupIdStr, out groupId) ? groupId : 0;
479 if (groupId <= 0) { continue; }
480
481
482 var hasItems = group.HasChildGroups ? "has-items" : string.Empty;
483 var groupNormalizedName = "/" + group.ProductGroupFieldValues.GetProductGroupFieldValue("ELSNormalizedName").Value;
484
485 var currentClass = HttpContext.Current.Request.RawUrl.ToLower().StartsWith(groupNormalizedName.ToLower()) ? "current" : string.Empty;
486
487 var menuSettingsParagraph = Dynamicweb.Services.Paragraphs.GetParagraphsByPageId(categoryPage.ID).FirstOrDefault(p => p.ItemType == "MenuSettings");
488 object menuIcon = null;
489 object menuImages = null;
490 DataSet menuBanners = null;
491
492 if (menuSettingsParagraph != null)
493 {
494 menuSettingsParagraph.Item.TryGetValue("MenuIcon", out menuIcon);
495 menuSettingsParagraph.Item.TryGetValue("BanerImages", out menuImages);
496 menuBanners = Database.CreateDataSet(string.Format("SELECT * FROM ItemListRelation itr JOIN ItemType_MenuBanner it on it.Id = itr.ItemListRelationItemId WHERE ItemListRelationItemListId = {0} ORDER BY SORT", menuImages));
497 }
498
499 <li data-groupid="@groupId" class="@hasItems @currentClass">
500
501 <a href="javascript:void(0);">
502 <span class="img-wrapp">
503 <span class="img-thumb">
504 <img src="@(menuIcon)" alt="">
505 </span>
506 <span class="text">@group.Name</span>
507 </span>
508 </a>
509
510 @if (group.HasChildGroups)
511 {
512 <div class="meganav-dropdown dropdown-height">
513 <div class="nav-back">Tilbage til @group.Name</div>
514
515 <div class="megamenu-row-wrapper clearfix">
516 <div class="meganav-row">
517
518 @foreach (var subGroup in group.Subgroups)
519 {
520 var subGroupIdStr = subGroup.Id.ToString().Replace("-at-SHOP1", "");
521 int subGroupId;
522
523
524 if (!subGroup.NavigationShowInMenu) { continue; }
525
526 if (int.TryParse(subGroupIdStr, out subGroupId))
527 {
528 var subGroupNormalizedName = subGroup.ProductGroupFieldValues.GetProductGroupFieldValue("ELSNormalizedName").Value;
529 var href = String.Format("{0}/{1}", groupNormalizedName, subGroupNormalizedName);
530
531 <div class="nav-wrapper">
532
533 <div class="nav-label">
534 <a href="@href">
535 <span class="img-wrapp">
536 @*<span class="img-thumb">
537 <img src="https://cdn1.elsalg.dk/inetimagegen.ashx?altFmImage_path=/Files/ELSALG/eCom/Pictures/0000000000001.png&Width=280&image=/files/ELSALG/eCom/Groups/@(subGroupId).png&width=246&height=@(subGroupId%20==%20304%20?%20246%20:%20286)" alt="">
538 </span>*@
539 <span class="text">@subGroup.Name</span>
540 </span>
541 </a>
542 </div>
543
544 <div class="nav-wrapper-dropdown">
545
546 <div class="nav-back">Tilbage til @subGroup.Name</div>
547
548 <ul>
549
550 <li class="nav-label-mobile"><a href="@href">@subGroup.Name</a></li>
551
552 <li data-groupid="@subGroupId">
553
554 @if (subGroup == null) { continue; }
555
556 <span class="toggle-drop"></span>
557 <div class="dropdown-menu">
558 <ul class="thumb-subcategory">
559
560 @foreach (var subItem in subGroup.Subgroups.Take(5))
561 {
562 var subItemNormalizedName = subItem.ProductGroupFieldValues.GetProductGroupFieldValue("ELSNormalizedName").Value;
563 var subHref = String.Format("{0}/{1}/{2}", groupNormalizedName, subGroupNormalizedName, subItemNormalizedName);
564
565 <li><a href="@subHref">@subItem.Name</a></li>
566 }
567 @if (subGroup.Subgroups.Count() > 5)
568 {
569 <li class="nav-more"><a href="@href">Vis alle</a></li>
570
571 }
572
573 </ul>
574 </div>
575
576 </li>
577
578 </ul>
579 </div>
580 </div>
581 }
582
583 }
584
585 @if (groupId.ToString() == "10" || groupId.ToString() == "50")
586 {
587 <div class="nav-wrapper">
588 <div class="nav-label">
589 <a href="/miele">
590 <span class="txt">Miele</span>
591 </a>
592 </div>
593 </div>
594 }
595
596 </div>
597
598 @if (menuBanners != null && menuBanners.Tables.Count > 0 && menuBanners.Tables[0].Rows.Count > 0)
599 {
600 <div class="megamenu-gallery clearfix">
601 @foreach (DataRow imgRow in menuBanners.Tables[0].Rows)
602 {
603 var bannerImage = imgRow["BannerImage"].ToString();
604 var bannerLink = imgRow["BannerLink"].ToString();
605 <div><a href="@bannerLink"><img src="@bannerImage" alt=""></a></div>
606 }
607 </div>
608 }
609
610 </div>
611
612 </div>
613 }
614 </li>
615
616 }
617 catch (Exception e)
618 {
619 <h1>@e.Message</h1>
620 }
621 }
622 }
623
624
625
626
627 <div class="error-page">
628
629 <!-- 404 error -->
630 <div class="container_4 clearfix">
631 <div class="grid_4 info">404</div>
632 <!--$$Global:Paragraph.Content(3479)-->
633 </div>
634 <!--$$Global:Paragraph.Content(3480)-->
635 </div>
636
637 <script type='text/javascript'>
638 var _gaq = _gaq || [];
639 _gaq.push(['_setAccount', 'UA-28232652-1']);
640 _gaq.push(['_trackPageview']);
641 _gaq.push(['_trackPageview', '/404error/?url=' + document.location.pathname + document.location.search + '&ref=' + document.referrer]);
642
643 (function () {
644 var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
645 ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
646 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
647 })();
648 </script>
649
650
651 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>>
652 @using Dynamicweb.Content
653 @using Dynamicweb
654 @using System
655 @using Dynamicweb.Data
656 @using System.Data
657
658 <div class="delimited">
659 <article id="footer-promo" class="container_4 clearfix">
660 <div class="promo-blocks">
661 <!--$$Global:Paragraph.Content(78)-->
662 </div>
663 </article>
664 </div>
665
666
667 <article id="footer-text">
668 <div class="container_4 clearfix">
669 <div class="grid_4" id="dwfootertext">@GetValue("DwContent(dwfootertext)")</div>
670 <!--$$Snippet(footerText)-->
671 </div>
672 </article>
673
674 <!-- Footer - navigation, address info etc. -->
675 <footer>
676 <div class="footer-columns container_4 clearfix">
677
678 <div class="footer-column mobile footer-logo-mobile grid_1">
679 <a href="https://www.euronics.dk/" target="_blank">
680 <img class="lazy" src="https://res.cloudinary.com/euronics-danmark-a-s/q_auto,f_auto/Assets/images/Euronics-group-230x70.png" alt="Euronics Logo">
681 </a>
682 </div>
683
684 <div class="footer-column grid_1">
685 <div class="title">
686 Betal med
687 </div>
688
689 <div class="content">
690 <ul class="cards">
691 <li>
692 <img src="/Files/Templates/Designs/elsalg/assets/images/cards/dankort-fs8.png" alt="Dankort">
693 </li>
694 <li>
695 <img src="/Files/Templates/Designs/elsalg/assets/images/cards/visa-fs8.png" alt="Visa">
696 </li>
697 <li>
698 <img src="/Files/Templates/Designs/elsalg/assets/images/cards/mastercard-fs8.png" alt="Mastercard">
699 </li>
700 <li>
701 <img src="/Files/Templates/Designs/elsalg/assets/images/cards/maestro-fs8.png" alt="Maestro">
702 </li>
703 <li>
704 <img src="/Files/Templates/Designs/elsalg/assets/images/cards/visa-electron-fs8.png" alt="Visa Electron">
705 </li>
706 <li>
707 <img src="/Files/Templates/Designs/elsalg/assets/images/cards/jcb-fs8.png" alt="JCB">
708 </li>
709 </ul>
710 </div>
711
712 <div class="grid_1 alpha omega">
713 <div class="title">Følg os</div>
714 <div class="content">
715 <ul class="social-media">
716 <li class="facebook">
717 <a href="https://www.facebook.com/elsalg.dk" target="_blank">
718 Facebook
719 </a>
720 </li>
721 </ul>
722 </div>
723 </div>
724
725 <div class="grid_1 alpha omega">
726 <div class="content">
727 <!--$$Global:Paragraph.Content(3505)-->
728 </div>
729 </div>
730 </div>
731 <div class="footer-column grid_1">
732 <div class="title">
733 Produkter
734 </div>
735 <div class="content">
736 <!--$$Global:Paragraph.Content(3483)-->
737 </div>
738 </div>
739 <div class="footer-column grid_1">
740 <div class="title">Kundeservice</div>
741 <div class="content">
742 <!--$$Global:Paragraph.Content(3484)-->
743 </div>
744 </div>
745 <div class="footer-column grid_1">
746 <div class="title">Andre links</div>
747 <div class="content">
748 <!--$$Global:Paragraph.Content(3481)-->
749
750 <a href="https://www.euronics.dk/" target="_blank" class="footer-logo hidden-mobile">
751 <img class="lazy" src="https://res.cloudinary.com/euronics-danmark-a-s/q_auto,f_auto/Assets/images/Euronics-group-230x70.png" alt="Euronics Logo">
752 </a>
753 </div>
754 </div>
755 </div>
756
757 <address>
758 <div class="container_4 clearfix">
759 <div class="grid_4">
760 <img src="/Files/Templates/Designs/elsalg/assets/images/icons/icon-elsalg-euronics.svg" width="227" height="45">
761 <ul>
762 <li>
763 Niels Bohrs vej 33B, Stilling
764 </li>
765 <li>
766 8660 Skanderborg
767 </li>
768 <li>
769 Tlf.: 70 20 11 22
770 </li>
771 <li>
772 CVR: 28 88 60 47
773 </li>
774 <li class="last">
775 <a href="mailto:salg@elsalg.dk">
776 salg@elsalg.dk
777 </a>
778 </li>
779 </ul>
780 </div>
781 </div>
782 </address>
783 </footer>
784 </div>
785
786 <script type="text/javascript" src="/Files/Templates/Designs/elsalg/assets/scripts/jquery.tap.min.js"></script>
787 <script type="text/javascript" src="/Files/Templates/Designs/elsalg/assets/scripts/jquery.hoverIntent.min.js"></script>
788
789 <script type="text/javascript" src="/Files/Templates/Designs/elsalg/assets/scripts/jquery.livequery.js"></script>
790 <script type="text/javascript" src="/Files/Templates/Designs/elsalg/assets/scripts/jquery.placeholder.min.js"></script>
791 <script type="text/javascript" src="/Files/Templates/Designs/elsalg/assets/scripts/jquery.touchSwipe.min.js"></script>
792 <script type="text/javascript" src="/Files/Templates/Designs/elsalg/assets/scripts/jquery.swipable.js"></script>
793 <script type="text/javascript" src="/Files/Templates/Designs/elsalg/assets/scripts/jquery.heightadjust.js"></script>
794 <script type="text/javascript" src="/Files/Templates/Designs/elsalg/assets/scripts/jquery.ba-outside-events.min.js"></script>
795 <script type="text/javascript" src="/Files/Templates/Designs/elsalg/assets/scripts/jquery.highlights.js"></script>
796 <script type="text/javascript" src="/Files/Templates/Designs/elsalg/assets/scripts/jquery.magnific-popup.min.js"></script>
797 <script type="text/javascript" src="/Files/Templates/Designs/elsalg/assets/scripts/jquery.form.min.js"></script>
798 <script type="text/javascript" src="/Files/Templates/Designs/elsalg/assets/scripts/jquery.cookie.js"></script>
799 <script type="text/javascript" src="/Files/Templates/Designs/elsalg/assets/scripts/jquery.prettycheckbox.js"></script>
800 <script type="text/javascript" src="/Files/Templates/Designs/elsalg/assets/scripts/owl/owl.carousel.js"></script>
801 <script type="text/javascript" src="/Files/Templates/Designs/elsalg/assets/scripts/ios.js"></script>
802 <script type="text/javascript" src="/Files/Templates/Designs/elsalg/assets/scripts/imagesloaded.pkgd.min.js"></script>
803 <script type="text/javascript" src="/Files/Templates/Designs/elsalg/assets/scripts/footable.js"></script>
804 <script type="text/javascript" src="/Files/Templates/Designs/elsalg/assets/scripts/modernizr.custom.59296.js"></script>
805 <script type="text/javascript" src="/Files/Templates/Designs/elsalg/assets/scripts/imagesloaded.pkgd.min.js"></script>
806 <script type="text/javascript" src="/Files/Templates/Designs/elsalg/assets/scripts/jquery-ui-1.10.3.custom.min.js"></script>
807 <script type="text/javascript" src="/Files/Templates/Designs/elsalg/assets/scripts/jquery.ui.touch-punch.min.js"></script>
808 <script type="text/javascript" src="/Files/Templates/Designs/elsalg/assets/scripts/jquery.lazy.min.js"></script>
809 <script type="text/javascript" src="/Files/Templates/Designs/elsalg/assets/scripts/ddpowerzoomer.js"></script>
810 <script type="text/javascript" src="/Files/Templates/Designs/elsalg/assets/scripts/el-salg.js?ver=2.2"></script>
811 <script type="text/javascript" src="/Files/Templates/Designs/elsalg/assets/scripts/main.js?ver=1.3"></script>
812
813 <!-- TrustBox script -->
814 <script type="text/javascript" src="//widget.trustpilot.com/bootstrap/v5/tp.widget.bootstrap.min.js" async=""></script>
815 <!-- End Trustbox script -->
816
817
818 @if (!HttpContext.Current.Request.RawUrl.StartsWith("/miele") && !HttpContext.Current.Request.UserAgent.Contains("mqCef/mqcef"))
819 {
820 <script type="text/javascript">
821 /* <![CDATA[ */
822 (function () {
823 var s = document.createElement('script'); s.type = 'text/javascript'; s.charset = 'utf-8';
824 s.src = '/elsalg-sticknote?stickNoteId=3218&v=' + Math.random();
825 document.body.appendChild(s);
826 })();
827 /* ]]> */
828 </script>
829 }
830
831 <script>
832
833 //Hide login link when user is logged in
834 $('a[href$="/Log-ind.aspx"]').parent().addClass('loginLi');
835 <!--$$If(Global:Extranet.UserID!=0)-->
836 $('.loginLi').hide()
837 <!--$$EndIf-->
838
839 </script>
840
841 <!--$$Snippet(scripts)-->
842
843 <div class="loading"></div>
844
845 <div id="addtocart-popup" class="mfp-hide"></div>
846
847 @foreach(KeyValuePair<string, string> symbol in ProductProvider.SymbolLinks())
848 {
849 if (!symbol.Value.IsNullOrEmpty())
850 {
851 string id = symbol.Key.Replace(".", "");
852 <div id="@id-popup" class="mfp-hide">
853 <div id="@symbol.Key-content">
854 @symbol.Value
855 </div>
856 </div>
857 }
858 }
859
860 <!-- Raptor Tracking Script Code -->
861 <script>
862 (function (d, t) {
863 var g = d.createElement(t),
864 s = d.getElementsByTagName(t)[0];
865 g.src = '//az19942.vo.msecnd.net/script/raptor-2.1.0.js';
866 s.parentNode.insertBefore(g, s);
867 }(document, 'script'));
868 </script>
869
870 </body>
871 </html>