<%= !@price[:id].present? ? t('plugin.ecommerce.add_price') : "#{t('plugin.ecommerce.edit_price')}: #{@price[:code]}" %>

<%= t('plugin.ecommerce.form_price') %>

<%#= form_tag ({url:{action: @price.blank? ? :create : :update}}, :method => "post", :class => "form" ) do %> <%= form_tag(@price[:id].present? ? {action: :update, id: @price[:id]} : {action: :create}, :method => @price[:id].present? ? "patch" :"post", :class => "validate-price") do %>

<%= text_field_tag( "price[code]", @price[:code], class: "form-control required") %>
(<%= current_site.current_unit %>)
<%= number_field_tag( "price[price]", @price[:price], class: "form-control required") %>
(<%= current_site.current_weight %>)
<%= number_field_tag( "price[min_weight]", @price[:min_weight], class: "form-control required") %>
(<%= current_site.current_weight %>)
<%= number_field_tag( "price[max_weight]", @price[:max_weight], class: "form-control required") %>
<% end %>