Spree Affiliate and Referrals extension
Last updated on: September 05 at 06:24 PM
source code bug tracker## :warning: This repository is no longer maintained by the original author :warning: ## :warning: Please refer to vinsol-spree-contrib/spree_reffiliate for an updated version :warning:
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.
To use the stable branch, add this line to your Gemfile:
gem 'spree_reffiliate'
Alternatively, if you want to use the bleeding edge version, use this line:
gem 'spree_reffiliate', github: 'kinduff/spree_reffiliate'
Bundle your dependencies and run the installation generator:
bundle
bundle exec rails g spree_reffiliate:install
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.
Important: in both referrals and affiliates, do not fill in the promotion code for the promotion itself to be applied automatically to the user's order. If you add a promotion code, the user will need to apply the for promotion manually.
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
When testing your applications integration with this extension you may use it's factories. Simply add this require statement to your spec_helper:
require 'spree_reffiliate/factories'
Copyright (c) 2014 Alejandro AR, released under the New BSD License