Home Forums WoodMart support forum Show out of stock products

Show out of stock products

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #643620

    RD
    Participant

    Hello,
    on the categories and on the homepage I am showing the variations on the product item. so if I have product with 3 sizes, I show it as S, M, L.
    once one of the variations is out of stock I see the cross line on the variation and the user can’t select it.
    up to here everything is ok.

    with these settings, I also want to show all the out of stock products but if I Go to WooCommerce > Settings > Products > Inventory
    check the option “Hide out-of-stock items from the catalog”
    and save it, it is not showing the out of stock products.
    if I will uncheck the box and save it, it won’t show the cross sign on the variations that have no stock.

    how can I solve this issue? so I will have the cross sign along with showing all the out of stock products?

    thanks.

    #643852

    Hello,

    The issue is caused by WooCommerce’s global inventory setting. When you enable “Hide out-of-stock items from the catalog,” it hides all out-of-stock products completely, which includes individual variations.

    The disabled swatch style of our theme does not hide unavailable variations but rather disables them, preventing selection.

    You need to have the variant of the Product not checked with the Enable option on it and then the Disabled Swatch style will work accordingly.

    See these images for reference:
    https://snipboard.io/BMehIF.jpg
    https://snipboard.io/NbOzfP.jpg

    Please try to check these disabled swatch settings and check the issue. If you have any questions feel free to contact us.

    Best Regards,

    #644213

    RD
    Participant

    Hi,

    thanks for your answer. I know these things you wrote but it looks to me it’s a bug we need to solve since we do want to have the function of disable an individual variations but with it we also need to show the products that out of stock completly.

    I can’t check with every order I am getting if the variation is out of stock and if so to go and to unchekc the box to disable the individual variation.

    there must be a way to show out of stock products along with the function to disable the individual variation.
    there are swatches plugins that can do it so you much have a way to solve this issue on your side as well.

    I am hoping you will be able to help me with that since I am guessing there are many other users who would be happy to have it.

    thanks.

    #644224

    RD
    Participant

    when I am adding this code:
    add_filter( ‘pre_option_woocommerce_hide_out_of_stock_items’, ‘simplylove_hide_out_of_stock_exception_category’ );

    function simplylove_hide_out_of_stock_exception_category( $hide ) {
    if ( is_product_category( ) ) {
    $hide = ‘no’;
    }

    //הצגת המוצרים שלא במלאי גם בדף הבית
    if ( is_page( 896 ) ) {
    $hide = ‘no’;
    }
    return $hide;
    }

    it is almost working.
    the issue I am having with this code is that in order to see the out of stock variations I have to put the mouse over the product.

    any suggestions?

    #644384

    Hello,

    Just to confirm, do you want to hide specific variations when they are out of stock but still show the main product if other variations are available? And if a product is completely out of stock, do you still want it to be visible in the catalog?

    If yes, Share the wp-login details so I can further check on your site and give you a possible solution.

    Best Regards,

Viewing 5 posts - 1 through 5 (of 5 total)