create or edit the file local.xml
from your respected theme layout folder (app/design/frontend/your package/your theme/layout/
) and add the following code in it
<customer_account_index translate="label">
<reference name="customer_account_dashboard">
<block type="customer/form_edit" name="customer_edit" as="customeredit" template="customer/form/edit.phtml"/>
</reference>
</customer_account_index>
now edit the file at app/design/frontend/your package/your theme/template/customer/account/dashboard.phtml
and add the following line wherever suites you best
<?php echo $this->getChildHtml('customeredit') ?>
not tested but hope it will work
Create a small module for this.follow the following steps
Step 1: Create a xml file in the app/etc/modules/Neo_CustomerNavigationLinks.xml
<?xml version="1.0" ?>
<config>
<modules>
<Neo_CustomerNavigationLinks>
<active>true</active>
<codePool>local</codePool>
</Neo_CustomerNavigationLinks>
</modules>
</config>
Step 2: create a xml file in the app/code/local/Neo/CustomerNavigationLinks/etc/config.xml
<?xml version="1.0" ?>
<config>
<modules>
<Neo_CustomerNavigationLinks>
<version>0.0.1</version>
</Neo_CustomerNavigationLinks>
</modules>
<frontend>
<layout>
<updates>
<customernavigationlinks>
<file>neo_customernavigationlinks.xml</file>
</customernavigationlinks>
</updates>
</layout>
</frontend>
<global>
<blocks>
<customer>
<rewrite>
<account_navigation>Neo_CustomerNavigationLinks_Block_Account_Navigation</account_navigation>
</rewrite>
</customer>
</blocks>
<helpers>
<customernavigationlinks>
<class>Neo_CustomerNavigationLinks_Helper</class>
</customernavigationlinks>
</helpers>
</global>
</config>
Step 3: Create app/code/local/Neo/CustomerNavigationLinks/Block/Account/Navigation.php
<?php
class Neo_CustomerNavigationLinks_Block_Account_Navigation extends Mage_Customer_Block_Account_Navigation
{
public function removeLinkByName($name)
{
unset($this->_links[$name]);
return $this;
}
}
Step 4: Create app/code/local/Neo/CustomerNavigationLinks/Helper/Data.php
<?php
class Neo_CustomerNavigationLinks_Helper_Data extends Mage_Core_Helper_Abstract
{
}
Step 5: Create app/design/frontend/base/default/layout/neo_customernavigationlinks.xml
<?xml version="1.0" ?>
<layout>
<customer_account>
<reference name="customer_account_navigation">
<action method="removeLinkByName">
<name>billing_agreements</name>
</action>
<action method="removeLinkByName">
<name>recurring_profiles</name>
</action>
</reference>
</customer_account>
</layout>
Clear cache and see you have done.
Best Answer
An alternative approach to Amit's is in your theme's
local.xml
to replace the parent block customer_account_navigation completely and then only add the links you want to show. Use the below and then delete the lines you don't want. Please note that if in the future any other links need to be added you would need to copy them into yourlocal.xml
to show up. As an extra benefit you can easily reorder the items.