AliExpress Dropshipping forum - How to ensure the street number existing in address field?

Home AliExpress Dropshipping Forum Ali2Woo Tools Ali2Woo plugin How to ensure the street number existing in address field?

  • Author
    Posts
  • philipp oberthür
    Participant
    #8964

    Hi,
    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!
    Philipp

    Arthemy Ryzhov
    Participant
    #8965

    Hello,

    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 Team

    philipp oberthür
    Participant
    #8966

    ok thank you very much, then i will wait for the ticket answer 🙂

    philipp oberthür
    Participant
    #8969

    ok 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.
  • You must be logged in to reply to this topic.

Turn Your Store Into

Cash Machine

Enter email and get FREE eBook with

best dropshipping tips for 2020

guide box

By entering your email, you agree to receive marketing

emails from Ali2woo. You can unsubscribe any time.

Thank you!

Check Your E-mail & Start Downloading

Thank you for your interest in our e-book. We’ve sent you an email with a download link - simply click it, and start downloading

Download our free ebook:

Turn Your Store Into Cash Machine