Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Page 2 of 2
Remove Links from Account Navigation List.. 
 
GaelTo
Jr. Member
 
Total Posts:  12
Joined:  2010-08-01
 
hs037 - 31 August 2011 05:10 AM

Tamayo - 10 September 2010 04:19 PM
Another way to remove these links is to unset them in the template file. Open up app/design/frontend/default/YOURTHEME/template/customer/account/navigation.html

Find:
<?php $_count = count($_links); ?>

And replace with:
<?php $_count = count($_links); unset($_links[\'recurring_profiles\']); unset($_links[\'billing_agreements\']); ?>

Thanks for that hint! Made my day. But I guess it should be without the backslashes like this:

<?php $_count count($_links); unset($_links['recurring_profiles']); unset($_links['billing_agreements']); ?>

Works great, thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
drico
Jr. Member
 
Total Posts:  2
Joined:  2007-08-31
 

Hi,
Great suggestions!

With Magento 1.7 a new Customer Account item has been added, called ‘My Applications”.
Can you help me understand which line in the local.xml file I should add for this?

I tried this, but it doesn’t work.

<action method="removeLinkByName"><name>my_applications</name></action>

I would really appreciate your (or others) help !

Hi,

The name in the layout is OAuth Customer Tokens

<!-- My Applications-->
    <
customer_account>
        <
reference name="customer_account_navigation">
            <
action method="addLink" translate="label" module="oauth">
                <
name>OAuth Customer Tokens</name>
                <
path>oauth/customer_token</path>
                <
label>My Applications</label>
            </
action>
        </
reference>
    </
customer_account>
 
Magento Community Magento Community
Magento Community
Magento Community
 
turbidity
Jr. Member
 
Total Posts:  3
Joined:  2011-10-21
 

So I used this code in design/frontend/default/THEME_NAME/template/customer/account/navigation.phtml
To \” remove My Account links in magento 1.7 \” :

:

<?php $_count count($_links); unset($_links[\'recurring_profiles\']); unset($_links[\'billing_agreements\']); unset($_links[\'reviews\']); unset($_links[\'tags\']); unset($_links[\'OAuth Customer Tokens\']); unset($_links[\'newsletter\']); unset($_links[\'downloadable_products\']);?>

Through some trial and error I was able to find the names of all the links above except \"My Applications\” = OAuth Customer Tokens took me a while.

So there. The my account block links are removed.

thanks everybody!

 
Magento Community Magento Community
Magento Community
Magento Community
 
holylander
Jr. Member
 
Total Posts:  13
Joined:  2012-07-11
 

Thanks! it worked for me wink

 
Magento Community Magento Community
Magento Community
Magento Community
 
artista3d
Jr. Member
 
Total Posts:  1
Joined:  2012-06-26
 

Thanks for the tips!

What worked for me was to change line 35 in navigation.phtml from this:

<?php $_count count($_links); ?>

to this:

<?php $_count count($_links); ?>
            
            <?php 
unset($_links['recurring_profiles']); ?>
            <?php 
unset($_links['billing_agreements']); ?>
            <?php 
unset($_links['reviews']); ?>
            <?php 
unset($_links['tags']); ?>
            <?php 
unset($_links['OAuth Customer Tokens']); ?>
            <?php 
unset($_links['newsletter']); ?>
            <?php 
unset($_links['downloadable_products']); ?>

I have removed the backslashes, because my editor was reporting a syntax error.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Alexander_Menk
Member
 
Total Posts:  65
Joined:  2011-06-27
Mainz, Germany
 

There is a module for this: N98_LayoutHelper that helps to remove account links in a clean way:

https://github.com/netz98/N98_LayoutHelper

 
Magento Community Magento Community
Magento Community
Magento Community
 
rldev
Jr. Member
 
Total Posts:  7
Joined:  2012-05-23
 

Anyone know the name/value for Check Your Gift Card Balance so I can remove it?

 
Magento Community Magento Community
Magento Community
Magento Community
 
rohitindukuri
Jr. Member
 
Total Posts:  1
Joined:  2013-07-04
 
Alexander_Menk - 26 September 2012 05:36 AM

There is a module for this: N98_LayoutHelper that helps to remove account links in a clean way:

https://github.com/netz98/N98_LayoutHelper

Works like a charm. Thank you!!

 
Magento Community Magento Community
Magento Community
Magento Community
 
sbuckpesch
Jr. Member
 
Total Posts:  1
Joined:  2011-03-23
 

Another easy solution which solved my problem quickly via CSS:

Just add a class for each link in the menu:

<?php if ($this->isActive($_link)): ?>
                    
<li class="current<?php echo ($_last ? ' last' : '') ?> <?php echo $_link->getName();?>"><strong><?php echo $_link->getLabel() ?></strong></li>
                
<?php else: ?>
                    
<li class="<?php echo ($_last ? ' last' : '') ?>  <?php echo $_link->getName();?>"><a href="<?php echo $_link->getUrl() ?>"><?php echo $_link->getLabel() ?></a></li>
                
<?php endif; ?>

Then display:none the unneded links and you’re done grin

 
Magento Community Magento Community
Magento Community
Magento Community
 
Monty_iLM
Guru
 
Total Posts:  450
Joined:  2013-11-05
 

Hi,

You can also have a look this thread http://stackoverflow.com/questions/5887664/remove-navigation-links-from-my-account

Thanks

iLoveMage

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 2 of 2