app/views/plugins/ecommerce/admin/orders/form.html.erb in camaleon_ecommerce-0.0.4 vs app/views/plugins/ecommerce/admin/orders/form.html.erb in camaleon_ecommerce-1.1
- old
+ new
@@ -2,58 +2,14 @@
<div class="panel-heading">
<h4><span class="fa fa-cog"></span> <%= t('plugin.ecommerce.edit_order') %>: <%= @order.slug %></h4>
</div>
<%= form_for @order, url: {action: @order.new_record? ? :create : :update}, html: {class: 'form-order', id: 'form-order'} do |f| %>
<div class="panel-body">
- <div class="row">
- <div class="col-md-12">
- <div id="user_details" class="row">
- <h3 class="col-md-12"><%= t('plugin.ecommerce.details_user') %></h3>
-
- <div class="form-group col-md-4">
- <label for=""><%= t('plugin.ecommerce.table.customer') %></label>
- <input class="form-control" type="text" name="order[details][customer]" value="<%= @order.details.customer rescue '' %>">
- </div>
- <div class="form-group col-md-4">
- <label for=""><%= t('plugin.ecommerce.table.email') %></label>
- <input class="form-control" type="text" name="order[details][email]" value="<%= @order.details.email rescue '' %>">
- </div>
- <div class="form-group col-md-4">
- <label for=""><%= t('plugin.ecommerce.table.phone') %></label>
- <input class="form-control" type="text" name="order[details][phone]" value="<%= @order.details.phone rescue '' %>">
- </div>
- </div>
- </div>
- <div class="col-md-12">
- <%= render partial: 'plugins/ecommerce/partials/form_address', locals: {billing_address: @order.get_meta("billing_address"), shipping_address: @order.get_meta("shipping_address")} %>
- </div>
- </div>
- <hr/>
- <div class="row">
- <div class="col-md-12">
- <h3 class=""> <%= t('plugin.ecommerce.products') %></h3>
- <table class="table">
- <thead>
- <tr>
- <td><%= t('plugin.ecommerce.products').singularize %></td>
- <td><%= t('plugin.ecommerce.product.qty') %></td>
- <td><%= t('plugin.ecommerce.product.price') %></td>
- <td><%= t('plugin.ecommerce.product.tax') %></td>
- </tr>
- </thead>
- <tbody>
- <% @order.get_meta("products", {}).each do |key, product| %>
- <tr>
- <td><%= product[:product_title] %></td>
- <td><%= product[:qty] %></td>
- <td><%= e_symbol_by_code(product[:currency_code]) %> <%= product[:price] %></td>
- <td><%= e_symbol_by_code(product[:currency_code]) %> <%= product[:tax] %></td>
- </tr>
- <% end %>
- </tbody>
- </table>
- <%#= debug @order.get_meta("products") %>
- </div>
+ <%= render plugin_view('partials/checkout/user_info'), cart: @order, as_partial: true %>
+ <hr>
+ <div class="form-group">
+ <%= f.label nil, t('plugin.ecommerce.show_order.consignment_number', default: 'Consignment Number') %>
+ <%= text_field_tag 'metas[consignment_number]', @order.get_meta('consignment_number'), class: 'form-control' %>
</div>
</div>
<div class="panel-footer">
<button class="btn btn-default" onclick="history.back()"><%= t('camaleon_cms.admin.button.back') %></button>