<% order ||= @order %>
<% unless defined?(as_partial) %>

<%= t('.title', default: 'Order Details') %>: <%= order.slug %>

<% end %>

<%= t('.customer_info', default: 'Customer Info') %>

  • <%= t('.name', default: 'Name') %>: <%= order.user.fullname %>
  • <%= t('.email', default: 'Email') %>: <%= order.user.email %>
  • <%= t('.phone', default: 'Phone') %>: <%= order.user.get_option('phone') %>

<%= t('.billing_address', default: 'Billing Address') %>

<% detail = order.get_meta("billing_address", {}) %>
  • <%= t('.address', default: 'Address1') %>: <%= detail[:address1] %>
  • <%= t('.address', default: 'Address') %>2: <%= detail[:address2] %>
  • <%= t('.city', default: 'City') %>: <%= detail[:city] %>
  • <%= t('.state', default: 'State') %>: <%= detail[:state] %>
  • <%= t('.zip_code', default: 'Zip code') %>: <%= detail[:zip] %>
  • <%= t('.country', default: 'Country') %>: <%= detail[:country] %>

<%= t('.shipping_address', default: 'Shipping Address') %>

<% detail = order.get_meta("shipping_address", {}) %>
  • <%= t('.address', default: 'Address1') %>: <%= detail[:address1] %>
  • <%= t('.address', default: 'Address') %>2: <%= detail[:address2] %>
  • <%= t('.city', default: 'City') %>: <%= detail[:city] %>
  • <%= t('.state', default: 'State') %>: <%= detail[:state] %>
  • <%= t('.zip_code', default: 'Zip code') %>: <%= detail[:zip] %>
  • <%= t('.country', default: 'Country') %>: <%= detail[:country] %>

<%= t('.title_products', default: 'Products and Payments') %>

<% order.product_items.each do |item| %> <% end %>
<%= t('.qty', default: 'Quantity') %> <%= t('.item', default: 'Item') %> <%= t('.price', default: 'Price') %> <%= t('.tax', default: 'Tax') %> <%= t('.subtotal', default: 'Sub Total') %>
<%= item.qty %> <%= item.cache_the_title %> <%= item.cache_the_price %> <%= item.cache_the_tax %> <%= item.cache_the_sub_total %>
<%= t('.total_excl', default: 'Total (excluding Tax)') %> <%= order.cache_the_sub_total %>
<%= t('.tax', default: 'Tax') %> <%= order.cache_the_tax %>
<%= t('.discount', default: 'Discount') %> <%= order.cache_the_discounts %>
<%= t('.total_shipping', default: 'Total shipping') %> <%= order.cache_the_shipping %>
<%= t('.total_price', default: 'Total Price') %> <%= order.cache_the_total %>
<% if defined?(as_partial) %> <% end %>
<%= t('.payment_type', default: 'Type Payment') %>
<%= order.payment_method.name rescue 'Not Payment' %> <%= raw order.the_status %>
<%= raw order.get_meta('payment_data', {}).map{|k, v| "#{k.to_s.titleize}: #{v}" }.join('
') %>
<%= t('.shipping_method', default: 'Shipping Method') %> <%= t('.date_shipped', default: 'Shipped Date') %> <%= t('.track_url', default: 'URL Tracking') %>
<%= order.shipping_method.name rescue t('.no_shipping', default: 'Not Shipped Assigned') %> <%= order.shipped_at.presence || t('.no_shipped', default: 'Not Shipped') %> <%= order.the_url_tracking %>