@using Nop.Core @using Nop.Services.Customers @model CheckoutBillingAddressModel @inject IWebHelper webHelper @inject IWorkContext workContext @inject ICustomerService _customerService @{ Layout = "_ColumnsOne"; var storeLocation = webHelper.GetStoreLocation(); //title NopHtml.AddTitleParts(T("PageTitle.Checkout").Text); //page class NopHtml.AppendPageCssClassParts("html-checkout-page"); NopHtml.AppendPageCssClassParts("html-billing-address-page"); }
@await Component.InvokeAsync(typeof(CheckoutProgressViewComponent), new { step = CheckoutProgressStep.Address })

@T("Checkout.BillingAddress")

@await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.CheckoutBillingAddressTop, additionalData = Model }) @if (Model.ShipToSameAddressAllowed) {
} @if (Model.ExistingAddresses.Count > 0) {
@T("Checkout.SelectBillingAddress")
@if (Model.InvalidExistingAddresses.Count > 0) { }
@foreach (var item in Model.ExistingAddresses) {
  • @item.FirstName @item.LastName
  • @if (item.PhoneEnabled) {
  • @item.PhoneNumber
  • } @if (item.FaxEnabled) {
  • @item.FaxNumber
  • } @if (item.CompanyEnabled && !string.IsNullOrEmpty(item.Company)) {
  • @item.Company
  • } @if (item.StreetAddressEnabled) {
  • @item.Address1
  • } @if (item.StreetAddress2Enabled && !string.IsNullOrEmpty(item.Address2)) {
  • @item.Address2
  • } @if (item.CityEnabled && !string.IsNullOrEmpty(item.City) || item.CountyEnabled && !string.IsNullOrEmpty(item.County) || item.StateProvinceEnabled && !string.IsNullOrEmpty(item.StateProvinceName) || item.ZipPostalCodeEnabled && !string.IsNullOrEmpty(item.ZipPostalCode)) {
  • @if (item.CityEnabled && !string.IsNullOrEmpty(item.City)) { @item.City if (item.CountyEnabled && !string.IsNullOrEmpty(item.County) || item.StateProvinceEnabled && !string.IsNullOrEmpty(item.StateProvinceName) || item.ZipPostalCodeEnabled && !string.IsNullOrEmpty(item.ZipPostalCode)) { , } } @if (item.CountyEnabled && !string.IsNullOrEmpty(item.County)) { @item.County if (item.StateProvinceEnabled && !string.IsNullOrEmpty(item.StateProvinceName) || item.ZipPostalCodeEnabled && !string.IsNullOrEmpty(item.ZipPostalCode)) { , } } @if (item.StateProvinceEnabled && !string.IsNullOrEmpty(item.StateProvinceName)) { @item.StateProvinceName if (item.ZipPostalCodeEnabled && !string.IsNullOrEmpty(item.ZipPostalCode)) { , } } @if (item.ZipPostalCodeEnabled && !string.IsNullOrEmpty(item.ZipPostalCode)) { @item.ZipPostalCode }
  • } @if (item.CountryEnabled && !string.IsNullOrEmpty(item.CountryName)) {
  • @item.CountryName
  • } @if (!string.IsNullOrEmpty(item.FormattedCustomAddressAttributes)) {
  • @Html.Raw(item.FormattedCustomAddressAttributes)
  • }
}
}
@await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.CheckoutBillingAddressMiddle, additionalData = Model })
@if (Model.ExistingAddresses.Count > 0) { @T("Checkout.OrEnterNewAddress") } else { @T("Checkout.EnterBillingAddress") }
@if (Model.EuVatEnabled) {
@if (Model.EuVatEnabledForGuests) { } else { @T("Checkout.VatNumber.Disabled", Url.RouteUrl("CustomerInfo")) }
}
@{ var dataDictAddress = new ViewDataDictionary(ViewData); dataDictAddress.TemplateInfo.HtmlFieldPrefix = "BillingNewAddress"; @await Html.PartialAsync("_CreateOrUpdateAddress", Model.BillingNewAddress, dataDictAddress) }
@await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.CheckoutBillingAddressBottom, additionalData = Model })
@T("Checkout.OrderSummary")
@await Component.InvokeAsync(typeof(OrderSummaryViewComponent))