if you have unencrypted file aff.php, i am fairly certain that you are, from what i recall but i will check and drop back in, this file is not as standard an unencrypted file. i may be wrong and il get back to you because my aff.php is the default file no mod used.
I stand corrected, oh and FYI you didnt need to overwrite that you could have expanded it like this.
PHP Code:
if ($pid) { header("Location: cart.php?a=add&pid=$pid"); exit;
}
elseif ($gid) {
header("Location: cart.php?gid=$gid"); exit;
}
also the a=add makes no sense to your scenario because you cant add a product group to the cart currently, i cant see a reason why you would want to though so i doubt there will be a place for it in the future.
your just directing to a product group, so all you need is the section i posted.
Further more, you can be really smart.. and make sure the links dont look like affiliate links at all... use mod rewrite, you will need to edit the code to dynamically find the affiliate id from some over area, but you could have a link like this.
http://example.com/whmcs/clientname/groupname
This would allow you to check the database, pull the client affid and group id for the assignment of affiliate and then direct to group id.
A more seo friendly url less likely to be seo penalised by the likes of google.