I've described what I'm looking in the uc_discount_framework issue queue (http://drupal.org/node/924362) but that module is so buggy I've decided not to try getting it to do what I want.
Functionality:
Basically we need a discount to be applied at order level (as a line item) when the user checking out has the "Member" role. The single line item should be called "Member discount", and should be the sum of 10% of each product in the shopping cart EXCEPT those products that are in a few excluded product classes (Vouchers, Membership & Donations). Note that the product prices in the order should NOT be changed, we want the full product prices to appear for each product. The order total should of course reflect the 10% discount, and the discounted total needs to be used with Paypal and Realex payments, system reports, and of course if anyone views the order after it has been completed, they should still see the same discount and total etc. If there is no discount (ie the person isn't a member or he is only buying excluded products) then no line item should appear at all.
Nice to have, but not strictly necessary, would be an order comment added when the discount is applied, that just says something simple like "Members 10% of €123.45 applied.
Note:
The discount line item and order total will have to be recomputed if the user starts checking out but doesn't complete the chcekout process and then goes back to check out later. This is because they might have modified the order (added/removed products, quantities) or their membership status might have changed etc. However, when viewing an order that has already been checkd out, it would be a mistake to recompute the discount, since at that stage the order can't be modified.
Code requirements:
The code for this should be in a custom module, and it can be hard coded (if it ever changes I'll just change the code myself). So no configuration, parameters, or UI needed, just quick & dirty code.
Documentation: The only thing I ask is that you put some useful comments in the code so I can understand what you're doing. I'm a programmer so you can assume I understand PHP, but a few explanations about the hooks, API calls etc that you use will be appreciated.
The role name, the line item text, the percentage discount and the excluded classes can all be hard coded. I know it's ugly but it will be be so much easier than wading through the discount framework code!
I'll pay USD$50 via Paypal for this. It's needed asap.
