mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Committing order summary. NO TESTS YET
This commit is contained in:
2
app/assets/stylesheets/darkswarm/checkout.css.sass
Normal file
2
app/assets/stylesheets/darkswarm/checkout.css.sass
Normal file
@@ -0,0 +1,2 @@
|
||||
checkout
|
||||
display: block
|
||||
@@ -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
|
||||
|
||||
27
app/views/shop/checkout/_summary.html.haml
Normal file
27
app/views/shop/checkout/_summary.html.haml
Normal 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
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user