spree

Spree, Rails 3, and theming

别说谁变了你拦得住时间么 提交于 2019-12-03 09:45:42
问题 Well, I've been trying to change the default theme of spree by following this tutorial http://blog.endpoint.com/2010/01/rails-ecommerce-spree-hooks-tutorial.html But the homepage doesn't change at all, well since the tutorial is meant for rails 2, I'm just wondering what do I need to change from the tutorial to make it work with rails 3? Simpler solution than using hooks is welcomed. Also while I'm at it, is there a way to undo the command you run in rails like maybe uninstalling an extension

Does Spree shop support multiple vendors to buy from?

狂风中的少年 提交于 2019-12-03 08:43:30
Hi i need a shop software where i can offer products from different vendors. e.g. one could buy a watch from 3 different vendors for different prices. Amazon does this too. (see http://www.amazon.de/gp/offer-listing/B0031SZRZG/ref=dp_olp_new?ie=UTF8&condition=new ) Are there any plugins for that in Spree? Yep spree has plugin for spree multi vendor ,spree multi store as well spree multi tenant spree multistore https://github.com/bullrico/spree-multistore spree multi tenant https://github.com/stefansenk/spree_multi_tenant spree multi vendor https://github.com/chamnap/spree-multi-vendor or you

Spree overriding helper method

二次信任 提交于 2019-12-03 05:14:46
I'm trying to overriding a helper method of base_helper.rb by using this: module Spree module BaseHelper.class_eval do def taxons_tree(root_taxon, current_taxon, max_level = 1) ..... end end end It's not working for me. Anyone know what I am missing here? Thank you! Fixed: I should use: Spree::BaseHelper.module_eval do def taxons_tree(root_taxon, current_taxon, max_level = 1) ... end end instead. Re-opening the module will work just as well: module Spree module BaseHelper def taxons_tree(root_taxon, current_taxon, max_level = 1) ... end end end There's no particular reason to use class_eval

Spree, Rails 3, and theming

做~自己de王妃 提交于 2019-12-03 00:19:16
Well, I've been trying to change the default theme of spree by following this tutorial http://blog.endpoint.com/2010/01/rails-ecommerce-spree-hooks-tutorial.html But the homepage doesn't change at all, well since the tutorial is meant for rails 2, I'm just wondering what do I need to change from the tutorial to make it work with rails 3? Simpler solution than using hooks is welcomed. Also while I'm at it, is there a way to undo the command you run in rails like maybe uninstalling an extension. Rytis Lukoševičius The solution that worked for me was to create my own extension say 'site' with

What does this Rails Engine code mean: config.to_prepare &method(:activate).to_proc

↘锁芯ラ 提交于 2019-12-02 18:16:32
I'm working with Spree, which uses Rails engines extensively. A common pattern I find is this. However I have trouble understanding this code. class Engine < Rails::Engine def self.activate ... end config.to_prepare &method(:activate).to_proc end What does .to_prepare do What does the &method operator do? What is the overall effect of the code? Many Thanks! &method(:activate).to_proc This is best consumed one item at a time. (It should be noted that this portion of the code is 100% non -Rails-specific Ruby.) method is a Ruby method (it's all very meta). It is documented thusly : Looks up the

Spree Mail Method is not working?

和自甴很熟 提交于 2019-12-02 06:39:06
In spree admin panel under configuration menu, I configured mail smtp, port and etc., after creating new mail method I press test mail button, I got following alert message "Testmail sent successfully" and even terminal window also display email send successfully message but the mail is not delivered to the corresponding address Console log after sending test mail Sent mail to abc@xyz.com (5ms) Date: Wed, 12 Jun 2013 03:11:43 -0700 From: test@spree.com To: abc@xyz.com Message-ID: <************************> Subject: [["message"]] Spree Demo Site Testmail Mime-Version: 1.0 Content-Type: text

How to access Rails Engines methods from main application?

喜欢而已 提交于 2019-12-01 22:39:03
I'm trying to use the current_order method defined in the Spree::Core engine: https://github.com/spree/spree/blob/master/core/lib/spree/core/current_order.rb In my view, I've tried Spree::Core::CurrentOrder.current_order Using just "current_order" in development works fine though, but not in production. So then I've tried to require it in my views file like this: require 'spree/core/current_order' I've also tried permutations of these other solutions: How to incorporate Rails Engine ApplicationController methods in a main app? A way to add before_filter from engine to application Rails 3.1:

Setting default_url_options for mounted Rails engine

爱⌒轻易说出口 提交于 2019-11-30 15:30:29
Using rails 3.2.13 and spree 2.0.2 I've encountered the similar problem as in Rails mountable engine under a dynamic scope My routes: scope ':locale', locale: /en|jp/ do mount Spree::Core::Engine, at: '/store' root to: 'home#index' end I want to output link to change locale: <%= link_to 'JP', url_for(locale: :jp) %> but this outputs: <a href="/en/store/?locale=jp">JP</a> instead of expected: <a href="/jp/store">JP</a> -- Edit -- When I put to ApplicationController : def default_url_options(options={}) { locale: I18n.locale } end it sets locale params in store twice instead of merging them:

How to add new view to Ruby on Rails Spree commerce app?

人盡茶涼 提交于 2019-11-30 09:48:46
A very basic question that I cannot seem to solve is how to add a new view to my Ruby on Rails Spree commerce application. What I want to do is have a link next to the Home link in the _main_nav_bar.html.erb and when you click it have displayed an about page at the place where the products are displayed. So: home about cart --------------------- things of the HOME page --------------------- footer Click on about leads to: home about cart --------------------- things of the ABOUT page --------------------- footer In views/shared/_main_nav_bar.html.erb the link I created (based on the home link)

Setting default_url_options for mounted Rails engine

流过昼夜 提交于 2019-11-29 22:02:35
问题 Using rails 3.2.13 and spree 2.0.2 I've encountered the similar problem as in Rails mountable engine under a dynamic scope My routes: scope ':locale', locale: /en|jp/ do mount Spree::Core::Engine, at: '/store' root to: 'home#index' end I want to output link to change locale: <%= link_to 'JP', url_for(locale: :jp) %> but this outputs: <a href="/en/store/?locale=jp">JP</a> instead of expected: <a href="/jp/store">JP</a> -- Edit -- When I put to ApplicationController : def default_url_options