Adding custom fields in the vendor settings page

We're shifting our Forum based support to a more dedicated support system!

We'll be closing our Forum support from 10th June, 2020 and move to Email Support assistance.

  • If you are a WCFM premium add-ons user, contact us- here
  • Want to know more before buying our add-ons? Send Pre sale queries- here
  • If you are a WCFM free user, please open a support ticket at WordPress.org
  • For WCFM App related queries, reach us- here
From now the forum will be read-only!

Multi Vendor Marketplace Plugin | WCFM Marketplace Forums WCFM Adding custom fields in the vendor settings page

Viewing 3 reply threads
  • Author
    Posts
    • #37144
      Rami
      Participant

      Hi, I use WCFM Ultimate and Wc-marketplace in my website, my vendors are teachers, and I need them to add topics they teach in their shop page under the description.

      In short:
      I need the vendor to add the topics he teach as custom fields in his wcfm settings page, and these fields have to be displayed in his shop page under the description.
      for displaying the fields in the shop page, I succeeded in adding the desired field in the vendor’s setting page using the following code:

      add_filter ( ‘wcfm_wcmarketplace_settings_fields_general’ , ‘add_teacher_topics’ ,20 );
      function add_teacher_topics($settings_fields_general){
      $settings_fields_general[‘teacher_topics’]= array(
      ‘title’ => __( ‘Topics I Teach’, ‘wc-frontend-manager’ ),
      ‘type’ => ‘text’,
      ‘priority’ => 50,
      ‘class’ => ‘wcfm-text wcfm_ele’,
      ‘label_class’ => ‘wcfm_title wcfm_ele’,
      );
      return $settings_fields_general;
      }

      The field is saved succesfuly, but how can the field content be displayed in the store (shop) page of the vendor as does the description field for example?
      Can you help me with the code to add to save the field content somewhere in the database (user_id I think) then display it in the vendor’s shop page?

      *Note: I have published this post by mistake in “WCFM marketplace” forum by mistake, and the keymaster sent me back here.

      Thanks in advance.

    • #37170
      WCFM Forum
      Member

      HI,

      Why you have created this topic at this forum?

      You have to create this topic at WC Marketplace forum – https://wc-marketplace.com/support-forum/

      Importantly, don’t mention there that you are using “WCFM”

      Just, ask them – “how you will able to show a custom user meta info under vendor’s store page”?

      Thank you

    • #37224
      Rami
      Guest

      Thank you for the reply,
      ***Why you have created this topic at this forum?
      Because the field is created in wcfm, and I need to pull the content into other place, so I will need to use wcfm functions or hooks.

      *** Just, ask them – “how you will able to show a custom user meta info under vendor’s store page”?
      Is the code above stores the content into the user meta? I think I need to another hook to save the date there, which exactly this is where I need your help.

      I think I can later add the content from the user meta by editing wc-marketplace file “archive_vendor_info.php”

      *** Note: Is there any change of the support team or policy? because I notice some change of the level of support between last year and today…
      I have created a topic in your forum for wc-marketplace and been pushed here because it was the wrong place to ask there (based on the keymaster there), but I am sure it was the right forum, he said it was WCFM-marketplace forum but I am sure it was wc-marketplace one, please look to the link: https://wclovers.com/forums/topic/add-custom-fields-to-the-vendors-settings-form/

      Regards.

    • #37307
      WCFM Forum
      Member

      Hi,

      “Because the field is created in wcfm, and I need to pull the content into other place, so I will need to use wcfm functions or hooks.”

      – It does not matter how you have set some additional info for vendors, those are store as user meta and it’s part of WordPress.
      So, WC Marketplace team is bound to help you in this.

      Thank You

Viewing 3 reply threads
  • The topic ‘Adding custom fields in the vendor settings page’ is closed to new replies.