-
AuthorSearch Results
-
September 23, 2019 at 4:59 pm #221627
In reply to: Problems with checkbox selection
TrevorParticipantI see that the Ajax Container setting is still set to
#main, like this:https://www.screencast.com/t/hSXhhOljPlUy
Most WooCommerce templates tend to use
.results, but your theme looks to be different.There appear to be 3 possible Ajax containers to use, so try them in this order:
#1.
.main-products-loop
#2..products-loop
#3..products-gridSeptember 23, 2019 at 4:11 pm #221608In reply to: Dropdown menu blank after cache rebuild
TrevorParticipantSo, a little bit further forward. Using the WooCommerce method, something is breaking our rewrites. But, with our option to uses rewrites off, then the form works, albeit it goes to the shop home page, which is courses.
September 20, 2019 at 4:42 pm #221488In reply to: Issues with results and sorting
TrevorParticipantYour form has a search field, WooCommerce Product Categories and Sort Order. If you want to search Product Tags, you can also add a field for them, or do you want to be able to search the tags from the search box?
The issue in #1 happens because the Storefront template is not coded in a way that can handle no results found when the results are refreshed by Ajax.
The sort order in our query might be being affected by another plugin or theme function overriding it.
September 19, 2019 at 11:17 am #221332In reply to: Format question
TrevorParticipantThe free version and the pro version should be OK both activated, but I am unsure if the free will work at the same time.
Are you able to send me a live link/URL to your search page so I can take a look?
You will need to upload that image to a file sharing site. WordPress has such a site if you don’t already have access to one, called Cloudup. Share the link with me here.
One of the reasons so many themes/sites use ‘Select’ replacement scripts is that much of the formatting is done by the browser, and so you have little or no control over that. However, if you can let me know what you want, I can help.
Note that there is an option in our settings page to choose which Combobox script to use. If you change this to Select2, that script is then available for you to apply to the form (see below for how). Select2 is maintained now by the WooCommerce team, who are, of course, owned by Automattic, the owners of WordPress, and as such is used by a lot of themes and plugins.
If you want the select box with a search box at the top, you need to add this JavaScript to the page:
<script> (function ( $ ) { $(document).on("sf:ajaxfinish", ".searchandfilter", function(){ $('select.sf-input-select').select2(); }); }(jQuery)); jQuery(document).ready(function($){ $('select.sf-input-select').select2(); }); </script>If you want it without the search box at the top of the select boxes, then this:
<script> (function ( $ ) { $(document).on("sf:ajaxfinish", ".searchandfilter", function(){ $('select.sf-input-select').select2({minimumResultsForSearch: -1}); }); }(jQuery)); jQuery(document).ready(function($){ $('select.sf-input-select').select2({minimumResultsForSearch: -1}); }); </script>This post shows the complete Select2 CSS that we already include in our plugin:
https://support.searchandfilter.com/forums/topic/customise-dropdown-combobox/#post-180345
At the end is an example of how to modify it.
September 18, 2019 at 3:03 pm #221248In reply to: Dropdown menu blank after cache rebuild
TrevorParticipantGot the file.
The plugin does not run or modify the wp_query at all. Thus it leaves it to WooCommerce.
So, our plugin has to be set to use the WooCommerce method, and will act upon the shop page, or a taxonony page of products.
Your shop page is Courses, and not Training. Is Training a taxonomy term?
September 10, 2019 at 2:31 pm #220629In reply to: Dropdown menu blank after cache rebuild
TrevorParticipantI thought it odd that you did not use the WooCommerce store method in our form. Is the WooCommerce shop page set in the WC settings? That would be the way to use multiple category archive pages.
September 5, 2019 at 5:19 pm #220372In reply to: Some kind of conflict with Woocommerce!?
AnonymousInactive*** SOLVED (I hope…) ***
Hi Ross, the way to really finding what is causing my search results problem was so damn long (I installed another blank fresh wordpress site and tested all day long) – but now finally I found that one line of code, that is causing all the problems!
woocommerce_hide_out_of_stock_items was set to yes in wp_options table – just change the value to no and tadaaa – finally the blog posts are shown by the form as expected.
In the frontend this woocommerce setting can be found under wooocommerce –> settings –> products –> inventory…
Could you please check that and verify that you can reconstruct the issue/soultion? Maybe you can fix this / ask woocommerce to fix this? As blog posts have no inventory I think showing plog posts should not be influenced by this setting! 🙂
September 5, 2019 at 12:37 am #220325In reply to: Some kind of conflict with Woocommerce!?
AnonymousInactiveHi Ross,
I am totally stuck again. I did not do any bigger changes but filtering again is not working on the staging site. The only thing that still seems to be a problem is woocommerce being active. As soon as I activate it there are no blog posts found in search. This is so totally weird. I have to admit I don’t know what to do or try anymore…
September 4, 2019 at 3:35 pm #220294In reply to: Some kind of conflict with Woocommerce!?
RossKeymasterHi Miriam
Ok well thats a start at least!
So in my opinion (but its guess work at this stage), one of the plugins, is doing something to our queries, either using the filter
pre_get_postsor something more heavy handed (like caching).You will have to work with them, to isolate which 1 of their plugins is causing the issue.
Once you do that, I can take a look at the plugin code to see if there is anything identifyable.
Are you now able to easily enable / disable the hosting features, or do you need to contact them every time?
I assume right now, they are disabled?
BTW I think my previous assumption, of none of hte post types working was incorrect (I didn’t put them in the
post typeslist), so I think the issue is still with WooCommerce, S&F, and your hosting plugins, combined.Thanks
September 4, 2019 at 12:44 pm #220264In reply to: Some kind of conflict with Woocommerce!?
RossKeymasterHi Miriam
It seems something is really not working right in your setup.
I disabled everything, installed a clean WP theme, and the issue still occurs. Doing the same anywhere else (i.e, in my dev environment) and everythings works smoothly as it should.
Then I disable WooCommerce, and enable ther other Post Types in the drop down:
https://miriamkreativ.com/blog-test/And you will see, none of them really work correctly, they all show the same results, unless you select
All Post Typesand then you get nearly double…Very unusual. I tried recreating on one of my own setups but not getting these kind of results.
Can you try to recreate this issue, using a clean install of WordPress (anywhere, local, staging etc) and let me know how what happens for you?
Right now, it looks like there could be some hidden config / corruption which you’ve moved over from the original site, that is affecting this one. Also, please check if you have any Must Use plugins enabled? (they are found in
wp-content/mu-pluginsThanks
-
AuthorSearch Results