Jump to content


Corporate Sponsors


Latest News: (loading..)

- - - - -

increasing the max character lengh of post code


7 replies to this topic

#1 pronane

  • Community Member
  • 38 posts
  • Real Name:PAul

Posted 06 October 2006, 13:22

I have set up a site in ireland, where we dont have postcodes, instead I use the post code text field as the "town" textfield for addressess. however the max length for postcode currently seems to be 10. I want to increase this to at least 20, and I also want to increase it in the admin page, so people that have already registered, I can update their details in the admin section.

Btw, I am relatively new to oscommerce so assuming their is a code change required I will need to know the name of the files to change and their location!!! :thumbsup:

Thanks for any help!! :)

#2 knifeman

  • Community Member
  • 1,519 posts
  • Real Name:Tim
  • Gender:Male

Posted 06 October 2006, 13:27

View Postpronane, on Oct 6 2006, 09:22 AM, said:

I have set up a site in ireland, where we dont have postcodes, instead I use the post code text field as the "town" textfield for addressess. however the max length for postcode currently seems to be 10. I want to increase this to at least 20, and I also want to increase it in the admin page, so people that have already registered, I can update their details in the admin section.

Btw, I am relatively new to oscommerce so assuming their is a code change required I will need to know the name of the files to change and their location!!! :thumbsup:

Thanks for any help!! :)
The address_book table in your database has this field limited to 10. Using phpmyadmin you can alter the max length of the post code field.

Tim

#3 pronane

  • Community Member
  • 38 posts
  • Real Name:PAul

Posted 06 October 2006, 13:32

View Postknifeman, on Oct 6 2006, 02:27 PM, said:

The address_book table in your database has this field limited to 10. Using phpmyadmin you can alter the max length of the post code field.

Tim


yes but arent the text fields/boxes themselves limited to 10 also? I mean a user cant actually enter more than 10 characters?

Also if I just need to update hte address_table, in the admin section it still only allows me to enter 10 characters...

#4 knifeman

  • Community Member
  • 1,519 posts
  • Real Name:Tim
  • Gender:Male

Posted 06 October 2006, 13:42

View Postpronane, on Oct 6 2006, 09:32 AM, said:

yes but arent the text fields/boxes themselves limited to 10 also? I mean a user cant actually enter more than 10 characters?

Also if I just need to update hte address_table, in the admin section it still only allows me to enter 10 characters...
I went to one of my sites and it let me enter well over 10 characters in the post code box on create account page, but it truncated it to 10 on the next page.

Tim

#5 pronane

  • Community Member
  • 38 posts
  • Real Name:PAul

Posted 06 October 2006, 13:56

View Postpronane, on Oct 6 2006, 02:32 PM, said:

yes but arent the text fields/boxes themselves limited to 10 also? I mean a user cant actually enter more than 10 characters?

Also if I just need to update hte address_table, in the admin section it still only allows me to enter 10 characters...


ok the fields are not limited, a user can enter as much as they want, but they get cut off when they are being sent to the database. however the second point is still valid, in the admin section you are unable to enter in anymore characters in the post code field. its just the post code field. this makes no sense.

#6 knifeman

  • Community Member
  • 1,519 posts
  • Real Name:Tim
  • Gender:Male

Posted 06 October 2006, 14:02

View Postpronane, on Oct 6 2006, 09:56 AM, said:

ok the fields are not limited, a user can enter as much as they want, but they get cut off when they are being sent to the database. however the second point is still valid, in the admin section you are unable to enter in anymore characters in the post code field. its just the post code field. this makes no sense.
I see that now. My admin limits me to 8 charcters in that field. Not sure where to change that one. Can you alter the length of post code in the database, then alter existing customers there as well?

Tim

#7 pronane

  • Community Member
  • 38 posts
  • Real Name:PAul

Posted 06 October 2006, 14:10

View Postknifeman, on Oct 6 2006, 03:02 PM, said:

I see that now. My admin limits me to 8 charcters in that field. Not sure where to change that one. Can you alter the length of post code in the database, then alter existing customers there as well?

Tim

ya i can do that tim, but I wanted to do it through the admin less messy...

#8 knifeman

  • Community Member
  • 1,519 posts
  • Real Name:Tim
  • Gender:Male

Posted 06 October 2006, 14:13

View Postpronane, on Oct 6 2006, 10:10 AM, said:

ya i can do that tim, but I wanted to do it through the admin less messy...
I agree, I don't like messing in the Db unless necessary. I have been looking through the files, but I don't see where that field is being limited. Maybe someone else can point you the right way.

Tim