Magento – First and Last Name Fields Not Showing – Billing Information

billingmagento-1.9onepage-checkout

One of my client's requirements is that all purchases are made as 'guests' in order to simplify the checkout process.

So what I did was go to
System > Configuration > Advanced
and disabled the Mage_Customer

Everything looked like it was exactly what I needed until I tried the checkout process again. For some reason, the First Name and Last Name fields are no longer showing up and I cannot get past the Billing Information step.

enter image description here

How can I get these fields to show up again while still only allowing for guest purchases? Is it wrong to disable Mage_Customer?

Thanks!
Mike

p.s. I am on Magento ver. 1.9.2.2

Best Answer

Try this,

Note : Don't Edit Core File

It will remove mandatory fields of First Name & Last Name.

UPDATE eav_attribute SET is_required = 0 WHERE attribute_code = 'lastname'

/app/code/local/Mage/customer/Model/Address/Abstract.php:

 /* if (!Zend_Validate::is($this->getLastname(), 'NotEmpty')) {
         $this->addError(Mage::helper('customer')->__('Please enter the last name.'));
     }
*/

/app/code/local/Mage/customer/Model/Customer.php

/*        if (!Zend_Validate::is( trim($this->getLastname()) , 'NotEmpty')) {
        $errors[] = Mage::helper('customer')->__('The last name cannot be empty.');
    }
*/

/app/code/local/Mage/customer/etc/config.xml

<lastname>
                    <billing>1</billing>
                    <shipping>1</shipping>
                    **<required>0</required>** // change from 1 to 0
                    <mapped>1</mapped>
     </lastname>
Related Topic