
adding product with option_variations to cart from product list
Reported by joep | August 12th, 2010 @ 07:37 PM
results in exception. Probably should be sent to details page with message?
To repeat: Create a product with options, go to main shop page with the product list, and try to add the item to the cart.
Processing PageController#index (for 192.168.0.3 at 2010-08-12
17:28:08) [POST]
Parameters: {"action"=>"index",
"authenticity_token"=>"OVoI9LNwBKdy3NiNb3/HkdXZP+tZkNNkjLsVQRVWlBY=",
"shop374"=>{"action"=>"add_to_cart", "product"=>"6"},
"path"=>["shop"], "controller"=>"page", "go"=>"Add to
Cart"}
. . .
NoMethodError (You have a nil object when you didn't expect
it!
You might have expected an instance of ActiveRecord::Base.
The error occurred while evaluating nil.[]):
vendor/modules/shop/app/controllers/shop/page_renderer.rb:291:in
handle_shop_action'
vendor/modules/shop/app/controllers/shop/page_renderer.rb:290:in
handle_shop_action'
vendor/modules/shop/app/controllers/shop/page_renderer.rb:22:in
product_listing' lib/site_node_engine.rb:187:in
send'
lib/site_node_engine.rb:187:in render_module_paragraph'
lib/site_node_engine.rb:150:in
compile_paragraph'
lib/site_node_engine.rb:679:in run'
lib/site_node_engine.rb:667:in
each'
lib/site_node_engine.rb:667:in run'
lib/site_node_engine.rb:665:in
each'
lib/site_node_engine.rb:665:in run'
app/controllers/module_app_controller.rb:122:in
handle_page'
Comments and changes to this ticket
-
Pascal Rettig August 13th, 2010 @ 09:35 AM
- State changed from new to open
Good catch - quick is to take users to detail page if the product has options.
-
Pascal Rettig August 14th, 2010 @ 01:06 PM
- State changed from open to resolved
Put fix in to prevent exception, will leave use on the list page without action - redirect to the detail page is TODO
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป