Committing order summary. NO TESTS YET

This commit is contained in:
Will Marshall
2014-02-14 15:18:03 +11:00
parent 09d8e19c35
commit e9178570e9
4 changed files with 51 additions and 18 deletions

View File

@@ -0,0 +1,2 @@
checkout
display: block

View File

@@ -1,6 +1,6 @@
%checkout{"ng-app" => "Checkout", "ng-controller" => "CheckoutCtrl"}
= form_for @order, url: "test" do |f|
.large-8.columns
.large-12.columns
%fieldset#details
%legend Customer Details
.row

View File

@@ -0,0 +1,27 @@
%form
%fieldset
%legend Your Order
%table
%tr
%th Cart subtotal
%td= @order.display_item_total
- checkout_adjustments_for_summary(@order).each do |adjustment|
%tr
%th= adjustment.label
%td= adjustment.display_amount.to_html
%tr
%th Cart total
%td= @order.display_total.to_html
- if @order.price_adjustment_totals.present?
- @order.price_adjustment_totals.each do |label, total|
%tr
%th= label
%td= total
%a.button Purchase

View File

@@ -1,23 +1,27 @@
%checkout.darkswarm
- content_for :order_cycle_form do
%form.custom
%strong.avenir
Order ready on
= pickup_time current_order_cycle
%strong.avenir
Order ready on
= pickup_time current_order_cycle
= render partial: "shop/details"
- unless spree_current_user
.row
%section#checkout_login
.large-4.columns
= render partial: "shop/checkout/login"
%section#checkout_signup
.large-4.columns
= render partial: "shop/checkout/signup"
.large-2.columns
Cart bitches!
.row
= render partial: "shop/checkout/form"
.large-9.columns
- unless spree_current_user
.row
%section#checkout_login
.large-6.columns
= render partial: "shop/checkout/login"
%section#checkout_signup
.large-6.columns
= render partial: "shop/checkout/signup"
.row
= render partial: "shop/checkout/form"
.large-3.columns
.row
= render partial: "shop/checkout/summary"