Error compiling template "Designs/Fusion/_parsed/LoginwithImpersonation.parsed.cshtml"
Line 1605: '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 217 if(!string.IsNullOrEmpty(customerNo)){ 218 219 customerListGroupID= BrandFusion.Dw.Austral.eCommerce.GroupFacade.GetGroupId(customerNo); 220 customerRole = BrandFusion.Dw.Austral.eCommerce.UserFacade.GetRole(currentUserAccess).GetValueOrDefault(); 221 } 222 223 224 HttpContext.Current.Session["userListView"] = "box"; 225 226 if(System.Web.HttpContext.Current.Request["view"] != null){ 227 HttpContext.Current.Session["userListView"] = System.Web.HttpContext.Current.Request["view"]; 228 } 229 230 string userListView = HttpContext.Current.Session["userListView"].ToString(); 231 232 233 } 234 235 236 <title>@GetValue("Title")</title> 237 @GetValue("MetaTags") 238 @GetValue("CopyRightNotice") 239 240 241 <meta charset="utf-8"> 242 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> 243 244 <meta name="viewport" content="width=device-width, initial-scale=1"> 245 246 @foreach (LoopItem i in GetLoop("Item.Area.Groups")) { 247 if (i.GetString("Item.Area.Group.Name") == "Header") { 248 foreach (LoopItem j in i.GetLoop("Item.Area.Group.Fields")) { 249 <meta name='@j.GetString("Item.Area.Field.Name")' content='@j.GetString("Item.Area.Field.Value")'> 250 } 251 } 252 } 253 @RenderSnippet("Meta") 254 255 <link rel="shortcut icon" href="/Files/Templates/Designs/Fusion/assets/img/favicon.ico"> 256 <link href='//fonts.googleapis.com/css?family=Roboto+Slab:400,300,100,700&subset=latin,latin-ext' rel='stylesheet' type='text/css'> 257 <link href='//fonts.googleapis.com/css?family=Roboto+Condensed:400,700,300' rel='stylesheet' type='text/css'> 258 <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'> 259 <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'> 260 <link href='//fonts.googleapis.com/css?family=Open+Sans+Condensed:300,700&subset=latin,latin-ext' rel='stylesheet' type='text/css'> 261 <link rel="stylesheet" type="text/css" href="//cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.css"> 262 <link rel="stylesheet" type="text/css" href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"> 263 <link rel="stylesheet" type="text/css" href="//cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css"> 264 <link rel="stylesheet" type="text/css" href="//cdnjs.cloudflare.com/ajax/libs/flexslider/2.6.0/flexslider.min.css"> 265 <link rel="stylesheet" type="text/css" href="//cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.1/photoswipe.min.css"> 266 <link rel="stylesheet" type="text/css" href="//cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.1/default-skin/default-skin.min.css"> 267 <link rel="stylesheet" type="text/css" href="//cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.6.0/slick.min.css"> 268 269 270 @* 271 <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Fusion/assets/css/main.css"> 272 <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Fusion/assets/css/fix.css"> 273 <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Fusion/assets/css/main-v2.css"> 274 *@ 275 276 277 <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Fusion/assets/css/main-v3.css"> 278 279 280 @* To be deleted *@ 281 <link rel="stylesheet" href="/Files/Templates/Designs/Fusion/assets/css/fix-mobile.css"> 282 <link rel="stylesheet" href="/Files/Templates/Designs/Fusion/assets/css/fixCss.css"> 283 <link rel="stylesheet" type="text/css" href="/Files/Templates/Designs/Fusion/assets/css/fix-transition.css"> 284 285 286 287 288 <!--[if lt IE 9]> 289 <link rel="stylesheet" href="/Files/Templates/Designs/Fusion/assets/css/ie.css" /> 290 <script type="text/javascript" src="/Files/Templates/Designs/Fusion/assets/js/html5shiv.min.js"></script> 291 <script type="text/javascript" src="/Files/Templates/Designs/Fusion/assets/js/respond.min.js"></script> 292 <![endif]--> 293 294 <script type="text/javascript" src="/Files/Templates/Designs/Fusion/assets/js/jquery-1.12.3.min.js"></script> 295 <script type="text/javascript" src="/Files/Templates/Designs/Fusion/assets/js/modernizr-2.7.1.min.js"></script> 296 <script type="text/javascript" src="/Files/Templates/Designs/Fusion/assets/js/modernizr-custom.js"></script> 297 298 @RenderSnippet("Head") 299 300 <!-- Facebook Pixel Code --> 301 <script> 302 !function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod? 303 n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n; 304 n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0; 305 t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window, 306 document,'script','https://connect.facebook.net/en_US/fbevents.js'); 307 308 fbq('init', '1448596761825791'); 309 fbq('track', "PageView");</script> 310 <noscript><img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=1448596761825791&ev=PageView&noscript=1"></noscript> 311 <!-- End Facebook Pixel Code --> 312 313 314 315 316 @RenderScripts("header") 317 318 319 <meta name="google-site-verification" content="RC3gdwFLyrYziMTNmlGB9YvN-n-7IDIGCY2rOHAfKQk"> 320 <meta name="google-site-verification" content="HwvHBJZdAxmQVtH4XGXNG_Bl1YmafpX8k7RVNF_v2mo"> 321 <meta name="google-site-verification" content="7SwW0RX0W2anTHnl1zpoX1V4xfuqBjXw6wjPHUrtMSk"> 322 @GetValue("Stylesheets") 323 @GetValue("Javascripts") 324 </head> 325 <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")'> 326 @RenderScripts("body") 327 <!--[if lt IE 7]> 328 <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> 329 <![endif]--> 330 331 @* @if (Pageview.Device == Dynamicweb.Frontend.PageView.DeviceType.Mobile || Pageview.Device == Dynamicweb.Frontend.PageView.DeviceType.Tablet) { *@ 332 <div class="header-mobile"> 333 <div class="col-xs-12"> 334 <div class="row"> 335 <div class="logo col-xs-6"> 336 <a href="/"> 337 <img src='@GetValue("Item.Area.Logo")' alt='@GetValue("Item.Area.Site_Name")'> 338 </a> 339 </div> 340 <div class="mobile-nav-trigger col-xs-6"> 341 @{ 342 343 System.Globalization.TextInfo myTIMobile = new System.Globalization.CultureInfo("en-US", false).TextInfo; 344 @*string userMobile = Dynamicweb.Frontend.PageView.Current().User.UserName; 345 string userProfileNameMobile = Dynamicweb.Frontend.PageView.Current().User.Name; 346 string userCustomerNumberMobile = Dynamicweb.Frontend.PageView.Current().User.CustomerNumber;*@ 347 var userMobile = Dynamicweb.Security.UserManagement.User.GetCurrentExtranetUser(); 348 var userProfileNameMobile = userMobile; 349 bool userMobileIsLoggedIn = userProfileNameMobile != null; 350 351 string userCustomerNumberMobile = userIsLoggedIn && currentUser.CustomerNumber != null ? currentUser.CustomerNumber.ToString() : null; 352 353 354 355 //string userCustomerNumberMobile = Dynamicweb.Security.UserManagement.User.GetCurrentExtranetUser().CustomerNumber; 356 357 358 string userAccountLinkMobile = "/Default.aspx?ID=9"; 359 string userCartLinkMobile = "/Default.aspx?ID=13"; 360 361 if (!string.IsNullOrEmpty(userCustomerNumberMobile)) { 362 userAccountLinkMobile = "/Default.aspx?ID=170"; 363 userCartLinkMobile = "/Default.aspx?ID=42"; 364 } 365 366 } 367 368 369 370 <button type="button" id="mobile-nav-button"><i class="fa fa-bars"></i></button> 371 <div class="minicart"> 372 <a href="@userCartLinkMobile"> 373 <i class="ion-android-cart"></i> 374 @if (!@GetBoolean("Ecom:Order.IsEmpty")) { 375 <span data-minicart-update="">(0)</span> 376 } else { 377 <span data-minicart-update="">Cosul tau este gol</span> 378 } 379 380 </a> 381 </div> 382 383 @*@if(string.IsNullOrEmpty(userMobile)) {*@ 384 @if(userMobile == null) { 385 <button type="button" class="mobile-header-overlay-trigger"><i class="fa fa-user"></i></button> 386 <div class="mobile-header-overlay animated"> 387 <a href="/Default.aspx?ID=11" class="btn-main animated">@Translate("Intra in cont","Intra in cont")</a> 388 @*<a href="/Default.aspx?ID=10" class="btn-main animated">@Translate("Creeaza cont","Creeaza cont")</a>*@ 389 <button type="button" class="overlay-close"><i class="fa fa-close"></i> @Translate("Inchide","Inchide")</button> 390 </div> 391 392 } else { 393 <button type="button" class="mobile-header-overlay-trigger"><i class="fa fa-user"></i></button> 394 <div class="mobile-header-overlay animated"> 395 <a href="/Admin/Public/ExtranetLogoff.aspx" class="btn-main animated"><i class="fa fa-unlock-alt"></i> @Translate("Logout","Logout")</a> 396 <a href="@userAccountLinkMobile" class="btn-main animated"><i class="fa fa-user"></i> @Translate("Contul meu","Contul meu")</a> 397 <button type="button" class="overlay-close"><i class="fa fa-close"></i> @Translate("Inchide","Inchide")</button> 398 </div> 399 400 } 401 402 403 </div> 404 @if(!string.IsNullOrEmpty(customerNo)) { 405 <div class="search-mobile col-xs-12"><form action="/Default.aspx?ID=127" method="GET"> 406 <div class="form-group"> 407 <input type="text" name="q" id="q-mobile" autocomplete="off" spellcheck="false" placeholder='@Translate("search", "Cauta dupa cod sau nume...")' class="form-control"> 408 @if(!string.IsNullOrEmpty(customerNo) && !string.IsNullOrEmpty(customerListGroupID)){ 409 <input type="hidden" name="CustomerNumber" id="CustomerNumber" value="@customerNo"> 410 } 411 <button type="submit"><i class="ion-ios-search-strong"></i></button> 412 <div class="instant_search"></div> 413 </div> 414 </form></div> 415 } 416 </div> 417 </div> 418 </div> 419 <div id="mobile-navigation-overlay"> 420 <button type="button" class="overlay-close"><i class="fa fa-close"></i> @Translate("Inchide","Inchide")</button> 421 <div class="content-scrollable"> 422 @if(!string.IsNullOrEmpty(customerNo)) { 423 <ul class="root"> 424 <li> 425 <a href="#">Categorii de produse</a> 426 @RenderNavigation(new { 427 template = "CategoriesNavigationMobileB2B-v2.xslt", 428 expandmode = "all", 429 sitemapmode="true", 430 id = "categories", 431 startlevel = 1, 432 endlevel = 5, 433 areaid = 1 434 }) 435 </li> 436 </ul> 437 } 438 439 @if(!string.IsNullOrEmpty(customerNo) ) { 440 @RenderNavigation(new { 441 template = "MainNavigationMobile-v2.xslt", 442 expandmode = "all", 443 id = "NavMainMobileAll", 444 startlevel = 2, 445 endlevel = 4, 446 parentid = 169, 447 customerGroup = @customerListGroupID, 448 customerRole = @customerRole 449 }); 450 } else { 451 452 @RenderNavigation(new { 453 template = "MainNavigationMobile-v2.xslt", 454 expandmode = "all", 455 id = "NavMainMobileAll", 456 startlevel = 1, 457 endlevel = 4 458 }); 459 460 } 461 462 </div> 463 464 465 </div> 466 @* } *@ 467 468 <div class="mobile-wrapper"> 469 470 @{ 471 472 System.Globalization.TextInfo myTI = new System.Globalization.CultureInfo("en-US", false).TextInfo; 473 @*string user = Dynamicweb.Frontend.PageView.Current().User.UserName; 474 string userProfileName = Dynamicweb.Frontend.PageView.Current().User.Name; 475 string userCustomerNumber = Dynamicweb.Frontend.PageView.Current().User.CustomerNumber;*@ 476 //string userProfileName = Dynamicweb.Security.UserManagement.User.GetCurrentExtranetUser().Name;throw new Exception("Exceptie 01"); 477 478 479 480 var userProfileName = currentUser; 481 482 bool userLoggedIn = userProfileName != null; 483 484 485 486 487 string userAccountLink = "/Default.aspx?ID=9"; 488 string userCartLink = "/Default.aspx?ID=13"; 489 490 double cartQuantity = GetDouble("Ecom:Order.OrderLines.TotalProductQuantity"); 491 double cartPrice = GetDouble("Ecom:Order.PriceWithoutFees.PriceWithVAT"); 492 string currencyCart = GetString("Ecom:Order.Price.Currency.Symbol"); 493 BrandFusion.Dw.Austral.eCommerce.CustomerAddress customerDetails = null; 494 string customerLogo = ""; 495 496 @*string customerName = Dynamicweb.Frontend.PageView.Current().User != null && !string.IsNullOrEmpty(userProfileName)? userProfileName : "";*@ 497 @*string customerName = currentUserAccess != null && !string.IsNullOrEmpty(userProfileName)? userProfileName : "";*@ 498 string customerName = currentUserAccess != null ? userProfileName.Name.ToString() : ""; 499 500 string userCustomerNumber = userIsLoggedIn && currentUser.CustomerNumber != null ? currentUser.CustomerNumber.ToString() : null; 501 502 503 if(!string.IsNullOrEmpty(userCustomerNumber)) { 504 505 506 cartPrice = GetDouble("Ecom:Order.PriceWithoutFees.PriceWithoutVAT"); 507 } 508 509 if (!string.IsNullOrEmpty(userCustomerNumber)) { 510 511 512 userAccountLink = "/Default.aspx?ID=170"; 513 userCartLink = "/Default.aspx?ID=42"; 514 515 } 516 517 if(!string.IsNullOrEmpty(userCustomerNumber)){ 518 519 520 customerDetails = BrandFusion.Dw.Austral.eCommerce.CustomerFacade.GetB2bBillingAddress(userCustomerNumber); 521 522 if (customerDetails != null) 523 { 524 customerName = customerDetails.Company; 525 customerLogo = !string.IsNullOrEmpty(customerDetails.GeoLocationImage) ? "/Files/Images/Austral/CustomerLogos/"+customerDetails.GeoLocationImage : ""; 526 } 527 } 528 529 } 530 @SnippetStart("Head") 531 532 @SnippetEnd("Head") 533 534 535 <div class="header-top hidden-xs hidden-sm"> 536 <div class="container"> 537 <div class="row"> 538 <div class="col-md-12"> 539 @*@if(!string.IsNullOrEmpty(user)) {*@ 540 @if(userIsLoggedIn) { 541 <ul class="right-align"> 542 @*@if(!string.IsNullOrEmpty(userProfileName)) {*@ 543 @if(userLoggedIn) { 544 <li> 545 @if (string.IsNullOrWhiteSpace(GetGlobalValue("Global:Extranet.SecondaryUser.UserID"))) { 546 <a href="@userAccountLink"> <i class="ion-ios-locked-outline"></i> 547 548 @userProfileName.Name 549 550 @if(!string.IsNullOrEmpty(userCustomerNumber)) { 551 <span>- @userCustomerNumber</span> 552 } 553 554 </a> 555 } else{ 556 <span> 557 <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> 558 </span> 559 } 560 </li> 561 <li><a href="/Admin/Public/ExtranetLogoff.aspx">@Translate("logout", "Logout")</a></li> 562 } 563 564 </ul> 565 } 566 <ul class="left-align"> 567 <li><p>@GetValue("Item.Area.Program")</p></li> 568 569 @if(!string.IsNullOrEmpty(GetString("Item.Area.Telefon"))) { 570 <li><p>@GetValue("Item.Area.Telefon")</p></li> 571 } 572 </ul> 573 574 </div> 575 576 577 578 </div> 579 </div> 580 </div> 581 <div class="header-middle hidden-xs hidden-sm"> 582 <div class="container"> 583 <div class="row"> 584 585 <div id="logo" class="col-sm-3 hidden-xs"> 586 <a href="/"> 587 <img src='@GetValue("Item.Area.Logo")' alt='@GetValue("Item.Area.Site_Name")'> 588 </a> 589 </div> 590 591 <div class="header-search-v2 col-sm-9"> 592 <div class="row"> 593 594 595 <div class="col-sm-6 col-md-5 col-lg-6"> 596 @if(user!=null) { 597 <form action="/Default.aspx?ID=127" method="GET" data-file="search-v2"> 598 <div class="form-group"> 599 <input type="text" name="q" id="q" autocomplete="off" spellcheck="false" placeholder='@Translate("search", "Cauta dupa cod sau nume...")' class="form-control"> 600 <input type="hidden" id="ID" name="ID" value="127"> 601 @if(!string.IsNullOrEmpty(customerNo) && !string.IsNullOrEmpty(customerListGroupID)){ 602 <input type="hidden" name="CustomerNumber" id="CustomerNumber" value="@customerNo"> 603 } 604 <button type="submit"><i class="ion-ios-search-strong"></i></button> 605 <div class="instant_search"></div> 606 </div> 607 </form> 608 } 609 </div> 610 @*@if(string.IsNullOrEmpty(user)) {*@ 611 @if(!userIsLoggedIn) { 612 <div class="header-account col-sm-3 col-md-4 col-lg-3"> 613 @*<a href="/Default.aspx?ID=10">@Translate("CreateAccount", "Creeaza cont")</a> <text>|</text>*@ <a href="/Default.aspx?ID=11">@Translate("Login", "Login")</a> 614 </div> 615 } else { 616 <div class="header-account customer col-sm-3 col-md-4 col-lg-3"> 617 <a href="@userAccountLink"> 618 @if (!string.IsNullOrEmpty(customerLogo)){ 619 <img src="/Admin/Public/GetImage.ashx?Image=@customerLogo&Format=jpg&Width=190&Height=85&Compression=100&Crop=5" class="img-responsive"> 620 }else{ 621 <span>@customerName</span> 622 } 623 </a> 624 </div> 625 } 626 627 <div class="col-sm-3 col-md-3 col-lg-3 minicart"> 628 <a href="@userCartLink"> 629 <i class="ion-android-cart"></i> 630 @*@if (!@GetBoolean("Ecom:Order.IsEmpty")) {*@ 631 @if (@GetBoolean("Ecom:Order.IsEmpty")) { 632 <span data-minicart-update="">(@cartQuantity) - @cartPrice<sup> @currencyCart</sup></span> 633 } else { 634 <span data-minicart-update="">Cosul este gol</span> 635 } 636 637 </a> 638 </div> 639 </div> 640 </div> 641 </div> 642 </div> 643 </div> 644 645 646 647 @SnippetStart("BottomJS") 648 <script type="text/javascript" src="/Files/Templates/Designs/Fusion/assets/js/main-v2.js"></script> 649 @SnippetEnd("BottomJS") 650 <div class="main-nav-2 hidden-xs hidden-sm"> 651 <span style="display: none;"> 652 @GetGlobalValue("Global:Item.Page.DisplayOptions").ToString() 653 </span> 654 655 <div class="container"> 656 <div class="row"> 657 658 @if(!string.IsNullOrEmpty(customerNo)) 659 { 660 <div class="col-md-3 hidden-sm hidden-xs"> 661 <div class="left-nav-box clearfix @navigationCollapsed"> 662 <div class="category-heading"><p>Categorii de produse</p></div> 663 <div class="menu3dmega" id="menuMega"> 664 @RenderNavigation(new { 665 template = "CategoriesNavigationB2B.xslt", 666 expandmode = "all", 667 sitemapmode="true", 668 id = "categories", 669 startlevel = 1, 670 endlevel = 5, 671 areaid = 1 672 }) 673 </div> 674 </div> 675 </div> 676 677 <div class="col-md-9" style="padding-left: 0;"> 678 @RenderNavigation(new { 679 template = "MainNavigation-v2.xslt", 680 expandmode = "all", 681 id = "NavMainAll", 682 startlevel = 2, 683 endlevel = 4, 684 parentid = 169, 685 customerGroup = @customerListGroupID, 686 customerRole = @customerRole 687 }) 688 689 </div> 690 } else { 691 692 @RenderSnippet("Homepagenavigation") 693 694 <div class="col-md-12"> 695 @RenderNavigation(new { 696 template = "MainNavigation-v2.xslt", 697 expandmode = "all", 698 id = "NavMainAll", 699 startlevel = 1, 700 endlevel = 4 701 }) 702 </div> 703 704 } 705 </div> 706 </div> 707 </div> 708 709 <div class="container"> 710 <div class="row"> 711 712 713 @if (Pageview.User.UserID == 0) { 714 715 <h3>Autentificare</h3> 716 <div class="login-box-mode" data-login-box-mode="login"> 717 @if (!string.IsNullOrWhiteSpace(System.Web.HttpContext.Current.Request["username"]) || !string.IsNullOrWhiteSpace(System.Web.HttpContext.Current.Request["password"])) { 718 <div class="loginbox-login-failed alert alert-error">Datele de utilizator introduse nu sunt corecte</div> 719 } 720 721 <form class="form-horizontal" method="post"> 722 <div class="control-group"> 723 <input type="text" id="login-username" name="username" spellcheck="false" placeholder="Username" value='@System.Web.HttpContext.Current.Request["username"]'> 724 </div> 725 <div class="control-group"> 726 <input type="password" id="login-password" name="password" placeholder="Password" value='@System.Web.HttpContext.Current.Request["password"]'> 727 </div> 728 <input type="submit" value="Login"> 729 </form> 730 </div> 731 } else { 732 733 @: Esti autentificat cu userul @Pageview.User.UserName 734 <br> 735 <br> 736 737 <form method="post"> 738 @if (string.IsNullOrWhiteSpace(GetGlobalValue("Global:Extranet.SecondaryUser.UserID"))) { 739 <table border="0"> 740 <tr> 741 <td>Alege userul pe care vrei sa il impersonezi</td> 742 </tr> 743 <tr> 744 <td> 745 <select id="DWExtranetSecondaryUserSelector" name="DWExtranetSecondaryUserSelector"> 746 @foreach (var secondaryUser in GetLoop("DWExtranetSecondaryUsers")) { 747 <option value='@secondaryUser.GetValue("UserID")'>@secondaryUser.GetValue("UserName")</option> 748 } 749 </select> 750 </td> 751 </tr> 752 <tr> 753 <td colspan="2"><input type="submit" tabindex="3" value="OK"></td> 754 </tr> 755 </table> 756 } else { 757 <h3>@GetGlobalValue("Global:Extranet.SecondaryUser.UserName") este impersonat de @Pageview.User.UserName.</h3> 758 <br> 759 <input type="submit" name="DwExtranetRemoveSecondaryUser" id="DwExtranetRemoveSecondaryUser" value="Stop impersonation"> 760 } 761 <br> 762 <br> 763 764 <a class="btn" href="/Admin/Public/ExtranetLogoff.aspx?ID=@Pageview.Page.ID">Logout</a> 765 766 767 768 769 </form> 770 } 771 </div> 772 </div> 773 <div class="container"> 774 <div class="row"> 775 776 777 <div class="brands-wrapper"> 778 <div class="container"> 779 <div class="col-md-12"> 780 <div class="row"> 781 782 @RenderParagraphContent(1514) 783 784 @* <div class="logo-slider"> 785 <div class="flexslider"> 786 <ul class="slides"> 787 @{ 788 var manufacturers = Dynamicweb.Ecommerce.Products.Manufacturer.GetManufacturers(); 789 int counter = 0; 790 int howManyOnRow = 1; 791 792 foreach (var manufacturer in manufacturers) 793 { 794 if (!string.IsNullOrEmpty(manufacturer.Logo)){ 795 if (counter % howManyOnRow == 0){ 796 if (counter == 0){ 797 @:<li class='item active'> 798 } 799 else { 800 @:</li><li class="item"> 801 } 802 } 803 804 <a href="#"> 805 <img src="/Files/@manufacturer.Logo.Trim('/')"> 806 </a> 807 if (counter % howManyOnRow == howManyOnRow - 1) 808 { 809 @:</li> 810 } 811 counter++; 812 } 813 } 814 if (counter % howManyOnRow != 0) 815 { 816 @: 817 } 818 } 819 </ul> 820 </div> 821 </div>*@ 822 823 @*<div class="brands-list-navigation product-list-navigation"> 824 <a href="#" class="flex-prev"><i class="ion-ios-arrow-back"></i></a> 825 <a href="#" class="flex-next"><i class="ion-ios-arrow-forward"></i></a> 826 </div> *@ 827 828 829 </div> 830 </div> 831 </div> 832 </div> 833 </div> 834 </div> 835 @* 836 <div class="services-list"> 837 <div class="container"> 838 <div class="row"> 839 <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12"> 840 <div class="rec-banner hand"> 841 <div class="banner clearfix"> 842 <div class="services-icon"> 843 <img src="http://cdn.aperta.ro/Files/Templates/Designs/Fusion/assets/img/austral-hand.png" class="img-responsive"> 844 </div> 845 846 <div class="pull-left text-box"> 847 <h3>Garantie</h3> 848 <p>@GetValue("Item.Area.Garantie")</p> 849 </div> 850 </div> 851 </div> 852 </div> 853 <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12"> 854 <div class="rec-banner return"> 855 <div class="banner clearfix"> 856 <div class="services-icon"> 857 <img src="http://cdn.aperta.ro/Files/Templates/Designs/Fusion/assets/img/austral-return.png" class="img-responsive"> 858 </div> 859 <div class="pull-left text-box"> 860 <h3>Retur in 14 zile</h3> 861 <p>@GetValue("Item.Area.Retur")</p> 862 </div> 863 </div> 864 </div> 865 </div> 866 <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12"> 867 <div class="rec-banner support"> 868 <div class="banner clearfix"> 869 <div class="services-icon"> 870 <img src="http://cdn.aperta.ro/Files/Templates/Designs/Fusion/assets/img/austral-support.png" class="img-responsive"> 871 </div> 872 <div class="pull-left text-box"> 873 <h3>Serviciu clienti</h3> 874 <p>@GetValue("Item.Area.Serviciu_Clienti")</p> 875 </div> 876 </div> 877 </div> 878 </div> 879 <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12"> 880 <div class="rec-banner car"> 881 <div class="banner clearfix"> 882 <div class="services-icon"> 883 <img src="http://cdn.aperta.ro/Files/Templates/Designs/Fusion/assets/img/austral-car.png" class="img-responsive"> 884 </div> 885 <div class="pull-left text-box"> 886 <h3>Transport gratuit</h3> 887 @if(!string.IsNullOrEmpty(customerNo)){ 888 <p>@GetValue("Item.Area.TransportB2B")</p> 889 }else{ 890 <p>@GetValue("Item.Area.Transport")</p> 891 } 892 </div> 893 </div> 894 </div> 895 </div> 896 </div> 897 </div> 898 </div>*@ 899 900 901 902 903 <div class="footer"> 904 <div class="container"> 905 <div class="row"> 906 907 <div class="col-md-3 col-sm-6 col-xs-12 shopinfo"> 908 <h4 class="title">AUSTRAL</h4> 909 <p> 910 @GetValue("Item.Area.Contact") 911 </p> 912 <div class="social-icons"> 913 <ul> 914 <li class="icon facebook"><a href='@GetValue("Item.Area.Facebook_Link")' target="_blank"><i class="fa fa-facebook fa-fw"></i></a></li> 915 <li class="icon twitter"><a href='@GetValue("Item.Area.Twitter_Link")' target="_blank"><i class="fa fa-twitter fa-fw"></i></a></li> 916 <li class="icon linkedin"><a href='@GetValue("Item.Area.Linkedin_link")' target="_blank"><i class="fa fa-linkedin fa-fw"></i></a></li> 917 <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> 918 </ul> 919 </div> 920 </div> 921 <div class="col-md-3 col-sm-6 col-xs-12 footermenu"> 922 <h4 class="title">UTILE </h4> 923 @GetValue("DwNavigation(BottomNavigation)") 924 <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> 925 </div> 926 <div class="col-md-3 col-sm-6 col-xs-12 footermenu"> 927 <h4 class="title">COMENZI</h4> 928 @GetValue("DwNavigation(BottomNavigation1)") 929 <img src="/Files/Templates/Designs/Fusion/assets/img/MobilPay-banner.png" alt=""> 930 </div> 931 <div class="col-md-3 col-sm-6 col-xs-12 getintouch"> 932 <h4 class="title">Certificari</h4> 933 <img src="/Files/Templates/Designs/Fusion/assets/img/ukas.jpg" alt=""> 934 </div> 935 936 </div> 937 </div> 938 </div> 939 <div class="cart--footer"> 940 <div class="container"> 941 <div class="row"> 942 <div class="col-xs-12"> 943 <a href="#" class="emptyCart">Goleste cos</a> 944 @GetValue("CartV2.NextStepButtonName") 945 946 @{ 947 var cartLink = "/Default.aspx?ID=13"; 948 if(!string.IsNullOrEmpty(customerNo)) { 949 cartLink = "/Default.aspx?ID=42"; 950 } 951 } 952 <a class="cart" href="@cartLink"> 953 <span class="spacing">Aveti <span class="em" cartproducts="">produse</span> in cos</span> 954 <span class="spacing">Cost total: <span class="em" carttotals="">Cosul este gol</span></span> 955 <span class="spacing cart--footer__button">Finalizeaza Comanda</span> 956 </a> 957 </div> 958 </div> 959 </div> 960 </div> 961 </div> 962 963 964 965 966 967 @* JS Libraries *@ 968 <script type="text/javascript" src="/Files/Templates/Designs/Fusion/assets/js/bootstrap.min.js"></script> 969 <script type="text/javascript" src="/Files/Templates/Designs/Fusion/assets/js/libraries/slick.min.js"></script> 970 <script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.3/js/select2.min.js" type="text/javascript"></script> 971 <script type="text/javascript" src="/Files/Templates/Designs/Fusion/assets/js/jquery.noty.packaged.js"></script> 972 <script type="text/javascript" src="/Files/Templates/Designs/Fusion/assets/js/bpopup.js"></script> 973 <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/flexslider/2.6.0/jquery.flexslider.min.js"></script> 974 975 976 977 978 <script type="text/javascript" src="/Files/Templates/Designs/Fusion/assets/js/libraries/jscookie.js"></script> 979 <script type="text/javascript" src="/Files/Templates/Designs/Fusion/assets/js/alertify.js"></script> 980 @* <script type="text/javascript" src="/Files/Templates/Designs/Fusion/assets/js/mobile-menu.js"></script> *@ 981 <script type="text/javascript" src="/Files/Templates/Designs/Fusion/assets/js/mobile-menu-v2.js"></script> 982 <script type="text/javascript" src="/Files/Templates/Designs/Fusion/assets/js/login.js"></script> 983 <script type="text/javascript" src="/Files/Templates/Designs/Fusion/assets/js/main.js"></script> 984 <script type="text/javascript" src="/Files/Templates/Designs/Fusion/assets/js/carousels.js"></script> 985 <script type="text/javascript" src="/Files/Templates/Designs/Fusion/assets/js/main-v2.js?v=2"></script> 986 <script type="text/javascript" src="/Files/Templates/Designs/Fusion/assets/js/product-modal.js"></script> 987 988 989 <script src="https://cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.1/photoswipe.min.js" type="text/javascript"></script> 990 <script src="https://cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.1/photoswipe-ui-default.min.js" type="text/javascript"></script> 991 <script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.16.6/lodash.min.js" type="text/javascript" charset="utf-8"></script> 992 993 <script type="text/javascript" src="/Files/Templates/Designs/Fusion/assets/js/product-list.js"></script> 994 <script type="text/javascript" src="/Files/Templates/Designs/Fusion/assets/js/loader.js"></script> 995 <script type="text/javascript" src="/Files/Templates/Designs/Fusion/assets/js/minicart.js"></script> 996 <script type="text/javascript" src="/Files/Templates/Designs/Fusion/assets/js/voucher.js"></script> 997 <script type="text/javascript" src="/Files/Templates/Designs/Fusion/assets/js/cart.js"></script> 998 <script type="text/javascript" src="/Files/Templates/Designs/Fusion/assets/js/jquery.validate.js"></script> 999 1000 @RenderSnippet("modalBottom") 1001 @RenderSnippet("bottomJS") 1002 1003 @* Quickview modal *@ 1004 <div class="b-modal" id="quickview"> 1005 <div id="results" class="clearfix"></div> 1006 </div> 1007 1008 1009 1010 @RenderScripts("footer") 1011 </body> 1012