farjad24 Posted November 28, 2014 Share Posted November 28, 2014 Hello This code {$referrallink} show full affiliate link like this : http://example.com/whmcs/*?aff=001 But i only need to show affiliate number : 001 How can i do this ? Thank you 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted November 28, 2014 Share Posted November 28, 2014 to get just the affiliate number, you use {$affiliateid} 0 Quote Link to comment Share on other sites More sharing options...
farjad24 Posted November 29, 2014 Author Share Posted November 29, 2014 tnx dude but this just work in affiliate.tpl and when i put it into another template file not worked 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted November 29, 2014 Share Posted November 29, 2014 the variable will only be available in the templates that whmcs defines to use it.. if you want to use it on another page where this variable doesn't automatically exist, then there are a couple of options... 1. if you have access to $referrallink on that page, you might be able to manipulate it using Smarty to just obtain the affiliate number... add {debug} to the end of the code in the template you want to use the variable in - it should create a popup window with a list of variables and arrays available to you... hopefully one of them will contain the affiliate ID. 2. alternatively, you may need to query the database to get the value - the link below shows how to do it in php on an external page... http://forum.whmcs.com/showthread.php?84507-variable-for-Affiliate-ID-not-full-link&p=358698#post358698 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.