Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1172297

    Hi,

    I have the setting “Hide out of stock items from the catalog” checked but I still see out of stock products in the search AJAX results as well as on the search results page.

    How do I prevent out of stock items from showing up in both places?

    Thank you.

    • This topic was modified 4 years, 10 months ago by nychng.
    #1172687

    Hey nychng,

    Thank you for the update.

    Can you give us an example of the products that are out of stock or those that should not be showing in the search results page? Also, make sure that the WooCommerce settings -> Products -> Inventory -> Hide out of stock items from the catalog

    #1187236

    Same problem here anything new on this? ” Hide out of stock items from the catalog” is set.

    #1187954

    Hi,


    @mikeandrewfischer
    : Thanks for chiming in. Where can we see the issue? OP hasn’t responded yet, so we haven’t got the chance to check the issue. Please open a new ticket/thread and post the necessary details in the private field such as the login info, link to the page/s with the issue, screenshots etc. Thank you.

    Best regards,
    Ismael

    #1187998
    This reply has been marked as private.
    #1188362

    Hi,

    Thank you for info.

    Can we deactivate the plugins temporarily? We can’t reproduce the issue on our end, so it’s possible that this is an issue with the shop extensions.

    Best regards,
    Ismael

    #1188364

    Yes Please

    #1188782

    Hey!

    We managed to temporarily fix the issue on our end by adding this code in the functions.php file. but it’s not working in your installation.

    function avf_hide_out_stock_products($query, $params) {
    	$query['tax_query'][0] = array(
    		'taxonomy' => 'product_visibility',
    		'field'    => 'name',
    		'terms'    => array('outofstock'),
    		'operator' => 'NOT IN'
    	);
    	return $query;
    }
    
    add_filter('avia_product_slide_query', 'avf_hide_out_stock_products', 10, 2);
    add_filter('avia_masonry_entries_query', 'avf_hide_out_stock_products', 10, 2);

    We have reported the issue to our channel and we’ll let you know once we found a fix.

    Best regards,
    Ismael

    #1188783

    Hej Ismael, when I open the page there is no change at the moment – Woocommerce shop hides the “out of stock products” as it should – but masonry and the Grid still shows ” out of stock products ” ??
    regards Mike

    #1189550

    Hi!

    but it’s not working in your installation.

    Sorry for the delay. As we’ve said earlier, the snippet works on our own installation but it didn’t work in yours. Oddly enough, we can no longer reproduce the issue on our end, but we didn’t really know what changed or what made it work again.

    Can we access the site? The login token has expired, so we couldn’t check the site again.

    Regards,
    Ismael

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.