Spree Videos Extension

How to install

add `gem “formtastic”` in Gemfile add `gem “spree_videos”, :git => http://github.com/niamtech/spree_videos.git` in Gemfile run `bundle install` on command or terminal run `rake spree_videos:install` run `rake db:migrate`

How to use

  1. Go to configuration Tab > Video Type
  2. Add a new Video Type ex :
  • Name : Youtube
  • Embed Code :
<object width="[[WIDTH]]" height="[[HEIGHT]]"><param name="movie" value="http://www.youtube.com/v/[[KEYWORD]]"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/[[KEYWORD]]" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="[[WIDTH]]" height="[[HEIGHT]]"></embed></object>
  1. Go to product edition
  2. Choose Video
  3. Add a new Video ex :
  • name : “Name”
  • Video Type : “Youtube”
  • Keyword : “p8t41avFuCc”

How to display video

  1. In products/show view, add code <%= raw(@product.movies.last.content(:normal)) %>