Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM – Membership › Vendor WhatsApp Number
Tagged: membership, registration, vendor, whatsapp
- This topic has 8 replies, 4 voices, and was last updated 3 years, 8 months ago by dpasadam.
- AuthorPosts
- February 12, 2020 at 5:40 pm #106838productsexportParticipant
Can you add an option in Capabilities to show Vendors WhatsApp number in the Sold By Template?
Also when a vendor registration section a field for the whatsApp number?
Attachments:
You must be logged in to view attached files. - February 27, 2020 at 6:48 pm #109047Molay DasKeymaster
Hi,
First navigate to store-manager->Settings->Vendor Registration and then create a custom field with “Whatsapp Number” name. After this please add the below code to your child theme’s functions.php file. If you don’t have a child theme then please use code snippet plugin to add this code.
add_filter( 'wcfm_marketplace_settings_fields_address', 'vendor_store_custom_fields' ); function vendor_store_custom_fields($settings_fields_general) { global $WCFM, $WCFMmp, $wp; if( current_user_can('administrator') ) { $van_cur_url = add_query_arg( array(), $wp->request ); $van_vendorid = substr( $van_cur_url, strrpos( $van_cur_url, '/' ) + 1 ); $user_id = intval( $van_vendorid ); } else { $user_id = apply_filters( 'wcfm_current_vendor_id', get_current_user_id() ); } $store_whatsapp_opt = array( 'yes' => __( 'Yes', 'wc-frontend-manager' ), 'no' => __( 'No', 'wc-frontend-manager' ) ); $vendor_data = get_user_meta( $user_id, 'wcfmmp_profile_settings', true ); $store_whatsapp = isset( $vendor_data['store_whatsapp_number'] ) ? $vendor_data['store_whatsapp_number'] : 'no'; $settings_fields_general["store_whatsapp_number"] = array('label' => __('Show / Hide Whatsapp Number', 'wc-frontend-manager') , 'type' => 'select', 'options' => $store_whatsapp_opt, 'class' => 'wcfm-select wcfm_ele wcfm-banner-uploads', 'label_class' => 'wcfm_title', 'value' => $store_whatsapp ); return $settings_fields_general; } add_action( 'after_wcfmmp_sold_by_info_product_page', 'cus_after_wcfmmp_sold_by_info_product_page' ); function cus_after_wcfmmp_sold_by_info_product_page( $vendor_id ) { $vendor_data = get_user_meta( $vendor_id, 'wcfmmp_profile_settings', true ); $whatsapp = get_user_meta( $vendor_id, 'whatsapp-number', true ); if( $vendor_data['store_whatsapp_number'] == 'yes' ) { echo '<div class="wcfmmp_store_tab_info wcfmmp_store_info_address"><i class="wcfmfa fa-phone" aria-hidden="true"></i><span>' . $whatsapp . '</div>'; } }
Thanks,
- February 28, 2020 at 7:45 pm #109216productsexportParticipant
Ok, I followed your instructions.
The WhatsApp number I entered for the vendor, is not appearing anywhere on the vendor store page or products.
- March 3, 2020 at 12:16 pm #109676Molay DasKeymaster
Hi,
Didn’t find whatsapp number field under “Profile” setting in edit vendor mode?
And under “Store Settings” below “Store Address” section didn’t you find the “Show / Hide Whatsapp Number” field?If you didn’t find these do’t worry just share us your website login details, we will check it.
Please send your website login details as private reply here.
Thanks,
- April 1, 2020 at 7:08 pm #114526productsexportParticipantThis reply has been marked as private.
- April 2, 2020 at 6:40 pm #114729Molay DasKeymaster
Hi,
Please share me your website login credentials as private reply here. I need to check it.
Thanks,
- April 4, 2020 at 6:08 am #115207hansa.tiendaParticipant
Hi ,
I followed the procedure in this post:
– Added a custom field “whatsapp number”
– Added the code snippet in child’s theme functions.php ( im using the child theme of course)
– Back in to the store settings there was a “Enable yes/no whatsapp number” below store address fields , and i choosed “Yes”
– None of the “hidding options” like “hide address or hide number” or anything are checked.But, the whatsapp number doesnt appear nowhere in the front store page of the vendor.
(Im using WPML by the way with two languages)
– There was no fatal errors or any other related errors on woocommerce > status > logs.Thanks,
- April 7, 2020 at 12:06 am #116064Molay DasKeymaster
Hi,
I can see that you have followed the instructions as explained, a field with “Show / Hide Whatsapp Number” will appear and if you select “yes” it will be displayed in the “Store” tab in product details page.
Please see the attached screenshots.If it’s still didn’t work for you then please provide us your website login details.
Do send your website login credentials as private reply here.Thanks,
Attachments:
You must be logged in to view attached files.
- July 24, 2020 at 6:24 am #155134dpasadamParticipant
all these steps happened but we are not in the business whatsapp icon
- AuthorPosts
- You must be logged in to reply to this topic.