spree

Spree Checkout - Remove Step

旧城冷巷雨未停 提交于 2019-12-12 09:04:30
问题 I am trying to remove 2 checkout steps. I have tried to follow the documentation in the site http://guides.spreecommerce.com/checkout.html but still nothing happens. I am using Spree 1.1.2 ruby 1.9.2p318 Rails 3.2.6 Ubuntu 12.04 (precise) 32-bit I'll tell you what I have done and you will tell me what to fix. Should I change the name or location of the file? Or should I change other files too? How can I debug it? I have created a new file "app/models/spree/order_decorator.rb" (also tried it

Add custom user roles spree 1.3.1

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-12 05:07:42
问题 I am using spree 1.3.1 and Devise gem for authentication and i need to add a user_role called as " partner " who can see orders in admin area but can't create/edit/update/delete any of the orders. Thanks in advance 回答1: Having app/models/partner_ability.rb file. Then use the following role based read permissions for role partner - class PartnerAbility include CanCan::Ability def initialize(user) user ||= User.new if user.has_role? "partner" can :read, Product end end end Also add the

Adding custom cient-side form validations to Spree frontend

≡放荡痞女 提交于 2019-12-12 04:28:19
问题 I am trying to add a custom, client-side validation to an input field in Spree's checkout/address page. So, here is what I have done so far: Add the input to the form (here using Haml & SimpleForm): = form.input :vat_number, label: Spree.t(:vat_number) Inside my vendor/assets/javascripts/spree/frontend/checkout/address.js.coffee , add the jQuery validate method and insert the rule into the validate() call: ($).validator.addMethod "vatNumber", (value, element) -> return false , "Something

Spree infinite scroll not working

若如初见. 提交于 2019-12-12 03:26:20
问题 I have followed stackoverflow spree infinite scroll but still my infinite scroll is not working I am posting required files please help as I am new to spree platform assets/javascripts/spree/frontend/xyz.coffee jQuery -> if $('.pagination').length $(window).scroll -> url = $('.pagination .next').attr('href') if url && $(window).scrollTop() > $(document).height() - $(window).height() - $('#footer').height() $('.pagination').text("Fetching more products...") $.getScript(url) $(window).scroll()

Including js file in spree application

我的未来我决定 提交于 2019-12-12 03:08:41
问题 I was trying to include my slider.js file to spree application but it is not working. I have looked and found that we must include it manually in all.js file but its not working. I include in my all.js file: //= require store/spree_core //= require store/spree_auth //= require store/spree_api //= require store/spree_promo //= require store/slider.js But i am not sure if the slider.js file is included in all.js file. Is there any method to test it. 回答1: By default spree app inlcudes all css

Spree category pages in custom rails app

六月ゝ 毕业季﹏ 提交于 2019-12-12 01:54:25
问题 I have created a default rails app. I am beginner to spree. I am not able to find the code for the pages which are coming by default in the spree app. This is how I have created the app gem install rails -v 4.2.2 gem install bundler gem install spree_cmd rails _4.2.2_ new mystore cd mystore spree install --auto-accept When I go to http://localhost:3000/t/categories/bags I get all the categories for this category. But in my view I do not see any code. So from where are these coming from?

Why overriding Spree default styles is inconsistent?

ε祈祈猫儿з 提交于 2019-12-12 01:44:44
问题 I am making an SCSS override file for the default Spree template. On the product catalogue display page there is a border around each product image. If I change the border properties for the base state of the product-image class, nothing changes. However if I add an alteration for product-image:hover it works without an issue. I can resolve the problem using !important but I'd be grateful to understand why the change doesn't go through without that, despite the :hover state changing. 回答1:

Spree 1.3.2 not showing My Account and Login/Logout links, and Spree::User object in console

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-12 01:44:34
问题 I have installed spree 1.3.2 in a new rails project. After bundle install, I ran the spree install cmd, and it ran perfectly fine. After starting the app on my local server, I got the sample data and products. But I am not getting any links related to accounts. e.g. /account, or /login In the console, I get an error when I look for Spree::User Object. I am not able to figure out why is the Object not coming up and why some urls are missing. Can anyone please provide some pointers ? Thanks,

Broken spree_fancy layout on heroku

落花浮王杯 提交于 2019-12-12 01:43:58
问题 I'm a rails newbie. I've install spree and spree fancy on my app. It's ok on development but when I've deployed it on heroku, the layout is broken. Can anyone help me fix this? Question w/ Images: https://github.com/spree/spree_fancy/issues/68 Gemfile: ruby '1.9.3' gem 'rails_12factor', group: :production gem 'rails', '4.0.0' group :production do gem 'pg' end group :development, :test do gem 'sqlite3' end gem 'sass-rails', '~> 4.0.0' gem 'uglifier', '>= 1.3.0' gem 'coffee-rails', '~> 4.0.0'

Remove space between image and border in spree_fancy Rails

﹥>﹥吖頭↗ 提交于 2019-12-12 01:04:08
问题 I'm using spree and spree_fancy to create an e-commerce in Rails. I'm stuck when trying to change some of the design aspects of the spree_fancy gem. At this point I want to use product images with some background (not transparent), but when I use them, there is always a space between the image and the border. I want the image to perfectly fit into the border. I assume that I would need to override some of the scss files. My attempt was to look at this file into the #main-image ID. spree_fancy