Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM – Feature Request › Implementing WCFM in the theme and WooCommerce.
- This topic has 4 replies, 2 voices, and was last updated 5 years ago by WCFM Forum.
- AuthorPosts
- April 16, 2019 at 8:41 pm #58206cousinrGuest
Help me please. I need the code for “function.php”.
On store page (*/store/”name_shop”/about) there is an “about” tab. This page publishes information about the store. And the data is taken from the page of the vendors, from text-area shop description (*/store-manager/settings/).
1. I want to take information about the store from this tab and show it on the single product page in the “Info-1” tab.
I pasted this code:
| function add_tabs($tabs){
|
| $tabs[‘Info-1’] = array(
| ‘title’ => ‘Info-1’,
| ‘priority’ => 40,
| ‘callback’ => ‘wcfm-store-about’
| );
|
| return $tabs;
| };After that, a tab called Info-1 appeared, but that is empty. The information that I wrote and saved in text area simply does not visible. Information is still visible only on the About Store page (*/store/”name_shop”/about). Probably this is not the correct code and it is not enough. How to make it work?
2. On the page (*/store-manager/memberships-settings/) there is a Registration Form Custom Fields. I added a few fields, but they dont have display meta_name. On the page (*/store-manager/settings/) I want to display such several custom fields along with a text area and with the ability to edit them from this page.
And then I also want to display the data from these fields on the “Info-1” tab of the single product page.3. In the same place, on the page (*/store-manager/settings/), near the store name there is a store phone. I also want to display it on the single product page and a few more custom fields under the price of the goods.
https://ibb.co/ZgD3qXs
https://ibb.co/FwrxRFs
https://ibb.co/wsnVDZL
https://ibb.co/4tj3t63Please help, send me the code, sorry, I do not have enough knowledge. Thank you very much.
- April 17, 2019 at 12:01 pm #58291WCFM ForumKeymaster
Hi,
Well, this code in not right.
Between, how you are showing “Sold By” under single product page? – As Tab!
Thank You
- April 17, 2019 at 2:02 pm #58309cousinrGuest
I know about the fact that i can choose the output mode in the settings “Sold by” – AS TAB.
But it does not suit me. There is no information that I have to specify according to the law on electronic stores.
Please, help me, give the code for the three points i wrote right away.
https://ibb.co/yf1J8SM
- April 17, 2019 at 1:39 pm #58307cousinrGuest
You did not answer the question. ((( I do not understand, please give the code. I need to do as I want.
- April 18, 2019 at 9:38 pm #58514WCFM ForumKeymaster
Hi,
You may get vendor’s store info like this –
$store_user = wcfmmp_get_store( $vendor_id ); $store_info = $store_user->get_shop_info(); $gravatar = $store_user->get_avatar(); $email = $store_user->get_email(); $phone = $store_user->get_phone(); $address = $store_user->get_address_string(); $about = $store_user->get_shop_description();
$vendor_id => product’s author.
Check whether it’s a vendor user or not!
wcfm_is_vendor( $vendor_id )
2. On the page (*/store-manager/memberships-settings/) there is a Registration Form Custom Fields. I added a few fields, but they dont have display meta_name. On the page (*/store-manager/settings/) I want to display such several custom fields along with a text area and with the ability to edit them from this page.
And then I also want to display the data from these fields on the “Info-1” tab of the single product page.– Vendor’s are already allowed to edit these fields from WCFM Profile -> Additional Info
All these are stored at “user_meta” so you may fetch those easily using function – “get_user_meta”
Please check here – https://wclovers.com/knowledgebase/wcfm-marketplace-widgets-short-codes/
There is a short code – wcfm_store_info
It also help helpful for showing such information.Thank You
- AuthorPosts
- The topic ‘Implementing WCFM in the theme and WooCommerce.’ is closed to new replies.