-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add out of stock class to radio buttons #22
Comments
Do you have a link where to check this? I haven't been able to reproduce this problem |
http://freshyjon.wpengine.com/product/product-name/ Size 2 and 10 are out of stock... but not showing. |
Are you sure you have a variation for those sizes and those variations are enabled? |
Yes, I have variations set up correctly. Here is the variations for the item: Here is the WooCommerce setting enabled, that is necessary to show them as "disabled": https://gyazo.com/a2b7c5ee2c340c2d5cc7bcca1856ceb6 When I deactivate the plugin, those sizes do NOT show in the dropdown ... but I assume that's because I have it toggled for them to "Hide out of stock items from the catalog". |
I wasn't able to reproduce this. |
I'm using the latest versions of everything. I also deactivated all other plugins (only WooCommerce and your plugin were activated). And I activated the 2017 theme. The problem was still there. The "out of stock" products did not show: https://gyazo.com/5bafb0318ad593fbf30f9f369a7b1b6e Regardless... if you are not experiencing this on your end... it may be a server/PHP/cache issue? I just toggled the "Hide out of stock items from the catalog" again and cleared my server cache (I use WPEngine). And it works again. http://freshyjon.wpengine.com/product/product-name/ But as mentioned originally, it seems hit-or-miss. Sometimes it works, sometimes it doesn't. Either way, if you were able to add a "disabled" class to the div, I could then uncheck "Hide out of stock items from the catalog"... and then style the "disabled" radio button accordingly. However, at this time, there is no specific class to distinguish between disabled and in-stock options (when "Hide out of stock items from the catalog" is unchecked). https://gyazo.com/b5f7f68c5f5788121b0f4a8d18548244 |
From what you describe, the problem seems to be related with the cache of your site. |
Unfortunately I'm not yet familiar enough with PHP to be able to implement such a feature. |
It seems hit or miss, but even with "Hide out of stock items from the catalog" checked, the "out of stock" variations still do not show. They are supposed to show, but as "disabled". However, this is not the case. They seem to work rarely, but most of the time they aren't showing at all.
Can you simply do this via a CSS class instead? It would be ideal to have all variations always show... but add a "disabled" class to each variation div, so that we can more easily control styling and/or visibility ourselves.
The text was updated successfully, but these errors were encountered: