This store is closed until further notice. Previous orders will be supported as normal, but no new sales will be processed.

Removing Billing Agreements and Recurring Profiles from User Account Dashboard

Posted on March 18, 2013 by admin There have been 0 comments

When I was first learning how to customize Magento, one of the most illusive changes was extending the layout XML to remove Billing Agreements and Recurring Profiles from the users' account section.

I hope this short tutorial helps!

First, you need to find your theme so we can extend it. For the purposes of this tutorial, we're using a demo store so we're going to extend the base theme into default/default. The path to your theme should follow this general pattern: app/design/frontend/[your package]/[your theme]/.

The theme we're extending (default/default) has no extended files at this time. We need to make a folder called layout.

The files that control Billing Agreements and Recurring Profiles in the User Account Dashboard, are in layout/sales/ so create a folder called sales inside the layout folder.

Now, from the base theme, go into layout/sales and copy the 2 files into your newly extended layout/sales folder. These files are billing_agreement.xml and recurring_profile.xml.

Here's what that will look like:

Here's what it should look like when you are done extending the layout files:

Let's start with billing_agreement.xml. In that file, find the section (~line 50) that starts with .

Comment out this code:

<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>

Next, in recurring_profile.xml, find the following code (~line 30) and comment it out.

<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>

Finally, go and clear your Magento cache and the account section will be updated!


Hope that saves you some time!

Comments
Want 10% off?