• Toll-free  888-665-8637
  • International  +1 717-220-0012
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

birdsafe
#1 Posted : Thursday, April 9, 2009 10:50:05 AM(UTC)
birdsafe

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?
Richard
#2 Posted : Thursday, April 9, 2009 11:23:03 AM(UTC)
Richard

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
Aaron
#3 Posted : Thursday, April 9, 2009 2:10:36 PM(UTC)
Aaron

Rank: Administration

Joined: 4/2/2004(UTC)
Posts: 2,393
United States
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
Richard
#4 Posted : Thursday, April 9, 2009 2:45:18 PM(UTC)
Richard

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
birdsafe
#5 Posted : Thursday, April 9, 2009 8:29:00 PM(UTC)
birdsafe

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.
birdsafe
#6 Posted : Thursday, April 9, 2009 8:33:08 PM(UTC)
birdsafe

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.
MitchA
#7 Posted : Thursday, April 9, 2009 9:32:53 PM(UTC)
MitchA

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.
Aaron
#8 Posted : Friday, April 10, 2009 7:18:39 AM(UTC)
Aaron

Rank: Administration

Joined: 4/2/2004(UTC)
Posts: 2,393
United States
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
birdsafe
#9 Posted : Friday, April 10, 2009 11:55:58 AM(UTC)
birdsafe

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.

©2024 Develisys. All rights reserved.
  • Toll-free  888-665-8637
  • International  +1 717-220-0012