I did as you said. While the field now shows in the general emails (see screenshot below) it still returns a blank in the actual email template when sent.
Thank you so much. I wasn't able to add it as an affiliate template it does not give me that option. I like your second suggestion better anyways. Where do I add this code? to which .php?
I created a general email template to send to new affiliate clients. I want their unique affiliate link to display in the email template. I tried using {$affiliate_referral_url} and {$referrallink} merge fields but it always displays blank.
The client I am sending it to is activated as an affiliate. Even more puzzling the client gets the monthly referrals report and it has their link in it and in that email template it uses {$affiliate_referral_url} merge field.
I had the same error after upgrading to 8.71. I found the problem and fixed it.
For some reason in the email templates the email address was replaced by the admin username.
Go to System Settings > Email Templates > Click on the email title to edit and replace the second field with a valid email address. Then save. Try manually sending that email and it should work now.