WIP Replace order information display for Confirm and Complete stages of checkout

This commit is contained in:
Rob H
2012-11-23 09:26:27 +11:00
parent 2786791c39
commit 3d025bb709
2 changed files with 56 additions and 0 deletions

View 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")

View 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>