Referral Program Module for Magento 2 — Documentation
Introduction
- The LetsCMS Referral Program Module for Magento 2 is a feature-rich marketing extension that helps store owners drive new customer acquisition through customer referrals. It offers:
- 🔹 Unique referral code generation
- 🔹 Flexible reward structures (signup & purchase-based)
- 🔹 Flexible reward structures (signup & purchase-based)
- 🔹 Admin dashboard for managing referrals & rewards
- 🔹 Customer account integration for seamless sharing
Installation
Magento 2 module installation. Here's a detailed guide on how to proceed:
Magento 2 module Installation
Step 1:Extract the Zip File:
- Extract the contents of the zip file to a temporary directory on your computer.
Step 2: Copy Files to Magento Root Directory:
- Copy all files and folders from the extracted zip file.
- Paste the copied files into the app/code directory inside your . If app/code does not exist, create it.
Step 3: Open Terminal or CMD:
- Change your working directory to the Magento root directory using the following command:
-
you need to run the following commands to install and activate the module:
php bin/magento setup:upgradephp bin/magento setup:di:compilephp bin/magento setup:static-content:deploy -fphp bin/magento cache:clean
Verify Installation:
-
php bin/magento module:status
Troubleshooting:
- Permissions Issue: Ensure the app/code directory and its contents have the correct permissions set for your web server user.
-
Magento Cache: If you encounter issues, try clearing Magento caches and reindexing:
php bin/magento indexer:reindexphp bin/magento cache:clean
Configuration
Configuration Settings
📂 General Settings
Navigate to: Admin Panel → Customers → Referral Program → Settings
🔸 General Settings
| Setting | Description | Default |
|---|---|---|
| Enable Referral Program | Toggle referral system on/off | Disabled |
| Referral Code Length | Auto-generated referral code length (8-12 chars recommended) | 8 |
🔸 Reward Settings
| Setting | Description | Default |
|---|---|---|
| Enable Signup Reward | Reward for referred customer signups | Disabled |
| Signup Reward Amount | Fixed reward for successful signups | 0 |
| Enable Purchase Reward | Reward for referred purchases | Disabled |
| Purchase Reward Type | Fixed amount or percentage | Fixed |
| Purchase Reward Fixed Amount | Fixed reward per purchase | 0 |
| Minimum Order Amount | Minimum cart value to qualify for rewards | 0 |
| Reward Expiry Days | Number of days before rewards expire (empty = no expiry) | - |
🔸 Display Settings
| Setting | Description | Default |
|---|---|---|
| Show in Customer Account | Display referral section in dashboard | Yes |
| Show in Registration Form | Show referral field during signup | Yes |
| Show in Checkout | Allow referral code input at checkout | No |
🔸 Reward Discount Settings
| Setting | Description | Default |
|---|---|---|
| Enable Reward Discount | Allow customers to redeem rewards as discounts | No |
| Maximum % of Order Total | Max discount % redeemable from reward balance | 10% |
| Minimum Order Amount | Minimum cart value for redemption | 0 |
| Display in Checkout | Show reward discount option in checkout | Yes |
| Allow Partial Redemption | Allow partial use of reward balance | Yes |
🛠️ Usage Instructions
📌 For Customers
Referral Code Generation
- Customers receive a unique referral code after account creation
- Accessible from My Account → Referral Program
Sharing Referrals
- Customers can share their referral link/code via social media, email, or direct messages
Earning Rewards
- Signup Reward: Credited when a referred customer signs up
- Purchase Reward: Credited when a referred customer makes a purchase
Redeeming Rewards
- Available as discounts during checkout (if enabled in settings)
🔸 Troubleshooting Common Issues
| Issue | Solution |
|---|---|
| Referral codes not generating | Check module status and recompile Magento |
| Rewards not applying | Verify minimum order amount and expiry configurations |
| Discounts not showing in checkout | Ensure "Display in Checkout" setting is enabled |
🗑️ Uninstallation
Follow these steps to uninstall:
- First, disable the module:
- Then uninstall the module:
- Update the database schema:
- Clear the cache:
php bin/magento module:disable Letscms_ReferralProgram
php bin/magento module:uninstall Letscms_ReferralProgram
php bin/magento setup:upgrade
php bin/magento cache:flush
Note: Uninstalling will remove all module data including referral codes and reward records.




