<%= t('plugin.ecommerce.form_coupon') %>
<%= render partial: 'layouts/camaleon_cms/admin/form_error', locals: {data: @coupon} %>
<%= f.text_field :slug, :class => "form-control required" %>
<% options = params[:options].present? ? params[:options] : @coupon.options rescue {} %>
<%= number_field_tag "options[amount]", options[:amount] || '', :class => "form-control required" %>
<%= select_tag "options[discount_type]", options_for_select([[t('plugin.ecommerce.table.percent'),"percent"],[t('plugin.ecommerce.table.money'),"money"],[t('plugin.ecommerce.table.free_shipping'),"free_ship"]], options[:discount_type] || ''), :class => "form-control required" %>
<%= text_field_tag "options[min_cart_total]",options[:min_cart_total] || '', :class => "form-control required" %>
<%= text_field_tag "options[expirate_date]",options[:expirate_date] || '', :class => "form-control required" %>
<%= number_field_tag "options[allowed_applications]", options[:allowed_applications] || '1', :class => "form-control required" %>
<% end %>
<%= f.label t('plugin.ecommerce.table.name') %>
<%= f.text_field :name, :class => "form-control required" %>
<%= f.text_field :name, :class => "form-control required" %>
<%= f.text_field :slug, :class => "form-control required" %>
<%= number_field_tag "options[amount]", options[:amount] || '', :class => "form-control required" %>
<%= select_tag "options[discount_type]", options_for_select([[t('plugin.ecommerce.table.percent'),"percent"],[t('plugin.ecommerce.table.money'),"money"],[t('plugin.ecommerce.table.free_shipping'),"free_ship"]], options[:discount_type] || ''), :class => "form-control required" %>
<%= text_field_tag "options[min_cart_total]",options[:min_cart_total] || '', :class => "form-control required" %>
<%= text_field_tag "options[expirate_date]",options[:expirate_date] || '', :class => "form-control required" %>
<%= number_field_tag "options[allowed_applications]", options[:allowed_applications] || '1', :class => "form-control required" %>