sadi Posted September 30, 2019 Share Posted September 30, 2019 hi! is this possible that clients in a group can only access a certain group of pruduct? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted October 1, 2019 Share Posted October 1, 2019 On 30/09/2019 at 11:50, sadi said: is this possible that clients in a group can only access a certain group of product? not from the configuration settings - there used to be a couple of addons that could do things with client groups & products... by default, everyone sees all non-hidden product & product groups. ServerPing had a "Show Hidden Product Groups based on Client Group" module, but I don't know if it still works with the latest WHMCS release. ultimately, if there isn't a commercial solution available, what you want can be done via hooks. 0 Quote Link to comment Share on other sites More sharing options...
sadi Posted October 2, 2019 Author Share Posted October 2, 2019 Thanks Brian in fact, I wasn't looking for a commercial solution but I didn't find the hooks to solve the problem In this link : https://whmcs.community/topic/292651-whmcs-hide-certain-product-from-public-visitor/ you wrote a hook that hide some products for clients who are not logged in I want to change this hook so that the client group id is checked and if it was in a certain group ,hide certain product for it.but i dont know how to do it is that a right or best solution? can you help me? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted October 4, 2019 Share Posted October 4, 2019 On 02/10/2019 at 10:42, sadi said: In this link : https://whmcs.community/topic/292651-whmcs-hide-certain-product-from-public-visitor/ you wrote a hook that hide some products for clients who are not logged in i'd forgotten about that... On 02/10/2019 at 10:42, sadi said: I want to change this hook so that the client group id is checked and if it was in a certain group ,hide certain product for it.but i dont know how to do it then... if (!$client) { becomes... if (!$client && !$client->groupid == '1') { where 1 is the group ID value of your client group... you can get the client group ID value from the URL in the browser when you edit a client group in the admin area... this change will make products specified in the removed array invisible to everyone, unless they are a logged in client assigned to the client group id=1 On 02/10/2019 at 10:42, sadi said: is that a right or best solution? can you help me? if all the products you only wanted client group x to see where in the same product group, then I suppose you could use a sidebar hook to hide that group from the sidebar... but whether that's any better than the above hook, I don't know. 0 Quote Link to comment Share on other sites More sharing options...
sadi Posted October 5, 2019 Author Share Posted October 5, 2019 Thank you very much brian :) I added this "if" to my hook and fix the problem. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.