<% content_for :sidebar do %>
<% if "spree/products" == params[:controller] && @taxon %> <%= render :partial => 'spree/shared/filters' %> <% else %> <%= render :partial => 'spree/shared/taxonomies' %> <% end %>
<% end %>

<%= t("add_on.advanced_search.advanced_search") %>

<%= search_form_for @q, url: products_advanced_search_path, :html => { :class => "spree/product/advanced_search" } do |f| %>
<%= f.label t('add_on.advanced_search.add_on_makers_eq') %>
<%= f.select :add_on_makers_id_eq, options_from_collection_for_select(Spree::AddOnMaker.all, :id, :name, @q.add_on_makers_id_eq), include_blank: true %>
<%= f.label t('add_on.advanced_search.name_cont') %>
<%= f.text_field :name_cont, :size => 60 %>
<%= f.label t('add_on.advanced_search.variants_including_master_sku_cont') %>
<%= f.text_field :variants_including_master_sku_cont, :size => 60 %>
<%= f.label t('add_on.advanced_search.taxons_id_eq') %>
<%= f.select :taxons_id_eq, options_from_collection_for_select(Spree::Taxon.all, :id, :name, @q.taxons_id_eq), include_blank: true %>
<%= f.label t('add_on.advanced_search.variants_min_cost_price_gteq') %>
<%= f.text_field :variants_including_master_prices_amount_gteq, :size => 10 %>
<%= f.label t('add_on.advanced_search.variants_max_cost_price_lteq') %>
<%= f.text_field :variants_including_master_prices_amount_lteq, :size => 10 %>
<%= f.submit Spree.t(:search) %> <% end %> <% if @products.any? %>
<% end %>
<% if @products.empty? %>
<%= Spree.t(:no_products_found) %>
<% else %>
<%= render :partial => 'spree/shared/products', :locals => { :products => @products, :taxon => @taxon } %>
<% end %>