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
210
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
86
Other Decks in Programming
See All in Programming
Pythonではじめるオープンデータ分析〜書籍の紹介と書籍で紹介しきれなかった事例の紹介〜
welliving
3
750
Basic Architectures
denyspoltorak
0
160
令和最新版Android Studioで化石デバイス向けアプリを作る
arkw
0
470
Giselleで作るAI QAアシスタント 〜 Pull Requestレビューに継続的QAを
codenote
0
330
AI時代を生き抜く 新卒エンジニアの生きる道
coconala_engineer
1
500
Deno Tunnel を使ってみた話
kamekyame
0
310
フルサイクルエンジニアリングをAI Agentで全自動化したい 〜構想と現在地〜
kamina_zzz
0
340
ローカルLLMを⽤いてコード補完を⾏う VSCode拡張機能を作ってみた
nearme_tech
PRO
0
230
公共交通オープンデータ × モバイルUX 複雑な運行情報を 『直感』に変換する技術
tinykitten
PRO
0
180
2年のAppleウォレットパス開発の振り返り
muno92
PRO
0
180
re:Invent 2025 トレンドからみる製品開発への AI Agent 活用
yoskoh
0
570
メルカリのリーダビリティチームが取り組む、AI時代のスケーラブルな品質文化
cloverrose
2
440
Featured
See All Featured
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.5k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
6.8k
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
For a Future-Friendly Web
brad_frost
180
10k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
2.8k
Google's AI Overviews - The New Search
badams
0
880
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
A Soul's Torment
seathinner
1
2.1k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
65
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
280
Statistics for Hackers
jakevdp
799
230k
Automating Front-end Workflow
addyosmani
1371
200k
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:
[email protected]
Slides: http://www.freerunningtech.com/confoo
More From Me! Practical Code Review with Gerrit 9:00 AM Tomorrow (Same Room)