Skip to content

Latest commit

 

History

History
51 lines (28 loc) · 1.55 KB

README.textile

File metadata and controls

51 lines (28 loc) · 1.55 KB

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 :-)