<%= render layout: 'plugins/ecommerce/layouts/ecommerce', locals: {} do %>

Orders

<% @orders.each do |order| order = order.decorate payment = order.get_meta("payment") %> <% end %>
ID Status Products Total Amount Coupon Pay Amount Order Time Payment Method
<%= order.slug %> <%= raw order.the_status %> <% order.get_meta("products").each do |key, product| %> <%= product[:qty] %> x <%= product[:product_title] %> (<%= current_site.current_unit %> <%= product[:price] %>)
<% end %>
<%= current_site.current_unit %> <%= payment[:total] %> <%= payment[:coupon] %> <%= current_site.current_unit %> <%= payment[:amount].to_f.round(2) %> <%= order.details.received_at %> <%= order.payment_method.name rescue '' %> View <% if payment[:amount].to_f > 0 && order.unpaid? %> Pay <% end %>
<% end %>