1

enter image description hereI need to figure out how to remove displaying the customers first and last name on the customer/account page. I have figured out how to do this with the checkout process already.

4
  • Can you please tell me exactly from where you want to remove? Can you please share screen shot?
    – ZealousWeb
    Feb 4, 2021 at 7:55
  • @ZealousWeb - its the Default Billing Address and Default Shipping Address locations on xxx.xxx/customer/account page when you first goto it beneath the address book title Feb 4, 2021 at 16:03
  • @ZealousWeb - added to original post. Please assist. Thanks!!! Feb 6, 2021 at 20:44
  • I have added answer. Please check and let me know if you have any query.
    – ZealousWeb
    Feb 8, 2021 at 5:38

1 Answer 1

1

In my magento it was like this - https://prnt.sc/yop6an

To remove first name and last name from my account , you should change the html address template

For that please go to admin panel and go to below path

Stores > COnfiguration > Customers > Customer Configuration > Address Templates

Edit Html template and remove two variables {{{var firstname}} and {{{var lastname}} from template. After removing these variables updated template will be like below.

{{depend prefix}}{{var prefix}} {{/depend}}{{depend middlename}}{{var middlename}} {{/depend}}{{depend suffix}} {{var suffix}}{{/depend}}{{depend firstname}}<br />{{/depend}}
{{depend company}}{{var company}}<br />{{/depend}}
{{if street1}}{{var street1}}<br />{{/if}}
{{depend street2}}{{var street2}}<br />{{/depend}}
{{depend street3}}{{var street3}}<br />{{/depend}}
{{depend street4}}{{var street4}}<br />{{/depend}}
{{if city}}{{var city}},  {{/if}}{{if region}}{{var region}}, {{/if}}{{if postcode}}{{var postcode}}{{/if}}<br />
{{var country}}<br />
{{depend telephone}}T: <a href="tel:{{var telephone}}">{{var telephone}}</a>{{/depend}}
{{depend fax}}<br />F: {{var fax}}{{/depend}}
{{depend vat_id}}<br />VAT: {{var vat_id}}{{/depend}}

Output will be like - https://prnt.sc/yop5eq

1
  • Could you please upvote this? @lostnconfused
    – ZealousWeb
    Feb 10, 2021 at 5:24

Your Answer

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

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