spree

If you want to apply some javascript functions in a spree view you can do something like: [ruby] Deface::Override.new(:virtual_path => 'spree/addresses/edit', :name => 'my_name_javascript_functionality', :insert_bottom => ".inner", :partial => '/spree/shared/my_partial_with_javascript_functions') [/ruby] content for [shell] /spree/shared/my_partial_with_javascript_functions.html.erb [/shell]

Well, it is pretty straightforward you just need to add the favicon in the following locations: [shell] app/assets/images/favicon.ico and public/favicon.ico [/shell] And don't forget to add the tag in your header or your layout: [ruby] <%= favicon_link_tag image_path('favicon.ico') %> [/ruby] by the way you can generate a favicon in the following website: http://www.favicon.cc/ That's it you...

hello guys I want to write about selectors, overriding, and defaces in spree with the DSL for Spree: In this time I want to share the code that I have created for a simple task. The scenario is the following: I want to edit option type values in the admin section, if you take a look into the code of spree you'll see that some of the views responsible for the option type edition are located in: [shell] backend/view/spree/admin/option_types/_option_value_fields.html.erb [/shell] and [shell] backend/view/spree/admin/option_types/edit.html.erb [/shell]

Consuming Tumblr blog from your website using Ruby on Rails (Spree), Backbone and Tumblr Api You need to have an account on tumblr of course and generate the application to be able to consume the tumblr api: http://www.tumblr.com/oauth/apps About the default callback you can choose any url for example: http:://localhost:3000 Then generate the application oauth in the following url: https://api.tumblr.com/console/calls/user/info Add the following gem to your Gemfile: [ruby] gem 'tumblr_client' [/ruby]

Hey there, in this time I found the following resources and how to use it using curl or ajax calls for Spree: The most of the calls need to use the "X-Spree-Token" you can generate it from admin section eg: http://localhost:3000/admin from user section and is the token you need and also you can use for example the order token, I had problems with the api using that token if you have problems let me know. Products index of products 25 first [shell]curl -i -H "X-Spree-Token: YOUR_TOKEN_ID" http://0.0.0.0:3000/api/products.json[/shell]

[ruby] namespace :banners do desc 'Populate default banners for homepage' task :populate => :environment do banner = Spree::BannerBox.find_by(category: 'box-1') unless banner 14.times do |x| box = "box-#{ x + 1 }" banner_values = { alt_text: '', url: '', category: box, banner_type: 'photo', enabled: true } banner = Spree::BannerBox.new(banner_values) banner.attachment = File.open(File.join(Rails.root, "app/assets/images/home/#{ box }.png")) banner.save! end # boxes type text 5.times do |box| box_category = "box-#{ box + 1 }-text" banner_values = { alt_text: '', url: '', banner_type: 'text', category: box_category, enabled: true } banner = Spree::BannerBox.new(banner_values) banner.attachment = File.open(File.join(Rails.root, "app/assets/images/home/#{ box_category }.png")) banner.save! end end end end [/ruby]