Bug fixes, improvements, and new commission by product feature

davegan@drupal.org's picture
Offline
Joined: 07/21/2008
Juice: 26
Bug fixes, improvements, and new commission by product feature

I've attached some work I've done on the module this afternoon.

There was a bug that allowed users to adjust their own commission percentages (yikes!). I've added a new permission 'adjust user commissions' to disallow that.

I cleaned up some misspellings and text. If affiliate depth is set to 1, now affiliates do not see "downline" and "upline" in their affiliate center.

In addition I've added a feature that allows you to set commission for each product. If it's set, it'll override the store wide commissions for that product. It can be set under a local tab on the product edit page. I've added a table to my database to hold this data, but I didn't have time to muck about with the module's install file, so you'll have to execute this yourself on your test DB:

CREATE TABLE IF NOT EXISTS `uc_affiliate_product_commission` (
  `nid` mediumint(9) NOT NULL,
  `commission_structure` longtext NOT NULL,
  PRIMARY KEY  (`nid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

Hope some people can test these changes and let me know if there are any problems. I tested it in my use case (1 level of depth), but haven't tested every possible configuration.

AttachmentSize
uc_affiliate_02.zip 37.38 KB
Affiliate v2 By: mimetic2 (29 replies) Mon, 09/01/2008 - 17:14