Need to show a link to Affiliates only

  • Posts: 80
  • Thank you received: 1
12 years 10 months ago #40770

Hello,

As the header says I need to show a link to the Affiliates only at the front end User Panel.

<?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?
if($affiliate == 'checked'){

Last edit: 12 years 10 months ago by seoweb.

Please Log in or Create an account to join the conversation.

  • Posts: 83103
  • Thank you received: 13416
  • MODERATOR
12 years 10 months ago #40983

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.

Please Log in or Create an account to join the conversation.

  • Posts: 80
  • Thank you received: 1
12 years 10 months ago #41004

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: 12 years 10 months ago by seoweb.

Please Log in or Create an account to join the conversation.

  • Posts: 83103
  • Thank you received: 13416
  • MODERATOR
12 years 10 months ago #41006

Now I got it. It's that code that you want:

		$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.

  • Posts: 80
  • Thank you received: 1
12 years 10 months ago #41022

As usual, just brilliant!

Please Log in or Create an account to join the conversation.

Time to create page: 0.061 seconds
Powered by Kunena Forum