Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Introduction to Spree (A Ruby on Rails E-Commer...
Search
gmacdougall
February 26, 2014
Programming
0
200
Introduction to Spree (A Ruby on Rails E-Commerce App)
Presented at ConFoo 2014.
gmacdougall
February 26, 2014
Tweet
Share
More Decks by gmacdougall
See All by gmacdougall
Practical Code Review with Gerrit
gmacdougall
0
83
Other Decks in Programming
See All in Programming
Deoptimization: How YJIT Speeds Up Ruby by Slowing Down / RubyKaigi 2025
k0kubun
1
1.7k
파급효과: From AI to Android Development
l2hyunwoo
0
150
一緒に働きたくなるプログラマの思想 #QiitaConference
mu_zaru
77
19k
Glue Studio Visual ETL実装時にハマったこと
kokitamura
1
110
Orleans + Sekiban + SignalR でリアルタイムWeb作ってみた
tomohisa
0
200
ASP.NETアプリケーションのモダナイゼーションについて
tomokusaba
0
210
SwiftDataのカスタムデータストアを試してみた
1mash0
0
130
Jakarta EE Meets AI
ivargrimstad
0
600
監視 やばい
syossan27
12
10k
ComposeでWebアプリを作る技術
tbsten
0
120
インプロセスQAにおいて大事にしていること / In-process QA Meetup
medley
0
110
新しいPHP拡張モジュールインストール方法「PHP Installer for Extensions (PIE)」を使ってみよう!
cocoeyes02
0
440
Featured
See All Featured
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Designing for humans not robots
tammielis
253
25k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
Building Adaptive Systems
keathley
41
2.5k
Facilitating Awesome Meetings
lara
54
6.3k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.6k
For a Future-Friendly Web
brad_frost
177
9.7k
Being A Developer After 40
akosma
91
590k
StorybookのUI Testing Handbookを読んだ
zakiyama
29
5.7k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
5
550
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
5
580
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
30
2.3k
Transcript
Introduction to Spree A Ruby on Rails E-Commerce App by
Gregor MacDougall Twitter: @GrMacDougall Website: http://www.freerunningtech.com/
About Me Gregor MacDougall Sr. Software Developer @ FreeRunning Technologies
None
The Grand Tour rake sandbox
None
None
None
None
None
None
None
None
None
Look Familiar? • Competitors ◦ Marketplace Solutions ◦ SaaS Solutions
◦ Self-hosted Solutions ▪ Magento, VirtueMart, ZenCart, Prestashop, osCommerce, OpenCart, …
What Makes Spree Different? • Ruby on Rails • Rails
Engine • mount Spree::Core::Engine, :at => '/store' ◦ / -> Your App ◦ /store -> Spree ◦ /blog -> Something Else
How Does Spree Model Data? Product • Basic Product ◦
Name ◦ Description ◦ SKU ◦ Weight, Dimensions ◦ Price
How Does Spree Model Data? Product • Name • Description
Variant • SKU • Weight, Dimensions • Price
How Does Spree Model Data? Product - OptionType: colour Variant
- OptionValue: black Product - OptionType: colour Variant - OptionValue: red
None
How Does Spree Model Data?
None
None
None
Customizing Spree • View Customization ◦ CSS ◦ Replacing Templates
◦ Deface • Logic Customization ◦ Adding new logic ◦ Changing existing logic
xray-rails
Replacing a view Create the following file: ./app/views/spree/shared/_search.html.erb
Using Deface to Modify Templates
Deface app/views/spree/shared/_products.html.erb
Deface app/overrides/before_products.rb
Deface (Matching on Template)
Customizability Ruby Meta-Programming (pry examples)
With Great Power...
Mixed Nuts Store
Create The Nut Model rails g model Spree::Nut name:string
Create The Nut Variant Association rails g model Spree::VariantNut variant:
references nut:references
Our Models
Nut Model In Action
Modifying Spree’s Classes app/models/spree/variant_decorator.rb
Overriding Spree Functionality
Other Spree Features • Promotions & Discounts • API •
Stock Location & Inventory Tracking • ActiveMerchant Support (100+ Payment Gateways) • Full i18n support (~40 languages currently supported) • Large Library of Extensions • and much more
For More Information Spree http://www.spreecommerce.com/ http://www.github.com/spree/spree FreeRunning Technologies http://www.freerunningtech.com/
About Me Twitter: @GrMacDougall Github: https://github.com/gmacdougall E-mail: gmacdougall@freerunningtech.com Slides: http://www.freerunningtech.com/confoo
More From Me! Practical Code Review with Gerrit 9:00 AM Tomorrow (Same Room)