jsqu99 / spree_flexi_variants

Spree extension to create product variants as-needed
BSD 3-Clause "New" or "Revised" License
116 stars 143 forks source link

NoMethodError in Spree::UserSessionsController#create #99

Open nefarianblack opened 10 years ago

nefarianblack commented 10 years ago

NoMethodError in Spree::UserSessionsController#create undefined method `quantity' for true:TrueClass

How to reproduce:

  1. disable checkout without registration
  2. add Spree Login as Existing form in registration.html.erb (so that existing users can login right in the checkout process)
  3. select a product -> add to cart -> checkout -> registration page
  4. try logging in with a registered account
  5. error shows up

Resolution: file: order_decorator.rb line no. 4 current_item = contains?(variant, ad_hoc_option_value_ids, product_customizations)

change this to: current_item = find_line_item_by_variant(variant, ad_hoc_option_value_ids, product_customizations)

Note: I have created a pull request for the issue (https://github.com/jsqu99/spree_flexi_variants/pull/100).