Removing the 'My Downloadable Products' Tab from the Customer Dashboard in Magento 2

Removing the 'My Downloadable Products' Tab from the Customer Dashboard in Magento 2
Removing the 'My Downloadable Products' tab from the customer dashboard in Magento 2 helps streamline the user experience, especially for stores that don't offer downloadable products.
Table Of Content
Removing the 'My Downloadable Products' Tab from the Customer Dashboard in Magento 2
In Magento 2, the 'My Downloadable Products' tab appears in the customer dashboard by default. If your store doesn't offer downloadable products, you might want to remove this tab to streamline the customer experience.
Method 1: Manually Removing the Tab
Create a Custom Layout File:
- Navigate to your theme's layout directory:
app/design/frontend/{VendorName}/{ThemeName}/Magento_Customer/layout/
. - Create a file named
customer_account.xml
. - Add the following XML code to remove the 'My Product Reviews' tab:
Add Code to Remove the Tab:
- Insert the following XML code into
customer_account.xml
: - This code targets the 'My Downloadable Products' link and removes it from the customer dashboard.
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<!-- Removing the 'My Downloadable Products' Tab from the Customer Dashboard in Magento 2 -->
<referenceBlock name="customer-account-navigation-downloadable-products-link" remove="true"/>
</body>
</page>
Clear the Cache:
- After saving the file, clear the Magento cache to apply the changes:
php bin/magento cache:clean
Method 2: Using an Extension
If you prefer a more straightforward approach without coding, consider using the 'Customer Account Links Manager' extension by MagePal. This extension allows you to manage customer dashboard links via the Magento admin panel.
Install the Extension
- Install the extension using Composer:
composer require magepal/magento2-customer-account-links-manager
Enable the Extension
- Run the following commands:
php bin/magento module:enable MagePal_CustomerAccountLinksManager
php bin/magento setup:upgrade
Configure the Extension
- Log in to your Magento admin panel.
- Navigate to
Stores
>Configuration
>MagePal
>Customer Account Links Manager
. - In the configuration settings, find the option to disable the 'My Downloadable Products' link and set it to 'No'.
Clear the Cache
- Clear the Magento cache to apply the changes:
php bin/magento cache:clean
Additional Notes
- Always back up your Magento store before making changes.
- After implementing these changes, verify that the 'My Downloadable Products' tab has been removed from the customer dashboard.
By following these methods, you can effectively remove the 'My Downloadable Products' tab from the customer dashboard in Magento 2, enhancing the user experience for your customers.
Tip
To enhance your eCommerce store’s performance with Magento, focus on optimizing site speed by utilizing Emmo themes and extensions. These tools are designed for efficiency, ensuring your website loads quickly and provides a smooth user experience. Start leveraging Emmo's powerful solutions today to boost customer satisfaction and drive sales!
FAQs
How Can I Remove the 'My Downloadable Products' Tab in Magento 2?
You can remove the 'My Downloadable Products' tab from the customer dashboard sidebar by modifying the customer_account.xml
file and using the <referenceBlock name="customer-account-navigation-downloadable-products-link" remove="true"/>
node.
Where Is the customer_account.xml File Located?
The customer_account.xml
file is typically found at the following path:
app/design/frontend/{VendorName}/{ThemeName}/Magento_Customer/view/frontend/layout/customer_account.xml
What Is an Example of Removing the 'My Downloadable Products' Tab?
To remove the 'My Downloadable Products' tab, add the following code inside customer_account.xml
:
<referenceBlock name="customer-account-navigation-downloadable-products-link" remove="true"/>
What Happens After I Remove the 'My Downloadable Products' Tab?
Once you remove the tab using the XML file, it will no longer appear in the customer dashboard sidebar. However, the downloadable products section itself will still exist; it just won't be accessible from the sidebar.
Do I Need to Clear the Cache After Removing the Tab?
Yes, after modifying the customer_account.xml
file, you should clear the Magento cache to apply the changes:
php bin/magento cache:clean
Can I Remove Other Customer Navigation Links?
Yes, you can remove any customer navigation links by using a similar approach. For example, to remove the 'My Orders' or 'My Wishlist' links, just reference their block names and set remove="true"
in your customer_account.xml
file.