fbpx
Enjoy Year-End Sale: 50% Off All Plugins! Coupon Code: NewYear2025

Showing out of stock if no attribute selected

Hi all,

I m using the addon on my website and it works quite well, although I have any issue when the product page loads.

As long as no attributes are selected, it displays a message “out of stock” which of course will dissuade any customer from even selecting an attribute.

How can I fix this? I looked around in the option and it is not really clear if any of them could fix this issue.

Thanks a lot for any help,

hugokx.

 

Golam Kibria

Hi Hugues,

Will you please share a product link with that problem?

Can you please give us temporary admin access to your site? We’ll try to investigate the issue for you.

You can add new users by going to Users > Add New set the user and password for us, set the role to admin, and set the info here.

And add your site URL, login username, and password in the site login area. Follow this guideline: https://www.useloom.com/share/27c1f2ac633c4060b2da883d946107d7

Hope to hear from you soon!

Hi,

Thank you for your answer,

I further inspected the issue and I realize that it only happens on the first time the page is loaded.If I reload the page it does not display “out of stock”

I would like to share the credentials for login, but the issue only happens on production server and I do not feel confident to share the dev credentials for production server. The issue does not happen on the stagging server. I compared the firefox console for Prod and Stagging to spot if there were any differences but no

.

 

Hi,

On Chrome it did not happen when loading the page the first time as a public user but shows “out of stock” on the subsequent reloads.

On Edge, same as Chrome.

Please try at the url given in the ticket, and come back to me.

Kind regards.

Golam Kibria

Hi Hugues,

Did you try clearing the cache?

Please share a screenshot of the Advanced settings section of our Swatches plugin.

Also, please kindly do a plugin compatibility check by doing these steps to identify the error :

=> Deactivate all of your additional plugins except WooCommerce and WooCommerce Variation Swatches Plugin.

=> See if the problem persists. If the problem resolved, you can tell which plugin might be the culprit of this error by activating your additional plugins one by one.

Looking forward to hearing from you soon.

Thank you

Hi,

Thank you for your answer, after investigating during a few hours as deeply as I could I realized that during the page loading the were 2 POST requests to  admin-ajax.php when it showed “out of stock” and only 1 POST request when it worked fine.

I looked in the product properties for both cases (one which did not display the “out of stock” and one that did).

The issue was that you need to make sure  that “Default Form Values” is set to “No Default” (at least one value so it does select anything) otherwise it overrides the selection of plugin Variation Swatches and selects whatever is set in Default Form Values in background. If this variation is not in stock, the message “out of stock” will be displayed even though nothing seems to be selected

Hope I could help someone!

Cheers.