WordPress.org

Forums

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

  1. alexcsandru
    Member
    Posted 1 year 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/

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce - excelling eCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic