@using Nop.Core @model CustomerInfoModel @inject Nop.Core.IWebHelper webHelper @{ Layout = "_ColumnsTwo"; //title NopHtml.AddTitleParts(T("PageTitle.Account").Text); //page class NopHtml.AppendPageCssClassParts("html-account-page"); NopHtml.AppendPageCssClassParts("html-customer-info-page"); } @section left { @await Component.InvokeAsync(typeof(CustomerNavigationViewComponent), new { selectedTabId = CustomerNavigationEnum.Info }) }

@T("Account.MyAccount") - @T("Account.CustomerInfo")

@await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.CustomerInfoTop, additionalData = Model })
@T("Account.YourPersonalDetails")
@if (Model.GenderEnabled) {
@if (Model.NeutralGenderEnabled) { }
} @if (Model.FirstNameEnabled) {
@if (Model.FirstNameRequired) { }
} @if (Model.LastNameEnabled) {
@if (Model.LastNameRequired) { }
} @if (Model.DateOfBirthEnabled) {
@if (Model.DateOfBirthRequired) { }
}
@if (!string.IsNullOrEmpty(Model.EmailToRevalidate)) {
} @if (Model.UsernamesEnabled) { if (Model.AllowUsersToChangeUsernames) {
@if (Model.CheckUsernameAvailabilityEnabled) { @await Html.PartialAsync("_CheckUsernameAvailability") }
} else {
@Model.Username
} }
@if (Model.CompanyEnabled || Model.DisplayVatNumber) {
@T("Account.CompanyDetails")
@if (Model.CompanyEnabled) {
@if (Model.CompanyRequired) { }
} @if (Model.DisplayVatNumber) {
@Model.VatNumberStatusNote @T("Account.Fields.VatNumber.Note")
}
} @if (Model.StreetAddressEnabled || Model.StreetAddress2Enabled || Model.ZipPostalCodeEnabled || Model.CityEnabled || Model.CountyEnabled || Model.CountryEnabled) {
@T("Account.YourAddress")
@if (Model.StreetAddressEnabled) {
@if (Model.StreetAddressRequired) { }
} @if (Model.StreetAddress2Enabled) {
@if (Model.StreetAddress2Required) { }
} @if (Model.ZipPostalCodeEnabled) {
@if (Model.ZipPostalCodeRequired) { }
} @if (Model.CityEnabled) {
@if (Model.CityRequired) { }
} @if (Model.CountyEnabled) {
@if (Model.CountyRequired) { }
} @if (Model.CountryEnabled) {
@if (Model.CountryRequired) { }
} @if (Model.CountryEnabled && Model.StateProvinceEnabled) {
@if (Model.StateProvinceRequired) { }
}
} @if (Model.PhoneEnabled || Model.FaxEnabled) {
@T("Account.YourContactInformation")
@if (Model.PhoneEnabled) {
@if (Model.PhoneRequired) { }
} @if (Model.FaxEnabled) {
@if (Model.FaxRequired) { }
}
} @if (Model.NewsletterEnabled || Model.CustomerAttributes.Count > 0) {
@T("Account.Options")
@if (Model.NewsletterEnabled) {
} @if (Model.CustomerAttributes.Count > 0) { @await Html.PartialAsync("_CustomerAttributes", Model.CustomerAttributes) }
} @if (Model.AllowCustomersToSetTimeZone || Model.SignatureEnabled) {
@T("Account.Preferences")
@if (Model.AllowCustomersToSetTimeZone) {
} @if (Model.SignatureEnabled) {
}
} @if (Model.NumberOfExternalAuthenticationProviders > 0) {
@T("Account.AssociatedExternalAuth")
@if (Model.AssociatedExternalAuthRecords.Count > 0) { //existing associated external records
@if (Model.AllowCustomersToRemoveAssociations) { } @foreach (var item in Model.AssociatedExternalAuthRecords) { @if (Model.AllowCustomersToRemoveAssociations) { } }
@T("Account.AssociatedExternalAuth.AuthMethodName") @T("Account.AssociatedExternalAuth.ExternalIdentifier") @T("Account.AssociatedExternalAuth.Remove")
@item.AuthMethodName @CommonHelper.EnsureMaximumLength(item.ExternalIdentifier, 40, "...") @T("Account.AssociatedExternalAuth.Remove")
} @if (Model.NumberOfExternalAuthenticationProviders > Model.AssociatedExternalAuthRecords.Count) { //we can add more external records var loginUrl = Url.RouteUrl("Login", null, webHelper.GetCurrentRequestProtocol());
@T("Account.AssociatedExternalAuth.AddMoreRecords") @loginUrl
}
} @if (Model.GdprConsents.Count > 0) {
@T("Account.UserAgreement")
@foreach (var consent in Model.GdprConsents) { if (consent.IsRequired) { } }
}
@await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.CustomerInfoBottom, additionalData = Model })