My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 108: Entering a faulty shipping address after it has a saved pre-existing billing addresses causes a 500
2 people starred this issue and may be notified of changes. Back to list
Status:  Accepted
Owner:  ----


 
Reported by rogerpack2005, Jul 14, 2008
What steps will reproduce the problem?
1. create an order 
2. do checkout, enter [only] a billing address
3. use back button on your browser
now enter a faulty shipping address.

What is the expected output? What do you see instead?
Should show errors for the shipping address fields.

Shows a 500.

What version of the product are you using? On what operating system?
1.0a3

Appears that adding to update_orders_from post method the 'save!' method [thus]

...
		  if @billing_address == @shipping_address || @shipping_address.nil?
		    @shipping_address =
@order_user.order_addresses.create(params[:shipping_address])
			@shipping_address.save! # raise some errors
		    @order.shipping_address_id = @shipping_address.id
		    result = @order.save! # add this line
			logger.info "results was #{result} from #{@order.inspect}"
		  else
...
overcomes it.
Sorry it's not a real patch :)

Thanks!
Aug 15, 2008
Project Member #1 subim...@gmail.com
(No comment was entered for this change.)
Status: Accepted
Aug 28, 2008
Project Member #2 subim...@gmail.com
(No comment was entered for this change.)
Labels: -Priority-Medium Priority-High
Dec 16, 2008
#3 rogerpack2005
so that's to app\controllers\order_helper.rb

add the line 
@shipping_address.save!
 [near the end].

(This still occurs currently.)
Thanks so much!


Powered by Google Project Hosting