Inquiry deactivation on product 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 – Ultimate Inquiry deactivation on product page

Viewing 7 reply threads
  • Author
    Posts
    • #101018
      paattal
      Participant

      Hi,

      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

    • #101208

      Hi,

      Turn off the “Inquiry” module wcfm settings page.(PFA)

      Attachments:
      You must be logged in to view attached files.
    • #101220
      paattal
      Participant

      Hello,

      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

    • #101365

      Hello,

      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.

    • #101501
      paattal
      Participant

      Hello,

      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.
      • #101563

        Hello,

        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.
    • #101781
      paattal
      Participant

      Hello,

      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.

    • #102108

      Hello,

      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.

    • #102114
      paattal
      Participant

      Hello,

      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

Viewing 7 reply threads
  • You must be logged in to reply to this topic.