Support » Plugin: WooCommerce » Custom Field in single-product.php variation Form

  • I need to submit a custom text field in a single-product.php Form, before add to cart…

    I made a screenshot for a better understand.

    Screenshot :

    Where the POST data is submited without an action … and after submit make a redirect to cart … (so, is not a SELF page…)

    <form method="post">
    <input type="hidden" name="variation_id" value="" />
    <input type="hidden" name="add-to-cart" value="<?php echo $product->id; ?>" />
    <input type="hidden" name="product_id" value="<?php echo esc_attr( $post->ID ); ?>" />
    <!-- And my custom input -->
    <input type="text" name="imei-code"></input>
    <input type="submit"></input>

    How to extract $_POST[‘imei-code’] ??? From where? Where is data submited?!

  • The topic ‘Custom Field in single-product.php variation Form’ is closed to new replies.