0

I just integrated spree and zurb foundation on a rails 4 app and spree did not add any .html.erb files in views so I am not able to figure out how to customize the default layout of spree.

harriss-air:montrealfixed harrisrobin$ spree install --auto-accept
     gemfile  spree
     gemfile  spree_gateway
     gemfile  spree_auth_devise
         run  bundle install from "."
   identical  config/initializers/spree.rb
   identical  config/spree.yml
      remove  public/index.html
      append  public/robots.txt
       exist  app/assets/javascripts/store
       exist  app/assets/javascripts/admin
       exist  app/assets/stylesheets/store
       exist  app/assets/stylesheets/admin
       exist  app/assets/images/store
       exist  app/assets/images/admin
   identical  app/assets/javascripts/store/all.js
   identical  app/assets/stylesheets/store/all.css
   identical  app/assets/javascripts/admin/all.js
   identical  app/assets/stylesheets/admin/all.css
       exist  app/overrides
      append  db/seeds.rb
     copying  migrations
    creating  database
     running  migrations
     loading  seed data
     loading  sample data
      insert  config/routes.rb
**************************************************
We added the following line to your application's config/routes.rb file:

    mount Spree::Core::Engine, :at => '/'
**************************************************
Spree has been installed successfully. You're all ready to go!

Everything goes smoothly when i install it.. but my app > views file is still the same, no spree folder. I can only see application.html.erb in layouts. So the question is.. how do i customize spree on rails 4 ? more specifically, how do i do the latter using zurb-foundation.

2 Answers2

1

Spree provides a helpful customization guide located here:

http://guides.spreecommerce.com/developer/view.html

The views are being loaded from the Spree gem. You can type bundle show spree_frontend in order to see where the files are located on your filesystem. It should give you the list of files shown here (depending on your version):

https://github.com/spree/spree/tree/v2.1.2/frontend

Adding zurb-foundation in to Spree is going to be an invasive change. You may want to start with some smaller changes first to get the hang of customizing Spree.

gmacdougall
  • 4,901
  • 1
  • 16
  • 21
  • 1
    found the views in Users/harrisrobin/.rvm/gems/ruby-2.0.0-p247/gems/spree_frontend-2.1.2 However, why would they be there ? isn't that weird. why not just load the views in the application i created ? Anyway, that answers my question, thanks :) –  Oct 25 '13 at 16:52
0

Ok so to find the loaded views you have to use "bundle show spree" as gmacdougall suggested.

Can anyone please point me towards the right direction for integrating the foundation framework on a rails spree project ?

Thank you !

EDIT : while i did not find anything for foundation, i figured out that overriding the views so that it works with the foundation framework can be a lot of work and might not be a good idea for a noob like myself, so i found this

https://github.com/jdutil/spree_bootstrap

This replaces the spree front end with twitter bootstrap. Would have preferred Zurb Foundation but this is good!