-
AuthorSearch Results
-
April 20, 2016 at 8:54 pm #43441
In reply to: Woocommerce results not updating
TrevorParticipantTiny steps we make ๐ When I speak to Ross tomorrow, I will ask. I know that the plugin is designed to work with the shop page itself, so we may have to get creative. I will get back to you.
But, it may be that the page might url need to be a get query instead of a full url as you have it now.
Just in case you didn’t find it, here is the documentation:
http://www.designsandcode.com/documentation/search-filter-pro/3rd-party/woocommerce/
April 20, 2016 at 2:18 pm #43357In reply to: Woocommerce results not updating
TrevorParticipantHi
Normally, WooCommerce has its results in the div called main, like this:
<div id="main" ....
BUT …. in your case, that contains the left sidebar (including the search form) and the results. Search & Filter will not work with the results and search form in the same
Results Container
, which in your case is set (by default) to#main
Looking at the page code, I think that this needs changing to the class of the main content column:
.main-content
Notice the change from # to . reflecting the change from id to class.
That might be the cause, if not, get back to me.
April 18, 2016 at 12:26 am #43026In reply to: Additional Post Type required
RossKeymasterHi Judy
Ok so I managed to solve the issue ๐ It wasn’t easy…
So, let me explain what has happened.
The results were always being set to
0
because the query for S&F was being “hijacked” by your theme.I say hijacked, but its completely standard practise to write filters for modifying queries, but when they are added too loosely, these modifications can have unintended effects.
Essentially this is a theme issue, and it would probably be a good idea to loop the theme devs back in here.
Basically, in the class WC_Tour_Query (in the woocommerce/inludes/ folder in your parent theme), there is a
pre_get_posts
filter which makes some modifications to queries.The issue is, it was modifying S&F queries too. The reason this is a theme issue though is because they have this condition:
if ( ! $q->is_main_query() ) { if ( 'product' == $q->get( 'post_type' ) ) {
This means, they modify ANY query that is querying the post type “product”. Now this has greater consequences, because any plugin (not just S&F) that makes use of WP_Query (which is pretty common, its a great class) and it happens to be querying the “product” post type, will be modified by your theme. This loose condition has the potential to break an array of different plugins.
What we do with S&F, to avoid this kind of issue, is to attach a variable to all our queries, and befoer we modify any query we check to see if its there.
This way there is no chance of modifying something unintended.
Anyway, as a quick fix, I modified this file around line
33
– and made sure that the query was not modified if it is a query belonging to S&F:It was:
$q->set( 'tax_query', $cur_tax_query );
And I’ve updated to:
if(!isset($q->query_vars['search_filter_id'])) { $q->set( 'tax_query', $cur_tax_query ); }
This is the quick fix, the better one is to get your theme authors to take a look at this thread.
As an FYI, I tried to put this modification in to your child theme (woocommerce/templates/WC_Tour_WP_Query.php) but it wasn’t being picked up, so I made the modification in the parent theme, and created a backup of the previous file called
WC_Tour_WP_Query_Bkp.php
๐
PS, if you update your theme, you will lose the changes I have made, you will have to re-apply them with every update unless your theme authors make the modification above.
I’m happy to talk to them directly and explain further.
Thanks
April 17, 2016 at 4:35 pm #43004In reply to: Variations not showing in filter
RossKeymasterHi Eric
Sorry for the delay I thought I would do some investigating.
Essentially, you described the issue yourself – you are using another plugin called “show single variations” – this is kind of a hack into WooCommerce to break them out to appear as though they are their own products.
S&F, honors the WooCommerce way of doing things, and treats variations as part of the same product.
So what you have is 2 plugins modifying the query to do certain things.
Unfortunately we only offer complete compatibility for WooCommerce itself and not a plugin developed by some third party – although many will work, this one, modifying the query clashes with the modifications S&F makes on the main Woocommerce query.
Thanks
April 17, 2016 at 11:52 am #42995In reply to: Setting-up WooCommerce and S&F
TrevorParticipantI am closing this thread. Fixed with a bug fix for WooCommerce that will be in the next full release (I think).
April 12, 2016 at 10:58 am #42422In reply to: Additional Post Type required
TrevorParticipantHi. I can see the issue and need to refer this to our devs. They may also require ftp access to examine the plugin that sets up the Tours CPT within WooCommerce. So, if you are able to provide those details and credentials, that may speed things up a bit. I will hand ownership of this thread over to Ross for now.
April 7, 2016 at 7:25 pm #41982In reply to: Store Page Description Not Displaying
RossKeymasterTa daa (take a look at your shop)
I figured it is an issue with S&F and WooCommerce.
When on the initial shop page, S&F sets pagination to
1
which is correct.However, it looks like WooCommerce looks at the pagination and says, if it is not set, show the description.
Anyway, I made it so for shops, we follow the WooCommerce convention of not setting pagination to 1 on the first page.
๐
That was hard to track down…!
April 6, 2016 at 8:13 am #41746In reply to: Compare page
RossKeymasterHi Daniel
I took a look and S&F seems to be working ok – I placed the form on another page:
http://zdolnelapy.pl/projekty/katalog/shop-form-test/ – and as you can see, when you use it, it takes you to the shop with the correct search results.
Now the question is, how can you add the search form to your shop page? I cannot see any sidebar / widget area to add this – so this really is a theme restriction – not allowing things to be added to the shop page.
In this case, you must edit the template file for displaying the shop – and add the shortcode in there.
The shop is usually displayed using the template file
woocommerce/archive-product.php
so you must edit this file (in your theme) and add the S&F form to that page – something like:<?php echo do_shortcode("[searchandfilter id='2800']"); ?>
I hope that makes sense.
Thanks
April 4, 2016 at 10:54 pm #41597
AnonymousInactiveNevermind, I found a setting in the Search & Filter Pro “posts” tab that allows me to set a default sorting order. Didn’t know it overrode the main woocommerce product archive page, but I do now!
Thanks!
April 1, 2016 at 6:50 pm #41294In reply to: Filter on EDD Search Results
AnonymousInactiveHi Trevor,
More like the example on the Woocommerce site – I would like the categories listed, and in brackets the amount of items that sit in that catergory – allowing the user to select the category and further refine the search.
This appears on the search results. That way the user is controlled to run a general search first, then they further filter their results.
Adam
-
AuthorSearch Results