WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
Custom Field in single-product.php variation Form (1 post)

  1. alexcsandru
    Member
    Posted 5 months ago #

    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 : http://oi39.tinypic.com/2la7hn9.jpg

    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>
    </form>

    How to extract $_POST['imei-code'] ??? From where? Where is data submited?!
    http://wordpress.org/plugins/woocommerce/

Reply

You must log in to post.

About this Plugin

About this Topic