Step 1
Open the /catalog/controller/account_create.php file, find function validate() {, and add the following lines inside that function, just above the if statement for "error_city" (this would be at line 184 [v 0.7.7]), then save the file.
Code: Select all
if ((strlen($request->get('postcode', 'post')) < 4) || (strlen($request->get('postcode', 'post')) > 12)) {
$this->error['postcode'] = $language->get('error_postcode');
}
Step 2
Open the /catalog/language/english/controller/account_create.php file, find $_['error_city'], and add the following line just above that line (this would be at line 42 [v 0.7.7]), then save the file.
Code: Select all
$_['error_postcode'] = '* Post code must be greater than 4 and less than 12 characters!';
Step 3
Open the /catalog/template/default/content/account_create.tpl file, find the line containing echo $entry_postcode; and change that whole table row to look like the following and save the file.
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>
That should do it!