<%= t('plugin.ecommerce.edit_order') %>: <%= @order.slug %>

<%= form_for @order, url: {action: @order.new_record? ? :create : :update}, html: {class: 'form-order', id: 'form-order'} do |f| %>

<%= t('plugin.ecommerce.details_user') %>

<%= render partial: 'plugins/ecommerce/partials/form_address', locals: {billing_address: @order.get_meta("billing_address"), shipping_address: @order.get_meta("shipping_address")} %>

<%= t('plugin.ecommerce.products') %>

<% @order.get_meta("products", {}).each do |key, product| %> <% end %>
<%= t('plugin.ecommerce.products').singularize %> <%= t('plugin.ecommerce.product.qty') %> <%= t('plugin.ecommerce.product.price') %> <%= t('plugin.ecommerce.product.tax') %>
<%= product[:product_title] %> <%= product[:qty] %> <%= e_symbol_by_code(product[:currency_code]) %> <%= product[:price] %> <%= e_symbol_by_code(product[:currency_code]) %> <%= product[:tax] %>
<%#= debug @order.get_meta("products") %>
<% end %>