Affiliate system not working as expected
Posted: Thu Jul 02, 2015 9:42 am
There are several issues I've found with the Affiliate system. First of all, it is not enabled out of the box and there is nothing to indicate that it needs to be turned on or how to do so. It seems it is simply a matter of accessing ~/Marketing/Affiliates/Default.aspx and saving the settings once to populate the default settings in the database. There are several settings that are available for the affiliate system, but the only one that is actually listed in the UI is the Parameter Name (afid by default). All of the other settings are hidden by default, and the ReferralRule is not included at all. It is automatically set to NewSignupsOnly in the code behind when the settings are saved.
Now, if I set the ReferralRule to NewSignupsOrExistingUsersOverrideAffiliate, then if a user comes to the site via an affiliate link and then logs in to an existing account it should set the affiliate for their account to the one that was associated with the link. This does not happen. In reviewing the code for the CommerceBuilder.Users.User.Migrate method, it should work and indeed if I duplicate this code before the migrate method is called it does in fact work this way, but when calling the current version of the library it does not. This leads me to believe that the recent security patch changed this method in a way that stopped it from working as expected.
Some insight into why the affiliate system seems so...well, broken...would be much appreciated. I suppose I can work around all these issues, but before I do I would like to know if there are any other 'gotchas' with it that I should be aware of and if there are any plans to make future changes or improvements to this system.
Now, if I set the ReferralRule to NewSignupsOrExistingUsersOverrideAffiliate, then if a user comes to the site via an affiliate link and then logs in to an existing account it should set the affiliate for their account to the one that was associated with the link. This does not happen. In reviewing the code for the CommerceBuilder.Users.User.Migrate method, it should work and indeed if I duplicate this code before the migrate method is called it does in fact work this way, but when calling the current version of the library it does not. This leads me to believe that the recent security patch changed this method in a way that stopped it from working as expected.
Some insight into why the affiliate system seems so...well, broken...would be much appreciated. I suppose I can work around all these issues, but before I do I would like to know if there are any other 'gotchas' with it that I should be aware of and if there are any plans to make future changes or improvements to this system.