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

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

<% end %>
<% if order.received_at.present? %><%= t('.received_at', default: 'Received At') %>: <%= order.received_at %>
<% end %> <%= t('.created_at', default: 'Created At') %>: <%= order.created_at %>
<% if order.shipped_at.present? %><%= t('.shipped_at', default: 'Shipped At') %>: <%= order.shipped_at %>
<% end %>

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

<%= 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('.phone_number', default: 'Phone Number') %>: <%= detail[:phone_number] %>

<%= 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('.phone_number', default: 'Phone Number') %>: <%= detail[:phone_number] %>

<%= 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 %> <%= link_to(item.cache_the_title, item.product.try(:decorate).try(:the_url)) %> <%= 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 %>