Quicksearch results by Taxonomies as well as Products
- # 9 months ago
It would be great to have quicksearch results offer taxonomy term matches as well as product matches.
For example, if I am looking for “Adam” on my bookstore site, instead of just getting products, it would be great to have something like:
Douglas Adams: “Hitchhikers guide to galaxy 1”
Douglas Adams: “Goodbye and thanks for all the fish”
Adam Schaff: “Introduction to semantics”
Adam Schaff: “Marxism and human entity”
If I click on any of the matching authors, I get taxonomy archive view, while if I select any of the products, I get product details, as it works now.
On my subjective scale, out of all features I’d like to add to WPSOLR, this one is on the top. While I understand that this is not 10/10 priority for many others, for me it is 10/10.
I have over 60,000 products in the database and having just products show on quicksearch is problematic.
Since these are used books, each book that arrives, because of different condition, because of different edition, while having the same title shows up as product, but in fact, even the name of the book is a taxonomy for me.
In my case, I don’t even need the end products to be displayed in quicksearch, but rather, only taxonomy terms. Then, when a certain title shows up, it is in fact a taxonomy term that, when clicked, returns an archive view of all products (books) that match the term – in this case the title.
To return to the Duglas Adams example:
We have, say 9 books of the title “Hitchhikers guide to Galaxy”. Each of these is a separate product, not a variation of a single one. This is the way it has to be, because each is separately managed on an inventory level, each has its own photo, each in a different condtion, etc.
I only need one title to show up on quicksearch, not 9 of them. The title is taxonomy. There is only one term “Hitchhikers guide to Galaxy”, which should return an archive view of all 9 products.
If I can get this feature, I would definitely be extending my existing subscription.
In my particular case, I actually need taxonomy terms as search results, not products. I should have an option to select which taxonomies are searchable, and then terms would appear, separated by taxonomies.
As an example, if I have following taxonomies:
– Title (normally, this would not be a taxonomy, but as I previously stated, in case of used books, even title is a taxonomy)
And now if I search for “Adam”, I should get:
“Adam in ochre by Colin Simpson”
just to add:
Clicking on any of these search results, which are taxonomy terms, should result in archive view of all products matching that term.
And, needless to say, these taxonomies are actually Woocommerce product attributes, but woocommerce attributes are taxonomies ultimately so this mechanism would work outside of woocommerce as well I assume.
Something like https://advanced-woo-search.com/guide/terms-search/ ? (it can search in categories and terms)
Yes indeed, something like that, except that this example ultimately gives a list of individual products, whereas I would like to have taxonomy terms in such way that if I click on a quicksearch result and get archive view of individual products that match the taxonomy term. The only time I need individual product is if it is searched by SKU.
I had a good thought about it, and found that your needs could be very useful as a new feature I postponed until now: the “Triggers”.
Your requirement, in a nutshell, are to suggest products if a SKU is typed, else suggest taxonomies (categories and terms). The suggestion links should open their respective product or taxonomy archive.
The new “Triggers” are a generalisation of that:
1) Extend current post types search to also embrace categories and terms
2) Define one to several “conditions” for which to apply additional “filters”
Triggers must match some conditions:
– Url patterns
– Search type (Suggestion or search)
– Keywords pattern
– jQuery selectors
Trigger’s filters can be:
– Filter by post types
– Filter by taxonomy values
– Filter by custom field value
– Filter by date
So, in your situation, you would define 2 Triggers named “Terms suggestions” and “Product SKU suggestions”:
Trigger “Terms suggestions”:
– Conditions: apply on suggestions only, on any url, for any search box, for any keywords NOT matching a SKU format
– Filters: search in any term, in any category
Trigger “Product SKU suggestion”:
– Conditions: apply on suggestions only, on any url, for any search box, for any keywords matching a SKU format
– Filters: search in any products
Depending on what the visitor would enter in the search box, the suggestions would then show products or taxonomies.
If your SKUs do not have a well-defined pattern, then you could just create 2 distinct search boxes, associated to their own filter, but without the matching SKU format condition.
Let me know if it would fit.
You must be logged in to reply to this topic.