Support » Plugin: WooCommerce » Woocomerce – new page with custom fields 2

  • Resolved direktor05



    So here is the problem. I want to create a totally new page “Suppliers” with the following fields: Supplier Name, Address, Country, ContactPerson, website, telephone, email, instantmessaging, links, remarks, all text fields. AND a table grid with a list of suppliers below. I want to

    1. Add new page with this custom fields on it
    2. I discovered that by using ACF plugin (Advanced Custom Fields) can do this job partially. With ACF I can add new fields to new page, however for anything to be displayed at front page, I must write the content of the fields already in Woocommerce Admin when creating custom fields.
    3. I want to create a new page “Suppliers” with all mentioned custom fields where user would have a form to fill the data in by himself and press Submit button to save this data into the database – not that I define the content to display in the ACF section of Dashboard.

    Here is a question: Is it possible to somehow create a new page “Suppliers” with custom fields, but the user would input the data by himself later? Here is what I think should be done: Create new page, add custom fields, create template PHP file and add custom Woocommerce PHP code to save form data to database and display it in the table grid below on the new page. However would this custom PHP code be picked up by the ACF plugin to know which data to save where and how to retrieve it from which field in database and put it where on the new page?

    Can this be done? Has anyone ever made something like this? Please share me your thoughts. Thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • So here is another question. How to add Submit button on a form and tell WordPress you want to save this form into this and this field, to be picked up later by the custom fields?

    Adding a form and Submit button is easy, action=save.php where save.php would have Woocommerce wp_insert_post command in it telling it where to save the form in the database.

    But I have a feeling this would not be so easy. Would Woocommerce be able to pick up this code and execute it?

    Actually adding Supplier should be part of back-end. I’m trying to crystallize in my mind how to do it. I’d need to create a back-end new page with back-end new custom fields. Can this be done and how? Only 1 field would be shown in front end – the supplier name added to the products display page.

    Thanks for your replies. Found the answer:

    – use CPT UI
    – use ACF
    – use Elementor

    Thanks all. You have been very helpful and talkative.

    Regards, Bogomil

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.