Git Product home page Git Product logo

spree / spree Goto Github PK

View Code? Open in Web Editor NEW
12.7K 80.0 4.9K 150.9 MB

Open Source eCommerce platform for global brands. An alternative to Shopify, Salesforce Commerce Cloud, Adobe Commerce etc. 🛒

Home Page: https://spreecommerce.org

License: BSD 3-Clause "New" or "Revised" License

Ruby 98.96% JavaScript 0.01% HTML 0.88% Shell 0.16%
spree spreecommerce rails ecommerce e-commerce ruby rubyonrails cart ecommerce-platform store

spree's Introduction

Spree Commerce

Spree Commerce

Open Source e-commerce platform for global brands.

The best alternative to BigCommerce, Magento, Commerce Tools, etc.
Build any eCommerce solution that your business requires.

Slack · Documentation · Website · Roadmap

Gem Total Downloads Slack members

Getting Started

Visit the Quickstart Guide to set up Spree in 5 minutes.

Features

  • Composable
  • Customizable and modular
    • pick and choose parts you want to use
    • customize everything else (storefront, order processing, API, etc)
  • Global Commerce
    • multi-currency
    • multi-language
    • full translation support for products, categories, and more
    • different shipping methods / costs for different regions
    • advanced tax calculation
  • Multi-Store - host multiple brands / stores on one Spree instance with different branding, configuration, payment methods, shipping options, product catalogs etc
  • Multi-vendor marketplace - run your own marketplace with multiple suppliers with dedicated Supplier Dashboard
  • Responsive Admin Panel - manage and curate products, users, orders, returns, shipments & more
  • Orders - robust system for orders, shipments, returns and refunds
  • Carts - comprehensive and advanced discounts system
  • Payments - over 30 payment provider integration out of the box plus API to integrate any other gateway
  • Run everywhere - cloud, VPS, Docker, Kubernetes
  • Battle Tested - used by thousands of merchants around the globe in all categories since 2007!
  • Extensions adding new features to Spree
Spree Admin Dashboard

Community & Contributing

Spree is an open source project and we love contributions in any form - pull requests, issues, feature ideas!

Follow our Contributing Guide

Join our Slack to meet other community members.

Enterprise support

Contact us for enterprise support. We offer migration services, can help with custom development, launch your own Spree applications, optimize your Spree stack, etc.

License

Spree is released under the New BSD License.

spree's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

spree's Issues

DoubleRenderError in CheckoutsController#update

Imported from lighthouse. Original ticket at: http://railsdog.lighthouseapp.com/projects/31096/tickets/1911 - Created by Jhvdb -
Sat May 14 17:05:49 UTC 2011

An error occurs when checking out (payment failed):

AbstractController::DoubleRenderError in CheckoutsController#update

Render and/or redirect were called multiple times in this action. Please note that you may only call render OR redirect, and at most once per action. Also note that neither redirect nor render terminate execution of the action, so if you want to exit an action after redirecting, you need to do something like "redirect_to(...) and return".

I saw all redirect_to functions were replaced by respond_with in the checkout controller:

Updates the order and advances to the next state (when possible.)

def update
if @order.update_attributes(object_params)
if @order.next
state_callback(:after)
else
flash[:error] = I18n.t(:payment_processing_failed)
respond_with(@order, :location => checkout_state_path(@order.state)) and return
end

  if @order.state == "complete" || @order.completed?
    flash[:notice] = I18n.t(:order_processed_successfully)
    flash[:commerce_tracking] = "nothing special"
    respond_with(@order, :location => completion_route)
  else
    respond_with(@order, :location => checkout_state_path(@order.state))
  end
else
  respond_with(@order) { |format| format.html { render :edit } }
end

end

The "and return" statement seems to be ineffective. I figured out that the next respond_with function will be called which explains the DoubleRender error.

Authorization payments should be voided, purchase payments should be credited

Imported from lighthouse. Original ticket at: http://railsdog.lighthouseapp.com/projects/31096/tickets/1844 - Created by Tim Case -
Fri Feb 04 23:15:54 UTC 2011

Spree doesn't check whether a payment was processed as an authorization or a purchase and doesn't show the appropriate reversal action for a given payment. Authorization payments should be displayed with a void button, Purchase payments should be shown with a credit button.

Option to disable SSL on staging

Imported from lighthouse. Original ticket at: http://railsdog.lighthouseapp.com/projects/31096/tickets/1778 - Created by Anton -
Tue Nov 30 07:43:55 UTC 2010

If you don't have a wildcard SSL cert, having a staging is useless, since you can't have two different SSL certificates served from two different passenger isntances through Apache. This patch adds an extra option allowing site admin to disable SSL requirement on staging server.

taxons without trailing slash

Imported from lighthouse. Original ticket at: http://railsdog.lighthouseapp.com/projects/31096/tickets/1878 - Created by humancopy -
Sun Mar 13 15:02:02 UTC 2011

Hey

Our server (and from what I noticed Heroku's also) removes the trailing slash from the taxons' URLs so this t/men/t-shirts/ becomes this t/men/t-shirts

This results a bug in core/app/controllers/taxons_controller.rb line #18 where end_of_association_chain.find_by_permalink(params[:id]) doesn't find the taxon.

I managed to fix it by adding a trailing slash if needed. Patch attached.

Thanks :)

Special_instructions field is not shown

Imported from lighthouse. Original ticket at: http://railsdog.lighthouseapp.com/projects/31096/tickets/1858 - Created by Konstantin -
Tue Feb 22 14:47:57 UTC 2011

It seems that since spree 0.3 special_instructions field was removed from app/views/admin/orders/show.html.erb
Should be fixed by pasting this code at the very end of show.html.erb file

  <% unless @order.special_instructions.blank? %>
    <table class="index">
      <tr>
        <th><%= t("shipping_instructions") %></th>
      </tr>
      <tr>
        <td><pre><%= @order.special_instructions %></pre></td>
      </tr>
    </table>
  <% end %>

Tax Shipping Option

Imported from lighthouse. Original ticket at: http://railsdog.lighthouseapp.com/projects/31096/tickets/1912 - Created by DW -
Sun May 15 02:26:19 UTC 2011

In some states, delivery charges are subject to state sales tax (e.g. Ohio).

Many simple e-commerce sites only have a nexus in one state, so a simple true / false tax shipping option would cover the simple sites, allowing for custom programming for more complex needs.

If there is an interest, I will contribute the following code using the Spree contribution guidelines:

@@@ sales_tax.rb
def compute(order)
rate = self.calculable
line_items = order.line_items.select { |i| i.product.tax_category == rate.tax_category }
total = line_items.inject(0) {|sum, line_item|
sum += line_item.total * rate.amount
}
if Spree::Config[:tax_shipping]
shipping = order.adjustments.find_by_label('shipping')
unless shipping.nil?
total += shipping.amount * rate.amount
end
end
return total
end
@@@

Order cancel button should use confirmation dialog

Imported from lighthouse. Original ticket at: http://railsdog.lighthouseapp.com/projects/31096/tickets/1813 - Created by Brian Buchanan -
Mon Jan 03 19:40:56 UTC 2011

When editing an order, it's easy to accidentally click the cancel button (at the top) by mistake instead of the cancel link (at the bottom). I've already done this twice and then had to send sheepish emails to the customer.

The cancel button should pop up a javascript confirm dialog to give people a chance to catch this mistake before they have to unwind an accidental cancellation. Perhaps the button should also say "Cancel Order", so that its function is differentiated from the "cancel this edit" link at the bottom.

Taking Javascript Out Of <head>

Imported from lighthouse. Original ticket at: http://railsdog.lighthouseapp.com/projects/31096/tickets/1847 - Created by jumph4x -
Sun Mar 20 16:04:51 UTC 2011

Pages requiring custom javascript shouldn't just call a content_for :head. We should have a specific yield for javascript instead.

Javascript not only isn't always in the element of the document, but arguably does not belong there.

For those of us taking the matters into our own hands with custom layouts, it would help tremendously to be able to relocate the 'js' yielder to the footer, where it belongs.

Spree 0.50.0 Error registering calculator Calculator::PriceBucket

Imported from lighthouse. Original ticket at: http://railsdog.lighthouseapp.com/projects/31096/tickets/1888 - Created by karlentwistle -
Sun Apr 03 10:12:57 UTC 2011

I am trying to configure Spree on Heroku, I have the website running offline using thin but every now and again it will throw the error

Error registering calculator Calculator::PriceBucket

I have tried setting config.cache_classes to both on and off

My gem file is configured as shown

source 'http://rubygems.org'

gem 'rails', '3.0.5'
gem 'sqlite3', :group => :development
gem 'aws-s3'

gem 'spree', '0.50.0'
gem 'spree_active_shipping', :git => 'git://github.com/spree/spree_active_shipping.git'
gem 'spree_product_assembly', :git => 'git://github.com/spree/spree-product-assembly.git'
gem 'spree_static_content', :git => 'git://github.com/spree/spree_static_content.git'
gem 'spree_heroku', '1.0.0', :git => 'git://github.com/paxer/spree-heroku.git'

How can I fix this?

Thanks

Issue with spree_store_credits gem - partial credit cart payment and :auto_capture => true

Imported from lighthouse. Original ticket at: http://railsdog.lighthouseapp.com/projects/31096/tickets/1855 - Created by Vincent -
Wed Feb 16 18:18:54 UTC 2011

I'm not sure if it's a Spree or spree_store_credits gem problem, but it's something that really affects our store which we moved into production without properly testing spree_store_credits. I would greatly appreciate any feedback on this problem, we can't process live orders affected by it and I can't find any solution or fix it myself:

If Spree credit card setting :auto_capture is set to true:
Spree::Config.set(:auto_capture => true)
#preference :auto_capture, :boolean, :default => false # automatically capture the creditcard (as opposed to just authorize and capture later)

and someone places an order paying partly with their store credit and partly with a credit card,
that order's payment_state is set to 'balance_due' instead of 'paid' and there's no way to change it in the admin.

Thanks

Countries not sorted by name (edge & postgresql)

Imported from lighthouse. Original ticket at: http://railsdog.lighthouseapp.com/projects/31096/tickets/1863 - Created by Leigh -
Fri Feb 25 08:17:49 UTC 2011

Using spree edge and postgresql the countries as displayed by checkout/_address.html.erb are not sorted by name.

Changing the helper method available_countries as follows fixes the problem.

module Spree::BaseHelper
def available_countries
return Country.order("name asc") unless zone = Zone.find_by_name(Spree::Config[:checkout_zone])
zone.country_list
end
end

behavior of allow_backorders option

Imported from lighthouse. Original ticket at: http://railsdog.lighthouseapp.com/projects/31096/tickets/1880 - Created by robinboening -
Tue Mar 15 16:27:49 UTC 2011

assuming that a product has one item "on_hand", and a user puts 10 items of this product into the basket.
the description of the allow_backorder option says the user gets informed of the shortfall. it does not describe when the user will be informed, but in my opinion, the user should be noticed about that issue just after he puts it into the basket.

But if I do so, i dont get any hints about that until an error is raised after payment state when updating the checkout process.

Inventoryunit#self.create_units
=> raise "Cannot request back orders when backordering is disabled"

Is this Error the information for the user? ;-)
This mustnt be an Error, instead it should be just a notification for the user.
Also the notification should be set much earlier, not after payment state.

official description of allow_backorders:
:allow_backorders (default: true) – when this is false, Spree will only allow items to be added to orders when there is stock. This occurs both in the views (the controls for adding out of stock variants are disabled) and in the underlying models (a variant is only added to an order when there is sufficient stock). When it is true, stock deficiencies are converted to backordered InventoryUnit objects and the user is informed of the shortfall.

Add Product to New Order in Admin causes SQL error

Imported from lighthouse. Original ticket at: http://railsdog.lighthouseapp.com/projects/31096/tickets/1849 - Created by James Thompson -
Wed Feb 09 19:23:31 UTC 2011

When I go to add a new order via the admin interface and begin entering a product name or sku the AJAX search fails with an SQL error related to the LIMIT parameter being passed. The problem appears to be that the AJAX request is setting the limit and that parameter is not being converted to an integer in the controller. If you call Product.limit('10') via the Rails console you get the same kind of SQL error. You could argue this is an issue in AREL, in that it should convert the parameter to something usable in SQL. But this seems like an easy fix to implement in Spree.

Adjusting line 105 for Admin::ProductsController would do the trick.

Wrong vat calcuation

Imported from lighthouse. Original ticket at: http://railsdog.lighthouseapp.com/projects/31096/tickets/1831 - Created by Kacper Bielecki -
Sat Jan 15 14:48:47 UTC 2011

Vat is calculated inproperly.

Currently, vat is added to line item after multiplying the net variant price by the amount of bought items.

It fails for some cases. Let's say we have 1% vat and variant with price 1.2.

One item costs 1.21 (correct)
5 items cost 6.06 (should 1.21 * 5 = 6.05).

Fix has been submitted in thread http://railsdog.lighthouseapp.com/projects/31096/tickets/1516-rounding-error-on-line-item-totals-where-qty-is-greater-than-1 by gstring570. It is still available at: http://pastie.org/1191466 but probably need some testing.

PaymentMethod check hangs in "balance due"

Imported from lighthouse. Original ticket at: http://railsdog.lighthouseapp.com/projects/31096/tickets/1790 - Created by Torsten Rüger -
Wed Dec 08 19:06:26 UTC 2010

using 0.30.1
Only one method of payment configured: PaymentMethod:Check

On a saved order with items and the PaymentMethod:Check there is no way to transfer the order to a Paid status.

There should be a method to enter a date when payment has actually been received. Failing that, some direct way of making the order as paid.

what is the difference between Calculator::Vat and Calculator::SalesTax ?

Imported from lighthouse. Original ticket at: http://railsdog.lighthouseapp.com/projects/31096/tickets/1892 - Created by RainChen -
Wed Apr 06 09:34:08 UTC 2011

I found that the logic of the compute method for these two classes are almost the same.

for Calculator::Vat :
@@@ ruby
sum += (line_item.price * rate.amount * line_item.quantity)
@@@

for Calculator::SalesTax :
@@@ ruby
sum += line_item.total * rate.amount
@@@

and in line_item.rb,
@@@ ruby
def amount
self.price * self.quantity
end
alias total amount
@@@

The result of the compute should be the same.

so what is the difference ?

spree_related_products: Product.to_ary

Imported from lighthouse. Original ticket at: http://railsdog.lighthouseapp.com/projects/31096/tickets/1848 - Created by Robert Wünsch -
Wed Feb 09 16:47:15 UTC 2011

After installing the gem spree_related_products, I opened the /admin/products page in Spree to see this:

@@@
NameError in Admin/products#index

Showing /spree_core-0.40.0/app/views/admin/products/index.html.erb where line #37 raised:

undefined local variable or method `to_ary' for #Product:0x00000104755e68
Extracted source (around line #37):

34: <% end %>
35:
36: <%= hook :admin_products_index_row_actions, locals do %>
37: <%= link_to_edit product unless product.deleted? %>
38:  
39: <%= link_to_clone product %>
40:  

Full Trace:
activemodel (3.0.3) lib/active_model/attribute_methods.rb:364:in method_missing' activerecord (3.0.3) lib/active_record/attribute_methods.rb:46:inmethod_missing'
spree_related_products/lib/spree_related_products.rb:22:in method_missing' rd_resource_controller (1.0.0) lib/urligence.rb:36:inflatten'
rd_resource_controller (1.0.0) lib/urligence.rb:36:in urligence' rd_resource_controller (1.0.0) lib/urligence.rb:4:insmart_url'
rd_resource_controller (1.0.0) lib/resource_controller/helpers/urls.rb:48:in block (2 levels) in <module:Urls>' actionpack (3.0.3) lib/abstract_controller/helpers.rb:55:inedit_object_url'
spree_core (0.40.0) app/helpers/admin/navigation_helper.rb:43:in `link_to_edit'
@@@

This problem seems to be initiated here:
spree_related_products/lib/spree_related_products.rb:22:in `method_missing'

Could not run spree_core:upgrade

Imported from lighthouse. Original ticket at: http://railsdog.lighthouseapp.com/projects/31096/tickets/1840 - Created by Peter Zlatnar -
Fri Jan 28 03:43:58 UTC 2011

I am using 0.40.2v gem of spree. And when I was trying to upgrade core and run rails g spree_core:upgrade I get:

@@@
Could not find "db" in any of your source paths. Your current source paths are:
/Users/peter/Projects/myproject/lib/templates/spree_core/upgrade
/Users/peter/.rvm/gems/ruby-1.8.7-p302/gems/spree_core-0.40.2/lib/generators/templates
@@@

Cannot request back orders when backordering is disabled

Imported from lighthouse. Original ticket at: http://railsdog.lighthouseapp.com/projects/31096/tickets/1894 - Created by dedhaz -
Sat Apr 09 21:21:13 UTC 2011

Spree 0.60.99 (but the same is in 0.40.xx, 0.50.xx)
In Admin config Inventory Settings - Backordering not allowed.
But if I trying to add to cart more items than I have in stock, I can do it at any moment without any errors (from item view or from cart).
After that I can go to checkout and make order. But in final view (/checkout/update/payment), after payment procedure I see page with error.

RuntimeError in CheckoutsController#update
Cannot request back orders when backordering is disabled

Request

Parameters:

{"utf8"=>"вњ“",
"_method"=>"put",
"authenticity_token"=>"q7xqrle/HF8BdgY3bM1UZhWu074aEkStjry0Z8NApoo=",
"order"=>{"payments_attributes"=>[{"payment_method_id"=>"1",
"amount"=>#<BigDecimal:f21f9d0,
'0.472E3',
4(12)>}]},
"state"=>"payment"}

After that (in cusomer view) I have not empty cart, and I can't empty cart by pressing button.
If I try to do this...

NoMethodError in OrdersController#empty
You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.sort_by

Request

Parameters:

{"utf8"=>"вњ“",
"_method"=>"put",
"authenticity_token"=>"q7xqrle/HF8BdgY3bM1UZhWu074aEkStjry0Z8NApoo="}

In admin view, in orders I see complete order with backorder:
2011-04-09 R813778007 complete balance due

Also when I trying to delete items from order there is nothig do (visual), but deleted backorders items add to item qty.
For example.
I have 1 item in stock.
Customer make order with 3 items (with error screen).
After taht I have -2 items on hand.
Admin trying delete items from this order.
I have in stock 1 items.
Admin cant see any change sin order screen, press second time button.
After that I have 4 items on hand.

rspec failed for api extension with ruby 1.9.2

Imported from lighthouse. Original ticket at: http://railsdog.lighthouseapp.com/projects/31096/tickets/1883 - Created by Trung Lê -
Thu Mar 24 01:04:40 UTC 2011

Tested with ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-darwin10.6.0]. The rspec tests failed whilst passed with ruby 1.8.7.

@@@

$ rake spec
FF.........

Failures:

  1. Admin::UsersController#generate_api_key should generate a 20 char SHA key
    Failure/Error: put :generate_api_key, {:id => 1}
    Mock "User_1002" received unexpected message :to_ary with (no args)

    ./app/controllers/admin/users_controller_decorator.rb:9:in `generate_api_key'

    ./spec/controllers/admin/users_controller_spec.rb:15:in`block (3 levels) in <top (required)>'

  2. Admin::UsersController#clear_api_key should remove the existing api_key
    Failure/Error: put :clear_api_key, {:id => 1}
    Mock "User_1004" received unexpected message :to_ary with (no args)

    ./app/controllers/admin/users_controller_decorator.rb:16:in `clear_api_key'

    ./spec/controllers/admin/users_controller_spec.rb:23:in`block (3 levels) in <top (required)>'

Finished in 0.74563 seconds
11 examples, 2 failures

@@@

CheckoutController#update callback uses incorrect state

Imported from lighthouse. Original ticket at: http://railsdog.lighthouseapp.com/projects/31096/tickets/1867 - Created by Josh McArthur -
Tue Mar 01 22:36:00 UTC 2011

This is my first ticket, so hopefully I tick all the right boxes.

When using state_machine with Spree, there seems to be a transactional issue where the after_state callback in the update action of the Checkout Controller is using the new state, not the previous one (As we would expect with an after_ callback.

Just to make this a little clearer, if the checkout is moving from the 'Address' state to the 'Delivery' state, here is roughly what happens:

  • order is updated (Address state)
  • order.next is called to move state. This:
    • Runs state_machine before_ callbacks (Address state)
    • Advances the state if order.save is successful (Address -> Delivery)
    • Runs state_machine after_ callbacks (Delivery state)
  • Spree calls after_state callback. (Results in after_delivery)

The expected behavior here is for before_state callbacks to use the newly updated state (i.e. before_delivery), but after_state callbacks to use the previous - i.e. above example should call after_address, not after_delivery. Of course, in this case this only applies to after_ callbacks in the update action.

[ 0.50.2 ] Empty Cart --- TypeError (nil can't be coerced into BigDecimal):

Imported from lighthouse. Original ticket at: http://railsdog.lighthouseapp.com/projects/31096/tickets/1908 - Created by Alfredo Cerutti -
Tue May 10 08:35:15 UTC 2011

ruby: 1.9.2-p0
rails: 3.0.7 (mysql2)
spree: 0.50.2

When trying to empty a cart I get this error:

TypeError (nil can't be coerced into BigDecimal):

here below the full stack trace

activesupport (3.0.7) lib/active_support/core_ext/enumerable.rb:61:in +' activesupport (3.0.7) lib/active_support/core_ext/enumerable.rb:61:inblock in sum'
activesupport (3.0.7) lib/active_support/core_ext/enumerable.rb:61:in each' activesupport (3.0.7) lib/active_support/core_ext/enumerable.rb:61:ininject'
activesupport (3.0.7) lib/active_support/core_ext/enumerable.rb:61:in sum' spree_promo (0.50.2) lib/spree_promo.rb:58:inupdate_totals'
spree_core (0.50.2) app/models/order.rb:143:in update!' activerecord (3.0.7) lib/active_record/associations/association_proxy.rb:222:inmethod_missing'
spree_core (0.50.2) app/models/line_item.rb:85:in update_order' activesupport (3.0.7) lib/active_support/callbacks.rb:426:in_run_destroy_callbacks'
activerecord (3.0.7) lib/active_record/callbacks.rb:256:in destroy' activerecord (3.0.7) lib/active_record/transactions.rb:235:inblock in destroy'
activerecord (3.0.7) lib/active_record/transactions.rb:292:in block in with_transaction_returning_status' activerecord (3.0.7) lib/active_record/connection_adapters/abstract/database_statements.rb:139:intransaction'
activerecord (3.0.7) lib/active_record/transactions.rb:207:in transaction' activerecord (3.0.7) lib/active_record/transactions.rb:290:inwith_transaction_returning_status'
activerecord (3.0.7) lib/active_record/transactions.rb:235:in destroy' activerecord (3.0.7) lib/active_record/associations/association_collection.rb:237:inblock (2 levels) in destroy'
activerecord (3.0.7) lib/active_record/associations/association_collection.rb:237:in each' activerecord (3.0.7) lib/active_record/associations/association_collection.rb:237:inblock in destroy'
activerecord (3.0.7) lib/active_record/associations/association_collection.rb:526:in block in remove_records' activerecord (3.0.7) lib/active_record/associations/association_collection.rb:158:inblock in transaction'
activerecord (3.0.7) lib/active_record/connection_adapters/abstract/database_statements.rb:139:in transaction' activerecord (3.0.7) lib/active_record/transactions.rb:207:intransaction'
activerecord (3.0.7) lib/active_record/associations/association_collection.rb:157:in transaction' activerecord (3.0.7) lib/active_record/associations/association_collection.rb:523:inremove_records'
activerecord (3.0.7) lib/active_record/associations/association_collection.rb:236:in destroy' activerecord (3.0.7) lib/active_record/associations/association_collection.rb:261:indestroy_all'
spree_core (0.50.2) app/controllers/orders_controller.rb:54:in empty' actionpack (3.0.7) lib/action_controller/metal/implicit_render.rb:5:insend_action'
actionpack (3.0.7) lib/abstract_controller/base.rb:150:in process_action' actionpack (3.0.7) lib/action_controller/metal/rendering.rb:11:inprocess_action'
actionpack (3.0.7) lib/abstract_controller/callbacks.rb:18:in block in process_action' activesupport (3.0.7) lib/active_support/callbacks.rb:461:in_run__3896677554925581840__process_action__1058213590917365044__callbacks'
activesupport (3.0.7) lib/active_support/callbacks.rb:410:in _run_process_action_callbacks' activesupport (3.0.7) lib/active_support/callbacks.rb:94:inrun_callbacks'
actionpack (3.0.7) lib/abstract_controller/callbacks.rb:17:in process_action' actionpack (3.0.7) lib/action_controller/metal/instrumentation.rb:30:inblock in process_action'
activesupport (3.0.7) lib/active_support/notifications.rb:52:in block in instrument' activesupport (3.0.7) lib/active_support/notifications/instrumenter.rb:21:ininstrument'
activesupport (3.0.7) lib/active_support/notifications.rb:52:in instrument' actionpack (3.0.7) lib/action_controller/metal/instrumentation.rb:29:inprocess_action'
actionpack (3.0.7) lib/action_controller/metal/rescue.rb:17:in process_action' actionpack (3.0.7) lib/abstract_controller/base.rb:119:inprocess'
actionpack (3.0.7) lib/abstract_controller/rendering.rb:41:in process' actionpack (3.0.7) lib/action_controller/metal.rb:138:indispatch'
actionpack (3.0.7) lib/action_controller/metal/rack_delegation.rb:14:in dispatch' actionpack (3.0.7) lib/action_controller/metal.rb:178:inblock in action'
actionpack (3.0.7) lib/action_dispatch/routing/route_set.rb:62:in call' actionpack (3.0.7) lib/action_dispatch/routing/route_set.rb:62:indispatch'
actionpack (3.0.7) lib/action_dispatch/routing/route_set.rb:27:in call' rack-mount (0.6.14) lib/rack/mount/route_set.rb:148:inblock in call'
rack-mount (0.6.14) lib/rack/mount/code_generation.rb:93:in block in recognize' rack-mount (0.6.14) lib/rack/mount/code_generation.rb:82:inoptimized_each'
rack-mount (0.6.14) lib/rack/mount/code_generation.rb:92:in recognize' rack-mount (0.6.14) lib/rack/mount/route_set.rb:139:incall'
actionpack (3.0.7) lib/action_dispatch/routing/route_set.rb:493:in call' spree_core (0.50.2) lib/middleware/seo_assist.rb:23:incall'
spree_core (0.50.2) lib/redirect_legacy_product_url.rb:10:in call' warden (1.0.3) lib/warden/manager.rb:35:inblock in call'
warden (1.0.3) lib/warden/manager.rb:34:in catch' warden (1.0.3) lib/warden/manager.rb:34:incall'
actionpack (3.0.7) lib/action_dispatch/middleware/best_standards_support.rb:17:in call' actionpack (3.0.7) lib/action_dispatch/middleware/head.rb:14:incall'
rack (1.2.2) lib/rack/methodoverride.rb:24:in call' actionpack (3.0.7) lib/action_dispatch/middleware/params_parser.rb:21:incall'
actionpack (3.0.7) lib/action_dispatch/middleware/flash.rb:182:in call' actionpack (3.0.7) lib/action_dispatch/middleware/session/abstract_store.rb:149:incall'
actionpack (3.0.7) lib/action_dispatch/middleware/cookies.rb:302:in call' activerecord (3.0.7) lib/active_record/query_cache.rb:32:inblock in call'
activerecord (3.0.7) lib/active_record/connection_adapters/abstract/query_cache.rb:28:in cache' activerecord (3.0.7) lib/active_record/query_cache.rb:12:incache'
activerecord (3.0.7) lib/active_record/query_cache.rb:31:in call' activerecord (3.0.7) lib/active_record/connection_adapters/abstract/connection_pool.rb:354:incall'
actionpack (3.0.7) lib/action_dispatch/middleware/callbacks.rb:46:in block in call' activesupport (3.0.7) lib/active_support/callbacks.rb:416:in_run_call_callbacks'
actionpack (3.0.7) lib/action_dispatch/middleware/callbacks.rb:44:in call' rack (1.2.2) lib/rack/sendfile.rb:107:incall'
actionpack (3.0.7) lib/action_dispatch/middleware/remote_ip.rb:48:in call' actionpack (3.0.7) lib/action_dispatch/middleware/show_exceptions.rb:47:incall'
railties (3.0.7) lib/rails/rack/logger.rb:13:in call' rack (1.2.2) lib/rack/runtime.rb:17:incall'
activesupport (3.0.7) lib/active_support/cache/strategy/local_cache.rb:72:in call' rack (1.2.2) lib/rack/lock.rb:11:inblock in call'
internal:prelude:10:in synchronize' rack (1.2.2) lib/rack/lock.rb:11:incall'
actionpack (3.0.7) lib/action_dispatch/middleware/static.rb:30:in call' railties (3.0.7) lib/rails/application.rb:168:incall'
railties (3.0.7) lib/rails/application.rb:77:in method_missing' /home/dot79/.passenger/standalone/3.0.5-x86_64-ruby1.9.2-linux-gcc4.5.2-1002/support/lib/phusion_passenger/rack/request_handler.rb:96:inprocess_request'
/home/dot79/.passenger/standalone/3.0.5-x86_64-ruby1.9.2-linux-gcc4.5.2-1002/support/lib/phusion_passenger/abstract_request_handler.rb:513:in accept_and_process_next_request' /home/dot79/.passenger/standalone/3.0.5-x86_64-ruby1.9.2-linux-gcc4.5.2-1002/support/lib/phusion_passenger/abstract_request_handler.rb:274:inmain_loop'
/home/dot79/.passenger/standalone/3.0.5-x86_64-ruby1.9.2-linux-gcc4.5.2-1002/support/lib/phusion_passenger/rack/application_spawner.rb:205:in start_request_handler' /home/dot79/.passenger/standalone/3.0.5-x86_64-ruby1.9.2-linux-gcc4.5.2-1002/support/lib/phusion_passenger/rack/application_spawner.rb:170:inblock in handle_spawn_application'
/home/dot79/.passenger/standalone/3.0.5-x86_64-ruby1.9.2-linux-gcc4.5.2-1002/support/lib/phusion_passenger/utils.rb:479:in safe_fork' /home/dot79/.passenger/standalone/3.0.5-x86_64-ruby1.9.2-linux-gcc4.5.2-1002/support/lib/phusion_passenger/rack/application_spawner.rb:165:inhandle_spawn_application'
/home/dot79/.passenger/standalone/3.0.5-x86_64-ruby1.9.2-linux-gcc4.5.2-1002/support/lib/phusion_passenger/abstract_server.rb:357:in server_main_loop' /home/dot79/.passenger/standalone/3.0.5-x86_64-ruby1.9.2-linux-gcc4.5.2-1002/support/lib/phusion_passenger/abstract_server.rb:206:instart_synchronously'
/home/dot79/.passenger/standalone/3.0.5-x86_64-ruby1.9.2-linux-gcc4.5.2-1002/support/lib/phusion_passenger/abstract_server.rb:180:in start' /home/dot79/.passenger/standalone/3.0.5-x86_64-ruby1.9.2-linux-gcc4.5.2-1002/support/lib/phusion_passenger/rack/application_spawner.rb:128:instart'
/home/dot79/.passenger/standalone/3.0.5-x86_64-ruby1.9.2-linux-gcc4.5.2-1002/support/lib/phusion_passenger/spawn_manager.rb:253:in block (2 levels) in spawn_rack_application' /home/dot79/.passenger/standalone/3.0.5-x86_64-ruby1.9.2-linux-gcc4.5.2-1002/support/lib/phusion_passenger/abstract_server_collection.rb:132:inlookup_or_add'
/home/dot79/.passenger/standalone/3.0.5-x86_64-ruby1.9.2-linux-gcc4.5.2-1002/support/lib/phusion_passenger/spawn_manager.rb:246:in block in spawn_rack_application' /home/dot79/.passenger/standalone/3.0.5-x86_64-ruby1.9.2-linux-gcc4.5.2-1002/support/lib/phusion_passenger/abstract_server_collection.rb:82:inblock in synchronize'
internal:prelude:10:in synchronize' /home/dot79/.passenger/standalone/3.0.5-x86_64-ruby1.9.2-linux-gcc4.5.2-1002/support/lib/phusion_passenger/abstract_server_collection.rb:79:insynchronize'
/home/dot79/.passenger/standalone/3.0.5-x86_64-ruby1.9.2-linux-gcc4.5.2-1002/support/lib/phusion_passenger/spawn_manager.rb:244:in spawn_rack_application' /home/dot79/.passenger/standalone/3.0.5-x86_64-ruby1.9.2-linux-gcc4.5.2-1002/support/lib/phusion_passenger/spawn_manager.rb:137:inspawn_application'
/home/dot79/.passenger/standalone/3.0.5-x86_64-ruby1.9.2-linux-gcc4.5.2-1002/support/lib/phusion_passenger/spawn_manager.rb:275:in handle_spawn_application' /home/dot79/.passenger/standalone/3.0.5-x86_64-ruby1.9.2-linux-gcc4.5.2-1002/support/lib/phusion_passenger/abstract_server.rb:357:inserver_main_loop'
/home/dot79/.passenger/standalone/3.0.5-x86_64-ruby1.9.2-linux-gcc4.5.2-1002/support/lib/phusion_passenger/abstract_server.rb:206:in start_synchronously' /home/dot79/.passenger/standalone/3.0.5-x86_64-ruby1.9.2-linux-gcc4.5.2-1002/support/helper-scripts/passenger-spawn-server:99:in

'

Order History event duplication

Imported from lighthouse. Original ticket at: http://railsdog.lighthouseapp.com/projects/31096/tickets/1907 - Created by Trung Lê -
Sun May 08 00:15:31 UTC 2011

Steps to re-produce

  1. Login into admin/orders
  2. Edit one particular order that hasn't been paid and shipped
  3. Capture the payment
  4. Go to Shipment and Ship the order
  5. Go to History tab
  6. Observe:
Event       From State    To State  User                    Date/Time
Payment     balance due   paid          [email protected]   2011-05-08 00:16:39 UTC
Shipment    pending       ready     [email protected]   2011-05-08 00:16:39 UTC
Shipment    ready     shipped   [email protected]   2011-05-08 00:17:14 UTC
Shipment    ready     shipped   [email protected]   2011-05-08 00:17:14 UTC

you can see that we have 2 Shipment ready (shipped), should be one

Investigation:

When we Ship the shipment, the Order get update!:

# core/app/model/order/rb

def update!
  ...
  shipments.each { |shipment| shipment.update!(self) }
  update_shipment_state
  ..
end

The shipment get update! first, when the update is done at Shipment model, the after_save :update_order kicks in:

# core/app/model/shipment.rb

after_save :ensure_correct_adjustment, :update_order


def update_order
  order.update!
end

and the order.update! get invoked which then invoke Order::update_shipment_state first. Then later once the shipments are all updated, the Order::update_shipment_state invoked once more time which create duplication.

Problem with currency separators on product prices in the admin section

Imported from lighthouse. Original ticket at: http://railsdog.lighthouseapp.com/projects/31096/tickets/1882 - Created by Edmundo -
Tue Mar 15 21:37:54 UTC 2011

The product form of the admin interface is using a helper to fill the currency values inside text fields of the form. The helper is number_with_precision. In other countries the separator can be different making the value be filled wrong becaused of the helper.

So, or you don't use helpers that changes the value depending of the locale of you need to take that into consideration when you receive the params on the product update.

Example.

In Brazil a price is in this form R$ 1.200,00. (the separators are inverted from US).
It ends up showing a 19,99 price for a product. And this is not a default valid currency value unless you expect to receive a price="19,99" in the params (this is a valid string but not a valid numeric value).

User's shiping and billing addresses not remembered after order

Imported from lighthouse. Original ticket at: http://railsdog.lighthouseapp.com/projects/31096/tickets/1730 - Created by Adam Wróbel -
Fri Nov 05 19:04:19 UTC 2010

I'm working with the code from spree/master (upcoming 0.30.0.beta2) and rails 3.0.1. When I place an order as a registered user my shipping and billing are not saved as user's default addresses. I'm placing another order and the whole address form is blank again. Checked my db and shipping_address_id and billing_address_id in users table are null.

Product group counts deleted products in admin panel

Imported from lighthouse. Original ticket at: http://railsdog.lighthouseapp.com/projects/31096/tickets/1842 - Created by Roman Smirnov -
Thu Feb 03 22:25:57 UTC 2011

In admin panel count of products in product group displayed based on all products, including inactive. But in frontend we naturally see only active products inside product group.
I think, that it can be little confusing. So ProductGroup#generate_preview should be based on active products.

Shipping and payment states no longer reflected in order state machine

Imported from lighthouse. Original ticket at: http://railsdog.lighthouseapp.com/projects/31096/tickets/1600 - Created by schof -
Tue Aug 17 15:29:14 UTC 2010

Add two new order fields (shipment_state, payment_state) for reporting purposes. Now that the shipment status is not reflected in the order state it will be helpful to know when there is an outstanding shipping or payment issue to be resolved.

Add new @order#backordered?@ method to indicate presence of backordered inventory units in the order

Bug(?) in spree_static_content prevents multiple class_eval calls

Imported from lighthouse. Original ticket at: http://railsdog.lighthouseapp.com/projects/31096/tickets/1897 - Created by joshuap -
Mon Apr 18 02:03:04 UTC 2011

I am trying to add a before_filter call to Spree::BaseController from my rails app via a class_eval in a _decorator file. I have the following code in app/controllers/spree/base_controller_decorator.rb:

@@@ ruby
Spree::BaseController.class_eval do
before_filter :handle_request_format

private
  def handle_request_format
    request.format = :js if request.xhr?
  end

end
@@@

This works fine for every controller that inherits from Spree::BaseController except StaticContentController. I tracked the issue to line 4 of spree_static_content/app/controllers/spree/base_controller_decorator.rb, where it loads the products helper:

@@@ ruby
helper :products
@@@

When I remove/comment out line 4, both handle_request_format and render_page_if_exists are executed on before_filter. Of course, everything fails from that point because the seo_url method is not available without including the products helper. It took me a long time to track this down and I may be close to the solution, but I figured you guys might be able to help faster than I can troubleshoot :). Thanks in advance!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.