Spree Reffiliate is a Spree Extension that adds the referral and affiliate features to your Spree Store. Users are going to be able to share a unique hyperlink with their friends to gain benefits and you'll be able to create affiliate campaigns through the Spree Administrator and configure it to your needs.
Try Spree Reffiliate for Spree Master with direct deployment on Heroku:
Try Spree Reffiliate for Spree 3-4 with direct deployment on Heroku:
Try Spree Reffiliate for Spree 3-1 with direct deployment on Heroku:
- Each user will have a unique link associated to his account which he can use to refer other users.
- User can signup as a referred user
- Referred user can have promotions
- Referrer can have store credits.
- Admin is able to create an affiliate with a custom path.
- Customize the affiliate view with a partial
- Affiliate can get commission in two ways: (i) Order placement (ii) User Registration
- These commission amount can be defined from
affiliate_commission_rules
on affiliate new/edit page. - After successful user-creation/order-placement, a transaction will be created which will have the amount and commissionable(user/order).
- Affilate can view it in account panel.
- Affiliated user can have individual promotions
- Admin is able to see affiliated users and orders from affiliate
To use the stable branch, add this line to your Gemfile:
gem 'spree_reffiliate', github: 'vinsol-spree-contrib/spree_reffiliate'
Bundle your dependencies and run the installation generator:
bundle
bundle exec rails g spree_reffiliate:install
Seed the Commission Rules from seed.rb
If you already have users within your database, you'll need to run the following command to generate the referral registry for your users:
bundle exec rake reffiliate:generate
Referral path is /r/:code
and Affiliate path (assigned in the admin) is /a/:path
Once installed, you'll be able to access the following methods.
- referred_by => user record
- referral_count => user count
- referred? => boolean
- affiliate? => boolean
- affiliate => affiliate record
- referral => referral record
- associated_partner => user corrosponding to affiliate.
- code => referral code
- referred_users => array of users
- referred_orders => array of orders
- referred_count => user count
- referral_activated_users => users with completed orders
- referred_users => array of users
- referred_orders => array of orders
- referred_count => user count
-
Admin can pay commission, once the commission cycle completes. The commission tab will have pay button which will mark respective commission as completes. This action, as a result, also locks corrosponding transactions.
-
Each user will have a unique link associated to his account which he can use to refer other users.
-
User can signup as a referred user
-
Referred user can have promotions
-
Admin is able to see referred users and orders from user
-
Referrer gets store credit for successful referrals. A referral will be considered successful if referred user successfully signs up.
-
Admin can configure referral settings. There are two settings for giving referral benefits to referrer. One is the global setting found under configuration tab and other is user specific setting.
-
Global Settings : There are two global settings under Configuration->Referrals tabs with regard to referral. One is the store credit amount that would be credited to referer's account on each successful referral. Other is a checkbox to enable and disable the referral benefit to a referrer. By default store credit amount is set to 0 and referral benefit is disabled.
-
User Specific Settings : Admin can override the referral settings for a particular user in user's general settings, where he may disable/enable the referral benefits and change the store credit amount. Default value for store credit is nil and referral benefit is enabled.
-
Referrer will receive store credit when referral is enabled at both global and user level. Store credit amount in user setting will have precedence over the global setting. In case the value is nil in user setting then global setting would apply for store credit amount. +Referrer will receive mail on store credit transfer to his account
-
Each user can see their referrals under My Account section. To see the details of referrals user can click on view more where all referred users will be listed with store credit amount and date of sign up by referred user.
-
Admin can see store credits for a particular user under user's store credit section. The store credits received for referral will be listed under Referral Credit category.
First bundle your dependencies, then run rake
. rake
will default to building the dummy app if it does not exist, then it will run specs. The dummy app can be regenerated by using rake test_app
.
bundle
bundle exec rake
Copyright (c) 2014 Alejandro AR, released under the New BSD License