Magento: "overriding" core config.xml files via a local copy? Is this correct?

Magento: "overriding" core config.xml files via a local copy? Is this correct?

July 14, 2026 · Illustrated author avatarBy Stefan Bogdanescu
Magento: "overriding" core config.xml files via a local copy? Is this correct?

Renaming Credit Card Names in Magento: Best Practices for Overriding Core Configuration Files

As an experienced Magento developer at Laravel Company, I often receive inquiries about overriding core configuration files to make specific changes like renaming credit card types on the checkout page. In this post, we’ll explore the correct approach to achieve this without compromising your store’s integrity or violating Magento principles.

The Question: Overriding Core config.xml Files via a Local Copy

You’re right in your initial approach of trying to copy the core config.xml file from /app/code/core/Mage/Payment/etc/ to /app/code/local/Mage/Payment/etc/. This is line with the Magento best practice of not directly modifying core files. However, you encountered an issue where your changes weren’t taking effect.

The Reason: Magento’s Module Loading Priorities

By default, Magento loads modules from the core code pool first, then the community, and finally the local. This means that even though you’ve copied the file to the local folder, it is still being ignored because the core version is loaded instead.

The Solution: Changing the Code Pool in Mage_All.xml

You discovered a workaround by updating the app/etc/modules/Mage_All.xml file and changing the <codePool> for the Mage_Payment module to local. This effectively tells Magento to load the local version of the payment configuration file instead.

Here’s how you would make this change:

  1. Open /app/etc/modules/Mage_All.xml.

  2. Find the <Mage_Payment> section.

  3. Update the line <codePool>core</codePool> to be <codePool>local</codePool> like so:

    <Mage_Payment>
        <active>true</active>
        <codePool>local</codePool>
        <depends/>
    </Mage_Payment>
    
  4. Save the file.

After making this change, your local config.xml file under /app/code/local/Mage/Payment/etc/ will be loaded instead of the core version.

Renaming Credit Card Names: A Practical Example

Let’s say you want to rename “Visa” to “Visa Debit/Credit”. Here’s what you would do:

  1. Create a local copy of config.xml under /app/code/local/Mage/Payment/etc/.

  2. Open the file and find this section:

    <credit_card>
        <card_info>
            <code>visa</code>
            <title>Visa</title>
        </card_info>
    </credit_card>
    
  3. Update it to:

    <credit_card>
        <card_info>
            <code>visa</code>
            <title>Visa Debit/Credit</title>
        </card_info>
    </credit_card>
    
  4. Save the file and clear your cache.

Conclusion: The Correct Approach for Overriding Core Configuration Files

Changing the code pool in Mage_All.xml is indeed the correct approach to override core configuration files like config.xml. This allows you to make necessary changes without directly modifying core files, which could lead to issues during updates or conflicts with other extensions.

However, it’s important to remember that this should be used sparingly and only for critical changes. Excessive local overrides can make your store more difficult to maintain and update in the future.

At Laravel Company, we always recommend following Magento’s best practices for customizations. If you find yourself frequently needing to override core files, it might be a sign that you need to consider a different extension or approach.

If you have any other questions about Magento development or need help with specific customizations, feel free to reach out to us at https://laravelcompany.com/contact-us/. We’d be happy to assist you!

Checkout Extensions Configuration Errors

Our network