Contributions

Other (Category Index)
Search: 

admin customers.php bug fix

The customers.php in the admin folder has a small bug for those who use ZIP+4 codes in the United States. ZIP+4 codes require a total length of 10 characters. Your customer can type in the full ZIP+4 code without any problem. However if you need to use the customer administration to modify a customer's information for some reason the ZIP+4 code will be truncated. The fix is simple. In the customers.php file found in the admin folder look for the line that reads as follows:

echo tep_draw_input_field('entry_postcode', $cInfo->entry_postcode, 'maxlength="8"') . ' ' . ENTRY_POST_CODE_ERROR;

In that line change the "8" to a "10" so the line will now read:

echo tep_draw_input_field('entry_postcode', $cInfo->entry_postcode, 'maxlength="10"') . ' ' . ENTRY_POST_CODE_ERROR;

Save the file and upload it and you are done. Your ZIP+4 codes will no longer be truncated when you need to edit customer information.

Expand All / Collapse All

admin customers.php bug fix Kevin L. Shelton 23 Nov 2004

The customers.php in the admin folder has a small bug for those who use ZIP+4 codes in the United States. ZIP+4 codes require a total length of 10 characters. Your customer can type in the full ZIP+4 code without any problem. However if you need to use the customer administration to modify a customer's information for some reason the ZIP+4 code will be truncated. The fix is simple. In the customers.php file found in the admin folder look for the line that reads as follows:

echo tep_draw_input_field('entry_postcode', $cInfo->entry_postcode, 'maxlength="8"') . ' ' . ENTRY_POST_CODE_ERROR;

In that line change the "8" to a "10" so the line will now read:

echo tep_draw_input_field('entry_postcode', $cInfo->entry_postcode, 'maxlength="10"') . ' ' . ENTRY_POST_CODE_ERROR;

Save the file and upload it and you are done. Your ZIP+4 codes will no longer be truncated when you need to edit customer information.

Note: Contributions are used at own risk.