Sha256: 5e294b9bfade2b798c7512d1f81af6cb38b971017930b920f544f750032d142c

Contents?: true

Size: 1.74 KB

Versions: 1

Compression:

Stored size: 1.74 KB

Contents

<%= render layout: 'plugins/ecommerce/layouts/ecommerce', locals: {} do %>
<h2>Orders</h2>
    <table id="table-shopping-cart" class="table">
      <thead>
      <tr>
        <th id="">ID</th>
        <th id="">Status</th>
        <th id="">Products</th>
        <th id="">Total Amount</th>
        <th id="">Coupon</th>
        <th id="">Pay Amount</th>
        <th id="">Order Time</th>
        <th>Payment Method</th>
        <th style="width: 90px"></th>
      </tr>
      </thead>
      <tbody>
      <%
         @orders.each do |order|
           order = order.decorate
           payment = order.get_meta("payment")
      %>
          <tr>
            <td><%= order.slug %></td>
            <td><%= raw order.the_status  %></td>
            <td>
              <% order.get_meta("products").each do |key, product| %>
                  <%= product[:qty] %> x <%= product[:product_title] %> (<%= current_site.current_unit %> <%= product[:price] %>) <br>
              <% end %>
            </td>
            <td><%= current_site.current_unit %> <%= payment[:total]  %></td>
            <td><%= payment[:coupon]  %></td>
            <td><%= current_site.current_unit %> <%= payment[:amount].to_f.round(2)  %></td>
            <td><%= order.details.received_at %></td>
            <td><%= order.payment_method.name rescue '' %></td>
            <td>
              <a href="<%= plugins_ecommerce_order_show_path(order: order.slug) %>" class="btn btn-info btn-xs">View</a>
              <% if payment[:amount].to_f > 0 && order.unpaid? %>
              <a href="<%= plugins_ecommerce_order_select_payment_path(order: order.slug) %>" class="btn btn-warning btn-xs">Pay</a>
              <% end  %>
            </td>
          </tr>
      <% end  %>
      </tbody>
    </table>
<% end %>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
camaleon_ecommerce-0.0.4 app/views/plugins/ecommerce/front/orders/index.html.erb