AliExpress Dropshipping forum

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
    Moderator
    #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
    #8967

    @all

    somebody knows if i can use this plugin for the checkout form field?

    Checkout Field Editor

    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 week ago by  Admin.
  • You must be logged in to reply to this topic.
Download our free ebook: 
Dropshipping Guide 2019

Learn how to start, run, and grow an ecommerce business without inventory

Enter your email and download a totally free eBook "Dropshipping Guide 2019 for Business with AliExpress"

By entering your email we'll also send you marketing emails related to Ali2Woo, subject to our Privacy Policy. You can unsubscribe anytime.

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