GithubHelp home page GithubHelp logo

spree_reffiliate's Introduction

⚠️ This repository is no longer maintained by the original author ⚠️

⚠️ Please refer to vinsol-spree-contrib/spree_reffiliate for an updated version ⚠️

Spree Reffiliate

Codeship Status for kinduff/spree_reffiliate Build Status Code Climate Test Coverage

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.

Referrals

  • User can share a unique URL
  • User can signup as a referred user
  • Referred user can have promotions
  • Admin is able to see referred users and orders from user

Affiliates

  • Admin is able to create an affiliate with a custom path
  • Customize the affiliate view with a partial
  • Users are going to be able to signup as an affiliated user
  • Affiliated user can have individual promotions
  • Admin is able to see affiliated users and orders from affiliate

Spree Reffiliate

Installation

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

Existing Users

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

Usage

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.

Spree::User

  • referred_by => user record
  • referral_count => user count
  • referred? => boolean
  • affiliate? => boolean
  • affiliate => affiliate record
  • referral => referral record

Spree::Referral

  • code => referral code
  • referred_users => array of users
  • referred_orders => array of orders
  • referred_count => user count
  • referral_activated_users => users with completed orders

Spree::Affiliates

  • referred_users => array of users
  • referred_orders => array of orders
  • referred_count => user count

Spree Admin

Users

User Listing

Affiliates

Referral Listing

Promotion Rules

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.

For referrals

Referral Rules

For affiliates

Affiliate Rules

User account

User account

Testing

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'

ToDo

  • Add missing documentation
  • Add 2-2-stable and 2-1-stable support (or at least test them)
  • Improve affiliates admin
  • Improve User and Orders listing at user admin
  • Add option or helper to show referral code to the user

Copyright (c) 2014 Alejandro AR, released under the New BSD License

spree_reffiliate's People

Contributors

jackbot avatar kinduff avatar nzkwgo avatar sergiokas avatar tomcartwrightuk avatar v-may avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

spree_reffiliate's Issues

supported spree versions..?

Hi,

I am trying to install this extension with spree stable 2.0 version but i am facing below error while installing.

spree_reffiliate (>= 0) ruby depends on
spree_core (~> 2.3.1) ruby

spree (>= 0) ruby depends on
  spree_frontend (= 2.0.14.beta) ruby depends on
    spree_core (2.0.14.beta)

Please help me.

Thanks
Shiva.A

2.1?

Any chance I could get some help with a 2.1-compatible version? I'm a little way down the path, but hitting some roadbloacks. Could be my lack of understand on how to use refilliates. Could be my lack of understanding on how to integrate with spree itself. Likely a little of both.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.