|
|
|
Some times it is very hard to find out and solve even simple issues too in a Magento project. Like renaming some texts removing unwanted links from the navigation area, today me too went through such a situation , one of my client doesn't need few links from 'My Account' navigation from the customer dashboard when a client is logged in.
He said me to remove the links like Billing agreements,My downloadable products,Recurring Profiles,My Applications and My Tags, so first I did this by editing each and every single file of that particular links.
That is, we can remove 'Billing agreements' link from billing_agreement.xml by commenting or removing below code from it,
<customer_account>
<reference name="customer_account_navigation" >
<action method="addLink" translate="label"><name>billing_agreements</name><path>sales/billing_agreement/</path><label>Billing Agreements</label></action>
</reference>
</customer_account>
We can find billing_agreement.xml file from app/design/frontend/default/YOURTEMPLATE/layout/sales/
and we can remove 'My downloadable products' link from downloadable.xml using the same method by commenting or removing below code from it,
<customer_account>
<reference name="customer_account_navigation">
<action method="addLink" translate="label" module="downloadable"><name>downloadable_products</name><path>downloadable/customer/products</path><label>My Downloadable Products</label></action>
</reference>We can find billing_agreement.xml file from
app/design/frontend/default/YOURTEMPLATE/layout directory,
But it is too difficult to find each and every folder and edit the codes , so here is a simple method that we can use to remove any links from magento customer my account navigation ,
For that we can use below simple code,
First go to app/design/frontend/default/YOURTEMPLATE/template/customer/account/navigation.phtml
and then find the line
So just select the above code and disable the links that you didn't need. Hope this trick will help you.
$_count = count($_links); /* Add or Remove Account Left Navigation Links Here -unset($_links['OAuth Customer Tokens']); /* My Applications
unset($_links['recurring_profiles']); /* Recurring Profiles */
unset($_links['tags']); /* My Tags */unset($_links['enterprise_customerbalance']); /* Store Credit */
unset($_links['invitations']); /* My Invitations */
unset($_links['enterprise_reward']); /* Reward Points */
unset($_links['giftregistry']); /* Gift Registry */
unset($_links['downloadable_products']); /* My Downloadable Products */unset($_links['enterprise_giftcardaccount']); /* Gift Card Link */
unset($_links['billing_agreements']); /* Billing Agreements */
2 comments :
You have shared really such a nice information which is helped me so much and I think it will help to many other people.
magento development
Sometimes it is very boring for me to make changes this kind of errors or adding this codding after completion of client project of Magento Development. Even I also used this method.
Post a Comment