Upload
islam-music
View
923
Download
0
Tags:
Embed Size (px)
Citation preview
SPREE for Ruby on Rails
with Islam Mušić
Will it make it easier on you now You got someone to blame (U2)
• Spree is a complete open source e-
commerce solution for Ruby on Rails.
• Started in 2007
• Current version (stable): 2.3
• Github last update: minutes ago
• Is it useful: YES
• Documentation: 7/10 (my opinion)
On the wrong day of the wrong
weekI used the wrong method with the wrong technique
(Depeche Mode)
• Heroku host
• Open source (New BSD License)
• Ruby on Rails
• It’s been around for a while
• I know my shit
Još uvek ti djavoli vire iz rukavasvaki nokat krije otrov ljubavi (Ekatarina Velika)
• First installation: great
• Start the configuration: fist signs of pain
• Try to deploy it on Heroku: PAIN
• Try to change template: pain
• Heroku + Spree: PAIN level 11 reached
• Heroku + Spree + AWS: Don’t even ask
• Ask for help: thx Oto
• Figured out how to use Spree: not bad
• Days before launch: It was not that bad experience
I tried so hard and got so far But in the end it doesn’t even matter (LINKIN PARK)
• Any questions?
I'm Going Deeper Underground There's too much panic in this Town … (JAMIROQUAI)
• Start with fresh Rails installation
• Deploy app to Heroku
• Add Spree to app
• Deploy app to Heroku
When things are big that should be
smallWho can tell what magic spells we'll be doing for us (Jamiroquai)
• Spree, Heroku, AWS
• I used USA AWS
configuration to
avoid Spree pain
• Do the whole
configuration of your app first
Ali mi dovoljuješ ali smempolizat prah iz tvojih ven (Res Nullius)
• Spree has a cool view structure
• You can change any view you want
• Just override the original one
• Use https links if you use
stuff from another server
• Learn turbolinks
before you start!
Pred nama nisu godineal' mogu biti najdulji sati (Darko Rundek)
• Read the Spree documentation first
• Spree is overriding some Rails stuff
My pain was email – Spree has default
“don’t send email”
• Spree item options are BAD (color, size
…)
• Some parts of documentations are
outdated
And if it don't feel goodWhat are you doing it for (Robbie Williams)
• Do the whole configuration before you
start testing your page
• TAX category is a must
• ZONES
– You have to have all countries in some zone,
or you can’t ship to that country
– If you don’t fix it correctly – your payment
won’t go through (and it won’t say why )
I've looked but I just can't find She has gotten lost in the crowd (Rolling Stones)
• Country and State problem
– With the use of my custom JS – I somehow
broke the Spree JS and could not ship the
items to Country that has no State
– Solution: Now you can only chose Country
• Use default Spree data to fill your
database with all the Countries and States
I dried your tears of pain, babeA million times for you (Billy Idol)
• Shipping methods has to involve all the
zones that you are shipping to.
• STOCK location and important because it
can give someone different shipment
payment
• Stock management
• Variants
• Item prototypes
So take this wine and drink with meAnd let's delay our misery (EAGLE-EYE CHERRY)
• Heroku – Free – All good
• Invoice statistic print
• Labels print
• API for Cards
• Communication with clients inside Spree
Some config files
development.rb
production.rb
asset_sync.rb, paperclip.rb
spree_images_paperclip.rb
spree.rb
• Any questions?
• It is really the end of my presentation
• Thanks to: Maja, Matej, Elvis, Oto, Jure,
Luka, Miha and bartenders in Kavarna
Nova
Did I disappoint youOr leave a bad taste in your mouth (U2)
But before you come to any
conclusionsTry walking in my shoes (Depeche mode)
BEFORE
• I was married
• I never drink any
alcohol
• I never used any
drugs
• I didn’t drink coffee
(on regular base)
• I had some kind of
“bioritem”
AFTER
• I’m divorced
• I started to drink
• I tasted some
“homemade cookies”
• I have more coffee
than I need
• I sleep when I can
• I FEEL AWESOME !!!