On order confirmation page and email, display distributor details instead of misc fields. HACK - this should be in the engine, not in the main app. FIXME

This commit is contained in:
Rohan Mitchell
2013-05-18 19:54:27 +10:00
parent d65dda4dc5
commit b7f7766893
2 changed files with 6 additions and 17 deletions

View File

@@ -1,4 +1,4 @@
Dear <%= @order.bill_address.firstname %>,
Dear <%= @order.bill_address.firstname %>,
Please review and retain the following order information for your records.
@@ -22,20 +22,10 @@ Payment Details
============================================================
<%= @order.payment_method.description.html_safe %>
<% end %>
<% end %>
============================================================
Collection / Delivery Details
============================================================
Address:
<%= @order.distributor.name %>
<% address = @order.distributor.address %>
<%= address.address1 %> <%= ",\n #{address.address2}" unless address.address2.blank? %>
<%= [address.city, address.state_text, address.zipcode, address.country.name].compact.join ', ' %>
Collection time:
<%= @order.distributor.next_collection_at %>
Contact:
<%= @order.distributor.contact %>
<%= "Phone: #{@order.distributor.phone}" %>
<%= "Email: #{@order.distributor.email}" %>
<%= strip_tags render :partial => 'enterprises/distributor_details', :formats => :html, :locals => {:distributor => @order.distributor} %>
Thank you for your business.
Thank you for your support.

View File

@@ -11,8 +11,7 @@
<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 %>
<%= render 'enterprises/distributor_details', :distributor => order.distributor %>
</div>
</div>
@@ -46,4 +45,4 @@
<% end %>
</div>
</div>
</div>
</div>