Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ryandotsmith/spree-extensions
an extension for an affiliate program among other things.
https://github.com/ryandotsmith/spree-extensions
Last synced: 3 months ago
JSON representation
an extension for an affiliate program among other things.
- Host: GitHub
- URL: https://github.com/ryandotsmith/spree-extensions
- Owner: ryandotsmith
- Created: 2009-06-10T14:24:04.000Z (over 15 years ago)
- Default Branch: master
- Last Pushed: 2009-07-02T18:50:27.000Z (over 15 years ago)
- Last Synced: 2023-04-12T18:26:57.470Z (over 1 year ago)
- Language: Ruby
- Homepage: www.ryan-smith.org
- Size: 97.7 KB
- Stars: 8
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.markdown
Awesome Lists containing this project
README
# Affiliate System #
works with 0.8.3 only## extensions
This extension creates a DiscountCode resource.
discount_code belongs_to :user
order has_many :discount_codesWe also will add some columns to the Order model.
order.discount_code_id
order.discount_total => once the discount is calculated it is stored on the order
order.commission_total => likewiseThe methods added:
order.calculate_discount
order.calculate_commission## theory
A user can become an affiliate by adding a discount_code.
@user.is_affilliate?Not all products are created equal. When the discount_total is calculated, the method only considers
products that have a taxon with a name == "Discountable"