Home Forums WC Vendors Pro Support Adding a new custom field to add products template

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 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #14008
    James
    Participant

    Hello,

    I’ve searched the knowledgebase, but I can’t find anything related on how to add a new custom field to the bottom of the add products page, please could you let me know? I just need to add a required text field.

    Thanks,

    James

    #14010
    Karen Thomas
    Participant

    Following this James as I also need to add an additional field – ‘dispatch days’ and then also display the contents of the field on the website.

    I currently use the Advanced Custom Field plug in to add the field on the wp-admin screens but I never did work out how to display on my website! So I actually ended up typing it in for vendors myself in the description!

    There is an article in the knowledge base on how to integrate with the Advanced Custom Fields plug in, but I’m struggling to understand what I need to do as I only have a tiny brain lol! 😉

    Here’s the article for reference: https://www.wcvendors.com/kb/pro-adding-advanced-custom-fields-acf-support/

    Karen

    #14019
    WC Vendors Support
    Participant

    @digitalchild can you write a quick gist for this as a template and I’ll add it to the KB?

    #14039
    Karen Thomas
    Participant

    Thank u both! X

    #14067
    Jamie
    Keymaster

    Hello,

    It appears the code I wrote for this isn’t actually in the right place at the moment so it won’t work. I’ve moved it to the correct place now so it will work in the next release. Apologies for that! I’ll be writing up a full how-to with custom fields to both the store settings and the product page this weekend.

    The basic idea is any field you add to the front end form that has an id that starts with ‘_wcv_custom_product’ or ‘_wcv_custom_setting’ will automatically be saved to the db you just have to add a form helper form.

    Here is a gist that would be a custom input as requested above on the product edit form.

    https://gist.github.com/digitalchild/cbbb83c972aedebc51f4

    cheers,

    Jamie.

    #14071
    James
    Participant

    Hi Jamie,

    Thanks for this – i am currently using the first version of WC Vendors Pro – I have edited all of the templates quite heavily and played around with it a lot, so i am very wary of updating the plugin as it’s working fine as it is for me and the purpose it has. I’m also very tight for time as my client wanted to launch a week ago.

    Will this Github code work on the original version? If not, would you be able to tell me which files i need to change in order for it to?

    Thanks again

    James

    #14083
    Hal
    Participant

    I look forward to this how to.

    Thanks Guys. Great Product.

    #14254
    Karen Thomas
    Participant

    Hi @jamesthurlow989 I was scared of updating too, but as I’d amended the templates by copying them into themes, all my settings/personalisation stayed after upgrading 🙂

    Look forward to the guide too! 🙂

    #15588
    Karen Thomas
    Participant

    Hi James, know you’re super busy, just wondering if you’ve managed to write the help guide and if the code will be in the right place for the next release?
    Many thanks,

    Karen 🙂

    #15678
    WC Vendors Support
    Participant

    Download it and find out. 🙂 1.1.0 is live.

    #21457
    Kenny
    Participant

    This does not work. The field shows in the front end edit product form, but it does not save.

    #21467
    WC Vendors Support
    Participant

    Hi Kenny,

    Why don’t you think it saves? Any meta key that starts with _wcv_custom_product automatically saves to the product meta. In Pro v1.2.0 you can call it wcv_custom_product (no _ underscore) and then the field would also show up under the CUstom Fields meta box. (Pro v1.2.0 is being packaged now, will be released within the hour).

    Custom fields that start with _ do not show up on the Custom Fields meta box.

    Custom fields that start with anything else will show up.

    Ben

    #21470
    Kenny
    Participant

    Ahhhhh I didn’t realize _wcv_custom_product was required. I changed the custom field to include that at the beginning and it does indeed work now. Thanks.

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