Error compiling template "Designs/Fusion/_parsed/LoginwithImpersonation.parsed.cshtml"
Line 1591: 'Dynamicweb.Security.UserManagement.User' does not contain a definition for 'UserID' and no extension method 'UserID' accepting a first argument of type 'Dynamicweb.Security.UserManagement.User' could be found (are you missing a using directive or an assembly reference?)
1 @inherits RazorTemplateBase<RazorTemplateModel<Template>>
2 @using Dynamicweb.Rendering;
3 @using System.Text.RegularExpressions;
4 @using System.Web;
5 @using Dynamicweb.Environment;
6
7 @helper RenderScripts(string location)
8 {
9 //possible location values: header, body, footer;
10 //posible scope: tracking, marketing, preferences, functional;
11 //possible cookie option values;
12 //no cookies = 0;
13 //functional only=1;
14 //all=2;
15 //marketing = 3;
16 //tracking = 4;
17 //preferences = 5;
18 //Item.Area.Tracking.Code;
19 //Item.Area.Tracking.Location;
20 //Item.Area.Tracking.Scope;
21 //cookie=Dynamicweb.CookieOptInLevel;
22 //Functional;
23 //None;
24 //All;
25 CookieOptInLevel level = CookieManager.GetCookieOptInLevel();
26 int x = (int)level;
27 string[] allowedFunctional = {"functional"};
28 string[] allowedTracking = {"functional","tracking"};
29 string[] allowedMarketing = {"functional","marketing","tracking"};
30 string[] allowedScope = {"functional"};
31 switch(x)
32 {
33 case 0:
34 allowedScope = allowedFunctional;
35 break;
36 case 1:
37 allowedScope = allowedTracking;
38 break;
39 case 2:
40 allowedScope = allowedMarketing;
41 break;
42 default:
43 allowedScope = allowedFunctional;
44 break;
45 }
46
47 if(!string.IsNullOrEmpty(location) && x > 0){
48 var trackingScripts = GetLoop("Item.Area.Tracking").Where(a=>a.GetString("Item.Area.Tracking.Location") == location);
49 trackingScripts = trackingScripts.Where(z=>allowedScope.Any(y=>y == z.GetString("Item.Area.Tracking.Scope")));
50 foreach(var trackingScript in trackingScripts){
51 <text>@trackingScript.GetString("Item.Area.Tracking.Code")</text>
52 }
53 }
54
55
56 }
57
58
59 @functions {
60 private string CommaSplittedString(string CommaSplittedString, string NewString)
61 {
62
63 if (!string.IsNullOrEmpty(CommaSplittedString))
64 {
65 CommaSplittedString += ", ";
66 }
67 CommaSplittedString = NewString;
68
69 return CommaSplittedString;
70 }
71 public static string StripHtml(string source)
72 {
73 return Regex.Replace(source, "<.*?>", string.Empty);
74 }
75
76
77
78
79
80
81
82
83 }
84 <!DOCTYPE html>
85 <!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
86 <!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
87 <!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
88 <!--[if gt IE 8]> <html class="no-js"> <![endif]-->
89
90 <head>
91 @using Dynamicweb;
92 @using Dynamicweb.Ecommerce.Products;
93 @using Dynamicweb.Security.UserManagement;
94 @using Dynamicweb.Modules.UserManagement;
95 @using Dynamicweb.Frontend;
96 @using System.Web;
97 @using System;
98 @{
99 var serviceLocator = Dynamicweb.Extensibility.ServiceLocator.Current;
100 var pageService = serviceLocator.GetInstance<Dynamicweb.Content.IPageService>();
101
102 var DisplayOptions = "";
103
104 if (!string.IsNullOrEmpty(GetGlobalValue("Global:Item.Page.DisplayOptions").ToString())){
105 DisplayOptions = (GetGlobalValue("Global:Item.Page.DisplayOptions").ToString() == "wide") ? "container-wide" : "";
106 }
107 var pageURL = "/Default.aspx?" + System.Web.HttpContext.Current.Request.QueryString;
108 string b2cPageRedirect = "/Default.aspx?ID=4626";
109 var currentPageID = GetGlobalValue("Global:Page.ID");
110
111 var currentUserAccess = Dynamicweb.Security.UserManagement.User.GetCurrentExtranetUser();
112 var user = currentUserAccess;
113 var currentUser = currentUserAccess;
114 bool userIsLoggedIn = currentUser != null;
115
116 string customerNo = userIsLoggedIn ? currentUser.CustomerNumber : "";
117 bool isCS = userIsLoggedIn ? BrandFusion.Dw.Austral.eCommerce.UserExtensions.IsCs(currentUserAccess) : false;
118
119 if(userIsLoggedIn && customerNo == "" && !isCS && currentPageID != "4626" ){
120 HttpContext.Current.Response.Redirect(b2cPageRedirect, false);
121 }
122
123 @*var galleryType = Pageview.Area.Item["Gallery"];
124 var cartBehaviour = Pageview.Area.Item["CartBehaviour"];
125 var cart_page_id = Pageview.Area.Item["CartPage_ID"];*@
126
127 var area = PageView.Current().Area;
128
129 @*var galleryType = PageView.Current().Area.Item["Gallery"];
130 var cartBehaviour = PageView.Current().Area.Item["CartBehaviour"];
131 var cart_page_id = PageView.Current().Area.Item["CartPage_ID"];*@
132
133 @*var currentUser = Dynamicweb.Frontend.PageView.Current().User;
134 var currentUserAccess = Dynamicweb.Modules.UserManagement.User.GetCurrentUser();
135 var firstPageID = Pageview.Area.get_Value("AreaFirstPage");*@
136
137 //var firstPageID = Dynamicweb.Frontend.PageView.Current().Area.AreaFirstPage; //PageView.Current().Area.FirstPage;
138 var firstPageID = pageService.GetFirstPageForArea(area.ID);
139
140
141
142 string cartPage = "13";
143
144 //Rolul userului autentificat
145 int customerRole = -1;
146
147
148 //customer numberul userului autentificat
149 //string customerNo = currentUser.LoggedIn ? currentUser.CustomerNumber.ToString() : null;
150 //string customerNo = currentUserAccess != null ? currentUserAccess.CustomerNumber : null;
151
152 //Id-ul nodului parinte pentru navigatie
153 var navigationParentId = !string.IsNullOrEmpty(customerNo) ? 17 : 17;
154
155 //determina daca navigatia este colapsata sau este vizibila implicit
156 var navigationCollapsed = "category-collapsed";
157 if (!string.IsNullOrEmpty(GetString("Item.Page.DisplayOptions.Value"))){
158 navigationCollapsed = GetString("Item.Page.DisplayOptions.Value");
159 }
160
161 //determina fisierul XSLT folosit pentru randarea navigatiei
162 @*var navigationXSLT = !string.IsNullOrEmpty(customerNo) ? "CategoriesNavigationB2B.xslt" : "CategoriesNavigationB2B.xslt";
163 var navigationMobileXSLT = !string.IsNullOrEmpty(customerNo) ? "CategoriesNavigationMobileB2B-v2.xslt" : "CategoriesNavigationMobileB2B-v2.xslt";*@
164
165 //determina daca afisam navigatie pe coloana din stanga sau nu
166 var navigationColumn = 3;
167
168 //determina numarul de coloane al zonei de content
169 var navigationContent = 9;
170
171 //defineste obiect general de tip customer settings
172 //var customerSettings = !string.IsNullOrEmpty(customerNo) ? BrandFusion.Dw.Austral.eCommerce.CustomerFacade.Get(customerNo) : null;
173 var customerSettings = !string.IsNullOrEmpty(customerNo) ? BrandFusion.Dw.Austral.eCommerce.CustomerFacade.Get(customerNo,"aus") : null;
174
175 //Limita lunara totala pentru comenzi
176 var customerMonthlyLimit = customerSettings != null ? customerSettings.MonthlyBudget.GetValueOrDefault() : 0;
177
178 //Ziua de inceput pentru plasarea comenzilor
179 var customerOrderStart = customerSettings != null ? customerSettings.OrderStart.GetValueOrDefault() : 0;
180
181 //Ziua de sfarsit pentru plasarea comenzilor
182 var customerOrderEnd = customerSettings != null ? customerSettings.OrderEnd.GetValueOrDefault() : 0;
183
184 //Ziua de inceput pentru aprobarea comenzilor
185 var customerApprovalStart = customerSettings != null ? customerSettings.ApprovalStart.GetValueOrDefault() : 0;
186
187 //Ziua de sfarsit pentru aprobarea comenzilor
188 var customerApprovalEnd = customerSettings != null ? customerSettings.ApprovalEnd.GetValueOrDefault() : 0;
189
190 //Valoare minima comanda
191 decimal customerMinimumOrderValue = customerSettings != null ? customerSettings.MinimumOrderValue.GetValueOrDefault() : 0;
192
193 //Mesaj pentru comanda minima
194 string customerMinimumOrderMessage = customerSettings != null ? customerSettings.MinimumOrderValueMessage : "";
195
196 //Ascunde preturile pentru user
197 bool customerHidePrices = false;//customerSettings != null ? customerSettings.HidePrices.GetValueOrDefault() : false;
198
199
200 int todayDay = (int)DateTime.Now.Day;
201
202
203 bool orderAllow = true ;
204 bool approveAllow = true ;
205
206 if (todayDay < customerOrderStart || todayDay > customerOrderEnd){
207 orderAllow = false;
208 }
209 if (todayDay < customerApprovalStart || todayDay > customerApprovalEnd){
210 approveAllow = false;
211 }
212
213
214
215 string customerListGroupID = null;
216 if (currentUserAccess != null) {
217 var productSpecialListNumberField = currentUserAccess.CustomFieldValues.FirstOrDefault(f => f.CustomField.SystemName == "AccessUser_Products_SpecialList_Number");
218 var productSpecialListNumber = productSpecialListNumberField != null ? productSpecialListNumberField.Value as string : null;
219 if (!string.IsNullOrEmpty(productSpecialListNumber)) {
220 customerListGroupID = BrandFusion.Dw.Austral.eCommerce.GroupFacade.GetGroupId(productSpecialListNumber);
221 } else if (!string.IsNullOrEmpty(customerNo)) {
222 customerListGroupID = BrandFusion.Dw.Austral.eCommerce.GroupFacade.GetGroupId(customerNo);
223 }
224 }
225
226 if(!string.IsNullOrEmpty(customerNo)){
227 customerRole = BrandFusion.Dw.Austral.eCommerce.UserFacade.GetRole(currentUserAccess).GetValueOrDefault();
228 }
229
230
231 HttpContext.Current.Session["userListView"] = "box";
232
233 if(System.Web.HttpContext.Current.Request["view"] != null){
234 HttpContext.Current.Session["userListView"] = System.Web.HttpContext.Current.Request["view"];
235 }
236
237 string userListView = HttpContext.Current.Session["userListView"].ToString();
238
239
240 }
241
242
243 <title>@GetValue("Title")</title>
244 @GetValue("MetaTags")
245 @GetValue("CopyRightNotice")
246
247
248 <meta charset="utf-8">
249 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
250
251 <meta name="viewport" content="width=device-width, initial-scale=1">
252
253 @foreach (LoopItem i in GetLoop("Item.Area.Groups")) {
254 if (i.GetString("Item.Area.Group.Name") == "Header") {
255 foreach (LoopItem j in i.GetLoop("Item.Area.Group.Fields")) {
256 <meta name='@j.GetString("Item.Area.Field.Name")' content='@j.GetString("Item.Area.Field.Value")'>
257 }
258 }
259 }
260 @RenderSnippet("Meta")
261
262 <link rel="shortcut icon" href="/Files/Templates/Designs/Fusion/assets/img/favicon.ico">
263 <link href='//fonts.googleapis.com/css?family=Roboto+Slab:400,300,100,700&subset=latin,latin-ext' rel='stylesheet' type='text/css'>
264 <link href='//fonts.googleapis.com/css?family=Roboto+Condensed:400,700,300' rel='stylesheet' type='text/css'>
265 <link href='//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800&subset=latin,latin-ext' rel='stylesheet' type='text/css'>
266 <link href='//fonts.googleapis.com/css?family=Source+Sans+Pro:400,200,600,700,900,300&subset=latin,latin-ext' rel='stylesheet' type='text/css'>
267 <link href='//fonts.googleapis.com/css?family=Open+Sans+Condensed:300,700&subset=latin,latin-ext' rel='stylesheet' type='text/css'>
268
269 @*<link rel="stylesheet" type="text/css" href="//cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.css">
270
271 <link rel="stylesheet" type="text/css" href="//cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css">
272 <link rel="stylesheet" type="text/css" href="//cdnjs.cloudflare.com/ajax/libs/flexslider/2.6.0/flexslider.min.css">
273 <link rel="stylesheet" type="text/css" href="//cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.1/photoswipe.min.css">
274 <link rel="stylesheet" type="text/css" href="//cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.1/default-skin/default-skin.min.css">
275 <link rel="stylesheet" type="text/css" href="//cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.6.0/slick.min.css"> *@
276
277 <link rel="stylesheet" type="text/css" href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
278 <link rel="stylesheet" type="text/css" href="//cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css">
279
280 @* Internal css cdnj*@
281 <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Fusion/assets/css/cdnj/animate.css">
282 @* <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Fusion/assets/css/cdnj/font-awesome.min.css"> *@
283 <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Fusion/assets/css/cdnj/default-skin.min.css">
284 <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Fusion/assets/css/cdnj/flexslider.min.css">
285 @* <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Fusion/assets/css/cdnj/ionicons.min.css"> *@
286 <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Fusion/assets/css/cdnj/photoswipe.min.css">
287 <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Fusion/assets/css/cdnj/slick.min.css">
288
289
290
291
292 @*
293 <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Fusion/assets/css/main.css">
294 <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Fusion/assets/css/fix.css">
295 <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Fusion/assets/css/main-v2.css">
296 *@
297
298
299 <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Fusion/assets/css/main-v3.css">
300
301
302 @* To be deleted *@
303 <link rel="stylesheet" href="/Files/Templates/Designs/Fusion/assets/css/fix-mobile.css">
304 <link rel="stylesheet" href="/Files/Templates/Designs/Fusion/assets/css/fixCss.css">
305 <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Fusion/assets/css/fix-transition.css">
306
307
308
309
310 <!--[if lt IE 9]>
311 <link rel="stylesheet" href="/Files/Templates/Designs/Fusion/assets/css/ie.css" />
312 <script type="text/javascript" src="/Files/Templates/Designs/Fusion/assets/js/html5shiv.min.js"></script>
313 <script type="text/javascript" src="/Files/Templates/Designs/Fusion/assets/js/respond.min.js"></script>
314 <![endif]-->
315
316 <script type="text/javascript" src="/Files/Templates/Designs/Fusion/assets/js/jquery-1.12.3.min.js"></script>
317 <script type="text/javascript" src="/Files/Templates/Designs/Fusion/assets/js/modernizr-2.7.1.min.js"></script>
318 <script type="text/javascript" src="/Files/Templates/Designs/Fusion/assets/js/modernizr-custom.js"></script>
319
320 @RenderSnippet("Head")
321
322 <!-- Facebook Pixel Code -->
323 <script>
324 !function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?
325 n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;
326 n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;
327 t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,
328 document,'script','https://connect.facebook.net/en_US/fbevents.js');
329
330 fbq('init', '1448596761825791');
331 fbq('track', "PageView");</script>
332 <noscript><img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=1448596761825791&ev=PageView&noscript=1"></noscript>
333 <!-- End Facebook Pixel Code -->
334
335
336
337
338 @RenderScripts("header")
339
340
341 <meta name="google-site-verification" content="RC3gdwFLyrYziMTNmlGB9YvN-n-7IDIGCY2rOHAfKQk">
342 <meta name="google-site-verification" content="HwvHBJZdAxmQVtH4XGXNG_Bl1YmafpX8k7RVNF_v2mo">
343 <meta name="google-site-verification" content="7SwW0RX0W2anTHnl1zpoX1V4xfuqBjXw6wjPHUrtMSk">
344 @GetValue("Stylesheets")
345 @GetValue("Javascripts")
346 </head>
347 <body data-pageid='@GetGlobalValue("Global:Page.ID")' data-productpage='@GetValue("Item.Area.Catalog_Page")' data-paragraph='@GetValue("Item.Area.InstantSearch_Paragraph")' data-areaid='@GetGlobalValue("Global:Area.ID")'>
348 @RenderScripts("body")
349 <!--[if lt IE 7]>
350 <p class="chromeframe">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">activate Google Chrome Frame</a> to improve your experience.</p>
351 <![endif]-->
352
353 @* @if (Pageview.Device == Dynamicweb.Frontend.PageView.DeviceType.Mobile || Pageview.Device == Dynamicweb.Frontend.PageView.DeviceType.Tablet) { *@
354 <div class="header-mobile">
355 <div class="col-xs-12">
356 <div class="row">
357 <div class="logo col-xs-6">
358 <a href="/">
359 <img src='@GetValue("Item.Area.Logo")' alt='@GetValue("Item.Area.Site_Name")'>
360 </a>
361 </div>
362 <div class="mobile-nav-trigger col-xs-6">
363 @{
364
365 System.Globalization.TextInfo myTIMobile = new System.Globalization.CultureInfo("en-US", false).TextInfo;
366 @*string userMobile = Dynamicweb.Frontend.PageView.Current().User.UserName;
367 string userProfileNameMobile = Dynamicweb.Frontend.PageView.Current().User.Name;
368 string userCustomerNumberMobile = Dynamicweb.Frontend.PageView.Current().User.CustomerNumber;*@
369 var userMobile = Dynamicweb.Security.UserManagement.User.GetCurrentExtranetUser();
370 var userProfileNameMobile = userMobile;
371 bool userMobileIsLoggedIn = userProfileNameMobile != null;
372
373 string userCustomerNumberMobile = userIsLoggedIn && currentUser.CustomerNumber != null ? currentUser.CustomerNumber.ToString() : null;
374
375
376
377 //string userCustomerNumberMobile = Dynamicweb.Security.UserManagement.User.GetCurrentExtranetUser().CustomerNumber;
378
379
380 string userAccountLinkMobile = "/Default.aspx?ID=9";
381 string userCartLinkMobile = "/Default.aspx?ID=13";
382
383 if (!string.IsNullOrEmpty(userCustomerNumberMobile)) {
384 userAccountLinkMobile = "/Default.aspx?ID=170";
385 userCartLinkMobile = "/Default.aspx?ID=42";
386 }
387
388 }
389
390
391
392 <button type="button" id="mobile-nav-button"><i class="fa fa-bars"></i></button>
393 <div class="minicart">
394 <a href="@userCartLinkMobile">
395 <i class="ion-android-cart"></i>
396 @if (!@GetBoolean("Ecom:Order.IsEmpty")) {
397 <span data-minicart-update="">(0)</span>
398 } else {
399 <span data-minicart-update="">Cosul tau este gol</span>
400 }
401
402 </a>
403 </div>
404
405 @*@if(string.IsNullOrEmpty(userMobile)) {*@
406 @if(userMobile == null) {
407 <button type="button" class="mobile-header-overlay-trigger"><i class="fa fa-user"></i></button>
408 <div class="mobile-header-overlay animated">
409 <a href="/Default.aspx?ID=11" class="btn-main animated">@Translate("Intra in cont","Intra in cont")</a>
410 @*<a href="/Default.aspx?ID=10" class="btn-main animated">@Translate("Creeaza cont","Creeaza cont")</a>*@
411 <button type="button" class="overlay-close"><i class="fa fa-close"></i> @Translate("Inchide","Inchide")</button>
412 </div>
413
414 } else {
415 <button type="button" class="mobile-header-overlay-trigger"><i class="fa fa-user"></i></button>
416 <div class="mobile-header-overlay animated">
417 <a href="/Admin/Public/ExtranetLogoff.aspx" class="btn-main animated"><i class="fa fa-unlock-alt"></i> @Translate("Logout","Logout")</a>
418 <a href="@userAccountLinkMobile" class="btn-main animated"><i class="fa fa-user"></i> @Translate("Contul meu","Contul meu")</a>
419 <button type="button" class="overlay-close"><i class="fa fa-close"></i> @Translate("Inchide","Inchide")</button>
420 </div>
421
422 }
423
424
425 </div>
426
427 <div class="search-mobile col-xs-12"><form action="/Default.aspx?ID=127" method="GET">
428 <div class="form-group">
429 <input type="text" name="q" id="q-mobile" autocomplete="off" spellcheck="false" placeholder='@Translate("search", "Cauta dupa cod sau nume...")' class="form-control">
430 @if(!string.IsNullOrEmpty(customerNo) && !string.IsNullOrEmpty(customerListGroupID)){
431 <input type="hidden" name="CustomerNumber" id="CustomerNumber" value="@customerNo">
432 }
433 <button type="submit"><i class="ion-ios-search-strong"></i></button>
434 <div class="instant_search"></div>
435 </div>
436 </form></div>
437
438 </div>
439 </div>
440 </div>
441 <div id="mobile-navigation-overlay">
442 <button type="button" class="overlay-close"><i class="fa fa-close"></i> @Translate("Inchide","Inchide")</button>
443 <div class="content-scrollable">
444 @*if(!string.IsNullOrEmpty(customerNo)) { *@
445 <ul class="root">
446 <li>
447 <a href="#">Categorii de produse</a>
448 @RenderNavigation(new {
449 template = "CategoriesNavigationMobileB2B-v2.xslt",
450 expandmode = "all",
451 sitemapmode="true",
452 id = "categories",
453 startlevel = 1,
454 endlevel = 5,
455 areaid = 1
456 })
457 </li>
458 </ul>
459 @*}*@
460
461 @if(!string.IsNullOrEmpty(customerNo) ) {
462 @RenderNavigation(new {
463 template = "MainNavigationMobile-v2.xslt",
464 expandmode = "all",
465 id = "NavMainMobileAll",
466 startlevel = 2,
467 endlevel = 4,
468 parentid = 169,
469 customerGroup = @customerListGroupID,
470 customerRole = @customerRole
471 });
472 } else {
473
474 @RenderNavigation(new {
475 template = "MainNavigationMobile-v2.xslt",
476 expandmode = "all",
477 id = "NavMainMobileAll",
478 startlevel = 1,
479 endlevel = 4
480 });
481
482 }
483
484 </div>
485
486
487 </div>
488 @* } *@
489
490 <div class="mobile-wrapper">
491
492 @{
493
494 System.Globalization.TextInfo myTI = new System.Globalization.CultureInfo("en-US", false).TextInfo;
495 @*string user = Dynamicweb.Frontend.PageView.Current().User.UserName;
496 string userProfileName = Dynamicweb.Frontend.PageView.Current().User.Name;
497 string userCustomerNumber = Dynamicweb.Frontend.PageView.Current().User.CustomerNumber;*@
498 //string userProfileName = Dynamicweb.Security.UserManagement.User.GetCurrentExtranetUser().Name;throw new Exception("Exceptie 01");
499
500
501
502 var userProfileName = currentUser;
503
504 bool userLoggedIn = userProfileName != null;
505
506
507
508
509 string userAccountLink = "/Default.aspx?ID=9";
510 string userCartLink = "/Default.aspx?ID=13";
511
512 double cartQuantity = GetDouble("Ecom:Order.OrderLines.TotalProductQuantity");
513 double cartPrice = GetDouble("Ecom:Order.PriceWithoutFees.PriceWithVAT");
514 string currencyCart = GetString("Ecom:Order.Price.Currency.Symbol");
515 BrandFusion.Dw.Austral.eCommerce.CustomerAddress customerDetails = null;
516 string customerLogo = "";
517
518 @*string customerName = Dynamicweb.Frontend.PageView.Current().User != null && !string.IsNullOrEmpty(userProfileName)? userProfileName : "";*@
519 @*string customerName = currentUserAccess != null && !string.IsNullOrEmpty(userProfileName)? userProfileName : "";*@
520 string customerName = currentUserAccess != null ? userProfileName.Name.ToString() : "";
521
522 string userCustomerNumber = userIsLoggedIn && currentUser.CustomerNumber != null ? currentUser.CustomerNumber.ToString() : null;
523
524
525 if(!string.IsNullOrEmpty(userCustomerNumber)) {
526
527
528 cartPrice = GetDouble("Ecom:Order.PriceWithoutFees.PriceWithoutVAT");
529 }
530
531 if (!string.IsNullOrEmpty(userCustomerNumber)) {
532
533
534 userAccountLink = "/Default.aspx?ID=170";
535 userCartLink = "/Default.aspx?ID=42";
536
537 }
538
539 if(!string.IsNullOrEmpty(userCustomerNumber)){
540
541
542 customerDetails = BrandFusion.Dw.Austral.eCommerce.CustomerFacade.GetB2bBillingAddress(userCustomerNumber);
543
544 if (customerDetails != null)
545 {
546 customerName = customerDetails.Company;
547 customerLogo = !string.IsNullOrEmpty(customerDetails.GeoLocationImage) ? "/Files/Images/Austral/CustomerLogos/"+customerDetails.GeoLocationImage : "";
548 }
549 }
550
551 }
552 @SnippetStart("Head")
553
554 @SnippetEnd("Head")
555
556
557 <div class="header-top hidden-xs hidden-sm">
558 <div class="container">
559 <div class="row">
560 <div class="col-md-12">
561 @*@if(!string.IsNullOrEmpty(user)) {*@
562 @if(userIsLoggedIn) {
563 <ul class="right-align">
564 @*@if(!string.IsNullOrEmpty(userProfileName)) {*@
565 @if(userLoggedIn) {
566 <li>
567 @if (string.IsNullOrWhiteSpace(GetGlobalValue("Global:Extranet.SecondaryUser.UserID"))) {
568 <a href="@userAccountLink"> <i class="ion-ios-locked-outline"></i>
569
570 @userProfileName.Name
571
572 @if(!string.IsNullOrEmpty(userCustomerNumber)) {
573 <span>- @userCustomerNumber</span>
574 }
575
576 </a>
577 } else{
578 <span>
579 <a href="/Default.aspx?ID=3500">@GetGlobalValue("Global:Extranet.SecondaryUser.Name") - (@GetGlobalValue("Global:Extranet.SecondaryUser.UserName")) @Translate("ImpersonatedBy", "este impersonat de") @Pageview.User.Name (@Pageview.User.UserName)</a>
580 </span>
581 }
582 </li>
583 <li><a href="/Admin/Public/ExtranetLogoff.aspx">@Translate("logout", "Logout")</a></li>
584 }
585
586 </ul>
587 }
588 <ul class="left-align">
589 <li><p>@GetValue("Item.Area.Program")</p></li>
590
591 @if(!string.IsNullOrEmpty(GetString("Item.Area.Telefon"))) {
592 <li><p>@GetValue("Item.Area.Telefon")</p></li>
593 }
594 </ul>
595
596 </div>
597
598
599
600 </div>
601 </div>
602 </div>
603 <div class="header-middle hidden-xs hidden-sm">
604 <div class="container">
605 <div class="row">
606
607 <div id="logo" class="col-sm-3 hidden-xs">
608 <a href="/">
609 <img src='@GetValue("Item.Area.Logo")' alt='@GetValue("Item.Area.Site_Name")'>
610 </a>
611 </div>
612
613 <div class="header-search-v2 col-sm-9">
614 <div class="row">
615
616
617 <div class="col-sm-6 col-md-5 col-lg-6">
618
619 <form action="/Default.aspx?ID=127" method="GET" data-file="search-v2">
620 <div class="form-group">
621 <input type="text" name="q" id="q" autocomplete="off" spellcheck="false" placeholder='@Translate("search", "Cauta dupa cod sau nume...")' class="form-control">
622 <input type="hidden" id="ID" name="ID" value="127">
623 @if(!string.IsNullOrEmpty(customerNo) && !string.IsNullOrEmpty(customerListGroupID)){
624 <input type="hidden" name="CustomerNumber" id="CustomerNumber" value="@customerNo">
625 }
626 <button type="submit"><i class="ion-ios-search-strong"></i></button>
627 <div class="instant_search"></div>
628 </div>
629 </form>
630
631 </div>
632 @*@if(string.IsNullOrEmpty(user)) {*@
633 @if(!userIsLoggedIn) {
634 <div class="header-account col-sm-3 col-md-4 col-lg-3">
635 @*<a href="/Default.aspx?ID=10">@Translate("CreateAccount", "Creeaza cont")</a> <text>|</text>*@ <a href="/Default.aspx?ID=11">@Translate("Login", "Login")</a>
636 </div>
637 } else {
638 <div class="header-account customer col-sm-3 col-md-4 col-lg-3">
639 <a href="@userAccountLink">
640 @if (!string.IsNullOrEmpty(customerLogo)){
641 <img src="/Admin/Public/GetImage.ashx?Image=@customerLogo&Format=jpg&Width=190&Height=85&Compression=100&Crop=5" class="img-responsive">
642 }else{
643 <span>@customerName</span>
644 }
645 </a>
646 </div>
647 }
648
649 <div class="col-sm-3 col-md-3 col-lg-3 minicart">
650 <a href="@userCartLink">
651 <i class="ion-android-cart"></i>
652 @*@if (!@GetBoolean("Ecom:Order.IsEmpty")) {*@
653 @if (@GetBoolean("Ecom:Order.IsEmpty")) {
654 <span data-minicart-update="">(@cartQuantity) - @cartPrice<sup> @currencyCart</sup></span>
655 } else {
656 <span data-minicart-update="">Cosul este gol</span>
657 }
658
659 </a>
660 </div>
661 </div>
662 </div>
663 </div>
664 </div>
665 </div>
666
667
668
669 @SnippetStart("BottomJS")
670 <script type="text/javascript" src="/Files/Templates/Designs/Fusion/assets/js/main-v2.js"></script>
671 @SnippetEnd("BottomJS")
672 <div class="main-nav-2 hidden-xs hidden-sm">
673 <span style="display: none;">
674 @GetGlobalValue("Global:Item.Page.DisplayOptions").ToString()
675 </span>
676
677 <div class="container">
678 <div class="row">
679
680
681 <div class="col-md-3 hidden-sm hidden-xs">
682 <div class="left-nav-box clearfix @navigationCollapsed">
683 <div class="category-heading"><p>Categorii de produse</p></div>
684 <div class="menu3dmega" id="menuMega">
685 @RenderNavigation(new {
686 template = "CategoriesNavigationB2B.xslt",
687 expandmode = "all",
688 sitemapmode="true",
689 id = "categories",
690 startlevel = 1,
691 endlevel = 5,
692 areaid = 1
693 })
694 </div>
695 </div>
696 </div>
697 @if(!string.IsNullOrEmpty(customerNo))
698 {
699 <div class="col-md-9" style="padding-left: 0;">
700 @RenderNavigation(new {
701 template = "MainNavigation-v2.xslt",
702 expandmode = "all",
703 id = "NavMainAll",
704 startlevel = 2,
705 endlevel = 4,
706 parentid = 169,
707 customerGroup = @customerListGroupID,
708 customerRole = @customerRole
709 })
710
711 </div>
712 } else {
713
714 @*RenderSnippet("Homepagenavigation")*@
715
716 <div class="col-md-9">
717 @RenderNavigation(new {
718 template = "MainNavigation-v2.xslt",
719 expandmode = "all",
720 id = "NavMainAll",
721 startlevel = 1,
722 endlevel = 4
723 })
724 </div>
725
726 }
727 </div>
728 </div>
729 </div>
730
731 <div class="container">
732 <div class="row">
733
734
735 @if (Pageview.User.UserID == 0) {
736
737 <h3>Autentificare</h3>
738 <div class="login-box-mode" data-login-box-mode="login">
739 @if (!string.IsNullOrWhiteSpace(System.Web.HttpContext.Current.Request["username"]) || !string.IsNullOrWhiteSpace(System.Web.HttpContext.Current.Request["password"])) {
740 <div class="loginbox-login-failed alert alert-error">Datele de utilizator introduse nu sunt corecte</div>
741 }
742
743 <form class="form-horizontal" method="post">
744 <div class="control-group">
745 <input type="text" id="login-username" name="username" spellcheck="false" placeholder="Username" value='@System.Web.HttpContext.Current.Request["username"]'>
746 </div>
747 <div class="control-group">
748 <input type="password" id="login-password" name="password" placeholder="Password" value='@System.Web.HttpContext.Current.Request["password"]'>
749 </div>
750 <input type="submit" value="Login">
751 </form>
752 </div>
753 } else {
754
755 @: Esti autentificat cu userul @Pageview.User.UserName
756 <br>
757 <br>
758
759 <form method="post">
760 @if (string.IsNullOrWhiteSpace(GetGlobalValue("Global:Extranet.SecondaryUser.UserID"))) {
761 <table border="0">
762 <tr>
763 <td>Alege userul pe care vrei sa il impersonezi</td>
764 </tr>
765 <tr>
766 <td>
767 <select id="DWExtranetSecondaryUserSelector" name="DWExtranetSecondaryUserSelector">
768 @foreach (var secondaryUser in GetLoop("DWExtranetSecondaryUsers")) {
769 <option value='@secondaryUser.GetValue("UserID")'>@secondaryUser.GetValue("UserName")</option>
770 }
771 </select>
772 </td>
773 </tr>
774 <tr>
775 <td colspan="2"><input type="submit" tabindex="3" value="OK"></td>
776 </tr>
777 </table>
778 } else {
779 <h3>@GetGlobalValue("Global:Extranet.SecondaryUser.UserName") este impersonat de @Pageview.User.UserName.</h3>
780 <br>
781 <input type="submit" name="DwExtranetRemoveSecondaryUser" id="DwExtranetRemoveSecondaryUser" value="Stop impersonation">
782 }
783 <br>
784 <br>
785
786 <a class="btn" href="/Admin/Public/ExtranetLogoff.aspx?ID=@Pageview.Page.ID">Logout</a>
787
788
789
790
791 </form>
792 }
793 </div>
794 </div>
795 <div class="container">
796 <div class="row">
797
798
799 <div class="brands-wrapper">
800 <div class="container">
801 <div class="col-md-12">
802 <div class="row">
803
804 @RenderParagraphContent(1514)
805
806 @* <div class="logo-slider">
807 <div class="flexslider">
808 <ul class="slides">
809 @{
810 var manufacturers = Dynamicweb.Ecommerce.Products.Manufacturer.GetManufacturers();
811 int counter = 0;
812 int howManyOnRow = 1;
813
814 foreach (var manufacturer in manufacturers)
815 {
816 if (!string.IsNullOrEmpty(manufacturer.Logo)){
817 if (counter % howManyOnRow == 0){
818 if (counter == 0){
819 @:<li class='item active'>
820 }
821 else {
822 @:</li><li class="item">
823 }
824 }
825
826 <a href="#">
827 <img src="/Files/@manufacturer.Logo.Trim('/')">
828 </a>
829 if (counter % howManyOnRow == howManyOnRow - 1)
830 {
831 @:</li>
832 }
833 counter++;
834 }
835 }
836 if (counter % howManyOnRow != 0)
837 {
838 @:
839 }
840 }
841 </ul>
842 </div>
843 </div>*@
844
845 @*<div class="brands-list-navigation product-list-navigation">
846 <a href="#" class="flex-prev"><i class="ion-ios-arrow-back"></i></a>
847 <a href="#" class="flex-next"><i class="ion-ios-arrow-forward"></i></a>
848 </div> *@
849
850
851 </div>
852 </div>
853 </div>
854 </div>
855 </div>
856 </div>
857 @*
858 <div class="services-list">
859 <div class="container">
860 <div class="row">
861 <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
862 <div class="rec-banner hand">
863 <div class="banner clearfix">
864 <div class="services-icon">
865 <img src="http://cdn.aperta.ro/Files/Templates/Designs/Fusion/assets/img/austral-hand.png" class="img-responsive">
866 </div>
867
868 <div class="pull-left text-box">
869 <h3>Garantie</h3>
870 <p>@GetValue("Item.Area.Garantie")</p>
871 </div>
872 </div>
873 </div>
874 </div>
875 <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
876 <div class="rec-banner return">
877 <div class="banner clearfix">
878 <div class="services-icon">
879 <img src="http://cdn.aperta.ro/Files/Templates/Designs/Fusion/assets/img/austral-return.png" class="img-responsive">
880 </div>
881 <div class="pull-left text-box">
882 <h3>Retur in 14 zile</h3>
883 <p>@GetValue("Item.Area.Retur")</p>
884 </div>
885 </div>
886 </div>
887 </div>
888 <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
889 <div class="rec-banner support">
890 <div class="banner clearfix">
891 <div class="services-icon">
892 <img src="http://cdn.aperta.ro/Files/Templates/Designs/Fusion/assets/img/austral-support.png" class="img-responsive">
893 </div>
894 <div class="pull-left text-box">
895 <h3>Serviciu clienti</h3>
896 <p>@GetValue("Item.Area.Serviciu_Clienti")</p>
897 </div>
898 </div>
899 </div>
900 </div>
901 <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
902 <div class="rec-banner car">
903 <div class="banner clearfix">
904 <div class="services-icon">
905 <img src="http://cdn.aperta.ro/Files/Templates/Designs/Fusion/assets/img/austral-car.png" class="img-responsive">
906 </div>
907 <div class="pull-left text-box">
908 <h3>Transport gratuit</h3>
909 @if(!string.IsNullOrEmpty(customerNo)){
910 <p>@GetValue("Item.Area.TransportB2B")</p>
911 }else{
912 <p>@GetValue("Item.Area.Transport")</p>
913 }
914 </div>
915 </div>
916 </div>
917 </div>
918 </div>
919 </div>
920 </div>*@
921
922
923
924
925 <div class="footer">
926 <div class="container">
927 <div class="row">
928
929 <div class="col-md-3 col-sm-6 col-xs-12 shopinfo">
930 <h4 class="title">AUSTRAL</h4>
931 <p>
932 @GetValue("Item.Area.Contact")
933 </p>
934 <div class="social-icons">
935 <ul>
936 <li class="icon facebook"><a href='@GetValue("Item.Area.Facebook_Link")' target="_blank"><i class="fa fa-facebook fa-fw"></i></a></li>
937 <li class="icon twitter"><a href='@GetValue("Item.Area.Twitter_Link")' target="_blank"><i class="fa fa-twitter fa-fw"></i></a></li>
938 <li class="icon linkedin"><a href='@GetValue("Item.Area.Linkedin_link")' target="_blank"><i class="fa fa-linkedin fa-fw"></i></a></li>
939 <li class="icon google-plus"><a href='@GetValue("Item.Area.GooglePlus_Link")' target="_blank"><i class="fa fa-google-plus fa-fw"></i></a></li>
940 </ul>
941 </div>
942 </div>
943 <div class="col-md-3 col-sm-6 col-xs-12 footermenu">
944 <h4 class="title">UTILE </h4>
945 @GetValue("DwNavigation(BottomNavigation)")
946 <a href="http://australservicii.ro/" target="_blank"><img src="/Files/Templates/Designs/Fusion/assets/img/Banner_Australservicii.png" alt="" style="margin: 9px 0 0 0;"></a>
947 </div>
948 <div class="col-md-3 col-sm-6 col-xs-12 footermenu">
949 <h4 class="title">COMENZI</h4>
950 @GetValue("DwNavigation(BottomNavigation1)")
951 <img src="/Files/Templates/Designs/Fusion/assets/img/MobilPay-banner.png" alt="">
952 </div>
953 <div class="col-md-3 col-sm-6 col-xs-12 getintouch">
954 <h4 class="title">Certificari</h4>
955 <img src="/Files/Templates/Designs/Fusion/assets/img/ukas.jpg" alt="">
956 </div>
957
958 </div>
959 </div>
960 </div>
961 <div class="cart--footer">
962 <div class="container">
963 <div class="row">
964 <div class="col-xs-12">
965 <a href="#" class="emptyCart">Goleste cos</a>
966 @GetValue("CartV2.NextStepButtonName")
967
968 @{
969 var cartLink = "/Default.aspx?ID=13";
970 if(!string.IsNullOrEmpty(customerNo)) {
971 cartLink = "/Default.aspx?ID=42";
972 }
973 }
974 <a class="cart" href="@cartLink">
975 <span class="spacing">Aveti <span class="em" cartproducts="">produse</span> in cos</span>
976 <span class="spacing">Cost total: <span class="em" carttotals="">Cosul este gol</span></span>
977 <span class="spacing cart--footer__button">@Translate("footer checkout", "Vezi cosul tau")</span>
978 </a>
979 </div>
980 </div>
981 </div>
982 </div>
983 </div>
984
985
986
987
988
989 @* JS Libraries *@
990 <script type="text/javascript" src="/Files/Templates/Designs/Fusion/assets/js/bootstrap.min.js"></script>
991 <script type="text/javascript" src="/Files/Templates/Designs/Fusion/assets/js/libraries/slick.min.js"></script>
992
993
994 @* <script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.3/js/select2.min.js" type="text/javascript"></script> *@
995
996 <script type="text/javascript" src="/Files/Templates/Designs/Fusion/assets/js/cdnjs/select2.min.js"></script>
997
998 <script type="text/javascript" src="/Files/Templates/Designs/Fusion/assets/js/jquery.noty.packaged.js"></script>
999 <script type="text/javascript" src="/Files/Templates/Designs/Fusion/assets/js/bpopup.js"></script>
1000 <script type="text/javascript" src="/Files/Templates/Designs/Fusion/assets/js/jquery.flexslider.min.js"></script>
1001
1002
1003
1004
1005 <script type="text/javascript" src="/Files/Templates/Designs/Fusion/assets/js/libraries/jscookie.js"></script>
1006 <script type="text/javascript" src="/Files/Templates/Designs/Fusion/assets/js/alertify.js"></script>
1007 @* <script type="text/javascript" src="/Files/Templates/Designs/Fusion/assets/js/mobile-menu.js"></script> *@
1008 <script type="text/javascript" src="/Files/Templates/Designs/Fusion/assets/js/mobile-menu-v2.js"></script>
1009 <script type="text/javascript" src="/Files/Templates/Designs/Fusion/assets/js/login.js"></script>
1010 <script type="text/javascript" src="/Files/Templates/Designs/Fusion/assets/js/main.js"></script>
1011 <script type="text/javascript" src="/Files/Templates/Designs/Fusion/assets/js/carousels.js"></script>
1012 <script type="text/javascript" src="/Files/Templates/Designs/Fusion/assets/js/main-v2.js?v=2"></script>
1013 <script type="text/javascript" src="/Files/Templates/Designs/Fusion/assets/js/product-modal.js"></script>
1014
1015
1016 @* <script src="https://cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.1/photoswipe.min.js" type="text/javascript"></script>
1017 <script src="https://cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.1/photoswipe-ui-default.min.js" type="text/javascript"></script>
1018 <script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.16.6/lodash.min.js" type="text/javascript" charset="utf-8"></script> *@
1019
1020 @* Internal js cdnj*@
1021 <script type="text/javascript" src="/Files/Templates/Designs/Fusion/assets/js/cdnjs/lodash.min.js"></script>
1022 <script type="text/javascript" src="/Files/Templates/Designs/Fusion/assets/js/cdnjs/photoswipe.min.js"></script>
1023 <script type="text/javascript" src="/Files/Templates/Designs/Fusion/assets/js/cdnjs/photoswipe-ui-default.min.js"></script>
1024
1025
1026
1027
1028
1029 <script type="text/javascript" src="/Files/Templates/Designs/Fusion/assets/js/product-list.js"></script>
1030 <script type="text/javascript" src="/Files/Templates/Designs/Fusion/assets/js/loader.js"></script>
1031 <script type="text/javascript" src="/Files/Templates/Designs/Fusion/assets/js/minicart.js"></script>
1032 <script type="text/javascript" src="/Files/Templates/Designs/Fusion/assets/js/voucher.js"></script>
1033 <script type="text/javascript" src="/Files/Templates/Designs/Fusion/assets/js/cart.js"></script>
1034 <script type="text/javascript" src="/Files/Templates/Designs/Fusion/assets/js/jquery.validate.js"></script>
1035
1036 @RenderSnippet("modalBottom")
1037 @RenderSnippet("bottomJS")
1038
1039 @* Quickview modal *@
1040 <div class="b-modal" id="quickview">
1041 <div id="results" class="clearfix"></div>
1042 </div>
1043
1044
1045
1046 @RenderScripts("footer")
1047 </body>
1048