0 Members and 1 Guest are viewing this topic.

*

alexchiu

  • *
  • 43
  • Sup nigga
  • osDate Version: osDate Evo v1.2
Want to know how to make affiliates name show up on pages.  For example 'You have been referred by some dude.'

*

Pharg

  • *****
  • 2,886
    • OsDateFourm
  • osDate Version: osDateEvo v1.2
Re: Want to know how to make affiliates name show up on pages.
« Reply #1 on: May 15, 2017, 12:32:57 AM »
Hi alexchiu,

Sorry but don't know, you will have to hire a coder for that, as it's custom work.
Regards,
Pharg ( Phill )

REMEMBER: ALWAYS BACKUP BEFORE YOU MAKE ANY CHANGES!!

osDateEvo v1.2 | PHP: 5.3.42 & PHP: 5.6.18 | MySQL: 5.5.35

*

KHDev

  • *****
  • 89
  • Releasing stuff and learning on the way!
    • KH Web Development
  • osDate Version: osDateEvo v1.2
Re: Want to know how to make affiliates name show up on pages.
« Reply #2 on: May 15, 2017, 05:21:57 PM »
You could probably do something like:

Add something like this to init.php somewhere near the bottom of the file

Code: [Select]
if(isset($_SESSION['ReferalId'])){

$affid2=intval($_SESSION['ReferalId']);
$affName = $osDB->getOne('SELECT name FROM ! WHERE id = ?', array(AFFILIATE_TABLE, $affid2));

if(!empty($affName)){
$t->assign ('affName', $affName);
}

}else{
$t->assign ('affName', '');
}

Then in your template file/s where you want to display it, you could use something like:

Code: [Select]
{if $affName != ''}
<div>
You have been referred by: <b>{$affName}</b>
</div>
{/if}

Just basic, but should point you in the right direction.

:)