Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM › Adding custom fields in the vendor settings page
- This topic has 3 replies, 3 voices, and was last updated 6 years ago by WCFM Forum.
- AuthorPosts
- November 19, 2018 at 10:30 pm #37144RamiParticipant
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.
- November 20, 2018 at 5:57 am #37170WCFM ForumMember
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
- November 20, 2018 at 12:00 pm #37224RamiGuest
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.
- November 20, 2018 at 5:24 pm #37307WCFM ForumMember
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
- AuthorPosts
- The topic ‘Adding custom fields in the vendor settings page’ is closed to new replies.