Closed (fixed)
Project:
Finder
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
26 Jan 2012 at 16:34 UTC
Updated:
4 Mar 2012 at 13:20 UTC
Good evening and many congrats for this great module.
I am using drupal commerce and in my product display nodes i have two term reference fields ( one for product categories and one for locations).
I have created a view that uses a contextual filter -> Content has taxonomy term with depth in order to display my products for each category.
So, how can i add to this view a faceted seach like product locations and prices??
My main thought is how to use the contextual filter in content finder so that it can filter the results provided each time from my view.
Thank you
Comments
Comment #1
danielb commentedI don't understand the question. You speak of taxonomy terms, but then ask about price and location - lost me. What have you tried, and why was it not suitable?
Are you trying to configure a finder to only use a particular contextual filter value, or do you want the user to be able to change this through the finder form?
Comment #2
danielb commentedAre you under the impression that finder uses contextual filters for it's main functionality? Because that is not the case. However, finder can be configured to always apply a fixed value to the contextual filter when executing a view.
Comment #3
frixos12 commentedOk let me be more descriptive.
My main goal is when the user search a product by category terms, to provide him some filtering options for the search results.
So for example if a have a product category (t-shirts) and manufacturers for each product ( another taxonomy term) i want to filter my results based on manufacturers name.
I have already created a view that provides me with specific category product results.
How can i configure my finder to filter these results according to other fields ( manufacturer's name for example which happens to be a taxonomy term)?
Also the filters used in this example http://www.redletterdays.co.uk/Experience/Driving/All is simiral to my use case.
Thank you for your time replying to my post.
Comment #4
danielb commentedI'm sorry, I don't know what you want me to say. Your question of "How do I do X" can be answered by removing "How do I", and simply stating "Do X". If you asked me this question in a support chatroom my answer would be "get the finder module" - but since you've already got it, what is there left to say?
You haven't addressed the clarification questions I asked you, so I'm reluctant to continue a back-and-forth here.
If you want to post back with the export of the finder as per the submission guidelines for the issue queue, and an explanation of why it is unsatisfactory, I may be able to make some suggestions.
Comment #5
frixos12 commentedHi and thank you again for your post.
Basically what i am trying to do is to use your module as an alternative exposed filters for a views module display and not for a core search engine.
My main views module display uses a contextual filter (Content: Has Taxonomy term with depth) for displaying my nodes.
So far, i have configured my finder for the choices section to use a particular contextual filter value (
print(arg(2));) since the path of my main views dipslay is www.mysite/categories/% (% -> each taxonomy term).Also i have created a block for the finder form which is displayed only in the above path patterns.
As a result, i have successfully output only the valid finder field values of every display path but when i make my filtering choices and press the find button finder doesn't filter my results but makes a whole new search returning also other not necessary results that meets my criteria.
For example if my main views display returns nodes that use taxonomy term A i want to filter these results based on taxonomy term B.
But my finder fetches the results of all nodes using taxonomy term B including the ones that i want( taxonomy term A).
So how can i configure my finder to filter these results? Do i need to use a contextual fiter in the results section?
Here is the export of my finder so far and the views display for my potential filtering results.
and the views display for the potential results :
Thank you again for your time and i hope i was fairly coprehensable this time.
Comment #6
danielb commentedYou have not configured a contextual filter for results.
However, since the contextual filter is dynamically based on URL arguments, and when you submit a finder, it goes to it's own path with it's own arguments (for it's own purposes), the contextual filter will no longer be present.
Additionally, since the form appears on the results page, and the url argument will be lost there, the choices will become unfiltered again?
A way around this would be to not use contextual filters, but to use an extra finder element to control this. If you were tricky you could make this element the first element (so it will be the first argument on the results page, and can still be used by contextual filters), and you could even use css or a custom module to make this element invisible (to control it purely by url). Though for usability you could just let the user change the taxonomy anyway?
Comment #7
danielb commented