A customer named Li was unable to purchase an item on line because the customer name validation insists on a minimum of 3 characters for first name and last name. This validation should be removed.
The files that need changing to fix this are:
\catalog\controller\account_address.php
\catalog\controller\account_edit.php
\catalog\controller\checkout_address.php
\catalog\controller\account_create.php
in the validate() function in each file, contains code that looks like
Code: Select all
if ((strlen($request->get('firstname', 'post')) < 3) || (strlen($request->get('firstname', 'post')) > 32)) {
$this->error['firstname'] = $language->get('error_firstname');
}
if ((strlen($request->get('lastname', 'post')) < 3) || (strlen($request->get('lastname', 'post')) > 32)) {
$this->error['lastname'] = $language->get('error_lastname');
}
Code: Select all
if ((strlen($request->get('firstname', 'post')) > 32)) {
$this->error['firstname'] = $language->get('error_firstname');
}
if ((strlen($request->get('lastname', 'post')) > 32)) {
$this->error['lastname'] = $language->get('error_lastname');
}
\catalog\language\english\controller\account_address.php
\catalog\language\english\controller\account_edit.php
\catalog\language\english\controller\checkout_address.php
\catalog\language\english\controller\account_create.php
to something like
Code: Select all
$_['error_firstname'] = '* First Name must be less than 33 characters!';
$_['error_lastname'] = '* Last Name must be less than 33 characters!';
I actually removed all of the minimums except for password.