mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
WIP Replace order information display for Confirm and Complete stages of checkout
This commit is contained in:
4
app/overrides/replace_order_details_steps_data.rb
Normal file
4
app/overrides/replace_order_details_steps_data.rb
Normal file
@@ -0,0 +1,4 @@
|
||||
Deface::Override.new(:virtual_path => "spree/shared/_order_details",
|
||||
:replace => "div.row.steps-data",
|
||||
:partial => "spree/shared/order_details_steps_data",
|
||||
:name => "order_details_steps_data")
|
||||
52
app/views/spree/shared/_order_details_steps_data.html.erb
Normal file
52
app/views/spree/shared/_order_details_steps_data.html.erb
Normal file
@@ -0,0 +1,52 @@
|
||||
<div class="row steps-data">
|
||||
|
||||
<div class="columns alpha six">
|
||||
<h6><%= "Customer Details" %> <%= link_to "(#{t(:edit)})", checkout_state_path(:address) unless @order.completed? %></h6>
|
||||
<div class="address">
|
||||
Name: <%= order.bill_address.full_name %><br />
|
||||
Address: <%= order.bill_address.address1 + ", " + order.bill_address.city %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="columns alpha six">
|
||||
<h6><%= "Distributor Details" %> <%=# link_to "(#{t(:edit)})", checkout_state_path(:address) unless @order.completed? %></h6>
|
||||
<div class="address">
|
||||
Distributor: <%= order.distributor.name %><br />
|
||||
Address: <%= order.distributor.address.address1 + ", " + order.distributor.address.city %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div class="columns alpha four">
|
||||
<h6><%= t(:shipping_method) %> <%= link_to "(#{t(:edit)})", checkout_state_path(:delivery) unless @order.completed? %></h6>
|
||||
<div class="delivery">
|
||||
<%= order.shipping_method.name %>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="row steps-data">
|
||||
<div class="columns alpha six">
|
||||
<h6><%= t(:payment_information) %> <%= link_to "(#{t(:edit)})", checkout_state_path(:payment) unless @order.completed? %></h6>
|
||||
<div class="payment-info">
|
||||
<% if order.payment_method.name.include? "PayPal" %>
|
||||
<div class="flash notice">Your payment via Paypal has been processed successfully.</div>
|
||||
<% elsif order.payment_method.name.include? "EFT" %>
|
||||
<span style="font-weight: bold">Please pay by direct debit:</span><br /><br />
|
||||
Eaterprises Australia<br />
|
||||
BSB: XXX-XXX<br />
|
||||
Acct: XXXXXXX
|
||||
<% elsif order.creditcards.empty? == false %>
|
||||
<span class="cc-type">
|
||||
<%= image_tag "creditcards/icons/#{order.creditcards.first.cc_type}.png" %>
|
||||
<%= t(:ending_in)%> <%= order.creditcards.first.last_digits %>
|
||||
</span>
|
||||
<br />
|
||||
<span class="full-name">
|
||||
<%= order.creditcards.first.first_name %>
|
||||
<%= order.creditcards.first.last_name %>
|
||||
</span>
|
||||
<% elsif order.payment_method.type == "Spree::PaymentMethod::Check" %>
|
||||
<span><%= order.payment_method.description %></span>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user