In Magento 2 how to swap firstname and lastname in shipping and billing address in diplay for the logged in customer in dashboard section. in default saved address ,i need to swap in display level only in frontend

1 Answer 1


Go to your admin a then:

Stores > configuration > Customers > Customer Configuration > in options go to Address Templates

there you can edit the template that displays the addresses in Front End area :)

Just disable Use system value

And edit according to your requirements.

  • 1
    Thank you so much,,saves my time..but it was not swapped in checkout page shipping address for logged in user how to do that?
    – kanidhaya
    Jun 9, 2021 at 17:59
  • Got idea for it ...Anyway Thanks again...
    – kanidhaya
    Jun 9, 2021 at 18:13
  • Oh man, checkout is another problem... Thankfully you only need to swap name and lastname :P For checkout you need to overwrite the following: vendor/magento/module-checkout/view/frontend/web/template/shipping-address/address-renderer/default.html and vendor/magento/module-checkout/view/frontend/web/template/shipping-information/address-renderer/default.html In your custom Module Jun 9, 2021 at 18:15
  • Yeah Got it thank you so much for your quick response
    – kanidhaya
    Jun 9, 2021 at 18:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.