Skip Navigation

[Resolved] i want to restrict access to certain user groups to certain product categories

This support ticket is created 6 years, 2 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 5 replies, has 2 voices.

Last updated by Luo Yang 6 years, 2 months ago.

Assisted by: Luo Yang.

Author
Posts
#1167665

Tell us what you are trying to do? I want certain users not to see products from some product categories

Is there any documentation that you are following? https://toolset.com/documentation/user-guides/limiting-read-access-specific-content/

Is there a similar example that we can see? no

What is the link to your site? hidden link

#1167670

The site is in development mode i use a plugin to hide price and add to cart to non registered users.

As a registered user to view prices You can login at the top right with user giannoulis and pass 123@@@

I want to be able to create customer groups ( i did that with the access plugin and I created the customer group NO falken sumitomo ) that will not see products from some categories.

For example the customers belonging to the group NO falken sumitomo must not see products from the categories falken and sumitomo when the log in.

I think i found how to do that per product, but i want to be able to do that per product category or by product tag

You can login as admin at

hidden link

user tool pass IgGCFtW9WHmLIyWM&Llv#$6@

thank you

#1167988

its been 8 hours! is there no simple solution for this?

thank you

#1168385

Hello,

I just got this ticket.

You are right, there isn't any simple solution for this.

The Access post group feature works for only each post, there isn't such a built-in feature to do that per product category or by product tag.

See the document you mentioned above:
https://toolset.com/documentation/user-guides/limiting-read-access-specific-content/

I suggest you submit a feature request for it:
https://toolset.com/forums/forum/professional-support/#feature-request

Our developers will evaluate it and apply it to the future version of Toolset plugins. Thanks

#1168467

ok i will submit a feature request but until then must i select one by one the products in the post group? is there no bulk select option?

I mean im trying to deliver a project to a client and telling the client he will have to select dozens of hundred products one by one each time, will be a failure.

thank you

#1168474
post-group-id.JPG

I don't think there is an easy bulk select option for it.

It needs custom codes, the "Post Group" setting for each post is stored in a hidden custom field "_wpcf_access_group", value is the "Post Group" ID, some string like this: wpcf-custom-group-098f6bcd4621d373cade4e832627b4f6.

You can get the "post group" ID by this:
Dashboard-> Toolset-> Access Control-> Posts Groups
find the specific "Post Group", inspect HTML codes of "Modify group" button
See screenshot post-group-id.JPG

Then setup custom codes, get query those posts with specific terms
https://codex.wordpress.org/Class_Reference/WP_Query#Taxonomy_Parameters

run a loop, update each posts custom field "_wpcf_access_group" value as the "Post Group" ID
https://codex.wordpress.org/Function_Reference/update_post_meta

For your reference.