Skip to main content

Don't allow PO Box shipping addresses

More
9 years 11 months ago #253420 by webmaster@pulldog.us
Is there a way to disallow PO Boxes in the shipping address?

Thanks

Jeremy

Please Log in or Create an account to join the conversation.

More
9 years 11 months ago #253453 by nicolas
Hi,

Yes. You can edit the field "address_street" via the menu Display>Custom fields and use the "regular expression check" setting to forbid the use of PO Boxes.
For example, such regex:
Code:
^(?i)(?!p\.?o\.?\sbox|post\soffice).*$
stackoverflow.com/questions/16722720/how-to-negate-po-box-regex
The following user(s) said Thank You: webmaster@pulldog.us

Please Log in or Create an account to join the conversation.

More
9 years 11 months ago #253538 by webmaster@pulldog.us
Cool thanks.

Is there a way to allow PO Boxes in Billing but not in the Shipping address?

Thanks

Jeremy

Please Log in or Create an account to join the conversation.

More
9 years 11 months ago #253551 by nicolas
Hi,

There is no option for that for now as you can't have fields for one type of address and not for the other type.
You would have to do the check with custom javascript instead if you wanted to do that, but you would have to ask a developer to do that for you in that case.
The following user(s) said Thank You: webmaster@pulldog.us

Please Log in or Create an account to join the conversation.

More
9 years 11 months ago #253880 by webmaster@pulldog.us
Thanks for the info.

Jeremy

Please Log in or Create an account to join the conversation.

Time to create page: 0.171 seconds
Powered by Kunena Forum