I am having trouble setting up facets with the gem spree_sunspot_search.
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.

Search Discussions

  • RF_FM at Feb 20, 2013 at 8:01 pm
    I have the same issue.

    среда, 20 февраля 2013 г., 13:04:18 UTC+2 пользователь mi...@bitami.si
    написал:
    I am having trouble setting up facets with the gem spree_sunspot_search.
    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.erbto 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.
  • Miha at Feb 22, 2013 at 12:07 pm
    Is there anyone using spree_sunspot_search on spree 1.2? Can someone please
    tell me where filter_params come from? Is it a helper?

    Thanks!
    On Wednesday, February 20, 2013 7:37:38 PM UTC+1, RF_FM wrote:

    I have the same issue.

    среда, 20 февраля 2013 г., 13:04:18 UTC+2 пользователь mi...@bitami.siнаписал:
    I am having trouble setting up facets with the gem spree_sunspot_search.
    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.erbto 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.
  • Miha at Feb 22, 2013 at 11:09 pm
    This is where it is used:
    https://github.com/jbrien/spree_sunspot_search/blob/master/app/views/spree/shared/_filter.html.erb#L6

    Can you please tell me where filter_params gets populated.

    Thanks.
    On Friday, February 22, 2013 11:26:12 PM UTC+1, Michael Bianco wrote:

    I am using it in production.

    Point me to where that method is being used on GitHub and I might be able
    to help.

    - Mike
    On Friday, February 22, 2013 7:02:58 AM UTC-5, mi...@bitami.si wrote:

    Is there anyone using spree_sunspot_search on spree 1.2? Can someone
    please tell me where filter_params come from? Is it a helper?

    Thanks!
    On Wednesday, February 20, 2013 7:37:38 PM UTC+1, RF_FM wrote:

    I have the same issue.

    среда, 20 февраля 2013 г., 13:04:18 UTC+2 пользователь mi...@bitami.siнаписал:
    I am having trouble setting up facets with the gem spree_sunspot_search.
    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.erbto 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.
  • Miha at Feb 25, 2013 at 10:57 am
    I took a closer look at https://github.com/iloveitaly/spree_sunspot_search
    and I see the extension is very different from the extension I tried to
    use: https://github.com/jbrien/spree_sunspot_search<https://github.com/jbrien/spree_sunspot_search/blob/master/app/views/spree/shared/_filter.html.erb#L6>
    Looking at the network graph in Github I went with the jbrien "original"
    version as it seemed to be the most recent one. Since your extension works
    in production do you think it would be best if I try to make it work with
    spree 1.3 instead. I don't think much has changed in terms of how search is
    implemented and data hooks in content.
    Jbrien has added alot of filtering options in the last months but I think
    your extension does what I need it for. Are you planning to maintain it in
    the future and update it to spree 1.3 or should I try my luck and submit a
    pull request if I can make it work?

    Thanks,
    Miha
    On Friday, February 22, 2013 11:26:12 PM UTC+1, Michael Bianco wrote:

    I am using it in production.

    Point me to where that method is being used on GitHub and I might be able
    to help.

    - Mike
    On Friday, February 22, 2013 7:02:58 AM UTC-5, mi...@bitami.si wrote:

    Is there anyone using spree_sunspot_search on spree 1.2? Can someone
    please tell me where filter_params come from? Is it a helper?

    Thanks!
    On Wednesday, February 20, 2013 7:37:38 PM UTC+1, RF_FM wrote:

    I have the same issue.

    среда, 20 февраля 2013 г., 13:04:18 UTC+2 пользователь mi...@bitami.siнаписал:
    I am having trouble setting up facets with the gem spree_sunspot_search.
    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.erbto 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.
  • Michael Bianco at Feb 26, 2013 at 1:21 pm
    I'm going to continue to use spree_sunspot_search - hopefully of off
    jbrien's repository eventually. I have a PR request on jbrien's repository,
    hopefully I can get my improvements merged in and can work of his master.

    - Mike
    On Monday, February 25, 2013 5:57:30 AM UTC-5, mi...@bitami.si wrote:

    I took a closer look at https://github.com/iloveitaly/spree_sunspot_searchand I see the extension is very different from the extension I tried to
    use: https://github.com/jbrien/spree_sunspot_search<https://github.com/jbrien/spree_sunspot_search/blob/master/app/views/spree/shared/_filter.html.erb#L6>
    Looking at the network graph in Github I went with the jbrien "original"
    version as it seemed to be the most recent one. Since your extension works
    in production do you think it would be best if I try to make it work with
    spree 1.3 instead. I don't think much has changed in terms of how search is
    implemented and data hooks in content.
    Jbrien has added alot of filtering options in the last months but I think
    your extension does what I need it for. Are you planning to maintain it in
    the future and update it to spree 1.3 or should I try my luck and submit a
    pull request if I can make it work?

    Thanks,
    Miha
    On Friday, February 22, 2013 11:26:12 PM UTC+1, Michael Bianco wrote:

    I am using it in production.

    Point me to where that method is being used on GitHub and I might be able
    to help.

    - Mike
    On Friday, February 22, 2013 7:02:58 AM UTC-5, mi...@bitami.si wrote:

    Is there anyone using spree_sunspot_search on spree 1.2? Can someone
    please tell me where filter_params come from? Is it a helper?

    Thanks!
    On Wednesday, February 20, 2013 7:37:38 PM UTC+1, RF_FM wrote:

    I have the same issue.

    среда, 20 февраля 2013 г., 13:04:18 UTC+2 пользователь mi...@bitami.siнаписал:
    I am having trouble setting up facets with the
    gem spree_sunspot_search.
    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.erbto 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.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupspree-user @
categoriesrubyonrails
postedFeb 20, '13 at 11:47a
activeFeb 26, '13 at 1:21p
posts6
users3
websitespreecommerce.com
irc#RubyOnRails

3 users in discussion

Miha: 4 posts RF_FM: 1 post Michael Bianco: 1 post

People

Translate

site design / logo © 2022 Grokbase