Since upgrading to the latest version of Magento, I noticed that a new entry has appeared on the checkout page asking for the customers middle name/initial.

How do I remove the entry "Middle name/initial" from the checkout page?


How the Magento update affects Middle Name

First, the solution

I had the same issue when updating to Magento CE from Magento CE The update caused Middle Name to display, but when I checked the admin System > Configuration > Customers > Customer Configuration > Name and Address Options the "Show Middle Name (initial)" setting was already displaying "No" — which is what I wanted. I changed the setting to "Yes" and then back to "No" before clicking "Save Config", and this immediately removed Middle Name/Initial from Checkout when I refreshed the page.

The Database

In my case, I am working on updating a store from Magento 1.8.x to Magento 1.9.x. It is in my development environment that I updated from to In order to get the live site up-to-date when we launch the upgrade from 1.8.x to 1.9.x, we will need to update many of the admin settings, which we plan on doing directly in the database with a query. In the database, you can see how Magento changes the Middle Name setting.

The displayed Admin setting can be misleading

The table `core_config_data` handles the admin setting for "Show Middle Name (initial) with the record where `core_config_data`.`path`='customer/address/middlename_show'.

This record holds the setting in the `value` field (0="No", 1="Yes"). This field is not changed when the middle name appears by upgrading to Magento CE If you save a change to the "Show Middle Name (initial)" in the admin settings after Magento makes changes during the update to, it will change the `core_config_data` value here.

The update to did not change the record on `core_config_data`, and therefore what is displayed in the admin settings. But, the update does change a different record of a different table.

The actual middle name visibility is in `customer_eav_attribute`

In my many dev instances of Magento, the table `eav_attribute` has 2 "middle name" `attribute_code`(s), the `attribute_id`(s) being 6 and 21. The `customer_eav_attribute` table sets the visibility of the attribute with a field `is_visible`.

  • In my live 1.8.x environment, `attribute_id`(s) 6 and 21 had `is_visible` = 0.
  • After updating the dev to Magento CE from Magento CE, it became `is_visible` = 1.
  • After I toggled and saved the admin "Show Middle Name (initial)" to "No", `is_visible`=0 again and the Middle Name/Initial field disappeared from Checkout.


The Magento CE update flipped the Middle Name setting in the `customer_eav_attribute` table without affecting what is displayed in the Magento admin under the "Show Middle Name (Initial)" setting. You can fix it the way the setting is normally adjusted in the admin, without making far-reaching template adjustments, by toggling the "Show Middle Name (Initial)" setting.

Side note

If for some reason you need to transfer this admin setting across multiple copies of a store, or in a batch of admin updates, like while upgrading a store to match a dev environment... You can use the following SQL statement for this setting (provided you know that "middle name" is `attribute_id` 6 and 21 in your store. This is standard to Magento, but to be safe, double-check your `eav_attribute` table first.).

UPDATE customer_eav_attribute SET is_visible = 0 WHERE attribute_id IN (6, 21);

  • fix on magento works fine for me – Fra Oct 22 '15 at 10:09

The technical answer

The system config option has got a backend model (Mage_Adminhtml_Model_System_Config_Backend_Customer_Show_Customer) whose _afterSave method makes the same change in the customer EAV attribute (table: customer_eav_attribute).

The system config option value and the EAV attribute is_visible value might not necessarily be in sync (either because of a Magento upgrade, or if the config option was changed programmatically, or any other reason).

Flipping the switch a couple of times will fix it, or, if you're like me and use install/upgrade scripts for everything, you can do the following :

    ->saveConfig('customer/address/middlename_show', 0);    

try {

        ->getAttribute('customer', 'middlename')

        ->getAttribute('customer_address', 'middlename')

} catch (Exception $e) {
    throw $e;
  • 1
    Thanks, working great. You should add the code for the customer address attribute as well: $attribute = Mage::getSingleton('eav/config') ->getAttribute('customer_address', 'middlename') ->setIsVisible(0) ->save(); – Andreas von Studnitz Dec 16 '15 at 9:08

The easiest way:

Magento ver.

System > Configuration > Customers > Customer configuration > Name and Address Options

Show Middle Name (initial) = No

enter image description here

  • This was already set. – SR_Magento Aug 30 '15 at 9:58
  • Just select Yes ->save . again select No->save . refresh cache and see. – Pratik Kamani Mar 1 '17 at 6:47

Removing {{depend middlename}}{{var middlename}} like @sr_magento suggests in his answer actually does not remove remove the Show Middle Name (initial) field from the checkout page itself. It only removes it from the areas where the customer address info is rendered/printed, like in the admin area, PDF's and email templates.

There is no need for removing the field from the email templates. This is overkill and you would have to add those entries to the email templates again in case you decide to enable the Show Middle Name(initial) in the future.

I have noticed this glitch too, after updating from Magento CE to Magento CE using the Magento downloader. The update seems to adjust the setting for Show Middle Name (initial) under


from "No" to "Yes". It happened to me in several stores on different servers.

To undo this simply set it back to "No" and save config. The Show Middle Name (initial) field will no longer be displayed on the checkout page.

  • @sr_magento Your method may work (although I'm not sure why, I suspect simply saving the config does the trick) but your reasoning is incorrect. Changing the Address Templates like you suggest does not change the Checkout Page input fields in the frontend of the store. It only effects the templates for printing addresses. Please read the following documentation. You're right about the customer areas in the admin panel. I will rephrase this part of my answer. – ForMat Aug 25 '15 at 7:59

If you want to remove directly from file then

Open following file

app=> design=> frontend=> base=> default=> template=> customer=> widget=> name.phtml

search for if ($this->showMiddlename()) comment out or remove that complete if statement

Your Answer

