1

This question already has an answer here:

What is a good way to remove some links from the account dashboard?

Mostly:

  • My Downloadable Products
  • My Applications
  • Billing Agreements
  • Recurring Profiles

I did some Googling and searched the "duplicate" questions here on SE and found some promising solutions but I am not sure if they are compatible with my version of Magento which is ver. 1.9.1.0. I am looking for a solution that won't break the code in any future updates. thanks!

marked as duplicate by Fabian Blechschmidt, Marius Feb 22 '15 at 10:43

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

5

Every developer has its own extension for that, because Magento forgot to add a "removeLinks" to the menu.

with the first one you can configure it in backend. With the later one you have a "removeLinks" you can use in your own local.xml

1

You can solve this the easy way with adapting the according template in your themes template/customer/account/navigation.phtml file by defining the allowed links like this.

<div class="block block-account">
    <div class="block-title">
        <span><?php echo $this->__('My Account'); ?></span>
    </div>
    <div class="block-content">
        <ul>
            <?php $_links = $this->getLinks(); ?>
            <?php $_index = 1; ?>

            <?php 
            // define the allowed links the customer can see
            $allowedLinks = array(
                'account', 
                'account_edit', 
                'address_book', 
                'orders'
            ); 
            ?>

            <?php $_count = count($_links); ?>
            <?php foreach ($_links as $_link): ?>

                <?php 
                // check if the link name is one of the allowed links
                if(in_array($_link->getName(), $allowedLinks)): 
                ?>

                    <?php $_last = ($_index++ >= $_count); ?>
                    <?php if ($this->isActive($_link)): ?>
                        <li class="current<?php echo ($_last ? ' last' : '') ?>"><strong><?php echo $_link->getLabel() ?></strong></li>
                    <?php else: ?>
                        <li<?php echo ($_last ? ' class="last"' : '') ?>><a href="<?php echo $_link->getUrl() ?>"><?php echo $_link->getLabel() ?></a></li>
                    <?php endif; ?>
                <?php endif; ?>
            <?php endforeach; ?>
            <li<?php echo ($_last ? ' class="last"' : '') ?>><a href="<?php echo Mage::helper('customer')->getLogoutUrl(); ?>"><?php echo $this->__('Logout') ?></a></li>
        </ul>
    </div>
</div>

Not the answer you're looking for? Browse other questions tagged or ask your own question.