<%= render partial: 'form_errors', locals: { what: @order } %>

New order

Select a price option, quantity and shipping option.

The next step will summarize the total cost of the order and allow you to review before confirming.

<%= form_for(@order, :html => { class: 'form-horizontal' } ) do |f| %>

<%= @order.product.title%>

<%= sprintf("%g", @order.product.stock) %> <%= @order.product.unitdesc %>

Price option
<% @order.product.unitprices.each do |unitprice| %>
<% end %>
<%= f.label :quantity, class: 'col-sm-2 control-label'%>
<%= f.number_field :quantity, class: 'form-control' %>
Shipping option
<% @order.product.shippingoptions.each do |shippingoption| %>
<% end %>
Pay with
<% @order.product.payment_methods.each do |pm| %>
<% end %>
<%= f.hidden_field :product_id %>
<%= f.submit 'Next', class: 'btn btn-primary' %>
<% end %>