I have a configurable products with few sizes, let's say : 123, 160, M, S, L, XL
When I put products M and S on qty 0, which means it is out of stock
, then sizes disappear form the swatches option.
I was expected to see also out of stock products with a special class and to be non clickable, but out of stock products disappear.
I found a solution and I will post my answer. Maybe that will help someone.
Best Answer
To solve this issue:
Step 1
I installed this module( for some other versions of magento maybe this will work without step 2)
https://github.com/mjankiewicz/MagentoConfigurableProduct
Step 2
Create a module with:
etc/di.xml
then create Block/Outstock.php
After this run
php bin/magento cache:clean
Of course that you can combine those 2 modules. You can take
/Helper/Data.php
form the first module JanSoft_ConfigurableProduct and put this into the second module, or the oposite.