FAQ Database Discussion Community


Show validation errors in view for custom Devise login form

authentication,ruby-on-rails-4,devise,spree,spree-auth-devise
At the moment, I'm building a Rails platform using Spree Commerce where I need two Devise login forms. The default Devise login forms are already implemented. For the second (custom) Devise form, I created the following view: global_login.html.erb <div class="inner"> <h2 class="large-margin"> Login </h2> <%= form_for(Spree::User.new, :url => spree_login_path) do...

How to remove OAUTH_PROVIDERS in Spree Social plugin

ruby-on-rails,oauth,spree,class-eval,spree-auth-devise
I've been reading through the SpreeSocial documentation here. I can't figure out how to remove providers through the config. I've tried to just pop the most recent provider off off of the list but that's not working. SpreeSocial::OAUTH_PROVIDERS.pop I managed to make the 'Sign in with LinkedIn' appear in the...

Override Spree Commerce's Bootstrap Variables

ruby-on-rails,twitter-bootstrap,spree
I'm having an issue with deploying a customized _variables.scss to my production server as a compiled asset. Everything is fine on my development environment, it's in production that my variables are being overwritten. I'm using Rails 4.2.1 with Spree 3.0 Stable branch. I have the following structure: Files created in...

How to remove LineItem instance from an order (Spree)

ruby-on-rails,e-commerce,spree
I'm working with Spree, but I'm not completely familiar with the built-in methods. I'm trying to make it so that when params[:quantity] == 0, the line_item instance gets deleted and removed from the order. I've tried calling destroy! on the instance but that hasn't worked, as well as a few...

How to show spree product variant images only?

ruby-on-rails-4,spree
Right now I've the following piece of code, which retrieves all images attached to Spree products. <% @product.images_by_variant.each do |variant_id,images| %> <ul class="gallery gallery-<%= variant_id %>" data-variant="<%= variant_id %>"> <% images.each do |image| %> <li> <%= image_tag(image.attachment.url(:single)) %> </li> <% end %> </ul> <% end %> However, there are also...

Spree application and main rails application CSS loading

ruby-on-rails,ruby,spree
I have a Spree application and some pages that are not part of the spree application. My problem is that styles are shared between those pages. (they look similar, but they have their own asset locations) How do I do it so I don't have to maintain two sets of...

Filter by category is not working in spree sunspot search

spree,sunspot-solr
I am facing problem in spree sunspot(solr) search. Filter by price is working file but issue in filter by category. I am using rails- 4.1.6, ruby 2.2.0, spree_sunspot (1.3) spree_sunspot.rb string :category_names, :multiple => true do category = Spree::Taxon.find_by_permalink('categories') taxons.select{|t| t.ancestors.include?(category)}.collect{|t| t.self_and_ancestors.map(&:name)}.flatten - [category.name] end spree_sunspot_filters.rb filters.add do |f| f.display_name...

How to sort products by a taxon property in Spree

ruby-on-rails,spree
The Spree (2.3.4) application I've inherited has a taxonomy named "Makers" with multiple taxons associated to it by 'taxonomy_id'. I have been tasked with sorting products by the taxon's 'name' property, something like Spree::Product.order('taxon.name DESC') I think I need to do an includes on the Products table, but I'm not...

Supplier login when using spree-drop-ship

e-commerce,spree,marketplace
I'm working on a marketplace website. The idea is to allow for suppliers to login, add their products, view orders, generate reports etc. I'm using Spree Commerce, and I see everyone suggesting to use spree-drop-ship extension to achieve all/part of above.(it's not really clear from the documentation, all the features...

Should I add engine's code to the app itself if I'm going to modify it a lot (Spree, Rails)?

ruby-on-rails,e-commerce,spree,rails-engines
I'm starting a new app with Spree and I'm going to heavily modify it. It seems impractical to go to source every time I need to change something. Should I just copy paste contents of spree/front_end engine to my app or should I do: Spree::Product.class_eval do def some_method ... end...

how to remove /t taxon path in spree 2.x?

ruby-on-rails,spree,taxonomy
We are developing eCommerce website using Spree, the categories link getting like /t/brand/ruby. But we have to remove /t on taxon. Thanks Thiyagarajan Veluchamy...

How do I make a full width slider in index.html.erb of spree commerce

javascript,ruby-on-rails,spree
I add superlides.js to spree . The problem is , when I add slide at layout , slides can work fine but it will show on every page . Thus , I add slide to index.html.erb .It work fine but the slide is not show in full width as I...

Ruby on rails Spree commerce rake aborted

ruby-on-rails,spree,spree-paypal-express,spreedly
I am working with spree commerce in ruby on rails. But I am getting error, when executing this command "bundle exec rails g spree_fancy:install". What I am doing wrong?. Please help me. Thanks in advance. Here is my error: [email protected]:~/SpreeProject/banglashop$ bundle exec rails g spree_fancy:install append vendor/assets/javascripts/spree/frontend/all.js insert vendor/assets/stylesheets/spree/frontend/all.css run...

Spreecommerce : Checkout doesn't work without product variants

ruby-on-rails,spree,variants
If I don't have/want to setup product variants, I don't get the option to "add to card" and I can't checkout either. Am I obliged to have more than one product variants in order to proceed?...

Discover spree e-commerce models [closed]

ruby-on-rails-4,model,spree
I am new to ruby on rails and spree e-commerce too. what i want is to see all the models that manipulates this e-commerce framework poduct.rb, order.rb ... to understand relationships between all of them. But I did not find them

spree_fancy footer image change

ruby-on-rails-4,spree,spree-auth-devise
I am creating an spree application. I want to change the footer image but I can not understand why I could not access the image tag in footer four columns. Is there any way to change footer image? And another one is, image source could not find image. Thanks in...

Add a new search field and filter result as per the value of the filed in Spree

ruby-on-rails,spree
I want to filter the orders using stock_location field. I have the added the field to the filter section: # app/overrides/admin.rb Deface::Override.new(:virtual_path => "spree/admin/orders/index", :name => "stock_locations", :insert_top => "div.omega.four.columns", :text => "<%= label_tag :q_line_items_variant_stock_locations_id_eq, 'Stock Locations' %><%= f.select :line_items_variant_stock_locations_id_eq, Spree::StockLocation.pluck(:id, :name).collect { |id, name| [name.strip, id]}, {:include_blank => true},...

Customizing the Image sizes on the home page in a Spree Application

image,paperclip,product,spree,ruby-on-rails-4.2
Guys How to change the image size for a particular product on the Home page Like in default images size is small(100 x 100) I want to increase the image size but how i couldn't get it!! please Help me out guys!!!

Check if Spree Cart is empty

ruby-on-rails,spree
How can I check if the Spree cart is empty, so I can change the button if it isn't? I thought there was a method line_items.count... <% unless line_items.count > 0 %> <%= link_to "<button>Empezar Pedido</button>".html_safe, "/shop" %> <% else %> <%= link_to "<button>Terminar Pedido</button>".html_safe, "/shop" %> <% end %>...

Rails Cache Permission Error

ruby-on-rails,spree,digital-ocean,cloud66
I have a Rails app (a Spree Commerce store) running on Digital Ocean and deployed through Cloud 66. I would like to SSH into my server, run a rails console, and adjust some Spree config settings. When I try to do this I get a permissions error: Errno::EACCES: Permission denied...

How to integrate ckeditor to spree admin

ruby-on-rails,ckeditor,spree
I am new to spree and ckeditor integration. I want to integrate ckeditor to the spree admin. I could configure ckeditor correctly with rails_admin section of my website (following the steps in https://github.com/galetahub/ckeditor), but now i want to add it to a field in the product edition page in the...

Customizing spree e-commerce view

twitter-bootstrap,view,spree,deface
I am while customizing my spree e-commerce application. At first I added the spree_bootstrap_frontend gem and I want to customize the oredres/edit view as follow: Deface::Override.new(:virtual_path =>"spree/orders/edit", :name => "continue_shopping", :replace => "erb[loud]:contains('link_to t(:continue_shopping), products_path')", :erb => "<%= link_to t(:continue_shopping), products_path, :class => 'btn btn-primary' %>") but there's no change....

Combining two results

postgresql,spree
I want to combine results on my postgres query, at the product properties. Currently it is giving me these results: name id value sku item_count Item # 1 3 Item IT-EM1 3 Item # 1 2 006058465456 IT-EM1 3 Item # 2 3 Item IT-EM2 1 Item # 2 2...

Errors when trying to start a new Rails app with Spree Commerce

ruby-on-rails,ruby,bundler,spree,thor
I am getting the following error when trying to install Spree Commerce (a clean install) into a new rails application. Could not load generator "generators/spree/install/install_generator". Error: uninitialized constant Bundler::Thor::Base. Any help would be greatly appreciated! I have already checked the resources on the SpreeCommerce Documentation, Spree's Github, and similar issues...

Spree 3.0 emails are not being sent (delivered)

ruby-on-rails,email,spree
I've got Spree 3.0, rails 4.2.1, nginx, unicorn. Here is spree-related gem list gem 'spree', github:'spree/spree', branch: '3-0-stable' gem 'spree_i18n', github: 'spree-contrib/spree_i18n', branch: '3-0-stable' gem 'spree_gateway', github: 'spree/spree_gateway', branch: '3-0-stable' gem 'spree_auth_devise', github: 'spree/spree_auth_devise', branch: '3-0-stable' gem 'spree_static_content', github: 'spree/spree_static_content', branch: '3-0-stable' gem "spree_product_zoom", git: "git://github.com/spree/spree_product_zoom.git", branch:...

Change Spree commerce with Deface

ruby-on-rails,spree,deface
I'm learning Spree because I want to create an ecommerce with it. I installed successfully Spree and now I would like to customize the standard spree template with deface. I'm trying to delete the table with "product-properties" id in the products page. I've done this way, but it doesn't work:...