biddyweb / substruct

Automatically exported from code.google.com/p/substruct
0 stars 0 forks source link

Billing addresses should accept PO boxes. #98

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

Fill out an order, use a PO Box as a billing address.

What is the expected output? What do you see instead?

This should work, but it doesn't because of the validation on all addresses.

Original issue reported on code.google.com by subim...@gmail.com on 16 Jun 2008 at 1:01

GoogleCodeExporter commented 9 years ago
Is this just a matter of modifying the address validation to allow "#" and "."? 
Alternatively there could be conditional logic that if the line one of address 
fails 
as is, a regex could be run to determine if line one is a po box , something 
like... 
\b[P|p]*(OST|ost)*\.*\s*[O|o|0]*(ffice|FFICE)*\.*\s*[B|b][O|o|0][X|x]\b 

If there is a match.. relax the validation rule.

Original comment by randiz...@gmail.com on 24 Jul 2008 at 1:57

GoogleCodeExporter commented 9 years ago
Actually randizzle it's a little more complicated than that. Addresses can act 
as
billing and shipping address, or either/or. Checking to see which is which 
during
validation is a bit convoluted at the moment.

Original comment by subim...@gmail.com on 11 Aug 2008 at 10:25

GoogleCodeExporter commented 9 years ago
maybe could add a flag to OrderAddress instances
like
attr_accessor :am_billing
which can be used during the PO Box check.
Cheers!
-=R

Original comment by rogerpack2005 on 30 Oct 2008 at 2:19

GoogleCodeExporter commented 9 years ago

Original comment by subim...@gmail.com on 1 Sep 2010 at 12:27

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r339.

Original comment by subim...@gmail.com on 7 Sep 2010 at 2:09

GoogleCodeExporter commented 9 years ago
Ended up removing PO Box validation at all. Doesn't make sense for all stores 
so it shouldn't be in the base code.

Original comment by subim...@gmail.com on 7 Sep 2010 at 2:10