0
votes

On my magento website I have a series of customers that have no First Name / Last Name in their shipping address as it's not needed. When I try to checkout on the onepage checkout without a FirstName/LastName I get the following error:

"Please check shipping address information. Please enter the first name. Please enter the last name."

Is there anyway to quickly and easily disable the validation for these two fields to stop this error from appearing?

1

1 Answers

1
votes

Note: Excluding the first / last name attributes is not recommended within Magento as so much is dependent on these attributes within the archetecture. If you know what you're doing and have taken a backup of your database, you could try the following:

First, you will need to remove the required-entry class on the fields within the template. The backend will still validate that the first / last name data still exists.

Secondly, you can remove the requirement for first / last name entry by modifying the eav_attribute table. Find the rows rows with attribute_code being "firstname" and "lastname" and entity_type_id being "2" (which is the ID of the address model attributes). Change the is_required value to "0".

The backend validation for first / last name within the address model should no longer exist. This will also not exist if a customer is updating addresses within their 'My Account' section.