General

Removing Customer Account Navigation Links in Magento 2: A Step-by-Step Guide

Hello Magento Folks,

How’s everything going? Here, I have come with some engaging topics for you. Don’t forget to visit the previously published article How to Enable Magento Error Logs In Magento 2.  Today, Let’s solve How to Remove Customer Account Navigation Links In Magento 2? in this article.

How to remove unnecessary customer account links in Magento 2

Magento by default displays a huge list of customer account links on the customer account page. If your business is based differently from other businesses and it does not support Newsletter Subscriptions then it is unnecessary in the list of links displayed at the customer account page. And many times there is a requirement of customizing all the default links because there is no specific requirement of all the links displayed at the customer account page. There are some sort of requirements to remove some links which are unnecessary for the customers.

Display Lists of links by default provided by Magento 2 on customer account screen below: 

  • My Orders
  • My Downloadable Products
  • Account Dashboard
  • Newsletter Subscriptions
  • Stored Payment Methods
  • Address Book
  • Account Information
  • Billing Agreements
  • My Wish List
  • My Product Reviews

Steps to How to remove navigational links

Step 1: Firstly, Create a custom extension or theme and override customer layout file

Create an extension and override the layout XML file

app/design/frontend/[Namespace]/[Theme]/Magento_Customer/layout/customer_account.xml

Step 2: Make use of a tag to remove any extra link from my account.

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">

<body>

   <!-- Remove unwanted account navigation links -->

   <!-- Put this file in: app/design/frontend/[Namespace]/[Theme]/Magento_Customer/layout/customer_account.xml -->

   <!-- Store credit -->

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

   <!-- Downloadable product link -->

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

   <!-- Subscription link -->

   <referenceBlock name="customer-account-navigation-newsletter-subscriptions-link" remove="true"/>

   <!-- Billing agreement link -->

   <referenceBlock name="customer-account-navigation-billing-agreements-link" remove="true"/>

   <!-- Product review link -->

   <referenceBlock name="customer-account-navigation-product-reviews-link" remove="true"/>

   <!-- My credit card link -->

   <referenceBlock name="customer-account-navigation-my-credit-cards-link" remove="true"/>

   <!-- Account link -->

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

   <!-- Account edit link -->

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

   <!-- Address link -->

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

   <!-- Orders link -->

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

   <!-- Wish list link -->

   <referenceBlock name="customer-account-navigation-wish-list-link" remove="true"/>

   <!-- Gift card link -->

   <referenceBlock name="customer-account-navigation-gift-card-link" remove="true"/>

   <!-- Order by SKU -->

   <referenceBlock name="customer-account-navigation-checkout-sku-link" remove="true"/>

   <!-- Gift registry -->

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

   <!-- Reward points -->

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

</body>

</page>

Step 3: Now, simply clear cache and verify the My Account page the links will be removed.

Note: The above code will help you to remove the links and the tag remove=” true” output stands for the links are removed and will not be displayed.

Final Words

By implementing the above-given steps you will be able to successfully remove all the not required links from the customer account navigation. It was quite easy and simple steps if still facing any problems then don’t hesitate to contact our Support Team

You may also like Magento 2 Customer Account Links Manager by MageComp that Lets you manage frontend customer account dashboard links.

If you find the article interesting don’t forget to share with your Magento pals and do comment down your reviews on the article it will help us to be more precise. Read more helpful articles in our Magento Tutorial Series. Till then Stay Home Stay Safe

Happy Reading and be safe?

 

Click to rate this post!
[Total: 12 Average: 2.9]
Gaurav Jain

Gaurav Jain is Co-Founder and Adobe Certified Expert-Magento Commerce Business Practitioner. Being Computer Engineer👨‍💻 and possessing Extensive Marketing skills he handles all kinds of customer Queries and his Happy😀 & Helping🙏 Nature makes customer's day Delightful. When he isn’t working, you’ll find Gaurav Reading on Books📖 or Traveling🚗. Also, he is Speaker at Magento Meetups.

View Comments

  • Thanks buddy this will helped me a lot when I'm trying to remove some unnecessary link from my account page in Magento

Recent Posts

How to Integrate ChatGPT with Laravel Application?

In this guide, we'll explore how to integrate ChatGPT, an AI-powered chatbot, with a Laravel…

2 days ago

What are Net Sales? How to Calculate Your Net Sales?

In the world of business, understanding financial metrics is crucial for making informed decisions and…

4 days ago

Magento 2 Extensions Digest April 2024 (New Release & Updates)

Welcome to the MageComp Monthly Digest, where we bring you the latest updates, releases, and…

4 days ago

The ABCs of Geofencing: Definition, Features and Uses

In this era, businesses are always on the lookout for ways to engage with their…

5 days ago

How to Delete Product Variant in a Shopify Remix App using GraphQL Mutations?

Managing a Shopify store efficiently involves keeping your product catalog organized. This includes removing outdated…

6 days ago

6 Innovative Tools Revolutionizing E-Commerce Operations

E-commerce has transformed the way consumers shop for products and services and interact with businesses.…

1 week ago