Rank: Member
Joined: 2/21/2007(UTC) Posts: 1,113
|
about twice a month I'm faced with orders where customers don't enter a zipcode (or improper zipcode) and so no shipping is calculated, yet the order is allowed to complete. Has anyone come up with a way to validate that field for at least five digits and decline the order if it not valid? |
|
|
|
|
Rank: Member
Joined: 4/28/2003(UTC) Posts: 141
|
Joe you didn't mention which version of BV you are running. If its BV5 rev 5 the go to options > countries > select United States and where it says Postal Code Validation Regex: enter this in the box and save ^\d{5}$|^\d{5}-\d{4}$ This should validate either a 5 digit or nine digit code. There should be an error message thrown if it is left blank. Richard www.somethingmorestore.com
|
|
|
|
Rank: Administration
Joined: 4/2/2004(UTC) Posts: 2,393 Location: Hummelstown, PA Thanks: 6 times Was thanked: 163 time(s) in 158 post(s)
|
We're doing the same thing on one of our BV sites. So far so good. |
Aaron Sherrick BV Commerce Toll-free 888-665-8637 - Int'l +1 717-220-0012 |
|
|
|
Rank: Member
Joined: 4/28/2003(UTC) Posts: 141
|
Yeah we have been using it for awhile and its been working great. If you need something for canada let me know I have one for it too. Richard www.somethingmorestore.com
|
|
|
|
Rank: Member
Joined: 2/21/2007(UTC) Posts: 1,113
|
Thanks -- what puzzles me is that we currently have: ^\d{5}$
I would have thought that would prevent a non-zip code or a zip code of less than five characters from allowing an order to go through, but so far it has not. |
|
|
|
|
Rank: Member
Joined: 2/21/2007(UTC) Posts: 1,113
|
Just tested it -- I put "VA" in the zip code box -- the program first told me to select a shipping method -- I chose the "$0.00 enter zip code for rates" clicked "Complete Order" and it allowed it to go through. |
|
|
|
|
Rank: Member
Joined: 3/3/2006(UTC) Posts: 1,737
|
^\d{5}$
3 digits... no go (3.2). Have you got the 'enable validation' check box filled? |
Optimists invent airplanes, Pessimists buy parachutes. |
|
|
|
Rank: Administration
Joined: 4/2/2004(UTC) Posts: 2,393 Location: Hummelstown, PA Thanks: 6 times Was thanked: 163 time(s) in 158 post(s)
|
Joe,
As Mitch said, definitely check that you have the "Enable Postal Code Validation" checkbox checked at the top of the Options --> Countries page in the admin. Also, you should use the regex that Richard posted as it will also validate a 9-digit zip code. |
Aaron Sherrick BV Commerce Toll-free 888-665-8637 - Int'l +1 717-220-0012 |
|
|
|
Rank: Member
Joined: 2/21/2007(UTC) Posts: 1,113
|
Well duh -- I have never seen that postal code validation box before!
[...idiot retreating back into hole] |
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.