Home Forums WC Vendors Pro Support How to add extra fields to the product form

NOTICE: We've Moved to a Ticket System for Support

As of August 31, 2017 (12am EST) our support forums will be retired (read-only), and we will be moving to a support ticket system.  This will allow us to better organize and answer support requests, and provide a more personalized experience as we assist our customers.

For the time being, we will leave our forums open for reading and learning while we work on creating a more robust Knowledge Base for everyone to use.

If you are a WC Vendors Pro customer please open a support ticket here. 

If you are a WC Vendors user please open a support ticket on the Wordpress.org forums.

The information on this forum is outdated and in most instances no longer relevant. Please be sure to check our documentation for the most up to date information.

https://docs.wcvendors.com/

Thank you to all of our customers!

 

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #58455
    esteban
    Participant

    Hello, I would like to know what is the procedure to add a new field to the “add product” form since in particular I would like to add a drop field called “condition” Example: New , Like new , Very good, Good, acceptable

    I would also like to know how I can make this field compulsory.

    Thank you.

    #58471
    Karen Thomas
    Participant

    Hi Esteban,

    I’ve grabbed these from the knowledge base for you:

    How to make fields required / compulsary

    Adding custom field to Product-Edit Form (this is to add a text area or text line field. I’d also love to know how to add a drop down field but maybe the lovely WCVendors guys can help 🙂

    #58510
    Anna
    Member

    Thanks, Karen.
    For drop-down you’d use the select form type, for example:
    https://github.com/wcvendors/wc-vendors-pro-simple-auctions/blob/master/class-wcv-simple-auctions.php#L239-L245

    #58513
    esteban
    Participant

    Thank Anna I’ll test it any concern I contact you again

    #58753
    esteban
    Participant

    Hi Anna, I was able to add the “condition” field to the “add product form” but I did not get it to show the value entered in the tab of the product already published … I placed the code that comes out at the end in this Link and I’m like this

    add_action(‘woocommerce_product_meta_start’, ‘wcv_item_condition’, 2);
    function wcv_item_condition() {
    $output = get_post_meta( get_the_ID(), ‘wcv_simple_auctions_item_condition’, true );
    echo ‘<b>Condición del producto:</b> ‘ . $output . ‘<br>’;
    }

    But the image value does not exit

    I hope you help me, thanks

    #77092
    Lingzhou Ao
    Participant

    Hi Esteban,
    Do you solve the problem that the condition doesn’t show? I have the same question, and if you have an answer about it, could you help me? Thank you very much!

Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘WC Vendors Pro Support’ is closed to new topics and replies.