- Posts: 80
- Thank you received: 1
Need to show a link to Affiliates only
14 years 7 months ago - 14 years 7 months ago #40770
by seoweb
Need to show a link to Affiliates only was created by seoweb
Hello,
As the header says I need to show a link to the Affiliates only at the front end User Panel.
The question is what I should change the line mentioned below to?
As the header says I need to show a link to the Affiliates only at the front end User Panel.
Code:
<?php
foreach($this->buttons as $oneButton){
echo $oneButton;
}
if($affiliate == 'checked'){
echo 'Something here...';
}
?>
The question is what I should change the line mentioned below to?
Code:
if($affiliate == 'checked'){
Last edit: 14 years 7 months ago by seoweb.
Please Log in or Create an account to join the conversation.
14 years 7 months ago #40983
by nicolas
Replied by nicolas on topic Re: Need to show a link to Affiliates only
I'm not following you. You want to add some text in the affiliate button of the control panel ?
In that case, you should rather override the translations corresponding to the affiliate button instea dof modifying the code of that cpanel view file.
In that case, you should rather override the translations corresponding to the affiliate button instea dof modifying the code of that cpanel view file.
Please Log in or Create an account to join the conversation.
14 years 7 months ago - 14 years 7 months ago #41004
by seoweb
Replied by seoweb on topic Re: Need to show a link to Affiliates only
I want to show another element, say custom code, together with default buttons, but I want to show it to people who are the Affiliates and not to everyone. I think _hika_user table has got a value of '1' responsible for this. I thought there might be a nice way to check the value (using Hikashop's functions), instead of writing a direct query to the DB and then checking is the value of the parameter.
Last edit: 14 years 7 months ago by seoweb.
Please Log in or Create an account to join the conversation.
14 years 7 months ago #41006
by nicolas
Replied by nicolas on topic Re: Need to show a link to Affiliates only
Now I got it. It's that code that you want:
Code:
$user = hikashop_loadUser(true);
if(!empty($user->user_partner_activated)){
echo 'Something here...';
}
The following user(s) said Thank You: seoweb
Please Log in or Create an account to join the conversation.
14 years 7 months ago #41022
by seoweb
Replied by seoweb on topic Re: Need to show a link to Affiliates only
As usual, just brilliant!
Please Log in or Create an account to join the conversation.
Time to create page: 0.174 seconds