cancel
Showing results for 
Search instead for 
Did you mean: 

Customer Account Navigation Move links and remove

SOLVED

Customer Account Navigation Move links and remove

I have tried a few suggestions I have found else where to remove links and move links in the Customer account Navigation. What am I doing wrong?

 

I created a file , inserted below, in app/design/frontend/Custom_VENDOR_Theme/My_Custom_THEME/Magento_Customer/layout/customer_account.xml

 

<?xml version="1.0"?>
<!--
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd" label="Customer My Account (All Pages)" design_abstraction="custom">
    <body>
        <!-- To Remove My Downloadable Products-->
        <referenceBlock name="customer-account-navigation-downloadable-products-link" remove="true"/>
        <!-- To Remove Billing Agreements-->
        <referenceBlock name="customer-account-navigation-billing-agreements-link" remove="true"/>
        <!-- To Remove My Credit Cards-->
        <referenceBlock name="customer-account-navigation-my-credit-cards-link" remove="true"/>
  
<move element="customer-account-navigation-quotes-link" destination="customer_account_navigation" after="customer-account-navigation-orders-link"/>

    </body>
</page>

I switched to developer mode cleared cache and even tried setup:upgrade and compile. None of the links are removed and the one isn't moved. What am I doing wrong? I have magento 2.2.3 installed. Just to verify I want to adjust the navigation links customers see when they are in their account dash board. 

 

Thanks

 

 

 

 

5 REPLIES

Re: Customer Account Navigation Move links and remove

Hi

Seems like your code is correct , still refer this article , detail explanation is mention for how to remove links from my account - http://inchoo.net/magento-2/managing-my-account-navigation-links-magento-2/

another alternative option is instead of customer_account.xml file .. create default.xml file on the same location which you have mentioned above and then put same code in it.

Also could you please confirm after overriding layout in custom theme , you have activated that custom theme for store ?
if issue solved,Click Kudos & Accept as Solution

Re: Customer Account Navigation Move links and remove

Hello @Intwire

 

Please create 

Magento_Customer / layout / default.xml 

 

XML code :-

<?xml version="1.0"?>
<!--
/**
 * Copyright © 2013-2017 Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="customer-account-navigation-billing-agreements-link" remove="true"/> 
        <referenceBlock name="customer-account-navigation-reward-link" remove="true"/>  
        <referenceBlock name="customer-account-navigation-giftregistry-link" remove="true"/>  
        <referenceBlock name="customer-account-navigation-magento-invitation-link" remove="true"/>  
        <referenceBlock name="customer-account-navigation-customer-balance-link" remove="true"/>  
        <referenceBlock name="customer-account-navigation-gift-card-link" remove="true"/>  
        <referenceBlock name="register.link.container" remove="true"/> 
    </body>
</page>

 

If above code work then marks as a solution.

Re: Customer Account Navigation Move links and remove

Neither way seems to be working. I will keep looking for what might be blocking it from working. 

 

Thanks for the help, Your answers might help others.

Re: Customer Account Navigation Move links and remove

@Intwire - okay i understand , not sure why its not worked for you.

 

still refer this link - https://magento.stackexchange.com/questions/210970/customer-account-navigation-link-where-to-find-re...

 

I have posted full solution over there , this might be helpful for you.

 

or else might be your existing module is conflicting with the one you are trying.

 

Hope it helps !

if issue solved,Click Kudos & Accept as Solution

Re: Customer Account Navigation Move links and remove

I seemed to have located the issue keeping my changes from working.

 

I checked my theme in the databases. It had a type setting of 1, which from my readings is a virtual theme. This was keeping magento from loading my xml files. So I changed it to 0 which appears to have worked so far. I am not sure how it got a type setting of 1 or what else changing it from 1 to 0 will affect. 

 

Hopefully this helps some others down the road.