YOU DO NOT NEED TO APPLY THIS MOD IN 1.4.9 OR LATER AS IT HAS ALREADY BEEN ADDED AND AUTOMATICALLY REQUIRES BASED ON THE COUNTRY!
1. EDIT: catalog/controller/account/create.php
(If using v1.3.2 or newer)
FIND:
Code: Select all
if (isset($this->error['city'])) {
$this->data['error_city'] = $this->error['city'];
} else {
$this->data['error_city'] = '';
}
FIND:
Code: Select all
$this->data['error_city'] = @$this->error['city'];
Code: Select all
if (isset($this->error['postcode'])) {
$this->data['error_postcode'] = $this->error['postcode'];
} else {
$this->data['error_postcode'] = '';
}
2. In that same file
FIND:
Code: Select all
if ((strlen(utf8_decode($this->request->post['city'])) < 3) || (strlen(utf8_decode($this->request->post['city'])) > 128)) {
$this->error['city'] = $this->language->get('error_city');
}
Code: Select all
if ((strlen(utf8_decode($this->request->post['postcode'])) < 1) || (strlen(utf8_decode($this->request->post['postcode'])) > 10)) {
$this->error['postcode'] = $this->language->get('error_postcode');
}
FIND:
Code: Select all
$_['error_city'] = 'City must be greater than 3 and less than 128 characters!';
Code: Select all
$_['error_postcode'] = 'Postcode must be greater than 1 and less than 10 characters!';
FIND:
Code: Select all
<tr>
<td><?php echo $entry_postcode; ?></td>
<td><input type="text" name="postcode" value="<?php echo $postcode; ?>" /></td>
</tr>
Code: Select all
<tr>
<td><span class="required">*</span> <?php echo $entry_postcode; ?></td>
<td><input type="text" name="postcode" value="<?php echo $postcode; ?>" />
<?php if ($error_postcode) { ?>
<span class="error"><?php echo $error_postcode; ?></span>
<?php } ?></td>
</tr>