We are setting up a referral program for our site. The person who is doing the referring (the referrer) fills out a form, a coupon code is generated via the API, and the code is sent as an email to the referral. If the referral code is redeemed, the referrer gets a coupon code as well. Both coupons are "buy $x or more, get $y off" discounts. The referral codes are not stackable, but my boss wants the referrer to be able to use as many codes as they wish. Even if the referrer walks away with free stuff, we will have made more than enough off the referrals.
I come across two issues that make the unlimited coupon code use for referrers a bit weird, though:
1. Once they have surpassed the $x minimum (and assuming they have enough successful referrals), the referrer is able to add more coupons that are worth more in discounts than they are buying, which puts a negative dollar amount in the cart. I don't think Foxycart will be processing this as a credit to the customer, but it would still be preferable if it was just $0 instead of implying a credit. My workaround for this would be to just limit the number of codes so that the referrer can only redeem up to the $x value, but...
2. I don't see an (obvious) way to limit the number of coupon codes used per transaction. I can limit how many times all coupons can be used, or how many times a single code can be used, but if I allow multiple codes to be used in a single transaction, there's no limit on how many of those codes they can use.
I understand that this isn't exactly the most common usage of coupons, but any help is appreciated.