Unavailable swatches not greyed out anymore

This topic has 12 replies, 2 voices, and was last updated 1 years, 5 months ago ago by Rose Tyler

  • Avatar: martijntje
    martijntje
    Participant
    June 30, 2023 at 16:50

    Hello,

    Unavailable swatches not greyed out anymore. It used to work but after an update it stopped working.

    Do you know what is wrong?

    Please, contact administrator
    for this information.
    11 Answers
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    June 30, 2023 at 19:12

    Hello, Martijntje,

    Thank you for contacting us and for using XStore.

    This situation is independent of the theme update, it relates to WooCommerce settings: go to WooCommerce > Settings > Products > Inventory > set “Hide out of stock products from catalog”.

    Kind Regards,
    8theme team

    Avatar: martijntje
    martijntje
    Participant
    July 1, 2023 at 07:42

    Hi,

    Thanks for your answer. I does not seem to work.

    It used to be when you select option A the options at B would be greyed out if that combination was not available. Now when I select option A there is nothing greyed out, so the customer can not see which combination is not available.

    Can you help me out?

    Regards

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    July 1, 2023 at 08:30

    Hello, Martijntje,

    Thank you for your response.

    Please provide URL of product from your site where we will be able to see the mentioned situation.

    Kind Regards,
    8theme team

    Avatar: martijntje
    martijntje
    Participant
    July 1, 2023 at 08:33

    Attached.

    Please contact administrator
    for this information.
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    July 1, 2023 at 08:35

    Hello,

    Thank you for your response.

    Here is what we get by visiting your link – https://prnt.sc/JkEhcggNQzbw Please check.

    Kind Regards,
    8theme team

    Avatar: martijntje
    martijntje
    Participant
    July 1, 2023 at 08:39

    The website is only available after login.

    Please contact administrator
    for this information.
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    July 1, 2023 at 08:53

    Hello,

    Yes, we are login https://prnt.sc/_IiammwPJ9J7
    Please test how it works with the access you provided for us.

    Kind Regards,
    8theme team

    Avatar: martijntje
    martijntje
    Participant
    July 1, 2023 at 20:53

    Hello,

    The account was limited.

    Your account is now set to view to content.

    Regards,

    Martijn

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    July 2, 2023 at 07:42

    Hello, Martijntje,

    Thank you for your response.

    It looks like this situation is caused by one of plugins or an additional custom code.
    We’ve checked and out of stock variations are shown as expected on our test sites and demos.

    We suggest disabling all third-party plugins (including cache plugins) that do not come bundled with XStore (https://www.8theme.com/documentation/xstore/plugins/included-plugins/), clearing the cache of the browser, and then checking again. If it helps, enable them one by one and let us know the name of plugin that affect the out of stock variations displaying.
    Also, check your custom code.

    Kind Regards,
    8theme team

    Avatar: martijntje
    martijntje
    Participant
    July 2, 2023 at 15:41

    I disabled all other plugins and there was no custom code.

    When I added the following code to functions.php it started working again:

    ======
    function woo_custom_ajax_variation_threshold( $qty, $product ) {
    return 50;
    }
    add_filter( ‘woocommerce_ajax_variation_threshold’, ‘woo_custom_ajax_variation_threshold’, 10, 2 );

    ======

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    July 3, 2023 at 08:37

    Hello, Martijntje,

    Thank you for letting us know.

    Indeed, it could have been due to the default value of the WooCommerce which sets 20-30 variations for which it runs checks and so on. With the code you added, you increased the default value which helped you as there were many possible combinations >30.

    Kind Regards,
    8theme team

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

You must be logged in to reply to this topic.Log in/Sign up

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