Skip to content

Affiliate Handling plugin, based on Rails Engines, for a ruby on rails based app.

Notifications You must be signed in to change notification settings

pjammer/active_affiliate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Only use for testing purposes – you’ve been warned.

Definitely not production worthy at all, but enough to give you the flavour.

Issues will be tracked via this github project’s issue tracker, so feel free to contribute issues during the testing phase.

Rails Plugin Dependencies

Having used the built in rails engines feature of 2.3.2, you’ll need the following two plugins available.

These are really standard plugins and you may have them installed already.

Installation

Set up the two plugins above first

Then it’s just the usual command:

script/plugin install git://github.com/nerbie69/active_affiliate.git

Run the following rake task to get your database migrations ready:

rake active_affiliate:sync

then run

rake db:migrate

That should be it.

Useage

More to come but check out the routes, and setup your affiliate_settings for sure.

One last thing will be adding this code to application_controller.rb

#check for an affiliate link on every login. if found set the session variable.
before_filter :affiliate_link_check

##check for affiliate links
def affiliate_link_check
session[:affiliate_id] = params[:affiliate_id] if params[:affiliate_id]
end

this will change i’m sure from session to cookie. There will also be more info about hooking this into your shopping cart, or whatever, so that people can get credit.

Hell it’s a start :-)

About

Affiliate Handling plugin, based on Rails Engines, for a ruby on rails based app.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages