Sha256: c5483ed0b75b45b81f52f7b045ce82186611285f9e189a46e1b734f8e927801a

Contents?: true

Size: 1.63 KB

Versions: 3

Compression:

Stored size: 1.63 KB

Contents

<div class="order-detail" style="border:1px solid #666; background:#F5F5F5; padding: 20px">

  <p style="float:right; margin-top:0;">Date: <%= @order.created_at.strftime('%m/%d/%Y') %></p>

  <h3 style="margin-top:0;">Invoice #<%= @order.invoice_number %></h3>

  <h4>Shipping Details</h4>

  <p>
    <%= @order.full_name %><br/>
    <%= mail_to @order.email %><br/>
    <%= @order.phone %><br/>
    <%= @order.full_address %>
  </p>

  <h4>Shopping Cart</h4>

  <table style="width:100%;">
    <thead>
      <tr>
        <th>Product</th>
        <th>SKU</th>
        <th>Options</th>
        <th>Quantity</th>
        <th>Price</th>
      </tr>
    </thead>
    <tbody>
      <% @order.cart.cart_items.each do |cart_item| %>
        <tr>
          <td><%= cart_item.product_sku.product.title %></td>
          <td><%= cart_item.product_sku.sku %></td>
          <td>
            <% cart_item.product_sku.options.each do |option| %>
              <strong><%= option.label %>:</strong> <%= option.value %><br/>
            <% end %>
            <% cart_item.configuration.each do |key, val| %>
              <% if val.present? %>
                <strong><%= key %>:</strong> <%= val %><br/>
              <% end %>
            <% end %>
          </td>
          <td>
            <%= cart_item.quantity %>
          </td>
          <td><%= number_to_currency cart_item.total_price %></td>
        </tr>
      <% end %>
      <tfoot>
        <tr>
          <td colspan="4" align="right">
            <strong>Total</strong>
          </td>
          <td><%= number_to_currency @order.cart.total_price %></td>
        </tr>
      </tfoot>
    </tbody>
  </table>

</div>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
tb_commerce-0.0.4 app/views/tb_commerce/order_mailer/_detail.html.erb
tb_commerce-0.0.3 app/views/tb_commerce/order_mailer/_detail.html.erb
tb_commerce-0.0.2 app/views/tb_commerce/order_mailer/_detail.html.erb