Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

postcode length in admin/customers.php


Guest

Recommended Posts

When editing a customer's address details in Admin, only 8 characters are accepted in the postcode field. As far as I can tell. the database is set up to accept 10 characters, the customer can enter 10 characters, and the US postal service uses 10 characters: 12345-7890.

 

I changed the maxlength values in lines 550 and 555 from 8 to 10. Could this cause any problems anywhere?

 

<?php

if ($error == true) {

if ($entry_post_code_error == true) {

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

} else {

echo $cInfo->entry_postcode . tep_draw_hidden_field('entry_postcode');

}

} else {

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

}

 

Cheers

John

?></td>

Link to comment
Share on other sites

When editing a customer's address details in Admin, only 8 characters are accepted in the postcode field.  As far as I can tell. the database is set up to accept 10 characters, the customer can enter 10 characters, and the US postal service uses 10 characters: 12345-7890.

 

I changed the maxlength values in lines 550 and 555 from 8 to 10.  Could this cause any problems anywhere?

 

<?php

  if ($error == true) {

    if ($entry_post_code_error == true) {

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

    } else {

      echo $cInfo->entry_postcode . tep_draw_hidden_field('entry_postcode');

    }

  } else {

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

  }

 

Cheers

John

?></td>

 

sounds like you did the right thing. To some extent it doesn't make a lot of sense having any limit at all imposed on the admin side - except that it would be truncated by the database.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...