Tagged: search results, woocommerce
-
AuthorPosts
-
October 17, 2016 at 2:38 pm #700030
So I got this site where the out of stock items show up in both the live search results as on the search page..
I kinda worked around it with CSS, the enclosing article element has an outofstock class
#top .outofstock {display:none;}
For instance..
http://www.elektrowitgoedoutlet.nl/?s=wasmachineBut this is a sloppy solution at best.. and the’re still visible in the live search..
October 18, 2016 at 4:03 pm #700718Hi joax,
I think that is the default behaviour to be honest, but maybe a search for the problem would help you find a solution? I found this for instance: https://wordpress.org/support/topic/not-show-for-all-out-of-stock-products/
Regards,
RikardOctober 26, 2016 at 10:54 pm #704558I googled my ass off :-P haha.. but the link you posted is completely unrelated as far as I can tell..
And after some a little bit of research I concluded that the search in this case ignores the option in the WooCommerce panel that says “Hide out of stock products from catalog”
October 30, 2016 at 6:07 am #705755Hey!
Which of the products are out of stock? I browse through the list of washing machines but I can’t find one with the “outofstock” class attribute. Please post the login details here so that we can create a test product. However, I’m not sure if this possible because the live or “ajax search” will search for every posts as long as it is related to the keyword.
UPDATE: One workaround is to add a unique category to the out of stock products then go to the Relevanssi > Exclusions and restrictions section. Input the category id in the Restrict search to these categories and tags field.
Cheers!
IsmaelNovember 2, 2016 at 5:34 pm #707266I installed Relevanssi after this whole circus here.. The search results are a lot better now but the problem is not really solved..
When I serach “Wasmachines” I get the following: http://screencast.com/t/pbffbflbn63HFrom my perspective speaking I consider this a bug where Enfold is not compatible with certain WooCommerce features (As hiding out of stock products)
I love this theme in general.. but if you zoom in the details get kinda gritty.. but That’s the same with every them out there I guess :-(
I would love to see Enfold stay on top of the rest because I absolutely love working with itNovember 5, 2016 at 4:27 am #708522Hi,
Is it working if you switch to a default theme? If I am not mistaken, it will still display every products regardless of its stock status just like the theme which is using the default WP search function. Did you try the “category workaround”?
UPDATE: One workaround is to add a unique category to the out of stock products then go to the Relevanssi > Exclusions and restrictions section. Input the category id in the Restrict search to these categories and tags field.
Best regards,
Ismael -
AuthorPosts
- You must be logged in to reply to this topic.