Home Forums WC Vendors Free Support Multiple User Roles

NOTICE: We've Moved to a Ticket System for Support

As of August 31, 2017 (12am EST) our support forums will be retired (read-only), and we will be moving to a support ticket system.Β  This will allow us to better organize and answer support requests, and provide a more personalized experience as we assist our customers.

For the time being, we will leave our forums open for reading and learning while we work on creating a more robust Knowledge Base for everyone to use.

If you are a WC Vendors Pro customer please open a support ticket here. 

If you are a WC Vendors user please open a support ticket on the Wordpress.org forums.

The information on this forum is outdated and in most instances no longer relevant. Please be sure to check our documentation for the most up to date information.

https://docs.wcvendors.com/

Thank you to all of our customers!

 

Viewing 23 posts - 1 through 23 (of 23 total)
  • Author
    Posts
  • #2975
    jsabellico
    Participant

    Hello, first off love your plugin, thanks so much!

    The issue i’m having is as follows…

    I am using this on a member site and there are different levels of membership, currently handled by WordPress Roles. There are two roles in particular which need to post to the store, the difference is one of the roles can also post to blogs and do other items on the site.

    I have tried copying over the settings from the Vendor role to our custom role using the User Role plugin however the custom role we made sees the ‘Your account is not setup as a vendor yet’ message.

    How can we allow multiple user roles access to have their own store? Is there a file in the store which checks for the ‘vendor’ role that we can add in our custom role as well? As stated we’ve tried duplicated capabilities as far as wordpress role go but the custom role is still blocked from posting in the store.

    Thanks in advance!

    #2981
    WC Vendors Support
    Participant

    The role “Vendor” is hard coded into the plugin. If the user does not have the Vendor role, they will not be able to access the pages. There arent special capabilities, just the actual role “Vendor”.

    To hard code other roles as being Vendors, you’d have to modify the plugins core to do this.

    You could:

    1.) Edit user, assign them “Vendor” role.
    2.) Use User Role Editor to assign specific users the additional role with the additional permissions

    That’d probably be the easiest way to do it, just a bit of manual clicking for each vendor with additional permissions you need.

    #2985
    jsabellico
    Participant

    Thank you Ben.

    Unfortunately we can’t just assign them the vendor role because like I said, we have two different levels of user who would be selling – one as a regular vendor and one who is a vendor plus blog contributor so we would have to use two different roles here.

    I’ll have to poke around in your code then and see if we can add in the custom role name on the side of the ‘Vendor’ code so both roles will be recognized- I was just hoping you’d be able to point me to one line in particular or something that contained the restriction for the shop page.

    Thanks again

    #2986
    WC Vendors Support
    Participant

    With User Role Editor installed, when you edit a User (wp-admin->Users) you can assign your bloggers the Vendor role on a per-user basis. πŸ˜‰

    #2992
    jsabellico
    Participant

    Yes, in theory this would work but in practice it does not.

    Just gave this a test and it still does not work. The only way to do this would be to make everyone a vendor and then add on the other features as necessary, but this breaks the entire process flow of the membership.

    Ultimately I just need a way to tell the store page that my custom user role is allowed to post as well.

    #2993
    WC Vendors Support
    Participant

    I understand. Let me know if you come up with a good solution, if you can, I’ll make a KnowledgeBase article for it for future members to use, too.

    #3009
    jsabellico
    Participant

    Ok, I got it resolved.

    There are two lines which need to be modified in order to allow an additional user role the ability to post to the store.

    In the file: wc-vendors/WCVendors/classes/class-vendors.php lines 288 and 396 need to be changed to include the custom user role. Please see the two lines of code below and insert the name of your user role where it says customrole below. I added notation as well in case you need to add access to more than one additional role.

    LINE 288
    $is_vendor = $role == ‘vendor’ || $role == ‘customrole’; //to add other roles add: || $role==’otherrole’ before ‘;’

    LINE 396
    return ($role === ‘Vendor’ || $role === ‘customrole’) ? true : false; //to add other roles add || $role===’Otherrole’ before ‘)’

    #3023
    Jamie
    Keymaster

    Hello,

    Just to let you know that might allow them to post products but there are a lot more references in the code to the hard coded vendor role. There is 30 references in 12 files that actually needs to be changed.

    I’ll add an issue to our github to add an action to override the user role so that it can be defined however you want. I’m not sure when I’ll have time to add this functionality but it’s now on the list.

    https://github.com/wcvendors/wcvendors/issues/96

    cheers,

    Jamie.

    #3030
    jsabellico
    Participant

    Thank you Jamie!

    We understand this isn’t the perfect solution but it was a quick fix to a problem we had. I look forward to seeing it and I’d be happy to help share some of the load if you need additional developers.

    Best.

    #15916
    sanjay
    Participant

    Hi jamie is possible to you provide us that 12 files name so we can perfectly add multiple user roles.

    #16059
    vadmin
    Spectator

    just to add, we are using the pro version of user role editor, with pro version of wc vendors.

    any role can have the vendor role assigned as a 2nd capability.

    infact you can do many things with the pro version, like assign certain menus or content to any role you wish.

    hth

    #16305
    sanjay
    Participant

    you mean this is possible with wc vendor pro version ?????

    #31593
    Andy
    Participant

    Hi,
    I found 2 β€œVendor” roles on the User group, 1st Vendor have adding Product Function only, and the 2nd Vendor has add post function (but it can NOT add any Media/ images) only. Both use the same name, so it’s very confusing.
    1. So can I change the title for these Vendor, such as one is as Member and the other is Seller?
    2. Can I give both Post and Selling capability for one Vendor?
    3. Can change other Role title, such as change Subscriber to User or Member?
    4. Can I allow one vendor has multiple roles, such as Vendor and Shop Manager?

    Thanks a lot!

    #31594
    WC Vendors Support
    Participant

    1, 2, 3, and 4 — This is 100% unsupported, use at your own risk, and figuring it out (if it’s even possible) is up to you. You’re in dangerous waters here. πŸ™‚

    #47589
    jason
    Participant

    I have one doubt. how can we create 2 types of vendors. like 1. paid vendor. 2. Unpaid vendor.For Paid vendor, i want to assign some roles like add product, listing, etc… for unpaid vendor, only 2 roles. like posting images and contents.

    #47644
    Anna
    Member

    Jason,
    Whatever you do leave the VENDOR role alone.
    As for other roles and capabilities- you can use a role editor and create a new user role, give certain permissions to that role, then assign that role to your non-paid “vendors”. Just don’t mess with the actual vendor role.
    You’ll have to do some research on wordpress role capabilities and figure out what you would assign to the non-paid role in order to achieve the level/capabilities that you wish for that role to possess.

    #47700
    jason
    Participant

    ok i got ur point. that means, in wc vendors, only one functionality only. is that right?

    #47711
    Anna
    Member

    ok i got ur point. that means, in wc vendors, only one functionality only. is that right?

    Well– I am not sure what you mean, but in WC Vendors the capabilities of the vendor role are specific; as Jamie mentioned above in this forum topic:

    Just to let you know that might allow them to post products but there are a lot more references in the code to the hard coded vendor role. There is 30 references in 12 files that actually needs to be changed.

    So many of the functions for the vendors are built into the code of WC Vendors, and dependent upon the actual VENDOR role being assigned to the user.

    #48912
    Yuri
    Participant

    Hi Jason,

    I ran into the same situation of needing of multiple vendors of different user roles. Basically I run a vendor membership site where vendors have different levels – one being able to post 10 products, the other 50, and so on. Luckily I was able to find a solution which is a little tedious but it works.

    What I use is the most recent version of the User Role Editor Pro. Once you install the plugin, each user when edited has an “Additional Capability” feature where you can define additional user roles to one user. So if User A is a Contributor by default, you can set an additional capability of Vendor. There’s no limit to the amount of other roles you can define but of course it depends on your use. In theory, User A can be a vendor, shop manager and author all at once with the plugin.

    In my case, I created new user roles using the plugin based from the vendor user role. Since there can only be one vendor role, you can set additional user roles for each vendor. That’s the tedious part. I honestly don’t mind setting each one manually since it’s not advisable to play around with the vendor role.

    Not really sure if the free version of the plugin offers the same features. You can check for yourself if it does πŸ™‚

    Hope this is helpful!

    #49604
    Rick
    Participant

    Roles? Need some help understanding the differences between the roles.

    I have about 11 roles total that the users can default to but I’m not sure what they all do and don’t do. Can someone help me understand what these two roles are and how they are used?

    Shop Manager?
    Block Role?

    #49758
    Anna
    Member

    Hello,
    WC Vendors only has two roles: Pending Vendor and Vendor. Pending Vendor is given to a user who has applied to be a vendor- but you have your settings in wc vendors set to only allow them the vendor role if you have approved them.

    Shop Manager is a WooCommerce role- you can see their roles and capabilities here: https://docs.woocommerce.com/document/roles-capabilities/

    I’ve never seen the Block Role so that must be coming from another plugin.

    #52489
    beforeplastic
    Participant

    What about assigning privileges to vendors:

    vendor + blogger
    vendor standard settings

    How do I assign two roles to a vendor (vendor + blogger) or create a new role that combines both capabilities?

    Use-case: I have a vendor I want a enable to be a blogger and forum moderator on the site.

    How is this accomplished? I am seeing a lot of fragmented info, but no concrete how-to’s.

    #52510
    Anna
    Member

    Hello,
    Not all of this is WC Vendors related- but rather wordpress or bbpress related.
    Give them the forum role: moderator. This can be managed in the user admin area.
    For blogging, there are plugins that will give your site members blogging ability in their buddypress profile pages, such as Social Articles https://wordpress.org/plugins/social-articles/

Viewing 23 posts - 1 through 23 (of 23 total)
  • The forum ‘WC Vendors Free Support’ is closed to new topics and replies.