Page 2 of 5

Re: How can I make the "postcode" required when registering?

Posted: Sun Jan 03, 2010 1:57 am
by chapstick
Rafael wrote:When checking out (OpenCart 1.3.2), and at delivery information I clicked on "change address"
When I do this, my postcode isn't required, so in theory someone could remove their postcode at this step.

Re: How can I make the "postcode" required when registering?

Posted: Sun Jan 03, 2010 2:54 am
by Qphoria
chapstick wrote:
Rafael wrote:When checking out (OpenCart 1.3.2), and at delivery information I clicked on "change address"
When I do this, my postcode isn't required, so in theory someone could remove their postcode at this step.
which is why it is important to read the whole thread:
http://forum.opencart.com/viewtopic.php ... 129#p29382

Re: How can I make the "postcode" required when registering?

Posted: Wed Feb 10, 2010 4:59 am
by nocko
Beautiful! This post should be published or the option should be included in the final code :-X

Re: How can I make the "postcode" required when registering?

Posted: Mon Mar 01, 2010 7:17 pm
by deeve
Very cool - thanks, guys! ;)

Re: How can I make the "postcode" required when registering?

Posted: Mon Apr 05, 2010 3:00 am
by JordyC
Is or Will this be in one of the offical OpenCart updates? If not then ill mod it using the code given in the thread but I give a Thumbs up to it being in the offical update.

Re: How can I make the "postcode" required when registering?

Posted: Tue Apr 13, 2010 11:14 pm
by junstore
it will be wonderful if opencart can publish a stable version like zc 1.38a, it hard to use if we want some modifications and need we know some db and php, but it is still awesome that daniel did a god job

Re: How can I make the "postcode" required when registering?

Posted: Mon Apr 26, 2010 4:39 pm
by kedgetech
Works like a Charm (using 1.4.4)

Re: How can I make the "postcode" required when registering?

Posted: Fri May 07, 2010 10:31 pm
by chriszammett
I keep getting this error on my contact page

have followed the steps several times but keep hitting the same problem

Notice: Undefined variable: error_postcode in /customers/ghd-spares.com/ghd-spares.com/httpd.www/catalog/view/theme/default/template/account/create.tpl on line 81

Re: How can I make the "postcode" required when registering?

Posted: Tue May 11, 2010 1:06 pm
by Purebeads
I just want to add my voice that I would like to see the postal code be required. However, if you have the city and state (or city and province, etc.), you can generally look it up on the internet.

One other thing: In some languages, such as Chinese, 2-letter city names can occur. I think that making 3 letters the minimum for that field is not a good idea.

Re: How can I make the "postcode" required when registering?

Posted: Tue May 11, 2010 9:18 pm
by kedgetech
chriszammett - You missed a file to change or add the content. Try to re-visit all the files you should be alright.

Purebeads - I think thats a good idea to have the zip code mandated but I would dont see the greater good adding all the zipcodes of all countries to be added to OC and comes with maintenance of changing/in correct zip codes.
I would say changing city name validation is simple customization good catch though.

Re: How can I make the "postcode" required when registering?

Posted: Thu May 13, 2010 3:25 am
by Purebeads
I didn't mean to say that OpenCart should have a list of postal codes. I was just making a general comment that postal codes can be found on the internet -- so if a customer leaves it off, the merchant can still find it.

Re: How can I make the "postcode" required when registering?

Posted: Tue May 18, 2010 2:27 am
by Joxe
Is the code given working for 1.4.7? I'd like to make post code a required field either with customer registration or guest checkout...
In terms of shipping, postcodes are important so I think it should be a required field in next OC version. ;)

Re: How can I make the "postcode" required when registering?

Posted: Tue May 25, 2010 6:32 pm
by dannydaman9
Joxe wrote:Is the code given working for 1.4.7? I'd like to make post code a required field either with customer registration or guest checkout...
In terms of shipping, postcodes are important so I think it should be a required field in next OC version. ;)
I'm using 1.4.7 and works ok. However i think i missed something as when i click continue, it stays on the page but doesn't display an error message to notify the user about the postcode. Also there is no asterisk near postcode.

Have i missed something or does something else need to be implemented?

Thanks

Re: How can I make the "postcode" required when registering?

Posted: Wed May 26, 2010 2:27 pm
by dramony
dannydaman9 wrote:
I'm using 1.4.7 and works ok. However i think i missed something as when i click continue, it stays on the page but doesn't display an error message to notify the user about the postcode. Also there is no asterisk near postcode.

Have i missed something or does something else need to be implemented?

Thanks
Maybe you missed this:

Code: Select all

3. EDIT: catalog/language/english/account/create.php
FIND:

Code: Select all
    $_['error_city']           = 'City must be greater than 3 and less than 128 characters!';


AFTER, ADD:

Code: Select all
    $_['error_postcode']       = 'Postcode must be greater than 1 and less than 10 characters!';

Re: How can I make the "postcode" required when registering?

Posted: Wed May 26, 2010 4:16 pm
by dannydaman9
thats already inputted. double checked it and still no error message pops up

Re: How can I make the "postcode" required when registering?

Posted: Wed May 26, 2010 9:02 pm
by dannydaman9
does anyone have a solution? I'm quite desprate for this now

thanks

EDIT: Fixed it now by myself. works like a charm

thanks

Re: How can I make the "postcode" required when registering?

Posted: Fri May 28, 2010 11:38 pm
by dannydaman9
i now want to be able to make in required in the change address section when ordering a product (i.e. the checkout section) have followed the steps that someone else posted on this thread. It works however i cann't get the error message to appear again. Any help?

thanks

Re: How can I make the "postcode" required when registering?

Posted: Mon Jun 14, 2010 5:14 pm
by funrider
Isn't a option to have 'postcode/zipcode' a required field build in the options of 1.4.8? I installed 1.4.8 but can't find the option to turn this on. Or best would be to have it a required field when I am running the Dutch language where we use postcode.

I looked in e.g. System > Locolisation > Languages > edit Country

Image

Re: How can I make the "postcode" required when registering?

Posted: Tue Jun 15, 2010 9:57 pm
by Karen
dannydaman9 wrote:does anyone have a solution? I'm quite desprate for this now

thanks

EDIT: Fixed it now by myself. works like a charm

thanks
Care to tell us how you fixed it? Am having the same problem.

Re: How can I make the "postcode" required when registering?

Posted: Tue Jun 15, 2010 10:56 pm
by Moggin
This has just been posted (haven't tried it yet):
http://forum.opencart.com/viewtopic.php ... =40#p78495
==========
EDIT, 21/06/2010:
It works. BIg thanks to OCyvon2 - you're a star!