mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-02 02:11:33 +00:00
Patching up some more address bugs
This commit is contained in:
@@ -20,9 +20,11 @@ Spree::Order.class_eval do
|
||||
go_to_state :delivery
|
||||
go_to_state :payment, :if => lambda { |order|
|
||||
# Fix for #2191
|
||||
if order.shipping_method.andand.require_ship_address and order.ship_address
|
||||
order.create_shipment!
|
||||
order.update_totals
|
||||
if order.shipping_method.andand.require_ship_address and
|
||||
if order.ship_address.andand.valid?
|
||||
order.create_shipment!
|
||||
order.update_totals
|
||||
end
|
||||
end
|
||||
order.payment_required?
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
= f.text_field :email
|
||||
= f.fields_for :bill_address, @order.bill_address do |ba|
|
||||
.large-6.columns
|
||||
= ba.text_field :phone
|
||||
= ba.text_field :phone, "ng-model" => "order.bill_address.phone"
|
||||
= f.fields_for :bill_address, @order.bill_address do |ba|
|
||||
.row
|
||||
.large-6.columns
|
||||
@@ -99,6 +99,7 @@
|
||||
= sa.hidden_field :zipcode, "ng-value" => "order.bill_address.zipcode"
|
||||
= sa.hidden_field :firstname, "ng-value" => "order.bill_address.firstname"
|
||||
= sa.hidden_field :lastname, "ng-value" => "order.bill_address.lastname"
|
||||
= sa.hidden_field :phone, "ng-value" => "order.bill_address.phone"
|
||||
|
||||
%fieldset#payment
|
||||
%legend Payment Details
|
||||
|
||||
Reference in New Issue
Block a user