app/views/plugins/ecommerce/front/orders/show.html.erb in camaleon_ecommerce-1.2.1 vs app/views/plugins/ecommerce/front/orders/show.html.erb in camaleon_ecommerce-2.0.0
- old
+ new
@@ -3,13 +3,14 @@
<% unless defined?(as_partial) %>
<%= raw ecommerce_draw_breadcrumb %>
<h1><%= t('.title', default: 'Order Details') %>: <%= order.slug %></h1>
<% end %>
<div class="basic_info">
- <% if order.received_at.present? %><b><%= t('.received_at', default: 'Received At') %>: </b> <%= order.received_at %><br> <% end %>
+ <% if order.invoice_number.present? %><b><%= t('.invoice_number', default: 'Invoice Number') %>: </b> <%= order.invoice_number %><br> <% end %>
+ <% if order.received_at.present? %><b><%= t('.received_at', default: 'Received At') %>: </b> <%= order.the_received_at %><br> <% end %>
<b><%= t('.created_at', default: 'Created At') %>: </b> <%= order.created_at %><br>
- <% if order.shipped_at.present? %><b><%= t('.shipped_at', default: 'Shipped At') %>: </b> <%= order.shipped_at %><br> <% end %>
+ <% if order.shipped_at.present? %><b><%= t('.shipped_at', default: 'Shipped At') %>: </b> <%= order.the_shipped_at %><br> <% end %>
</div>
<div>
<h4><%= t('.customer_info', default: 'Customer Info') %></h4>
<ul class="ec-list-orders-address">
<li><strong><%= t('.name', default: 'Name') %>:</strong> <span> <%= order.user.fullname %></span></li>
@@ -22,11 +23,11 @@
<div class="row">
<div class="col-md-6">
<h4><%= t('.billing_address', default: 'Billing Address') %></h4>
<% detail = order.get_meta("billing_address", {}) %>
<ul class="ec-list-orders-address">
- <li><strong><%= t('.address', default: 'Address1') %>:</strong> <%= detail[:address1] %></li>
+ <li><strong><%= t('.address', default: 'Address') %>1:</strong> <%= detail[:address1] %></li>
<li><strong><%= t('.address', default: 'Address') %>2:</strong> <%= detail[:address2] %></li>
<li><strong><%= t('.city', default: 'City') %>:</strong> <%= detail[:city] %></li>
<li><strong><%= t('.state', default: 'State') %>:</strong> <%= detail[:state] %></li>
<li><strong><%= t('.zip_code', default: 'Zip code') %>:</strong> <%= detail[:zip] %></li>
<li><strong><%= t('.country', default: 'Country') %>:</strong> <%= detail[:country] %></li>
@@ -36,11 +37,11 @@
</div>
<div class="col-md-6">
<h4><%= t('.shipping_address', default: 'Shipping Address') %></h4>
<% detail = order.get_meta("shipping_address", {}) %>
<ul class="ec-list-orders-address">
- <li><strong><%= t('.address', default: 'Address1') %>:</strong> <%= detail[:address1] %></li>
+ <li><strong><%= t('.address', default: 'Address') %>1:</strong> <%= detail[:address1] %></li>
<li><strong><%= t('.address', default: 'Address') %>2:</strong> <%= detail[:address2] %></li>
<li><strong><%= t('.city', default: 'City') %>:</strong> <%= detail[:city] %></li>
<li><strong><%= t('.state', default: 'State') %>:</strong> <%= detail[:state] %></li>
<li><strong><%= t('.zip_code', default: 'Zip code') %>:</strong> <%= detail[:zip] %></li>
<li><strong><%= t('.country', default: 'Country') %>:</strong> <%= detail[:country] %></li>
@@ -55,21 +56,21 @@
<h4><%= t('.title_products', default: 'Products and Payments') %></h4>
<div id="totals_section">
<table class="table table-bordered">
<tbody>
<tr>
- <th id="quantity_col"><%= t('.qty', default: 'Quantity') %></th>
- <th id="item_col"><%= t('.item', default: 'Item') %></th>
- <th id="price_col"><%= t('.price', default: 'Price') %></th>
+ <th><%= t('.qty', default: 'Quantity') %></th>
+ <th><%= t('.item', default: 'Item') %></th>
+ <th><%= t('.price', default: 'Price') %></th>
- <th id="tax_col"><%= t('.tax', default: 'Tax') %></th>
- <th id="subtotal_col"><%= t('.subtotal', default: 'Sub Total') %></th>
+ <th><%= t('.tax', default: 'Tax') %></th>
+ <th><%= t('.subtotal', default: 'Sub Total') %></th>
</tr>
- <% order.product_items.each do |item| %>
+ <% order.product_items.decorate.each do |item| %>
<tr>
<td><%= item.qty %></td>
- <td><%= link_to(item.cache_the_title, item.product.try(:decorate).try(:the_url)) %></td>
+ <td><%= link_to(item.cache_the_title, item.the_url) %></td>
<td><%= item.cache_the_price %></td>
<td><%= item.cache_the_tax %></td>
<td><%= item.cache_the_sub_total %></td>
</tr>
<% end %>
@@ -128,16 +129,14 @@
<th><%= t('.shipping_method', default: 'Shipping Method') %></th>
<th><%= t('.date_shipped', default: 'Shipped Date') %></th>
<th><%= t('.track_url', default: 'URL Tracking') %></th>
</tr>
<tr>
- <td><%= order.shipping_method.name rescue t('.no_shipping', default: 'Not Shipped Assigned') %></td>
+ <td><%= order.the_shipping_method || t('.no_shipping', default: 'Not Shipped Assigned') %></td>
<td><%= order.shipped_at.presence || t('.no_shipped', default: 'Not Shipped') %></td>
<td><%= order.the_url_tracking %></td>
</tr>
</tbody>
</table>
- <div class="text-center">
- </div>
</div>
</div>
</div>