Best Multi Vendor Marketplace Plugin for WordPress › Forums › WCFM – Ultimate › Inquiry deactivation on product page
- This topic has 9 replies, 2 voices, and was last updated 5 years, 4 months ago by
Sarmistha Chakraborty.
- AuthorPosts
- January 5, 2020 at 11:44 pm #101018
paattal
ParticipantHi,
I set inquiry off and the button disappears well on the vendor’s page but not on product page. Is it the same setting on both page ?
If not, How can I do to deactivate inquiry on product page ?
Thanks
- January 7, 2020 at 12:55 pm #101208
Sarmistha Chakraborty
MemberHi,
Turn off the “Inquiry” module wcfm settings page.(PFA)
Attachments:
You must be logged in to view attached files. - January 7, 2020 at 2:42 pm #101220
paattal
ParticipantHello,
Of course it works but the solution is radical and I need to have this functionality for some users. Can we have the same display verification on product page depending on the activation of the inquiry capapilities as on the vendor page?
Thanks
- January 8, 2020 at 5:34 pm #101365
Sarmistha Chakraborty
MemberHello,
Add this code to your child theme’s functions.php
In case you do not have child theme then add code using this plugin – https://wordpress.org/plugins/code-snippets/
add_filter( 'woocommerce_product_tabs', 'check_vendor_have_wcfm_enquiry_product_tab', 999 ); function check_vendor_have_wcfm_enquiry_product_tab($tabs) { global $product,$WCFM; $vendor_id = $WCFM->wcfm_vendor_support->wcfm_get_vendor_id_from_product( $product->get_id() ); $vendor_cap = get_user_meta($vendor_id,'_wcfm_user_capability_options',true); if(!empty($vendor_cap) && $vendor_cap['enquiry']=='yes') { unset($tabs['wcfm_enquiry_tab']); } return $tabs; } add_filter('wcfm_is_allow_product_enquiry_bubtton','check_vendor_have_wcfm_is_allow_product_enquiry'); function check_vendor_have_wcfm_is_allow_product_enquiry() { global $product,$WCFM; if(is_product()) { $vendor_id = $WCFM->wcfm_vendor_support->wcfm_get_vendor_id_from_product( $product->get_id() ); $vendor_cap = get_user_meta($vendor_id,'_wcfm_user_capability_options',true); if(!empty($vendor_cap) && $vendor_cap['enquiry']=='yes') { return false; } else { return true; } } else { return true; } }
Note: Admiin have to set capability vendor wise.
Thanks.
- January 9, 2020 at 10:22 pm #101501
paattal
ParticipantHello,
Thanks for your reply.
As you can see on screenshot, after inserted the code in functions.php file and inquiries capability off (globale vendor capabilities settings) unfortunately no change, any users can still ask questions. 🙁
Attachments:
You must be logged in to view attached files.- January 10, 2020 at 12:24 pm #101563
Sarmistha Chakraborty
MemberHello,
Just to confirm that you had turn off “Enquiry” for required vendor.
<your site url>/store-manager/vendors/ -> select vendor -> turn off the "Enquiry" in custom capability.
If it’s still not working, please share us the site details then we can check in your site.
Thanks.
Attachments:
You must be logged in to view attached files.
- January 12, 2020 at 9:56 pm #101781
paattal
ParticipantHello,
OK it works well.
1. On the other hand, the settings of Inquiry being off for a defined group of vendors (I have created a group capacities), is it possible to have in the hook the verification rather on the capacities of the group to which the vendor belongs and not on the personalized capacities of each vendor? Otherwise, this requires customizing the capacities of each vendor and if I am not mistaken, these capacities will no longer be synchronized with those defined for the group of vendors.
2. I find it strange to be able to select the same vendor in several groups capacities? Do the capacities defined in each group not conflict for this vendor? It seems to me that once a vendor is inside a capacities group, it should disappear from the list of available vendors, right?
Thanks again.
- January 15, 2020 at 1:22 pm #102108
Sarmistha Chakraborty
MemberHello,
1. I reckon that you are requiring the capabilities included by us to be reflected globally by for a group rather than being set only for a particular vendor. Let me know if I am correct in understanding you here.
2. Yeah we have the feature where a vendor can be assigned to multiple groups. This is specifically done so that the vendor can enjoy the privileges of the better group. Additionally, please note that if any particular capability is turned as OFF then it will be set as OFF once the group is merged
Thanks.
- January 15, 2020 at 2:10 pm #102114
paattal
ParticipantHello,
1. Yes, that’s how I understood how it works:
customized capacities (vendor settings) -> priority 1
group capacities (group settings)-> priority 2 (with fusion of capacities according to your return)
global capacities (marketplace settings) -> priority 3
So, I would like to define a vendor profile with capacities defined by the groups. And in a particular case, have recourse only to customized capacities.2. OK it’s a good logic but I just did the test and I note that only one “Sold by label” is displayed (that of the first group created). In this case I think that the 2 labels should be displayed for this to be consistent.
You say “if any particular capability is turned as OFF then it will be set as OFF once the group is merged” but it’s not case with inquiry set to off in group. I did the test with a vendor included in only one group and I have to do it in customised settings vendor to make it work on product page (works on store page).Thanks
- January 15, 2020 at 6:08 pm #102138
Sarmistha Chakraborty
MemberHello,
1. Ok. This is not a small tweak. It requires some custom script. Please contact us here for the purpose – https://wclovers.com/woocommerce-multivendor-customization/ with this topic link.
2. Sorry, cann’t get you. can you please elaborate your requirement.
Thanks.
- AuthorPosts
- You must be logged in to reply to this topic.