Error executing template "Designs/OlgerdinVefverslun/_parsed/Frontpage_ViteBridge.parsed.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
at CompiledRazorTemplates.Dynamic.RazorEngine_86404a3831474bd29a35b9fe00e8d9df.GetPageStyles() in E:\webcontent\beta.olgerdin.is\Files\Templates\Designs\OlgerdinVefverslun\_parsed\Frontpage_ViteBridge.parsed.cshtml:line 301
at CompiledRazorTemplates.Dynamic.RazorEngine_86404a3831474bd29a35b9fe00e8d9df.Execute() in E:\webcontent\beta.olgerdin.is\Files\Templates\Designs\OlgerdinVefverslun\_parsed\Frontpage_ViteBridge.parsed.cshtml:line 290
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 Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel>
2 @using Advania.FileSystem;
3 @using Advania.Ecommerce.Infrastructure.Vite;
4 @using Advania.Configuration;
5 @using Advania.Custom;
6 @using Dynamicweb;
7 @using Advania.Users.UserManagement;
8 @using Advania.Users.UserManagement.Extensions;
9 @using Dynamicweb.Security.UserManagement;
10
11 @{
12 var vite = new ViteService(new ViteConfig(Files.GetRelativePath(ConfigManager.General.ViteManifestPath))
13 {
14 ModuleSrc = ConfigManager.General.ViteModuleSrc,
15 PublicPath = ConfigManager.General.VitePublicPath,
16 VersionHash = ConfigManager.General.Version
17 });
18
19 var useViteLocalModule = ConfigManager.Env == AppEnvEnum.Development;
20
21 var contextAttributes = new Dictionary<string, object>() {
22 { "area-id", Model.Area.ID },
23 { "area-name", Model.Area.Name },
24 { "shop-id", Dynamicweb.Content.Services.Areas.GetArea(Model.Area.ID).EcomShopId },
25 { "page-id", Model.ID },
26 { "home-page-id", Model.Area.FirstActivePage.ID },
27 { "user-feed-page-id", GetPageIdByNavigationTag("GetUserFeed") },
28 { "cart-feed-page-id", GetPageIdByNavigationTag("CartFeed") },
29 { "my-pages-page-id", GetPageIdByNavigationTag("MyPages") },
30 { "login-page-id", GetPageIdByNavigationTag("LoginPage") },
31 { "register-page-id", GetPageIdByNavigationTag("RegisterPage") },
32 { "register-company-page-id", GetPageIdByNavigationTag("RegisterCompanyPage") },
33 { "product-search-page-id", GetPageIdByNavigationTag("ProductSearch") },
34 { "product-typeahead-page-id", GetPageIdByNavigationTag("ProductTypeaheadSearch") },
35 { "company-invite-page-id", GetPageIdByNavigationTag("CompanyInvitePage") },
36 { "secondary-users-feed-page-id", GetPageIdByNavigationTag("SecondaryUsersFeed") },
37 { "customer-center-list-feed-page-id", GetPageIdByNavigationTag("CustomerCenterListFeed") },
38 { "translations-timestamp", new System.IO.FileInfo(Files.GetTemplatePath("OlgerdinVefverslun", "Translations.xml")).LastWriteTimeUtc.ToString("o") }
39 };
40
41 var pageIndex = new Dictionary<string, string>()
42 {
43 { "ProductFeedPage", Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(GetPageIdByNavigationTag("ProductFeedPage")) },
44 { "LiveFeedPage", Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(GetPageIdByNavigationTag("LiveFeedPage")) },
45 { "BrandPage", Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(GetPageIdByNavigationTag("BrandPage")) },
46 { "ProductSearch", Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(GetPageIdByNavigationTag("ProductSearch")) }
47 };
48
49 if (Model.CurrentUser != null)
50 {
51 contextAttributes["current-user-id"] = Model.CurrentUser.ID;
52 }
53
54 if (Model.Cart != null)
55 {
56 contextAttributes["current-cart-id"] = Model.Cart.ID;
57 }
58
59 var subAreaPage = Dynamicweb.Content.Services.Pages.GetPage(Model.TopPage.ID);
60 if (subAreaPage.ItemType == "Advania_Sub_Area")
61 {
62 contextAttributes["sub-area-name"] = subAreaPage.GetDisplayName();
63
64 if (subAreaPage.Item.TryGetValue("Brand_Page", out object brandPage))
65 {
66 var brandPageId = Dynamicweb.Environment.Helpers.LinkHelper.GetInternalPageId(brandPage.ToString());
67 pageIndex["BrandPage"] = Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(brandPageId);
68 }
69
70 if (subAreaPage.Item.TryGetValue("Search_Page", out object searchPage) && searchPage != null)
71 {
72 var searchPageId = Dynamicweb.Environment.Helpers.LinkHelper.GetInternalPageId(searchPage.ToString());
73 if (searchPageId > 0)
74 {
75 contextAttributes["product-search-page-id"] = searchPageId;
76 }
77 }
78
79 if (subAreaPage.Item.TryGetValue("Typeahead_Page", out object typeaheadPage) && typeaheadPage != null)
80 {
81 var typeaheadPageId = Dynamicweb.Environment.Helpers.LinkHelper.GetInternalPageId(typeaheadPage.ToString());
82 if (typeaheadPageId > 0)
83 {
84 contextAttributes["product-typeahead-page-id"] = typeaheadPageId;
85 }
86 }
87
88 if (subAreaPage.Item.TryGetValue("Persist_Search_Context", out object persistSearchContext) && persistSearchContext?.ToString() == "True")
89 {
90 contextAttributes["persist-search-context"] = "true";
91 }
92 }
93
94
95 var myProductsPageId = GetPageIdByNavigationTag("MyProducts");
96 if (myProductsPageId > 0)
97 {
98 var myProductsPage = Dynamicweb.Content.Services.Pages.GetPage(myProductsPageId);
99 if (myProductsPage != null && Dynamicweb.Frontend.SecurityHandler.IsCurrentUserAllowed(myProductsPage))
100 {
101 contextAttributes["my-products-page-id"] = myProductsPageId;
102 }
103 }
104
105 var shopContext = Model.Area.Name.ToLower().Contains("danol") ? ShopContext.Danol : ShopContext.Olgerdin;
106 contextAttributes["repository-name"] = shopContext == ShopContext.Olgerdin ? "Products" : "DanolShop";
107 contextAttributes["query-name"] = "Products";
108
109 if (Model.Area.Item != null)
110 {
111 contextAttributes["service-desk-email"] = Model.Area.Item.GetString("Email");
112 contextAttributes["service-desk-phone"] = Model.Area.Item.GetString("PhoneNumber");
113 }
114
115 var contextAttributesFormatted = string.Join(" ", contextAttributes.Select(attr => string.Format("{0}='{1}'", attr.Key, attr.Value)));
116
117 if (!Model.IsCurrentUserAllowed)
118 {
119 System.Web.HttpContext.Current.Response.Redirect("/Default.aspx?ID=" + GetPageIdByNavigationTag("LoginPage"));
120 }
121
122 var googleTagManagerID = Model.Area.Item?.GetString("Google_Tag_Manager_ID");
123
124
125 /* Restores ability to set background image from Website settings which Ölgerðin & Danól use for Holidaythemes */
126 var layoutStyles = "";
127 if (Model.Area.Item != null)
128 {
129
130 var styles = new Dictionary<string, string>();
131 var image = Model.Area.Item.GetString("Background_Image");
132 if (!string.IsNullOrWhiteSpace(image))
133 {
134 styles.Add("background-image", string.Format("url('{0}')", image));
135 }
136 var backgroundSize = Model.Area.Item.GetString("Background_Image_Size");
137 if (!string.IsNullOrWhiteSpace(backgroundSize))
138 {
139 styles.Add("background-size", backgroundSize);
140 }
141
142 var backgroundRepeat = Model.Area.Item.GetString("Background_Image_Repeat");
143 if (!string.IsNullOrWhiteSpace(backgroundRepeat))
144 {
145 styles.Add("background-repeat", backgroundRepeat);
146 }
147
148 layoutStyles = string.Join(";", styles.Select(prop => string.Format("{0}:{1}", prop.Key, prop.Value)).ToArray());
149 }
150
151 var toast = "";
152 var toastType = "success";
153
154 var janusLoginResults = System.Web.HttpContext.Current.Session["Janus_Activation_Success"];
155 if (janusLoginResults != null && Dynamicweb.Security.UserManagement.User.GetCurrentFrontendUser() != null)
156 {
157 System.Web.HttpContext.Current.Session.Remove("Janus_Activation_Success");
158 toast = Translate("Rafræn skilríki hafa verið virkjuð");
159 }
160
161 var globalPopup = GetPageIdByNavigationTag("GlobalPopup");
162 var genesysChatEnabled = Model.Area.Item != null ? Model.Area.Item.GetBoolean("Genesys_Chat_Enabled") : true;
163 }
164
165 <!DOCTYPE html>
166 <html lang="@Pageview.Area.CultureInfo.TwoLetterISOLanguageName">
167 <head>
168 <meta charset="utf-8" />
169 <meta name="viewport" content="width=device-width, initial-scale=1.0" />
170 <meta name="PageID" value="@Model.ID" />
171 @Model.MetaTags
172
173 @if (!string.IsNullOrWhiteSpace(googleTagManagerID))
174 {
175 <script>
176 (function (w, d, s, l, i) {
177 w[l] = w[l] || []; w[l].push({
178 'gtm.start':
179 new Date().getTime(), event: 'gtm.js'
180 }); var f = d.getElementsByTagName(s)[0],
181 j = d.createElement(s), dl = l != 'dataLayer' ? '&l=' + l : ''; j.async = true
182 ; j.defer = true; j.src =
183 'https://www.googletagmanager.com/gtm.js?id=' + i + dl; f.parentNode.insertBefore(j, f);
184 })(window, document, 'script', 'dataLayer', '@(googleTagManagerID)');
185 </script>
186 }
187 <title>@Model.Title - @(shopContext == ShopContext.Olgerdin ? "Ölgerðin Egill Skallagrímsson" : "Danól") </title>
188 <style>
189 [v-cloak] {
190 display: none;
191 }
192 </style>
193 <link rel="shortcut icon" type="image/x-icon" href="@Model.Area.Item.GetString("Favicon")" />
194
195 @* Legacy scripts *@
196 <script src="/Files/Templates/Designs/OlgerdinVefverslun/JS/Libraries/Prod_Jquery-3.3.1.js" defer></script>
197 <script src="/Files/Templates/Designs/OlgerdinVefverslun/JS/Libraries/owl.carousel.min.js" defer></script>
198 <script src="/Files/Templates/Designs/OlgerdinVefverslun/JS/Libraries/typeahead-0.11.1.js" defer></script>
199 @if (useViteLocalModule)
200 {
201 @vite.RenderModuleAssets()
202 }
203 else
204 {
205 @vite.RenderManifestAssets()
206 }
207
208 @if (shopContext == ShopContext.Olgerdin)
209 {
210 <text><link rel="stylesheet" href="/Files/Templates/Designs/OlgerdinVefverslun/Genesys/Olgerdin/styles.css?v=8">
211 <style>
212 #messageInput {
213 min-width: 0;
214 }
215 </style>
216 <script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
217 </text>;
218 }
219 else if (shopContext == ShopContext.Danol)
220 {
221 <text><link rel="stylesheet" href="/Files/Templates/Designs/OlgerdinVefverslun/Genesys/Danol/styles.css?v=9">
222 <style>
223 #messageInput {
224 min-width: 0;
225 }
226 </style>
227 <script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
228 </text>;
229 }
230
231 @* Enable injecting scripts/styles for further down in DW Template renderer, see Files\Templates\eCom7\CheckoutHandler\Borgun3D\Post\Post.cshtml *@
232 @RenderSnippet("MasterHeadEnd")
233 </head>
234
235 <body class="theme theme--@shopContext.ToString().ToLower() scrollbar scrollbar--thick">
236 @{
237 var cacheHit = System.Runtime.Caching.MemoryCache.Default.Get("RUID");
238 if (cacheHit != null)
239 {
240 var ruidInCache = (string)cacheHit;
241
242 if (!string.IsNullOrWhiteSpace(ruidInCache))
243 {
244 <input type="hidden" id="RUID" value="@ruidInCache" />
245 System.Runtime.Caching.MemoryCache.Default.Remove("RUID");
246 }
247 }
248 if (Model.CurrentUser != null)
249 {
250 <input type="hidden" id="UserId" value="@Model.CurrentUser.ID" />
251 }
252 }
253 @if (!string.IsNullOrWhiteSpace(googleTagManagerID))
254 {
255 <noscript>
256 <iframe src="https://www.googletagmanager.com/ns.html?id=@(googleTagManagerID)"
257 height="0" width="0" style="display:none;visibility:hidden"></iframe>
258 </noscript>
259 }
260 <div id="app" v-cloak>
261 <nav-provider :page-index='@Newtonsoft.Json.JsonConvert.SerializeObject(pageIndex)'>
262 <dynamicweb-context-provider @contextAttributesFormatted>
263 <nav-scroll-top-button></nav-scroll-top-button>
264 @Navigation.RenderNavigation("Navigation/Navbar.cshtml", new Dynamicweb.Frontend.Navigation.NavigationSettings()
265 {
266 StartLevel = 1,
267 StopLevel = 99,
268 ExpandMode = Dynamicweb.Frontend.Navigation.ExpandMode.All
269 })
270
271 @{
272 var topPage = Dynamicweb.Content.Services.Pages.GetPage(Model.TopPage.ID);
273 var renderMegamenu = topPage.NavigationTag.Contains("Megamenu");
274
275 if (renderMegamenu)
276 {
277 <div class="legacy">
278 <div class="megamenu-desktop">
279 @Navigation.RenderNavigation("Navigation/Megamenu.cshtml", new Dynamicweb.Frontend.Navigation.NavigationSettings()
280 {
281 StartLevel = 2,
282 ExpandMode = Dynamicweb.Frontend.Navigation.ExpandMode.All,
283 RootPageId = topPage.ID
284 })
285 </div>
286 </div>
287 }
288 }
289
290 <layout-master @(renderMegamenu ? "megamenu" : "") style="@layoutStyles">
291 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel>
292
293
294
295 @functions
296 {
297 string GetPageStyles()
298 {
299 var styles = new Dictionary<string, string>();
300
301 var image = Model.PropertyItem.GetString("Background_Image");
302 if (!string.IsNullOrWhiteSpace(image))
303 {
304 styles.Add("background-image", string.Format("url('{0}')", image));
305 }
306 var backgroundSize = Model.PropertyItem.GetString("Background_Image_Size");
307 if (!string.IsNullOrWhiteSpace(backgroundSize))
308 {
309 styles.Add("background-size", backgroundSize);
310 }
311
312 var backgroundRepeat = Model.PropertyItem.GetString("Background_Image_Repeat");
313 if (!string.IsNullOrWhiteSpace(backgroundRepeat))
314 {
315 styles.Add("background-repeat", backgroundRepeat);
316 }
317
318 return string.Join(";", styles.Select(prop => string.Format("{0}:{1}", prop.Key, prop.Value)).ToArray());
319 }
320 }
321
322 <legacy-provider :is-enabled="true" :is-page="true">
323 <div class="frontPage" style="@GetPageStyles()">
324 <div>
325 @Model.Placeholder("bannerPlaceholder", "Banner Placeholder", "sort:2")
326 </div>
327 <div>
328 @Model.Placeholder("mainContentPlaceholder", "Main Content Placeholder", "default:true;sort:1")
329 </div>
330 </div>
331 </legacy-provider>
332 </layout-master>
333 @Navigation.RenderNavigation("Navigation/Footer.cshtml", new Dynamicweb.Frontend.Navigation.NavigationSettings()
334 {
335 StartLevel = 1,
336 StopLevel = 99,
337 ExpandMode = Dynamicweb.Frontend.Navigation.ExpandMode.All,
338 RootNavigationTag = "Footer",
339 Parameters = new Dictionary<string, object>()
340 {
341 {"serviceDeskNumber", Model.Area.Item.GetString("PhoneNumber") },
342 {"serviceDeskText", Model.Area.Item.GetString("Text_1") },
343 {"companyInformation", Model.Area.Item.GetString("Text_2") }
344 }
345 })
346 @{
347 var currentUser = Dynamicweb.Security.UserManagement.User.GetCurrentFrontendUser();
348 var userManagementService = new UserManagementService();
349
350 if (currentUser != null && !currentUser.IsCustomerUser())
351 {
352 IEnumerable<User> usersForSelection = userManagementService.GetCustomerUsersForUser(currentUser.ID, Pageview.Area.EcomShopId).Result;
353 if (usersForSelection.Count() > 0)
354 {
355 <select-account-prompt></select-account-prompt>
356 }
357 else if (Model.Item == null || Model.Item.SystemName != "UserPage")
358 {
359 var userManagementPageId = GetPageIdByNavigationTag("Advania_UserManagement");
360 if (userManagementPageId > 0)
361 {
362 var userManagementItem = Dynamicweb.Content.Services.Items.GetItemByPageId(userManagementPageId, false);
363 if (userManagementItem != null)
364 {
365 int companyAccessAuthParagraphId = -1;
366 object companyAccessAuthObj;
367 if (userManagementItem.TryGetValue("Company_Access_Auth_Paragraph_Id", out companyAccessAuthObj) && companyAccessAuthObj != null)
368 {
369 companyAccessAuthParagraphId = Dynamicweb.Core.Converter.ToInt32(companyAccessAuthObj.ToString());
370 }
371
372 if (companyAccessAuthParagraphId > 0)
373 {
374 <auth-company-access-required-modal>
375 @RenderParagraphContent(companyAccessAuthParagraphId)
376 </auth-company-access-required-modal>
377 }
378 }
379 }
380 }
381 }
382 }
383 <svg-defs></svg-defs>
384 </dynamicweb-context-provider>
385 </nav-provider>
386 <toasts toast="@toast" toast-type="@toastType"></toasts>
387 @if (globalPopup != 0)
388 {
389 @RenderPageContent(globalPopup)
390 }
391 </div>
392 @if (shopContext == ShopContext.Olgerdin && genesysChatEnabled)
393 {
394 <text><!-- Launcher Button with Chat Icon -->
395 <button id="startButton"
396 onclick="toggleChat()">
397 <svg width="24"
398 height="22"
399 viewBox="0 0 24 22"
400 fill="none"
401 xmlns="http://www.w3.org/2000/svg">
402 <path d="M11.9999 2C5.8968 2 1.49993 5.96562 1.49993 10.25C1.49993 11.9891 2.22649 13.5594 3.37493 14.9375C3.61868 15.2328 3.76868 15.6312 3.7218 16.0578C3.57649 17.3234 3.18743 18.5188 2.51711 19.6344C2.49368 19.6766 2.46555 19.7188 2.44211 19.7562C2.96243 19.6203 3.48274 19.4281 3.97493 19.2172C4.7718 18.8703 5.5218 18.4344 6.24367 17.9328C6.64211 17.6562 7.15305 17.5813 7.61242 17.7359C9.0468 18.2234 10.5046 18.5 11.9999 18.5C18.1031 18.5 22.4999 14.5344 22.4999 10.25C22.4999 5.96562 18.1031 2 11.9999 2ZM-7.47609e-05 10.25C-7.47609e-05 4.86875 5.36711 0.5 11.9999 0.5C18.6327 0.5 23.9999 4.86875 23.9999 10.25C23.9999 15.6313 18.6327 20 11.9999 20C10.3124 20 8.69524 19.6859 7.1343 19.1609C7.12492 19.1562 7.11086 19.1609 7.10149 19.1656C6.3093 19.7141 5.47493 20.2016 4.57493 20.5953C3.44993 21.0828 2.09524 21.5 0.749925 21.5C0.445238 21.5 0.173363 21.3172 0.0561752 21.0406C-0.0610123 20.7641 0.00461273 20.4406 0.21555 20.225C0.595238 19.8406 0.92805 19.3719 1.23274 18.8656C1.78118 17.9469 2.1093 16.9625 2.23118 15.9078C2.23118 15.9078 2.22649 15.9031 2.22649 15.8984C0.918675 14.3328 -7.47609e-05 12.4344 -7.47609e-05 10.25Z"
403 fill="currentColor" />
404 </svg>
405 </button>
406
407 <!-- Chat Container -->
408 <div class="chat-container">
409 <div class="chat-header">
410 <div class="chat-chatbot-header">
411 <span class="chat-chatbot-icon">
412 <svg width="48"
413 height="48"
414 viewBox="0 0 48 48"
415 fill="none"
416 xmlns="http://www.w3.org/2000/svg">
417 <g clip-path="url(#clip0_7390_3303)">
418 <rect width="48"
419 height="48"
420 rx="24"
421 fill="#002643" />
422 <path d="M54.7086 49.4537L54.6676 39.7274C54.6676 32.1267 50.4562 24.6373 39.8182 24.6373H7.52653C-3.11401 24.6373 -7.32414 32.1241 -7.32414 39.7274L-7.36255 49.4537H17.0595C15.5972 47.9915 15.2809 45.8147 15.2809 43.451V41.1641C15.2809 40.0936 14.5191 27.3083 23.7063 27.0881C30.8743 27.3032 31.9396 35.2164 32.0651 39.1115C32.0651 38.2677 32.0651 37.8042 32.0651 39.1474C32.0907 40.0412 32.0702 40.7236 32.0651 41.0386V43.451C32.0651 45.8109 31.7488 47.9876 30.2865 49.4537H54.7111H54.7099H54.7086Z"
423 fill="white" />
424 <path d="M16.9112 21.6539H6.2348C5.12849 21.6539 4.23218 20.7576 4.23218 19.6513V11.5383L16.9099 21.6539H16.9112Z"
425 fill="#FCBA16" />
426 <path d="M30.3751 21.6539H41.049C42.1553 21.6539 43.0516 20.7576 43.0516 19.6513V11.5383L30.3739 21.6539H30.3764H30.3751Z"
427 fill="#FCBA16" />
428 <path d="M30.3751 21.6539L23.6425 12.8751L16.9112 21.6539H30.3751Z"
429 fill="#FCBA16" />
430 </g>
431 <defs>
432 <clipPath id="clip0_7390_3303">
433 <rect width="48"
434 height="48"
435 rx="24"
436 fill="white" />
437 </clipPath>
438 </defs>
439 </svg>
440 </span>
441 <span>Vefspjall</span>
442 </div>
443 <button id="closeButton"
444 onclick="toggleChat(false)">
445 <svg width="24"
446 height="24"
447 viewBox="0 0 24 24"
448 fill="none"
449 xmlns="http://www.w3.org/2000/svg">
450 <path d="M21.75 12C21.75 12.4125 21.4125 12.75 21 12.75H3C2.5875 12.75 2.25 12.4125 2.25 12C2.25 11.5875 2.5875 11.25 3 11.25H21C21.4125 11.25 21.75 11.5875 21.75 12Z"
451 fill="white" />
452 </svg>
453 </button>
454 </div>
455 <div id="chatBox"></div>
456 <div class="input-area">
457 <div class="message-input-container">
458 <input type="text"
459 id="messageInput"
460 placeholder="Skrifaðu skilaboðin þín hér..." />
461 <button id="sendButton"
462 onclick="sendMessage()">
463 <svg width="20"
464 height="20"
465 viewBox="0 0 20 20"
466 fill="none"
467 xmlns="http://www.w3.org/2000/svg">
468 <path d="M19.8164 10.4414C20.0586 10.1992 20.0586 9.80078 19.8164 9.55859L14.1914 3.93359C13.9492 3.69141 13.5508 3.69141 13.3086 3.93359C13.0664 4.17578 13.0664 4.57422 13.3086 4.81641L17.8672 9.375H0.625C0.28125 9.375 0 9.65625 0 10C0 10.3438 0.28125 10.625 0.625 10.625H17.8672L13.3086 15.1836C13.0664 15.4258 13.0664 15.8242 13.3086 16.0664C13.5508 16.3086 13.9492 16.3086 14.1914 16.0664L19.8164 10.4414Z"
469 fill="white" />
470 </svg>
471 </button>
472 </div>
473 <span class="file-name"
474 id="fileName"></span>
475 </div>
476 </div>
477
478 <script src="/Files/Templates/Designs/OlgerdinVefverslun/Genesys/Olgerdin/config.js?v=4"></script>
479 <script src="/Files/Templates/Designs/OlgerdinVefverslun/Genesys/Olgerdin/chat.js?v=4"></script>
480 </text>;
481 }
482 else if (shopContext == ShopContext.Danol && genesysChatEnabled)
483 {
484 <text><!-- Launcher Button with Chat Icon -->
485 <button id="startButton"
486 onclick="toggleChat()">
487 <svg width="24"
488 height="22"
489 viewBox="0 0 24 22"
490 fill="none"
491 xmlns="http://www.w3.org/2000/svg">
492 <path d="M11.9999 2C5.8968 2 1.49993 5.96562 1.49993 10.25C1.49993 11.9891 2.22649 13.5594 3.37493 14.9375C3.61868 15.2328 3.76868 15.6312 3.7218 16.0578C3.57649 17.3234 3.18743 18.5188 2.51711 19.6344C2.49368 19.6766 2.46555 19.7188 2.44211 19.7562C2.96243 19.6203 3.48274 19.4281 3.97493 19.2172C4.7718 18.8703 5.5218 18.4344 6.24367 17.9328C6.64211 17.6562 7.15305 17.5813 7.61242 17.7359C9.0468 18.2234 10.5046 18.5 11.9999 18.5C18.1031 18.5 22.4999 14.5344 22.4999 10.25C22.4999 5.96562 18.1031 2 11.9999 2ZM-7.47609e-05 10.25C-7.47609e-05 4.86875 5.36711 0.5 11.9999 0.5C18.6327 0.5 23.9999 4.86875 23.9999 10.25C23.9999 15.6313 18.6327 20 11.9999 20C10.3124 20 8.69524 19.6859 7.1343 19.1609C7.12492 19.1562 7.11086 19.1609 7.10149 19.1656C6.3093 19.7141 5.47493 20.2016 4.57493 20.5953C3.44993 21.0828 2.09524 21.5 0.749925 21.5C0.445238 21.5 0.173363 21.3172 0.0561752 21.0406C-0.0610123 20.7641 0.00461273 20.4406 0.21555 20.225C0.595238 19.8406 0.92805 19.3719 1.23274 18.8656C1.78118 17.9469 2.1093 16.9625 2.23118 15.9078C2.23118 15.9078 2.22649 15.9031 2.22649 15.8984C0.918675 14.3328 -7.47609e-05 12.4344 -7.47609e-05 10.25Z"
493 fill="currentColor" />
494 </svg>
495 </button>
496
497 <!-- Chat Container -->
498 <div class="chat-container">
499 <div class="chat-header">
500 <div class="chat-chatbot-header">
501 <span>Vefspjall</span>
502 </div>
503 <button id="closeButton"
504 onclick="toggleChat(false)">
505 <svg width="24"
506 height="24"
507 viewBox="0 0 24 24"
508 fill="none"
509 xmlns="http://www.w3.org/2000/svg">
510 <path d="M21.75 12C21.75 12.4125 21.4125 12.75 21 12.75H3C2.5875 12.75 2.25 12.4125 2.25 12C2.25 11.5875 2.5875 11.25 3 11.25H21C21.4125 11.25 21.75 11.5875 21.75 12Z"
511 fill="white" />
512 </svg>
513 </button>
514 </div>
515 <div id="chatBox"></div>
516 <div class="input-area">
517 <div class="message-input-container">
518 <input type="text"
519 id="messageInput"
520 placeholder="Skrifaðu skilaboðin þín hér..." />
521 <button id="sendButton"
522 onclick="sendMessage()">
523 <svg width="20"
524 height="20"
525 viewBox="0 0 20 20"
526 fill="none"
527 xmlns="http://www.w3.org/2000/svg">
528 <path d="M19.8164 10.4414C20.0586 10.1992 20.0586 9.80078 19.8164 9.55859L14.1914 3.93359C13.9492 3.69141 13.5508 3.69141 13.3086 3.93359C13.0664 4.17578 13.0664 4.57422 13.3086 4.81641L17.8672 9.375H0.625C0.28125 9.375 0 9.65625 0 10C0 10.3438 0.28125 10.625 0.625 10.625H17.8672L13.3086 15.1836C13.0664 15.4258 13.0664 15.8242 13.3086 16.0664C13.5508 16.3086 13.9492 16.3086 14.1914 16.0664L19.8164 10.4414Z"
529 fill="currentColor" />
530 </svg>
531 </button>
532 </div>
533 <span class="file-name"
534 id="fileName"></span>
535 </div>
536 </div>
537
538 <script src="/Files/Templates/Designs/OlgerdinVefverslun/Genesys/Danol/config.js?v=4"></script>
539 <script src="/Files/Templates/Designs/OlgerdinVefverslun/Genesys/Danol/chat.js?v=4"></script> </text>;
540 }
541 </body>
542 </html>
543 @* Utility snipper if we need to inject code outside of Master HTML context, like html blocks with injected <script> tags. @see Files/Templates/eCom7/CheckoutHandler/Borgun3D/3DS/ThreeDS.cshtml *@
544 @RenderSnippet("MasterEnd")