Monday 25 February 2013

How to remove link in customer page in magento

First Add this function in /app/code/core/Mage/Customer/Block/Account/Navigation.php


    public function removeLinkByName($name) {
       unset($this->_links[$name]);
    }


Then Go to /app/design/frontend/default/your theme folder/layout and create local.xml

//Add this code in local.xml

<?xml version="1.0"?>
<layout version="0.1.0">
    <customer_account>
   <reference name="customer_account_navigation">

<!-- To remove the item Account Dashboard you have to add this line of code -->

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

<!-- To remove the item Account Information you have to add this line of code -->
    
     <action method="removeLinkByName"><name>account_edit</name></action>

<!-- To remove the item Address Book you have to add this line of code -->
    
     <action method="removeLinkByName"><name>address_book</name></action>

<!-- To remove the item My Orders you have to add this line of code -->
    
     <action method="removeLinkByName"><name>orders</name></action>

<!-- To remove the item Recurring Profiles you have to add this line of code -->

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

<!-- To remove the item Billing Agreements you have to add this line of code -->

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

<!-- To remove the item My Downloadable Products you have to add this line of code -->

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

<!-- To remove the item My Tags you have to add this line of code -->

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

<!-- To remove the item My Product Reviews you have to add this line of code -->

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

<!-- To remove the item My Wishlist you have to add this line of code -->

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

<!-- To remove the item Newsletter Subscriptions you have to add this line of code -->

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


<!-- To remove the item My Application you have to add this line of code -->

              <action method="removeLinkByName"><name>OAuth Customer Tokens</name></action>

      </reference>   
  </customer_account>
</layout>

No comments:

Post a Comment

Thanks for visit blog.