Affiliate system not working as expected

For general questions and discussions specific to the AbleCommerce GOLD ASP.Net shopping cart software.
Post Reply
nethrelm
Lieutenant (LT)
Lieutenant (LT)
Posts: 61
Joined: Thu May 09, 2013 4:47 pm

Affiliate system not working as expected

Post by nethrelm » 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.

nadeem
Captain (CAPT)
Captain (CAPT)
Posts: 258
Joined: Tue Jul 31, 2012 7:23 pm

Re: Affiliate system not working as expected

Post by nadeem » Tue Jul 07, 2015 2:09 am

You are right about affiliate system hidden settings. I am going to log this issue to investigate further and fix any bugs. Thanks for reporting.

nadeem
Captain (CAPT)
Captain (CAPT)
Posts: 258
Joined: Tue Jul 31, 2012 7:23 pm

Re: Affiliate system not working as expected

Post by nadeem » Thu Jul 09, 2015 11:10 pm

We investigated the affiliate system and here are our findings:

This feature is intentionally kept the way it is working now. These hidden settings are saved in the ac_StoreSettings. Only Parameter Name and Referral Rule are the ones actually used. Other settings aren't required, also there is a affiliate's own table ac_Affiliates where the affiliate record can be updated from Administration > People > Affiliates > Edit Affiliate.

Parameter Name can be edited from merchant administration but if you want to change Referral Rule, you have to make this change in code and it should work as expected. Following line of code need to be updated from /Marketing/Affiliates/Default.aspx.cs inside save button click event:

Locate

Code: Select all

settings.AffiliateReferralRule = ReferralRule.NewSignupsOnly;
Update to

Code: Select all

settings.AffiliateReferralRule = ReferralRule.NewSignupsOrExistingUsersNoOverride;

OR

settings.AffiliateReferralRule = ReferralRule.NewSignupsOrExistingUsersOverrideAffiliate;
Self-signup feature is undocumented and unsupported at this time. If you want this feature, you can submit a feature request through user voice http://ablecommerce.uservoice.com/.

Alternatively, you can use AffiliateWiz tracking system which is integrated within ablecommerce. All you need to do is to simply enter the necessary Tracking URL into the field provided. This immediately activates the AffilliateWiz integration, so long as your account with them is active.

Post Reply