Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Unexpected behaviour when filtering
This topic contains 11 replies, has 2 voices, and was last updated by Ernest Marcinko 1 year, 2 months ago.
- AuthorPosts
- January 2, 2022 at 4:31 pm #36153
Hi there and happy new year!
I am really struggling to implement settings.
For a custom taxonomy, “Restrictions” made by Toolset, a product has a restriction such as “vegan” or “gluten-free” only if it is certified as such. I want only certified products to be returned if these filters are used. So I have set:
Frontend Search Settings > Advanced > Show posts/CPM with empty (missing) taxonomy terms? To Off
I have set all terms to unchecked by default. And set Ignore checkbox filters that have nothing selected? To On.My understanding of this is that the checkboxes will be ignored until at least one is checked, and then only those results will be returned.
However, with Show posts/CPM with empty (missing) taxonomy terms? Off, no products are returned at all. This is the setup of the search demo here https://xyz.shop/search-demo/
You can use probiotics as a search term and gluten-free as a restriction. Here is an example of a product that should be returned https://xyz.shop/product/proven-probiotics-fit-for-school/
Here is a Loom describin it [xyz]
I am using the Index table, and have products-Restrictions selected for indexing.
Can you think what could be my problem?
Many thanks,
-
This topic was modified 1 year, 2 months ago by
Preet. Reason: privacy
January 3, 2022 at 1:24 pm #36157Hi Christopher,
We wish you a happy new year too!
You are probably looking to change this option: https://i.imgur.com/yHbWd4H.png
Best,
With the default setup, the unchecked checkboxes are treated as “exclude” – so if the item is within more than one category, and only one of them is checked, it will be excluded.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
January 3, 2022 at 1:50 pm #36158Hi Ernest,
Thank you for that. Unfortunately for these restrictions it does need to be an AND filter.
If the searcher needs to be both Gluten-free AND Dairy-free, we don’t want to return results that may only be one of them. That is what I thought I had allowed for.
Best wishes
January 3, 2022 at 2:20 pm #36160In that case use the third logic: https://i.imgur.com/Udguphf.png
Best,
That is basically an “AND” logic, but a bit more strict as only the exact combinations are allowed.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
January 3, 2022 at 6:00 pm #36162Aha! Brilliant! Thank you. That is much better. A game changer!
The next issue is that I am having trouble searching for strings with one letter words. eg. Vitamin A. I have set primary keyword logic to AND with exact matches, and min word length to 1, but a product with “Vitamin A” in the title, content and category is subordinate to other products that don’t have it in the title or category, and lots of other categories are returned above it.
Another niggle is that products with none of the restrictions checked (eg books) are still returned. Is it possible to stop that?
Thank you.
January 4, 2022 at 12:19 pm #36166You are welcome!
The results returned when searching “vitamin a” match, because both the “vitamin” and the “a” keyword matches within the contents of those results.
Best,
If you want to be more strict, then you can either turn off the matches from within the contents, or use exact matching.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
January 4, 2022 at 12:57 pm #36169Hi there,
Thank you, OK, there seem to be quite a lot of trade-offs, like intense strictness and losing the index table which may not be worth it for this which is probably the hardest search string. The worst edge case.
Switching to some issues I’m having with the Frontend Search Settings…
Multiselect with search does not seem to respect the Filter boxes max height. Is that right?Thanks.
January 4, 2022 at 1:19 pm #36171Yes, that is intentional for better layout.
You can however easily force it via some custom CSS:
Best,fieldset[class^=asp_filter]>div { max-height: 200px; overflow: auto; }
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
January 4, 2022 at 3:28 pm #36173Odd, this doesn’t seem to work. Other minor issues with the settings dropdown formatting include:
1. the placeholder text for the multi box is lighter than the others
2. When displayed in columns on mobile, it spills off the left hand side of the screen. Can it be made to drop down from the far right edge of the magnifying glass icon, instead of the settings dropdown?Thanks
January 5, 2022 at 2:00 pm #36182Hi,
Make sure to clear the complete site cache for the custom CSS to take effect.
1. It follows the default browser colors. Try:
input[class*=select2]::placeholder { color: #1f1f1f; font-family: Roboto,Helvetica; font-size: 14px; }
2. I’m afraid no, but you can rather choose a block layout instead of the hover, so the items follow the document flow, instead of hovering over the contents.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
January 10, 2022 at 9:41 pm #36223Hi there,
Thank you. I don’t think it is caching, as I am generally able to get CSS to update immediately, and have tried clearing all the caches.
It’s also quite odd that when I choose Block, the Settings drop-down background color changes to transparent, adopting the colour of the background of the Elementor block that it is in.
input[class*=select2]::placeholder worked well, and I specified my custom font (Myriad-pro), as I have specified it everywhere. But still the other drop downs in there are showing Helvetica. I have no idea where they are getting that from. Do you have any idea about that? It’s pretty much there now, but it would be good to iron out that niggle.
January 11, 2022 at 12:23 pm #36239Hi,
It looks like the inherent font is overrriding some of the items from Elementor, at least that is what I am seeing in the console.
Maybe try forcing all of the fonts within the search to myriad pro:.asp_w, .asp_w *, span.asp_select2-container ul li { font-family: 'Myriad-Pro', myriad-pro, sans-serif !important; }
That should take care of everything.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
-
This topic was modified 1 year, 2 months ago by
- AuthorPosts
You must be logged in to reply to this topic.