Can't Create Separate Categories for Different Groups and Memberships

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 – Groups & Staffs Can't Create Separate Categories for Different Groups and Memberships

Viewing 8 reply threads
  • Author
    Posts
    • #22280
      MomentumIsrael1
      Participant

      Hi Guys,
      After purchasing the WCFM – Groups & Staffs Add-On, I created 3 Groups for 3 different Vendor memerbships on my website i.e. http://www.israelvmart.com, I assigned these groups to their membership and add the capability as well. I want to assign selected categories to all the Group, I chose the categories on Capability settings page but when I go to Vendor dashboard of a Member, It shows all the categories to add the products, While it should be only selected category to that particualr Group/Membership.

      Please see the attached files and let me know if I am doing something wrong or Add-On has a Bug?

      Thanks

      Attachments:
      You must be logged in to view attached files.
    • #22285
      WCFM Forum
      Member

      Hi,

      Thanks for get in touch with us.

      We have just checked this and didn’t found any such issues there.

      Please be sure that vendor is not associated with two groups.

      You can check the groups associated vendors, be sure that vendor associated with that group.

      Thank you

    • #22291
      MomentumIsrael1
      Participant
      This reply has been marked as private.
    • #22294
      Bingal
      Member

      Hi,

      Which multi-vendor plugin you are using in?

      Did you checked, is other group specific capabilities are working for this vendor?

      Thank You

    • #22296
      Bingal
      Member

      Hi,

      Opps! I just noticed one thing. Possibly you don’t have WCfM Ultimate, right?

      Actually, this capabilities are working only with WCfM Ultimate. Do you have any plan of purchasing that in near future?

      If not, then know me. We will give you support of these separately.

      Thank You

    • #22299
      MomentumIsrael1
      Participant

      Hi Bingal,
      I am using WC Vendor plugin and Yes you’re right I don’t have WCFM Ultimate yet. How can we fix it without WCFM Ultimate?

      Thanks

    • #22302
      WCFM Forum
      Member

      Hi,

      You just have to add this code to your site for the purpose –

      function wcfmcap_allowed_taxonomies_custom( $allow, $taxonomy, $term_id ) {
      	$wcfm_capability_options = apply_filters( 'wcfm_capability_options_rules', get_option( 'wcfm_capability_options', array() ) );
      	if( $taxonomy == 'product_cat' ) $taxonomy = 'categories';
      	$allowed_taxonomies    = ( !empty( $wcfm_capability_options['allowed_' . $taxonomy] ) ) ? $wcfm_capability_options['allowed_' . $taxonomy] : array();
      	if( is_array( $allowed_taxonomies ) && !empty( $allowed_taxonomies ) ) {
      		if( !in_array( $term_id, $allowed_taxonomies ) ) {
      			$allow = false;
      		}
      	}
      	return $allow;
      }
      add_filter( 'wcfm_allowed_taxonomies', 'wcfmcap_allowed_taxonomies_custom', 450, 3 );

      Please know me is this resole the issue for your or not!

      Thank You

    • #22325
      MomentumIsrael1
      Participant

      Hi,
      I added the code to functions.php but unfortunately its not working. Let me add few more things that can help you to understand the flow:

      – I deleted all the vendors from the system so that I can add them again.
      – I created 3 membership tyep: Freelance, Pro and Advanced.
      – Then I created 3 Groups: Grp_freelance, Grp_Pro and Grp_Advanced
      – GRP_freelance can’t add any product so I have revoked all the capabilities for him.
      – GRP_Pro Vendors can add products only in 1 Category.
      – GRP_Advanced can add unlimited products to ANY product category.
      – Now I assigned the Groups to their respective memberships.

      – Now to test the functionalit, First I created a Freelance User, I checked his dashboard and He doesn’t have anything in that means that Group capability is working fine.
      – Next, I created another Vendor and Assigned Pro membership to it, Now when I access his account, He can add new products BUT here is the real problem: He can select any Category from the Category list, While They should have access to only 1 category that I choose during GRP_Pro group creation.

      I hope I’ve clear all the steps now and It will be easier for you guys to sort out the issue. If you need any access to the site, Just let me know.

      Note: I am using WC Vendors plugin for Vendors.

      Thanks

    • #22421
      WCFM Forum
      Member

      Hi,

      Thanks for the detailed explanation. I understand your membership setup.

      Only factor is category capability is not working, I know why this and already explained you.

      But why custom code is not working for you? Did you add this is main theme’s functions.php or in child theme’s ?

      Are you comfortable in TeamViewer season? We will check the things and make it working for you.

      Thank You

Viewing 8 reply threads
  • The topic ‘Can't Create Separate Categories for Different Groups and Memberships’ is closed to new replies.