Closed GoogleCodeExporter closed 8 years ago
Original comment by subim...@gmail.com
on 16 Aug 2008 at 3:43
I think I fixed this but now I need to figure out how to make a patch quick.
all this does is prevent you from saving if you delete all the rates. I'll try
to
come up with a more robust solution.
this is what I did:
def save_shipping
# Index is the shipping type ID.
if(params[:shipping_types].nil?)
flash[:notice] = "Please Add At least one Shipping rate."
redirect_to :action => 'shipping'
else
params[:shipping_types].each do |id,type_attributes|
type = OrderShippingType.find(id)
type.update_attributes(type_attributes)
end
flash[:notice] = "Shipping Rates Saved."
redirect_to :action => 'shipping'
end
end
Original comment by sclarkla...@gmail.com
on 26 Aug 2008 at 9:45
That work-around will work in preventing a crash from happening. What about
adding a
prompt so that the administrator can add a zero dollar shipping rate if they
don't
want shipping? (you run into that with a website that sells only downloads, or
runs
on donations)
Original comment by charles....@gmail.com
on 27 Aug 2008 at 5:07
Fixed in r150.
I ensured there is no error saving rates, and no errors happens on the store
side
during checkout.
Still this poses an interesting design discussion. Perhaps we should be able to
eliminate the shipping step all together if there are no rates, or through
preferences.
Original comment by subim...@gmail.com
on 29 Aug 2008 at 4:29
Original issue reported on code.google.com by
charles....@gmail.com
on 14 May 2008 at 2:04