Runing on the latest master
from https://github.com/jbrien/spree_sunspot_search and spree 1-3-stable.
This is my filter setup:
filters.add do |f|
f.search_param = 'category_names'
f.search_condition = :any
#f.display_name = 'Oddelek'
f.values {
Spree::Taxon.find_by_permalink('oddelki').children.map(&:name) }
end
filters.add do |f|
f.search_param = 'brand_name'
f.search_condition = :any
#f.display_name = 'Oddelek'
f.values {
Spree::Taxon.find_by_permalink('proizvajalci').children.map(&:name) }
end
filters.add do |f|
f.search_param = 'ingredient_names'
f.search_condition = :any
#f.display_name = 'Oddelek'
f.values {
Spree::Taxon.find_by_permalink('vsebnost').children.map(&:name) }
end
filters.add do |f|
f.search_param = 'spot_names'
f.search_condition = :any
#f.display_name = 'Oddelek'
f.values {
Spree::Taxon.find_by_permalink('mesto-delovanja').children.map(&:name) }
end
filters.add do |f|
f.search_param = 'zdravje_names'
f.search_condition = :any
#f.display_name = 'Oddelek'
f.values {
Spree::Taxon.find_by_permalink('zdravje').children.map(&:name) }
end
filters.add do |f|
f.search_param = 'shape_names'
f.search_condition = :any
#f.display_name = 'Oddelek'
f.values {
Spree::Taxon.find_by_permalink('vsebnost').children.map(&:name) }
end
I had to copy this
file https://github.com/jbrien/spree_sunspot_search/blob/master/app/views/spree/shared/_filter.html.erb
to my app to override the default _filter.html.erb from spree core.
Now when I browse the taxon pages I get this error whenever the filter
partial is included:
undefined local variable or method `filter_params' for #<#<Class:0x0000080102ec08>:0x0000080fc70d28>
8: <% filter_params.each do |filter| %>
I can't find filter_params defined anywhere in spree_sunspot_search. Can someone please point me to where this is suposed to be constructed.
Thanks for reading and any pointers you can give me.
Miha
--
You received this message because you are subscribed to the Google Groups "Spree" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spree-user+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.