The registrationform already contains a field 'kortingscode' and the text a visitor enters there is stored in the kortingscode profile field of this user in Cyclos. But calculating the discount belonging to a code is not yet implemented.
To implement discount codes we could:
Add a System Record so admins can manage discount codes. Each record holds information on one discount code, with the fields: name, code, percentage and period.
Change the createUser extension script so it calculates the correct amount before creating the mollie payment.
Change the activateUserCheckPayment extension script so it takes the discount code into account a) when checking if the amount is correct and b) when creating the Cyclos transactions.
The registrationform already contains a field 'kortingscode' and the text a visitor enters there is stored in the kortingscode profile field of this user in Cyclos. But calculating the discount belonging to a code is not yet implemented.
To implement discount codes we could: