I'm looking at Nop as a possible solution, but have some trouble getting things working as expected. I created an affiliate with default id. I also made a discount rule of 20%. I dont see how i can combine these 2?
I tried making CustomerRole 'Affiliate', and link it to the discount, but still stuck combining those. I can see affiliate-customers being registered, so that part is working..
The system will not automatically put affiliate customers into your CustomerRole 'Affiliate'. An admin would have to add them manually, or create a plugin that automatically assigns the role to those customers. Or, create a 'discount requirement rule' plugin that can look at the customer's affiliate.