How to set rules for discount codes in an affiliate program