https://yourwebsite.com/registration?ref=userID
Code changes in backend:
- After registration, show invitation link on customer page with information text.
- On registration form, check ref=userID and after completion of registration, store registered userID in database customer table invitedCustomers column. This column can have multiple userIDs, separated by commas, but cannot have duplicates.
- Order data structure: Add referringUserID
- On product checkout, if current vendor userID is found in customer table-column invitedUserID, set order referringUserID to that rows userID.