Details
Description
Clients need a way to signup to be an affiliate. By default, no one is an affiliate until they signup to be one.
Staff interface
- Under Clients > Affiliates, there should be two tabs, one for an Overview and one for Payout Requests. We will focus on the Overview here. It should display a widget that lists all affiliates, but for now will be blank except for a button to add a new affiliate.
- There should be a "+" button to add a new affiliate similar to other widgets
- Staff should be taken to another page to signup a client up to be an affiliate.
- An input field should exist to search for a client using JS autocomplete (similar to the support manager). After a client is chosen, the staff can submit the client as a new affiliate if they are not one already.
- Display a success message and load the "Manage Affiliate" page for the client
- When viewing a client's profile, clicking the "Manage Affiliate" link should take the staff to a page to view their affiliate statistics.
- If not an affiliate yet, the signup page should be shown instead
- After signup, display a success message and load the "Manage Affiliate" page for the client
- Display an information box at the top of the page if there are no Affiliates
- The information box should provide instructions on enabling the Affiliate System within the client area within the plugin, and how to get rid of the Clients > Affiliate page entirely within the plugin if they would prefer to do that.
- There should be a "+" button to add a new affiliate similar to other widgets
Client interface
- Create the client's Affiliates page. It will render one of two templates depending on whether they are signed up
- If not signed up, display the configured "signup_content" data, and below it a button to "Activate Affiliate Account"
- Make a POST request to signup and redirect on success to their Affiliates page
- If signed up already, display information on their affiliate account including their clicks, signups, total withdrawal amounts, etc.
- If not signed up, display the configured "signup_content" data, and below it a button to "Activate Affiliate Account"
Signing up means an affiliate ID will be generated for them (and settings copied over, etc.)