Skip to content

Instantly share code, notes, and snippets.

@zerothabhishek
Created November 24, 2012 09:44
Show Gist options
  • Save zerothabhishek/4139054 to your computer and use it in GitHub Desktop.
Save zerothabhishek/4139054 to your computer and use it in GitHub Desktop.
spree@chennaigeeks

SPREE

Intro

e-commerce software
open-source
rails/ruby based
For programmers
Current version 1.2 (young and usable)

Contents

  • spree-core
    MVC for [Product, Variant, Order, Payment, Shipment, Inventory, Adjustments, Taxonomy ...]

  • spree-api
    Api backend for the resources

  • promos Promotion related functionality

Extensions

11 official, >7000 total

Official:

  • store_credits
  • affiliate
  • related_products
  • social
  • comments
  • paypal_express
  • recently_viewed
  • active_shipping
  • wishlist
  • simple_dash
  • skrill

Deface and deployment service

Popularity and relevence

Forks: 1192 Rails-4271, Bootstrap-10201, 34th (via github)
Watchers: 3478
Development activity: very active (via rubygems.org)
Within rails community: mixed

People

311 contributors,
SpreeCommerce Inc,
Ryan Bigg.

Alternatives/Competition

Magento (php)
OpenCart (php)
Prestashop (php)
Zencart (php)
Shopify (hosted)

Installation on ubuntu:

Install ruby
apt-get install ruby

Install rubgems curl http://production.cf.rubygems.org/rubygems/rubygems-1.8.24.tgz -o rubygems; tar -xvf rubygems; cd rubygems; ruby setup.rb

Install spree gem install spree
rails new mystore
spree install

Start
rails s

Flexibility:

ruby's open class and decorator loading

Order.class_eval
	def	price
		lineitems_total - discounts if user.has_discounts?
	end
end 

Alter checkout flow older version (0.7):

Order.state_machines[:state] = StateMachine::Machine.new(Order, :initial => 'cart') do
  event :next do
    transition :from => 'cart',     :to => 'address'
    transition :from => 'address',  :to => 'payment'  , :if => :payment_required?
    transition :from => 'confirm',  :to => 'complete'
    transition :from => 'payment',  :to => 'confirm' 
    transition :from => 'payment',  :to => 'complete'
  end
end 

Alter checkout flow latest:

	checkout_flow do
	  go_to_state :address
	  go_to_state :delivery
	  go_to_state :payment, :if => lambda { |order| order.payment_required? }
	  go_to_state :confirm, :if => lambda { |order| order.confirmation_required? }
	  go_to_state :complete
	  remove_transition :from => :delivery, :to => :confirm
	end    

India ready?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment