Skip to content

Instantly share code, notes, and snippets.

@rocodev-tech
Last active August 29, 2015 14:02
Show Gist options
  • Save rocodev-tech/a21c6f72f9f1dfb4dff8 to your computer and use it in GitHub Desktop.
Save rocodev-tech/a21c6f72f9f1dfb4dff8 to your computer and use it in GitHub Desktop.
app/views/order_mailer/notify_order_placed.html.erb
<link rel="stylesheet" type="text/css" href="/assets/application.css" />
<div class="row">
<div class="col-md-12">
<h2> 訂單明細 </h2>
<table class="table table-borderd">
<thead>
<tr>
<th width="80%">商品明細</th>
<th>單價</th>
</tr>
</thead>
<tbody>
<% @order_items.each do |order_item| %>
<tr>
<td>
<%= order_item.product_name %>
</td>
<td> <%= order_item.price %> </td>
</tr>
<% end %>
</tbody>
</table>
<div class="total group">
<span class="pull-right">
<span> 總計 <%= @order.total %> NTD
</span>
</div>
<hr>
<h2> 寄送資訊 </h2>
<table class="table table-striped table-borderd">
<tbody>
<tr>
<td> 訂購人 </td>
</tr>
<tr>
<td>
<%= @order_info.billing_name %> - <%= @order_info.billing_address %>
</td>
</tr>
<tr>
<td> 收貨人 </td>
</tr>
<tr>
<td>
<%= @order_info.billing_name %> - <%= @order_info.billing_address %>
</td>
</tr>
</tbody>
</table>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment