Magento 1.4.2 - Make Registration Fields Not Required

Magento 1.4.2 - Make Registration Fields Not Required

July 28, 2026 · Illustrated author avatarBy Stefan Bogdanescu
Magento 1.4.2 - Make Registration Fields Not Required

The Definitive Guide: Making Magento 1.4.2 Registration Fields Optional

Hello everyone,

In this blog post, I’ll provide you with a step-by-step guide on how to make specific registration fields in Magento 1.4.2 optional during the checkout process. I understand the frustration when the commonly suggested methods don’t work as expected, so let’s dive into a practical solution.

Understanding the Default Magento Validation

The Magento framework uses Zend Framework for validation, which is quite robust but can be a bit rigid out of the box. When you’re trying to override the core files, it’s essential to understand how they are structured and what exactly needs to be modified.

In your case, you’ve correctly identified that the validation logic resides in magento/app/code/core/Mage/Customer/Model/Address/Abstract.php. However, the issue lies not in removing the specific line of code as suggested by many outdated tutorials, but rather in the way Magento handles the form and its attributes.

The Correct Approach: Overriding the Form

Magento 1.x uses a mix of XML layout files and PHP classes to render forms. To make your telephone field optional, you need to override the registration form XML file located at app/design/frontend/default/{your_template}/layout/customer.phtml.

Here’s what we’re going to do:

Step 1: Create a Custom Module

First, let’s create a new local module in app/code/local/Mage/Custom/. Inside this folder, create the following structure:

  • app/code/local/Mage/Custom/
    • Customer/
      • etc/
        • config.xml
      • layout/
        • customer.phtml
      • Model/
      • etc/

Step 2: Define Your Module

Open app/code/local/Mage/Custom/etc/config.xml and add the following content:

<?xml version="1.0"?>
<config>
    <modules>
        <Mage_CustomCustomer>
            <active>true</active>
            <codePool>local</codePool>
        </Mage_CustomCustomer>
    </modules>
</config>

Step 3: Override the Customer Form

Now, open app/design/frontend/default/{your_template}/layout/customer.phtml and add the following code inside the form:

<form id="customer_form" action="<?php echo $this->getUrl('*/*/save', array('_secure' => true)) ?>" method="post" enctype="multipart/form-data">
    <fieldset class="col2-set" style="width:100%">
        <legend><?php echo $this->__('Personal Information') ?></legend>
        <div class="col-50">
            <input type=hidden name='form_key' value='<?php echo Mage::getSingleton('core/session')->getFormKey(); ?>'/>
            <?php echo $this->getLayout()->createBlock('Mage_Core_Block_Template', 'customer_form_customer_attributes')->setTemplate('custom/customer/form/attributes.phtml')->toHtml() ?>
        </div>
    </fieldset>
</form>

Step 4: Create the Custom Attributes File

Create a folder structure app/design/frontend/default/{your_template}/template/custom/customer/form/ and inside this folder, create an attributes.phtml file.

Open this new file and replace its content with the following:

<?php echo $this->getBlockHtml('form_fieldset') ?>

Step 5: Modify the Telephone Field

Now comes the crucial part. Open your current register.phtml (usually located at app/design/frontend/default/{your_template}/template/customer/form/register.phtml) and find the telephone field.

Change this line:

<div class="field">
    <label for="telephone" class="required">Phone Number<em>*</em></label>
    <div class="input-box">
        <input type="text" name="telephone" value="<?php echo $this->escapeHtml($this->getCustomer()->getTelephone()) ?>" class="input-text required-entry validate-cc-csc" id="telephone"/>
    </div>
</div>

To:

<div class="field">
    <label for="telephone">Phone Number</label>
    <div class="input-box">
        <input type="text" name="telephone" value="<?php echo $this->escapeHtml($this->getCustomer()->getTelephone()) ?>" class="input-text" id="telephone"/>
    </div>
</div>

Note that we’ve removed the required-entry and validate-cc-csc classes.

Step 6: Clearing the Cache

Finally, clear your Magento cache:

php -f shell/indexer.php reindexall
rm -rf var/cache/*
rm -rf var/session/*

Your optional telephone field should now be working as expected.

Remember, when dealing with Magento core files, it’s always best to use the local code pool and create a custom module to avoid conflicts during updates. This approach ensures that your modifications remain intact even after Magento upgrades.

If you found this guide helpful, please share it with your fellow developers! If you’re looking for more in-depth tutorials on Magento development or other e-commerce platforms, feel free to visit Laravel Company for a wide range of resources and services tailored to help you build robust and scalable online stores.

Happy coding!

Yours, [Your Name]

Magento 1 Checkout Extensions Themes

Our network