- Posts: 135
- Thank you received: 2
User Access / Display of control panel
11 years 8 months ago - 11 years 8 months ago #185588
by earmaster
User Access / Display of control panel was created by earmaster
-- HikaShop version -- : 2.3.5
-- Joomla version -- : 3.3.6
-- PHP version -- : 5.3.10
Hi!
I have two groups of users, resellers and affiliates, each have their own Joomla group, my issue is that I don't want resellers to be able to "activate" the affiliate program, i.e I want to disable the "Affiliate Program" view in the User control panel for any user logged in as a "Reseller"
I have tried to disable access through HikaShop configuration -> Access Level. but this doesn't seem to do anything.
This is purely front-end where I don't want users/customers from the Reseller group to see the Affiliate Program
-- Joomla version -- : 3.3.6
-- PHP version -- : 5.3.10
Hi!
I have two groups of users, resellers and affiliates, each have their own Joomla group, my issue is that I don't want resellers to be able to "activate" the affiliate program, i.e I want to disable the "Affiliate Program" view in the User control panel for any user logged in as a "Reseller"
I have tried to disable access through HikaShop configuration -> Access Level. but this doesn't seem to do anything.
This is purely front-end where I don't want users/customers from the Reseller group to see the Affiliate Program
Last edit: 11 years 8 months ago by earmaster. Reason: Updated subject
Please Log in or Create an account to join the conversation.
11 years 8 months ago #185591
by Xavier
Replied by Xavier on topic User Access / Display of control panel
Hi,
You can potentially manage the Affiliate access on frontend by editing the settings of the plugin "HikaShop Affiliate".
Select a specific group.
You can potentially manage the Affiliate access on frontend by editing the settings of the plugin "HikaShop Affiliate".
Select a specific group.
Please Log in or Create an account to join the conversation.
11 years 8 months ago - 11 years 8 months ago #185685
by earmaster
Replied by earmaster on topic User Access / Display of control panel
But would that not affect the affiliate system regarding the customers buying with a affiliate cookie?
I have properly not explained myself well enough, what I mean is that we have 2 user groups (Affiliate and Reseller) and then we have the REGULAR (non-registered) customers, what we want is to disable the access to the affiliate program for the user group resellers and still allow normal function / use of the Affiliate program for our regular customers and the Affiliate group
Update:
Would it be possible to load user details into the cpanel view?
I have properly not explained myself well enough, what I mean is that we have 2 user groups (Affiliate and Reseller) and then we have the REGULAR (non-registered) customers, what we want is to disable the access to the affiliate program for the user group resellers and still allow normal function / use of the Affiliate program for our regular customers and the Affiliate group
Update:
Would it be possible to load user details into the cpanel view?
Last edit: 11 years 8 months ago by earmaster. Reason: Clarification and secondary question
Please Log in or Create an account to join the conversation.
11 years 8 months ago #185717
by Xavier
Replied by Xavier on topic User Access / Display of control panel
Hi,
Indeed changing the group in the plugin settings, is not a good solution.
The easiest way to restrict this feature will be to edit the view "affiliate / show" and add a PHP condition on the user group.
Something like:
Indeed changing the group in the plugin settings, is not a good solution.
The easiest way to restrict this feature will be to edit the view "affiliate / show" and add a PHP condition on the user group.
Something like:
Code:
$user = JFactory::getUser();
if(in_array('2',$user->groups)){ // replace '2' by the id of the reseller group.
echo "Not allowed to reach this part </div>";
return;
}
The following user(s) said Thank You: earmaster
Please Log in or Create an account to join the conversation.
11 years 8 months ago #185822
by earmaster
This was also what I had in mind, of course I didn't realise I could've just load Joomla to load these instead of trying to find a Hikashop class to do this
Thanks for your help
Replied by earmaster on topic User Access / Display of control panel
Xavier wrote: Hi,
The easiest way to restrict this feature will be to edit the view "affiliate / show" and add a PHP condition on the user group.
Something like:Code:$user = JFactory::getUser(); if(in_array('2',$user->groups)){ // replace '2' by the id of the reseller group. echo "Not allowed to reach this part </div>"; return; }
This was also what I had in mind, of course I didn't realise I could've just load Joomla to load these instead of trying to find a Hikashop class to do this
Thanks for your help
Please Log in or Create an account to join the conversation.
11 years 5 months ago #199839
by CarlosC
Replied by CarlosC on topic User Access / Display of control panel
Hallo
I have a similar problem. I don´t want that a regular customer is able to see the affiliate button in the cpanel. I thought it would be done by activating "no selfafiliation" in the administration. But this does not work.
For this I have comment out the function "onUserAccountDisplay(&$buttons)" in the hikashopaffiliate.php.
But this is not the best way to do this.
Could you help me please.
Best regards Carlos
I have a similar problem. I don´t want that a regular customer is able to see the affiliate button in the cpanel. I thought it would be done by activating "no selfafiliation" in the administration. But this does not work.
For this I have comment out the function "onUserAccountDisplay(&$buttons)" in the hikashopaffiliate.php.
But this is not the best way to do this.
Could you help me please.
Best regards Carlos
Please Log in or Create an account to join the conversation.
11 years 5 months ago #199854
by nicolas
Replied by nicolas on topic User Access / Display of control panel
Hi,
You could add the line:
after the line:
in the file "cpanel" of the view "user" via the menu Display>Views.
You could add the line:
Code:
if($oneButton['image']=="affiliate") continue;
Code:
foreach($this->buttons as $oneButton){
Please Log in or Create an account to join the conversation.
11 years 4 months ago #201838
by CarlosC
Replied by CarlosC on topic User Access / Display of control panel
Thanks,
works perfect.
Best regards Carlos
works perfect.
Best regards Carlos
Please Log in or Create an account to join the conversation.
Time to create page: 0.254 seconds