Can I pass affiliate codes to iPanel and have it record them?

Question:

Q: Can I pass affiliate codes to iPanel and have it record them?

Answer:

Yes, this is possible as of iPanel v3.6.15. You can pass an affiliate code to iPanel in the "affid" query variable, such as:

http://www.example.com/order/?affid=AFFILIATE_CODE_HERE

Or you can pass an affiliate code to iPanel in a cookie named "affid".

When iPanel creates an account and an affiliate code has been set, it will store the code in the "affid" column of the "accounts" database table. When it creates an account_package, it will store the code in the "affid" column of the "accounts_packages" table.

Note that iPanel will not actually do anything with the affiliate code other than store it; this feature exists simply to allow third-party developers to write custom scripts which correlate affiliate codes to actual orders.

Q: Can I change the name of the cookie or request variable used for the affiliate code?

A: Yes. Edit conf/conf.inc.php and add a line as follows:

define('AFFILIATE_KEY','affid');

Replace affid with the name of the cookie or request variable you'd like iPanel to store.