In the user management section for an affiliate user, on the Edit page, at the bottom, there is the "Affiliate Commissions Settings" field. The help text for the field instructs the developer to "Leave blank to use either product or global commissions."

However, once a value has been entered and saved, the field can no longer be set to blank, because trying to do so always results in an SQL error:

PDOException: SQLSTATE[HY000]: General error: 1366 Incorrect integer value: '' for column 'commission' at row 1: UPDATE {uc_affiliate2_user_commission} SET commission=:db_update_placeholder_0 WHERE (uid = :db_condition_placeholder_0) ; Array ( [:db_update_placeholder_0] => [:db_condition_placeholder_0] => 15 ) in uc_affiliate2_commission_submit() (line 424 of ...\sites\all\modules\uc_affiliate2\uc_affiliate2.module).

Comments

trevorleenc’s picture

Issue summary: View changes

I have just found this issue myself, and it's a problem, especially being that the number entered into this field on the user's edit page is not being properly applied to the affiliate commission.

please help.

haysuess’s picture

I have this problem too and need a fix ASAP. I'm willing to pay for it.

On top of not being able to edit the value per user, in the D6 version you could specify a fixed amount or a percentage. In the D7 version it's only fixed amount.

I had put 50 in that spot to give a certain affiliate 50% commission on $99 products and they are now getting $0.50 commissions.

How can we get it functioning like the D6 version?