diff --git a/app/controllers/shop/checkout_controller.rb b/app/controllers/shop/checkout_controller.rb index 71b30848c2..ab8c9fe9bb 100644 --- a/app/controllers/shop/checkout_controller.rb +++ b/app/controllers/shop/checkout_controller.rb @@ -6,7 +6,8 @@ class Shop::CheckoutController < BaseController before_filter :require_line_items def new - + @order = current_order + @order.bill_address = Spree::Address.new end private diff --git a/app/views/shop/checkout/_form.html.haml b/app/views/shop/checkout/_form.html.haml new file mode 100644 index 0000000000..f175b1c84e --- /dev/null +++ b/app/views/shop/checkout/_form.html.haml @@ -0,0 +1,76 @@ += form_for @order, url: "test" do |f| + .large-8.columns + %fieldset#details + %legend Customer Details + .row + .large-6.columns + = f.label :email, "Email Address" + = f.text_field :email + = f.fields_for @order.bill_address do |ba| + .large-6.columns + = ba.label :phone + = ba.text_field :phone + = f.fields_for @order.bill_address do |ba| + .row + .large-6.columns + = ba.label :firstname + = ba.text_field :firstname + .large-6.columns + = ba.label :lastname + = ba.text_field :lastname + + %fieldset + %legend Billing Address + = f.fields_for @order.bill_address do |ba| + .row + .large-12.columns + = ba.label :address1 + = ba.text_field :address1 + .row + .large-12.columns + = ba.label :address2 + = ba.text_field :address2 + .row + .large-6.columns + = ba.label :city + = ba.text_field :city + .large-6.columns + = ba.label :country + = ba.text_field :country + .row + .large-6.columns.right + = ba.label :zipcode + = ba.text_field :zipcode + %fieldset#shipping + %legend Shipping + = fields_for @order.ship_address do |sa| + .row + .large-12.columns + = sa.label :address1 + = sa.text_field :address1 + .row + .large-12.columns + = sa.label :address2 + = sa.text_field :address2 + + .row + .large-6.columns + = sa.label :city + = sa.text_field :city + .large-6.columns + = sa.label :country + = sa.text_field :country + .row + .large-6.columns.right + = sa.label :zipcode + = sa.text_field :zipcode + .row + .large-6.columns + = sa.label :firstname + = sa.text_field :firstname + .large-6.columns + = sa.label :lastname + = sa.text_field :lastname + %fieldset#payment + %legend Payment Details + This looks complicated :/ diff --git a/app/views/shop/checkout/new.html.haml b/app/views/shop/checkout/new.html.haml index 0ea78fdc71..b3f9e0a264 100644 --- a/app/views/shop/checkout/new.html.haml +++ b/app/views/shop/checkout/new.html.haml @@ -3,3 +3,7 @@ = render partial: "shop/checkout/login" %section#checkout_signup = render partial: "shop/checkout/signup" + + += render partial: "shop/checkout/form" +