<% current_unit = '$' order.get_meta("products", {}).each do |key, product| current_unit = e_get_currency_units[product[:currency_code]]['symbol'] rescue '$' qty = product[:qty].to_f price = product[:price].to_f tax_product = product[:tax].to_f tax_total_product = tax_product * qty sub_total = price * qty %> <% end %> <% if order.get_meta("payment")[:coupon_amount].to_i > 0 %> <% end %>
<%= t('plugin.ecommerce.product.qty') %> <%= t('plugin.ecommerce.product.item') %> <%= t('plugin.ecommerce.product.price') %> <%= t('plugin.ecommerce.product.tax') %> <%= t('plugin.ecommerce.table.sub_total') %>
<%= qty.to_i %> <%= product[:product_title] %> <%= current_unit %> <%= price %> <%= current_unit %> <%= tax_product %> <%= current_unit %> <%= sub_total + tax_total_product %>
<%= t('plugin.ecommerce.product.total_excluding_tax') %> <%= current_unit %> <%= order.get_meta("payment")[:sub_total] %>
<%= t('plugin.ecommerce.product.tax') %> <%= current_unit %> <%= order.get_meta("payment")[:tax_total] %>
<%= t('plugin.ecommerce.table.shipping') %> <%= current_unit %> <%= order.get_meta("payment")[:weight_price] %>
Sub <%= t('plugin.ecommerce.table.total') %> <%= current_unit %> <%= order.get_meta("payment")[:total] %>
<%= t('plugin.ecommerce.table.discount') %> - <%= current_unit %> <%= order.get_meta("payment")[:coupon_amount] %> (<%= order.get_meta("payment")[:coupon] %>)
<%= t('plugin.ecommerce.table.total') %> <%= current_unit %> <%= order.get_meta("payment")[:amount] %>