Detect Affiliate

  • Posts: 44
  • Thank you received: 0
13 years 4 months ago #44558

I was wondering if there was a way to detect if the user has came in through an affiliate or not? In the code I mean.

Last edit: 13 years 4 months ago by mohamed.

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

  • Posts: 84142
  • Thank you received: 13647
  • MODERATOR
13 years 4 months ago #44731

Yes, if you load the current user information like that:
$user = hikashop_loadUser(true);

Then, you can know that like that:
if($user->user_partner_id){
//actions on your current page for users coming from partners
}

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

Time to create page: 0.051 seconds
Powered by Kunena Forum