Product Detail Page showing different error state when variation is out of stock

This topic has 3 replies, 2 voices, and was last updated 2 years, 7 months ago ago by IvanMTK

  • Avatar: IvanMTK
    IvanMTK
    Participant
    May 19, 2022 at 23:02

    We’ve noticed yet another new error with the theme today and it has to do with the product detail page.

    The issue happens whenever a product has more than 4 product variants, it no longer shows the x cross out on the option to reveal that it’s out of stock normally but rather, it shows a blue message box with an error message saying “Sorry, no products matched your selection. Please choose a different combination.”

    We believe that this is an issue with theme and is very random because it only occurs after we add more than 4 variants.

    I’ve included link to screenshot showing the issue along with links to 2 products, one behaving correctly and another incorrectly.

    Please, contact administrator
    for this information.
    2 Answers
    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    May 20, 2022 at 15:31

    Hello,

    It’s not theme issue, it’s related to WooCommerce plugin. Read this topic, please https://www.8theme.com/topic/exhausted/

    Regards

    Avatar: IvanMTK
    IvanMTK
    Participant
    May 21, 2022 at 02:49

    We found the following code snippet to fix the problem:

    function custom_wc_ajax_variation_threshold( $qty, $product ) {
    	return 10;
    }
    
    add_filter( 'woocommerce_ajax_variation_threshold', 'custom_wc_ajax_variation_threshold', 10, 2 );

    https://woocommerce.com/document/change-limit-on-number-of-variations-for-dynamic-variable-product-dropdowns/

  • Viewing 3 results - 1 through 3 (of 3 total)

The issue related to '‘Product Detail Page showing different error state when variation is out of stock’' has been successfully resolved, and the topic is now closed for further responses

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.