Home › AliExpress Dropshipping Forum › Ali2Woo Tools › Ali2Woo plugin › How to ensure the street number existing in address field?
- This topic has 4 replies, 2 voices, and was last updated 1 year ago by
philipp oberthür.
- AuthorPosts
philipp oberthür
ParticipantNovember 6, 2019 at 4:10 am #8964Hi,
Can I create a extra field for the house number entered on my order form or can it only be a form field because of Ali2Woo?
The problem with us is that customers often enter the street number in a field, but not the house number.
Best regards!
PhilippArthemy Ryzhov
ParticipantNovember 6, 2019 at 1:16 pm #8965Hello,
You can create any field you want. But when a user send the form, the data have to be saved on the fields which are known for our plugin.
We noticed that you have created the ticket #6244 in our support system. We suggest you to continue our communication there.
Thanks,
Ali2Woo Teamphilipp oberthür
Participantphilipp oberthür
ParticipantNovember 7, 2019 at 2:55 am #8967@all
somebody knows if i can use this plugin for the checkout form field?
philipp oberthür
ParticipantNovember 7, 2019 at 5:34 am #8969ok solved, if anybody needs to know, with this code theres a error message if you dont put in a street number:
// Check if address field contains house number otherwise provide error message
add_action( ‘woocommerce_after_checkout_validation’, ‘validate_checkout’, 10, 2);
function validate_checkout( $data, $errors ){
if ( ! preg_match(‘/[0-9]/’, $data[ ‘billing_address_1’ ] ) ){
$errors->add( ‘address’, ‘Achtung: Bitte Hausnummer angeben’ );
}
}-
This reply was modified 1 year ago by
Admin.
-
This reply was modified 1 year ago by
- AuthorPosts
- You must be logged in to reply to this topic.