How to display the custom fields data on my account page under account information and how to remove the unwanted nav links from my account tabs.

1)First create a module app/code/JJ/Account

then in that module create a registration page, then create etc folder in that module.xml, and create a view folder- view/frontend/layout/ create a customer_account_index.xml

then create a template file under the viwe/frontend/templates/info.phtml file.


<?= 'Company Type: '. $block->getCustomer()->getCustomAttribute('company_type')->getValue() ?><br>
<?= 'Tax ID Number: '. $block->getCustomer()->getCustomAttribute('tax_id_no')->getValue() ?>

this two line – for get the data from customfield to my account page under the account information.

2)Remove unwanted nav links:

Create a module and in that view/fronend/layout/ then customer_account.xml in that file

we can remove the unneccery tabs

<referenceBlock name="customer-account-navigation-downloadable-products-link" remove="true"/>

Leave a comment

Your email address will not be published. Required fields are marked *