Accessing Affiliates
Navigate to Marketing > Affiliates in your admin panel to view and manage your affiliate partners.How the Affiliate System Works
Affiliates receive a unique tracking code that they add to your store’s URLs. When customers visit through these tracked links and make purchases, the affiliate earns a commission. Tracking URL Format:https://yourstore.com/index.php?tracking=AFFILIATE_CODE
Affiliates must be existing customers in your store. The affiliate program extends customer accounts with additional commission and payment information.
Creating a New Affiliate
Select Customer
Click Add New and search for an existing customer account. Affiliates must have a customer account first.
Enter Company Details (Optional)
If the affiliate represents a company:
- Company Name: Business name
- Website: Affiliate’s website URL
Set Tracking Code
Enter a unique tracking code (automatically generated) that the affiliate will use in referral links.
Configure Commission
Set the commission rate (percentage) this affiliate will earn on sales. This can be different for each affiliate.
Set Payment Method
Choose how the affiliate will receive payments:
- Cheque: Payable name
- PayPal: PayPal email address
- Bank Transfer: Bank account details
Tax Information (Optional)
Enter the affiliate’s tax ID or VAT number if required for tax reporting.
Payment Methods
Cheque Payment
Cheque Payment
For affiliates who prefer check payments.Required Information:
- Name to print on the check
PayPal Payment
PayPal Payment
For fast electronic payments via PayPal.Required Information:
- Valid PayPal email address
Bank Transfer
Bank Transfer
For direct bank deposits.Required Information:
- Bank name
- Branch number
- SWIFT code (for international transfers)
- Account holder name
- Account number
Managing Affiliate Commissions
Viewing Affiliate Balance
Each affiliate has a running balance that shows total commissions earned:- View the Balance column in the affiliates list
- Click Edit on an affiliate to see detailed transaction history
- Navigate to the Transaction tab for a complete commission log
Processing Payments
When you’re ready to pay affiliates:Export Payment Data
Click Export to download a CSV file with payment information formatted for each payment method.
Process Payments
Use the exported data to process payments through your chosen method (PayPal Mass Pay, bank transfer, etc.).
The CSV export format varies by payment method to match the import format of popular payment processors.
Filtering and Searching Affiliates
Use the filter panel to find specific affiliates:- Customer Name: Search by affiliate name
- Tracking Code: Find by tracking code
- Payment Method: Filter by payment type (cheque, PayPal, bank)
- Commission Rate: Find affiliates with specific commission rates
- Date Range: View affiliates who joined within a date range
- Status: Filter by enabled/disabled status
Tracking Affiliate Performance
Referral Reports
View detailed analytics for each affiliate:- Click Edit on an affiliate
- Go to the Report tab
- Review metrics including:
- IP addresses of referrals
- Store visited
- Country of origin
- Date and time of clicks
Commission Calculation
Commissions are automatically calculated when:- A customer clicks an affiliate’s tracking link
- The tracking code is stored in their session
- They complete an order
- The order status changes to “Complete”
- Commission is credited to the affiliate’s balance
Practical Examples
Example 1: Blog Affiliate Partnership
Set up a blogger to promote your products:- Customer: Existing customer account for the blogger
- Company: “Fashion Blog Weekly”
- Website: “https://fashionblogweekly.com”
- Tracking Code: “FASHBLOG” (memorable and brandable)
- Commission: 8% (standard rate for content creators)
- Payment: PayPal
- Status: Enabled
https://yourstore.com/index.php?tracking=FASHBLOG
Example 2: High-Volume Partner
Reward a high-performing affiliate with better terms:- Customer: Top-performing affiliate
- Company: “Mega Deals Network”
- Tracking Code: “MEGADEALS”
- Commission: 12% (increased from standard 8%)
- Payment: Bank transfer
- Status: Enabled
Example 3: Influencer Campaign
Create unique codes for multiple influencers:- Tracking Code: Use influencer name (e.g., “SARAH2024”)
- Commission: 10%
- Payment: PayPal (preferred by most influencers)
- Duration: Set to disabled after campaign ends
Best Practices
- Clear Terms: Document commission rates, payment schedules, and terms in an affiliate agreement
- Unique Tracking Codes: Create memorable, easy-to-share tracking codes
- Regular Payments: Establish a consistent payment schedule (monthly, quarterly)
- Monitor Performance: Review the reports tab to identify top performers
- Tiered Commissions: Offer higher rates to top-performing affiliates
- Marketing Materials: Provide affiliates with banners, product images, and promotional copy
- Communication: Keep affiliates informed about new products and promotions
Technical Reference
Database Structure
Affiliate data is stored in theoc_customer_affiliate table:
customer_id: Link to customer account (primary key)company: Company namewebsite: Affiliate websitetracking: Unique tracking codecommission: Commission percentage (e.g., 10.00)balance: Current commission balancetax: Tax ID or VAT numberpayment_method: ‘cheque’, ‘paypal’, or ‘bank’cheque: Payable name for checkspaypal: PayPal email addressbank_name: Bank namebank_branch_number: Branch numberbank_swift_code: SWIFT/BIC codebank_account_name: Account holder namebank_account_number: Bank account numberstatus: Active status (0 or 1)
Model Methods
Key methods in/upload/admin/model/marketing/affiliate.php:
addAffiliate($data): Create new affiliateeditAffiliate($customer_id, $data): Update affiliatedeleteAffiliate($customer_id): Remove affiliategetAffiliate($customer_id): Get affiliate detailsgetAffiliateByTracking($tracking): Find by tracking codeeditBalance($customer_id, $amount): Update commission balancegetReports($customer_id): Get referral analytics
Controller Location
- Admin Controller:
/upload/admin/controller/marketing/affiliate.php - Admin Model:
/upload/admin/model/marketing/affiliate.php
Advanced Features
CSV Export for Mass Payments
The export function generates payment files in formats compatible with:- PayPal Mass Pay: Email, Amount, Currency, Customer Name, Note
- Bank Transfer: Account details and amount
- Cheque: Payee name and amount
marketing/affiliate.csv (line 768)
Custom Commission Rates
You can set different commission rates for each affiliate:- Default commission is configured in Settings > Store > Affiliate
- Individual rates override the default when set in the affiliate profile
- Useful for tiered affiliate programs or special partnerships
Commission rates are stored as percentages. Enter 10.00 for 10%, not 0.10.
Troubleshooting
Affiliate tracking not working
Affiliate tracking not working
Check:
- Tracking code is correct in the URL
- Affiliate status is enabled
- Customer has cookies enabled
- Tracking code doesn’t contain special characters
Commissions not calculating
Commissions not calculating
Check:
- Order status is set to a “Complete” status
- Complete status orders are configured in Settings
- Affiliate was properly tracked before purchase
Cannot add customer as affiliate
Cannot add customer as affiliate
Cause: Customer may already be an affiliate.Solution: Search the affiliates list for the customer’s name to check if they already exist.
Export not including all affiliates
Export not including all affiliates
Cause: Export only includes selected affiliates with positive balances.Solution: Select affiliates with balances > $0 before clicking Export.

