Zip code / postal code

jacobi22

Quotenow I can use 1 or 2 digits in my Zip code. I hope this doesn't affect anything else

not for or in bakery, but maybe it makes sometimes more work for you, when your customer not send the correct postal code

svsanchez

I think I found the solution for using less than 4 characters in the Zip code:

In /modules/bakery/view.php around line 523 you will see something like this:

if (strpos($field, 'zip') !== false) {
            if (!preg_match('#^[A-Za-z0-9 -]{4,10}$#', $value)) {
               $error_bg[] = $field;
               $errors[] = htmlspecialchars($value, ENT_QUOTES).' '.$MOD_BAKERY['ERR_INVAL_ZIP'];

What I did is change the number 4 in {4,10} to {1,10} and now I can use 1 or 2 digits in my Zip code. I hope this doesn't affect anything else :)

svsanchez

I am running into a similar problem. We don't use GT-Zip code in Guatemala either, but what is really causing me problems is that we use 1 and 2 digit zones in Guatemala, and Bakery will not allow people to put just "7" or "15" there. I guess the field is setup so that people are forced to write at least 4 digits. How can I tell Bakery to allow 1 or 2 digits for the zip code?

janarie

Hello,

Does anybody know how to remove the land-code in front of the zip code in all adresses (e.g. customers adress).
In the Netherlands it is not usual to show the Zip code as NL-5423 AA, but just as 5423 AA.
So I want to remove the NL- in front of the actual Zip code.

Can anybode help me?

Kind Regards,

Jan Arie