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