How can I make the "postcode" required when registering?
77 posts
• Page 2 of 4 • 1, 2, 3, 4
Re: How can I make the "postcode" required when registering?
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.
- chapstick
- Posts: 13
- Joined: Wed Oct 28, 2009 2:26 pm
Re: How can I make the "postcode" required when registering?
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:
viewtopic.php?f=20&t=6129#p29382

Donate!|OpenCart Basics|GeoZones
Help me get more development cloud storage - Click Here to get DropBox
-

Qphoria - Administrator
- Posts: 18199
- Joined: Mon Jul 21, 2008 7:02 pm

Re: How can I make the "postcode" required when registering?
Beautiful! This post should be published or the option should be included in the final code 

- nocko
- Posts: 24
- Joined: Tue Jan 26, 2010 6:14 am
Re: How can I make the "postcode" required when registering?
Very cool - thanks, guys! 

- deeve
- Posts: 250
- Joined: Tue Oct 20, 2009 8:31 am
Re: How can I make the "postcode" required when registering?
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.
- JordyC
- Posts: 12
- Joined: Sun Apr 04, 2010 6:56 pm
Re: How can I make the "postcode" required when registering?
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
Created my future by opencart~
- junstore
- Posts: 21
- Joined: Thu Apr 08, 2010 1:41 pm
- Location: China
Re: How can I make the "postcode" required when registering?
Works like a Charm (using 1.4.4)
Last edited by kedgetech on Sun Aug 22, 2010 2:41 am, edited 1 time in total.
-

kedgetech - Posts: 637
- Joined: Mon Mar 22, 2010 9:20 am
- Location: USA, Australia, India
Re: How can I make the "postcode" required when registering?
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
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
- chriszammett
- Posts: 32
- Joined: Wed Apr 07, 2010 1:17 pm
Re: How can I make the "postcode" required when registering?
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.
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.
- Purebeads
- Posts: 368
- Joined: Fri Apr 30, 2010 4:07 am
Re: How can I make the "postcode" required when registering?
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.
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.

OpenCart Development, Customization, Upgrades, Integration, Support, SEO, SSL
CMS|Price Match|Product Catalog|Product Bundle|Product Enhancements|Paypal Restrictions
-

kedgetech - Posts: 637
- Joined: Mon Mar 22, 2010 9:20 am
- Location: USA, Australia, India
Re: How can I make the "postcode" required when registering?
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.
- Purebeads
- Posts: 368
- Joined: Fri Apr 30, 2010 4:07 am
Re: How can I make the "postcode" required when registering?
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.
In terms of shipping, postcodes are important so I think it should be a required field in next OC version.

v. 1.4.9.6 & v. 1.5.1.1
- Joxe
- Posts: 202
- Joined: Tue Apr 27, 2010 10:12 pm
Re: How can I make the "postcode" required when registering?
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
-

dannydaman9 - Posts: 73
- Joined: Tue May 11, 2010 11:00 am
- Location: Manchester, England
Re: How can I make the "postcode" required when registering?
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!';
-

dramony - Posts: 258
- Joined: Sat Oct 24, 2009 4:34 am
Re: How can I make the "postcode" required when registering?
thats already inputted. double checked it and still no error message pops up
-

dannydaman9 - Posts: 73
- Joined: Tue May 11, 2010 11:00 am
- Location: Manchester, England
Re: How can I make the "postcode" required when registering?
does anyone have a solution? I'm quite desprate for this now
thanks
EDIT: Fixed it now by myself. works like a charm
thanks
thanks
EDIT: Fixed it now by myself. works like a charm
thanks
-

dannydaman9 - Posts: 73
- Joined: Tue May 11, 2010 11:00 am
- Location: Manchester, England
Re: How can I make the "postcode" required when registering?
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
thanks
-

dannydaman9 - Posts: 73
- Joined: Tue May 11, 2010 11:00 am
- Location: Manchester, England
Re: How can I make the "postcode" required when registering?
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

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

OpenCart is the best Webshop tool! Congratulations with releasing version 1.5
- funrider
- Posts: 65
- Joined: Thu Jun 10, 2010 1:19 pm
- Location: Netherlands
Re: How can I make the "postcode" required when registering?
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.
-

Karen - Posts: 159
- Joined: Thu Jun 10, 2010 6:51 am
- Location: WA State, USA
Re: How can I make the "postcode" required when registering?
This has just been posted (haven't tried it yet):
viewtopic.php?f=2&t=15699&start=40#p78495
==========
EDIT, 21/06/2010:
It works. BIg thanks to OCyvon2 - you're a star!
viewtopic.php?f=2&t=15699&start=40#p78495
==========
EDIT, 21/06/2010:
It works. BIg thanks to OCyvon2 - you're a star!
- Moggin
- Posts: 1079
- Joined: Tue May 04, 2010 8:56 pm
77 posts
• Page 2 of 4 • 1, 2, 3, 4
Who is online
Users browsing this forum: AlGeorge, dereklro, fizfaziq, Haywire, kokoshaggy and 51 guests














