0
I would like to use {affiliate_link} anywhere in my site so people can post on social media with their affiliate link from the page they are on. It only works if you use it in the marketing area. How do I get the plugin to work anywhere on my site?
Thanks
Thanks
Responses (5)
-
Accepted Answer
-
Accepted Answer
0This is the code in the helper.php that pulls in the affiliate link. Can I use nonumbers rereplacer to replace {affiliate_link_anywhere} with some modified version of this code?
static function get_account_link($account_id = null, $ref_word = null){
$uri = JFactory::getURI();
$app = JFactory::getApplication();
if (empty($account_id)) $account_id = self::getCurrentUserAtid();
if (empty($ref_word)) $ref_word = self::getRefWordFromAtid($account_id);
if(!empty($ref_word)) {
$return = $uri->base() . $ref_word ;
} else {
$return = $uri->base() . "?atid=". $account_id ;
}
if(!$app->isSite()){
$return = str_replace("/administrator", "", $return);
}
return $return;
} -
Accepted Answer
-
Accepted Answer
-
Accepted Answer
Your Reply
Please login to post a reply
You will need to be logged in to be able to post a reply. Login using the form on the right or register an account if you are new here.
Register Here »