With the release of Magento 1.4.1.0 also came the introduction of “Billing Agreements” and “Recurring Profiles”. These new functionalities were based on commercial modules which offered recurring periodical payment. Sadly they’ve been build into Mage_Core which doesn’t allow you to disable their output via System > Configuration > Advanced > Advanced.
To disable, or rather hide, these two functions from the account navigation you can copy billing_agreement.xml and recurring_profile.xml from /app/design/frontend/base/default/layout/sales/ to /app/design/frontend/default/yourtheme/layout/sales/.
After copying the files to their new location you can edit them. Find the following code in billing_agreement.xml :
<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>
And change it to :
<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>
Then find the following code in recurring_profile.xml :
<customer_account> <reference name="customer_account_navigation" > <action method="addLink" translate="label"><name>recurring_profiles</name><path>sales/recurring_profile/</path><label>Recurring Profiles</label></action> </reference> </customer_account>
And change it to :
<customer_account> <reference name="customer_account_navigation" > <!--<action method="addLink" translate="label"><name>recurring_profiles</name><path>sales/recurring_profile/</path><label>Recurring Profiles</label></action>--> </reference> </customer_account>
By doing this you’ve removed the links to these functionalities from the account navigation. If you ever have to enable them you can simply uncomment the lines again.
Very useful!
Thank you very much.
Really enjoying your Magento posts.. i’ve struggled to find good posts on Magento, most tell you to modify core files!!!
Keep it up! Do you have anything for modifying the invoice / packing slips?
I might be doing one on that soon, thanks for the tip!
Hi, Thanks for this info….did you write anything for modifying invoice/ packaging slips
Hi Andy,
No I didn’t, but I’ll look into it. Thanks for the tip!
Cheers,
L
thank you for your tips.
Thanks for your great post. But anyway: when I only remove the links i can still access these pages via url!
Isn’t there a way to disable this feature completely?
Sadly no. All features and components can be turned of in the admin except for these two. Maybe in version 2.0.
Herés another option http://www.magentocommerce.com/boards/v/viewthread/197799/P15/
Thanks, great find!
As I understand it, creating updates in local.xml is the preferred method, so thanks a bunch for this link.
Dear All
Just we have released a free extension called Frontend Links Manager for Magento Developers. Now you can easily turn on/off the frontend links(top, footer, home in catalog navigation & customer navigation) via backend.
Here goes the extension link:
http://www.magepsycho.com/frontend-links-manager.html
At least this makes the task much more easier and encapsulates the complexity of xml layout updates.
Cheers!!
Happy E-Commerce
MagePsycho
And what about disabling Mage_sales in System->config->advanced??
Wouldn’t that completely disable the functionality to actually sell something?
Thank you! Simple and efficient!